Scripts: harden coverage_gate CLI argument validation and error paths #2089

Open
heditrigui wants to merge 1 commit from upstream-pr/2099 into main
heditrigui commented 2026-11-25 03:59:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T03:59:21Z.


Summary

Hardens CLI argument handling and validation in scripts/coverage_gate.py and expands test coverage in scripts/test_coverage_gate.py:

  • Validates --run-json path exists before reading; handles missing files, malformed JSON, and missing "stages" mapping cleanly (reporting error diagnostic on stderr and exiting code 2) instead of raising unhandled Python exceptions.
  • Validates --xcl binary and --rpf archive exist before executing subprocess; handles missing files and process spawn errors cleanly with exit code 2.
  • Validates --baseline JSON syntax and "stages" structure when comparing; reports clean error diagnostic on stderr and exits code 2 if invalid.
  • Expands scripts/test_coverage_gate.py from 9 to 22 tests covering CLI error handling (missing args, missing files, corrupt JSON, invalid schema mappings), baseline updates, pass status (code 0), and detected regressions (code 1).

Tested

  • python scripts/test_coverage_gate.py (22 passed in 0.18s).
  • python -m pytest scripts/ (38 passed in 0.66s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (scripts/ tools are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))
<!-- greyfinch-sync:ivall/xcl:issue:5484913832 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-25T03:59:21Z. --- ### Summary Hardens CLI argument handling and validation in `scripts/coverage_gate.py` and expands test coverage in `scripts/test_coverage_gate.py`: - Validates `--run-json` path exists before reading; handles missing files, malformed JSON, and missing `"stages"` mapping cleanly (reporting error diagnostic on stderr and exiting code 2) instead of raising unhandled Python exceptions. - Validates `--xcl` binary and `--rpf` archive exist before executing subprocess; handles missing files and process spawn errors cleanly with exit code 2. - Validates `--baseline` JSON syntax and `"stages"` structure when comparing; reports clean error diagnostic on stderr and exits code 2 if invalid. - Expands `scripts/test_coverage_gate.py` from 9 to 22 tests covering CLI error handling (missing args, missing files, corrupt JSON, invalid schema mappings), baseline updates, pass status (code 0), and detected regressions (code 1). **Tested** - `python scripts/test_coverage_gate.py` (22 passed in 0.18s). - `python -m pytest scripts/` (38 passed in 0.66s). - Validated with `scripts/pr_check.py --local`. **Not tested** - Retail game smoke execution (`scripts/` tools are non-runtime code). **AI use** - Antigravity (Gemini 3.8 Flash (High))
JJAutoCompare commented 2026-11-25 05:08:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:12:21Z.


22 passed, 0 failed, 0 ignored, 0 skipped in 0.084 seconds on STOR-WINLAB. I verified that PR #2099 was open at c52af79a0e80eaf3d94491ebc7342ebc9b8df424 before and after the run. The assigned checkout was clean and detached. The visible PR discussion contained no independent test report.

Tested. Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, portable CPython 3.13.7 AMD64 (MSC v.1944). The direct command & 'L:/XclTooling/pr1999-coverage-52a120f7/portable/python.exe' -B scripts/test_coverage_gate.py -v exited 1 before running any tests because the interpreter’s python313._pth excluded the script directory. The same interpreter ran the unchanged fixture successfully with a process-local import path, private TEMP and TMP, and PYTHONDONTWRITEBYTECODE=1.

& 'L:/XclTooling/pr1999-coverage-52a120f7/portable/python.exe' -B -c "import pathlib, runpy, sys; sys.path.insert(0, str(pathlib.Path('scripts').resolve())); runpy.run_path('scripts/test_coverage_gate.py', run_name='__main__')" -v

The CLI fixtures returned 2 for missing required arguments or files, malformed JSON, and missing stages mappings. A matching baseline returned 0, a translation regression returned 1, and --update returned 0 and created a baseline in a new subdirectory with the expected stage counts.

Not tested. Real XCL subprocess execution, shader packs, GPU, Cargo/workspace tests, smoke runs, and other Python suites.

AI use. T3 Code / Codex (gpt-6.2-sol) ran the fixtures and wrote the report.

