Skip to content

gates empty: say whether a passing gate could reach a tree at all - #3058

Merged
gHashTag merged 3 commits into
masterfrom
w52-gates-empty-reads-tree
Sep 3, 2026
Merged

gates empty: say whether a passing gate could reach a tree at all#3058
gHashTag merged 3 commits into
masterfrom
w52-gates-empty-reads-tree

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Closes #3057 · follows #3049

I went through the five

tri gates empty reports 5 invocations that PASSED against a tree with nothing in it. That is a shape, and the command says so. Nobody had gone through them.

gate reads a directory? why it is fine
test_untrusted_javascript_payloads.py no prints Scope: JavaScript source in actions/github-script
test_untrusted_payloads.py no prints Scope: this tests the two shell forms, not the live workflow
gft_backprop_microcode.py no three named self-tests with their own data
pack_index_consistency_gate.py --selftest os.listdir at :164 aimed at its own mkdtemp; ends selftest OK: the gate is falsifiable
check_conflict_markers.py yes prints tracked files read 7741 here, and 0 against an empty tree I built to check

Defects among the five: 0. The discriminator is not did it pass over nothing — it is can this reach a tree, and does it say what it read. The first half is what a command can do, and it was missing.

The column

  PASSED over nothing                      5
    ... the script reads a directory      2   <- a pass here may be about a tree
    ... self-contained                    3   <- a pass says nothing about any tree
    python3 scripts/ci/test_untrusted_javascript_payloads.py   [self-contained]
    python3 scripts/ci/test_untrusted_payloads.py   [self-contained]
    python3 tools/check_conflict_markers.py   [reads a directory]
    python3 tools/gft_backprop_microcode.py   [self-contained]
    python3 tools/pack_index_consistency_gate.py --selftest   [reads a directory]

Markers live in a named constant so the list can be argued with. Two states, plus source not read for a command with no script in it — never false, because a file nobody opened cannot be reported as one that touches nothing.

A third state was tried and removed, and that is the part worth reading

The column printed 2 where my hand pass said 1. The extra is pack_index_consistency_gate.py --selftest, whose os.listdir is aimed at a tempfile.mkdtemp of its own. Both readings are right about different subjects: the file reads a directory, the invocation reads its own.

So I added a third state — reads one and builds one, keyed on mkdtemp/TemporaryDirectory. It captured the selftest. It also captured check_conflict_markers.py, which really does read 7741 tracked files and merely uses a TemporaryDirectory inside its --self-check at line 141.

The new bucket held two members and neither belonged in it, while the count of the category actually worth reading went from 2 to zero. The output looked richer and said less.

A file-level marker cannot answer an invocation-level question. A second heuristic stacked on the first to cover its false positive does not narrow the error, it moves it somewhere with no name. Two states and a stated limitation beat three states and a hidden one — the limitation is a sentence in the doc comment with --selftest named in it, and the removal has its own test so its absence is a decision rather than an omission.

Evidence

mutant result
empty the marker list all 3 tests FAILED (0 passed / 3 failed)
restore the third state exactly its own test FAILED (2 passed / 1 failed)
restored 3 passed / 0 failed

cargo test -p tri --bins545 passed, 0 failed, 0 filtered.

The first attempt at that mutation round was wrong and the guard caught it. It ran under cargo test … reach, which matched sixteen tests in leanreach and modreach and none of mine — the filter is a substring, so the mutant read as surviving. What caught it was expecting 3 and reading 16, which is why every row above is a per-test run with passed + failed = 3 asserted.

Skill §473. The commit before last shipped it as the literal ## 999. placeholder — tri skill renumber lives on an unmerged branch, so this worktree's tri does not have it — and tri skill check passed: 999 is unique and larger than every other number, which is both properties it tests. Fixed in the following commit, and worth knowing that the check cannot see a placeholder.

Closes #3057

`tri gates empty` reported 5 invocations that passed over an empty tree. Going
through them by hand found ZERO defects: three never touch a tree, and the two
that do print their scope or their population -- `Scope: this tests the two
shell forms, not the live workflow`, and `tracked files read 7741` here against
`tracked files read 0` in an empty tree built to check.

The discriminator is not "did it pass over nothing" but "can this reach a tree",
and the output did not say it. One column, decided from the script's source,
with the marker list in a named constant so it can be argued with. Two states,
plus "source not read" for a command with no script in it -- never false,
because a file nobody opened cannot be reported as one that touches nothing.

A THIRD STATE WAS TRIED AND REMOVED, and that is the part worth keeping. "Reads
one and builds one" was meant for pack_index_consistency_gate.py --selftest,
whose os.listdir is aimed at a mkdtemp of its own. It also swallowed
check_conflict_markers.py, which reads 7741 tracked files and merely uses a
TemporaryDirectory inside its --self-check at line 141. The bucket held two
members and neither belonged in it, while the count of the category worth
reading went to zero. A file-level marker cannot answer an invocation-level
question; the limitation is stated in the doc comment with --selftest named in
it, and the removal has its own test so its absence is a decision.

Three mutants. Emptying the marker list kills all three tests. Restoring the
third state kills exactly the test written for it, 2 passed 1 failed. The first
attempt at that round used `cargo test ... reach`, which matched sixteen tests
in leanreach and modreach and none of mine -- the filter is a substring, the
mutant read as surviving, and what caught it was expecting 3 and reading 16.
Refs #3057

`tri skill renumber` is on an unmerged branch, so this worktree's `tri` does not
have it and the previous commit shipped the literal placeholder. `tri skill
check` passed on it: 999 is unique and it is larger than every other number, so
both properties the check tests were satisfied by a number that is obviously
wrong. A placeholder that survives the check is a placeholder that needs the
check to know it is one.
@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:33:18 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 9
PRs with All Checks Green 7
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

PR Dashboard

Generated at: 2026-09-03 21:05:55 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 10
PRs with All Checks Green 6
READY 2
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 6c54ab3 into master Sep 3, 2026
29 checks passed
@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.

gates empty reports 5 gates that passed over nothing; the honest count of defects among them is 0, and the column that says so is missing

1 participant