CI: a check that did not run must not read as passing #2854
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2854
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2854"
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?
@HailLucifer666 on GitHub · 2026-11-25 22:27 UTC · original
HailLucifer666:chore/xtask-test-gate→main· +2443 −9 · 10 files · 10 commits · openWhat
Two checks for one defect class: a check that did not run must not read as passing.
cargo xtask test-gate [cargo test args]runs the tests, then reads each binary's account of itself back —running N testsagainsttest result: …. It fails when a binary announced 0 tests (doc-test binaries exempt: a crate with no doc examples runs none by design), when a binary accounted for fewer tests than it announced, and when the run executed no test at all.cargo xtask workflowsreads every file under.github/workflows/and refuses the shapes GitHub will not load. GitHub parses those files before it creates a job, so a file it cannot load produces no run at all — and no CI check can report that from inside CI..githooks/pre-commitcalls it with--staged, so the blob being committed is the one checked.Why one PR: both catch the same failure — a green check that proves nothing. A workflow that does not parse produces no run; a test command whose filter matches nothing exits 0. Neither appears as a failure to anything reading the checks.
Verification
cargo test -p xtask --locked— 36 passed (16 before this PR).cargo xtask test-gate -p xtask --locked— exit 0, 36/36 accounted for.main(63bcca43): 36 passed; gate exit 0;cargo xtask workflows1 file ok;cargo xtask policy193 files ok;cargo clippy -p xtask --all-targets --locked -- -D warningsclean.cargo xtask test-gate -p victory-hle --locked— exit 0; four binaries named; 152+1+1+0 tests executed; one nested report, from a test that spawnscurrent_exe().cargo xtask test-gate -p xtask --locked -- no_such_test— exit 1,the run executed no test.--> xtask\src\workflows.rs:610:26, reproduced by temporarily breaking a source file, restored byte-identical (sha256 checked).ci.ymldefect — and green once restored, through both the unit test and the hook's staged check (the YAML error named line 36, column 11).Behaviour and limits
--jobs 1), measured at no cost over this workspace (27 s either way), because concurrent binaries write into one stream and no report can be attributed to a binary.cargo testexited 0: a failing run dumps captured output that can contain harness-shaped lines. A red run is reported from cargo's own diagnosis, and each failing test's panic block is echoed — this process captured cargo's stdout, so nothing else prints it.current_exe()writes a child's harness lines into the same stream. Results close reports last-in-first-out, and only the outermost reports — the binaries cargo ran and named — are gated.runs-onor call another workflow, and steps with exactly one ofuses/run. Unknown keys, expression syntax and nonexistent actions are not checked;actionlintis not wired in.Note on the existing red
main's CI is green. On a machine with a GPU,victory-gpufailsdescriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views: both ask for a shader-visible heap ofHEAP_VIEWS = 1 << 21descriptors, and a CBV/SRV/UAV heap is capped at 1,000,000 (PORTABLE_VIEWSin the same module already records that limit), soCreateDescriptorHeapfails and the tests cannot pass there. CI has no GPU, so its runs return early. On hardware,victory-shader's lib test binary also dies with0xc0000005(STATUS_ACCESS_VIOLATION) after 83 of 305 tests, so 222 never run. Both are separate upstream defects and this branch touches no file in either crate. Theframewait test has also failed intermittently in CI (run 45713337193); this branch does not touch that file either, and the gate now prints its panic instead of a bare test name.@Marvisak on GitHub · 2026-11-26 03:24 UTC · original
Automated triage for the maintainers.
Verdict: proposed close. The new
cargo xtask test-gate(xtask/src/gate.rs) catches acargo testrun whose filter matched nothing. CI runscargo test --workspace --lockedwith no filter, so that case cannot arise there. The added CI step in.github/workflows/ci.ymlruns the whole workspace suite a second time, serially (--jobs 1 --no-fail-fast), which adds a full extra test run to every check for no gain. For local runs, a filter that matches nothing is already visible in libtest'srunning 0 testsline. The module doc is also a long rationale (repo rule 3) with an unexplained/kee class 14reference. CI workflow changes and process-spawning tooling need the maintainer in any case.This will be closed in 48 hours unless you push a change or a maintainer removes the label.
CI: failing (
check). The PR body says the existingTestsstep fails onmaintoo.Generated by Claude Code
xtask: fail the test run when it executed nothingto CI: a check that did not run must not read as passing@kotekompotek on GitHub · 2026-11-25 22:51 UTC · original · reviewed
The false-green gap is real (empty filter -> exit 0 -> CI pass), and the design notes show the two subtle requirements handled: serial targets so reports can be attributed, and only reading counts when cargo exited 0 so captured failure output can't inject harness-shaped lines. Doc-test exemption is right — empty doc-test sets aren't defects. LGTM.
@fuzeofficlal on GitHub · 2026-11-26 00:17 UTC · original · reviewed
Verified head
5a83ddedmerged ontoorigin/main(63bcca43) on Windows 11 x64. Found two reproducible blocking issues (one breaks CI on this workspace as-is):Blocking Findings
cargo xtask test-gate -p victory-hle --lockeddeterministically fails on this repo:crates/victory-hle/src/host.rs(loading_a_host_dll_does_not_block_thread_attach) spawns a childcurrent_exe()with inherited stdout, interleaving the child'srunning 1 testandtest result: ok. 1 passed; ...inside the parent binary's test output.gate::parseappends into a flatVec<Report>and updatesreports.last_mut(), splitting the parent report into two mismatched entries. Runningcargo xtask test-gate -p victory-hle --lockedexits with code1:.github/workflows/ci.ymlrunscargo xtask test-gate --workspace --locked, this will fail CI immediately unless either the child test captures its own stdout (.output()) orgate::parsehandles nested child-process output.--test-harness arguments fails because--no-fail-fast/--jobs 1are appended afterargs:cargo xtask test-gate -p xtask --locked -- no_such_test_name_xyzforwards--no-fail-fastafter--to libtest and fails witherror: Unrecognized option: 'no-fail-fast'(exit101). Inserting cargo flags before any--separator inargsfixes this..github/workflows/ci.ymlkeeps the existingcargo test --workspace --lockedstep and addscargo xtask test-gate --workspace --lockedright after it, running the entire workspace test suite twice (with--jobs 1on the second pass).Positive Checks
cargo test --locked -p xtask(16/16),cargo xtask test-gate -p xtask --locked(16/16),cargo clippy --locked -p xtask --tests -- -D warnings, andcargo xtask policy(192 files ok) all pass.@HailLucifer666 on GitHub · 2026-11-26 11:01 UTC · original
Thanks for the review — both blocking findings reproduced on Windows 11 x64 at head
5a83ddedbefore anything changed, and both are fixed at7878c324.1.
-p victory-hleexited 1, exactly as reported (announced 152, accounted for 0andannounced 1, accounted for 152). The stream shows the mechanism:loading_a_host_dll_does_not_block_thread_attachspawnscurrent_exe()with inherited stdout, so the child announces its 1 test inside the parent binary's run and its result arrives before the parent's 152-test result.gate::parseattached each result to the most recent announcement; it now closes the most recent unresolved one, last-in-first-out, and gates only the outermost reports — the binaries cargo ran and named. Re-run: exit 0, four binaries named,152+1+1+0tests executed, one nested report counted separately. Regression test:a_child_process_report_keeps_its_parents_counts.2.
-- no_such_test_name_xyzforwarded--no-fail-fastto libtest and exited 101.gate::argvnow splits at the first--and places the gate's flags before it. The same command now reaches libtest and exits 1 withthe run executed no test, which is the gate doing its job. Regression test:the_gates_flags_go_before_the_harness_separator.3. The duplicate suite run is gone.
ci.ymlnow has oneTests, gatestep; the plainTestsstep was removed infa1b61e8.Also from the triage note: the module doc's
/keereference is removed. The gate and the workflow check stay one PR because they are one defect class — a check that did not run must not read as passing.One correction to the earlier body:
main's CI is green. On a machine with a GPU,victory-gpufailsdynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsbecause both request a shader-visible heap of1 << 21descriptors against the 1,000,000 cap, soCreateDescriptorHeapfails and the tests fall back and cannot pass there. CI has no GPU, so its runs return early. That is upstream and untouched here.Verification on the final head: 36 xtask tests; gate and clippy clean; the tree merged with
main(63bcca43) also 36/36, gate exit 0, workflows ok. Four mutation probes, each red for the right reason and restored byte-identical. Machine: Windows 11 x64, Rust 1.98.1. AI-assisted; every run above was executed on this machine.@HailLucifer666 on GitHub · 2026-11-26 12:36 UTC · original
Follow-up: all 13 preflight findings are fixed at
8f162ce0, and CI is green again (check2m50s).git ls-tree HEAD .githooks/now reports100755, andgit diff --summaryshows the mode change. The previous push still had644because splitting the commits reset the index mode on a Windows checkout;install-hooksnow also chmods the hook on Unix.on:null /[]/''is refused; the check asks whether the value names an event, not whether the key exists.runs-on:null /[]is refused; thegroup/labelsmapping is accepted so a valid runner group is not a false red.git diff -zand splits on NUL, so a quotedcafé.ymlis read; a path it cannot interpret becomes a problem, not a silentcontinue. Tested against a real temporary git repo.--jobs 1is forced and a caller-j/--jobsis refused with the reason. CI now builds in parallel (cargo test --workspace --locked --no-run, 4m38s) and the gate runs the already-built binaries.failure_reportquotes the first error blocks, so--> file:lineand the caret survive any amount of stderr after them (tested withE0308followed by 80 lines).ci.ymlitself can be caught".One further defect surfaced when the strict pairing rule hit CI for the first time: with
CARGO_TERM_COLOR=always, cargo wrapsRunningandDoc-testsin ANSI escapes,targets()found zero names, and the gate refused a green run (cargo named 0 target(s) but 29 report(s)). Fixed in8f162ce0by stripping CSI sequences before matching and trimming after; the regression test uses the exact colored line shape from run45819533685. This is the false-attribution class the rule exists to catch, found on its first real run.Evidence: 54 xtask tests; eleven mutation probes, each red for the stated reason and restored byte-identical; pairing checked on victory-core (2 binaries), victory-loader (5) and victory-hle (4 plus 1 nested report);
CARGO_TERM_COLOR=alwaysruns of xtask and victory-hle both exit 0 with every binary named. CI run45820677011on8f162ce0is green. Machine: Windows 11 x64, Rust 1.98.1. AI-assisted; every run above was executed on this machine.TEAM-QA FOUND. A binary target with no tests reports `running 0 tests` with `0 filtered out`, while a binary whose filter removed every test reports the count it removed. The zero-announcement rule read both as a filter that matched nothing, so any workspace with a test-less bin went red. `Report` now carries the `filtered out` count and the rule fires only when tests were actually removed. Also from the same pass: `on: [42]`, `on: [push, {}]`, and a `runs-on` mapping with an unknown key or a mis-typed value are files GitHub refuses; the shape checks accepted them. Every event-list entry must now name an event, and a runner mapping accepts only `group` (a non-empty string) and `labels` (a label or a non-empty list of them). DOCUMENTED, NOT FIXED. stdout is unauthenticated: a test that prints a harness-shaped `test result:` can forge or close its binary's account, and the gate never counts `test ... ok` lines. A `harness = false` target prints no libtest report and is refused as unattributable. A narrowed command (`--exclude`, `-p`, `--lib`) is gated as the set it ran. All three are now in the module doc, so the green is not read as more than it is. VERIFICATION. 57 xtask tests; `CARGO_TERM_COLOR=always` gate runs of xtask and victory-hle green; the hook is installed in this clone, so this commit ran it. A test-less bin now leaves the gate green, and the three new workflow shapes are refused with their own fixtures. AI-assisted; every run above was executed on this machine.@HailLucifer666 on GitHub · 2026-11-26 13:03 UTC · original
One more pass, from an independent QA probe of the new guards (fixed at
f65301ba, CI green):running 0 testsand0 filtered out, exactly like a binary whose filter removed every test minus the removed count. The zero-announcement rule treated both as "a filter that matched nothing", so any workspace with a test-lessbinfailed.Reportnow carries thefiltered outcount and the rule fires only when tests were actually removed. This would have hit the next crate that adds a test-less binary.on: [42],on: [push, {}], and aruns-onmapping with an unknown key or a mis-typed value. Every event-list entry must now name an event, and a runner mapping accepts onlygroup(a non-empty string) andlabels(a label or a non-empty list of them). Each has its own fixture.test result:and forge or close its binary's account; the gate never countstest … oklines, so only cargo's exit status protects a red run), aharness = falsetarget prints no libtest report and is refused as unattributable, and a narrowed command (--exclude,-p,--lib) is gated as the set it actually ran.asset policy: 2 files ok/workflows: none staged.Verification: 57 xtask tests;
CARGO_TERM_COLOR=alwaysgate runs of xtask and victory-hle green; the workflow shape fixtures cover the new refusals and the accepted group mapping. CI run45824858976onf65301bapassed in 2m51s.@HailLucifer666 on GitHub · 2026-11-26 13:18 UTC · original
Final review pass (build-pr). One blocker, fixed at
fc12c569; CI green again (run45827208025, 2m39s).failure_report/error_excerptmatchederroron the raw line.ci.ymlsetsCARGO_TERM_COLOR=alwaysworkflow-wide, so a colourederror[E0308]starts with an escape byte, no block was found, and the excerpt silently fell back to the 60-line tail it replaced. Both now strip colour first, and a coloured twin of the long-red-run test pins it — the same false-green class as the PR's headline, one function short.git ls-tree HEAD .githooks/pre-commitmust start100755. A Windows checkout cannot show the mode, and a split commit reset it once already.copykeeps its captured bytes on a read error instead of discarding them; an all-filtered run prints one message instead of one per binary; the streaming test is renamed for what it proves; a-jafter--is covered as passing through;docs/architecture.mdnames the two new xtask commands.pull_requestrun is GitHub's own merge of this head withmain(63bcca43), so run45827208025is the merged-tree evidence. A local workspace run stays red on the two heap assertions and avictory-shaderSTATUS_ACCESS_VIOLATIONthat stops 222 tests; neither is in a file this branch touches, and both predate it.5a83ddedsays a "verdict that is notok"; the parser deliberately does not read the verdict because a non-zero exit is caught first. Correcting a pushed commit's message would rewrite history.Evidence: 61 xtask tests;
CARGO_TERM_COLOR=alwaysgate runs of xtask and victory-hle green; fmt and clippy clean; the hook ran on the last two commits in this clone.@HailLucifer666 on GitHub · 2026-11-27 09:37 UTC · original
@Marvisak — the
triage: proposed closelabel is still attached and its 48-hour window ends 2026-11-28 03:24Z (the bot's note was filed 2026-11-26 03:24Z). I cannot remove it: this token has no triage permission, so the ask is yours.All three objections in the triage note are fixed at
fc12c569, and CI is green on that head (run 45827208025, 2m39s):ci.ymlhas oneTests, gatestep.cargo test --no-runbuilds once; the gate executes the built binaries once./keereference is removed from the module doc.@kotekompotek — your LGTM was on
5a83dded; the head isfc12c569if you want a second look before the window closes.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.