diff --git a/.printing-press.json b/.printing-press.json index f5dcd3db7..b544f2d61 100644 --- a/.printing-press.json +++ b/.printing-press.json @@ -1,7 +1,7 @@ { "api_name": "local-offload", "cli_name": "local-offload", - "version": "0.233.0", + "version": "0.234.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 e6e03f2fe..84e1cd5bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ Releases before 0.190.0 are archived verbatim under [docs/changelog/](docs/chang ## [Unreleased] +## [0.234.0] - 2026-11-12 - Research digests that are right stop failing, and every failure class has a cause + +### Fixed - the failure register files 31 more rows under the class that names them, and the four classes it had not investigated now carry their causes + +- **What was wrong.** After the last release 30 failure rows still sat in `other` and 3 in `poll_deadline`, and four classes read "not investigated" (`failed_verification` 357 rows, `other`, `poll_deadline` 3, `stall_cold_load` 4). The rows in `other` were lane refusals and transport faults whose sentences or error classes no rule named. The 3 `poll_deadline` rows were not that class: each ends on a last poll error, so the node had stopped answering, not kept working past the allowance. One audio row was filed `failed_verification` though the audio was never judged (ffmpeg or ffprobe was missing). +- **Where each row now goes.** `no node that answered is called ...` (8 rows) is `node_busy`, the class the lane's own defer already files for new rows through its wire class. A dispatch whose connection could not be made (1), `N consecutive poll failures` (1), `rendered the job but fetching it failed` (1) and the 3 poll-deadline rows with a last poll error are `node_unreachable`. Error class `no_node_configured` (2) and the audio QA's missing-ffmpeg dead air (1) are `config`. `media convert: convert: in and out are required` (1) and error class `lint_errors` (1) are `bad_input`. `reasoning tier: low classify confidence ...` (3) is `abstention`. Compose's `check_failed` (5) is `failed_verification`, and the browse door's `blocked` (4) is `abstention`. +- **Two readings that are a choice.** `rendered the job but fetching it failed` is `node_unreachable` (the fetch dropped), with `infrastructure` the other reading because the render itself succeeded. Compose `check_failed` is `failed_verification` (the lane's own checks of the composition failed), with `bad_input` the other reading because the caller wrote the composition. Both are one-line rule changes. +- **The browse `blocked` rows.** `browse: blocked: the model or the loop reported no progress` (4 rows, one caller retrying within 4 minutes) is `abstention`: the loop ended with no usable answer. Why the page could not be driven is a separate question the row cannot answer. It is a prefix rule on the door's own sentence and not an error-class entry, because the word `blocked` means other things elsewhere; the prefix is reached because the error class is not in the table. +- **Left alone on purpose.** The 3 `generate_svg` rows with no reason, no reason code and no door cannot be traced. `other` is 3 rows. +- **How.** Each rule needs the writer's own fixed words. `media convert: convert: in and out are required` and `reasoning tier: low classify confidence ` are matched as whole sentences, not as the bare prefixes `media convert:` and `reasoning tier: `, because `media : ` also wraps what ffmpeg reported and `reasoning tier: ` wraps other verifier wordings. Three new error classes are in `errClassCodes`; the dispatch, poll-failure and fetch sentences are in `legacyReasonCode`; the poll-deadline and audio rules are in `RefileStamped` and each needs both the old stamp and the writer's sentence, so no other row of those classes moves. The pin test `TestEveryCoreErrClassHasALedgerReasonCode` listed every error class but `no_node_configured`; it does now. +- **Causes.** `internal/ledger/rootcause.go` now holds the findings, with their counts and the day measured, and says where the evidence stops. `failed_verification` is a harness defect for the research lane's own checks: of 357 rows, 307 are those checks rejecting answers that were right or honest, of which 202 are established by comparing the digest to the page and 105 rest on the seat's own statement; 10 are seat misses, 4 a caller regex over-escaped, 1 a misfile, 35 undetermined. `poll_deadline` is an upstream node that stopped answering (why is not settled). `stall_cold_load` is one placement and filing defect on 2026-11-04: the placer put a long-context subtask on a seat that shares the pair's cards with the pool seat, and the monitor filed the wait behind the swap as a cold-load stall. `other` is a bundle of misfiled sentences, not one cause. The research acceptance fix ships in the same release: a digest that quotes its page is excused from the page-word tripwire, `research.Build` derives a `nonempty:` check over the caller's required fields in place of `min_items::1`, and an HTML page under 150 characters of text is refused before dispatch as a skipped source. An offline replay of the saved pages and answers (which reproduced every saved verdict, 356 fail and 4,622 pass) gives, of the 356 failed rows with a job id, 167 now pass, 16 are refused as pages with no content and 173 still fail (10 not research); of the 4,622 passes, 4,513 still pass, 109 are refused as pages with no content and none fails. Rows already written keep their class, so none of the register's 30-day counts changes from it. The follow-ups the entry still names (count the call's own siblings in `pairLong`, record the answer and the acceptance kind on the ledger row, stop stamping a poll deadline with a last poll error as `poll_deadline` at the writer) are not made here. +- **Docs.** The catalogue copy and the rule lists on `docs/systems/failure-register.md` match the code; `causes_not_investigated` is empty in the window. +- **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,785 job rows in both, the sum over classes unchanged. `other` 30 to 3, `poll_deadline` 3 to 0, `node_busy` 704 to 712, `node_unreachable` 3 to 9, `failed_verification` 357 to 361, `abstention` 221 to 228, `config` 32 to 35, `bad_input` 2 to 4; every other class is unchanged. `causes_not_investigated` went from `failed_verification`, `other`, `poll_deadline`, `stall_cold_load` to none. Two further rows of the `no_node_configured` class are measurement runs the register leaves out. + +### Fixed - the research lane stops failing digests that are right: a digest that quotes its page, an honest "none", and a page with no content + +- **What was wrong.** In the 30 days to 2026-11-12, 346 of the 356 `failed_verification` rows with a job id were research pages, and three checks the lane writes itself were failing answers that were right. (1) The page-word tripwire (`docanchor`) takes twenty-four prose words of the page that the goal does not contain and asks the loop's final prose to restate one; a digest of a narrow goal restates the goal's words and the page's figures, so 282 digests failed it, and the digests of 187 of them hold strings found on the page word for word. (2) A caller's schema that lists an array in `required` got `min_items::1`, which failed the digest the goal asks for when the page has no such content (an empty list and a sentence that says so): 70 digests failed it, and 64 of those failed nothing else. (3) A page with no content (a title, a cookie gate, a login wall) was dispatched as a full run: 16 of the failures and 109 of the passes were pages under 150 characters. Each acceptance-only failure discarded a whole run and was not retried. +- **What changed (1).** `delegate.DigestGrounded` excuses a failed fingerprint, in the same place and for the same reasons as the honest-absence excuse (so the merge gate, the quarantine and the retry rule read one answer), when the decoded digest holds one string of at least 60 characters, or two different strings of at least 15, found in the contract's own context documents with the quote check's lookup (case, spacing, quote marks and dashes set aside). A string the goal also contains counts for nothing, so the goal echoed back, the page's title and URL and sentences pasted into the goal cannot ground a digest. It only excuses: the node that wrote the digest is neither struck nor counted as passing. +- **What changed (2).** `research.Build` derives `nonempty:||...` over the caller's required fields (a value in any one of them) in place of the item count, for a schema that lists an array in `required` and for no other. It fails a digest silent in every required field, and can only fail what the item count failed; a caller who wants items writes `min_items:` themselves. +- **What changed (3).** `research.Build` refuses an HTML page whose text is under `research.MinPageRunes` (150 characters) before any seat is spent on it: a skipped source with `error_kind` `empty_page`. JSON, plain text, feeds and subtitle tracks are never refused by length. A skipped source writes no ledger row, as for every other skipped source; `bad_input` is the class a row would carry. +- **Thresholds, and the data behind each.** The 60 and 15 characters and the two strings come from a grid of rules scored on the 282 fingerprint failures and on pairs of each of the 4,968 digests of those 30 days with three pages of other sites and up to three of the same site: a digest paired with an unrelated page of another site is grounded in 7 of 14,904 pairs (0.05 %), against 0.2 to 1.2 % when short figures also count; 11 % of same-site pairs are grounded (shared footers, price tables, one page under two addresses), which is why the rule is an excuse for a digest written from this page and not a proof against its own site. The 150 characters stop where nearly all that is refused is a shell: of the 109 passing pages that were not JSON, a handful were short real text. +- **Check.** An offline replay of the saved pages and answers through `research.Build` and the merge gate (`delegate.EvalAcceptanceGraded`), read-only on the ledger and the delegation log. The original code reproduces every saved verdict (356 failed rows fail, 4,622 passed rows pass). With the change: of the 356, 167 pass (125 of the 282 fingerprint failures by quoting the page, 42 of the 64 item-count failures), 16 are refused as pages with no content, 173 still fail (10 are not research); of the 4,622 passes, 4,513 still pass, 109 are refused as pages with no content and none fails. Planted negatives from real rows: a digest paired with another site's page and rejected by the fingerprint stays rejected (0 of 200 newly accepted by the grounding rule), digests whose strings were altered so they are not on the page stay rejected (0 of 176), a silent empty digest fails (0 of 200 with a closing word), the goal echoed back fails (0 of 100). The known limit, as before and now for caller schemas too: a seat that says "none" for a page that holds the items is believed (200 of 200 planted pass the fingerprint through the honest-absence excuse; 24 of them, under a caller's schema, were failed by the item count before). One test drives the lane's public path with a page and digest per case. +- **Docs.** `docs/systems/mcp-server.md` (research acceptance, the derived check, skipped sources). The two tests that pinned the item-count check now pin the any-of check. + ## [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 diff --git a/VERSION b/VERSION index 314316086..97bfa853d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.233.0 +0.234.0 diff --git a/changes/unreleased/fix-register-rules-and-causes.md b/changes/unreleased/fix-register-rules-and-causes.md deleted file mode 100644 index 6b0676381..000000000 --- a/changes/unreleased/fix-register-rules-and-causes.md +++ /dev/null @@ -1,11 +0,0 @@ -### Fixed - the failure register files 31 more rows under the class that names them, and the four classes it had not investigated now carry their causes - -- **What was wrong.** After the last release 30 failure rows still sat in `other` and 3 in `poll_deadline`, and four classes read "not investigated" (`failed_verification` 357 rows, `other`, `poll_deadline` 3, `stall_cold_load` 4). The rows in `other` were lane refusals and transport faults whose sentences or error classes no rule named. The 3 `poll_deadline` rows were not that class: each ends on a last poll error, so the node had stopped answering, not kept working past the allowance. One audio row was filed `failed_verification` though the audio was never judged (ffmpeg or ffprobe was missing). -- **Where each row now goes.** `no node that answered is called ...` (8 rows) is `node_busy`, the class the lane's own defer already files for new rows through its wire class. A dispatch whose connection could not be made (1), `N consecutive poll failures` (1), `rendered the job but fetching it failed` (1) and the 3 poll-deadline rows with a last poll error are `node_unreachable`. Error class `no_node_configured` (2) and the audio QA's missing-ffmpeg dead air (1) are `config`. `media convert: convert: in and out are required` (1) and error class `lint_errors` (1) are `bad_input`. `reasoning tier: low classify confidence ...` (3) is `abstention`. Compose's `check_failed` (5) is `failed_verification`, and the browse door's `blocked` (4) is `abstention`. -- **Two readings that are a choice.** `rendered the job but fetching it failed` is `node_unreachable` (the fetch dropped), with `infrastructure` the other reading because the render itself succeeded. Compose `check_failed` is `failed_verification` (the lane's own checks of the composition failed), with `bad_input` the other reading because the caller wrote the composition. Both are one-line rule changes. -- **The browse `blocked` rows.** `browse: blocked: the model or the loop reported no progress` (4 rows, one caller retrying within 4 minutes) is `abstention`: the loop ended with no usable answer. Why the page could not be driven is a separate question the row cannot answer. It is a prefix rule on the door's own sentence and not an error-class entry, because the word `blocked` means other things elsewhere; the prefix is reached because the error class is not in the table. -- **Left alone on purpose.** The 3 `generate_svg` rows with no reason, no reason code and no door cannot be traced. `other` is 3 rows. -- **How.** Each rule needs the writer's own fixed words. `media convert: convert: in and out are required` and `reasoning tier: low classify confidence ` are matched as whole sentences, not as the bare prefixes `media convert:` and `reasoning tier: `, because `media : ` also wraps what ffmpeg reported and `reasoning tier: ` wraps other verifier wordings. Three new error classes are in `errClassCodes`; the dispatch, poll-failure and fetch sentences are in `legacyReasonCode`; the poll-deadline and audio rules are in `RefileStamped` and each needs both the old stamp and the writer's sentence, so no other row of those classes moves. The pin test `TestEveryCoreErrClassHasALedgerReasonCode` listed every error class but `no_node_configured`; it does now. -- **Causes.** `internal/ledger/rootcause.go` now holds the findings, with their counts and the day measured, and says where the evidence stops. `failed_verification` is a harness defect for the research lane's own checks: of 357 rows, 307 are those checks rejecting answers that were right or honest, of which 202 are established by comparing the digest to the page and 105 rest on the seat's own statement; 10 are seat misses, 4 a caller regex over-escaped, 1 a misfile, 35 undetermined. `poll_deadline` is an upstream node that stopped answering (why is not settled). `stall_cold_load` is one placement and filing defect on 2026-11-04: the placer put a long-context subtask on a seat that shares the pair's cards with the pool seat, and the monitor filed the wait behind the swap as a cold-load stall. `other` is a bundle of misfiled sentences, not one cause. The research acceptance fix ships in the same release: a digest that quotes its page is excused from the page-word tripwire, `research.Build` derives a `nonempty:` check over the caller's required fields in place of `min_items::1`, and an HTML page under 150 characters of text is refused before dispatch as a skipped source. An offline replay of the saved pages and answers (which reproduced every saved verdict, 356 fail and 4,622 pass) gives, of the 356 failed rows with a job id, 167 now pass, 16 are refused as pages with no content and 173 still fail (10 not research); of the 4,622 passes, 4,513 still pass, 109 are refused as pages with no content and none fails. Rows already written keep their class, so none of the register's 30-day counts changes from it. The follow-ups the entry still names (count the call's own siblings in `pairLong`, record the answer and the acceptance kind on the ledger row, stop stamping a poll deadline with a last poll error as `poll_deadline` at the writer) are not made here. -- **Docs.** The catalogue copy and the rule lists on `docs/systems/failure-register.md` match the code; `causes_not_investigated` is empty in the window. -- **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,785 job rows in both, the sum over classes unchanged. `other` 30 to 3, `poll_deadline` 3 to 0, `node_busy` 704 to 712, `node_unreachable` 3 to 9, `failed_verification` 357 to 361, `abstention` 221 to 228, `config` 32 to 35, `bad_input` 2 to 4; every other class is unchanged. `causes_not_investigated` went from `failed_verification`, `other`, `poll_deadline`, `stall_cold_load` to none. Two further rows of the `no_node_configured` class are measurement runs the register leaves out. diff --git a/changes/unreleased/fix-research-acceptance-false-rejections.md b/changes/unreleased/fix-research-acceptance-false-rejections.md deleted file mode 100644 index b538a73df..000000000 --- a/changes/unreleased/fix-research-acceptance-false-rejections.md +++ /dev/null @@ -1,9 +0,0 @@ -### Fixed - the research lane stops failing digests that are right: a digest that quotes its page, an honest "none", and a page with no content - -- **What was wrong.** In the 30 days to 2026-11-12, 346 of the 356 `failed_verification` rows with a job id were research pages, and three checks the lane writes itself were failing answers that were right. (1) The page-word tripwire (`docanchor`) takes twenty-four prose words of the page that the goal does not contain and asks the loop's final prose to restate one; a digest of a narrow goal restates the goal's words and the page's figures, so 282 digests failed it, and the digests of 187 of them hold strings found on the page word for word. (2) A caller's schema that lists an array in `required` got `min_items::1`, which failed the digest the goal asks for when the page has no such content (an empty list and a sentence that says so): 70 digests failed it, and 64 of those failed nothing else. (3) A page with no content (a title, a cookie gate, a login wall) was dispatched as a full run: 16 of the failures and 109 of the passes were pages under 150 characters. Each acceptance-only failure discarded a whole run and was not retried. -- **What changed (1).** `delegate.DigestGrounded` excuses a failed fingerprint, in the same place and for the same reasons as the honest-absence excuse (so the merge gate, the quarantine and the retry rule read one answer), when the decoded digest holds one string of at least 60 characters, or two different strings of at least 15, found in the contract's own context documents with the quote check's lookup (case, spacing, quote marks and dashes set aside). A string the goal also contains counts for nothing, so the goal echoed back, the page's title and URL and sentences pasted into the goal cannot ground a digest. It only excuses: the node that wrote the digest is neither struck nor counted as passing. -- **What changed (2).** `research.Build` derives `nonempty:||...` over the caller's required fields (a value in any one of them) in place of the item count, for a schema that lists an array in `required` and for no other. It fails a digest silent in every required field, and can only fail what the item count failed; a caller who wants items writes `min_items:` themselves. -- **What changed (3).** `research.Build` refuses an HTML page whose text is under `research.MinPageRunes` (150 characters) before any seat is spent on it: a skipped source with `error_kind` `empty_page`. JSON, plain text, feeds and subtitle tracks are never refused by length. A skipped source writes no ledger row, as for every other skipped source; `bad_input` is the class a row would carry. -- **Thresholds, and the data behind each.** The 60 and 15 characters and the two strings come from a grid of rules scored on the 282 fingerprint failures and on pairs of each of the 4,968 digests of those 30 days with three pages of other sites and up to three of the same site: a digest paired with an unrelated page of another site is grounded in 7 of 14,904 pairs (0.05 %), against 0.2 to 1.2 % when short figures also count; 11 % of same-site pairs are grounded (shared footers, price tables, one page under two addresses), which is why the rule is an excuse for a digest written from this page and not a proof against its own site. The 150 characters stop where nearly all that is refused is a shell: of the 109 passing pages that were not JSON, a handful were short real text. -- **Check.** An offline replay of the saved pages and answers through `research.Build` and the merge gate (`delegate.EvalAcceptanceGraded`), read-only on the ledger and the delegation log. The original code reproduces every saved verdict (356 failed rows fail, 4,622 passed rows pass). With the change: of the 356, 167 pass (125 of the 282 fingerprint failures by quoting the page, 42 of the 64 item-count failures), 16 are refused as pages with no content, 173 still fail (10 are not research); of the 4,622 passes, 4,513 still pass, 109 are refused as pages with no content and none fails. Planted negatives from real rows: a digest paired with another site's page and rejected by the fingerprint stays rejected (0 of 200 newly accepted by the grounding rule), digests whose strings were altered so they are not on the page stay rejected (0 of 176), a silent empty digest fails (0 of 200 with a closing word), the goal echoed back fails (0 of 100). The known limit, as before and now for caller schemas too: a seat that says "none" for a page that holds the items is believed (200 of 200 planted pass the fingerprint through the honest-absence excuse; 24 of them, under a caller's schema, were failed by the item count before). One test drives the lane's public path with a page and digest per case. -- **Docs.** `docs/systems/mcp-server.md` (research acceptance, the derived check, skipped sources). The two tests that pinned the item-count check now pin the any-of check. diff --git a/internal/buildinfo/buildinfo.go b/internal/buildinfo/buildinfo.go index 8bb02ae97..968fe9ebd 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.233.0" +const Version = "0.234.0" var ( buildOnce sync.Once