Scripts: reject failed live coverage sweeps #2722

Closed
luckyteagirl wants to merge 1 commit from upstream-pr/2732 into main
luckyteagirl commented 2026-11-26 09:10:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:10:11Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6623275411 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2732). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:10:11Z. --- 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.
upstream-sync closed this pull request 2026-11-26 10:06:10 +00:00
luckyteagirl commented 2026-11-26 10:06:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:11:31Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7187566675 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2732#issuecomment-7187566675). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:11:31Z. --- 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

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!2722
No description provided.