CI: a check that did not run must not read as passing #2854

Open
github-bot wants to merge 10 commits from github-bot/gh-2854 into main AGit
Owner

@⁠HailLucifer666 on GitHub · 2026-11-25 22:27 UTC · original
HailLucifer666:chore/xtask-test-gate → main · +2443 −9 · 10 files · 10 commits · open

What

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 tests against test 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 workflows reads 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-commit calls 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.
  • On the tree merged with main (63bcca43): 36 passed; gate exit 0; cargo xtask workflows 1 file ok; cargo xtask policy 193 files ok; cargo clippy -p xtask --all-targets --locked -- -D warnings clean.
  • 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 spawns current_exe().
  • cargo xtask test-gate -p xtask --locked -- no_such_test — exit 1, the run executed no test.
  • A real build error keeps its location: --> xtask\src\workflows.rs:610:26, reproduced by temporarily breaking a source file, restored byte-identical (sha256 checked).
  • The workflow guard goes red on a step indented two columns short of its siblings — the real ci.yml defect — 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

  • Targets run serially (--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.
  • Counts are read only when cargo test exited 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.
  • A test that spawns 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.
  • The workflow check covers what it can see without GitHub's schema: one document, a trigger, jobs that each name runs-on or call another workflow, and steps with exactly one of uses/run. Unknown keys, expression syntax and nonexistent actions are not checked; actionlint is not wired in.

Note on the existing red

main's CI is green. On a machine with a GPU, victory-gpu fails descriptor::host::tests::dynamic_slots_are_held_until_released and memory::tests::lists_share_a_table_and_copies_keep_their_views: both ask for a shader-visible heap of HEAP_VIEWS = 1 << 21 descriptors, and a CBV/SRV/UAV heap is capped at 1,000,000 (PORTABLE_VIEWS in the same module already records that limit), so CreateDescriptorHeap fails 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 with 0xc0000005 (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. The frame wait 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.

**@⁠HailLucifer666** on GitHub · 2026-11-25 22:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854) `HailLucifer666:chore/xtask-test-gate` → `main` · +2443 −9 · 10 files · 10 commits · open ## What 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 tests` against `test 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 workflows` reads 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-commit` calls 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. - On the tree merged with `main` (`63bcca43`): 36 passed; gate exit 0; `cargo xtask workflows` 1 file ok; `cargo xtask policy` 193 files ok; `cargo clippy -p xtask --all-targets --locked -- -D warnings` clean. - `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 spawns `current_exe()`. - `cargo xtask test-gate -p xtask --locked -- no_such_test` — exit 1, `the run executed no test`. - A real build error keeps its location: `--> xtask\src\workflows.rs:610:26`, reproduced by temporarily breaking a source file, restored byte-identical (sha256 checked). - The workflow guard goes red on a step indented two columns short of its siblings — the real `ci.yml` defect — 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 - Targets run serially (`--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. - Counts are read only when `cargo test` exited 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. - A test that spawns `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. - The workflow check covers what it can see without GitHub's schema: one document, a trigger, jobs that each name `runs-on` or call another workflow, and steps with exactly one of `uses`/`run`. Unknown keys, expression syntax and nonexistent actions are not checked; `actionlint` is not wired in. ## Note on the existing red `main`'s CI is green. On a machine with a GPU, `victory-gpu` fails `descriptor::host::tests::dynamic_slots_are_held_until_released` and `memory::tests::lists_share_a_table_and_copies_keep_their_views`: both ask for a shader-visible heap of `HEAP_VIEWS = 1 << 21` descriptors, and a CBV/SRV/UAV heap is capped at 1,000,000 (`PORTABLE_VIEWS` in the same module already records that limit), so `CreateDescriptorHeap` fails 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 with `0xc0000005` (`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. The `frame` wait 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.
A filter that matches no test prints `running 0 tests` and exits 0, which
CI reports as a pass -- the failure mode that makes a green check read as
safety when it is only silence. `cargo xtask test-gate` runs the suite
with --no-fail-fast and cross-checks each binary's announced count against
its own result line: it fails on a zero-test binary, a binary that never
reported, an announced count the report contradicts, a verdict that is not
`ok`, or a run that executed no test at all.