<!-- greyfinch-sync:ivall/xcl:comment:7152627620 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7152627620). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:12:21Z. --- **22 passed, 0 failed, 0 ignored, 0 skipped** in 0.084 seconds on STOR-WINLAB. I verified that [PR #2099](https://github.com/xcl-dev/xcl/pull/2099) was open at `c52af79a0e80eaf3d94491ebc7342ebc9b8df424` before and after the run. The assigned checkout was clean and detached. The visible PR discussion contained no independent test report. **Tested.** Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, portable CPython 3.13.7 AMD64 (MSC v.1944). The direct command `& 'L:/XclTooling/pr1999-coverage-52a120f7/portable/python.exe' -B scripts/test_coverage_gate.py -v` exited 1 before running any tests because the interpreter’s `python313._pth` excluded the script directory. The same interpreter ran the unchanged fixture successfully with a process-local import path, private `TEMP` and `TMP`, and `PYTHONDONTWRITEBYTECODE=1`. ```powershell & 'L:/XclTooling/pr1999-coverage-52a120f7/portable/python.exe' -B -c "import pathlib, runpy, sys; sys.path.insert(0, str(pathlib.Path('scripts').resolve())); runpy.run_path('scripts/test_coverage_gate.py', run_name='__main__')" -v ``` The CLI fixtures returned `2` for missing required arguments or files, malformed JSON, and missing `stages` mappings. A matching baseline returned `0`, a translation regression returned `1`, and `--update` returned `0` and created a baseline in a new subdirectory with the expected stage counts. **Not tested.** Real XCL subprocess execution, shader packs, GPU, Cargo/workspace tests, smoke runs, and other Python suites. **AI use.** T3 Code / Codex (`gpt-6.2-sol`) ran the fixtures and wrote the report.
DavidM1911 commented 2026-11-25 06:05:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T05:43:48Z.


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:7154082943 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7154082943). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T05:43:48Z. --- 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!
raylitebull commented 2026-11-25 11:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:03:23Z.


Code review on c52af79 (scripts/coverage_gate.py, scripts/test_coverage_gate.py):

  • Cleanly validates missing/malformed --run-json and --baseline files (JSONDecodeError, OSError, missing stages dict), missing --xcl/--rpf paths, and OSError on spawn, exiting 2 consistently; both CI checks are green and @JJAutoCompare verified 22 passed, 0 failed on c52af79.

Remaining before merge: One additional independent verification of scripts/test_coverage_gate.py on c52af79 (--lib runs do not exercise the Python script tests).

<!-- greyfinch-sync:ivall/xcl:comment:7160527670 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7160527670). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:03:23Z. --- Code review on `c52af79` (`scripts/coverage_gate.py`, `scripts/test_coverage_gate.py`): - Cleanly validates missing/malformed `--run-json` and `--baseline` files (`JSONDecodeError`, `OSError`, missing `stages` dict), missing `--xcl`/`--rpf` paths, and `OSError` on spawn, exiting `2` consistently; both CI checks are green and `@JJAutoCompare` verified `22 passed, 0 failed` on `c52af79`. **Remaining before merge:** One additional independent verification of `scripts/test_coverage_gate.py` on `c52af79` (`--lib` runs do not exercise the Python script tests).
ettehn commented 2026-11-25 11:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-25T11:04:18Z.


Independent Windows check on exact c52af79: all 22 test_coverage_gate.py tests passed. I also reproduced two inherited cases with only temporary baseline copies.

  • A saved report with {"stages":{}} is rejected against the committed baseline (exit 1), but --run-json empty.json --update --baseline <copy> exits 0 and replaces that copy with an empty baseline. The next comparison of the same report exits 0 and prints coverage gate: no regressions. A live call with an empty synthetic 9FPR pack also reproduced the replacement.
  • A report with {"stages":{"CS":{"translated":1636}}} reaches compare() and raises KeyError: validator_failed instead of getting a clean invalid-report diagnostic.

The empty-update behavior also reproduces on main. A follow-up could reject an empty baseline or sweep before update or comparison, and verify each stage has the counters the gate reads. No shipped baseline was touched.

AI use — OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7160547411 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7160547411). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-25T11:04:18Z. --- Independent Windows check on exact `c52af79`: all 22 `test_coverage_gate.py` tests passed. I also reproduced two inherited cases with only temporary baseline copies. - A saved report with `{"stages":{}}` is rejected against the committed baseline (exit 1), but `--run-json empty.json --update --baseline <copy>` exits 0 and replaces that copy with an empty baseline. The next comparison of the same report exits 0 and prints `coverage gate: no regressions`. A live call with an empty synthetic `9FPR` pack also reproduced the replacement. - A report with `{"stages":{"CS":{"translated":1636}}}` reaches `compare()` and raises `KeyError: validator_failed` instead of getting a clean invalid-report diagnostic. The empty-update behavior also reproduces on `main`. A follow-up could reject an empty baseline or sweep before update or comparison, and verify each stage has the counters the gate reads. No shipped baseline was touched. AI use — OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.
ettehn commented 2026-11-25 12:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-25T11:10:30Z.


