Skip to content

review-pr skill v2: dispatch gap rule, arch-constant FP fix, P5 timing error#1549

Open
zufayu wants to merge 2 commits into
mainfrom
review-pr-skill-v2
Open

review-pr skill v2: dispatch gap rule, arch-constant FP fix, P5 timing error#1549
zufayu wants to merge 2 commits into
mainfrom
review-pr-skill-v2

Conversation

@zufayu

@zufayu zufayu commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Second iteration of the review-pr skill, 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/getattr attribute 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).

  • Real examples: ATOM#1548 (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).

  • Real example: ATOM#860 _bind_kv_cache_to_modules() hardcodes 576 for MLA kv_lora_rank + qk_rope_head_dim — breaks any MLA variant where this sum ≠ 576

P5 — 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_noise dropped in prefill_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

  • 93 ATOM PRs reviewed with prior skill version; all rule additions motivated by real findings
  • B6 validated against ATOM#1548 (silent zero fallback) and ATOM#841 (cross-repo sync TypeError)
  • C3 validated against ATOM#860 (hardcoded 576 MLA dimension — confirmed by diff analysis)
  • P5 validated against real measurement error in aiter#4166 (1.14x claim → 0.83x actual)
  • Step 8 three-part format tested in batch 7 (13 PRs, all findings include action verbs in output)

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Run after the PR is approved and Pre Checkin passes
  • ✅ Run immediately when an approval review is submitted
  • ✅ Can be requested before approval with labels
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, and SGLang
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests

Heavy jobs are skipped when the PR is not approved and no matching ci:* label is present.
Add labels via the sidebar or gh pr edit 1549 --add-label <label>

@zufayu zufayu requested review from junhaha666 and valarLip July 10, 2026 02:55
@zufayu zufayu added the ci:atom label Jul 13, 2026
@zufayu

zufayu commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Merge button dropdown → "Merge without waiting for requirements to be met". Thanks! @valarLip

root and others added 2 commits July 13, 2026 16:36
…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>
@zufayu zufayu force-pushed the review-pr-skill-v2 branch from 6645549 to 19548b6 Compare July 13, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants