Repository navigation
Conversation
#585 and #588 each hit the same gap in one session: a new module-level `pytestmark = pytest.mark.skipif(sys.platform == "win32", ...)` needs a `docs/windows-skip-triage.md` row in the same commit, and both times this was caught only well into a CI run rather than at authoring time. Add a `.claude/jit-context` tools-dimension entry (`tools/00-manual/win32-skip-triage-entry.md`) that fires on a `supertool` Bash call whose command text contains the `pytestmark = pytest.mark.skipif` pattern -- this repo's own write path always carries a new file's content inside the Bash command string (`paste:@-`/`edit:@-` heredocs), so a content-shaped regex can see it even though jit-context deliberately never inspects a native Edit/Write tool_input.content. Proven to fire on a matching payload and stay silent on a non-matching one (both checked directly against pre-tool-hook.sh). State the same convention in `CONTRIBUTING.md` and in `docs/windows-skip-triage.md`'s own header, as a backstop for a contributor whose write does not go through `supertool` -- the one path the jit-context rule cannot see into. Audited tests/test_path_resolution.py for other instances of the issue's second half (a docstring/comment promising an exclusion the code does not implement, with no positive-control test proving it fires): the `command -v jq` case is already fixed (#574/#588 follow-up); no other instance found. Every other per-line exclusion in that file is a plain, correctly-implemented containment check or a whole-file omission, not a substring pattern that can quietly amnesty a real violation. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
…tting (#589) Both spawned reviewers (Explore and oss:auditor) independently caught the same high-severity bug in the previous commit: `match: ~pytest\.mark\.skipif\(sys\.platform *== *.win32.` requires `sys.platform` immediately after the literal `(`, with no separator. That only matches a single-line `pytestmark = pytest.mark.skipif(sys.platform == "win32", ...)`. Only 5 of 118 blanket-skip test modules in this tree use that form; the other ~113, including `tests/test_plugin_promo_574.py` -- the exact #588 incident this rule cites as its motivation -- write the condition on its own line. The rule would not have fired on the incident it was written to catch. Explore also found a second issue: the old regex had no `pytestmark` anchor, so it would also fire on a per-test `@pytest.mark.skipif(...)` decorator -- exactly the shape this repo's own declined trap `487.ostype-immutable-on-windows-gitbash` (`.claude/jit-context/tools/00-manual/00-README.md`) already reasoned a rule should not restate, since the skip is already visible at the decorator site. New pattern: `~pytestmark[^)]*skipif\([^)]*win32`. Requires `pytestmark` somewhere before an unclosed `skipif(...win32...)` call, tolerating any whitespace/newlines in between (including the list-form `pytestmark = [pytest.mark.skipif(...), ...]`) while stopping at the first literal `)`, so it does not cross into an unrelated statement. Re-verified against `pre-tool-hook.sh` directly: fires on the real multi-line content of `tests/test_plugin_promo_574.py`, fires on a synthetic single-line form, stays silent on a per-test decorator with no `pytestmark`, and stays silent on ordinary test content. The auditor's other observation -- `tests/test_windows_skip_triage_497.py` already catches the same doc/tree drift on every CI leg via an AST scan, so this rule's only independent value is firing before push -- is now stated in the entry's own body rather than left implicit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
fdaviddpt
added a commit
that referenced
this pull request
Sep 6, 2026
* Fix stale prose totals in docs/windows-skip-triage.md (#595) The doc's table (guarded against the live tree by tests/test_windows_skip_triage_497.py) grew to 102 modules / 82 unclear across #589/#591, but four prose sentences next to it still said 98/78 -- nothing recomputed them. Update the prose to 102/82 and add tests/test_windows_skip_triage_prose_totals_595.py, which ties each of those sentences to the table's own row count rather than to another hardcoded number. Co-Authored-By: Max <noreply> * Widen #595's prose-total guard per self-review Reviewer flagged that the doc separately states "8 modules" (convertible) and "12 modules" (not-convertible) right next to the same table, left uncovered by the first version of the guard -- the identical staleness risk, half-fixed. Add both patterns. Auditor flagged that the guard's row-parsing regex was an independent second copy of tests/test_windows_skip_triage_497.py's own row regex, with nothing tying the two together. Factor both into a shared scripts.windows_skip_triage_497.parse_doc_table_rows helper. Co-Authored-By: Max <noreply> * Close remaining gaps from #595's second audit round Add the missing positive-control tests for the not-convertible and unclear prose patterns -- the prior commit's message claimed both new counts (convertible, not-convertible) got a dedicated fire-test, but only convertible did; unclear had none from the first commit either. All four prose patterns now have one. Reformat the noqa-suppressed import in tests/test_windows_skip_triage_497.py into ruff's own multi-line form instead of silencing the rule -- the rule turned out not to be enforced by any CI workflow here, but suppressing an inert check is still worse than not needing to. 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 #589.
#585 and #588 each hit the same gap in one session: a new module-level
pytestmark = pytest.mark.skipif(sys.platform == "win32", ...)needs adocs/windows-skip-triage.mdrow in the same commit, and both times this was caught only well into a CI run rather than at authoring time.What this adds
.claude/jit-contexttools-dimension entry (tools/00-manual/win32-skip-triage-entry.md) that fires on asupertoolBash call whose command text contains the module-level skip pattern -- this repo's own write path always carries a new file's content inside the Bash command string (paste:@-/edit:@-heredocs), so a content-shaped rule can see it even though jit-context deliberately never inspects a native Edit/Writetool_input.content.CONTRIBUTING.mdand indocs/windows-skip-triage.md's own header, as a backstop for a contributor whose write does not go throughsupertool-- the one path the jit-context rule cannot see into.changelog.d/589.added.md).Half 2: the audit
Audited
tests/test_path_resolution.pyfor other instances of "a docstring/comment promises an exclusion the code does not implement, with no positive-control test proving it fires" -- the issue's own named example (command -v jq) is already fixed in a prior merged PR and is untouched by this diff. Found no other instance; made no code change as a result.Self-review caught a real bug
The first committed version of the jit-context rule required the win32 condition to sit immediately after the opening parenthesis of skipif(, with no separator, so it only matched a single-line skip. Both spawned reviewers (Explore and oss:auditor) independently caught this: only 5 of 118 blanket-skip test modules in this tree use that single-line form -- the other ~113, including
tests/test_plugin_promo_574.py(the exact #588 incident this rule cites as its motivation), write the condition on its own line. The rule would not have fired on the incident it was written to catch.Explore also found the rule had no
pytestmarkanchor, so it would have re-fired on a per-test@pytest.mark.skipif(...)decorator -- exactly the shape this repo's own declined trap487.ostype-immutable-on-windows-gitbashalready reasoned a rule should not restate.Fixed in a follow-up commit: the pattern now requires
pytestmarkto appear before an unclosedskipif(...win32...)call, tolerant of any whitespace/newlines in between (including the list-form), bounded at the first literal closing parenthesis. Re-verified against the real installed hook on the actual multi-line content oftests/test_plugin_promo_574.py: fires; a per-test decorator with nopytestmark: silent.Adjacent, below the bar to chase further
This issue's own narrative is in some tension with a fact both reviewers surfaced:
tests/test_windows_skip_triage_497.pyis platform-agnostic (AST-based) and runs identically on every leg of the 3-OS matrix, so it should already catch a missing triage-doc row on every platform, not onlywindows-latest. Did not chase the actual #585/#588 CI job logs far enough to resolve why the reported failure pattern read as Windows-specific -- both PRs are merged and closed, and it does not change that an authoring-time check is strictly earlier than any CI leg regardless of which ones would have caught it.🤖 Generated with Claude Code
[AI-generated]