I put the report-validation follow-up on a single commit directly on c52af79, in case you want to cherry-pick it.

On Windows, the Python script suite passed 40/40. The temporary-baseline CLI checks reject an empty saved report, an empty live synthetic pack and a missing counter, all with exit 2 and the baseline bytes preserved. The saved validated 22,445-program report still passes.

AI use — OpenAI Codex (GPT-6.2 Sol) prepared the follow-up and ran the checks.

<!-- greyfinch-sync:ivall/xcl:comment:7160693263 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7160693263). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-25T11:10:30Z. --- I put the report-validation follow-up on [a single commit](https://github.com/ettehn/xcl/commit/1a079ab588075254376d5e2e4eee5598d46e5e9f) directly on `c52af79`, in case you want to cherry-pick it. On Windows, the Python script suite passed 40/40. The temporary-baseline CLI checks reject an empty saved report, an empty live synthetic pack and a missing counter, all with exit 2 and the baseline bytes preserved. The saved validated 22,445-program report still passes. AI use — OpenAI Codex (GPT-6.2 Sol) prepared the follow-up and ran the checks.
RavenCurseBurg commented 2026-11-25 19:09:12 +00:00 (Migrated from github.com)

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


Independently compared this head c52af79a0e80eaf3d94491ebc7342ebc9b8df424 with @ettehn's follow-up on Windows 11 build 26100.9711, i7-13700, Python 3.14.3.

I ran python scripts/coverage_gate.py --run-json <run.json> --baseline <temporary copy> and its --update form. The eight invalid inputs included an empty stage map, all-zero totals, a missing counter and five invalid values distributed over the second stage's counters (boolean, string, negative integer, fraction and null). For each input I tried comparison, update, and comparison with the invalid data on the baseline side.

  • The PR head wrote a new baseline for all eight invalid updates.
  • On 1a079ab, all 24 invalid cases exited 2 with a diagnostic and preserved the baseline byte-for-byte. Three controls passed on both revisions: a valid comparison, a valid update retaining the supplied counts, and a real decrease in translations returning 1.
  • python -B -m unittest discover -s scripts -p "test_*.py" passed all 40 tests on the follow-up in a writable temporary environment.

Only saved synthetic reports and temporary baseline copies were used. No shader compilation, retail pack or GPU workload. OpenAI Codex (GPT-6) ran these checks and wrote the report.

Follow-up on the review at c52af79a0e80. Tested candidate b24d26580. I ran the real coverage-gate CLI with a dummy pack and a uniquely named executable in a temporary PATH directory outside its working directory. This head returned 2 before launching it. The candidate returned 0 and wrote exactly the supplied stage counts. The existing missing-executable and missing-pack tests still passed. All 39 script tests passed.

Command on the candidate: python -B -m unittest discover -s scripts -p "test_*.py". Windows 11 build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) prepared the patch and ran the tests with synthetic inputs. I did not run the full Rust/GPU suite.

