Skip to content

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

Open
heditrigui wants to merge 1 commit into
xcl-dev:mainfrom
heditrigui:scripts/smoke-crashed-baseline-memory
Open

heditrigui wants to merge 1 commit into
xcl-dev:mainfrom
heditrigui:scripts/smoke-crashed-baseline-memory

Conversation

@heditrigui

Copy link
Copy Markdown
Contributor

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 D3D12.X: match default depth views to MSAA textures #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.
@futurepro62

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@RavenCurseBurg

RavenCurseBurg commented Nov 26, 2026 •

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants