Skip to content

validate-kernel-pr: read the identity gate after fetch.sh's stderr redirect - #7525

Merged
gyohuangxin merged 2 commits into
ROCm:mainfrom
rpoornac:review-gate-heredoc
Dec 3, 2026
Merged

gyohuangxin merged 2 commits into
ROCm:mainfrom
rpoornac:review-gate-heredoc

Conversation

@rpoornac

@rpoornac rpoornac commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

#7303 moved the identity gate's heredoc opener in .claude/skills/review-pr/fetch.sh to <<'PY' 2>"$WORK/validation_rejected.txt". run_review_gate in validate-kernel-pr/tests/test_validator.py extracts that block with <<'PY'\n(.*?)\nPY\n, which wants a newline right after the delimiter, so it found no block and three tests failed on main:

  • test_perf_report_survives_the_review_identity_gate
  • test_review_gate_rejects_a_perf_result_that_contradicts_itself
  • test_review_gate_rejects_a_report_for_another_head

The pattern now allows text after <<'PY' on the opener line. The six arguments the test passes still match the order fetch.sh uses (pr_meta.json, base_head.txt, pr.diff, the schema, the report, the output path), so the gate under test is the one the bot runs. No CI job runs these tests today; review-bot-selftest.yml covers only review-pr/.

PR Self-Review

Reviewed revision

4e12c166

Behavior and intent

The validate-kernel-pr tests that feed a report through review-pr's identity gate can find that gate again. Since #7303 they extracted no block and failed before the gate ran, so the check that a stale or self-contradicting validation report is rejected was not exercised. Only the test changes; the gate, fetch.sh and the validator are untouched.

Validation and unverified scope

On main ed7374d0, CPU only (HIP_VISIBLE_DEVICES=-1), Python 3.10, pytest 9.0.3, with the repository venv's python3 first on PATH:

  • Before: python -m pytest -q .claude/skills/validate-kernel-pr/tests/test_validator.py gives 3 failed, 87 passed; each failure is expected exactly one identity-gate PY block (1 != 0).
  • After: 90 passed.
  • ruff check --no-cache --no-force-exclude --select F,E9 .claude/skills/validate-kernel-pr/ (Ruff 0.16.0) is clean.
  • review-pr's own guards are unaffected: check_prompts.py reports 0 drifts and selftest.sh reports 99 green, 0 red.

Unverified: with a system python3 that lacks the venv's packages first on PATH, 14 further tests fail because validate_pr.sh calls bare python3. That is the local environment, not this change, and is not addressed here.

PR-specific question

Why fix the test and not drop the redirect from fetch.sh? The redirect is deliberate: #7303 captures the gate's rejection in validation_rejected.txt so a rejected report still produces a review card that names the reason. Changing the test's pattern keeps that behavior and restores the coverage. No .github/ changes.

Changed op tests

None. No op_tests/ file changed.

Made with Cursor

…direct

Co-authored-by: Cursor <[email protected]>

ROCm#7303 moved the gate's heredoc opener to `<<'PY' 2>"$WORK/validation_rejected.txt"`. run_review_gate extracts the block with a pattern that wants a newline right after `<<'PY'`, so it found no block and the three identity-gate tests failed. The opener may now carry text after the delimiter.
@rpoornac
rpoornac requested a review from a team November 5, 2026 17:51
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
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 gfx1201 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 7525 --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.

@github-actions github-actions Bot changed the title [CI] validate-kernel-pr: read the identity gate after fetch.sh's stderr redirect validate-kernel-pr: read the identity gate after fetch.sh's stderr redirect Nov 5, 2026
@aiter-bot

aiter-bot commented Nov 5, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision e47848dbec58 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. What is the most important boundary or failure mode introduced by this change, and what evidence covers it?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA

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

@github-actions

Copy link
Copy Markdown
Contributor

No activity for 15 days, so this is now labelled stale. A push or a comment clears it; keep-open exempts it. Nothing is closed automatically.

@github-actions github-actions Bot added the stale The PR hasn't been updated in 2 weeks label Nov 21, 2026
@gyohuangxin
gyohuangxin merged commit a39c667 into ROCm:main Dec 3, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale The PR hasn't been updated in 2 weeks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants