You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforce the 120-column limit and keep test runs out of the shared log
CLAUDE.md says ruff rejects lines over 120 characters, but the repo had
no ruff configuration, so CI ran the default rules without E501 and 67
lines were over. pyproject now selects E501 at 120 and every flagged line
is back under it; suppression markers stay on the line the analyzers
report, with the prose moved to a comment above. 31 of those lines were
in the generated IDE stub, which turned out to list 199 of the 739
executor commands: the generator now wraps long signatures, the stub is
regenerated, and a test compares its command set with the executor.
This repo's own tests were also writing the shared ~/.je_auto_control
log. The handler now reads JE_AUTOCONTROL_LOG_FILE when it opens the
file, so test/conftest.py can redirect it even though the pytest11
plugin imports the package first.
Copy file name to clipboardExpand all lines: docs/updates/2026-09.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,3 +160,19 @@ Index and query commands: [README.md](README.md). New entries go at the end.
160
160
-**Result / numbers**: these three calls were the source of all 13 warnings in the last full headless run (8,166 passed). `-k "color_stats or perceptual or dedup or hash or facade_import" -W error::DeprecationWarning`: 76 passed, 3 skipped. Also found the local `.venv` on Pillow 12.2.0 (the version with the 13 CVEs) despite the pin, and reinstalled 12.3.0.
## U-20260923-05 · 2026-09-23 · Line limit enforced by ruff; stub regenerated (199 → 739) · #done #quality #typing
165
+
166
+
-**What**: `CLAUDE.md` said the 120-character line limit was the one limit CI rejects (through `ruff`). It was not: the repo had no ruff configuration, so `ruff check je_auto_control/` ran the default rule set (`E4`, `E7`, `E9`, `F`), which has no `E501`, and 67 lines were over 120. `pyproject.toml` now sets `[tool.ruff] line-length = 120` with `extend-select = ["E501"]`, and every flagged line is back under it. Ruff's own rule still exempts a line that ends in a pragma (`# noqa`, `# nosec`), since a marker cannot move.
167
+
-**The generated stub**: 31 of the 67 were in `je_auto_control/actions.pyi`, the IDE stub `utils/stubs/generator.py` writes. Regenerating it showed it was far out of date: **199 of 739** executor commands, several with old signatures (`AC_a11y_click` without `window_title`/`contains`). The generator now puts one parameter per line when a `def` line would exceed `MAX_LINE_LENGTH` (120), splitting only at top-level commas so `Dict[str, Any]` stays whole, and the stub is regenerated with it (739 signatures, no line over 120). A test now fails when the stub's command set differs from `executor.event_dict`; names only, because annotations render differently across Python versions (3.14 prints `typing.Union` as `X | Y`).
168
+
-**The other 36 lines**: most carried a `NOSONAR` or `nosemgrep` marker followed by a paragraph of justification. The markers stay on the line the analyzer reports (Codacy honours `nosemgrep` only there, and `NOSONAR` only works same-line) and the prose moved to a comment directly above, with `# reason: see above` where the rule calls for an inline reason. The rest were long strings (three UI strings each in the English and Japanese catalogues, one error message), imports and `except` tuples, wrapped with no change in value. `diagnostics.py` imports `import_module` directly so its marked line fits; `xml_file.py` parenthesises one import so its marker stays on the statement's first line.
169
+
-**Result / numbers**: `ruff check je_auto_control/` clean with E501 at 120; `test_stub_generator.py` 15 → 19 tests. The `CLAUDE.md` sentence is now true, so it stays as written.
## U-20260923-06 · 2026-09-23 · Test runs no longer write the shared package log · #incident #logging #testing
174
+
175
+
-**What**: Reported by the Jeffrey_RPA session an hour after U-20260923-01: this repo's own test suite was writing into the new shared `~/.je_auto_control/logs/AutoControlGUI.log` (5,360 lines by 00:38, all of them from pytest processes — this suite's runs plus one other repo's run through the `pytest11` plugin), the same leak Jeffrey_RPA's repo-root file had and a file its bot will append to after its next restart. A `conftest.py` cannot set `JE_AUTOCONTROL_LOG_FILE` early enough if the handler resolves it at construction, because the plugin imports the package before any conftest runs. The package handler now re-reads `default_log_file()` each time it opens the file (it opens on the first record), and the new `test/conftest.py` overwrites the variable with `<tempdir>/je_auto_control_pytest/AutoControlGUI.log` for every test directory. The polluted file was deleted after checking every writer pid was a pytest process.
176
+
-**Result / numbers**: two tests in `test_logging_location.py` (15 now): a delayed handler built before the variable is set writes to the path set afterwards, and the running suite's `default_log_file()` is not the shared file.
-**Open items**: none for the log. The same suite also writes real per-user state (`audit.db`, `address_book.json`, `quarantine.json`, `run_history.sqlite`, `artifacts/`) under `~/.je_auto_control/`; see `Progress.md`.
0 commit comments