Repository navigation
Description
scripts/pr_check.py only requires three lines in an xcl-smoke block: title, seconds and frames shown (SMOKE_FIELDS, line 38). The four lines that carry the safety part of the regression run - device removals, crashes, exit and peak commit - are read with dict.get() and a missing value is treated as clean:
device removals/crashes-(number(pr.get(key)) or 0) > 0(lines 145-147). A missing line givesNone or 0= 0, and a non-numeric value (none,n/a,?) also givesNone or 0= 0. Only a number greater than zero is a problem.exit-pr.get("exit", "").startswith("killed")(line 148). A missing line gives"", and any other value passes:0xc0000005,error, evenkilled later(only the prefix counts).peak commit-pc, mc = number(...), number(...)(line 160). If either side is missing orn/a, the 125% check is skipped entirely (line 161).
CONTRIBUTING.md, item 3, requires the PR's run to "show no device removal and no crash ... and at most 125 % of its peak commit" (lines 24-26). The gate cannot enforce any of that when the line is absent.
This is the same class of bug as #1133 (merged), which added title, seconds and frames shown after blocks with only a commit line passed. It stopped at those three; the counters and the exit code were left as "checked where they are used", but where they are used they are optional.
Why it matters
scripts/smoke.ps1 always prints all of these lines (lines 94-99), so a block that lacks one was edited by hand, truncated by a copy/paste, or produced by a modified script. Deleting one line turns a failing run into a passing one:
crashes: 1-> delete the line -> passdevice removals: 1-> delete the line -> passexit: killed (no exit)-> delete the line -> passpeak commit: 9000 MBon main's 3000 MB -> delete the line (or leave smoke.ps1's ownpeak commit: n/a MB) -> passexit: 0xc0000005-> already passes, even with every line present
The last one matters on its own: a title can log frames, then die with 0xc0000005; smoke.ps1 reports exit: 0xc0000005, crashes: 0 (its regex did not match a log line), and pr_check.py accepts it. A non-zero exit that is not killed is never treated as a crash.
Repro (by inspection, not run here)
With a runtime file in files.tsv and a complete main block, this PR block passes with zero problems:
xcl-smoke v1
commit: <head sha>
title: <same title as main>
seconds: 60
frames shown: 900 (PresentX 900)
field_problems() sees all three required lines; device removals, crashes and exit are missing, so lines 145-148 see 0/0/""; peak commit is missing on the PR side, so lines 160-162 skip the memory check. The expected result is three or four problems, one per missing line.
I did not run it: this audit was done through the GitHub API at 568e7db without cloning the repository. The code path is small enough to follow directly.
Suggested fix
- Add
device removals,crashes,exitandpeak committo the PR block's required lines (a separate tuple, sincepeak commitis<n> MBandexitis not a count). - Parse the counters strictly: a value that is not a decimal number is a problem, not zero. Same for
peak commit(n/ameans the run never logged memory - that should be reported, not skipped). - Require
exit: 0x0for the PR's block; keepkilled (no exit)as its own message, and treat any other non-zero exit as a failure or at least print it in the check output. - Add fixtures to
scripts/test_pr_check.py: a block with each line removed, a block withcrashes: none, and a block withexit: 0xc0000005.
Related
- Scripts: pr_check refuses smoke blocks without a title, time or frames #1133 (merged): the same bug for
title/seconds/frames shown. - PR checks: validate every clean PR xcl-smoke block, not only the last #1884 (open): validates every
xcl-smokeblock instead of only the last; it moves this code but does not make the fields required (its diff keepsfor key in ("device removals", "crashes")andpr.get("exit", "")). - 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 (open): the main block may itself have crashed before its end - a different case, about main's side.
- Scripts: the smoke block can't tell a black screen from a working title #717 (open): the block cannot tell a black screen from a working title.
Scope
Found by reading the repository through the GitHub API at 568e7db; nothing was cloned, built or run.
Activity
fromthemoonx commentedon Nov 25, 2026
I'll take this. Plan,
scripts/pr_check.pyonly:device removals,crashes,exitandpeak commitlines.device removals,crashesandpeak commitmust be numbers there.noneorn/ais a problem, not 0 or a skipped check.exitother than0x0is a problem:killed (no exit)keeps its own message, and0xc0000005gets "ended with exit 0xc0000005".peak commitis not a number, the memory comparison is still skipped.Tests in
scripts/test_pr_check.py: one for each missing line,crashes: none,peak commit: n/a MBandexit: 0xc0000005. Each fails on568e7db. I'll also update the existing fixtures that leave these lines out. #1229, #1750 and #2039 have fixtures without them, so whichever merges second needs a small fixture update.AI use: Claude Code (Claude Opus 5.5) is writing the change and the tests.
PR checks: the PR's smoke block must show how its run ended (xcl-dev#…
itsonewi commentedon Nov 25, 2026
Plan is right. Three details:
peak commit, printmemory check skipped: main has no peak commitin the check output. A silently skipped memory check reads the same as a passing one in the log, which is the same class of bug as the missing line.exit: accept0x0and0, and treat everything else as a problem.smoke.ps1prints hex, so a block written by hand with0should not fail.