PR checks: the main smoke baseline can be an old or dirty commit, not current main #2226
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2226
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@itsonewi on GitHub · 2026-11-25 10:38 UTC · original
pr_check.pyaccepts anyxcl-smokeblock whosecommit:is an ancestor of main as the baseline (is_main_ancestor, lines 190-194; themainlist 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: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.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.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)
Aand the current tipB. A blockcommit: Apassesis_main_ancestor(compare/A...mainisahead).commit: B (uncommitted changes)passes:b["commit"].split()[0]isB, andbasenever checks for"uncommitted".I did not run the checker: this audit is read-only through the GitHub API at
568e7db.Suggested fix
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.uncommitted, same as the PR's block.scripts/test_pr_check.py: an old ancestor, a dirty main block, and two matching main blocks.Related
Scope
Read through the GitHub API at
568e7db; nothing was cloned, built or run.@Creaa on GitHub · 2026-11-25 10:44 UTC · original
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.
@itsonewi on GitHub · 2026-11-25 11:19 UTC · original
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.