review-pr skill v2: dispatch gap rule, arch-constant FP fix, P5 timing error#1549
Conversation
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
|
Merge button dropdown → "Merge without waiting for requirements to be met". Thanks! @valarLip |
…g error Key changes based on 191-PR test sweep (88 aiter + 93 ATOM): - B6 (new): "New dispatch value not handled by all paths, no warning" Highest-frequency finding (~18% of PRs). Covers: new dtype/arch/flag/ getattr attribute added to a multi-way dispatch where some branches silently fall through to wrong behavior with no assert/warning. FP self-check included (upstream assert/isinstance guard → skip). Real examples: ATOM#1548 (getattr silent zero), ATOM#841 (unmerged aiter kwarg). - C3 (new): "New GPU arch string or arch-specific constant hardcoded" Extended beyond arch strings to cover magic constants tied to specific model configs (e.g., hardcoded 576 for MLA kv_lora_rank+qk_rope_head_dim). FP self-check front-loaded: search unchanged lines first; if constant already exists → skip (pre-existing style). Real example: ATOM#860 _bind_kv_cache_to_modules() hardcoded 576. - P5 (new): "Benchmark timing excludes one-time setup cost" Covers: shuffle_weight, first-call JIT compile excluded from timing window → claimed speedup is actually a regression when setup cost is included. - Step 3 classification: wired B6/P5 into trigger lines so new constexpr/routing-flag PRs and perf PRs auto-prompt the right checks. New aiter API usage PRs trigger B6 (new kwarg unhandled by all branches?). - Step 8 output format: findings now require three parts (Problem + Impact + Action verb). "Author must" / "Reviewer should ask" required; no verb = do not include in output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…vs.py - B5 restructured into a 5-row parametric table (param-discard, param-removed, attr-missing, dispatch-silent, rename) — aligned with aiter's B6 family; ATOM-specific attr-missing sub-type added (getattr silent-zero fallback, ATOM#1548 real example) - G1b: blocking queue.get() without timeout in production serving code; ATOM#789 call_soon_threadsafe noted as correct pattern (not G1b) - D1b: Python-side UnboundLocalError from conditional variable assignment (ATOM#860 real example) - C3: add capability guard exemption — arch string in dedicated _detect_*() helper is not centralized dispatch hardcoding (ATOM#749) - HK5: updated to "register in atom/envs.py AND document in README" (ATOM#749 finding: ATOM_NATIVE_TRITON_ATTN not in envs.py) - Step 3 classification: new trigger entries for G1b and D1b Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6645549 to
19548b6
Compare
…d/inferred discipline Ports the general (non-aiter-specific) v3 hardening from the aiter skill: - grep .cu+.cuh+.h, not just diff files, before claiming missing sync/branch - classify CI failures as infra/unrelated vs real (e.g. RTD docs failing on a .claude-only change is infra, ATOM#1549) - tag findings [verified]/[inferred]; never ship an unconfirmed root cause (aiter-only rules E4 downstream-CI / E5 owner-signoff intentionally NOT ported — ATOM is the downstream.)
|
@junhaha666 heads-up — I synced the general v3 hardening from the aiter review-pr skill into this one, so the new commit dismissed your earlier approval. Could you re-approve? What was ported (general, non-aiter-specific):
The aiter-only rules (E4 downstream-CI / E5 owner-signoff) were intentionally NOT ported since ATOM is the downstream. The |
|
@valarLip this skill-sync PR is ready for an admin-merge when you have a moment.
Could you squash + admin-merge? Thanks! |
|
@valarLip Same as aiter#4171: this PR is stuck on the required |
…fore firing 🔴 Generalizes the per-rule FP self-check into a mandatory gate over all 🔴 findings, closing the gap on rules like D9 that omit one. A 🔴 with no demonstrable triggering shape/scale/input must be downgraded or dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
aiter#4166 preshuffles the static weight once outside the timing loop and honestly reports geomean 0.69x; it never claimed 1.14x. The old example taught the amortization error. Reframe P5 to fire only on costs that recur per call / per cold start, and keep #4166 as a counter-example. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The description-smell table only pre-filters; AI fails structurally. Add six action-forcing checks that each yield a verified/inferred finding: hallucinated -symbol sweep, twin divergence, claim/comment↔code + number provenance, safety theater, test-calibrated-to-pass, magic constant without derivation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…guard ① Route D6/D7 (fake fns), D8 (contiguous), D9 (int32), D4 (invariant reversal) into Step 3 — previously reachable only by scanning all of Section D. ② Add pre-existing-search FP self-check to C1 (dtype hardcode), matching C3. ③ Staleness guard on P2 production shapes. (ATOM has no tl.load-mask rule and no E4, so those aiter-side changes N/A here.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…PI scope B5 (API propagation) had no Step-3 entry, and the "aiter API change" row pointed only to B6 (new dispatch value), not B5. Route B5 via that row + a new "API signature change" row. Fix param-removed/rename scope: a base-class or bridge-read signature change breaks all subclasses/bridges, not just same-file — widened and linked to E2 (plugin bridge sync). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e test on aiter#4227) Mirror of the aiter B6 fix: a rename/removal behind a same-named wrapper / alias / re-export is backward-compatible and must not fire. Confirm no compatibility shim before firing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Second iteration of the
review-prskill, based on a 191-PR test sweep (88 aiter + 93 ATOM open PRs). Key findings from that sweep drove all rule changes here.New rules
B6 — New dispatch value not handled by all paths (highest-frequency finding, ~18% of PRs)
When a PR adds a new dtype/arch/flag/
getattrattribute key to a multi-way dispatch, every reachable branch must handle it or assert/warn on unsupported combos. Includes FP self-check (upstream assert/isinstance guard → skip).getattr(self.args,'n_shared_experts',0)silent zero), ATOM#841 (ATOM calls unmerged aiter kwarg → TypeError at dispatch)C3 — New GPU arch string or arch-specific constant hardcoded in dispatch
Extended beyond arch strings to cover magic constants tied to specific model configs. FP self-check front-loaded: search unchanged lines first; if constant already exists → skip (pre-existing style).
_bind_kv_cache_to_modules()hardcodes576for MLAkv_lora_rank + qk_rope_head_dim— breaks any MLA variant where this sum ≠ 576P5 — Benchmark timing excludes one-time setup cost
Distinct from P1 (missing numbers). Covers cases where setup steps (shuffle_weight, JIT compile) are excluded from the timing window — making a regression look like a speedup.
Improved rules
B5 real examples updated: added ATOM#860
needs_independent_noisedropped inprefill_forward— sampler called without it, first token uses wrong sampling mode for sequences requiring independent Gaussian noise.C3 FP self-check front-loaded: moved before the trigger condition so agents verify pre-existing style before firing.
Step 3 classification: wired B6/P5 into trigger lines — new constexpr/routing-flag PRs and perf PRs now auto-prompt the relevant checks. New aiter API usage PRs trigger B6 (new kwarg unhandled by all ATOM dispatch branches?).
Step 8 output format: findings now require three parts — Problem + Impact + Action verb ("Author must" / "Reviewer should ask"). Findings without an action verb are not included in output.
Test plan
🤖 Generated with Claude Code