Scripts: skip memory growth limit when main crashed or aborted early #1112

Open
github-bot wants to merge 1 commit from github-bot/gh-1112 into main AGit
Owner

@⁠heditrigui on GitHub · 2026-11-24 11:45 UTC · original
heditrigui:scripts/smoke-crashed-baseline-memory → main · +51 −1 · 2 files · 1 commits · open

When main experiences crashes, device removals, or terminates before logging frames, its reported peak commit represents an incomplete run rather than full working-set memory. A PR that fixes the crash runs for the full duration and naturally commits more memory than the prematurely aborted baseline, triggering a false-positive rejection ("the PR's run commits much more memory than main's").

What is in it

  • In scripts/pr_check.py: detect when main suffered crashes, device removals, non-zero exit status, or incomplete frame logging (frames shown: none logged). Skip the 125% peak commit ceiling check against crashed baselines.
  • Retain the 125% growth ceiling when main ran and exited cleanly.
  • In scripts/test_pr_check.py: add SmokeComparisonTests covering clean baseline growth limit enforcement, crashed baseline tolerance, and device removal / incomplete run cases.

Tested

  • Host: Windows 11 Pro, Python 3.12.10
  • python -B -m unittest discover -s scripts -p "test_*.py" -v: 11 passed, 0 failed.
  • Verified against the regression smoke report of PR #1087 (which was blocked by this exact failure after fixing an early crash): successfully resolves to 0 problems.
  • Verified that clean baselines with >125% memory consumption still trigger the expected problem message.

Not tested

  • Real retail title smoke runs (this change affects only scripts/pr_check.py and scripts/test_pr_check.py; no runtime files modified).

AI use

  • Antigravity (Gemini 3.8 Flash (High)) investigated the false-positive rejection on crash fixes, implemented the checker update and unit tests, and prepared this PR under author review.
**@⁠heditrigui** on GitHub · 2026-11-24 11:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1112) `heditrigui:scripts/smoke-crashed-baseline-memory` → `main` · +51 −1 · 2 files · 1 commits · open When `main` experiences crashes, device removals, or terminates before logging frames, its reported `peak commit` represents an incomplete run rather than full working-set memory. A PR that fixes the crash runs for the full duration and naturally commits more memory than the prematurely aborted baseline, triggering a false-positive rejection ("the PR's run commits much more memory than main's"). **What is in it** - In `scripts/pr_check.py`: detect when `main` suffered crashes, device removals, non-zero exit status, or incomplete frame logging (`frames shown: none logged`). Skip the 125% peak commit ceiling check against crashed baselines. - Retain the 125% growth ceiling when `main` ran and exited cleanly. - In `scripts/test_pr_check.py`: add `SmokeComparisonTests` covering clean baseline growth limit enforcement, crashed baseline tolerance, and device removal / incomplete run cases. **Tested** - Host: Windows 11 Pro, Python 3.12.10 - `python -B -m unittest discover -s scripts -p "test_*.py" -v`: 11 passed, 0 failed. - Verified against the regression smoke report of PR #1087 (which was blocked by this exact failure after fixing an early crash): successfully resolves to 0 problems. - Verified that clean baselines with >125% memory consumption still trigger the expected problem message. **Not tested** - Real retail title smoke runs (this change affects only `scripts/pr_check.py` and `scripts/test_pr_check.py`; no runtime files modified). **AI use** - Antigravity (Gemini 3.8 Flash (High)) investigated the false-positive rejection on crash fixes, implemented the checker update and unit tests, and prepared this PR under author review.
When main crashes, experiences device removals, or fails to reach its end before logging full frames, its reported peak commit represents an incomplete run rather than full working-set memory. A PR that fixes the crash runs the full duration and naturally commits more memory than the aborted baseline, triggering a false-positive rejection.

Skip the 125% peak commit ceiling check when main did not exit cleanly (crashes, device removals, non-zero exit, or incomplete frame log). Clean baselines continue to enforce the growth limit.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:48 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:15 UTC · original

Tested exact head 003071f, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_pr_check.py at the head: 11 passed, 12 subtests passed.
  • The PR's test file(s) against current main's script (930e8b4): 4 subtests of test_crashed_baseline_skips_memory_growth_limit fail. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1112#issuecomment-7134092913) Tested exact head `003071f`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_pr_check.py` at the head: 11 passed, 12 subtests passed. - The PR's test file(s) against current main's script (`930e8b4`): 4 subtests of `test_crashed_baseline_skips_memory_growth_limit` fail. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:16 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1112#issuecomment-7156816705) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-26 00:36 UTC · original · edited 2026-11-26 00:43 UTC

I combined 003071f1c9296264ba2343787b29ea67681a8d34 with #1496 at d96114c7665879b995a149859ce37bfcd8d0311a. Git merged cleanly, but three recovery subcases failed: the newer field validator rejected the literal none logged (the run did not reach its end) that smoke.ps1 emits. The PR block in those cases showed frames.

Tested integration accepts that exact marker on a matched main run when the PR shows a positive frame count. A zero-frame pair still fails; the marker on the PR or an unrecognized baseline value still reports an error. Clean baselines continue to enforce the 125% peak-memory ceiling.

On Windows 11, Core i7-13700, Python 3.14.3, python -B -m unittest discover -s scripts -p "test_*.py" passed 11 tests on #1112, 18 on #1496 and 21 on the candidate. I ran 16 synthetic pr_check.py --local --body BODY --files FILES --head HEAD cases on each version (48 executions), checking exit status and diagnostics for crash recovery, zero frames, and the 80% frame and 125% memory boundaries. No retail run or hosted workflow was used. OpenAI Codex (GPT-6) resolved the behavior difference, wrote the regression check and ran the tests.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 00:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1112#issuecomment-7178924815) · edited 2026-11-26 00:43 UTC I combined `003071f1c9296264ba2343787b29ea67681a8d34` with #1496 at `d96114c7665879b995a149859ce37bfcd8d0311a`. Git merged cleanly, but three recovery subcases failed: the newer field validator rejected the literal `none logged (the run did not reach its end)` that `smoke.ps1` emits. The PR block in those cases showed frames. [Tested integration](https://github.com/RavenCurseBurg/xcl/compare/d96114c7665879b995a149859ce37bfcd8d0311a...48b8b4b8354bd5354fa5917b4ac1986e77228000) accepts that exact marker on a matched main run when the PR shows a positive frame count. A zero-frame pair still fails; the marker on the PR or an unrecognized baseline value still reports an error. Clean baselines continue to enforce the 125% peak-memory ceiling. On Windows 11, Core i7-13700, Python 3.14.3, `python -B -m unittest discover -s scripts -p "test_*.py"` passed 11 tests on #1112, 18 on #1496 and 21 on the candidate. I ran 16 synthetic `pr_check.py --local --body BODY --files FILES --head HEAD` cases on each version (48 executions), checking exit status and diagnostics for crash recovery, zero frames, and the 80% frame and 125% memory boundaries. No retail run or hosted workflow was used. OpenAI Codex (GPT-6) resolved the behavior difference, wrote the regression check and ran the tests.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1112/head:github-bot/gh-1112'
git switch 'github-bot/gh-1112'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1112'
git switch 'github-bot/gh-1112'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1112'
git switch 'github-bot/gh-1112'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1112'
git switch 'main'
git merge --squash 'github-bot/gh-1112'
git switch 'main'
git merge --ff-only 'github-bot/gh-1112'
git switch 'main'
git merge 'github-bot/gh-1112'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.