Scripts: reject invalid shader coverage counters #2536
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2536
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2536"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@JiyouProt on GitHub · 2026-11-25 22:04 UTC · original
JiyouProt:codex/coverage-gate-integrity→main· +179 −0 · 3 files · 1 commits · openThe shader coverage gate can report success with
NaNcounters and can save invalid or inconsistent counts as its baseline. For example,total=10, translated=11with the other outcomes zero passes comparison and update; a later genuine 10-of-10 sweep then looks like a regression.Require non-negative integer stage counters and
total == translated + unsupported + validator_failed + panicked + timeout, matchingStageCounts::totalincoverage.rs. Validate saved/live sweeps and comparison baselines before use. Invalid counters return 2 with the stage/field named; rejected updates preserve existing bytes and do not create an absent baseline.What is in it
scripts/coverage_gate.py: counter type/range and total-consistency checks; valid comparison thresholds unchanged. Total check addresses review 6068816616.scripts/test_coverage_gate_counts.py: synthetic regressions for saved and child output, baseline preservation, sums above/below total, every outcome, invalid baseline, valid mixed outcomes and zero/large counts. Extra metadata is not summed.README.md: documents the report contract and rejected-update behavior. RavenCurseBurg also independently reproduced the total mismatch and proposed the same invariant; the results below are our own runs.Tested
-C target-feature=+fmaon this FMA-capable CPU, as in the prior validation.python -B -m unittest discover -s scripts -p 'test_*.py' -v: 36 passed, 0 failed. The review regression produces 16 failing subcases on original PR head60bb165; all pass after the sum check. Original counter regressions also remain green.CS.total, and preserve baseline bytes.0452c949b6e5, clean tree:cargo build --locked --workspace -j 4andcargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output, both Debug and Release (--release), pass. Each test run: 1,423 passed / 0 failed / 46 ignored. Session-localXCL_DXIL_CACHEpoints to a writable workspace directory; caching remains enabled. Final headb8a336de4332differs only by the README paragraph documenting this input contract; its Python suite and Debug/Release builds were checked again. Native test sources and runtime are identical to the tested revision.XCL_SAMPLE_*files supplied.git diff --checkand PR-description checks pass.Regression run
Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 22:17 UTC · original
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!
@RavenCurseBurg on GitHub · 2026-11-25 22:35 UTC · original · edited 2026-11-26 07:45 UTC
I tested
60bb165ab20756a6d5c7d9b2ede307b68060cd59alongside #2253 (4b29d00).git merge-tree --write-tree 60bb165 4b29d00gave a clean combined tree71f1fe88b85d86fa9b2d0d297128de84fd0d7dea. I used a private copy of the checked-in five-stage baseline for each case.I ran 20 CLI checks on each of the two heads and on the combined tree, 60 in all. Each input went through both
--run-json <file>and--xcl <stand-in.cmd> --rpf synthetic.python -B -m unittest discover -s scripts -p "test_*.py"passed 33 tests on this head, 27 on #2253 and 35 on the combination.Windows 11 26100.9711, Core i7-13700, Python 3.14.3. Synthetic inputs and child process only. OpenAI Codex (GPT-6) prepared and ran this compatibility check.
Follow-up on the latest review
I reproduced review 6068816616 with a saved stage whose five outcomes add to 10. On the PR head, totals of both 9 and 11 passed comparison and update. Each update replaced the baseline.
The candidate returns 2 for both mismatches in compare and update, and all four invocations preserved the existing baseline bytes. A balanced 10-of-10 run still passed, a balanced regression returned 1, and a valid update with all five outcomes represented succeeded. All 35 Python script tests passed. These were saved-input CLI runs, with no real shader pack.
Candidate commit 5b290526 is based directly on
60bb165ab207. Reproduce withpython -B -m unittest discover -s scripts -p test_*.py. OpenAI Codex (GPT-6) prepared the fix and ran these Windows CPU fixtures. No game, GPU benchmark or workspace build.Recheck after the update
I rechecked the revised head
b8a336de4332499dffa023614871bf4832fdea10with synthetic saved reports. Stage totals one below and one above the sum each returned 2 on compare and update, with the baseline unchanged. On the previous head all four returned 0 and both updates replaced the baseline. All 36 Python script tests passed on the revised head.The new head still merges cleanly with #2253 at
4b29d00cbeaa(tree2d2a01055d0a17940de8a8a9bb54972bee577238). I ran the same four cases on the combined script, plus an empty-stage update. All five returned 2 and preserved the file. The standalone revised head still accepts the empty-stage update, which is the separate case covered by #2253.OpenAI Codex (GPT-6) ran the checks and prepared this update. No game or GPU workload.
@luckyteagirl on GitHub · 2026-11-26 05:04 UTC · original · reviewed
Could
validate_countsalso check that each stage'stotalequals the sum of its five outcome counters after validating their types? The producer incoverage.rscomputes the JSON total from exactly those five values. Against a baseline withtotal=10andtranslated=10, a saved report withtotal=10,translated=11, and the other counters zero currently passes comparison and can replace the baseline with--update. A later genuine 10-of-10 sweep then appears to regress. A fixture could check that compare and update reject the inconsistent report and that update preserves the existing baseline bytes. Source review only at head60bb165a; no test run. AI-assisted with Codex (GPT-6.2 Sol).60bb165ab2tob8a336de43View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.