Doc-test binaries are exempt from the per-binary zero check, because a
crate with no doc examples runs no doc tests and a workspace sweep would
otherwise be permanently red; the whole-run check still covers them.

CI gains one step after the existing test run.

Generated with Codebuff
Co-Authored-By: Codebuff <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:15:59 +00:00
Author
Owner

@⁠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 a cargo test run whose filter matched nothing. CI runs cargo test --workspace --locked with no filter, so that case cannot arise there. The added CI step in .github/workflows/ci.yml runs 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's running 0 tests line. The module doc is also a long rationale (repo rule 3) with an unexplained /kee class 14 reference. 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 existing Tests step fails on main too.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 03:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7181692340) <!-- victory-triage v1 head=5a83ddedea8fb73eb9c44165e194d07cceeb579b verdict=proposed-close at=2026-11-26T03:24:30Z --> Automated triage for the maintainers. **Verdict: proposed close.** The new `cargo xtask test-gate` (`xtask/src/gate.rs`) catches a `cargo test` run whose filter matched nothing. CI runs `cargo test --workspace --locked` with no filter, so that case cannot arise there. The added CI step in `.github/workflows/ci.yml` runs 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's `running 0 tests` line. The module doc is also a long rationale (repo rule 3) with an unexplained `/kee class 14` reference. 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 existing `Tests` step fails on `main` too. --- _Generated by [Claude Code](https://claude.ai/code)_
github-bot changed title from xtask: fail the test run when it executed nothing to CI: a check that did not run must not read as passing 2026-11-26 11:11:18 +00:00
ci.yml's new step put its `-` at column five and its `run:` at six, while every
sibling entry in the list starts at column seven. A block sequence is delimited
only by its entries sharing a column, so no reading of the file made that line a
list item, and none made it a key either; the parser refused the file. GitHub
reads workflow files before it creates any job, so a file it cannot read
produces no run at all: the check is absent rather than failing, a pull request
reads as "no checks pending", and the edit was being made to the check that
would have caught it.

The separate `Tests` step goes with it, because `test-gate` runs the same
`cargo test`: the suite is no longer run twice per job.

Restore the columns, and add `cargo xtask workflows`, which parses every file
under .github/workflows/ and asserts the shape a workflow needs: `jobs`, each
job with steps or a call into another workflow, and every step carrying `uses`
or `run`. A parse alone would not have been enough, because a `steps:` block at
the wrong depth is valid YAML that runs nothing. This adds `yaml-rust2` to read
the files; `xtask` is `publish = false`, so nothing ships with it.

Before the fix the new test failed on the real file with "ci.yml: not valid
YAML: ... line 33 column 7". After it, `cargo test -p xtask` is 23 passed, 0
failed and `cargo run --package xtask -- workflows` exits 0. Re-indenting the
step to column five after the fix fails it again at line 35, and restoring it
passes, which is how the guard was shown to be reading the file rather than
passing for its own reasons.
CI cannot report a broken workflow file, because GitHub reads those files before
it creates any job: the run that would carry the check never starts. The only
moment left to catch it is before the commit, so the pre-commit hook now runs
the same check the test suite does, after the asset policy.

Proved on 2026-11-26 by re-indenting a step to column five and running the hook
through git's shell: it exits 1 naming the file and line, and exits 0 once the
columns are restored.
The gate captures `cargo test`'s output and, on a red run, printed only the
names of the failing tests. On CI that made the gate less useful than the plain
`cargo test` it replaces: run 45713337193 reported
`frame::tests::waits_end_on_ticks_and_count_frames ... FAILED` and nothing
else, so there was no way to tell a timing assertion from a real defect without
a local machine that could reproduce it.

Print libtest's `---- <name> stdout ----` blocks too, bounded at 200 lines. A
run that falls over before any test starts has no blocks, and cargo's own
`error` lines already carry that case.

Proved on a real failure: `cargo xtask test-gate -p victory-gpu --lib
dynamic_slots_are_held_until_released` now ends with the panic `assertion
failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS`
at host.rs:2226, where before it printed the test name alone.
THE BUG. gate::parse attached every `test result:` line to the most recent
`running N tests`, so a child process a test spawned took its parent's
counts. `cargo xtask test-gate -p victory-hle` exited 1 on a green run:
`announced 152, accounted 0` and `announced 1, accounted 152`. A caller's
`--` made it worse: the gate appended `--no-fail-fast` after the separator,
libtest refused it, and the run exited 101 without executing anything. A red
run also echoed only stderr lines beginning with `error`, which drops the
`--> file:line` that locates a build error.

WHY NOT HYPOTHETICAL. Reproduced on this machine against both the real
victory-hle stream (the child's 1-test result arrives before the parent's
152-test result) and `-p xtask -- no_such_test`.

THE FIX. Reports nest: a result closes the latest unresolved announcement,
last-in-first-out, and only the outermost reports -- the binaries cargo ran
and named -- are gated. Cargo's flags go before `--`. A failure with no
failed test prints the stderr tail, keeping the diagnostic's location.

SCOPE. The gate still parses stdout rather than asking each binary; nested
reports are counted and printed, not gated. Three probes, each run
2026-11-26, each red for the right reason and restored byte-identical:
last-result assignment -> child test fails; flags after `--` -> ordering
test fails with the swapped argv; empty failure report -> build-error test
fails on the missing `-->`.

AI-assisted; every run above was executed on this machine.
THE BUG. The pre-commit hook ran `cargo xtask workflows` over the worktree.
A workflow staged broken and then fixed on disk committed the broken blob
and passed the hook, because the file it read was the fixed one. The hook
was also recorded as mode 100644, so git on POSIX skips it before it runs.

THE FIX. `workflows --staged` reads each staged blob out of the index, the
way `policy --staged` does, and the hook calls that. `scan` now returns what
it read, so a full scan that finds no workflow is a failure instead of
"every file is fine". The index records 100755.

SCOPE. The check covers only what this file can see without GitHub's schema:
one document, a trigger, jobs each with `runs-on` or `uses`, and steps with
exactly one of `uses`/`run`. Unknown keys, expression syntax and
nonexistent actions are not checked here; actionlint is not wired in. Tests:
the staged-blob case runs against a real temporary git repo, and every shape
rule has its own fixture.

AI-assisted; every run above was executed on this machine.
Author
Owner

@⁠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.

**@⁠kotekompotek** on GitHub · 2026-11-25 22:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#pullrequestreview-6066073811) · **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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 00:17 UTC · original · reviewed

Verified head 5a83dded merged onto origin/main (63bcca43) on Windows 11 x64. Found two reproducible blocking issues (one breaks CI on this workspace as-is):

Blocking Findings

  1. cargo xtask test-gate -p victory-hle --locked deterministically fails on this repo:
    • crates/victory-hle/src/host.rs (loading_a_host_dll_does_not_block_thread_attach) spawns a child current_exe() with inherited stdout, interleaving the child's running 1 test and test result: ok. 1 passed; ... inside the parent binary's test output.
    • gate::parse appends into a flat Vec<Report> and updates reports.last_mut(), splitting the parent report into two mismatched entries. Running cargo xtask test-gate -p victory-hle --locked exits with code 1:
      GATE: (unnamed target): announced 152 test(s), accounted for 0
      GATE: (unnamed target): announced 1 test(s), accounted for 152
      Error: 2 test-gate problem(s) in a run cargo called a success
      
    • Because .github/workflows/ci.yml runs cargo xtask test-gate --workspace --locked, this will fail CI immediately unless either the child test captures its own stdout (.output()) or gate::parse handles nested child-process output.
  2. Passing -- test-harness arguments fails because --no-fail-fast / --jobs 1 are appended after args:
    • Running cargo xtask test-gate -p xtask --locked -- no_such_test_name_xyz forwards --no-fail-fast after -- to libtest and fails with error: Unrecognized option: 'no-fail-fast' (exit 101). Inserting cargo flags before any -- separator in args fixes this.
  3. CI runtime note: .github/workflows/ci.yml keeps the existing cargo test --workspace --locked step and adds cargo xtask test-gate --workspace --locked right after it, running the entire workspace test suite twice (with --jobs 1 on 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, and cargo xtask policy (192 files ok) all pass.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 00:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#pullrequestreview-6066835255) · **reviewed** Verified head `5a83dded` merged onto `origin/main` (`63bcca43`) on Windows 11 x64. Found **two reproducible blocking issues** (one breaks CI on this workspace as-is): ### Blocking Findings 1. **`cargo xtask test-gate -p victory-hle --locked` deterministically fails on this repo**: - `crates/victory-hle/src/host.rs` (`loading_a_host_dll_does_not_block_thread_attach`) spawns a child `current_exe()` with inherited stdout, interleaving the child's `running 1 test` and `test result: ok. 1 passed; ...` inside the parent binary's test output. - `gate::parse` appends into a flat `Vec<Report>` and updates `reports.last_mut()`, splitting the parent report into two mismatched entries. Running `cargo xtask test-gate -p victory-hle --locked` exits with code `1`: ``` GATE: (unnamed target): announced 152 test(s), accounted for 0 GATE: (unnamed target): announced 1 test(s), accounted for 152 Error: 2 test-gate problem(s) in a run cargo called a success ``` - Because `.github/workflows/ci.yml` runs `cargo xtask test-gate --workspace --locked`, this will fail CI immediately unless either the child test captures its own stdout (`.output()`) or `gate::parse` handles nested child-process output. 2. **Passing `--` test-harness arguments fails because `--no-fail-fast` / `--jobs 1` are appended after `args`**: - Running `cargo xtask test-gate -p xtask --locked -- no_such_test_name_xyz` forwards `--no-fail-fast` after `--` to libtest and fails with `error: Unrecognized option: 'no-fail-fast'` (exit `101`). Inserting cargo flags *before* any `--` separator in `args` fixes this. 3. **CI runtime note**: `.github/workflows/ci.yml` keeps the existing `cargo test --workspace --locked` step and adds `cargo xtask test-gate --workspace --locked` right after it, running the entire workspace test suite twice (with `--jobs 1` on 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`, and `cargo xtask policy` (`192 files ok`) all pass.
Author
Owner

@⁠HailLucifer666 on GitHub · 2026-11-26 11:01 UTC · original

Thanks for the review — both blocking findings reproduced on Windows 11 x64 at head 5a83dded before anything changed, and both are fixed at 7878c324.

1. -p victory-hle exited 1, exactly as reported (announced 152, accounted for 0 and announced 1, accounted for 152). The stream shows the mechanism: loading_a_host_dll_does_not_block_thread_attach spawns current_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::parse attached 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+0 tests executed, one nested report counted separately. Regression test: a_child_process_report_keeps_its_parents_counts.

2. -- no_such_test_name_xyz forwarded --no-fail-fast to libtest and exited 101. gate::argv now splits at the first -- and places the gate's flags before it. The same command now reaches libtest and exits 1 with the 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.yml now has one Tests, gate step; the plain Tests step was removed in fa1b61e8.

Also from the triage note: the module doc's /kee reference 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-gpu fails dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views because both request a shader-visible heap of 1 << 21 descriptors against the 1,000,000 cap, so CreateDescriptorHeap fails 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 11:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7190158462) Thanks for the review — both blocking findings reproduced on Windows 11 x64 at head `5a83dded` before anything changed, and both are fixed at `7878c324`. **1. `-p victory-hle` exited 1, exactly as reported** (`announced 152, accounted for 0` and `announced 1, accounted for 152`). The stream shows the mechanism: `loading_a_host_dll_does_not_block_thread_attach` spawns `current_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::parse` attached 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+0` tests executed, one nested report counted separately. Regression test: `a_child_process_report_keeps_its_parents_counts`. **2. `-- no_such_test_name_xyz` forwarded `--no-fail-fast` to libtest and exited 101.** `gate::argv` now splits at the first `--` and places the gate's flags before it. The same command now reaches libtest and exits 1 with `the 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.yml` now has one `Tests, gate` step; the plain `Tests` step was removed in `fa1b61e8`. Also from the triage note: the module doc's `/kee` reference 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-gpu` fails `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views` because both request a shader-visible heap of `1 << 21` descriptors against the 1,000,000 cap, so `CreateDescriptorHeap` fails 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.
An independent preflight review found 13 defects in the checks this branch
adds, one of them the same false green the branch is about.

THE BUG.
- The hook was committed 100644: splitting the commits on a Windows checkout
  reset the index mode, so POSIX clones skip it in silence while the commit
  message and README claimed 100755.
- `on:` null, `on: []`, `on: ''`, `runs-on:` null and `runs-on: []` were all
  accepted: the checks asked whether the key existed, not whether it named an
  event or a runner.
- The staged scan split quoted `git diff --name-only` output, so a workflow
  named `café.yml` was never read and the hook passed.
- When cargo's target names did not pair 1:1 with the reports, the gate wrote
  a note to stdout and exited 0 -- the per-binary check off, still green.
- A caller's `-j/--jobs` was honoured, voiding the serial-output property the
  parser depends on; and CI's `--jobs 1` serialized the whole compile.
- A red run with no failed test printed the last 60 stderr lines, dropping the
  first build error and its `--> file:line`.
- The child's output was buffered, so a hang left no log at all.
- A child that announced and never reported produced a self-contradictory
  "executed no test (4 announced)".

THE FIX.
Reports pair strictly or the gate refuses; `--jobs 1` is forced and a caller
job count is refused; the child is streamed and captured; a red run quotes its
first error blocks; an unclosed announcement is named, and a run whose every
test was ignored fails with its own accurate message. Workflow checks demand a
value that names an event or a runner, accept the group/labels mapping, and
read staged paths NUL-split so nothing is skipped. The hook guards a missing
cargo, `install-hooks` chmods it on Unix, and the index records 100755.

VERIFICATION. 52 xtask tests; 7 mutation probes red for the right reason and
restored byte-identical; strict pairing checked against real runs -- victory-core
(2 binaries), victory-loader (5) and victory-hle (4 plus 1 nested). Four
workflow-hook probes, including a real staged `café.yml`. `cargo test
--workspace --locked --no-run` took 4m38s; CI now builds in parallel and gates
the built binaries. The full workspace gate stays red on three pre-existing
victory-gpu tests (two heap-size assertions, one order-dependent), none in a
file this branch touches.

AI-assisted; every run above was executed on this machine.
THE BUG. CI sets CARGO_TERM_COLOR=always, so cargo writes `Running` and
`Doc-tests` wrapped in ANSI escapes. `targets()` matched the plain word at the
start of the line, found none, and on the first push of the strict pairing rule
refused a green workspace run: "cargo named 0 target(s) but 29 report(s) came
from binaries it ran". Locally cargo writes no color, which is why every local
run paired.

THE FIX. Strip CSI sequences before matching, and trim after stripping:
cargo's indent sits inside the color span. Tests use the exact colored line
shape from run 45819533685, and libtest's own colored lines are covered too.

VERIFICATION. 54 xtask tests; `CARGO_TERM_COLOR=always cargo xtask test-gate
-p xtask` and `-p victory-hle` both exit 0 with every binary named. The strict
pairing rule found this on its first real CI run, which is the job.

AI-assisted; every run above was executed on this machine.
Author
Owner

@⁠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 (check 2m50s).

  1. CRITICAL — hook mode. git ls-tree HEAD .githooks/ now reports 100755, and git diff --summary shows the mode change. The previous push still had 644 because splitting the commits reset the index mode on a Windows checkout; install-hooks now also chmods the hook on Unix.
  2. on: null / [] / '' is refused; the check asks whether the value names an event, not whether the key exists.
  3. runs-on: null / [] is refused; the group/labels mapping is accepted so a valid runner group is not a false red.
  4. The staged scan uses git diff -z and splits on NUL, so a quoted café.yml is read; a path it cannot interpret becomes a problem, not a silent continue. Tested against a real temporary git repo.
  5. A name/report mismatch is a gate failure on stderr with a non-zero exit, not a stdout note beside success.
  6. --jobs 1 is forced and a caller -j/--jobs is refused with the reason. CI now builds in parallel (cargo test --workspace --locked --no-run, 4m38s) and the gate runs the already-built binaries.
  7. failure_report quotes the first error blocks, so --> file:line and the caret survive any amount of stderr after them (tested with E0308 followed by 80 lines).
  8. The child is streamed and captured, so a hang or the 60-minute CI timeout leaves a log instead of nothing.
  9. An announcement that never reports is named — "announced N and never accounted for" — and the zero-executed message no longer contradicts itself. A run whose every test was ignored still fails, with its own accurate message.
  10. The filtered-test fixture now exercises the per-binary rule instead of passing on the whole-run branch.
  11. The hook skips with an explicit stderr line when cargo is absent, and the two overclaiming comments now say "the shape checks this repository can make" and "the only place ci.yml itself can be caught".

One further defect surfaced when the strict pairing rule hit CI for the first time: with CARGO_TERM_COLOR=always, cargo wraps Running and Doc-tests in ANSI escapes, targets() found zero names, and the gate refused a green run (cargo named 0 target(s) but 29 report(s)). Fixed in 8f162ce0 by stripping CSI sequences before matching and trimming after; the regression test uses the exact colored line shape from run 45819533685. 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=always runs of xtask and victory-hle both exit 0 with every binary named. CI run 45820677011 on 8f162ce0 is green. 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](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7192225533) Follow-up: all 13 preflight findings are fixed at `8f162ce0`, and CI is green again (`check` 2m50s). 1. **CRITICAL — hook mode.** `git ls-tree HEAD .githooks/` now reports `100755`, and `git diff --summary` shows the mode change. The previous push still had `644` because splitting the commits reset the index mode on a Windows checkout; `install-hooks` now also chmods the hook on Unix. 2. **`on:` null / `[]` / `''`** is refused; the check asks whether the value names an event, not whether the key exists. 3. **`runs-on:` null / `[]`** is refused; the `group`/`labels` mapping is accepted so a valid runner group is not a false red. 4. **The staged scan** uses `git diff -z` and splits on NUL, so a quoted `café.yml` is read; a path it cannot interpret becomes a problem, not a silent `continue`. Tested against a real temporary git repo. 5. **A name/report mismatch is a gate failure** on stderr with a non-zero exit, not a stdout note beside success. 6. **`--jobs 1` is forced** and a caller `-j/--jobs` is refused with the reason. CI now builds in parallel (`cargo test --workspace --locked --no-run`, 4m38s) and the gate runs the already-built binaries. 7. **`failure_report` quotes the first error blocks**, so `--> file:line` and the caret survive any amount of stderr after them (tested with `E0308` followed by 80 lines). 8. **The child is streamed and captured**, so a hang or the 60-minute CI timeout leaves a log instead of nothing. 9. **An announcement that never reports is named** — "announced N and never accounted for" — and the zero-executed message no longer contradicts itself. A run whose every test was ignored still fails, with its own accurate message. 10. **The filtered-test fixture** now exercises the per-binary rule instead of passing on the whole-run branch. 11. **The hook** skips with an explicit stderr line when cargo is absent, and the two overclaiming comments now say "the shape checks this repository can make" and "the only place `ci.yml` itself can be caught". One further defect surfaced when the strict pairing rule hit CI for the first time: with `CARGO_TERM_COLOR=always`, cargo wraps `Running` and `Doc-tests` in ANSI escapes, `targets()` found zero names, and the gate refused a green run (`cargo named 0 target(s) but 29 report(s)`). Fixed in `8f162ce0` by stripping CSI sequences before matching and trimming after; the regression test uses the exact colored line shape from run `45819533685`. 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=always` runs of xtask and victory-hle both exit 0 with every binary named. CI run `45820677011` on `8f162ce0` is 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.
Author
Owner

@⁠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):

  • A test-less target was a false red. A binary target with no tests reports running 0 tests and 0 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-less bin failed. Report now carries the filtered out count and the rule fires only when tests were actually removed. This would have hit the next crate that adds a test-less binary.
  • Three workflow shapes GitHub refuses were accepted: on: [42], on: [push, {}], and a runs-on mapping with an unknown key or a mis-typed value. 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). Each has its own fixture.
  • Three limits are now documented in the module doc rather than silently accepted: stdout is unauthenticated (a test can print a harness-shaped test result: and forge or close its binary's account; the gate never counts test … ok lines, so only cargo's exit status protects a red run), a harness = false target prints no libtest report and is refused as unattributable, and a narrowed command (--exclude, -p, --lib) is gated as the set it actually ran.
  • The hook is installed in this clone, so the next commit ran it for real: asset policy: 2 files ok / workflows: none staged.

Verification: 57 xtask tests; CARGO_TERM_COLOR=always gate runs of xtask and victory-hle green; the workflow shape fixtures cover the new refusals and the accepted group mapping. CI run 45824858976 on f65301ba passed in 2m51s.

**@⁠HailLucifer666** on GitHub · 2026-11-26 13:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7192818887) One more pass, from an independent QA probe of the new guards (fixed at `f65301ba`, CI green): - **A test-less target was a false red.** A binary target with no tests reports `running 0 tests` and `0 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-less `bin` failed. `Report` now carries the `filtered out` count and the rule fires only when tests were actually removed. This would have hit the next crate that adds a test-less binary. - **Three workflow shapes GitHub refuses were accepted:** `on: [42]`, `on: [push, {}]`, and a `runs-on` mapping with an unknown key or a mis-typed value. 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). Each has its own fixture. - **Three limits are now documented in the module doc rather than silently accepted:** stdout is unauthenticated (a test can print a harness-shaped `test result:` and forge or close its binary's account; the gate never counts `test … ok` lines, so only cargo's exit status protects a red run), a `harness = false` target prints no libtest report and is refused as unattributable, and a narrowed command (`--exclude`, `-p`, `--lib`) is gated as the set it actually ran. - **The hook is installed in this clone**, so the next commit ran it for real: `asset policy: 2 files ok` / `workflows: none staged`. Verification: 57 xtask tests; `CARGO_TERM_COLOR=always` gate runs of xtask and victory-hle green; the workflow shape fixtures cover the new refusals and the accepted group mapping. CI run `45824858976` on `f65301ba` passed in 2m51s.
TEAM REVIEW BLOCKED ON THIS. `failure_report` and `error_excerpt` still
matched `error` against the raw line. CI sets CARGO_TERM_COLOR=always, so a
coloured `error[E0308]` starts with an escape byte, no block was found, and
the excerpt silently fell back to the 60-line tail it replaced -- the same
class as the PR's headline, one function short. Both strip colour first now;
a coloured twin of the long-red-run test pins it.

