Repository navigation
LOOP 2026-10-10: verdict reuse to 100% -- ledger, weak spots, plan (epic #8095) #8314
Description
The owner started an autonomous improvement loop on 2026-10-10 (every 15 min, this session). It works on epic #8095: rebuild only what is not yet verified, all in .t27. Every tick reads this issue first, repairs anything red that a previous tick left behind, and only then starts new work. Every tick leaves one comment: what it did, PRs, anomalies, next.
Where we are (measured)
- Remote silicon run: 2.5 h (die C, USB/IP) -> 42 s (bench agent, die A, verified: an agent next to each board -- bench_agent.t27 and t27c bench-agent (Closes #8153) #8155).
- Repeat bitstream build: 39 s -> 4 s with bitstream reuse (verified: t27c silicon reuses a bitstream built from the same inputs (Closes #8290) #8291 spec; t27c silicon reuses its bitstream; a ported script pays for the glue (Closes #8295) #8296 glue, open).
- frontier on master: 382 of 1739 reused (22%). With specs/base/types.t27: compile again at 4 trits per byte, seal v2 (Closes #8303) #8177 and math/constants: compile again and pass 36 of 36, seal v2 (Closes #8301) #8209 it is 423, and closure rebuilds drop from 381 to 79.
Weak spots (self-critical)
- Coverage is limited by seals, not by the idea. 940 specs (1201 after the hubs land) have no valid v2 seal: their tests fail or they do not compile.
- Undeclared inputs in the bitstream cache key. The key includes the tools but not the python venv packages that fasm2frames and prjxray use. Bazel's main poisoning cause is exactly this.
- No audit of cache hits. Nothing ever rebuilds a hit to check that it is still byte-identical. Bazel's remedy is to rebuild without the cache and compare digests.
- The cache is local only. A toolchain-less operator (die C) cannot load a sealed bitstream yet.
- Hooks anomaly.
core.hooksPathis the absolute path /Users/playom/t27/.githooks, so every worktree runs the main checkout's branch hooks, which are not master's. - Shrink-only rule vs glue. New I/O glue must be paid for in the same PR. t27 cannot express the I/O of thin glue: file read and hash, process run, file write #8298 asks for t27 I/O so glue can be generated.
- t27b ledger cap is full (20 of 20). New blocked rows go OVER CAP; this needs the owner's decision.
- Inherited reds. Non-required checks (t27b-native-ratchet, Corpus ratchet, test-ratchet) are red on master often enough that a new red stops being noticed.
What others do (2026 scan)
- Bazel remote cache: an action cache plus content-addressed storage. Reuse across machines is safe only if the build is reproducible. Undeclared host inputs are the usual poisoning; rebuild-and-compare is the audit.
- Nix content-addressed derivations: still experimental and opt-in. Deep realisations are hard to make sound, so input-addressing remains the fallback.
- Open FPGA flows (nextpnr, F4PGA): no cross-run bitstream cache found. Vendor incremental compile exists (Quartus).
- Verified compute: proofs of execution on Artix-7 (VAPE), FPGA self-attestation (SACHa), receipts (flexHEG). No deployed FPGA receipt standard was found.
Plan
- P1 Land the hubs, math/constants: compile again and pass 36 of 36, seal v2 (Closes #8301) #8209 (constants.t27) and specs/base/types.t27: compile again at 4 trits per byte, seal v2 (Closes #8303) #8177 (types.t27): closure 381 -> 79
- P2 Second re-mint after P1: reseal as v2 every spec whose tests now pass
- P3 Land t27c silicon reuses its bitstream; a ported script pays for the glue (Closes #8295) #8296: the bitstream reuse glue (net -114 hand-written lines)
- P4 Bitstream key: add the venv package set (undeclared input). The spec decides, the glue hashes
- P5 Hit audit: the spec decides when a hit is rebuilt and compared byte for byte, and what a mismatch means (poisoned entry -> delete and report)
- P6 Debt: chore: delete 57 hand-written originals already ported to .t27 (Closes #8311) #8312 deletes 57 ported originals (-5873 lines); 25 more need review
- P7 ops.t27 (base/ops.t27: compile again (i8 index, tuple literal) and fix the 7 tests that then fail (#8095 closure hub) #8239) and the remaining missing seals, in batches the Queen can take
- P8 Shared sealed bitstreams for toolchain-less agents (die C)
- P9 Hooks anomaly: propose a relative core.hooksPath (the owner's call: it is shared config)
Rules for every tick
- Only .t27 for logic. Hand-written code may only shrink, and new glue is paid for in the same PR.
- Every PR gets auto-merge. A required red is fixed before new work starts.
- Never touch hardware without the owner's word.
- Never weaken a test or a gate to get green.
Boundary
specs/verified/bitstream_reuse.t27
User Scenarios
- Given a spec has a valid v2 seal and its tests pass, when the verdict reuse check runs, then the spec's verdict is reused without re-execution
- Given the bitstream cache key includes the python venv package set, when the venv changes, then the cache key changes and a fresh bitstream build is triggered
- Given a cache hit occurs for a bitstream, when the hit audit runs, then the bitstream is rebuilt without cache and the digests match byte-for-byte
Requirements
FR-001: The bitstream reuse spec MUST declare the cache key including the python venv package set hash
FR-002: The hit audit mechanism MUST rebuild a cached bitstream without cache and compare digests byte-for-byte, deleting and reporting poisoned entries on mismatch
FR-003: The verdict reuse logic MUST achieve 100% reuse for all specs with valid v2 seals (940 → 1201 after hubs land)
FR-004: The bitstream reuse glue (net -114 hand-written lines) MUST be landed with generated I/O glue paid in the same PR per shrink-only rule
FR-005: The t27b ledger cap MUST be resolved (currently 20 of 20 full) before new blocked rows are added
Success Criteria
t27c specs/verified/bitstream_reuse.t27compiles andt27 test specs/verified/bitstream_reuse.t27exits 0t27 verdict-reuse --checkreports 100% reuse for specs with valid v2 seals (exit 0)grep -q "venv" specs/verified/bitstream_reuse.t27exits 0 (venv package set in cache key)- Hit audit rebuilds 5 cached bitstreams and all compare byte-identical (exit 0)
wc -l specs/verified/bitstream_reuse.t27shows net -114 hand-written lines or better vs baselinet27b ledger --capreports cap resolved (exit 0)
Activity
bitstream reuse: the venv in the key, and every 10th hit is audited (C…
gHashTag commentedon Oct 9, 2026
Tick 1 (2026-10-10, ~03:15 +07)
Repaired:
scripts/gen_w662.py, which has a .t27 port.New (PRs, all on auto-merge):
Anomaly found by the new audit.
Measured: frontier on master 382 of 1739; projected 423 after P1, with closure 381 -> 79.
Skill:
verdict-reuse-loopwritten, with the tick order, the CI rules and the traps.Next tick: P1 or P3 merge status, then P2 (second re-mint) if P1 has landed.
gHashTag commentedon Oct 9, 2026
Tick 2 (started ~03:30 +07)
$TMPDIR/wt-remint3(branch claude/seal-v2-remint-3). Do not start another re-mint until this one reports "remint3 finished".docs/reports/suite_expectations.jsonon branch chore/suite-ledger-constants; only the constants.t27 entry will be kept.t27c silicon reuses its bitstream; a ported script pays for the glue (C…
t27b: the node scans of lower.rs move to specs/tri/t27b/ast_scan.t27 (C…
gHashTag commentedon Oct 9, 2026
Tick 2, done (~04:45 +07). LOCK released: the re-mint finished.
checks_passneeds tests + invariants > 0. Glue +1/-1.Next tick:
gHashTag commentedon Oct 9, 2026
Tick 3 (~05:00 +07)
duplicate-bodiesred is inherited from master: has_at in t27b/ast_walk.t27 duplicates starts_with in t27b/source_text.t27. Filed as duplicate-bodies red on master: ast_walk.t27 has_at duplicates source_text.t27 starts_with #8376.$TMPDIR/wt-classify, output$TMPDIR/classify.tsv. Next tick turns the classes into Queen-format issues, about 20 specs each, with exact failure lines.gHashTag commentedon Oct 9, 2026
Tick 3, done; tick 4 under way (05:56 +07)
Merged since the last comment
useand module-less seals. 1115 -> 1151.seal_closureand frontier (Closes seal v2 closure: use module::item is recorded as a missing spec module/item.t27, and the imported module is not in the closure #8351). 180 imports ofactors.t27were recorded as 180 missing entries; now they are one real one.frontier on master: 1163 of 1756 (662 permille). rebuild: spec 47, closure 108, toolchain 3, verdict 3, missing 432.
Open, auto-merge on unless noted
t27c frontier --reseal: the re-mint as one command. The keep rule is inseal_identity.t27(remint_wants,remint_keeps,REMINT_CACHE_EVERY). Paid for by deleting 2 dead generators. Auto-merge goes on once the full run below finishes clean.&[_]T{}lowered to&.{ _ }, which blocked 17 specs (Closes gen-zig: empty typed array &[_]T{} lowers to &.{ _ } (blocks 17 specs) #8390). The regression spec is BLOCKED on master and 2/2 with the fix. Corpus ratchet CLEAN.P7 done: epic #8393 lists 524 unsealed specs by class, across 21 Queen-format batches (#8394..#8414). 185 undeclared identifiers, 189 other compile errors, 21 failing, 40 with no checks. All were labelled
queen-shapedautomatically.LOCK:
t27c frontier --resealis running on master in$TMPDIR/wt-remint5(branch claude/seal-v2-stale-reseal), over 161 stale specs. It is both the full end-to-end test of #8392 and the next seal PR. A partial run (31 specs) wrote 22 files, all v2 withfailed 0. Do not start another re-mint until this one reports.Anomalies, self-critical
run_sealcallsprocess::exiton any refusal, so a loop cannot call it in-process; the glue runs it as a child.What others do (scan 2, 2026-10-10)
bitstream_reuse.t27does.Next
gHashTag commentedon Oct 10, 2026
Tick 4 (19:10 +07). The session stalled for about 12 h after 06:30, so the cron queued about 50 ticks; this comment covers them as one.
Merged: #8387 (59 seals), #8391 (one
useresolver for seal and frontier, Closes #8351), #8415 (gen-zig&[_]T{}, Closes #8390).Anomaly, self-inflicted: #8415 left master red. It auto-merged on the required checks with three non-required checks red (#8417):
struct Pair, which another spec also declares (types ratchet);Repair, #8418, auto-merge on:
tri seals drift --fixresealed 42 seals;--forceand movedstale -> tests-fail, 6 baseline lines only;_lvrename reached the shadowing local's own initializer (const PI_lv = PI_lv).On today's master, #8418's coverage still shows 56
[stale]seals. Those are other sessions' spec edits; no gen-drift is left.Anomaly found by the end-to-end run of #8392
frontier --reseal: seal file collisions. Two specs can derive one seal file name, andseal --saveoverwrites the other spec's seal; in one case the glue then deleted it.remint_keepsnow takesfile_is_its_own, so such a file is always written back.$TMPDIR/wt-remint5) before auto-merge.frontier on master: 1144 of 1777 (644 permille). Down from 1167 of 1756, because 86 specs were edited today without a reseal (spec 86). This is why
--resealhas to run on every tick, not once.P7: epic #8393, 21 batches. Ranking the hubs behind closure rebuilds:
math/sacred_physics.t27base/ops.t27(#8239)isa/registers.t27compiler/lexer.t27sacred_physics stops at
sin2_theta12_trinity(). Nothing declares it, and its comment formula8*phi^4/3/pievaluates to 5.818, not 0.309. That needs the author (#8396).P10: spec
verdict_audit.t27, #8543 (Closes #8542). Glue next.Inherited reds, not mine:
specs/memory/graph/ingest.t27: unterminated string. It fails emit-bitexact and the Corpus ratchet.Next:
frontier --audit;base/ops.t27.gHashTag commentedon Oct 10, 2026
Tick 4, continued (19:35 +07)
frontier --reseal, spec: verdict_audit.t27 -- rerun a sample of reused verdicts (Closes #8542) #8543verdict_audit.t27, base/ops.t27: compiles; 1 wrong function and 4 wrong tests fixed (Closes #8239) #8547base/ops.t27(95/95, Closes base/ops.t27: compile again (i8 index, tuple literal) and fix the 7 tests that then fail (#8095 closure hub) #8239), types ledger: drop Pair, resolved by #8418 (Closes #8549) #8550 (Pair left the types ledger, Closes types ledger: Pair was blessed in while master was red, and #8418 resolved it #8549).--resealrun on master. 194 stale specs: 41 resealed, 67 files, 0 bad, 0 collisions. frontier on master 1146 -> 1173 of 1780.tri seals drift --fixresealed two specs that PASSED on master and stopped compiling today (compiler/optimizer.t27after Census the optimizer: 4 of 7 passes have no precondition, and dead_store_elim deletes calls #8502,port/tools/gft_deep_demo.t27after Port part 1 of 2 of tools/gft_deep_demo.py to specs/port/tools/gft_deep_demo.t27 (8 functions) #8494). Sealing them would have recorded the regression as truth. I reverted those seals and filed regression: compiler/optimizer.t27 and port/tools/gft_deep_demo.t27 stopped compiling on 2026-10-10 #8552.t27c frontier --audit <round>(Closes t27c frontier --audit: rerun a sample of reused verdicts (glue for verdict_audit.t27) #8556).total 15for 14 tests reads POISONED and exits 1.zig_shadow_initializer.t27(pass), which gen-zig: a shadowing local reads the outer name in its initializer; master green after #8415 (Closes #8416, Closes #8417) #8418 had left UNLISTED.verdictwent 1 -> 27 andmissing439 -> 417 on master because gen-zig: a shadowing local reads the outer name in its initializer; master green after #8415 (Closes #8416, Closes #8417) #8418's drift fix gave blocked specs v2 records. Same specs, different column.Next tick:
--resealand--auditon master (both now in the tick order of the skill);isa/registers.t27(10 specs);T.gHashTag commentedon Oct 10, 2026
Tick 5 (19:55 +07)
Merged: #8554 (first
--resealrun, Closes #8551), #8559 (frontier --audit, Closes #8556), #8561 (stale Pair classification row, Closes #8560).frontier on master: 1177-1178 of 1780 (662 permille).
Audit, round 5: 65 reused verdicts rerun, 65 agree, 0 poisoned, 166 s. Round 3 earlier: 65/65.
Re-mint, tick 5:
tri loop claim verdict-reuse-remint, now the lock between ticks and sessions. 12 resealed, 830 s.built_byandsealed_atdiffered, so seals: tick-5 frontier --reseal run, 12 specs (Closes #8567) #8568 was closed as churn.--resealtreats a built_by-only difference as no change.Compiler, #8566 (Closes #8565), auto-merge on:
break;and discarded consts that were used after a loop.Anomalies:
queen-8389-> PR t27c frontier --reseal: the re-mint as one command, its keep rule in seal_identity.t27 #8505 (closed as a duplicate of frontier --reseal: the re-mint as one command (Closes #8389) #8392), plusqueen-8416,queen-8417,queen-8549, andqueen-8314(this ledger). The Queen does not skip issues with an open closing PR: filed trios#1736.memory/graph/ingest.t27:414is a;comment containing "let's", whose apostrophe opens a char literal, and the comment describes a deliberately wrong assert.Next:
lexer.t27hub's next error;gHashTag commentedon Oct 10, 2026
Tick 6 (20:02 +07)
bitstream_share.t27.bit_source: BUILD / SHARED / WAIT / REFUSE. A toolchain-less agent loads a shared bitstream only when the fetched bytes hash to the sha256 named by the owner-approved job. A mismatch is refused, never built around.may_publishandreceipt_complete: a SHARED receipt names the key and the bit hash (Lake's stand-in trace).seal --saverefuses to replace a passing seal withblockedunless--force(blocked_reseal_allowed).tri seals drift --fixnow reports such a spec as REFUSED instead of writing the regression. Negative control: a planted undeclared call is refused with exit 1 and the seal is untouched.check_keywordtakes[256]u8and the 8 keyword tests pass string literals. A spec-test fix (lexeme_buf("fn")) waits for gen-zig: the dead-const pass no longer ends a block at an unindented break; (Closes #8565) #8566, which touches lexer's seals.queen-8560(already delivered by types classification: drop the stale Pair row (Closes #8560) #8561; any PR from it will be closed as a duplicate) andqueen-8562(master's reds, a legit task).compiler/optimizer.t27also fails spec-guards' duplicate-declaration check on every PR. Added to regression: compiler/optimizer.t27 and port/tools/gft_deep_demo.t27 stopped compiling on 2026-10-10 #8552.Re-mint this tick: skipped. The last run was 15 minutes ago and its records duplicated #8564's.
gHashTag commentedon Oct 10, 2026
Tick 7 (20:10 +07)
compiler/lexer.t27compiles for the first time, 16/16, 0 vacuous.[256]u8lexeme buffer with a spec helper,lexeme_buf.verdict32 -> 35).t27c siliconneeds a load-entry path verified against the job's sha256, and that needs one SRAM hardware check on die A. It waits for the owner's word.seal --saverefuses a pass -> blocked regression).gHashTag commentedon Oct 10, 2026
Re-ranking, self-correction. Counted strictly (the dependent's own seal passes AND the hub is its only non-reusable import), the hubs free very little: sacred_physics 3, then notebooklm, parser, top_level, formal, placement, vcd_trace and runner 1 each. My earlier "26 / 24 / 10 / 9" counted dependents that have blockers of their own, which is why ops gave +3 and lexer +1. Consequence for the plan: the remaining ~600 non-reused specs fail on their OWN defects (missing 418, verdict 35). Coverage grows per spec fixed, so the engine is the swarm on #8393's 21 batches, once trios#1736 stops duplicate dispatch, plus shared compiler defects. Hub hunting is closed as a strategy.
gHashTag commentedon Oct 10, 2026
Tick 8 (20:45 +07)
bitstream_share.t27), seal --save refuses to record a regression without --force (Closes #8576) #8577 (seal --saverefuses pass -> blocked), compiler/lexer.t27 compiles: keyword tests use the lexeme buffer, invariants compare tags (Closes #8578) #8583 (lexer.t27 compiles, 16/16), gen-zig: a local declared []T from an array literal lowers to @constCast(&[_]T{...}) (Closes #8602) #8617 (Closes gen-zig: a local declared []T and initialized with an array literal lowers to .{...}, which is no slice #8602).@constCast(&[_]T{...})..t27: 28 specs change, each only at such locals. None passed before; 2 move past this error.gft_deep_demoas blocked on master, the regression seal --save refuses to record a regression without --force (Closes #8576) #8577 now refuses.gHashTag commentedon Oct 10, 2026
Tick 9 (21:05 +07)
.error->.@"error") in switch prongs and enum values..t27, 9 specs change, only at such literals. All 9 were blocked on exactly that syntax error, and all 9 get past it.expected ',' after field(12): angle-bracket generics (List<Int>,Box<OctNode>,map<K,V>), the Result<T,E> is Zig's E!T: 182 angle-bracket generics, 163 with exact counterparts #2610 family.expected ')', found ','(8): Python-style tuple types in ported specs.local variable is never mutated, 7invalid builtin.gHashTag commentedon Oct 10, 2026
Tick 10 (21:30 +07)
bits,clear) andingest.t27.local variable is never mutated(7 specs, mostlyisa/*).collect_mutable_namescountsp.* = ...ands[i] = ...as reassigning a pointer or slice parameter, so the parameter gets avar x = x_arg;shadow that Zig refuses.base/types.t27. Zig compiles lazily, so a function no test calls is never analyzed, and a passing spec can hold a never-mutated re-binding. That means:invalid builtin(@tanh,@sigmoid,@trim, ...) is builtins the specs invented. That is batch work.Next tick: after #8636 merges:
gHashTag commentedon Oct 10, 2026
Tick 10, finished (22:15 +07)
var.spec_pathagainst master.ingest.t27as "my commit". It is a bee's (queen-8425 via memory/graph slice 4: ingest.t27 -- the extraction state machine and the LLM effect slot #8493), already filed as master Corpus Ratchet: 5 unexpected failures from 2026-10-10 merges (ingest.t27 apostrophe, a/b_c, optimizer, orchestrator_bench) #8562, and bee branchqueen-8562holds an unpublished fix. I replied and left it alone to avoid a third copy.gHashTag commentedon Oct 10, 2026
Tick 11 (22:55 +07)
let_reassigned.t27, which landed during gen-zig: a pointer or slice parameter written through is not re-bound as var (Closes #8641) #8667. gen-zig: a pointer or slice parameter written through is not re-bound as var (Closes #8641) #8667 had auto-merged on its required checks with seal coverage red for it.tri seals driftafter the FINAL rebase. Specs land during a PR, and a codegen change moves them too.gHashTag commentedon Oct 10, 2026
Tick 12 (23:50 +07). The biggest single gain of the day.
--resealnever tried them, becauseremint_wantsskipped every MISSING spec. The assumption "MISSING needs fixing first" was mine (frontier --reseal: the re-mint as one command (Closes #8389) #8392) and wrong for never-sealed specs.remint_wants(decision, has_seal)tries never-sealed specs. The first run on master sealed 39 of them.checks_passaccepts them, filed as checks_pass accepts a fully vacuous suite (every test ran 0 asserts) #8693.checks_passaccepts a suite whose every test ran 0 asserts. Proposal: recordtests.vacuousin the seal and require(total - vacuous) + invariants > 0.gHashTag commentedon Oct 10, 2026
Loop stopped by the owner (2026-10-11 00:50 +07, cron 52ab9d25 deleted). Final state.
frontier on master: reused 1242 of 1813 (685 permille); rebuild: spec 49 closure 102 toolchain 0 config 0 verdict 111 missing 309. It was 2 of 1712 on 2026-10-09.
Landed, by PR:
--reseal: frontier --reseal: the re-mint as one command (Closes #8389) #8392, frontier --reseal: a record that differs only in built_by is not a change (Closes #8571) #8572, frontier --reseal tries a never-sealed spec; 39 pass and are sealed (Closes #8691) #8700;--audit: spec: verdict_audit.t27 -- rerun a sample of reused verdicts (Closes #8542) #8543, frontier --audit: rerun a sample of reused verdicts (Closes #8556) #8559, audit: a reused verdict whose rerun checked nothing is poisoned (Closes #8710) #8719.seal --saverefuses a regression: seal --save refuses to record a regression without --force (Closes #8576) #8577.bitstream_share.t27(spec: bitstream_share.t27 -- shared sealed bitstreams for agents without a toolchain (Closes #8573) #8574).Last finding: the audit with #8719 found 9 reused verdicts that check nothing in 2 of 16 rounds (#8721). The other 14 rounds will name the rest.
Open, needs the owner:
Open for the swarm: the 21 batches of #8393, and #8721.
Lessons: in the verdict-reuse-loop skill.