Scripts: coverage_gate fails new stages that panic or fail validation #2354

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

@⁠safesearch77 on GitHub · 2026-11-25 16:27 UTC · original
safesearch77:scripts/coverage-gate-new-stage-failures → main · +26 −1 · 2 files · 1 commits · open

scripts/coverage_gate.py reported shader stages absent from tests/data/coverage-baseline.json (which currently tracks CS, GS, MS, PS and VS only) as a note without checking validator_failed, panicked or timeout. A sweep introducing a new stage such as HS, DS, AS or LIB with panics, timeouts or validator failures therefore exited 0 with coverage gate: no regressions.

Check WORSEN counts against 0 on new stages too while preserving the note when a new stage is clean.

What is in it

  • scripts/coverage_gate.py: check validator_failed, panicked and timeout > 0 for stages in run["stages"] that are not yet in baseline["stages"].
  • scripts/test_coverage_gate.py: add test_new_stage_with_validator_failure_panic_or_timeout_is_a_regression covering compare() and main() exit status 1.

Tested

  • CachyOS Linux (7.3.5-2-cachyos x86_64), Intel Core i9-13900HX, NVIDIA GeForce RTX 4070 Laptop GPU (driver 620.73.04), Python 3.14.10, commit d32f6df on main 0829441.
  • python3 -B -m unittest discover -s scripts -p 'test_*.py' -v: 26 passed, 0 failed (test_coverage_gate.py: 10 passed; verified test_new_stage_with_validator_failure_panic_or_timeout_is_a_regression fails against main's scripts/coverage_gate.py).
  • python3 scripts/pr_check.py --local: description ok.

Not tested

  • Windows build, cargo test --workspace, and scripts/smoke.ps1 (Python coverage gate and unit tests under scripts/ only).

AI use

  • Antigravity (Gemini 4 Carbon) found the missing WORSEN check on new stages, wrote the fix, unit test, and PR description; reviewed with Claude Opus 5.5 and verified locally with unittest and pr_check.py --local.
**@⁠safesearch77** on GitHub · 2026-11-25 16:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/2354) `safesearch77:scripts/coverage-gate-new-stage-failures` → `main` · +26 −1 · 2 files · 1 commits · open `scripts/coverage_gate.py` reported shader stages absent from `tests/data/coverage-baseline.json` (which currently tracks `CS`, `GS`, `MS`, `PS` and `VS` only) as a note without checking `validator_failed`, `panicked` or `timeout`. A sweep introducing a new stage such as `HS`, `DS`, `AS` or `LIB` with panics, timeouts or validator failures therefore exited `0` with `coverage gate: no regressions`. Check `WORSEN` counts against `0` on new stages too while preserving the note when a new stage is clean. **What is in it** - `scripts/coverage_gate.py`: check `validator_failed`, `panicked` and `timeout` > 0 for stages in `run["stages"]` that are not yet in `baseline["stages"]`. - `scripts/test_coverage_gate.py`: add `test_new_stage_with_validator_failure_panic_or_timeout_is_a_regression` covering `compare()` and `main()` exit status `1`. **Tested** - CachyOS Linux (`7.3.5-2-cachyos` x86_64), Intel Core i9-13900HX, NVIDIA GeForce RTX 4070 Laptop GPU (driver `620.73.04`), Python 3.14.10, commit `d32f6df` on `main` `0829441`. - `python3 -B -m unittest discover -s scripts -p 'test_*.py' -v`: 26 passed, 0 failed (`test_coverage_gate.py`: 10 passed; verified `test_new_stage_with_validator_failure_panic_or_timeout_is_a_regression` fails against `main`'s `scripts/coverage_gate.py`). - `python3 scripts/pr_check.py --local`: `description ok`. **Not tested** - Windows build, `cargo test --workspace`, and `scripts/smoke.ps1` (Python coverage gate and unit tests under `scripts/` only). **AI use** - Antigravity (Gemini 4 Carbon) found the missing `WORSEN` check on new stages, wrote the fix, unit test, and PR description; reviewed with Claude Opus 5.5 and verified locally with `unittest` and `pr_check.py --local`.
compare() reported shader stages absent from the baseline only as a note
("new stage in the sweep") without checking WORSEN counts. Because
tests/data/coverage-baseline.json currently lists only CS, GS, MS, PS and
VS, a sweep introducing HS, DS, AS or LIB with non-zero validator_failed,
panicked or timeout counts exited 0 with "coverage gate: no regressions".

Check WORSEN > 0 on stages not yet in the baseline while keeping the note
when a new stage is clean.

Assisted-by: Antigravity (Gemini 4 Carbon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:28:43 +00:00
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 16:35 UTC · original · edited 2026-11-25 16:40 UTC

Windows check of d32f6df910b1ba31fc942009ea8e2bf3dbf848f4 against its parent 082944135cd2b96288470a595861fa608eee08dc. The script test suite passed all 26 tests with python -B -m unittest discover -s scripts -p "test_*.py".

I ran seven saved-sweep fixtures through python -I scripts/coverage_gate.py --run-json <sweep.json> --baseline <baseline.json> on each revision (14 CLI executions). The temporary baseline contained just CS.

  • Each isolated failure on a new stage (HS with one validator failure, AS with two panics, LIB with three timeouts) changed from exit 0 on the parent to exit 1 on the PR, with the right stage, counter and count.
  • A mixed sweep with one clean new stage and two failing new stages reported exactly two regressions. Clean DS and an unsupported-only LIB remained informational. A regression on the existing CS stage failed on both revisions.
  • The baseline file stayed byte-for-byte identical after every comparison.

Windows 11 26100.9711, i7-13700, RTX 4060, Python 3.14.3. These were comparison-mode checks with synthetic JSON; no shader compilation, real pack, GPU or baseline update. OpenAI Codex (GPT-6) ran the checks and prepared this report.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 16:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7168233384) · edited 2026-11-25 16:40 UTC Windows check of `d32f6df910b1ba31fc942009ea8e2bf3dbf848f4` against its parent `082944135cd2b96288470a595861fa608eee08dc`. The script test suite passed all 26 tests with `python -B -m unittest discover -s scripts -p "test_*.py"`. I ran seven saved-sweep fixtures through `python -I scripts/coverage_gate.py --run-json <sweep.json> --baseline <baseline.json>` on each revision (14 CLI executions). The temporary baseline contained just CS. - Each isolated failure on a new stage (HS with one validator failure, AS with two panics, LIB with three timeouts) changed from exit 0 on the parent to exit 1 on the PR, with the right stage, counter and count. - A mixed sweep with one clean new stage and two failing new stages reported exactly two regressions. Clean DS and an unsupported-only LIB remained informational. A regression on the existing CS stage failed on both revisions. - The baseline file stayed byte-for-byte identical after every comparison. Windows 11 26100.9711, i7-13700, RTX 4060, Python 3.14.3. These were comparison-mode checks with synthetic JSON; no shader compilation, real pack, GPU or baseline update. OpenAI Codex (GPT-6) ran the checks and prepared this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 18:37 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 18:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7171166690) 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!
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/2354/head:github-bot/gh-2354'
git switch 'github-bot/gh-2354'

Merge

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