A census that proves its own categories - #2885
Merged
Merged
Conversation
`tri unparsed` names the construct that stops the compiler on each unreadable
spec. Every row is a claim, and the claims can be false in a way no amount of
reading catches: SIX constructs read off real failing lines -- plausible, every
one -- compile in isolation.
@Trim("x", "y") builtin call ACCEPTED
.anthropic enum literal ACCEPTED
if (c) { 1 } else { 2 } if-expression ACCEPTED
*Foo &Foo pointer / reference ACCEPTED
[]const u8 const-qualified slice ACCEPTED
for (s) |v| { } capture in a for-loop ACCEPTED
An earlier fan-out had named `[]const u8` as a cause. A queue repeating it
sends someone to implement what is already there.
So every construct now carries a PROBE -- a minimal source the compiler must
reject for the row to be named -- and the census is self-invalidating: when a
construct gains support its probe passes and the row leaves with no list to
edit. It did that twice in this run, for `module a::b` and `pub module N;`.
The probe checks one direction only. `is_use` fired on every `use` line while
plain `use a::b;` compiles and only `use a::b as C;` does not -- and the probe
WAS the aliased form, so it passed while the matcher stayed wrong. Hence a
COUNTER per construct: a near-identical source the compiler ACCEPTS, on which
the matcher must stay silent. `no_matcher_fires_on_its_counter` holds it, and
`tri unparsed probe` fails if a counter stops compiling, because that means the
boundary moved rather than the compiler.
Counters found the real boundaries: `1 as u32` compiles and `1 as float` does
not, so the defect is the TARGET type; `fn a(k: Result<T, E>)` compiles and
`fn a<T>(k: T)` does not, so it is parameters on the FUNCTION; `[T]` compiles
and `[K: V]` does not.
Third state: refused ON PURPOSE. Casts to non-primitive types are a documented
position -- no backend lowers float arithmetic, argued beside VALID_CAST_TYPES
-- not a gap. Three specs moved out of the work queue into a section carrying
the citation. The error text does not distinguish the two; I tried, and the
deliberate refusal still prints "parse error". The marking is manual and says
so.
Also: `pub module N;` parses. `pub` is a modifier the declaration parser
already reads for fn/struct/const and a module was the one place it was not.
Specs gained: ZERO. The single file carrying it advanced from line 4 to line 21
and stopped on `**`. Seal drift is 537 on this branch and 537 on master, so no
generated output moved at all.
FROZEN_HASH updated in the same commit, per M5.
Refs #2864
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 29, 2026 21:02
# Conflicts: # bootstrap/stage0/FROZEN_HASH
Contributor
PR DashboardGenerated at: 2026-08-29 21:04:47 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tri unparsednames the construct that stops the compiler on each unreadablespec. Every row is a claim, and the claims can be false in a way no amount
of reading catches. Six constructs read off real failing lines — plausible,
every one — compile in isolation:
An earlier multi-agent fan-out named
[]const u8as a cause. A queue repeatingit sends someone to implement a feature that already exists.
Probe
Every construct now carries a minimal source the compiler must reject for
the row to be named. The census is self-invalidating — when a construct gains
support its probe passes and the row leaves the queue with no list to edit. It
did that twice in this run, for
module a::b(#2882) andpub module N;(this PR).
Counter
The probe checks one direction only.
is_usefired on every line starting withuse— but plainuse a::b;andusing a::b;both compile, and onlyuse a::b as C;fails. The probe was the aliased form, so it passed whilethe matcher was wrong.
So each construct also carries a counter: a near-identical source the
compiler accepts, on which the matcher must stay silent.
Counters located the real boundaries:
1 as u321 as floatfn a(k: Result<T, E>)fn a<T>(k: T)[T][K: V]for (s) |v| { }if (o) |v| ..use a::b;use a::b as C;tri unparsed probefails if a counter stops compiling — that means theboundary moved, not the compiler.
Refused on purpose — a third state
x as floatis rejected, and it is not a gap:VALID_CAST_TYPEScarries awritten argument that no backend lowers float arithmetic and that the C
generator would emit
f32verbatim, which is not a C type. Three specs sat inthe work queue proposing that someone undo that decision.
They now print in their own section with the citation. The error text does not
distinguish the two — I tried; the deliberate refusal still prints
parse error ... unknown cast target. The marking is manual and the docs sayso: an unmarked row is not proof it is a gap, only that nobody has looked.
The census now
43 + 18 + 32 + 4 = 97. The parts sum to the total.
The compiler change, and what it did not gain
pub module N;parses now —pubis a modifier the declaration parser alreadyreads for
fn/struct/const, and a module was the one declaration where itwas not accepted.
Specs gained: zero. The single file carrying the construct
(
test_highlight.t27) advanced from line 4 to line 21 and stopped on**. Sealdrift is 537 on this branch and 537 on master — no generated output moved at
all. Saying that plainly rather than reaching for "an obstacle removed".
Controls
pub module test;module test;(pre-existing)pub const X = 1;(pre-existing)pub module a::b { }14 unit tests in
unparsed.rs.Gates, run locally
specs generate 0 · specs parse 0 · conflict markers 0 · seal coverage
--self-check0 · seals fresh 0 · types ratchet 0 · skill check 0 ·prose report 0 · unparsed probe 0 ·
cargo test -p tri0 · bootstrap ratchet 0 ·rustfmt --check cli/tri/src/unparsed.rs0.Refs #2864