Scripts: require a clean main checkout for smoke baselines #1049

Open
zohaiblazuli wants to merge 1 commit from upstream-pr/1056 into main
zohaiblazuli commented 2026-11-24 10:58:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by zohaiblazuli on 2026-11-24T10:58:46Z.


A smoke block from a modified checkout can currently count as the run on main. That can make the frame and memory comparison use a baseline built from different code. Require an unmodified main checkout for the baseline.

What is in it

  • scripts/pr_check.py rejects a main block marked (uncommitted changes).
  • scripts/test_pr_check.py covers a dirty baseline alone and a valid baseline alongside it. CONTRIBUTING.md clarifies that both runs need clean checkouts.

Tested

  • Windows 11 Pro build 26300, Intel Core i5-14600K, NVIDIA GeForce RTX 3060 driver 32.0.16.1742, Rust 1.94.0 MSVC, debug.
  • python -B -m unittest discover -s scripts -p test_pr_check.py on Python 3.12.6. The new test failed on main and all 7 passed with the fix.
  • scripts/test.ps1 ran cargo build --workspace and cargo test --workspace -- --test-threads=4. Cargo reported 737 passed, 0 failed, 41 ignored. Two of the reported passes emitted GPU skips for no wave64, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.

Not tested

  • AMD, Intel GPUs, or optional retail sample tests. The change only affects the PR checker and contribution docs.

AI use

  • OpenAI Codex (GPT-6, exact variant unavailable) reproduced the issue, wrote the code and test, ran the tests, drafted this description, and opened the draft at the request of the author.
