Skip to content

Four controls before one answer: locating the cause above the reported line - #2889

Merged
gHashTag merged 3 commits into
masterfrom
locate-the-cause
Aug 29, 2026
Merged

Four controls before one answer: locating the cause above the reported line#2889
gHashTag merged 3 commits into
masterfrom
locate-the-cause

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

When the compiler names a line that is a construct it accepts, the cause is
earlier in the file. tri unparsed locate finds it: feed growing prefixes of the
module body back to the compiler, 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 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 + tail must reproduce the original failure on the
same 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:

attempt result
"the error moved PAST the item" passed 45 of 45 — for an item at line 5 and an error at 2215 that is true by arithmetic
"the error line CHANGED" credited commenting out a block-comment opener, which breaks the file further
"the file parses, or the new error is LATER than the ORIGINAL" refuted 41 of 86 — compared against a fixed point the item cannot move

Three bugs in the depth model, none found by a control

Each surfaced by reading an answer and asking whether the place made sense:

bug effect
// and # bodies counted as code depth never returned to zero; median item size 352 lines
module closer matched by TEXT backwards hit a nested };, making the tail 40 lines of orphan code
/* */ wrapping a JSON schema its { moved every boundary in a 500-line file

After the first fix the median item went 352 → 1 line.

What the answers look like

bootstrap/tests/goldring/r_mulassign.t27:4      t *= 2.0;
bootstrap/tests/goldring/r_op.t27:4             t %= 2.0;
compiler/cli/git.t27:11..126
specs/account/repo.t27:12
specs/ar/composition.t27:398..408

--refuted prints the candidates causality rejected, so the tool's own failure
rate 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 tri 0 (20 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

…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
gHashTag enabled auto-merge (squash) August 29, 2026 21:30
# Conflicts:
#	.claude/skills/ci-gates/SKILL.md
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 21:31: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.

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

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 21:32:33 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).

@gHashTag
gHashTag merged commit 57853c5 into master Aug 29, 2026
26 of 27 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.

2 participants