Skip to content

harness scratch: name the population, and refuse a verdict over zero files - #3060

Merged
gHashTag merged 2 commits into
masterfrom
w53-scratch-names-its-population
Sep 3, 2026
Merged

harness scratch: name the population, and refuse a verdict over zero files#3060
gHashTag merged 2 commits into
masterfrom
w53-scratch-names-its-population

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Closes #3059

Measured

A tree holding only .trinity/:

$ tri harness scratch --gate

  test binaries whose tests share one scratch directory

      none

$ echo $?
0

Green, and it read nothing. scan() builds the two directory paths, calls dirs.retain(|d| d.is_dir()), and an empty list produces an empty result — which prints identically to a clean 85-file scan. .github/workflows/harness-scratch.yml:79 runs this as --gate, so its pass survived its subject going missing: the class #3025 named, one layer up in Rust rather than in a workflow step.

After

real repo test files read 85, directory NOT THERE cli/tri/tests, none, exit 0
hollow tree test files read 0, both directories named, REFUSED … Exit code 2
--self-check unchanged, exit 0

Exit 2, not 1: nothing failed, the check could not run. Same code scripts/tri uses for an unbuilt compiler (#3045, merged) and t27c corpus for a spec tree with nothing in it (#3025, in #3040).

No behaviour change in CI. bootstrap/tests exists there, so the population is 85 and the gate stays green. The refusal is reachable only on a tree where the gate could not have meant anything.

What the column surfaced on its first run

cli/tri/tests has never existedgit log --oneline --all -1 -- cli/tri/tests prints nothing, and ls cli/tri/ is Cargo.toml skip-baseline.txt skipwatch.py src. Half the declared population has always been absent, and until this column nothing said so. That is not a defect by itself; a scan that names two directories and silently reads one is a scan whose population is smaller than its code claims.

Evidence

mutant result
refuses() always false 1 passed / 2 failed
count every directory entry, not just .rs 2 passed / 1 failed
report no missing directories 0 passed / 3 failed
restored 3 passed / 0 failed

cargo test -p tri --bins545 passed, 0 failed, 0 filtered. Each mutant row asserts passed + failed == 3, because a cargo test filter is a substring and a run that matched nothing reads as a survival.

refuses() is a named function with its own test rather than a line inside run. An untested branch in an integration path is exactly where a mutation of this shape survives — one did in tri skill renumber (#3052) hours earlier, and that is the reason for the shape here.

Also checked, not fixed

tri mods orphan --gate on the same hollow tree exits 1 with Error: No such file or directory (os error 2). It refuses rather than passing, which is the right direction, but the message names no path.

…files

Closes #3059

On a tree holding only .trinity/ -- no bootstrap/tests, no cli/tri/tests --
`tri harness scratch --gate` printed `none` and exited 0. It read nothing.
`scan()` builds two directory paths, drops the ones that are not directories,
and an empty list produces an empty result, which prints identically to a clean
85-file scan. harness-scratch.yml runs that gate, so its pass survived its
subject going missing.

It now prints what it read, names every declared directory that is not there,
and refuses an empty population with exit 2: nothing failed, the check could
not run. Same code scripts/tri uses for an unbuilt compiler (#3045) and t27c
corpus for a spec tree with nothing in it (#3025).

No behaviour change in CI: bootstrap/tests exists there, the population is 85,
the gate stays green. The refusal is reachable only on a tree where the gate
could not have meant anything.

The same column surfaced a second thing: cli/tri/tests has NEVER existed --
`git log --all -- cli/tri/tests` is empty. Half the declared population has
always been absent and nothing said so.

`refuses()` is a named function with its own test rather than a line inside
`run`, because an untested branch in an integration path is exactly where a
mutation of this shape survives -- one did in `tri skill renumber`, hours
before this. Three mutants, three kills, each with passed+failed asserted
against the expected 3.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 20:43:11 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 10
PRs with All Checks Green 7
READY 0
FAILING 10
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).

@gHashTag
gHashTag enabled auto-merge (squash) September 3, 2026 20:44
Refs #3059

#3050 landed `advice_tests` at the tail of this file while this branch was
appending `population_tests` there. Both kept. The first resolution dropped the
closing brace of the incoming module -- the compiler said so immediately
('unclosed delimiter', naming line 332), which is the cheapest reader there is
for this kind of merge.

And a stale reading in the same minute: `tri harness scratch --gate` reported
rc=0 while the build was failing, because the binary on disk was the previous
one. An exit code from a tool that did not just build is not a reading of the
code you are holding.
@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.

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

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-03 20:51:56 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 10
PRs with All Checks Green 7
READY 1
FAILING 10
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).

@gHashTag
gHashTag merged commit 04a4a43 into master Sep 3, 2026
34 checks passed
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.

tri harness scratch --gate prints none and exits 0 over ZERO test files, and has always looked for a directory that never existed

1 participant