Also from the same review: a test asserts the hook is 100755 in the committed
tree (`git ls-tree HEAD`), since a Windows checkout cannot show the mode and a
split commit reset it once; `copy` keeps what it captured on a read error
instead of discarding it; an all-filtered run prints one message instead of
one per binary; the streaming test is named for what it proves; a `-j` after
`--` is covered as passing through; and docs/architecture.md names the two new
xtask commands.

SCOPE. The merged tree is evidenced by this PR's own CI run, which GitHub
builds against main's head; a local workspace run stays red on pre-existing
victory-gpu assertions and a victory-shader STATUS_ACCESS_VIOLATION that stops
222 tests, neither in a file this branch touches.

VERIFICATION. 61 xtask tests; CARGO_TERM_COLOR=always gate runs of xtask and
victory-hle green; fmt and clippy clean.

AI-assisted; every run above was executed on this machine.
Author
Owner

@⁠HailLucifer666 on GitHub · 2026-11-26 13:18 UTC · original

Final review pass (build-pr). One blocker, fixed at fc12c569; CI green again (run 45827208025, 2m39s).

  • BLOCKER — the red-run excerpt was colour-blind. failure_report/error_excerpt matched error on the raw line. ci.yml sets CARGO_TERM_COLOR=always workflow-wide, so a coloured error[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.
  • The hook mode now has a regression test. git ls-tree HEAD .githooks/pre-commit must start 100755. A Windows checkout cannot show the mode, and a split commit reset it once already.
  • copy keeps 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 -j after -- is covered as passing through; docs/architecture.md names the two new xtask commands.
  • Merged tree: the pull_request run is GitHub's own merge of this head with main (63bcca43), so run 45827208025 is the merged-tree evidence. A local workspace run stays red on the two heap assertions and a victory-shader STATUS_ACCESS_VIOLATION that stops 222 tests; neither is in a file this branch touches, and both predate it.
  • Not changed: the message of the already-pushed 5a83dded says a "verdict that is not ok"; 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=always gate 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-26 13:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7193172468) Final review pass (build-pr). One blocker, fixed at `fc12c569`; CI green again (run `45827208025`, 2m39s). - **BLOCKER — the red-run excerpt was colour-blind.** `failure_report`/`error_excerpt` matched `error` on the raw line. `ci.yml` sets `CARGO_TERM_COLOR=always` workflow-wide, so a coloured `error[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. - **The hook mode now has a regression test.** `git ls-tree HEAD .githooks/pre-commit` must start `100755`. A Windows checkout cannot show the mode, and a split commit reset it once already. - `copy` keeps 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 `-j` after `--` is covered as passing through; `docs/architecture.md` names the two new xtask commands. - **Merged tree:** the `pull_request` run is GitHub's own merge of this head with `main` (`63bcca43`), so run `45827208025` is the merged-tree evidence. A local workspace run stays red on the two heap assertions and a `victory-shader` `STATUS_ACCESS_VIOLATION` that stops 222 tests; neither is in a file this branch touches, and both predate it. - **Not changed:** the message of the already-pushed `5a83dded` says a "verdict that is not `ok`"; 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=always` gate runs of xtask and victory-hle green; fmt and clippy clean; the hook ran on the last two commits in this clone.
