Scripts: require peak commit measurements for smoke comparisons #1103

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

@⁠anakatt on GitHub · 2026-11-24 11:35 UTC · original
anakatt:scripts/require-smoke-memory-metrics → main · +50 −4 · 4 files · 1 commits · open

I fixed the PR checker accepting a memory comparison when either smoke run has no usable peak commit. Missing, empty and n/a measurements parsed as None, so the 125% memory-growth check was skipped.

What is in it

  • Require a numeric peak-commit measurement from both matched smoke runs before accepting the comparison. The existing growth threshold is unchanged.
  • Cover missing measurements on either side and the 125% boundary; update the existing minimal smoke fixture.
  • Clarify the measurement requirement in CONTRIBUTING.md.
  • This also rejects an incomplete baseline that crashed before recording memory; it does not manufacture a comparison from unavailable measurements. Separate from #635, which handles crash/device-removal counters.

Tested

  • macOS Darwin 24.6.0, arm64; Python 3.15.2. No GPU used.

  • Before the fix, python3 -B -m unittest discover -s scripts -p test_pr_check_memory.py -v exposed 8 accepted invalid subcases.

  • After the fix, python3 -B -m unittest discover -s scripts -p 'test_pr_check*.py' -v: 11 passed, 0 failed, 0 skipped.

  • Windows 11 Pro ARM64 10.0.26100.1742 in UTM, Python 3.14.0 ARM64; no GPU used. Exact source archive 49b30dc1f2333361a94ff739912b2d6a78dbe04c: C:\xcl-tests\python\python.exe -B -m unittest discover -s scripts -p "test_pr_check*.py" -v: 11 passed, 0 failed, 0 skipped.

Not tested

  • Live GitHub Actions execution of the modified checker, and the Rust/GPU suite. No runtime code changes.

AI use

  • I used omp (openai-codex/gpt-6-astra) to identify the gap, write the checker change and regressions, run the Python tests, and prepare this description.
**@⁠anakatt** on GitHub · 2026-11-24 11:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1103) `anakatt:scripts/require-smoke-memory-metrics` → `main` · +50 −4 · 4 files · 1 commits · open I fixed the PR checker accepting a memory comparison when either smoke run has no usable `peak commit`. Missing, empty and `n/a` measurements parsed as `None`, so the 125% memory-growth check was skipped. **What is in it** - Require a numeric peak-commit measurement from both matched smoke runs before accepting the comparison. The existing growth threshold is unchanged. - Cover missing measurements on either side and the 125% boundary; update the existing minimal smoke fixture. - Clarify the measurement requirement in `CONTRIBUTING.md`. - This also rejects an incomplete baseline that crashed before recording memory; it does not manufacture a comparison from unavailable measurements. Separate from #635, which handles crash/device-removal counters. **Tested** - macOS Darwin 24.6.0, arm64; Python 3.15.2. No GPU used. - Before the fix, `python3 -B -m unittest discover -s scripts -p test_pr_check_memory.py -v` exposed 8 accepted invalid subcases. - After the fix, `python3 -B -m unittest discover -s scripts -p 'test_pr_check*.py' -v`: 11 passed, 0 failed, 0 skipped. - Windows 11 Pro ARM64 10.0.26100.1742 in UTM, Python 3.14.0 ARM64; no GPU used. Exact source archive `49b30dc1f2333361a94ff739912b2d6a78dbe04c`: `C:\xcl-tests\python\python.exe -B -m unittest discover -s scripts -p "test_pr_check*.py" -v`: 11 passed, 0 failed, 0 skipped. **Not tested** - Live GitHub Actions execution of the modified checker, and the Rust/GPU suite. No runtime code changes. **AI use** - I used omp (`openai-codex/gpt-6-astra`) to identify the gap, write the checker change and regressions, run the Python tests, and prepare this description.
An absent or n/a peak commit parsed as None and skipped the memory
comparison, so incomplete smoke reports passed the documented limit.

Require a measurement from both matching runs. Keep the existing growth
threshold, update the minimal smoke fixture and document the requirement.

Eight invalid subcases were accepted before the fix. The focused checker
suite now passes: 11 tests, 0 failures, 0 skipped on macOS/Python 3.15.2.

Assisted-by: omp (openai-codex/gpt-6-astra)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:32 +00:00
Author
Owner

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

Tested exact head 49b30dc, 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 scripts/test_pr_check_memory.py at the head: 9 passed and 2 passed.
  • The PR's test file(s) against current main's script (930e8b4): test_pr_check_memory.py: 8 subtests of test_both_runs_need_a_memory_measurement fail (both sides, peak None, '', n/a MB, unknown); test_pr_check.py still passes. 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/1103#issuecomment-7134091727) Tested exact head `49b30dc`, 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 scripts/test_pr_check_memory.py` at the head: 9 passed and 2 passed. - The PR's test file(s) against current main's script (`930e8b4`): `test_pr_check_memory.py`: 8 subtests of `test_both_runs_need_a_memory_measurement` fail (both sides, peak `None`, `''`, `n/a MB`, `unknown`); `test_pr_check.py` still passes. 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:21 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 08:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/1103#issuecomment-7156934834) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-26 03:27 UTC · original · edited 2026-11-26 07:45 UTC

Confirmed the reported merge conflict at 49b30dc1f2333361a94ff739912b2d6a78dbe04c against main b49be1836844. Only scripts/test_pr_check.py conflicted. Rebased commit keeps the PR’s memory check and the newer frame and error counters in main’s shared fixture. git merge-tree --write-tree --name-only completed cleanly for the rebase against that main.

