PR checks: a smoke block can omit the crash, device-removal, exit and peak-commit lines and still pass #2213
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#2213
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:01 UTC · original
scripts/pr_check.pyonly requires three lines in anxcl-smokeblock:title,secondsandframes shown(SMOKE_FIELDS, line 38). The four lines that carry the safety part of the regression run -device removals,crashes,exitandpeak commit- are read withdict.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,secondsandframes shownafter blocks with only acommitline 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.ps1always 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 presentThe last one matters on its own: a title can log frames, then die with
0xc0000005;smoke.ps1reportsexit: 0xc0000005,crashes: 0(its regex did not match a log line), andpr_check.pyaccepts it. A non-zero exit that is notkilledis never treated as a crash.Repro (by inspection, not run here)
With a runtime file in
files.tsvand a complete main block, this PR block passes with zero problems:field_problems()sees all three required lines;device removals,crashesandexitare missing, so lines 145-148 see 0/0/"";peak commitis 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
568e7dbwithout cloning the repository. The code path is small enough to follow directly.Suggested fix
device removals,crashes,exitandpeak committo the PR block's required lines (a separate tuple, sincepeak commitis<n> MBandexitis not a count).peak commit(n/ameans the run never logged memory - that should be reported, not skipped).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.scripts/test_pr_check.py: a block with each line removed, a block withcrashes: none, and a block withexit: 0xc0000005.Related
title/seconds/frames shown.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", "")).Scope
Found by reading the repository through the GitHub API at
568e7db; nothing was cloned, built or run.@fromthemoonx on GitHub · 2026-11-25 10:05 UTC · original
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.
@itsonewi on GitHub · 2026-11-25 11:19 UTC · original
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.