fix(gate-45): a commented-out universal reset silenced the gate for the WHOLE repo (#421) - #435
Merged
Merged
Conversation
…he WHOLE repo (#421) The per-file checker masks comments before it looks for motion or for a guard. The global pre-pass that computes HYDRA_RM_GLOBAL_GUARD did not — it grepped the UNIVERSAL regex over raw file text. Two halves of one gate disagreeing about what a comment is, with the careless half running first. The flag makes the per-file checker exit 0 on EVERY file in the repo, so ONE comment in ONE stylesheet anywhere in the tree silenced gate-45 for the whole app — and the comment that does it is the one an author writes while acknowledging the a11y debt. Measured on c26f9a3, one fixture, one variable (css/motion.css with two unguarded motion declarations + css/reset.css): reset only inside a /* TODO(a11y) … */ comment PASS <- the defect the same tree, comment deleted FAIL — 1 a REAL universal reset in reset.css PASS <- positive control Five acceptance arms in test_gate_45_stylesheet_scope.sh. Two of them (9a, 9d1) fail on origin/main and pass here; 9b/9c/9d2 pass in both arms and are labelled CONTROLs in the file — 9c is the anti-widening one, the arm that would catch a mask that ate CSS instead of comments and turned this gate from silenceable into always-red.
This was referenced Aug 13, 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.
Closes #421.
The defect
The per-file checker masks comments before it looks for motion or for a guard (
_mask_comments, #294). The global pre-pass that computesHYDRA_RM_GLOBAL_GUARDdid not — it grepped theUNIVERSALregex over raw file text. Two halves of one gate disagreeing about what a comment is, and the careless half runs first.That flag makes the per-file checker
sys.exit(0)on every file in the repository. So this is not one missed finding: one comment, in one stylesheet, anywhere in the tree, silenced gate-45 for the whole app — and the comment that does it is the one an author writes while acknowledging the a11y debt.Reproduced on c26f9a3 — one fixture, one variable
css/motion.csswith two real unguarded motion declarations, plus acss/reset.csswhose only universal reset is inside a comment:/* TODO(a11y): … @media (prefers-reduced-motion: reduce) { *, … } … */comment presentPASS← the defectFAIL — 1 stylesheet with motioncss/reset.cssPASS← positive control: the pre-pass does set the flag on real CSSThe third arm is what makes the first mean anything. It was run before the fix, per the issue's request.
The fix
Route the pre-pass through the same masking
_mask_commentsalready applies, character for character, including the(?<!:)that keeps the//of aurl(https://…)out of the SCSS arm.The two copies are separate
python3invocations and cannot share a function; arm 9d pins them together so they cannot diverge again.Acceptance — 5 new arms in
test_gate_45_stylesheet_scope.shRun against this branch: all 13 arms green.
Run against
origin/main's runner (HYDRA_GATES_RUNNER_UNDER_TEST=, i.e. a real revert, notgit checkout --): 2 failures, and they are the two evidence arms./* */-commented reset does not globally guard//-commented reset in SCSS does not guard//of aurl(https://…)does not eat the reset beside it9c is the arm that would catch a mask that ate CSS instead of comments and turned this gate from silenceable into always red.
Fleet numbers — 6 repos, whole-tree scope
gate-45is not a delta gate, so a whole-tree run exercises it. Six freshdevelopmentclones: procest, opencatalogi, openregister, softwarecatalog, docudesk, larpingapp.Unplanted:
PASS, 0 findings, in both arms, all six. That agreement is explained, not assumed — measured at the pre-pass layer, no repo in the fleet has a universal reset at all today, by comment or by real CSS (RAW=0andMASKED=0in all six), so the flag was0in both arms and there was nothing for this change to alter.Positive control on the real trees — plant the #421 shape (
css/_g421_probe.csswith unguarded motion +css/_g421_reset.csswhose reset is only inside a comment) into each repo and re-run both arms:PASSFAIL — 1PASSFAIL — 1PASSFAIL — 1PASSFAIL — 1PASSFAIL — 1PASSFAIL — 1Exactly one finding each — the planted probe, named by path — in trees that contain 9–29 files declaring
transition:/animation:. Nothing widened.Layer
Verdict layer, via the shipped runner, on real fleet trees. Not a helper-only claim.