diff --git a/.printing-press.json b/.printing-press.json index bced47265..f5dcd3db7 100644 --- a/.printing-press.json +++ b/.printing-press.json @@ -1,7 +1,7 @@ { "api_name": "local-offload", "cli_name": "local-offload", - "version": "0.232.0", + "version": "0.233.0", "printing_press_version": "hand-built-2026-06-12", "generated_at": "2026-06-12", "description": "Local offload harness - delegate grunt work (summarize/classify/extract/triage, plus vision, OCR, transcription and media generation) to a free local Gemma-family cascade via llama.cpp; MCP + CLI; the cascade never calls cloud and defers to the caller instead. The opt-in offload_nim tool is the only remote model surface; the opt-in offload_browse lane drives the operator's own browser with typed choices from a loopback decision endpoint the operator runs.", diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c1398ead..e6e03f2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,32 @@ Releases before 0.190.0 are archived verbatim under [docs/changelog/](docs/chang ## [Unreleased] +## [0.233.0] - 2026-11-12 - Ledger rows carry their build, failure classes carry a cause + +### Fixed - the failure register files a lease hold, a loop cancellation and a node's folder fault under the class that names them + +- **What was wrong.** Three writers filed real failure rows under a class that does not describe them, and two sentences sat in `other`. A delegation to a local seat held by a text lease (`local seat reserved (gpu lease ...)`) was `infrastructure`, though it is a capacity hold and not a fault. The agent loop's `agent loop: canceled (the parent context ended ...)` was `budget`, though the closed set has `canceled`. A node's own folder failure (`agent contract: creating pipeline-jobs dir: ...`, which reaches the delegator as an ack-time 400) was `dispatch_refused`, a class defined as a fact about the request or the credentials, though the fault is the node's configuration. In `other`, a node's `a text lease holds its card; it may take the call later` is a capacity signal, and the browse door's own typed errors name classes. +- **Where each now goes.** The lease hold is `node_busy` (the class defined as the seat or card being held by other work; `capacity_wait` is the delegator finding no node with room, a different cause with a different fix). The loop cancellation is `canceled`. The folder fault is `config` (the node's configured home does not exist on that machine; `infrastructure` is for a part of the stack that failed while configured right). The node's lease sentence, matched whole, is `node_busy`; the browse door's `BROWSER_UNAVAILABLE` and `DECISION_UNAVAILABLE` are `infrastructure`, `HOST_NOT_ALLOWED` is `contract` and `budget` is `budget`. The browse door's `blocked` ties to no one class and stays in `other`. +- **How.** One function, `RefileStamped` in `internal/ledger/reasoncode.go`, holds the three misfilings, each needing both the old stamp and the writer's own sentence. `Record` applies it when it settles a row's code, so new rows are stamped right; the register applies it when it reads, so rows already in the ledger are counted right (they count in `class_derived_rows`; the ledger file is not rewritten). The five other sentences are rules in `DeferCode`. The wire defer class of the lease-hold defer is unchanged, so the exit code and the run summary still count it as infrastructure. No class is renamed and the JSON shape of `ledger --failures` is unchanged. +- **One exception, on purpose.** A lease hold whose remote fallback failed on a fault (every remote failed its health probe, no remote is configured, none passed the capability gate, or one advertises no context ceiling) stays `infrastructure`: a held local seat must not hide a dead or misconfigured fleet. A row that names a fault keeps the fault class even when other remotes were only full. On the real ledger, 30 days: of the 72 lease-hold rows the report counts, 55 name only remotes without room and move to `node_busy`; 17 also say another remote failed its health probe and stay `infrastructure`. +- **Docs.** The root-cause entries in `internal/ledger/rootcause.go` and the table on the failure-register page say what was fixed and that older rows are corrected at read time. +- **Check.** The built binary and the installed one, both read-only on the real ledger, `ledger --failures --since 30`: 2,566 failure rows of 8,784 job rows in both, no row added or lost. `infrastructure` 195 to 140, `budget` 250 to 236, `dispatch_refused` 145 to 115, `other` 55 to 30, and `node_busy` 628 to 704, `canceled` 29 to 46, `config` 2 to 32, `contract` 4 to 5. Every other class is unchanged, and the stack-fault share falls from 0.1142 to 0.1044 because the lease holds were counted as stack faults before. + +### Added - ledger rows and trace-corpus rows record which build produced them, and `ledger --failures --by-build` splits failures by build + +- **Ledger stamps.** `Record`, the one path every ledger row takes to disk, stamps the build of the writing process from the same self-hash and under the same names as the delegation log: `harness_build_sha256` on a row for work the process ran itself, `delegator_build_sha256` on a delegator's row (a delegation row and its dispatch marker, and any row naming a remote node). A delegation row also carries 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`, both only when the seat served. All three are omitted when empty; older rows still read and simply have none. No caller of `Record` changed except the delegate runner and the agent task, which hand over the two values only they hold. +- **Trace corpus.** `trace-corpus harvest` copies `delegator_build_sha256`, `harness_build_sha256` and `seat_config_sha256` from the delegation-log row into the corpus row, omitted when the log row has none. Before this the delegator build was on 17,054 of 17,095 log rows and on none of the 12,322 corpus rows. +- **Reader.** `local-offload ledger --failures --by-build` adds a `builds` key (build, job rows, failure rows, per-class counts) and a short table on stderr. A row is bucketed by the build that ran the work, else `delegator:`, else `unstamped`; the buckets add up to the report's job and failure totals. Without the flag the output is unchanged. +- **Docs.** The failure-register, mcp-server and self-improvement pages now say exactly which rows carry which stamp. +- **Check.** Built binary on the real ledger, read-only: `--by-build` puts all 10,942 failures (of 27,908 job rows) under `unstamped`, totals equal to the unsplit report, every other key identical. A classify call and two local delegations through the same binary into a scratch ledger wrote rows with the stamps, and the split showed them under that hash. `trace-corpus harvest` of the real delegation log into a scratch file: 12,291 of 12,329 corpus rows carry the delegator build, 11,652 the executing build, 10,645 the seat config. + +### Added - the recipe proposer's trigger is a printed count of measured runs, and every failure class carries a root cause and an action + +- **Proposer trigger (ADR 0036, amendment 2026-11-12).** The trigger for building the recipe proposer read "trace-bearing runs in the hundreds", and the corpus has 10,766 of those. The runs a proposer can learn from carry a measured pager report (`pager.measured_runs`: the loop evicted something, so the re-fetch question has an answer for that run), and the corpus has 31 of 12,332. The trigger is restated on that count, as a dated amendment, and the verb prints it: `trace-corpus trigger --corpus FILE` prints JSON (`needed`, `have`, `met`, the trace-bearing and total counts, the largest single seat's count) and `trace-corpus readout` prints the same as one stderr line. On the real corpus it reads `needed 100 / have 31 / NOT MET`; the largest single named seat has 10. The readout report itself is unchanged, so a frozen baseline still reproduces. The seat's frozen pre-registration, the other half of the trigger, is not in the corpus and is not judged. No proposer is built. +- **ADR 0091** is Accepted: the verb, the harvest, the readout and the pager and pass-count recording shipped in 0.206.0. Its status note records that the pager gate now reads `BELOW_GATE` on 31 runs (8 of 86 evicted payloads re-fetched) where its first readout read `NO_DATA`, and that 31 runs do not settle the `edit_context` question. +- **Root causes.** `internal/ledger/rootcause.go` holds, for each of the 31 failure classes, a cause kind (capacity signal, node configuration, harness defect, caller contract, upstream service, unknown), a root cause, the evidence (the emitting function and the 30-day count) and an action. `ledger --failures` prints them with each class as `classes[].cause` in the JSON and as text on stderr, with `causes_not_investigated` listing the open classes present in the window; the existing fields are unchanged. Where the code and the rows do not settle a cause the entry says `not investigated` and what would settle it: 15 of the 31 classes (4 of the 19 in the last 30 days), never a guessed cause. The table is on the failure-register page. +- **Check.** Built binary on the real corpus and ledger, read-only: `trace-corpus trigger` prints `needed 100 / have 31 / NOT MET` of 10,766 trace-bearing and 12,332 runs, matching the installed 0.232.0 build's counts; `ledger --failures --since 30` prints all 19 classes in the window with cause and action, 4 not investigated (`failed_verification`, `other`, `poll_deadline`, `stall_cold_load`), and every pre-existing field matches the build before the change apart from live rows written in between. + ## [0.232.0] - 2026-11-12 - the self-improvement instruments report what happened: trace-corpus guards, failure classes, selftest could-not-judge ### Fixed - the self-improvement instruments report what happened (trace-corpus guards, failure classes, selftest could-not-judge) diff --git a/VERSION b/VERSION index 5271d25d1..314316086 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.232.0 +0.233.0 diff --git a/changes/unreleased/feat-rsi-register-followups-2.md b/changes/unreleased/feat-rsi-register-followups-2.md deleted file mode 100644 index e63557d6f..000000000 --- a/changes/unreleased/feat-rsi-register-followups-2.md +++ /dev/null @@ -1,8 +0,0 @@ -### Fixed - the failure register files a lease hold, a loop cancellation and a node's folder fault under the class that names them - -- **What was wrong.** Three writers filed real failure rows under a class that does not describe them, and two sentences sat in `other`. A delegation to a local seat held by a text lease (`local seat reserved (gpu lease ...)`) was `infrastructure`, though it is a capacity hold and not a fault. The agent loop's `agent loop: canceled (the parent context ended ...)` was `budget`, though the closed set has `canceled`. A node's own folder failure (`agent contract: creating pipeline-jobs dir: ...`, which reaches the delegator as an ack-time 400) was `dispatch_refused`, a class defined as a fact about the request or the credentials, though the fault is the node's configuration. In `other`, a node's `a text lease holds its card; it may take the call later` is a capacity signal, and the browse door's own typed errors name classes. -- **Where each now goes.** The lease hold is `node_busy` (the class defined as the seat or card being held by other work; `capacity_wait` is the delegator finding no node with room, a different cause with a different fix). The loop cancellation is `canceled`. The folder fault is `config` (the node's configured home does not exist on that machine; `infrastructure` is for a part of the stack that failed while configured right). The node's lease sentence, matched whole, is `node_busy`; the browse door's `BROWSER_UNAVAILABLE` and `DECISION_UNAVAILABLE` are `infrastructure`, `HOST_NOT_ALLOWED` is `contract` and `budget` is `budget`. The browse door's `blocked` ties to no one class and stays in `other`. -- **How.** One function, `RefileStamped` in `internal/ledger/reasoncode.go`, holds the three misfilings, each needing both the old stamp and the writer's own sentence. `Record` applies it when it settles a row's code, so new rows are stamped right; the register applies it when it reads, so rows already in the ledger are counted right (they count in `class_derived_rows`; the ledger file is not rewritten). The five other sentences are rules in `DeferCode`. The wire defer class of the lease-hold defer is unchanged, so the exit code and the run summary still count it as infrastructure. No class is renamed and the JSON shape of `ledger --failures` is unchanged. -- **One exception, on purpose.** A lease hold whose remote fallback failed on a fault (every remote failed its health probe, no remote is configured, none passed the capability gate, or one advertises no context ceiling) stays `infrastructure`: a held local seat must not hide a dead or misconfigured fleet. A row that names a fault keeps the fault class even when other remotes were only full. On the real ledger, 30 days: of the 72 lease-hold rows the report counts, 55 name only remotes without room and move to `node_busy`; 17 also say another remote failed its health probe and stay `infrastructure`. -- **Docs.** The root-cause entries in `internal/ledger/rootcause.go` and the table on the failure-register page say what was fixed and that older rows are corrected at read time. -- **Check.** The built binary and the installed one, both read-only on the real ledger, `ledger --failures --since 30`: 2,566 failure rows of 8,784 job rows in both, no row added or lost. `infrastructure` 195 to 140, `budget` 250 to 236, `dispatch_refused` 145 to 115, `other` 55 to 30, and `node_busy` 628 to 704, `canceled` 29 to 46, `config` 2 to 32, `contract` 4 to 5. Every other class is unchanged, and the stack-fault share falls from 0.1142 to 0.1044 because the lease holds were counted as stack faults before. diff --git a/changes/unreleased/feat-rsi-register-followups.md b/changes/unreleased/feat-rsi-register-followups.md deleted file mode 100644 index 2df611b27..000000000 --- a/changes/unreleased/feat-rsi-register-followups.md +++ /dev/null @@ -1,7 +0,0 @@ -### Added - ledger rows and trace-corpus rows record which build produced them, and `ledger --failures --by-build` splits failures by build - -- **Ledger stamps.** `Record`, the one path every ledger row takes to disk, stamps the build of the writing process from the same self-hash and under the same names as the delegation log: `harness_build_sha256` on a row for work the process ran itself, `delegator_build_sha256` on a delegator's row (a delegation row and its dispatch marker, and any row naming a remote node). A delegation row also carries 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`, both only when the seat served. All three are omitted when empty; older rows still read and simply have none. No caller of `Record` changed except the delegate runner and the agent task, which hand over the two values only they hold. -- **Trace corpus.** `trace-corpus harvest` copies `delegator_build_sha256`, `harness_build_sha256` and `seat_config_sha256` from the delegation-log row into the corpus row, omitted when the log row has none. Before this the delegator build was on 17,054 of 17,095 log rows and on none of the 12,322 corpus rows. -- **Reader.** `local-offload ledger --failures --by-build` adds a `builds` key (build, job rows, failure rows, per-class counts) and a short table on stderr. A row is bucketed by the build that ran the work, else `delegator:`, else `unstamped`; the buckets add up to the report's job and failure totals. Without the flag the output is unchanged. -- **Docs.** The failure-register, mcp-server and self-improvement pages now say exactly which rows carry which stamp. -- **Check.** Built binary on the real ledger, read-only: `--by-build` puts all 10,942 failures (of 27,908 job rows) under `unstamped`, totals equal to the unsplit report, every other key identical. A classify call and two local delegations through the same binary into a scratch ledger wrote rows with the stamps, and the split showed them under that hash. `trace-corpus harvest` of the real delegation log into a scratch file: 12,291 of 12,329 corpus rows carry the delegator build, 11,652 the executing build, 10,645 the seat config. diff --git a/changes/unreleased/feat-rsi-trigger-rootcause.md b/changes/unreleased/feat-rsi-trigger-rootcause.md deleted file mode 100644 index 7e88f98a6..000000000 --- a/changes/unreleased/feat-rsi-trigger-rootcause.md +++ /dev/null @@ -1,6 +0,0 @@ -### Added - the recipe proposer's trigger is a printed count of measured runs, and every failure class carries a root cause and an action - -- **Proposer trigger (ADR 0036, amendment 2026-11-12).** The trigger for building the recipe proposer read "trace-bearing runs in the hundreds", and the corpus has 10,766 of those. The runs a proposer can learn from carry a measured pager report (`pager.measured_runs`: the loop evicted something, so the re-fetch question has an answer for that run), and the corpus has 31 of 12,332. The trigger is restated on that count, as a dated amendment, and the verb prints it: `trace-corpus trigger --corpus FILE` prints JSON (`needed`, `have`, `met`, the trace-bearing and total counts, the largest single seat's count) and `trace-corpus readout` prints the same as one stderr line. On the real corpus it reads `needed 100 / have 31 / NOT MET`; the largest single named seat has 10. The readout report itself is unchanged, so a frozen baseline still reproduces. The seat's frozen pre-registration, the other half of the trigger, is not in the corpus and is not judged. No proposer is built. -- **ADR 0091** is Accepted: the verb, the harvest, the readout and the pager and pass-count recording shipped in 0.206.0. Its status note records that the pager gate now reads `BELOW_GATE` on 31 runs (8 of 86 evicted payloads re-fetched) where its first readout read `NO_DATA`, and that 31 runs do not settle the `edit_context` question. -- **Root causes.** `internal/ledger/rootcause.go` holds, for each of the 31 failure classes, a cause kind (capacity signal, node configuration, harness defect, caller contract, upstream service, unknown), a root cause, the evidence (the emitting function and the 30-day count) and an action. `ledger --failures` prints them with each class as `classes[].cause` in the JSON and as text on stderr, with `causes_not_investigated` listing the open classes present in the window; the existing fields are unchanged. Where the code and the rows do not settle a cause the entry says `not investigated` and what would settle it: 15 of the 31 classes (4 of the 19 in the last 30 days), never a guessed cause. The table is on the failure-register page. -- **Check.** Built binary on the real corpus and ledger, read-only: `trace-corpus trigger` prints `needed 100 / have 31 / NOT MET` of 10,766 trace-bearing and 12,332 runs, matching the installed 0.232.0 build's counts; `ledger --failures --since 30` prints all 19 classes in the window with cause and action, 4 not investigated (`failed_verification`, `other`, `poll_deadline`, `stall_cold_load`), and every pre-existing field matches the build before the change apart from live rows written in between. diff --git a/internal/buildinfo/buildinfo.go b/internal/buildinfo/buildinfo.go index a99225fce..8bb02ae97 100644 --- a/internal/buildinfo/buildinfo.go +++ b/internal/buildinfo/buildinfo.go @@ -29,7 +29,7 @@ import ( // `version` const aliases it (keeping the VERSION-file agreement test in // main_test.go binding), and fleet/pipeline stampers read it directly so no // plumbing carries it through config. -const Version = "0.232.0" +const Version = "0.233.0" var ( buildOnce sync.Once