types redef: a six-class tally printed five, and rustc had said so on every build - #3230
Conversation
The closing sentence of `tri types redef` reads as a partition of the names it just listed. It summed to 345 for 346 rows. The row it dropped was the only SIGNATURE one: two definitions of `delete` in specs/file/operations.t27 whose parameter lists disagree -- one takes a line range, one takes a path. `signature` was incremented in the match and left out of the println argument list. rustc had printed `value assigned to `signature` is never read` on every build for as long as the line existed. The defect is an omission from an ARGUMENT LIST, so a test of any counting helper would have passed. The test added here reads the call site: every `let mut <name> = 0usize;` declared before the summary must appear in its arguments. Dropping `signature` from the arguments alone does not compile and is killed by rustc rather than by the test; dropping it from both the format string and the arguments compiles and fails the test by name. Also adds `tri gates warnings`, which classifies the crate's own warnings into DISCARDED / dead / cosmetic / other and, with --gate, exits 1 on the discarded-computation class. It touches the crate root first: a cached unit emits no warnings, so a report against a warm target directory reads clean regardless of what the code says. `defs_only` in the same file was the only other DISCARDED warning. Every non-Dup arm returns, so the match now destructures and the dead initializer is gone -- which is what takes the class to 0 and makes --gate usable. Control: planting `let mut x = 0usize; x += 1;` takes `gates warnings --gate` from exit 0 to exit 1, and removing it returns to 0. Refs #3229 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
…aying Records the T106 pass. The bug is small; the shape is not. A detector was written for "a guard checked for reachability rather than correctness" and narrowed 69 candidates to 16 by requiring the variable be READ by a control-flow test -- which is exactly why it could not find the defect, whose whole nature is the absence of any read. rustc had been printing it on every build. The output was discarded because 23 warnings of mostly-cosmetic noise is not worth reading, which is how the one that mattered stayed invisible. Three rules: ask what the toolchain already reports before writing a detector; classify warnings rather than silencing them, because "computed and never read" is a different claim from "nothing calls this"; and force the work, because a cached compilation unit emits no warnings at all and reads clean regardless of the code. Refs #3229 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both numbers in the new section were counted by eye off a scrolled terminal. `tri gates warnings` classifies 16 dead, 6 cosmetic, 0 discarded, 0 other, summing to the 22 its headline reports. The same wrong pair went into #3229 and the #3230 description and is corrected there too. Refs #3229 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
📓 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. |
`cargo check -p tri` also checks the workspace crates tri depends on and replays their cached warnings, so the total is not one crate's. The headline read "22 warning(s)" with no population, which is read as belonging to the crate named in the command -- the same defect this command exists to catch, shipped in the command itself. Now: "22 warning(s) across 2 crate(s) [cli/dlc10 2, cli/tri 20]". Checked for cache-dependence first, since a report whose population varies with the state of target/ is worse than no report: three consecutive runs gave 22 with the same 2 dlc10 rows, so replayed dependency warnings are stable. Refs #3229 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PR DashboardGenerated at: 2026-09-05 02:27:14 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-09-05 02:30:02 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-09-05 02:30:17 UTC
Summary
Seal Status
|
…-class # Conflicts: # .claude/skills/ci-gates/SKILL.md
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
PR DashboardGenerated at: 2026-09-05 02:47:50 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-09-05 02:52:05 UTC
Summary
Seal Status
|
# Conflicts: # .claude/skills/ci-gates/SKILL.md
|
📓 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-09-05 03:09:09 UTC
Summary
Seal Status
|
# Conflicts: # .claude/skills/ci-gates/SKILL.md
PR DashboardGenerated at: 2026-09-05 03:37:50 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-09-05 04:03:50 UTC
Summary
Seal Status
|
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
The number
tri types redefcloses with a sentence that reads as a partition:The missing row is the only
SIGNATUREone, and it is the second-most-severeclass the command has:
One
deletetakes a line range, the other takes a path. The tally is thesentence a reader carries away, and that is the row it dropped.
The instrument that already knew
rustchad been printing the answer on every build for as long as the lineexisted:
This pass began by writing a detector for a neighbouring shape -- a guard
checked for reachability rather than correctness. That detector could not have
found this one: it requires the variable be READ by a control-flow test, and
the defect here is the absence of any read at all. The instrument that answers
"nothing reads this" ships with the compiler, and every build in this session
piped its output to
/dev/null.Changes
signaturereaches the summary. 346 rows now tally to 346.so a test of any counting helper would have passed. This asserts every
let mut <name> = 0usize;declared before the summary appears in itsarguments.
tri gates warnings-- classifies the crate's warnings intoDISCARDED/dead/cosmetic/other;--gateexits 1 on thediscarded-computation class. It touches the crate root before checking,
because a cached unit emits no warnings and would read clean regardless of
the code.
defs_onlywas the only otherDISCARDEDwarning. Every non-Duparmreturns, so the match destructures and the dead initializer is gone. That is
what takes the class to 0 and makes
--gateusable.Verification
types redefrows vs tallyis counted and never printedgates warnings --gate, clean treegates warnings --gate, plantedlet mut x = 0usize; x += 1;cargo test -p tri --bin triReported, not fixed
16
deadwarnings and 6cosmetic. One worth naming:mutable_sitesingates.rsis a test-only helper living in production code -- all eight of itscallers are inside
#[cfg(test)].Refs #3229