<!-- greyfinch-sync:ivall/xcl:issue:5470844867 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1056). Originally posted by [zohaiblazuli](https://github.com/zohaiblazuli) on 2026-11-24T10:58:46Z. --- A smoke block from a modified checkout can currently count as the run on main. That can make the frame and memory comparison use a baseline built from different code. Require an unmodified main checkout for the baseline. **What is in it** - `scripts/pr_check.py` rejects a main block marked `(uncommitted changes)`. - `scripts/test_pr_check.py` covers a dirty baseline alone and a valid baseline alongside it. `CONTRIBUTING.md` clarifies that both runs need clean checkouts. **Tested** - Windows 11 Pro build 26300, Intel Core i5-14600K, NVIDIA GeForce RTX 3060 driver 32.0.16.1742, Rust 1.94.0 MSVC, debug. - `python -B -m unittest discover -s scripts -p test_pr_check.py` on Python 3.12.6. The new test failed on main and all 7 passed with the fix. - `scripts/test.ps1` ran `cargo build --workspace` and `cargo test --workspace -- --test-threads=4`. Cargo reported 737 passed, 0 failed, 41 ignored. Two of the reported passes emitted GPU skips for no wave64, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. **Not tested** - AMD, Intel GPUs, or optional retail sample tests. The change only affects the PR checker and contribution docs. **AI use** - OpenAI Codex (GPT-6, exact variant unavailable) reproduced the issue, wrote the code and test, ran the tests, drafted this description, and opened the draft at the request of the author.
futurepro62 commented 2026-11-24 15:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:14Z.


Tested exact head dcef418, 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: 7 passed.
  • The PR's test file(s) against current main's script (930e8b4): 1 failed: test_main_baseline_must_have_no_uncommitted_changes. 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.
<!-- greyfinch-sync:ivall/xcl:comment:7134078097 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1056#issuecomment-7134078097). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:15:14Z. --- Tested exact head `dcef418`, 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: 7 passed. - The PR's test file(s) against current main's script (`930e8b4`): 1 failed: `test_main_baseline_must_have_no_uncommitted_changes`. 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 commented 2026-11-25 09:08:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:04:46Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7157845814 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1056#issuecomment-7157845814). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T09:04:46Z. --- 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!
RavenCurseBurg commented 2026-11-26 02:08:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T01:06:05Z.


I ran #1056 (dcef41877f5cf5550b34402e3ff24ac24e06b512), #2230 (a156f8bbb737f79f9f63e594c9b39cb215c4a670) and #2406 (82bc4503a6d56f3ef88bc731c22f823d02150880) through their actual pr_check.py --local CLIs on the same disposable Git history. All three reject a dirty current baseline on its own. They differ when the description contains other usable measurements.

Same input to all three #1056 #2230 #2406
Older clean baseline only, same frame count as PR Pass Pass Requires the specified base
Older baseline at 200 frames, current at 100, PR at 100 Fails if older is first; passes if current is first Passes in either order Passes in either order
Dirty and clean blocks for the specified base Passes in either order Passes in either order Reports the dirty block in either order

Reproduction script. From a checkout with the three listed commits available, python -B verification/compare_smoke_baselines.py checked 10 descriptions per version, including duplicate measurements. All 30 exit-status/diagnostic checks matched. #1056's Python suite also passed 7/7. Windows 11, Core i7-13700, Python 3.14.3. Synthetic measurements only. OpenAI Codex (GPT-6) wrote the harness and ran it.

<!-- greyfinch-sync:ivall/xcl:comment:7179432645 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1056#issuecomment-7179432645). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T01:06:05Z. --- I ran #1056 (`dcef41877f5cf5550b34402e3ff24ac24e06b512`), #2230 (`a156f8bbb737f79f9f63e594c9b39cb215c4a670`) and #2406 (`82bc4503a6d56f3ef88bc731c22f823d02150880`) through their actual `pr_check.py --local` CLIs on the same disposable Git history. All three reject a dirty current baseline on its own. They differ when the description contains other usable measurements. | Same input to all three | #1056 | #2230 | #2406 | | --- | --- | --- | --- | | Older clean baseline only, same frame count as PR | Pass | Pass | Requires the specified base | | Older baseline at 200 frames, current at 100, PR at 100 | Fails if older is first; passes if current is first | Passes in either order | Passes in either order | | Dirty and clean blocks for the specified base | Passes in either order | Passes in either order | Reports the dirty block in either order | [Reproduction script](https://github.com/RavenCurseBurg/xcl/blob/a42d500aaf65fcb1d42cd4e319ba7756cf6e1f76/verification/compare_smoke_baselines.py). From a checkout with the three listed commits available, `python -B verification/compare_smoke_baselines.py` checked 10 descriptions per version, including duplicate measurements. All 30 exit-status/diagnostic checks matched. #1056's Python suite also passed 7/7. Windows 11, Core i7-13700, Python 3.14.3. Synthetic measurements only. OpenAI Codex (GPT-6) wrote the harness and ran it.
github-actions[bot] commented 2026-11-30 08:40:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:40:45Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273206903 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1056#issuecomment-7273206903). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:40:45Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:42:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:42:37Z.


Triage (#1607) – head dcef418

#2230 makes the same filter (main blocks with "uncommitted" in their commit line are not a baseline) and also chooses the newest main block (#2226). #2406 refuses a dirty baseline as well, but compares against the PR's base commit. This PR is the earliest and smallest of the three, and the only one that updates CONTRIBUTING.md to match. Main's pr_check.py still accepts a main block with uncommitted changes.
No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301017504 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1056#issuecomment-7301017504). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:42:37Z. --- **Triage (#1607)** – head dcef418 #2230 makes the same filter (main blocks with "uncommitted" in their commit line are not a baseline) and also chooses the newest main block (#2226). #2406 refuses a dirty baseline as well, but compares against the PR's base commit. This PR is the earliest and smallest of the three, and the only one that updates CONTRIBUTING.md to match. Main's `pr_check.py` still accepts a main block with uncommitted changes. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1056:upstream-pr/1056'
git switch 'upstream-pr/1056'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1056'
git switch 'upstream-pr/1056'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1056'
git switch 'upstream-pr/1056'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1056'
git switch 'main'
git merge --squash 'upstream-pr/1056'
git switch 'main'
git merge --ff-only 'upstream-pr/1056'
git switch 'main'
git merge 'upstream-pr/1056'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1049
No description provided.