The test-gate and the workflow shape checks: a green run must have run something #1294
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1294"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HailLucifer666 on 2026-11-28T17:02:11Z.
Follows #1290 (merge that first — this branch sits on top of it, so its diff shows #1290's fixes until that lands). This is Offer 2 from #1267, made concrete.
What this adds
cargo xtask test-gate— runs the tests, then checks the run against its own account of itself: every binary'srunning N testsmust be closed by a matchingtest result:, a run that executed nothing is refused (the empty-filter class), reports that cannot be attributed to a binary cargo named are refused rather than called green, and CI's colored output (CARGO_TERM_COLOR=always) parses. What it cannot see is stated in the module doc rather than left implied.cargo xtask workflows— every file under.github/workflows/must pass the shape checks this repository can make: one document, a trigger that names an event, jobs that either call or run, steps that do exactly one ofuses/run, and two classes a plain YAML load cannot see: duplicate keys (yaml-rust2 keeps the later value; GitHub refuses the document and creates no run) and typechanged entries. A file GitHub cannot load produces no run at all — this is the only check that catches it forci.ymlitself.policy --stagedfails closed — a staged entry the index cannot serve (a gitlink, an unspellable name) stops the commit instead of being skipped under a "deleted in the index" comment that--diff-filternever triggers.100755— it was100644on main, which makes every POSIX clone skip it in silence (same defect the Marvisak line shipped and fixed).Deliberately not in this PR: turning the WARP skips (
WarpHarness::new()→Option) into loud failures. Before we know whether CI's runner has a WARP adapter, panicking on skip could turn CI red on machines that were honestly skipping; the first CI run of this PR answers that question, and the change is a one-line-per-site follow-up.Local verification (Windows 11, MSVC, branch head
8494e4c):cargo test -p xtask— 65 passed, 0 failed (their policy suite + the ported gate/workflows/hook suites), both CI clippy variants (--all-targetsand--all-targets --all-features,-D warnings) finish clean, and the gate dogfooded its own suite on the Marvisak twin before the port (67 executed, exit 0). Full-workspace test run pending — CI will exercise it once approved.Provenance. Ported from our Marvisak/VIctory branch (PR #2854); the same-line staging-bounds and library-serialization fixes landed upstream there as #1658/#1660. The port carries that branch's second-review fixes: fail-closed policy, duplicate-key refusal, typechange visibility, and the skip message naming both checks. Every mutation probe is recorded in the test files.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HailLucifer666 on 2026-11-28T17:16:25Z.
Full
cargo test --workspace --lockedon this branch's head (8494e4c): exit 0, zero failures. Per binary: victory-gpu 454 passed / 0 failed / 36 ignored (15.5s — the WARP-gated tests executed on this machine, so they do run wherever a WARP adapter exists), victory-shader 293 / 0 / 5 ignored (436s, device tests included), victory-hle 191, victory-loader 48, victory-pe 36, victory-pipeline 7, xtask 66 (the ported gate/workflows/hook suites). Both clippy variants (-D warnings, plain and--all-features) finish clean. One observation for the WARP follow-up: this machine has WARP, so the silent-skip class bites only on machines without one — whether CI's runner is in that class is still exactly what this PR's first CI run will answer.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ANDREANIADS on 2026-11-28T20:12:13Z.
On
8494e4c,cargo xtask workflowsaccepts two steps with- name: ...but reports duplicatenameandrunwhen each dash is on its own line before the same mapping. Both documents parse to the same YAML. Locally I reset the duplicate-key scanner’s deeper mapping scopes on a bare sequence dash (including a trailing comment). The CLI then returned 0 for both layouts and still returned 1 for a repeatedruninside a single step. All 67 xtask tests passed on Linux, as did Clippy with warnings denied. This checks the local workflow validator; no Actions job or WARP adapter was involved.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by babuakhil on 2026-11-28T22:33:28Z.
A gap the gate can't see as it stands: CI's tests never build the
diagnosticsfeature. Clippy runs with--all-features, but the test step doesn't, so everything under#[cfg(feature = "diagnostics")](all ofvictory-gpu'sreplay, among others) is compiled for clippy and never run. #1524 and #1530 both add tests there that CI won't run.Measured on
main(d4b5d51), Windows 11, RTX 3060,cargo test --workspace --locked --no-fail-fast:repository_passes_policy, #1429)--all-featuresviews_off_their_elements_get_a_copy_of_their_bytes)So 58 tests only run with the feature, and none of them fails. The second failure is a
victory-gputest that also runs without the feature and fails now and then onmain(1 of 10 runs alone, earlier);cargo test -p victory-gpu --lib --all-featuresthen passed 604/604 in 5 of 5 runs, with the 24replaytests among them.Since this PR reworks the test step, it seems the natural place for the gate to cover both builds, e.g. a second
cargo xtask test-gate --workspace --locked --all-features(with its--no-runbuild). Happy to open it separately instead if you'd rather keep this one as it is.View 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.