Repository navigation
validate-kernel-pr: read the identity gate after fetch.sh's stderr redirect - #7525
Conversation
…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.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
WAITING ON AUTHORPR Self-ReviewRevision 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
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
|
No activity for 15 days, so this is now labelled |
#7303 moved the identity gate's heredoc opener in
.claude/skills/review-pr/fetch.shto<<'PY' 2>"$WORK/validation_rejected.txt".run_review_gateinvalidate-kernel-pr/tests/test_validator.pyextracts 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_gatetest_review_gate_rejects_a_perf_result_that_contradicts_itselftest_review_gate_rejects_a_report_for_another_headThe pattern now allows text after
<<'PY'on the opener line. The six arguments the test passes still match the orderfetch.shuses (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.ymlcovers onlyreview-pr/.PR Self-Review
Reviewed revision
4e12c166Behavior 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.shand 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'spython3first onPATH:python -m pytest -q .claude/skills/validate-kernel-pr/tests/test_validator.pygives 3 failed, 87 passed; each failure isexpected exactly one identity-gate PY block(1 != 0).ruff check --no-cache --no-force-exclude --select F,E9 .claude/skills/validate-kernel-pr/(Ruff 0.16.0) is clean.check_prompts.pyreports 0 drifts andselftest.shreports 99 green, 0 red.Unverified: with a system
python3that lacks the venv's packages first onPATH, 14 further tests fail becausevalidate_pr.shcalls barepython3. 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 invalidation_rejected.txtso 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