<!-- greyfinch-sync:ivall/xcl:comment:7171131428 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7171131428). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T18:35:59Z. --- Independently compared this head `c52af79a0e80eaf3d94491ebc7342ebc9b8df424` with [@ettehn's follow-up](https://github.com/ettehn/xcl/commit/1a079ab588075254376d5e2e4eee5598d46e5e9f) on Windows 11 build 26100.9711, i7-13700, Python 3.14.3. I ran `python scripts/coverage_gate.py --run-json <run.json> --baseline <temporary copy>` and its `--update` form. The eight invalid inputs included an empty stage map, all-zero totals, a missing counter and five invalid values distributed over the second stage's counters (boolean, string, negative integer, fraction and null). For each input I tried comparison, update, and comparison with the invalid data on the baseline side. - The PR head wrote a new baseline for all eight invalid updates. - On `1a079ab`, all 24 invalid cases exited 2 with a diagnostic and preserved the baseline byte-for-byte. Three controls passed on both revisions: a valid comparison, a valid update retaining the supplied counts, and a real decrease in translations returning 1. - `python -B -m unittest discover -s scripts -p "test_*.py"` passed all 40 tests on the follow-up in a writable temporary environment. Only saved synthetic reports and temporary baseline copies were used. No shader compilation, retail pack or GPU workload. OpenAI Codex (GPT-6) ran these checks and wrote the report. Follow-up on [the review](https://github.com/xcl-dev/xcl/pull/2099#pullrequestreview-6071896926) at `c52af79a0e80`. [Tested candidate b24d26580](https://github.com/RavenCurseBurg/xcl/commit/b24d26580867efae5ca8ceb10d284b3609b51cb7). I ran the real coverage-gate CLI with a dummy pack and a uniquely named executable in a temporary PATH directory outside its working directory. This head returned 2 before launching it. The candidate returned 0 and wrote exactly the supplied stage counts. The existing missing-executable and missing-pack tests still passed. All 39 script tests passed. Command on the candidate: `python -B -m unittest discover -s scripts -p "test_*.py"`. Windows 11 build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) prepared the patch and ran the tests with synthetic inputs. I did not run the full Rust/GPU suite.
luckyteagirl commented 2026-11-26 09:52:54 +00:00 (Migrated from github.com)

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

Review: COMMENTED


On c52af79, the new args.xcl.is_file() check rejects a bare executable name that the OS can find on PATH, before subprocess.run gets a chance to resolve it. I reproduced this with fake-xcl.cmd placed only on the child process's PATH (outside its cwd), an existing dummy pack, and --update: current main exited 0, while this head exited 2 with xcl binary not found. Supplying the same stand-in by absolute path worked on both. This changes an already supported way to invoke the coverage gate.

Could the executable be left to subprocess.run (the new OSError handler already diagnoses a genuine launch failure), or resolve bare names through shutil.which while retaining explicit-path checks? A regression fixture with the stand-in only on PATH would cover it. This was a CPU-only exact-head CLI comparison; I did not run a shader sweep or GPU test.

<!-- greyfinch-sync:ivall/xcl:review:6071896926 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#pullrequestreview-6071896926). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:52:54Z. **Review:** COMMENTED --- On `c52af79`, the new `args.xcl.is_file()` check rejects a bare executable name that the OS can find on `PATH`, before `subprocess.run` gets a chance to resolve it. I reproduced this with `fake-xcl.cmd` placed only on the child process's `PATH` (outside its cwd), an existing dummy pack, and `--update`: current main exited 0, while this head exited 2 with `xcl binary not found`. Supplying the same stand-in by absolute path worked on both. This changes an already supported way to invoke the coverage gate. Could the executable be left to `subprocess.run` (the new `OSError` handler already diagnoses a genuine launch failure), or resolve bare names through `shutil.which` while retaining explicit-path checks? A regression fixture with the stand-in only on `PATH` would cover it. This was a CPU-only exact-head CLI comparison; I did not run a shader sweep or GPU test.
throny commented 2026-11-28 21:07:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:07:37Z.


merge-check claim
head: c52af79a0e

<!-- greyfinch-sync:ivall/xcl:comment:7245790656 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7245790656). Originally posted by [throny](https://github.com/throny) on 2026-11-28T21:07:37Z. --- merge-check claim head: c52af79a0e80eaf3d94491ebc7342ebc9b8df424
throny commented 2026-11-28 21:37:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:37:00Z.


merge-check
base: beeb81be
head: c52af79a0e
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2594 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at beeb81be (main after the merge of nvidia-dev): 2594 passed, 0 failed, 49 ignored. The suite does not run this script, so the counts only show that nothing else moved.
review: script only. One regression from the thread is unanswered: --xcl with a bare program name that is found on PATH worked before and now exits with an error, because the new check wants an existing file path; resolving the name on PATH first would keep it. Smaller, also from the thread: a file with invalid UTF-8 still ends in a traceback, and the follow-up for an empty baseline is not in.
performance: none.
verdict: not yet: keep --xcl <name on PATH> working (small fix), then it is fine.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7246147551 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7246147551). Originally posted by [throny](https://github.com/throny) on 2026-11-28T21:37:00Z. --- merge-check base: beeb81be head: c52af79a0e80eaf3d94491ebc7342ebc9b8df424 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2594 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at beeb81be (main after the merge of nvidia-dev): 2594 passed, 0 failed, 49 ignored. The suite does not run this script, so the counts only show that nothing else moved. review: script only. One regression from the thread is unanswered: `--xcl` with a bare program name that is found on PATH worked before and now exits with an error, because the new check wants an existing file path; resolving the name on PATH first would keep it. Smaller, also from the thread: a file with invalid UTF-8 still ends in a traceback, and the follow-up for an empty baseline is not in. performance: none. verdict: not yet: keep `--xcl <name on PATH>` working (small fix), then it is fine. hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
saintwolf commented 2026-11-30 11:48:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T11:48:34Z.


merge-check claim
head: c52af79a0e

<!-- greyfinch-sync:ivall/xcl:comment:7277554570 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7277554570). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T11:48:34Z. --- merge-check claim head: c52af79a0e80eaf3d94491ebc7342ebc9b8df424
saintwolf commented 2026-11-30 11:56:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T11:56:32Z.


merge-check
base: 9dfbe3ea66
head: c52af79a0e
merge: clean
build: cargo build --workspace -> ok
tests: python scripts/test_coverage_gate.py -v -> 22 passed, 0 failed; cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2884 passed, 3 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (also fails on base 9dfbe3ea alone) and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs in gpu_two_pass_cache_e2e (unrelated to this Python-only PR)
review: read the full +131/-4 diff across scripts/coverage_gate.py (+29/-4) and scripts/test_coverage_gate.py (+102/-0). Blocking regression: args.xcl.is_file() in scripts/coverage_gate.py rejects bare executable names on PATH (e.g. --xcl xcl) that previously worked via subprocess.run; resolving via shutil.which before checking is_file() would preserve that. Smaller gaps: (1) read_text(encoding="utf-8") only catches (json.JSONDecodeError, OSError), leaving UnicodeDecodeError uncaught on invalid UTF-8 files; (2) --run-json with empty stages ({}) or missing per-stage counters is not validated before --update or compare().
performance: none (Python script only)
verdict: not yet: preserve --xcl via shutil.which before the file check
hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)

