Repository navigation
Backlog
Description
pr_check.py accepts any xcl-smoke block whose commit: is an ancestor of main as the baseline (is_main_ancestor, lines 190-194; the main list at line 138). It does not require that commit to be current, that the run was clean, or that only one block matches. That leaves the baseline under the author's control in three ways:
- An old main commit.
compare/{sha}...mainreturnsaheadfor any ancestor, so a block from a week-old main passes. If main's memory or frame rate has changed since then, the PR is compared with the old numbers, not the ones it will merge into. - A dirty main run.
base(line 134) does not filter"uncommitted"from the commit line, althoughcleandoes for the PR's block (line 133).smoke.ps1writescommit: <sha> (uncommitted changes)whencrates/,Cargo.tomlorCargo.lockare modified (lines 34 and 90), andis_main_ancestoronly reads the first token. A run with local changes therefore counts as main. - Several main blocks.
m = next((b for b in main if ...), None)(line 151) takes the first block with the same title and time. A PR can paste a favorable main block first and the current one second; the check only looks at the first.
The 80% frames and 125% peak-commit checks are the only regression gate for runtime PRs. With the baseline under the author's control, a PR can pass them without being compared to current main.
Repro (by inspection)
- Take an old main commit
Aand the current tipB. A blockcommit: Apassesis_main_ancestor(compare/A...mainisahead). - A block
commit: B (uncommitted changes)passes:b["commit"].split()[0]isB, andbasenever checks for"uncommitted". - With two main blocks for the same title/time, the first one is used; put the better one first.
I did not run the checker: this audit is read-only through the GitHub API at 568e7db.
Suggested fix
- Require the main block's commit to be the current
maintip at check time, or at least the PR's base commit. Thepull_request_targetevent has the base SHA; pass it to the script and compare. Fetchingrepos/{repo}/commits/mainis one API call. - Reject a main block whose commit line contains
uncommitted, same as the PR's block. - If more than one main block matches the title and time, reject the ambiguity or use the newest, not the first.
- Add tests to
scripts/test_pr_check.py: an old ancestor, a dirty main block, and two matching main blocks.
Related
- PR checks: a PR that fixes a crash is refused when main's run crashed before its end #1506 / PR checks: accept main's smoke run that crashed before its end (#1506) #1750: main's block may have crashed before its end; that is the intended leniency, but it is a different case.
- PR checks: a smoke block can omit the crash, device-removal, exit and peak-commit lines and still pass #2213 / PR checks: the PR's smoke block must show how its run ended (#2213) #2219: the PR block must now include the crash/exit/peak lines; this issue is about the baseline it is compared with.
- PR checks: the 125% peak-commit limit is inside the run-to-run spread; one pair can pass or fail on the same build #2225: the 125% comparison is already noisy with a current baseline; an old one makes it worse.
- PR checks: require hex commit hashes in xcl-smoke blocks #1141: validates the commit token as hex; it does not check which commit it is.
Scope
Read through the GitHub API at 568e7db; nothing was cloned, built or run.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Creaa commentedon Nov 25, 2026
Taking this one: part 2 as a fix with tests (a
mainblock whosecommit:line says(uncommitted changes)is not a baseline, the same rule the PR's block already has), and part 3 (when severalmainblocks match, the check uses the newest main commit among them, not the first pasted). For part 1 the PR will report how far behind currentmainthe baseline is rather than pick a cut-off; the cut-off is the maintainer's call.scripts/only.AI use: Claude Code (Claude Opus 5.5) drafted this.
Scripts: pr_check takes the newest clean main smoke block as the base…
itsonewi commentedon Nov 25, 2026
Agreed on 2 and 3, and reporting the distance instead of choosing a cut-off is the right call.
GET /repos/{repo}/commits/{sha}->committer.date), not from the order in the description. If two blocks name commits with the same date (a squashed batch), reject as ambiguous instead of picking one.crates/xcl/src,Cargo.*orscripts/. A baseline 40 commits behind on README-only changes is a valid comparison, and "40 commits behind" alone would send authors to re-run for nothing.compare/{base}...mainreturns the file list.Scripts: pr_check takes the newest clean main smoke block as the base…