Repository navigation
feat: build stamps on ledger rows, a printed proposer trigger, and a cause per failure class - #856
Merged
Merged
Conversation
Ledger.Record, the one path every ledger row takes to disk, now stamps the build of the writing process from the same self-hash the delegation log uses, under the same field names: harness_build_sha256 on a row for work the process ran, delegator_build_sha256 on a delegator's row. A delegation row also takes the executing node's harness_build_sha256 and seat_config_sha256 from the node's result, and the node's own agent row carries seat_config_sha256, only when the seat served. All fields are omitted when empty, so older rows read as before. trace-corpus harvest copies the three fields from the delegation-log row into the corpus row. None of the corpus rows kept the delegator build before. ledger --failures --by-build adds a builds key and a stderr table: rows are bucketed by the executing build, else delegator:<hash>, else unstamped, and the buckets add up to the unsplit totals. Output without the flag is unchanged. The failure-register, mcp-server and self-improvement pages now state exactly which rows carry which stamp. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ecord a root cause per failure class ADR 0036's trigger for building the recipe proposer read "trace-bearing runs in the hundreds" and read as met on 10,766 runs, while 31 carry a measured pager report, the measurement the proposer's design needs. A dated amendment restates it on that count (needed 100), and `trace-corpus trigger` (and a stderr line of `trace-corpus readout`) prints it as needed / have / met. The readout report is unchanged, so frozen baselines still reproduce. ADR 0091 is Accepted with its release and a status note on what its data now shows. `internal/ledger/rootcause.go` records, for each of the 31 failure classes, a cause kind, a root cause, the evidence and an action, from the emitting code and the real 30-day rows. `ledger --failures` prints them with each class (JSON `cause`, text on stderr) and lists the classes still not investigated (15 of 31; 4 of the 19 in the window). Existing fields are unchanged; the fixture golden gains the new keys. The table is on the failure-register page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r the class that names them A delegation to a seat held by a text lease was filed infrastructure (now node_busy), the agent loop's cancellation was filed budget (now canceled) and a node's own pipeline-jobs folder failure was filed dispatch_refused (now config). RefileStamped holds the three, applied by Record to new rows and by the failure register to rows already written. A node's whole "a text lease holds its card; it may take the call later" sentence and four of the browse door's typed errors get read-time rules in DeferCode. Root-cause entries, the register page and its fixture golden are updated; no class is renamed and the JSON shape is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ase hold and a loop cancellation Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… fault The one review of this branch found that the lease-hold refile read only the opening sentence, so a held local seat could file a dead or misconfigured fleet under a capacity class. A row whose reason also says a remote failed its health probe, no remote is configured, none passed the capability gate, or one advertises no context ceiling now stays infrastructure. Real ledger, 30 days, read only: 2,566 failure rows before and after; infrastructure 195 to 140 and node_busy 628 to 704 (55 lease holds move, 17 that also name a failed health probe stay). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merged
dmmdea
added a commit
that referenced
this pull request
Nov 12, 2026
One change, merged to main through its own pull request (#856) after one review (one finding, fixed) and green CI: - Ledger and trace-corpus rows record the build that wrote them (harness_build_sha256, delegator_build_sha256, seat_config_sha256), and ledger --failures --by-build splits the failure counts by build. Rows written before this release read as unstamped. - trace-corpus trigger prints the proposer trigger of ADR 0036 as needed / have / met, counted on runs with a measured pager report and not on trace-bearing runs. ADR 0036 is amended; ADR 0091 is Accepted. - ledger --failures prints a kind, root cause, evidence and action for each of the 31 failure classes: 16 established, 15 marked not investigated with what would settle each. - Three misfiled sentences are read under the class that names them, at write time and for rows already in the ledger: a local seat held by a text lease (infrastructure to node_busy, unless the same row names a fault in the remote fallback), an agent loop canceled by its parent context (budget to canceled), and a node whose job folder cannot be created (dispatch_refused to config). Totals do not change. Deletes: changes/unreleased/feat-rsi-register-followups-2.md, changes/unreleased/feat-rsi-register-followups.md, changes/unreleased/feat-rsi-trigger-rootcause.md Co-authored-by: dmmdea <dmmdea@users.noreply.github.com>
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.
Intent
Three follow-ups from the 2026-11-12 audit of the self-improvement instruments: failure counts could not be split by the build that produced them, the proposer trigger of ADR 0036 was read off the wrong count, and no failure class had a recorded root cause.
Scope
In: the ledger's one write path (three new optional fields), the trace corpus rows,
ledger --failures(a--by-buildsplit and a cause per class), atrace-corpus triggermode, read-time and write-time refiling of three misfiled failure sentences, ADR 0036 and 0091 text, docs.Out: the wire defer classes, exit codes, any node or seat behaviour, the delegation log format.
What changed
Ledger.Recordstampsharness_build_sha256on a row for work the process ran anddelegator_build_sha256on a delegator's row. A delegation row also carries the executing node's build andseat_config_sha256from the node's result. All three are omitted when empty, so older rows read as before.trace-corpus harvestcopies them into corpus rows.ledger --failures --by-buildadds abuildskey and a short table on stderr. Without the flag the output is unchanged.trace-corpus trigger --corpus FILEprints needed / have / met;readoutprints the same line on stderr. It counts runs with a measured pager report, not trace-bearing runs. ADR 0036 is amended to say so; ADR 0091 is Accepted with its release.internal/ledger/rootcause.goholds kind, root cause, evidence and action for all 31 classes;ledger --failuresprints them. 16 are established and 15 are marked not investigated with what would settle each.infrastructuretonode_busy), an agent loop canceled by its parent context (budgettocanceled), a node whose job folder cannot be created (dispatch_refusedtoconfig). Two sentences leaveother.The real run and its output
Built to a scratch folder; the real ledger and delegation log were read only.
The one review, and what it changed
Verdict: concerns, one finding, fixed in
0daf6e70.The lease-hold refile read only the opening sentence of the reason, so a local seat held by a lease could file a dead or misconfigured fleet under a capacity class. A row whose reason also says a remote failed its health probe, no remote is configured, none passed the capability gate, or one advertises no context ceiling now stays
infrastructure. On the real ledger that keeps 17 of the 72 lease-hold rows in the window where they were stamped (each names one remote that failed its health probe beside remotes that were only full); 55 move tonode_busy. The numbers above are from the fixed build. The fix was run, not reviewed a second time.Gate:
go build ./...andgo vetclean;go testok for./internal/ledger,./internal/delegate,./internal/core, the root-package subset and the pipeline subset. The failure-register golden file was regenerated from the real verb; its diff is the new keys and catalogue text only.Blast radius
Every process that writes a ledger row adds up to three short fields to it. Readers that ignore unknown fields are unaffected. Failure counts per class move for the three refiled sentences; the totals do not.
Risk
The ledger write path. One review of that path ran before merge (above). Rows written before this build stay unstamped and are reported as such.
🤖 Generated with Claude Code