I ran python -B scripts/pr_check.py --local --head <sha> --body <body.md> --files <files.tsv> with eight synthetic comparisons per revision. The PR and rebase gave the same result in all eight. With an 800 MB baseline both accepted 999 and 1,000 MB and rejected 1,001 MB. With a 1,200 MB baseline both accepted 1,500 MB and rejected 1,501 MB. When one or both measurements were absent, each named the corresponding missing measurement.

The two targeted test methods passed on the author head. On the rebase, python -B -m unittest discover -s scripts -p "test_*.py" passed all 27 tests, with no failures or skips. Windows build 26100, i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) resolved the conflict and ran the checks. Only synthetic data was used. Retail smoke, GPU tests and the Rust build were outside this run.

Follow-up on review feedback

I checked the positive-peak review through python -B scripts/pr_check.py --local --head <sha> --body <fixture.md> --files <fixture.tsv> with a private Git repository and two matched synthetic runs. The PR head accepted main/PR peak pairs of 0/400, 100/0 and 0/0 MB. The candidate on the exact PR head rejects each and identifies the run with the unusable measurement.

I repeated the eight CLI cases on the candidate on the earlier main-based rebase. Both candidates rejected either missing peak, kept 100/125 MB at the limit, rejected 100/126 MB, and accepted 1/1 MB. Python test discovery passed 12 tests on the PR-based candidate and 28 on the main-based one. This verifies the checker on synthetic input only.

Parent of the PR-based candidate: 49b30dc1f2333361a94ff739912b2d6a78dbe04c. OpenAI Codex (GPT-6) prepared the changes and ran the Windows CPU fixtures. No game, Rust workspace build or GPU workload.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 03:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1103#issuecomment-7181735253) · edited 2026-11-26 07:45 UTC Confirmed the [reported merge conflict](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1103) at `49b30dc1f2333361a94ff739912b2d6a78dbe04c` against main `b49be1836844`. Only `scripts/test_pr_check.py` conflicted. [Rebased commit](https://github.com/RavenCurseBurg/xcl/commit/88e1c40250036d51c8c79f7c6c8f0f5ed75ddbf8) keeps the PR’s memory check and the newer frame and error counters in main’s shared fixture. `git merge-tree --write-tree --name-only` completed cleanly for the rebase against that main. I ran `python -B scripts/pr_check.py --local --head <sha> --body <body.md> --files <files.tsv>` with eight synthetic comparisons per revision. The PR and rebase gave the same result in all eight. With an 800 MB baseline both accepted 999 and 1,000 MB and rejected 1,001 MB. With a 1,200 MB baseline both accepted 1,500 MB and rejected 1,501 MB. When one or both measurements were absent, each named the corresponding missing measurement. The two targeted test methods passed on the author head. On the rebase, `python -B -m unittest discover -s scripts -p "test_*.py"` passed all 27 tests, with no failures or skips. Windows build 26100, i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) resolved the conflict and ran the checks. Only synthetic data was used. Retail smoke, GPU tests and the Rust build were outside this run. **Follow-up on review feedback** I checked the positive-peak review through `python -B scripts/pr_check.py --local --head <sha> --body <fixture.md> --files <fixture.tsv>` with a private Git repository and two matched synthetic runs. The PR head accepted main/PR peak pairs of 0/400, 100/0 and 0/0 MB. The [candidate on the exact PR head](https://github.com/RavenCurseBurg/xcl/commit/9f6bd8733373feff7daf3e68b5ca2c572f198325) rejects each and identifies the run with the unusable measurement. I repeated the eight CLI cases on the [candidate on the earlier main-based rebase](https://github.com/RavenCurseBurg/xcl/commit/ced4353736e4c03749da495983af52e3786a30da). Both candidates rejected either missing peak, kept 100/125 MB at the limit, rejected 100/126 MB, and accepted 1/1 MB. Python test discovery passed 12 tests on the PR-based candidate and 28 on the main-based one. This verifies the checker on synthetic input only. Parent of the PR-based candidate: `49b30dc1f2333361a94ff739912b2d6a78dbe04c`. OpenAI Codex (GPT-6) prepared the changes and ran the Windows CPU fixtures. No game, Rust workspace build or GPU workload.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 05:41 UTC · original · reviewed

Could a matched main run require a positive peak commit value? 0 MB passes the None check and disables the 125% comparison at if pc and mc. With otherwise valid matched 60-second, 100-frame smoke blocks, main 0 MB / PR 400 MB currently passes without a memory finding. I reproduced this on the exact head, and it also remains after #2219, whose nonzero check covers only the PR side. A baseline-zero fixture and an explicit rejection of that unusable measurement would close the comparison bypass. Synthetic checker run only at 49b30dc1f2333361a94ff739912b2d6a78dbe04c; no retail or GPU run. AI-assisted review with Codex.

**@⁠luckyteagirl** on GitHub · 2026-11-26 05:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1103#pullrequestreview-6069089884) · **reviewed** Could a matched main run require a positive `peak commit` value? `0 MB` passes the `None` check and disables the 125% comparison at `if pc and mc`. With otherwise valid matched 60-second, 100-frame smoke blocks, main `0 MB` / PR `400 MB` currently passes without a memory finding. I reproduced this on the exact head, and it also remains after #2219, whose nonzero check covers only the PR side. A baseline-zero fixture and an explicit rejection of that unusable measurement would close the comparison bypass. Synthetic checker run only at `49b30dc1f2333361a94ff739912b2d6a78dbe04c`; no retail or GPU run. AI-assisted review with Codex.
This pull request has changes conflicting with the target branch.
  • scripts/test_pr_check.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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