Skip to content

types redef: a six-class tally printed five, and rustc had said so on every build - #3230

Merged
gHashTag merged 9 commits into
masterfrom
w106-tally-misses-a-class
Sep 5, 2026
Merged

gHashTag merged 9 commits into
masterfrom
w106-tally-misses-a-class

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

The number

tri types redef closes with a sentence that reads as a partition:

5 name(s) whose copies state different NUMBERS; 1 differ in which fields
         they state, 8 in the text of a field, 168 only in prose, 163 identical.
  1. The command printed 346 rows.

The missing row is the only SIGNATURE one, and it is the second-most-severe
class the command has:

specs/file/operations.t27
  SIGNATURE x2  delete    lines 73,112
             fn delete(path: str, startLine: u32, endLine: u32) -> Result<void, FileError> {
             fn delete(path: str) -> Result<void, FileError> {

One delete takes a line range, the other takes a path. The tally is the
sentence a reader carries away, and that is the row it dropped.

The instrument that already knew

rustc had been printing the answer on every build for as long as the line
existed:

warning: variable `signature` is assigned to, but never used
warning: value assigned to `signature` is never read

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

  • signature reaches the summary. 346 rows now tally to 346.
  • A test at the call site. The defect was an omission from an argument list,
    so a test of any counting helper would have passed. This asserts every
    let mut <name> = 0usize; declared before the summary appears in its
    arguments.
  • tri gates warnings -- classifies the crate's warnings into
    DISCARDED / dead / cosmetic / other; --gate exits 1 on the
    discarded-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_only was the only other DISCARDED warning. Every non-Dup arm
    returns, so the match destructures and the dead initializer is gone. That is
    what takes the class to 0 and makes --gate usable.

Verification

check result
types redef rows vs tally 346 vs 346 (was 346 vs 345)
call-site test, argument dropped from format string and args FAILS: ``signature is counted and never printed
call-site test, argument dropped from args only does not compile -- killed by rustc, not by the test
gates warnings --gate, clean tree exit 0, 22 warnings, 0 discarded
gates warnings --gate, planted let mut x = 0usize; x += 1; exit 1, 2 discarded
planted control removed exit 0
cargo test -p tri --bin tri 753 passed, 0 failed

Reported, not fixed

16 dead warnings and 6 cosmetic. One worth naming: mutable_sites in
gates.rs is a test-only helper living in production code -- all eight of its
callers are inside #[cfg(test)].

Refs #3229

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>
@github-actions

github-actions Bot commented Sep 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:20:34 UTC

Summary

Status Count
Total Open PRs 18
PRs with Failing Checks 12
PRs with All Checks Green 6
READY 1
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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 and others added 2 commits September 5, 2026 09:21
…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>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

1 similar comment
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📓 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>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:27:14 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 12
PRs with All Checks Green 5
READY 1
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:30:02 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 11
PRs with All Checks Green 6
READY 1
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:30:17 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 11
PRs with All Checks Green 6
READY 1
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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).

…-class

# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

github-actions Bot commented Sep 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:47:50 UTC

Summary

Status Count
Total Open PRs 18
PRs with Failing Checks 14
PRs with All Checks Green 4
READY 1
FAILING 14
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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).

The gate is right: both PRs this pass shipped without one. check-now-freshness
is a required context and failed on #3230 for exactly this.

Refs #3229

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 02:52:05 UTC

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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).

# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

1 similar comment
@github-actions

github-actions Bot commented Sep 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

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

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f4e7ae386ba != 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 03:37:50 UTC

Summary

Status Count
Total Open PRs 19
PRs with Failing Checks 12
PRs with All Checks Green 7
READY 0
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=2d58d9d3160d != 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 5, 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 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-05 04:03:50 UTC

Summary

Status Count
Total Open PRs 20
PRs with Failing Checks 12
PRs with All Checks Green 8
READY 0
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=2d58d9d3160d != 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 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag
gHashTag merged commit 61fb88d into master Sep 5, 2026
33 of 35 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.

1 participant