Author
Owner

@⁠HailLucifer666 on GitHub · 2026-11-27 09:37 UTC · original

@⁠Marvisak — the triage: proposed close label 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):

  • The duplicate suite run is gone. ci.yml has one Tests, gate step. cargo test --no-run builds once; the gate executes the built binaries once.
  • The /kee reference is removed from the module doc.
  • The "a filter that matches nothing cannot arise in CI" point stands as written — CI passes no filter. What the gate buys in CI is the accounting: a binary that announced N and reported fewer, a test-less target, an all-ignored run. Separately, the workflow guard is the only check that can catch a workflow file GitHub refuses to load, because that failure produces no run at all.

@⁠kotekompotek — your LGTM was on 5a83dded; the head is fc12c569 if you want a second look before the window closes.

**@⁠HailLucifer666** on GitHub · 2026-11-27 09:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2854#issuecomment-7214900538) @⁠Marvisak — the `triage: proposed close` label 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): - **The duplicate suite run is gone.** `ci.yml` has one `Tests, gate` step. `cargo test --no-run` builds once; the gate executes the built binaries once. - **The `/kee` reference is removed** from the module doc. - **The "a filter that matches nothing cannot arise in CI" point stands as written** — CI passes no filter. What the gate buys in CI is the accounting: a binary that announced N and reported fewer, a test-less target, an all-ignored run. Separately, the workflow guard is the only check that can catch a workflow file GitHub refuses to load, because that failure produces no run at all. @⁠kotekompotek — your LGTM was on `5a83dded`; the head is `fc12c569` if you want a second look before the window closes.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2854/head:github-bot/gh-2854'
git switch 'github-bot/gh-2854'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2854'
git switch 'github-bot/gh-2854'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2854'
git switch 'github-bot/gh-2854'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2854'
git switch 'main'
git merge --squash 'github-bot/gh-2854'
git switch 'main'
git merge --ff-only 'github-bot/gh-2854'
git switch 'main'
git merge 'github-bot/gh-2854'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2854
No description provided.