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

Open
safesearch77 wants to merge 1 commit from upstream-pr/2354 into main
safesearch77 commented 2026-11-25 16:27:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by safesearch77 on 2026-11-25T16:27:39Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:5495098694 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354). Originally posted by [safesearch77](https://github.com/safesearch77) on 2026-11-25T16:27:39Z. --- `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`.
RavenCurseBurg commented 2026-11-25 17:07:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T16:35:49Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7168233384 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7168233384). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T16:35:49Z. --- 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.
DavidM1911 commented 2026-11-25 19:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:37:30Z.


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:7171166690 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7171166690). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:37:30Z. --- 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!
bmjask commented 2026-11-25 21:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:06:46Z.

Review: COMMENTED


No concrete defect found. The coverage gate correctly fails newly observed validation failures, panics, and timeouts while retaining new-stage diagnostics; tests and current Windows CI are green. The assumed complete WORSEN-key schema is pre-existing and fine if report schema guarantees it. I found no blocker.

<!-- greyfinch-sync:ivall/xcl:review:6064988330 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354#pullrequestreview-6064988330). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T21:06:46Z. **Review:** COMMENTED --- No concrete defect found. The coverage gate correctly fails newly observed validation failures, panics, and timeouts while retaining new-stage diagnostics; tests and current Windows CI are green. The assumed complete WORSEN-key schema is pre-existing and fine if report schema guarantees it. I found no blocker.
github-actions[bot] commented 2026-11-30 08:41:13 +00:00 (Migrated from github.com)

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


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:7273217133 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7273217133). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:13Z. --- 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 07:54:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:54:12Z.


Triage (#1607) – head d32f6df

No open or merged PR makes the same change. #2099 also touches coverage_gate.py, but only its argument and file validation in main(), not compare().
In compare(), a stage that is new to the baseline now counts as a regression when it has validator failures, panics or timeouts, as if its baseline counts were 0. The test exercises both compare() and the CLI exit code. 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:7304626455 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2354#issuecomment-7304626455). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:54:12Z. --- **Triage (#1607)** – head d32f6df No open or merged PR makes the same change. #2099 also touches `coverage_gate.py`, but only its argument and file validation in `main()`, not `compare()`. In `compare()`, a stage that is new to the baseline now counts as a regression when it has validator failures, panics or timeouts, as if its baseline counts were 0. The test exercises both `compare()` and the CLI exit code. 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/2354:upstream-pr/2354'
git switch 'upstream-pr/2354'

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/2354'
git switch 'upstream-pr/2354'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2354'
git switch 'upstream-pr/2354'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2354'
git switch 'main'
git merge --squash 'upstream-pr/2354'
git switch 'main'
git merge --ff-only 'upstream-pr/2354'
git switch 'main'
git merge 'upstream-pr/2354'
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!2344
No description provided.