Skip to content

Auto-loop 2026-09-29: silent-discard parser family + loop infrastructure - #5084

Open
gHashTag wants to merge 23 commits into
masterfrom
loop/auto-2026-09-29
Open

gHashTag wants to merge 23 commits into
masterfrom
loop/auto-2026-09-29

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #5083.

Overnight autonomous loop (charter: docs/loop/auto-2026-09-29/README.md). This PR carries the loop's landing work and grows commit-by-commit as 15-minute iterations complete; each iteration report lands in docs/loop/auto-2026-09-29/iterations/.

Iteration 01 (in this PR now)

  • Loop infrastructure: branch loop/auto-2026-09-29 off master 2925def, remote mutex tri loop claim auto-2026-09-29 held, safety constitution (never on master / no force-push / reds may only shrink / no mass reseal).
  • Measured baseline on untouched master (baseline.md): 148 corpus reds; the reframe finding — parser error recovery discards and continues: parse-no-discard 114 specs (worst ternary_inference 1813 tokens), no-vacuous-invariant 65 specs (invariants that check nothing), parse 23 refused.
  • Competitor scan (competitors-2026-09-29.md): Vericert line, Sep-2026 BitNet-on-CGLA ternary hardware, Verilator/Yosys discipline — mapped to our gaps.
  • docs/README.md map: docs/loop/ registered (DOCS-TREE).

