Skip to content

rings_matrix: an empty matrix is not a clean build - #3070

Merged
gHashTag merged 1 commit into
masterfrom
w58-rings-matrix-refuses-empty
Sep 3, 2026
Merged

rings_matrix: an empty matrix is not a clean build#3070
gHashTag merged 1 commit into
masterfrom
w58-rings-matrix-refuses-empty

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Closes #3069

A crate rename made this workflow compile nothing and report success

discover() drops a directory unless the name starts ring-, ends -rust, and holds a Cargo.toml. Any of the three is one rename away.

  build:
    needs: discover
    if: needs.discover.outputs.count != '0'     # <- skipped when the matrix is empty

A skipped job is green. discover printed Discovered 0 ring-*-rust crate(s). and succeeded, and the run concluded success having compiled nothing.

The trigger is the same commit. paths: rings/ring-*-rust/** — the rename touches paths under the old name, matches the filter, runs the workflow, and collects a green tick for it.

It has been here before

From the workflow's own header:

Between 2026-05-23 and 2026-08-20 seven master runs had all 17 crate jobs failing; every one concluded success … COMPILE_STATUS.md, calling itself "honest, living", said they compile.

Closed per job — each matrix job writes its own verdict row now. This is the same door one step earlier: with zero jobs there are no verdict rows to write.

After

tree result
today's 17 crates matrix emitted, exit 0, Discovered 17 ring-*-rust crate(s).
crates renamed off -rust rings_matrix: REFUSED …, exit 2, step aborts
a ring directory with no Cargo.toml exit 2
no rings/ at all exit 2

Verified under GitHub's own shell flags — bash --noprofile --norc -eo pipefail — that MATRIX="$(python3 scripts/ci/rings_matrix.py)" aborts the step on a non-zero exit, so discover goes red rather than the build going green-by-skip.

The control caught a false pass

Worth more than the fix. The first harness emptied $GITHUB_OUTPUT instead of pointing it at a file, so all three defect arms died on line 2's redirect to "" rather than on line 1's exit 2 — and all three "passed". The control asserting success on a real tree is what found it.

Each defect arm now also asserts that rings_matrix: REFUSED is what stopped the step, so an arm cannot pass on any failure at all.

mutant assertions failed
remove the refusal (the original) 12
refuse always 4 — every one of them a control
refuse but exit 0 3
restored 0

The step body is extracted from the workflow, not restated, so a YAML change that stops the failure propagating is caught; the extraction is itself asserted.

Exit 2, and a note on the convention

Nothing failed to compile — the population was never built. t27c corpus refuses a spec tree with no specs the same way (#3025), and scripts/tri uses 2 for an unbuilt compiler (#3045).

Prior art, checked rather than assumed: pytest reserves exit code 5 for "No tests were collected", a public-API outcome distinct from 1 (tests failed), 2 (interrupted), 3 (internal error) and 4 (usage error). So this repository's 2-for-everything is coarser than the field's by one distinction — "the instrument is missing" and "the population is empty" share a code here and have different codes there. Recorded rather than churned; changing it is a decision for the repository, not a side effect of this fix.

Closes #3069

discover() drops a directory unless the name starts `ring-`, ends `-rust`, and
holds a Cargo.toml. Any of the three is one rename away. With the matrix empty
the build job is skipped -- `if: needs.discover.outputs.count != '0'` -- and a
SKIPPED job is green, so the run concluded success having compiled nothing.

The trigger is the same commit. rings-rust.yml filters on
`rings/ring-*-rust/**`, so the rename touches paths under the old name, matches
the filter, RUNS the workflow, and collects a green tick for it.

The script now refuses an empty population and exits 2, naming what it looked
for and where. Verified under GitHub's own shell flags (bash --noprofile --norc
-eo pipefail) that `MATRIX="$(python3 scripts/ci/rings_matrix.py)"` aborts the
step on a non-zero exit, so `discover` goes red instead of the build going
green-by-skip. Today the population is 17 and unchanged.

This file has been here before, and its workflow header says so: seven master
runs between 2026-05-23 and 2026-08-20 had all 17 crate jobs failing and every
one concluded `success`. That was closed per job -- each matrix job writes its
own verdict row now. This is the same door one step earlier: with zero jobs
there are no verdict rows to write.

THE CONTROL CAUGHT A FALSE PASS, which is the part worth reading. The first
harness emptied $GITHUB_OUTPUT instead of pointing it at a file, so all three
defect arms failed on line 2's redirect to "" rather than on line 1's exit 2 --
and all three "passed". The control that asserts SUCCESS on a real tree is what
found it. Each defect arm now also asserts that `rings_matrix: REFUSED` is what
stopped the step, so an arm cannot pass on any failure at all.

Three mutants: removing the refusal fails 12 assertions, refusing always fails
the 4 control assertions, refusing but exiting 0 fails 3.

Exit 2 rather than 1: nothing failed to compile, the population was never
built. Prior art checked rather than assumed -- pytest reserves exit code 5 for
"No tests were collected" as a public-API outcome distinct from 1, 2, 3 and 4,
which makes this repository's 2-for-everything coarser than the field's by one
distinction. Recorded, not churned.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 22:29:36 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 9
PRs with All Checks Green 4
READY 0
FAILING 9
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A crate rename makes rings-rust compile nothing and report success: an empty matrix skips the build, and skipped is green

1 participant