Conversation
`d64607130` ("[GOLD-RING] parser: the Zig subset lexer.t27 needed", a change to `bootstrap/src/compiler.rs`) removed three lines from `cli/tri/src/main.rs` in one hunk: the `mod` declaration, the `Elab` variant and the dispatch arm. The 319-line file stayed. Since then: $ tri elab classify error: unrecognized subcommand 'elab' Nothing said so. `cargo build` cannot fail on a file it does not compile, and the test suite went 358 -> 354 without a gate that reads the number. Four tests left the suite in silence. `tools/check_elab_ratchet.py` still instructs its reader to run this command, in its docstring and in its failure output, and two NOW documents describe it as working. `tri elab` was written because that same script once counted iverilog's per-file summary line `N error(s) during elaboration.` as a diagnostic -- 25 phantoms in a reported 186, quoted onward before anyone read the rows. Restored, it reads: real diagnostics: 176 summary lines NOT counted: 28 Nothing else changes: the file is untouched, and its four tests pass as written. Closes 2900
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
The general form of the defect in the same commit. Rust compiles a file only if
a `mod` declaration leads to it from the crate root; a file nothing declares is
not unused, it is a file the compiler never opens. It cannot warn, cannot fail
to build, and its `#[test]` functions do not exist for `cargo test`.
bootstrap 97 files under src/, 90 compiled, 7 orphaned
bootstrap/src/_enrich/mod.rs 441 lines
bootstrap/src/math_pslq.rs 589 lines
bootstrap/src/neural/attention.rs 4 lines
bootstrap/src/neural/hslm.rs 4 lines
bootstrap/src/runtime_minimal.rs 19 lines
bootstrap/src/runtime_minimal_test.rs 18 lines
bootstrap/src/tooling.rs 409 lines
cli/tri 33 files under src/, 33 compiled, 0 orphaned
Historical control: the same binary run against origin/master, where `mod elab;`
is still missing, prints
cli/tri 32 files under src/, 31 compiled, 1 orphaned
cli/tri/src/elab.rs 319 lines 4 #[test] that cargo cannot see
It fires on the defect and is silent after the fix in the parent commit.
Resolution follows the language rather than a heuristic. `mod c;` in `a/b.rs`
means `a/b/c.rs` or `a/b/c/mod.rs`, never `a/c.rs`; `#[path]` and `include!` are
edges; inline `mod c { }` needs no file. The loose rule -- is this stem named by
any `mod` anywhere -- hides a real orphan behind a same-named module in an
unrelated directory, and its mutation fails the first test here.
`reached` counts files outside `src/` too, because `#[path = "../../gen/..."]`
is a real edge, so the report does not subtract the two and call the difference
orphans; it prints the two comparable sets and says where the rest went.
Refs #2900
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
PR DashboardGenerated at: 2026-08-29 22:22:29 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-08-29 22:26:15 UTC
Summary
Seal Status
|
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
PR DashboardGenerated at: 2026-08-29 22:33:02 UTC
Summary
Seal Status
|
The gate that would have caught #2427. $ tri mods orphan --gate # at origin/master ::error::cli/tri: orphaned rose 0 -> 1. A file left the build and nothing else would have said so. exit 1 $ tri mods orphan --gate # after the fix in this branch ORPHAN CEILING: CLEAN exit 0 Exact match in both directions, following MAX_SORRY: a count above its ceiling is a regression, and a count below it is slack the next orphan can hide in. Both were exercised -- a planted file in cli/tri/src exits 1, and a ceiling raised to 3 against an actual 0 exits 1 with the instruction to lower it. `--self-check` is the negative control. It builds a two-file crate in a temp directory, one declared and one not, and exits non-zero unless exactly the undeclared file comes back -- so a green run from this gate means the walk was working, not that it was skipped. The workflow carries NO `paths:` filter, and the comment says why: the change that strands a file is a change to the crate ROOT, not to the file that goes missing. A filter on the stranded path is silent for exactly this defect. bootstrap's 7 orphans are recorded, not repaired. `tooling.rs` alone holds 7 gate bodies (#2905), and connecting any of them is a decision about what goes red rather than a repair. The ledger says so in the file, beside the number. Refs #2900 Refs #2905
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
1 similar comment
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
PR DashboardGenerated at: 2026-08-29 22:33:43 UTC
Summary
Seal Status
|
|
Superseded by a clean-history branch: the first commit here said |
tri elabreportsunrecognized subcommand. Its 319-line implementation is inthe tree; nothing declares it.
d64607130(#2427, a Zig-lexer change tobootstrap/src/compiler.rs) removedthree lines from
main.rsin a single hunk —mod elab;, theElabvariant,the dispatch arm — and left the file. This restores exactly those three lines.
What nothing printed
cargo buildcargo testsrc/Four tests left the suite without a line of output. The count went down
silently, which is #2895 in another language: nothing here prints what a build
skipped.
Why this command in particular
tri elabexists becausetools/check_elab_ratchet.pycounted every stderr linecontaining
" error", and iverilog closes each failing file withN error(s) during elaboration.— a total, which matched. 25 phantoms in a reported 186,and the number reached commit messages, an issue comment and a status page.
That script still points at the command it lost:
After
elab.rsis not modified. Its four tests pass as written.Closes #2900