Planned in following iterations (see plan.md)

  1. silent-discard family, wave-697 lineage (tri unparsed probes; make the parser fail loudly or accept the construct)
  2. truncated verilog_bench_harness.t27 (specs/test_framework/verilog_bench_harness.t27 is truncated: parse fails at line 172 (born in #1399) #5079)
  3. tri CLI: loop-state + checkpoint-hygiene commands
  4. .tri codegen: refuse loudly instead of emitting garbage
  5. t27c unknown-flag rejection (the --out/ accident)

Not in this loop: merging #5078/#5081 (owner's), the lean yml gate (#5082, workflows scope), any mass reseal.

🤖 Generated with Claude Code

…itor scan

Overnight autonomous improvement loop (issue #5083). Baseline measured on
untouched master: 148 corpus reds; the reframe finding is the parser's
silent discard — 114 specs lose top-level tokens (worst ternary_inference
1813), 65 specs' invariant bodies are discarded unchecked, 23 specs refused
outright. Competitor scan: everyone we race fails loudly where we continue
silently. Safety constitution + iteration protocol in the charter; remote
mutex held via tri loop claim.

Closes #5083 (loop PR will carry the fixes; this commit is the loop's record)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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-09-28 17:25:31 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 38
PRs with All Checks Green 4
READY 3
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 38 + 0 + 0 = 41, and there are 42 open PRs. A PR is being counted twice or not at all.

Seal Status

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

…iscarding them

The colon-form forall arm of parse_invariant_clause was the dominant silent
discard channel: 581 whole-block fallbacks across 35 specs, 84% of all
amnestied tokens (19,939/23,831) rode bdd-block-fallback. Preservation keeps
the statement verbatim in block.value marked partial (NOT CHECKED emitted,
children empty so emitted bytes and committed seals do not move), consumes
the tokens instead of dropping them, and leaves lowering to #2774.

Measured: discarded top-level tokens corpus-wide 27,562 -> 14,364 (-48%);
ternary_inference 1813 -> 87; corpus reds 148 -> 148 (volume, not count);
failing-spec set identical to baseline; zero new reds. Ratchet ledger
re-blessed CLEAN: discard sum pinned 14,364, max_entries 152 -> 148, and
the population resynced to measured reality (52 stale entries dropped, 47
never-tracked failing specs added -- every added path verified already
failing at baseline; none caused by this change).

Closes #5083 (loop PR #5084)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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-09-28 18:02:13 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 38
PRs with All Checks Green 4
READY 3
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 38 + 0 + 0 = 41, and there are 42 open PRs. A PR is being counted twice or not at all.

Seal Status

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

…me since Jul 31

Deliberate rewrite per the issue's second option: format! x8 (three with
string args became corpus-idiom concat; three with int args became constant
strings, each with a comment naming what was dropped and where the data
still lives), Rust suffix T? x2 became the corpus prefix ?T. Everything
else in the file -- let mut, for-in over .lines(), +=, ! prefix, chained
string methods, if-expression struct fields, ... spread -- already parsed;
the file was one macro and two type suffixes away from parsing for two
months. AST verified whole (orphan tail included), trailing newline added.

Ratchet: unexpected failures 0, unexpected passes 1 (this spec), corpus
PRIMARY 148 -> 147, ledger entry retired (147/147 cap), RATCHET CLEAN.

Closes #5079, closes #5083 (loop PR #5084)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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-09-28 18:22:50 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 39
PRs with All Checks Green 3
READY 3
FAILING 39
PENDING 0
NO CHECKS YET 0

Seal Status

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

… reads first

tri loop claim guards the REMOTE collision (two sessions, one task list).
This guards the LOCAL one, measured on the first overnight loop: a session
resumed in the main checkout while the loop's worktree sat elsewhere, and
state.md's branch: line was the only thing that said so -- unread. A state
file updated by hand after every iteration is also a file a crashed write
can leave half-empty, which is exactly when a firing reads it.

Parses the fenced block with its real multi-line values (current-task
routinely carries a four-space-aligned continuation; alignment padding is
trimmed, not appended), names missing required keys by name (not count),
refuses to guess between multiple docs/loop/*/state.md, cross-checks the
branch the state names against the checkout, warns on dirty files without
failing (mid-iteration is the normal dirty state) and on unpushed or
never-pushed work. Exit 0 clean, 1 state-vs-tree divergence, 2 could-not-run.

Tests pin the arms: multiline parse, named missing keys, exit-1-not-2 on
branch divergence (needle-pinned like the claim tests). Live check: run
against the loop's own state.md it caught the ci-gates .gitattributes
side-write and the unset upstream on the first invocation.

Closes #5083 (loop PR #5084)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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-09-28 18:26:49 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 38
PRs with All Checks Green 4
READY 3
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 38 + 0 + 0 = 41, and there are 42 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=5bd6c20baf5e != 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 29, 2026 01:58
The largest remaining whole-block-fallback row was 256 events across 29
specs: BARE `invariant NAME` whose body leads with its binder (forall
acc : i32, a : i8 ...). The clause walker hit forall, did not recognize
it, and the whole remaining body became one fallback event -- every
token after it silently discarded.

Same preservation as site 1 (a976e54), reusing the same walker
capture_to_next_top_level: forall arriving at the head of a not-yet-
lowered block is captured verbatim into value, marked partial (emitter
prints NOT CHECKED), tokens consumed (stop counting as dropped),
children empty so emitted bytes and committed seals do not move, and
#2774 keeps owning lowering semantics.

Measured: discarded tokens 14,364 -> 8,559 (-5,805; cumulative -69% from
the 27,562 baseline); forall row gone from the census; ternary_mac 0
events; corpus PRIMARY 147 (preservation is volume, not count); gate
diff rc=0 no new reds. Ledger re-blessed 147/147, RATCHET CLEAN, added
entries not failing at baseline: [].

FROZEN_HASH 5bd6c20baf5e4e79 -> d925e634aa4cfbca (tri reseal write;
the compiler's own seal, not a corpus reseal).

Closes #5083 (loop PR #5084)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sealed)

681 FAIL lines -> 358 mismatch specs + 313 no-file specs, classed by
signature: 249 SPEC+all-backends (source normalization waves; spec_hash
is sha256 over raw source bytes, confirmed at main.rs:2938), 31 pure
codegen quotes-fix class, 27 zig-only, 23 shared-emitter, 12 comment-only
edits, ~16 tails. Smallest honest reseal batch ~81 pure-codegen specs IF
each underlying commit is confirmed intended.

New defect found while measuring: seal-name collision -- the namer
flattens specs/ + '/'->'_', so specs/a/b_c.t27 and specs/a_b/c.t27 both
map to a_b_c_spec.json. Exactly one colliding pair exists today.

Nothing was resealed to produce this; the standing no-mass-reseal rule
is restated inside.

Closes #5083 (loop PR #5084)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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-09-28 19:00:08 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 39
PRs with All Checks Green 3
READY 3
FAILING 39
PENDING 0
NO CHECKS YET 0

Seal Status

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

…idate-lean-standalone phase and rewrite the W472 block in real Lean

One defect, four layers, each hiding the next:

1. W472 (PR #4765, 2026-08-06 bulk merge) committed Lean that never
   compiled: 'struct' for 'structure', Rust Array API (arr.length/
   arr.update/arr.idx), list literals for Array, nonexistent Array.forall,
   hallucinated .0/.1/.data.(1) fields. Rewritten against the real core
   API (Array.set with proof param, primed [i]'(h), dif_pos, Array.all,
   #[...] literals) + imports Trinity.TernaryMac/TernaryGemm. Builds clean:
   0 errors, 0 warnings, 0 sorry. Two statements were FALSE lemmas, not
   proof failures — corrected with comments, not papered over:
   raw_ns_preserved_under_jitter (RawNsPredicate base does not imply
   RawNsPredicate (base+2)) and worst_case_jitter_envelope_bound
   (use 200_002, falsified at 200_000+jitter).

2. The same bulk merge dropped the validate_lean_standalone phase body
   from smoke_gate; the flag it never set made every requesting run
   report passed:false. Restored from a002243: build standalone .lean
   from theorem-matrix fixtures via measured_to_lean (21-arg signature
   unchanged), compile in a temp lake package, set the flag, write the
   entry the snapshot pins.

3. d51db4a (#2305) had restored the dry_run_sweep flag but the merge
   had ALSO dropped the synthetic-JSON sweep check and the 18th
   synthetic_operating_point parameter from cclk_sweep itself, leaving
   every dry-run operating_point.source hardcoded "not_read". Restored:
   the json sweep verification (variant count + per-variant source check),
   the W450 entry shape the snapshot pins, the cclk_sweep param, and the
   --synthetic-operating-point CLI flag (conflicts_with xadc). Dry-run
   PVT labels now closed-vocabulary correct (pvt_context_file/synthetic/
   not_read). d51db4a's reshaped keys (variants/report_file) had no
   readers.

4. Master lean CI has no push trigger (deliberate, #5082 pending
   workflows scope) — which is why layers 1-3 stacked invisibly.

Verified: lake build Trinity.TernaryFPGABoot clean; 4/4 lean_standalone
tests green; full cargo test -p tri: 827 passed / 0 failed (was 824/3,
proven pre-existing on master at 2925def). Corpus untouched; no
bootstrap/ change, seals and FROZEN_HASH unaffected.

Closes #5083 (loop PR #5084, iteration 5 — report:
docs/loop/auto-2026-09-29/iterations/05-fpga-lean-restoration.md)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-28 21:25:22 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 38
PRs with All Checks Green 4
READY 3
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 38 + 0 + 0 = 41, and there are 42 open PRs. A PR is being counted twice or not at all.

Seal Status

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

…es (Refs #5083)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-28 21:27:06 UTC

Summary

Status Count
Total Open PRs 42
PRs with Failing Checks 39
PRs with All Checks Green 3
READY 3
FAILING 39
PENDING 0
NO CHECKS YET 0

Seal Status

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

… 824/3→827/0 pass (Refs #5083)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Oct 3, 2026

This branch has not been deployed

No deployments
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.

Auto-loop 2026-09-29: silent-discard parser family, truncation #5079, tri CLI hardening

1 participant