<!-- greyfinch-sync:ivall/xcl:comment:7277730210 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7277730210). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T11:56:32Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: c52af79a0e80eaf3d94491ebc7342ebc9b8df424 merge: clean build: cargo build --workspace -> ok tests: python scripts/test_coverage_gate.py -v -> 22 passed, 0 failed; cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2884 passed, 3 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (also fails on base 9dfbe3ea alone) and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs in gpu_two_pass_cache_e2e (unrelated to this Python-only PR) review: read the full +131/-4 diff across scripts/coverage_gate.py (+29/-4) and scripts/test_coverage_gate.py (+102/-0). Blocking regression: args.xcl.is_file() in scripts/coverage_gate.py rejects bare executable names on PATH (e.g. --xcl xcl) that previously worked via subprocess.run; resolving via shutil.which before checking is_file() would preserve that. Smaller gaps: (1) read_text(encoding="utf-8") only catches (json.JSONDecodeError, OSError), leaving UnicodeDecodeError uncaught on invalid UTF-8 files; (2) --run-json with empty stages ({}) or missing per-stage counters is not validated before --update or compare(). performance: none (Python script only) verdict: not yet: preserve --xcl <name on PATH> via shutil.which before the file check hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)
Foniass commented 2026-12-01 07:22:38 +00:00 (Migrated from github.com)

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


Triage (#1607) – head c52af79

No open or merged PR makes the same change (#1999 added coverage_gate.py; #2354 changes the stage comparison, not the CLI error paths). The new checks return 2 with a message for a missing or malformed run-json / baseline, a missing xcl binary or pack, and a failed subprocess launch, and the tests exercise each path through main().
Minor: args.xcl.is_file() refuses a bare command name that would have been found on PATH (e.g. --xcl xcl); worth a note in the help text if that use is intended.
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:7303982425 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2099#issuecomment-7303982425). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:22:38Z. --- **Triage (#1607)** – head c52af79 No open or merged PR makes the same change (#1999 added coverage_gate.py; #2354 changes the stage comparison, not the CLI error paths). The new checks return 2 with a message for a missing or malformed run-json / baseline, a missing xcl binary or pack, and a failed subprocess launch, and the tests exercise each path through `main()`. Minor: `args.xcl.is_file()` refuses a bare command name that would have been found on PATH (e.g. `--xcl xcl`); worth a note in the help text if that use is intended. 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/2099:upstream-pr/2099'
git switch 'upstream-pr/2099'

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