Scripts: coverage_gate.py never runs the validator, so its validator_failed check can't fire #2186

Open
opened 2026-11-25 08:57:49 +00:00 by Conrage · 1 comment
Conrage commented 2026-11-25 08:57:49 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by Conrage on 2026-11-25T08:57:49Z.


scripts/coverage_gate.py (line 68 on 568e7db7) runs:

xcl shaders <pack> --direct --sample 0 --json

without --validate. In direct_sweep (crates/xcl/src/shaders.rs:2000) validate is only set by --validate, and translate_mode (crates/xcl/src/gpu/dxil/coverage.rs:266) only calls the validator when it is set. So validator_failed is always 0, in the committed baseline and in every sweep the gate runs.

The gate says it fails when a stage "gained validator failures" (#1999), but that can never happen: DXIL that translates and then fails validation is counted as translated.

Fix: pass --validate in the gate's command and regenerate tests/data/coverage-baseline.json with it (or drop validator_failed from WORSEN and the docstring).

<!-- greyfinch-sync:ivall/xcl:issue:6600818850 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2196). Originally posted by [Conrage](https://github.com/Conrage) on 2026-11-25T08:57:49Z. --- `scripts/coverage_gate.py` (line 68 on 568e7db7) runs: ``` xcl shaders <pack> --direct --sample 0 --json ``` without `--validate`. In `direct_sweep` (`crates/xcl/src/shaders.rs:2000`) `validate` is only set by `--validate`, and `translate_mode` (`crates/xcl/src/gpu/dxil/coverage.rs:266`) only calls the validator when it is set. So `validator_failed` is always 0, in the committed baseline and in every sweep the gate runs. The gate says it fails when a stage "gained validator failures" (#1999), but that can never happen: DXIL that translates and then fails validation is counted as `translated`. Fix: pass `--validate` in the gate's command and regenerate `tests/data/coverage-baseline.json` with it (or drop `validator_failed` from `WORSEN` and the docstring).
Diskuss commented 2026-11-25 10:10:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by Diskuss on 2026-11-25T09:14:37Z.


Looked into this; not taking it further, so it's free for anyone with the game files.

  • Confirmed in code on 568e7db: --validate is parsed only at crates/xcl/src/shaders.rs:2000, and translate_mode (crates/xcl/src/gpu/dxil/coverage.rs:266) calls the validator only when that flag is set. coverage_gate.py never passes it, so validator_failed in the gate's sweep is always 0.
  • The one-line flag change is easy. But regenerating tests/data/coverage-baseline.json needs a retail shader pack (--rpf, about 20k programs in the current baseline). No such pack is in the repo or in CI (no workflow runs the gate), and I don't have the game files. So I couldn't run the gate with or without --validate, and I couldn't produce honest counts.
  • If whoever has the pack adds the flag, the baseline update is just python scripts/coverage_gate.py --update --xcl ... --rpf .... Open PR #2099 also touches coverage_gate.py, so the two may conflict.

(Checked by Claude Code, Claude Opus 5.5, reading the code only; no sweep was run.)

<!-- greyfinch-sync:ivall/xcl:comment:7158067446 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2196#issuecomment-7158067446). Originally posted by [Diskuss](https://github.com/Diskuss) on 2026-11-25T09:14:37Z. --- Looked into this; not taking it further, so it's free for anyone with the game files. - Confirmed in code on 568e7db: `--validate` is parsed only at `crates/xcl/src/shaders.rs:2000`, and `translate_mode` (`crates/xcl/src/gpu/dxil/coverage.rs:266`) calls the validator only when that flag is set. `coverage_gate.py` never passes it, so `validator_failed` in the gate's sweep is always 0. - The one-line flag change is easy. But regenerating `tests/data/coverage-baseline.json` needs a retail shader pack (`--rpf`, about 20k programs in the current baseline). No such pack is in the repo or in CI (no workflow runs the gate), and I don't have the game files. So I couldn't run the gate with or without `--validate`, and I couldn't produce honest counts. - If whoever has the pack adds the flag, the baseline update is just `python scripts/coverage_gate.py --update --xcl ... --rpf ...`. Open PR #2099 also touches `coverage_gate.py`, so the two may conflict. (Checked by Claude Code, Claude Opus 5.5, reading the code only; no sweep was run.)
Sign in to join this conversation.
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#2186
No description provided.