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

Open
opened 2026-11-26 05:22:45 +00:00 by github-bot · 1 comment
Owner

@⁠Conrage on GitHub · 2026-11-25 08:57 UTC · original

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

**@⁠Conrage** on GitHub · 2026-11-25 08:57 UTC · [original](https://github.com/xcl-dev/xcl/issues/2196) `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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:22:45 +00:00
Author
Owner

@⁠Diskuss on GitHub · 2026-11-25 09:14 UTC · original

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

**@⁠Diskuss** on GitHub · 2026-11-25 09:14 UTC · [original](https://github.com/xcl-dev/xcl/issues/2196#issuecomment-7158067446) 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.)
This discussion has been locked. Commenting is limited to contributors.
No description provided.