Skip to content

review-pr: register the ten rule ids derive() can emit but ALL_RULES omits - #7708

Merged
zufayu merged 1 commit into
mainfrom
review-pr/register-emitted-rule-ids
Nov 10, 2026
Merged

zufayu merged 1 commit into
mainfrom
review-pr/register-emitted-rule-ids

Conversation

@zufayu

@zufayu zufayu commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

derive() can emit sixty rule ids. ALL_RULES listed fifty-eight. Missing: B8 and D12, which arrived with #7227, and HK4–HK11, which had been absent for longer.

Why it is quiet, and why it still matters

ALL_RULES is read in four places, and normal derivation is not one of them — B8 and D12 expand fine today. The four are the derivation-failed, diff-too-large and underivable fallbacks, plus the rules=N/M denominator.

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:

t "every id derive() emits is in ALL_RULES"

Removing B8 from ALL_RULES now fails with missing: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 B8 in 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 edits ALL_RULES itself.

Verification

bash selftest.sh | tail -1                 -> === 143 green / 0 red ===
python3 check_prompts.py | tail -1         -> OK: 0 drift(s)
python3 triage.py mapping | diff - MAPPING.md -> identical

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

8a39369cddf9

Behavior and intent

derive() can emit sixty rule ids; ALL_RULES listed fifty-eight. B8 and D12
arrived unregistered with #7227, and HK4–HK11 had been missing for longer.

The existing behaviour is not wrong in the common case — normal derivation never reads
ALL_RULES, and B8/D12 expand correctly today. It is wrong in the uncommon one:
the derivation-failed, diff-too-large and underivable paths hand the worker the
full catalogue precisely because the deriver could not narrow it, and that catalogue
was ten rules short. The rules=N/M denominator understated the corpus for the same
reason. 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:

bash .claude/skills/review-pr/selftest.sh | tail -1       -> === 143 green / 0 red ===
python3 .claude/skills/review-pr/check_prompts.py | tail -1 -> OK: 0 drift(s)
python3 .claude/skills/review-pr/triage.py mapping | diff - MAPPING.md -> identical

Baseline on origin/main before the change: 142 green / 0 red; the extra green is the
new guard. The ten ids were derived by comparing every hit(...) rule list in
triage.py against ALL_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 B8 from ALL_RULES fails it with missing: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_RULES is not consulted on that path — verified by
the 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 B8 in the file, which is prose in an
unrelated 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_RULES itself.

Changed op tests

None — no op_tests/ file is touched. The change is confined to
.claude/skills/review-pr/.

…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]>
@zufayu
zufayu requested a review from a team November 10, 2026 07:01
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter standard tests on MI35X
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7708 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@aiter-bot

aiter-bot commented Nov 10, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 8a39369cddf9 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

`derive()` can emit sixty rule ids; `ALL_RULES` listed fifty-eight. `B8` and `D12`
arrived unregistered with #7227, and `HK4`–`HK11` had been missing for longer.

The existing behaviour is not wrong in the common case — normal derivation never reads
`ALL_RULES`, and `B8`/`D12` expand correctly today. It is wrong in the uncommon one:
the `derivation-failed`, `diff-too-large` and `underivable` paths hand the worker the
full catalogue precisely because the deriver could not narrow it, and that catalogue
was ten rules short. The `rules=N/M` denominator understated the corpus for the same
reason. 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`:

```
bash .claude/skills/review-pr/selftest.sh | tail -1       -> === 143 green / 0 red ===
python3 .claude/skills/review-pr/check_prompts.py | tail -1 -> OK: 0 drift(s)
python3 .claude/skills/review-pr/triage.py mapping | diff - MAPPING.md -> identical
```

Baseline on `origin/main` before the change: 142 green / 0 red; the extra green is the
new guard. The ten ids were derived by comparing every `hit(...)` rule list in
`triage.py` against `ALL_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 `B8` from `ALL_RULES` fails it with `missing: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_RULES` is not consulted on that path — verified by
the 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 ` B8 ` in the file, which is prose in an
unrelated 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_RULES` itself.

Changed op tests

`None` — no `op_tests/` file is touched. The change is confined to
`.claude/skills/review-pr/`.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply
  • ADVISORY — Copilot did not review the current head SHA

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@zufayu
zufayu requested a review from a team November 10, 2026 08:02
@zufayu
zufayu merged commit 535a6e2 into main Nov 10, 2026
@zufayu
zufayu deleted the review-pr/register-emitted-rule-ids branch November 10, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants