Repository navigation
review-pr: register the ten rule ids derive() can emit but ALL_RULES omits - #7708
Conversation
…omits `derive()` can emit sixty rule ids; `ALL_RULES` listed fifty-eight of them. Missing: `B8`, `D12` (arrived with #7227) and `HK4`-`HK11`, which had been absent for longer. It is a quiet gap because ALL_RULES is read in only four places, and normal derivation does not touch it -- `B8` and `D12` expand correctly today. But those four places are the derivation-failed, diff-too-large and underivable fallbacks, plus the `rules=N/M` denominator. The fallbacks hand the worker the whole catalogue precisely when the deriver could not narrow it, which is the moment a short catalogue costs most: a diff too large to derive was being reviewed against a list missing ten rules, and nothing said so. The ids are added beside their families, and MAPPING.md regenerated. The second half matters more than the list. ROCm/ATOM's port of this skill carries a selftest comparing the two sets, added during that port; it is why the drift was visible there and not here. Ported back: t "every id derive() emits is in ALL_RULES" Removing `B8` from ALL_RULES now fails it with `missing:B8` rather than passing. Adding a rule and forgetting to register it stops being silent. Worth recording how close this came to looking verified: the first attempt at that regression check edited the first ` B8 ` in the file, which is prose in an unrelated help string, and the suite stayed green -- a test that proved nothing while appearing to prove the guard worked. The check above edits ALL_RULES itself. selftest 143 green / 0 red, 0 drift, MAPPING.md matches. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
What this changes
derive()can emit sixty rule ids.ALL_RULESlisted fifty-eight. Missing:B8andD12, which arrived with #7227, andHK4–HK11, which had been absent for longer.Why it is quiet, and why it still matters
ALL_RULESis read in four places, and normal derivation is not one of them —B8andD12expand fine today. The four are thederivation-failed,diff-too-largeandunderivablefallbacks, plus therules=N/Mdenominator.Those fallbacks hand the worker the whole catalogue precisely when the deriver could not narrow it — which is when a short catalogue costs most. A diff too large to derive was being reviewed against a list missing ten rules, and nothing said so.
The guard is the point
ROCm/ATOM's port of this skill carries a selftest comparing the two sets, added during that port. That is why the drift was visible there and not here. Ported back:
Removing
B8fromALL_RULESnow fails withmissing:B8. Adding a rule and forgetting to register it stops being silent.One note on how this was verified
The first attempt at that regression check replaced the first
B8in the file — which is prose inside an unrelated help string — and the suite stayed green. A check that proves nothing while appearing to prove the guard works is the same defect the guard exists to catch, one level up. The check in the commit message editsALL_RULESitself.Verification
Found while reviewing #7226 and #7227 (both now merged, and both fine — the merged result is green). Raised on #7227 at the time; sending it as its own change so it is not blocked behind anything.
🤖 Generated with Claude Code
PR Self-Review
Reviewed revision
8a39369cddf9Behavior and intent
derive()can emit sixty rule ids;ALL_RULESlisted fifty-eight.B8andD12arrived unregistered with #7227, and
HK4–HK11had been missing for longer.The existing behaviour is not wrong in the common case — normal derivation never reads
ALL_RULES, andB8/D12expand correctly today. It is wrong in the uncommon one:the
derivation-failed,diff-too-largeandunderivablepaths hand the worker thefull catalogue precisely because the deriver could not narrow it, and that catalogue
was ten rules short. The
rules=N/Mdenominator understated the corpus for the samereason. A fallback that silently covers less than it claims is worse than no fallback,
because the output looks identical either way.
Validation and unverified scope
Validated, on this branch at
8a39369cddf9:Baseline on
origin/mainbefore the change: 142 green / 0 red; the extra green is thenew guard. The ten ids were derived by comparing every
hit(...)rule list intriage.pyagainstALL_RULES, not by hand.Unverified: nothing here is exercised against a live review. This changes which rules a
failed derivation hands the worker, and no run in the recorded history has taken that
path, so the benefit is argued from the code rather than measured. The guard itself is
measured — removing
B8fromALL_RULESfails it withmissing:B8.PR-specific question
The boundary: this makes a fallback larger, and a larger fallback is slower, not
riskier. The ten added ids reach the worker only when derivation has already failed,
where the alternative is a silently short list. No code path that currently derives a
narrow set is affected, because
ALL_RULESis not consulted on that path — verified bythe four call sites being the three fallbacks and the denominator.
The failure mode worth naming is the one in the commit message: the first attempt to
prove the guard worked edited the first
B8in the file, which is prose in anunrelated help string, and the suite stayed green. A regression check that proves
nothing while appearing to prove something is the same defect the guard exists to catch,
one level up. The check that ships edits
ALL_RULESitself.Changed op tests
None— noop_tests/file is touched. The change is confined to.claude/skills/review-pr/.