fix(780): reconcile the ruff gate with #784, merged in parallel #814

Merged
timothy merged 1 commits from fix/780-followup-ruf100-main into main 2026-08-22 11:34:05 +02:00
Owner

refs #780, refs #784

Main is currently red against the gate #813 just landed — not because either PR was wrong, but because they were green separately and are red together. #813's branch predated scripts/check-doc-narrative.py, so its CI never ran ruff over that file. Without this, the next PR to open would have failed Script lint and tests (ruff + pytest) on a file it did not touch.

Two findings, both in #784's files:

  • RUF100 × 2 on # noqa: BLE001 in scripts/check-doc-narrative.py. BLE is not in this repo's select, so those directives suppress nothing — which is exactly what RUF100 exists to say. Enabling BLE instead was measured and rejected: it fires 6 more times in decisions_validate.py, whose broad catches are deliberate, and picking that fight belongs in its own PR rather than in an unbreak-main commit. The non-enabled code is dropped; S110 on the first site stays (S is selected) and both explanatory comments stay intact.
  • scripts/tests/test_check_doc_narrative.py was not ruff-formatted. Formatted; suite still 807 passed, 2 skipped.

Verified locally with the exact shipped invocation (git ls-files population, --no-force-exclude): 35 files, All checks passed!, 35 files already formatted.

The generalisable bit: a gate whose population is "everything tracked" is only as green as its base. Neither PR's CI could have caught this; it is visible only after both merge.

refs #780, refs #784 **Main is currently red against the gate #813 just landed** — not because either PR was wrong, but because they were green separately and are red together. #813's branch predated `scripts/check-doc-narrative.py`, so its CI never ran ruff over that file. Without this, the next PR to open would have failed `Script lint and tests (ruff + pytest)` on a file it did not touch. Two findings, both in #784's files: - **`RUF100` × 2** on `# noqa: BLE001` in `scripts/check-doc-narrative.py`. `BLE` is not in this repo's `select`, so those directives suppress nothing — which is exactly what `RUF100` exists to say. Enabling `BLE` instead was *measured* and rejected: it fires 6 more times in `decisions_validate.py`, whose broad catches are deliberate, and picking that fight belongs in its own PR rather than in an unbreak-main commit. The non-enabled code is dropped; `S110` on the first site stays (`S` **is** selected) and both explanatory comments stay intact. - **`scripts/tests/test_check_doc_narrative.py` was not ruff-formatted.** Formatted; suite still `807 passed, 2 skipped`. Verified locally with the exact shipped invocation (`git ls-files` population, `--no-force-exclude`): 35 files, `All checks passed!`, `35 files already formatted`. The generalisable bit: a gate whose population is "everything tracked" is only as green as its base. Neither PR's CI could have caught this; it is visible only after both merge.
timothy added 1 commit 2026-08-22 02:39:18 +02:00
fix(780): reconcile the ruff gate with #784, merged in parallel
PR Gates / Docs update reminder (pull_request) Successful in 22s
Build ErsatzTV Image / Delimiter ban (release path) (pull_request) Successful in 38s
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 12s
PR Gates / Fix proofs (Proves trailers) (pull_request) Successful in 12s
PR Gates / decisions lifecycle (pull_request) Successful in 30s
Review verdict / Set review-verdict status (pull_request_target) Successful in 36s
PR Gates / Script lint and tests (ruff + pytest) (pull_request) Successful in 4m28s
review-verdict/h10 Review-verdict: MERGEABLE @ eda2fac (base: main)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 8m33s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m7s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Skipped
Build ErsatzTV Image / Functional E2E (curl + UI contracts) (pull_request) Successful in 5m46s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 9s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 6s
eda2fac35f
#780 and #784 were green separately and red together: the gate landed with a base
that predated `scripts/check-doc-narrative.py`, so nothing ever ran ruff over it.
On merged main the shipped invocation is RED, which would have surfaced as a
mystery lint failure on whichever PR opened next.

Two findings, both in #784's files:

- `RUF100` on `# noqa: BLE001` twice — `BLE` is not in this repo's `select`, so
  those directives suppress nothing. Enabling `BLE` instead was measured and
  rejected: it fires 6 more times in `decisions_validate.py`, whose broad catches
  are deliberate, and that is a ruleset decision for its own PR rather than a
  side effect of unbreaking main. The non-enabled code is dropped; the `S110` on
  the first site stays (S IS selected), and both explanatory comments stay.
- `scripts/tests/test_check_doc_narrative.py` was not ruff-formatted. Formatted;
  suite still 807 passed, 2 skipped.

The general shape, for the next time two PRs touch disjoint files: a gate whose
population is "everything tracked" is only as green as its base. #813's CI could
not have caught this and neither could #811's.

Refs: #780, #784
Author
Owner

Review-verdict: MERGEABLE @ eda2fac

Independent review deliberately skipped per process.independent-review-rubric: 2 files, no C#, no locks/auth/migrations/API write paths — the change deletes two rule codes RUF100 proved inert and runs the formatter. Verified by execution rather than reading: the shipped invocation over the merged tree goes from 2 errors + 1 unformatted file to 35 files clean, and the suite is 807 passed / 2 skipped. The rejected alternative (enabling BLE) was measured too: 6 further sites in decisions_validate.py.

Review-verdict: MERGEABLE @ eda2fac Independent review deliberately skipped per process.independent-review-rubric: 2 files, no C#, no locks/auth/migrations/API write paths — the change deletes two rule codes RUF100 proved inert and runs the formatter. Verified by execution rather than reading: the shipped invocation over the merged tree goes from 2 errors + 1 unformatted file to 35 files clean, and the suite is 807 passed / 2 skipped. The rejected alternative (enabling BLE) was measured too: 6 further sites in decisions_validate.py.
timothy merged commit eb5c74b4b2 into main 2026-08-22 11:34:05 +02:00
timothy deleted branch fix/780-followup-ruf100-main 2026-08-22 11:34:13 +02:00
Sign in to join this conversation.