Four controls before one answer: locating the cause above the reported line - #2889
Merged
Conversation
…d line
When the compiler names a line that is a construct it ACCEPTS, the cause is
earlier. `tri unparsed locate` finds it: feed growing prefixes of the module
body back to the compiler and binary-search the first prefix that fails.
located AND causally confirmed 45
candidate REFUTED by causality 41
nothing claimed 11
Prefix bisection is unsound on its own -- a truncated prefix can fail for a
reason the whole file does not have, because later declarations the tail refers
to are simply absent. The 41 refuted are that, and reporting them is the point.
THE CONTROLS, and what each failed to catch.
Fidelity: `head + body + tail` must reproduce the original failure on the same
line. Passed 46 of 46 while the answer was wrong for 16. Of course it did --
the concatenation is the whole file whatever the boundaries are. A control on
the output cannot validate a decision internal to the pipeline.
Causality, three attempts:
1. "the error moved PAST the item" -- for an item at line 5 and an error at
2215 that is true by arithmetic. Passed 45 of 45.
2. "the error line CHANGED" -- credited commenting out a block-comment
OPENER, which breaks the file further rather than fixing it.
3. "the file parses, or the new error is LATER than the ORIGINAL" -- compared
against a fixed point the item cannot move. This one refuted 41.
THREE BUGS in the depth model, each found by reading an answer and none by a
control: `//` and `#` bodies counted as code (median item size 352 lines); the
module closer matched by TEXT backwards, hitting a nested `};` and making the
tail 40 lines of orphan code; a `/* */` block wrapping a JSON schema whose `{`
moved every boundary in a 500-line file. After the first fix the median item
went 352 -> 1 line.
Confirmed answers are specific: `bootstrap/tests/goldring/r_mulassign.t27:4`
is `t *= 2.0;`.
`bootstrap/src/compiler.rs` untouched; FROZEN_HASH does not move.
Refs #2864
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 29, 2026 21:30
# Conflicts: # .claude/skills/ci-gates/SKILL.md
Contributor
PR DashboardGenerated at: 2026-08-29 21:31:59 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
In-place renumbering collided with itself: replacing 335 -> 337 then finding that same 337 and replacing it with 339, leaving the file reading 339, 338, 337. `tri skill check` caught it -- 'section 337 comes after 338'. Refs #2864
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-29 21:32:33 UTC
Summary
Seal Status
|
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.
When the compiler names a line that is a construct it accepts, the cause is
earlier in the file.
tri unparsed locatefinds it: feed growing prefixes of themodule body back to the compiler, binary-search the first prefix that fails.
Prefix bisection is unsound on its own — a truncated prefix can fail for a
reason the whole file does not have, because declarations the tail refers to are
simply absent. The 41 refuted candidates are that, and reporting them rather
than dropping them is the point.
The controls, and what each failed to catch
Fidelity.
head + body + tailmust reproduce the original failure on thesame line. It passed 46 of 46 while the answer was wrong for 16. Of course
it did: the concatenation is the whole file whatever the boundaries are. A
control on the output cannot validate a decision internal to the pipeline.
Causality — three attempts:
Three bugs in the depth model, none found by a control
Each surfaced by reading an answer and asking whether the place made sense:
//and#bodies counted as code};, making the tail 40 lines of orphan code/* */wrapping a JSON schema{moved every boundary in a 500-line fileAfter the first fix the median item went 352 → 1 line.
What the answers look like
--refutedprints the candidates causality rejected, so the tool's own failurerate is visible rather than hidden.
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 tri0 (20 tests inunparsed.rs) ·rustfmt --check cli/tri/src/unparsed.rs0.bootstrap/src/compiler.rsis untouched, soFROZEN_HASHdoes not move.Refs #2864