fix(baseline): collapse the two invalid_actions_lock acks into one - #974
Merged
Merged
Conversation
#971 made `rule_module` list-valued precisely so one acknowledgement can name every module that emits a defect. This spends it: hypatia emits `invalid_actions_lock` from BOTH `workflow_audit` (file `actions.lock`) and WH004/`workflow_hardening` (full path), and the estate carried two entries for one decision -- two expiry dates, so the half that expires first silently reopens a gate while the ledger still looks correct. 212 -> 211 entries, so the exemption ratchet is satisfied with no `Ratchet-exception` trailer. DELIBERATE WIDENING, stated because it is not a refactor. One entry carries one matcher, and the two emissions carry different `file` values, so the surviving entry must match by `file_pattern`. The `workflow_hardening` half therefore moves from the exact path `.github/workflows/actions.lock` to `**actions.lock` -- the breadth the `workflow_audit` half already had at the same severity and type. Measured: a `workflow_hardening` `invalid_actions_lock` at `vendor/actions.lock` was KEPT before this commit and is SUPPRESSED after. Accepted because both halves are the same defect with the same exit criteria; the note says to narrow the entry if a second `actions.lock` is ever vendored. Three assertions added (26 -> 29), and they read the SHIPPED `.hypatia-baseline.json` rather than a fixture, so the collapse itself is pinned. Two mutants, each killed by the right assertion: * split the entry back into two -> the "one entry naming two modules" assertion reds; * swap `file_pattern` for an exact `file` -> the "suppresses BOTH emission paths" assertion reds at 1,1, which is exactly the half-suppression that reddens main. An over-match control asserts the ack is not a blanket amnesty: a different `type`, and a different `rule_module`, are both still kept. Verified: 52/52 local suites green; the collapsed ledger validates against the schema and suppresses both real emissions when run through the real `scripts/apply-baseline.sh`. Refs: #966, #951 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR
Contributor
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The collapsed ack cited #951, which is CLOSED/COMPLETED with zero comments -- while the defect it acknowledges is demonstrably live: `.github/workflows/actions.lock:210` still declares the floating transitive `actions/setup-python@v2` under the asana pin, and setup-python is never a top-level lock key (0 occurrences), so hypatia's `transitive_dependencies_missing` still fires. #951 was not closed in error -- #963 superseded it and is OPEN ("main is red: actions.lock omits a transitive dependency of asana/push-signed-commits"). The ack simply never followed. This matters because the ack expires 2026-12-22. An acknowledgement pointing at a closed issue keeps suppressing perfectly well while the cure stops being anyone's job, and then reds main on its expiry date with no owner and no live thread to read. The suppression is the part that goes on working; that is what makes it hard to see. Measured while checking this one: 19 acks across 7 closed tracking issues are orphaned the same way (#254 x1, #378 x3, #399 x6, #492 x5, #494 x2, #496 x1, #951 x1). Deliberately NOT swept here -- the other 18 are filed separately so each repoint is reviewed against the issue that actually superseded it, rather than bulk-rewritten. Refs: #963, #951 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR
|
4 tasks
4 tasks
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.



Spends the capability #971 added. Closes the loop on #966.
What
.hypatia-baseline.json: 212 → 211 entries. The twoinvalid_actions_lockacknowledgements become one entry whose
rule_moduleis["workflow_audit", "workflow_hardening"].Hypatia emits this one defect from two rule modules —
workflow_audit/parse_actions_lock(fileactions.lock) and WH004 standalone(
workflow_hardening, full path). Acking it twice meant two expiry dates forone decision: whichever half expires first silently reopens the gate while
the ledger still looks correct in every visible respect. That is the shape
#966 was filed about.
The ratchet is satisfied with no
Ratchet-exceptiontrailer — the ledgershrank:
⚠ This is a widening, not a refactor — stated, not buried
One entry carries one matcher, and the two emissions carry different
filevalues, so the surviving entry must match by
file_pattern. Theworkflow_hardeninghalf therefore moves from the exact path.github/workflows/actions.lockto**actions.lock— the breadth theworkflow_audithalf already had at the same severity and type.Measured, not assumed:
workflow_hardening/invalid_actions_lock@vendor/actions.lockAccepted because both halves are the same defect with the same exit criteria.
The entry's
noterecords the widening and says to narrow this entry if asecond
actions.lockis ever vendored, rather than trusting it.(
**in a pattern is allowed here: the ratchet's no-wildcard rule 3 binds thebanned-language migration ledger, and explicitly carves out
.hypatia-baseline.json"where a note explains them". This entry carries botha
noteand atracking_issue, so it is also not anonymous debt under rule 2.)Tests — 26 → 29, reading the shipped ledger
The three new assertions run against the real
.hypatia-baseline.json, nota fixture, so the collapse itself is pinned rather than merely demonstrated.
Two mutants, each killed by the right assertion:
2,1≠1,2file_patternfor an exactfile1,1The second mutant is the valuable one:
1,1is exactly the half-suppressionthat reddens main — the #966 symptom reproduced on demand.
An over-match control asserts the ack is not a blanket amnesty for
actions.lock: a differenttypeand a differentrule_moduleare both stillkept (
0,2).Verification
52/52local suites green (scripts/tests/*.sh,tests/*.sh); no regressions.hypatia-baseline.schema.jsonandsuppresses both real emissions through the real
scripts/apply-baseline.sh(
suppressed=2 kept=0).governance-reusable.yml:282prefers the caller's ownscripts/apply-baseline.sh, so standards self-lints with the tree undertest — this PR's ledger is filtered by this PR's script, not by main's.
+5/−11and local:jq -a --indent 1was confirmed toround-trip the file byte-identically before editing, so the diff shows
only the two acks (the file stores em-dashes as
—; without-athewhole ledger reflows).
Second commit — the ack pointed at a closed tracking issue
48415f6brepointstracking_issuefrom #951 to #963. #951 was closedCOMPLETEDwith zero comments while its defect is demonstrably live:.github/workflows/actions.lock:210still declares the floating transitiveactions/setup-python@v2under theasana/push-signed-commitspin, andsetup-pythonis never a top-level lock key. The cause is supersession, noterror — #963 is OPEN and carries the cure; the ledger simply never
followed. So this is a repoint, not a reopen.
That find generalised: 20 of the 211 acks cite a closed issue, across 7
closed issues. This PR fixes the 2 that cited #951; the remaining 18 are
filed as #975 with the evidence, deliberately not swept — each needs
checking against the issue that actually superseded it.
Refs #966, #951, #963, #971, #975.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR