Scripts: reject failed live coverage sweeps #2732

Closed
github-bot wants to merge 1 commit from gh-pr/2732/head into gh-pr/2732/base
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 09:10 UTC · original
luckyteagirl:codex/coverage-gate-live-exit → main · +40 −1 · 2 files · 1 commits · closed without merging

The coverage gate could accept a live shader sweep that exited nonzero if it printed valid JSON first. In update mode that output could replace the baseline. Check the child’s exit status before reading its report. A successful sweep still reaches the existing comparison, which reports regressions in the stage counts.

What is in it

  • scripts/coverage_gate.py exits 2 on a failed live sweep and prints the child’s exit status and the tail of both output streams.
  • scripts/test_coverage_gate.py covers comparison and update with a nonzero child that prints valid JSON. A rejected update preserves the baseline bytes. Exit-zero fixtures cover a matching report and a translation regression.

Tested

  • Windows 11 Home build 26200, AMD Ryzen 9 5980HX, Python 3.11.9, synthetic subprocess results.
  • Failing first on main b49be183: python -B -m unittest discover -s scripts -p test_coverage_gate.py -v reported two failing subtests. Compare and update both returned 0 instead of 2.
  • With the fix, python -B -m unittest discover -s scripts -p 'test_*.py' passed all 27 tests, and git diff --check passed.

Regression run

  • Generator and runtime code are outside the diff. This is a Python checker change.

Not tested

  • The Rust workspace suite, a real shader pack sweep or a title run. The new tests use synthetic child processes.
  • Open #2099 and #2202 also edit the live launch path. Their changes may need to be reconciled if either lands first.

AI use

  • OpenAI Codex (GPT-6.2 Sol) traced the process exit path, wrote the patch and failing-first tests, ran the Python checks, and drafted this description.
**@⁠luckyteagirl** on GitHub · 2026-11-26 09:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2732) `luckyteagirl:codex/coverage-gate-live-exit` → `main` · +40 −1 · 2 files · 1 commits · closed without merging The coverage gate could accept a live shader sweep that exited nonzero if it printed valid JSON first. In update mode that output could replace the baseline. Check the child’s exit status before reading its report. A successful sweep still reaches the existing comparison, which reports regressions in the stage counts. **What is in it** - `scripts/coverage_gate.py` exits 2 on a failed live sweep and prints the child’s exit status and the tail of both output streams. - `scripts/test_coverage_gate.py` covers comparison and update with a nonzero child that prints valid JSON. A rejected update preserves the baseline bytes. Exit-zero fixtures cover a matching report and a translation regression. **Tested** - Windows 11 Home build 26200, AMD Ryzen 9 5980HX, Python 3.11.9, synthetic subprocess results. - Failing first on main `b49be183`: `python -B -m unittest discover -s scripts -p test_coverage_gate.py -v` reported two failing subtests. Compare and update both returned 0 instead of 2. - With the fix, `python -B -m unittest discover -s scripts -p 'test_*.py'` passed all 27 tests, and `git diff --check` passed. **Regression run** - Generator and runtime code are outside the diff. This is a Python checker change. **Not tested** - The Rust workspace suite, a real shader pack sweep or a title run. The new tests use synthetic child processes. - Open #2099 and #2202 also edit the live launch path. Their changes may need to be reconciled if either lands first. **AI use** - OpenAI Codex (GPT-6.2 Sol) traced the process exit path, wrote the patch and failing-first tests, ran the Python checks, and drafted this description.
Check the shader child status before parsing its report or updating the baseline. Cover a nonzero exit with valid-looking JSON in both modes.

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:14:15 +00:00
github-bot closed this pull request 2026-11-26 11:14:15 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 09:11 UTC · original

Closing this draft in favor of #2265. Independent review found that #2265 already checks a nonzero live sweep before parsing valid-looking JSON and covers both comparison and baseline update. The extra diagnostic tail and exit-zero controls here do not justify a competing PR. Thanks to the author of #2265 for covering the issue first. AI-assisted duplicate check (OpenAI Codex, GPT-6).

**@⁠luckyteagirl** on GitHub · 2026-11-26 09:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2732#issuecomment-7187566675) Closing this draft in favor of #2265. Independent review found that #2265 already checks a nonzero live sweep before parsing valid-looking JSON and covers both comparison and baseline update. The extra diagnostic tail and exit-zero controls here do not justify a competing PR. Thanks to the author of #2265 for covering the issue first. AI-assisted duplicate check (OpenAI Codex, GPT-6).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.