PR checks: the PR's smoke block must show how its run ended (#2213) #2219
No reviewers
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!2219
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2219"
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?
@fromthemoonx on GitHub · 2026-11-25 10:09 UTC · original
fromthemoonx:scripts/pr-check-require-smoke-safety-lines→main· +62 −10 · 2 files · 1 commits · openscripts/pr_check.pyrequired onlytitle,secondsandframes shownin anxcl-smokeblock. The PR'sdevice removals,crashes,exitandpeak commitlines were read withdict.get(), and a missing or non-numeric value counted as clean. So a block that lost itscrashes: 1line passed, and so didpeak commit: n/a MBandexit: 0xc0000005. The PR's own block now has to show all four lines with real values. Main's block is unchanged, because its run may have crashed (#1506).Fixes #2213
What is in it
scripts/pr_check.py: the PR's block needsdevice removals,crashes,exitandpeak commit(PR_SMOKE_FIELDS), in the formsmoke.ps1prints them (PR_SMOKE_FORMS): the counters as plain integers,peak commitas<n> MB.number()reads only leading digits, so1.5 GBwas 1 and3,000 MBwas 3. Anexitother than0x0is a problem:killed (no exit)keeps its message, anything else gets "ended with exit …".seconds: 0fails in either block, andframes shown: 0andpeak commit: 0 MBfail in the PR's: the comparisons treat 0 as no value and skip themselves. The memory comparison still skips a main block whosepeak commitis not a number.scripts/test_pr_check.py: aCLEAN_RUNfixture with the linessmoke.ps1prints, used by the existing two-blocks test. New tests: a clean PR block passes; each of the four lines missing fails; malformed values fail (crashes: none/0x0,device removals: n/a/0.0,peak commit: n/a MB/1.5 GB/3,000 MB); zeroseconds,frames shownandpeak commitfail;exit: 0xc0000005andexit: killed (no exit)fail; and a main block without these lines still passes.Open PRs whose
test_pr_check.pyfixtures leave these lines out of the PR's block (#1750, #2039) will need them added when they are rebased onto this.Tested
python -m unittest discover -s scripts -p test_pr_check.py: 19 tests, OK. Withscripts/pr_check.pyfrommainand the new tests: 13 subtests fail (the missing lines, the malformed values, the zeros and the crash exit). The otherscripts/test_*.pyfiles pass.scripts/pr_check.pyon #2176's description (a real pair ofsmoke.ps1blocks) with a runtime file:description ok, the same asmain's checker.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4on8d99ad3(base568e7db; it merges intomainf087b99without conflicts): 1154 passed, 0 failed, 46 ignored. 24 SKIPPED: no wave64, the per-lane refusals, no heap windows.Regression run
scripts/only, with no runtime files.Not tested
PR checksworkflow on GitHub with this script, until it runs on this PR.AI use
🤖 Generated with Claude Code
@itsonewi on GitHub · 2026-11-25 10:32 UTC · original
Reviewed the diff; the four lines are now required and the main block stays lenient, which matches #2213. One hole is left in the new
peak commitcheck because it still goes throughnumber():number()isre.match(r"\s*(\d+)", ...), sopeak commit: 1.5 GBis read as 1 and3,000 MBas 3. Both pass the 125% comparison against a 3000 MB main.peak commit: 0 MBis read as 0, andif pc and mctreats 0 as absent, so the comparison is skipped entirely.device removals: 0.0andcrashes: 0x0are also accepted as 0; harmless, but the same "leading digits only" parser.Since the point of #2213 is that a hand-edited block must not pass, I would make
peak commitstrict:^\s*(\d+)\s*MB\s*$, require it to be > 0 for the PR's block, and change the comparison guard topc is not None and mc is not None. Tests for1.5 GB,3,000 MBand0 MBwould cover it. The docstring offield_problemsstill says "for the comparison"; it now also carries the safety lines, so a one-line update would help.Everything else looks right to me: the missing-line messages,
killedvs other exits, the main-block leniency, and the new tests.@itsonewi on GitHub · 2026-11-25 10:57 UTC · original
One more bypass in the same area, now that the four lines are mandatory: the comparison guards treat 0 as "no value".
field_problemsacceptsseconds: 0andframes shown: 0(both numeric), and thenif mf and .../if pc and mc ...skip both comparisons. A pair of blocks withseconds: 0,frames shown: 0,peak commit: 0 MB,device removals: 0,crashes: 0,exit: 0x0passes today.Requiring
seconds > 0andframes shown > 0in both blocks (andpeak commit > 0in the PR's, as above) closes it;smoke.ps1defaults to 60 s, so a real run is unaffected.@fromthemoonx on GitHub · 2026-11-25 11:07 UTC · original
Thanks @itsonewi, both points were right. On
d706c76, blocks withpeak commit: 1.5 GB,3,000 MBor0 MB,crashes: 0x0, and the all-zero pair all passed. Fixed in8d99ad3, squashed into the one commit:device removalsandcrashesmust be plain integers, and itspeak commitmust be<n> MB(PR_SMOKE_FORMS,re.fullmatch), so1.5 GB,3,000 MB,0x0and0.0are reported as malformed.seconds: 0fails in either block.frames shown: 0andpeak commit: 0 MBfail in the PR's block. Main'sframes shownandpeak commitcan still be 0 or missing, since its run may have crashed (#1506). I kept theif pc and mcguard, because a PR's 0 is now its own problem and a main's 0 means there is nothing to compare against.field_problemsdocstring now says what it checks.New tests cover each case. 19 tests pass, and 13 subtests fail against
main'spr_check.py.Claude Code (Claude Opus 5.5) made the change and wrote this reply.
@RavenCurseBurg on GitHub · 2026-11-25 16:12 UTC · original
I retested the revised head
8d99ad3ac9b4ffff5965b767514583848f42a951through the full local checker entry point.python -B -m unittest discover -s scripts -p test_pr_check.pypassed all 19 tests. I then ran 16 independent pairs of synthetic reports throughpython -I scripts/pr_check.py --local --body <fixture.md> --head <PR SHA> --files <runtime-change.tsv>, using the local origin/main SHA for the baseline. All 16 returned the expected exit code and diagnostic.1.5 GB, a crash count of0x0, and each of the four individually missing fields (device removals, crashes, exit, peak commit).Windows 11 26100.9711, i7-13700, RTX 4060, Python 3.14.3. This exercised the description checker with synthetic input. No retail run, GPU workload or Rust build. OpenAI Codex (GPT-6) ran the checks and prepared this report.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.