Repository navigation
Conversation
…ash() (#497) Co-Authored-By: Max <noreply>
…#497) Two independent reviewers (Explore, oss:auditor) spawned against the first pass both caught the same real bug: scripts/windows_skip_triage_497.py's AST scanner only matched a bare `pytestmark = pytest.mark.skipif(...)` call, silently dropping the list-of-marks form (`pytestmark = [pytest.mark.skipif(...), pytest.mark.skipif(...)]`). tests/test_slug_vectors_294.py uses exactly that shape and was missing from docs/windows-skip-triage.md as a result -- undetected by the doc's own drift-detection test, since that test recomputes its baseline from the same buggy scanner. The scanner now walks both a bare call and a list/tuple of marks; the doc gains the missing row (verdict: convertible, same reason string as the neighboring test_slug_parity.py) and its count moves from 94 to 95, with a note on the blind spot itself. The auditor also flagged the script's __main__ block: !r on a reason string containing an em dash can raise UnicodeEncodeError on a default Windows console codepage, killing the process mid-report after the scan work already ran. Switched to !a (ascii()) so the print output is always pure ASCII, on any platform. Reasoned, not observed on an actual Windows console -- no such console available in this environment. Co-Authored-By: Max <noreply>
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.
Closes #497
What this is
Item 1 of #497 (make the skip ratio visible in CI) already shipped in #507/#521. This is item 2: "a recorded list with a per-module verdict" against
tests/_bash_runner.py'sresolve_bash()route -- not a mass conversion. No test file is converted here.docs/windows-skip-triage.mdlists every module that still carries a module-levelpytestmark = pytest.mark.skipif(sys.platform == "win32", ...)-- a bare call, or one arm of a list of marks -- its own skip reason, and a verdict:convertible,not-convertible, orunclear.The count: 95, not 107 (and not the issue's original 92)
Same overcount story as before (grep catches 2 docstring-only mentions and 11 already-
resolve_bash()files) but the AST-based figure itself moved during review:scripts/windows_skip_triage_497.py's first pass only matched a barepytestmark = pytest.mark.skipif(...)call and missed the list-of-marks form (pytestmark = [pytest.mark.skipif(...), pytest.mark.skipif(...)]), silently droppingtests/test_slug_vectors_294.pyfrom both the count and the doc. Two independently spawned reviewers (Explore, oss:auditor) caught this in the same review pass; the scanner now walks both forms, the doc gained the missing row (verdictconvertible, same reason string as the neighboringtest_slug_parity.py), and the count is 95.Notably the drift-detection test could not have caught this on its own: it recomputes its "live" baseline from the same scanner function the doc's generation used, so a module class the scanner never looked for is invisible to both sides of the comparison at once. Documented directly in the doc now, as a warning about the list's own accuracy bound.
Verdict breakdown
Second finding: Windows-console print crash
The auditor also flagged
scripts/windows_skip_triage_497.py's__main__block:!ron a reason string containing an em dash (routine in this tree's skip reasons) can raiseUnicodeEncodeErroron a default Windows console codepage (e.g. cp1252), crashing the process mid-report after the scan work already completed -- and nothing in CI exercises this__main__path. Switched to!a(ascii()) so the print output is always pure ASCII. Reasoned, not observed -- no Windows console available in this environment.Review
The developer agent's own session had no
Agent/Tasktool, so it could not spawn its own reviewers and did a self-review instead (documented in the first-pass report). The orchestrating conversation then spawnedExploreandoss:auditordirectly against the committed diff to cover that gap. Both findings above came from that pass and are fixed in this commit.Tests
python3 -m pytest tests/test_windows_skip_triage_497.py tests/test_slug_vectors_294.py -q --no-cov-- 76 passed. Ruff clean on both changed Python files. Full suite not run locally, per this repo's CLAUDE.md -- CI is the gate across 3 OSes and 4 interpreters.Also noticed, not fixed
scripts/report_windows_skip_floor.py's own module docstring (#507) still cites the old grep-based 107-by-grep figure, now doubly stale (94 was already wrong, 95 is the corrected number). Not fixed here -- it is prose backing aDEFAULT_FLOORpick, out of this lane's declared scope.