Scripts: preserve the coverage baseline on empty sweeps #2253

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

@⁠RavenCurseBurg on GitHub · 2026-11-25 11:26 UTC · original
RavenCurseBurg:scripts/keep-baseline-on-empty-sweep → main · +33 −2 · 2 files · 1 commits · open

Fixes #2250. Updating from {"stages": {}} erased the stored baseline, so the next empty comparison could exit 0. An empty update now exits 2 before opening the baseline for writing.

What is in it

  • scripts/coverage_gate.py checks for shader stages before updating.
  • scripts/test_coverage_gate.py exercises the empty update, including byte-for-byte preservation, and a successful populated update.

Tested

  • Windows 11 24H2 build 26100.9711, Intel i7-13700, RTX 4060 driver 595.79, Python 3.14.3. These tests use the CPU.
  • On base 9633138 with the new tests, the empty update returned 0 where 2 was expected (10 passed, 1 failed). With the fix, python -B -m unittest discover -s scripts passed all 27 tests (0 failed, 0 skipped).
  • Four CLI checks against a temporary copy of the tracked baseline passed. Empty update exited 2 and preserved the bytes. Comparing the empty report then exited 1. Updating and comparing a populated report both exited 0.

Regression run

Only the Python script and its tests changed.

Not tested

Full Rust/GPU workspace suite, live shader packs and retail titles.

AI use

OpenAI Codex (GPT-6) reproduced the issue, wrote the patch and tests, ran the checks, and drafted this description.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 11:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2253) `RavenCurseBurg:scripts/keep-baseline-on-empty-sweep` → `main` · +33 −2 · 2 files · 1 commits · open Fixes #2250. Updating from `{"stages": {}}` erased the stored baseline, so the next empty comparison could exit 0. An empty update now exits 2 before opening the baseline for writing. **What is in it** - `scripts/coverage_gate.py` checks for shader stages before updating. - `scripts/test_coverage_gate.py` exercises the empty update, including byte-for-byte preservation, and a successful populated update. **Tested** - Windows 11 24H2 build 26100.9711, Intel i7-13700, RTX 4060 driver 595.79, Python 3.14.3. These tests use the CPU. - On base `9633138` with the new tests, the empty update returned 0 where 2 was expected (10 passed, 1 failed). With the fix, `python -B -m unittest discover -s scripts` passed all 27 tests (0 failed, 0 skipped). - Four CLI checks against a temporary copy of the tracked baseline passed. Empty update exited 2 and preserved the bytes. Comparing the empty report then exited 1. Updating and comparing a populated report both exited 0. **Regression run** Only the Python script and its tests changed. **Not tested** Full Rust/GPU workspace suite, live shader packs and retail titles. **AI use** OpenAI Codex (GPT-6) reproduced the issue, wrote the patch and tests, ran the checks, and drafted this description.
An empty stage table could replace a populated baseline and make the next empty comparison pass. Reject the update before touching the file and cover both empty and populated reports.

Fixes #2250

Assisted-by: OpenAI Codex (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:39 +00:00
Author
Owner

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

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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 16:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2253#issuecomment-7168817181) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). 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-25 17:10 UTC · original

Thanks for the RTX 3060 Ti results. I checked the script change from 4b29d00cbeaa88b8b15c68f8d5f6bdca023ee5b0 after a clean local merge with main 68a284a596bd558b6bd9db6eedda6d6aa178c360. The merge tree differs from main only in scripts/coverage_gate.py and its test. All 11 focused Python tests passed on Windows 11 26100.9711, Python 3.14.3. I also invoked the merged script with --update --run-json <empty-sweep.json> --baseline <temporary-baseline.json>: it exited 2 and preserved the existing baseline byte for byte.

I did not rerun the Rust library suite here. The parallel failure and single-threaded rerun are recorded in your report above. OpenAI Codex (GPT-6) ran the script checks and prepared this reply.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 17:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2253#issuecomment-7169118218) Thanks for the RTX 3060 Ti results. I checked the script change from `4b29d00cbeaa88b8b15c68f8d5f6bdca023ee5b0` after a clean local merge with main `68a284a596bd558b6bd9db6eedda6d6aa178c360`. The merge tree differs from main only in `scripts/coverage_gate.py` and its test. All 11 focused Python tests passed on Windows 11 26100.9711, Python 3.14.3. I also invoked the merged script with `--update --run-json <empty-sweep.json> --baseline <temporary-baseline.json>`: it exited 2 and preserved the existing baseline byte for byte. I did not rerun the Rust library suite here. The parallel failure and single-threaded rerun are recorded in your report above. OpenAI Codex (GPT-6) ran the script checks and prepared this reply.
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/2253/head:github-bot/gh-2253'
git switch 'github-bot/gh-2253'

Merge

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