Skip to content

locate answers only for parse failures, and says what the item reproduces - #2892

Merged
gHashTag merged 2 commits into
masterfrom
locate-by-stage
Aug 29, 2026
Merged

locate answers only for parse failures, and says what the item reproduces#2892
gHashTag merged 2 commits into
masterfrom
locate-by-stage

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

I set out to fix the 45 items tri unparsed locate had found — the option I had
called "work without research". Probing the first family killed it:

item in isolation
t *= 2.0; compiles
fn a(x: float) compiles
fn a(x: f32) -> f32 compiles

The queued work was not work.

The cause: a fix that did not travel

Last pass report learned to split lex / parse / typecheck / semantic stages.
locate — one function away, in the same file — did not. Eight of its forty
answers were typecheck failures
, where "the item whose presence causes the
failure" is a category error. A type error already names its line and its
reason (cannot assign F64 to F32); a bisection has nothing to add.

  located AND causally confirmed   37
  ... the item ALONE reproduces    37   <- a minimal case, not a coordinate
  candidate REFUTED by causality   37
  nothing claimed                   9

  not a PARSE failure, so not this command's question:
        10  typecheck   (the error already names its line AND reason)
         4  lex         (unterminated string)

37 + 37 + 9 + 10 + 4 = 97.

The second line is the point

Whether a located item reproduces on its own — wrapped in a bare
module m { } — is the difference between "here is your bug in four lines" and
"here is roughly where it starts". I checked all 37 by hand. That number would
have gone into a report as prose; it is now computed every run, and any answer
that fails the check prints (only in context) beside it.

What the answers look like

specs/account/repo.t27:12          struct AccountID(str);
specs/numeric/bigint.t27:50        pub fn zero() -> TVCBigInt;
specs/ar/ternary_logic.t27:7       type Trit = Trit
specs/interop/gf_cross_language.t27:7   import math::constants;
compiler/cli/git.t27:11..126       pub fn git_commit(...)

Each of these, alone in a module, fails — so each is a runnable reproducer, not
a coordinate.

Gates, run locally

specs generate 0 · specs parse 0 · conflict markers 0 · seals fresh 0 ·
types ratchet 0 · skill check 0 · unparsed probe 0 · unparsed locate 0 ·
cargo test -p tri 0 (22 tests in unparsed.rs) ·
rustfmt --check cli/tri/src/unparsed.rs 0.

bootstrap/src/compiler.rs is untouched, so FROZEN_HASH does not move.

Refs #2864

…uces

I set out to fix the 45 items `tri unparsed locate` had found -- "work without
research". Probing the first family killed it: `t *= 2.0;`, `float` parameters
and `f32` returns all COMPILE in isolation. The queued work was not work.

The cause is a fix that did not travel. Last pass `report` learned to split
lex / parse / typecheck / semantic stages; `locate`, one function away in the
same file, did not. Eight of its forty answers were TYPECHECK failures, where
"the item whose presence causes the failure" is a category error -- a type
error already names its line AND its reason (`cannot assign F64 to F32`), so a
bisection has nothing to add.

  located AND causally confirmed   37
  ... the item ALONE reproduces    37   <- a minimal case, not a coordinate
  candidate REFUTED by causality   37
  nothing claimed                   9
  not a parse failure              10 typecheck + 4 lex

  37 + 37 + 9 + 10 + 4 = 97

The second line is new and is the point. Whether a located item reproduces on
its own -- wrapped in a bare `module m { }` -- is the difference between a
minimal case and a coordinate. I checked all 37 by hand; now the command checks
them every run, and prints `(only in context)` beside any that does not.

`bootstrap/src/compiler.rs` untouched; FROZEN_HASH does not move.

Refs #2864

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 21:52:59 UTC

Summary

Status Count
Total Open PRs 8
PRs with Failing Checks 7
PRs with All Checks Green 1
READY 0
FAILING 7
PENDING 0

Seal Status

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

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 3abbe94 into master Aug 29, 2026
26 of 27 checks passed
gHashTag added a commit that referenced this pull request Aug 29, 2026
* Remove emitter_xdc from the corpus ledger; it passes now

The corpus ratchet has been red on master for at least three consecutive runs
and the reason is mine. #2897 fixed the string-literal inference bug and
`specs/pins/emitter_xdc.t27` began to typecheck. I updated
`tools/specs_generate_baseline.txt` and did not know about
`docs/reports/suite_expectations.json`, which still listed the spec as
expected-to-fail.

An UNEXPECTED PASS is a ratchet failure by design: docs/CORPUS-RATCHET.md says
"you fixed something. Remove the entry and lower max_entries".

  entries      151 -> 150
  max_entries  151 -> 150      (down, the only direction the cap may move)
  RATCHET: CLEAN

Control both ways: with the entry restored the ratchet reports
`UNEXPECTED PASSES: 1` and exits 1; without it, exit 0.

This is #2892's lesson one level up. That day I found a fix that had not
travelled from one command to its neighbour; here it did not travel from one
LEDGER to its sibling. When a repair makes a spec pass, grep every file that
names the spec -- not only the ledger you happen to know.

Refs #2864

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

* skill: the second ledger

Refs #2864

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants