Repository navigation
ci: cover the ignored-test audit and make its scanner lexer-aware - #1917
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ci/audit_ignored_tests.pypublishes the only report anyone reads about#[ignore]usage — the weeklyAudit Ignored Testsjob writes it straight intothe body of tracking issue #880 (policy: #839). It had no test, and its
detection was a line-start regex, so it could both invent an ignored test
and hide a real one.
This lands the test (
ci/test_audit_ignored_tests.py, 28 cases) and makes thescanner lexer-aware, then lowers the gate-coverage ratchet from #1915
(
MAX_UNTESTED8 -> 7,audit_ignored_testsremoved fromuntested).The three live defects
#[ignore]was recorded, so Rust source held inr#"..."#(or in a plainstring) counted as a real ignored test in the issue body.
'"'char literal blanked / hid code. The same class fixed in fix(ci): enforce and test the subprocess gate's documented contract #1913:let q = '"';opened a string that swallowed the rest of the line — and inthe multi-line scanner a mishandled
\"escape lets one string swallow everyfollowing line, hiding real attributes.
The skip set was matched against absolute path components, so a checkout
under
.../.claude/worktrees/...(where agent worktrees actually live) orunder any directory named
targetproduced0 findingsinstead of an error.Detection now runs on a blanked copy of the source (
code_only): nested blockcomments, line comments, normal strings with escapes, raw strings with any
number of
#, and char literals are replaced by spaces with columns andnewlines preserved. The reason is read back from the raw line, so
#[ignore = "why"],#[ignore = r#"why"#]and bare#[ignore]all behave asbefore.
Behaviour on the real workspace is unchanged: the inventory is byte-identical
to the pre-change output (112 findings).
Proof
ci.test_audit_ignored_tests: 28 tests OK, including a live-workspace casethat re-reads every reported
file:lineand asserts it really carries#[ignore].restoring it: dropping the blanking pass -> 4 failures (raw string fixture,
block comment,
code_onlyshape); disabling char-literal handling -> 2failures; absolute-path skip dirs ->
test_scan_root_under_a_skipped_dir_name_is_still_scannedfails; and the
\"-escape bug ->test_escaped_quote_does_not_swallow_the_next_linefails.
Ran 171 tests ... OK(was 143 with ci: ratchet that every workflow-invoked gate script declares a test #1915).python -m ci.gate_script_coverage --budget 7-> "Every workflow-invoked gate script is accounted for".ci/check_python_complexity.py-> "All checks passed!" (the first draft ofcode_onlywas C901-complex 14/10; it is split into per-token helpers).ruff checkon both files: clean.ci.test_local_suitesconfirms the module isregistered in both entry points (
ci/local_suites.pyand the driftworkflow) in the same order.
Deliberately not done
#[test] #[ignore]on one line and#[ignore = concat!(...)]are still not recorded (a test pins that the parsernever invents a "missing reason" violation it cannot see).
untested; each needs its own test.