PR checks: the PR's smoke block must show how its run ended (#2213) #2209
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T10:09:36Z.
scripts/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 and bytest_smoke_header_in_title_does_not_end_block(from #2644, whose short block lacks the lines this PR requires; it still fails when #2644's header pattern is undone). 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.pyon1223a130(rebased ontomain395405e4): 20 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, except 8 tests oftest_discord_mirror.py, which fail on Windows onmaintoo (#3610 fixes them).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=4onmain395405e4, whose Rust files are the same as this branch's: 3012 passed, 0 failed, 56 ignored. 25 SKIPPED: 22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps. A first run of it ended with 0xc0000005 in the library tests, the crash of #3586.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
Imported from ivall/xcl. Originally posted by itsonewi on 2026-11-25T10:32:29Z.
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.Imported from ivall/xcl. Originally posted by itsonewi on 2026-11-25T10:57:53Z.
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.Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T11:07:56Z.
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.
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T16:12:51Z.
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.
The author closed #2388 in favor of this PR and suggested carrying over the multi-block regression. I put that test on an integration commit with this PR’s
8d99ad3ac9b4and #1884’s4056361fac74as parents. It applies this PR’s strict field and exit checks to each PR run while retaining #1884’s title/duration matching.The carried-over test checks that a missing peak-commit field is reported in either block position. It failed against each parent alone and passed on the integration. On the candidate,
python -B -m unittest discover -s scripts -p "test_*.py"passed all 34 tests. I also ran 20 syntheticpr_check.py --localCLI cases across two titles and both input orderings, including clean controls, incomplete reports, nonzero exits and zero measurements. Windows 11 build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) resolved the conflict, ported the test and ran these checks. Live Actions and retail smoke were outside this run.Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-26T18:02:24Z.
Thanks for the rerun and the integration commit. If #1884 merges first, I'll rebase this PR onto it and bring in the multi-block test from
d69cdc3(a missing field reported in either block position), with credit to you. If this one merges first, the test belongs with #1884's rebase.AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:36:16Z.
Triage (#1607) – head
8d99ad3#538 (open) makes part of this change: it refuses a PR smoke block whose
exitis missing or not 0x0. This PR does that too (exitis a required PR field, and any code other than0x0is refused). It also requires thedevice removals/crashes/peak commitlines in the formsmoke.ps1prints them and refuses zero seconds, frames or commit. #538's change is contained here. #2388 (closed) made the same change.No problems found in the diff. The exact
0x0match is right forsmoke.ps1, which prints'0x{0:x}'.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T03:23:19Z.
Follow-up review of
1223a130, since8d99ad3(code reading only, not a merge-check) · no new findingsIn short: Since the triage of
8d99ad3, this push only rebases ontomain. The one change is inscripts/test_pr_check.py:mainadded a test whose smoke run puts the block header in the title, and that test now builds its run fromCLEAN_RUN, so it passes the stricter rules this PR adds. #538, which made part of this change, is closed. Nothing blocks it.Checked and fine
test_smoke_header_in_title_does_not_end_blockkeeps its point: the title line still holds "xcl-smoke v1", and the run now carries theexit,device removals,crashesandpeak commitlines the PR requires.8d99ad3, which the triage found no problems in.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.