Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(changelog): the 0.60.189.0 entry names migrations v241/v242, the numbers it merged with

garrytan208b0a5fd823
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 727d8932d1..3a0b189126 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@ identifiers and attribution are available in the pre-removal Git revision
## [0.60.189.0] - 2026-10-12
-**Fix wave 16: a page purge no longer holds its source hostage, duplicate-origin twins can be retired, managed sync's leftover bookkeeping has a repair instead of a permanent red doctor, fact extraction stops refusing whole entities for one forgotten claim, long items are no longer certified complete when the model read only their head, four community CLI and platform fixes land, the three test files failing CI without a product bug are fixed at the root, and the nightly routing eval is green again (#6511, #6517, #6518, #6513 follow-ups, #6506, #6523, #6503, #6333, #6521, #6512, #6514, #6510, #5312 in part, #6040, #6495 in part).** `gbrain delete <slug> --purge` searched the source's whole write journal inside its 5-second publication transaction and a timeout there was requeued forever, blocking every later write to the source; the search now runs at preparation under the preparation budget and the in-transaction lookups fail terminally. Two live pages recording one file had no supported exit short of raw SQL; a soft delete now keeps the file and hides the page. On a managed brain one forgotten claim refused the entity's whole fact group; the claim is skipped and counted. `extract_atoms` stamped an item complete after reading a 50,000-character head and could later retire the atoms a larger cap had produced from the tail; it now records the item as partial. Two additive migrations (v240 online index, v241 nullable column), no paid model call added, no change to any weights file. Plan reviewed by three voices and approved by Garry on 2026-10-12.
+**Fix wave 16: a page purge no longer holds its source hostage, duplicate-origin twins can be retired, managed sync's leftover bookkeeping has a repair instead of a permanent red doctor, fact extraction stops refusing whole entities for one forgotten claim, long items are no longer certified complete when the model read only their head, four community CLI and platform fixes land, the three test files failing CI without a product bug are fixed at the root, and the nightly routing eval is green again (#6511, #6517, #6518, #6513 follow-ups, #6506, #6523, #6503, #6333, #6521, #6512, #6514, #6510, #5312 in part, #6040, #6495 in part).** `gbrain delete <slug> --purge` searched the source's whole write journal inside its 5-second publication transaction and a timeout there was requeued forever, blocking every later write to the source; the search now runs at preparation under the preparation budget and the in-transaction lookups fail terminally. Two live pages recording one file had no supported exit short of raw SQL; a soft delete now keeps the file and hides the page. On a managed brain one forgotten claim refused the entity's whole fact group; the claim is skipped and counted. `extract_atoms` stamped an item complete after reading a 50,000-character head and could later retire the atoms a larger cap had produced from the tail; it now records the item as partial. Two additive migrations (v241 online index, v242 nullable column), no paid model call added, no change to any weights file. Plan reviewed by three voices and approved by Garry on 2026-10-12.
### Itemized changes
@@ -20,7 +20,7 @@ identifiers and attribution are available in the pre-removal Git revision
- **Page purge journal sweep at preparation (#6511).** `preparePagePurge` (`src/core/persistence/page-purge.ts`) reads the page's claims (fact rows and takes filed on the page, trimmed, 8 characters or longer, at most 32 needles) and runs `sweepRequestsCarrying` (`intent-redaction.ts`) at claim steps `purge_claims` / `purge_journal_sweep`: a keyset walk of the source's journal in 2,000-row chunks, every needle in raw and JSON-escaped form against intent, outcome, error detail and error message, compacted rows included, stopped by the claim clock between chunks and at the 10,000-match cap. The sweep records the `sequence` ceiling and the rows pending at the scan; the publication transaction re-checks only the tail past the ceiling and those rows, so a carrying request admitted-then-cancelled or settled after the scan is still redacted and a request still queued at publication is left in place. The committed receipt reports `journal_sweep` (`ceiling`, `scanned`, `tail`, `pending_rechecked`, `complete`); `complete: false` means a cap was hit and is never swallowed. A sweep that outruns the preparation budget is a charged `preparation_deadline` release and `preparation_stalled` at the attempt limit, never a transaction timeout.
- **`purge_lookup_timeout` (#6511).** The lookups that stay inside the transaction (the slug lookup, the tail and pending re-checks, the locking read of `redactRequestIntents`) map a 57014 statement timeout to the terminal, non-retryable `purge_lookup_timeout` on the first claim: nothing removed, tombstoned or redacted, the failed receipt retained, a following write to the source commits, a same-id retry returns the failure and a new `request_id` is admitted. The message names `gbrain repair request-indexes --apply` only when the slug index is missing or INVALID. Registry row (`class: caller`, `actor: host_admin`), `docs/guides/write-refusals.md#purge_lookup_timeout`. `purge_fact` (`src/core/facts/purge.ts`) maps the same timeout of its planning read to the same code.
-- **Migration v240 `persistence_request_slug_intent_index` (#6511).** Partial index `persistence_requests_slug_intent ON persistence_requests(source_id,slug,sequence) WHERE intent IS NOT NULL AND NOT compacted`, built online in the `v179` shape (`transaction: false`, CONCURRENTLY on Postgres after dropping an INVALID leftover, inline on PGLite). `readRequestIndexStates`, doctor `persistence_request_indexes` and `gbrain repair request-indexes` cover it through `PERSISTENCE_REQUEST_ONLINE_INDEXES`. DDL only: no column, no backfill.
+- **Migration v241 `persistence_request_slug_intent_index` (#6511).** Partial index `persistence_requests_slug_intent ON persistence_requests(source_id,slug,sequence) WHERE intent IS NOT NULL AND NOT compacted`, built online in the `v179` shape (`transaction: false`, CONCURRENTLY on Postgres after dropping an INVALID leftover, inline on PGLite). `readRequestIndexStates`, doctor `persistence_request_indexes` and `gbrain repair request-indexes` cover it through `PERSISTENCE_REQUEST_ONLINE_INDEXES`. DDL only: no column, no backfill.
- **Fault seams (#6511).** `purge:slug_lookup`, `purge:tail_recheck`, `purge:pending_recheck`, `purge:redaction_read`, `purge:sweep_chunk`, `purge:carrying_lookup` in `fault-points.ts`; production never installs a hook; the tests inject a 57014 or a stall at these seams, never through an SQL substring.
- **One origin rule (#6517).** `selectOriginClaimant` (`src/core/persistence/sync-origin.ts`) decides which page an origin file identifies when several pages record it: a live page wins over tombstones; several live pages refuse; a single tombstone may be reused; several tombstones stay ambiguous. Discovery's census (`sync-discovery.ts`, the one-statement identity snapshot now carries `deleted_at`) and `assertSyncPageOrigin` both apply it, so a soft-deleted twin no longer blocks the survivor's imports; the `page_identity_changed` refusals for several live claimants name the soft-delete exit. `assertSoleFileClaim` (`reconcile-state.ts`) uses the same census.
- **Shared-origin soft delete (#6517).** `delete_page` of a page whose file another live page of the source records (`findLiveFileClaimants`, new `src/core/persistence/file-claims.ts`) keeps the file and publishes database-only before any byte comparison: receipt `write_through.skipped: 'shared_origin'` with the warning "The selected database page is hidden; the file and the surviving page remain. This does not erase that file's contents." and the `gbrain sync --source <id> --no-pull --full` that imports the kept file into the surviving page. The survivor is revalidated under the publication guards; the file moved or removed, or a different set of claimants, refuses `source_changed` and never removes the file as a fallback. A purge of a shared-origin page refuses and names the soft delete. The receipt names the surviving slug to the trusted local owner and to a remote writer whose grant, delegated namespace and page visibility independently cover it (`slugDisclosable`, `authority.ts`); every other remote writer reads "Another page of this source records the same file." with no slug and no path.
@@ -35,7 +35,7 @@ identifiers and attribution are available in the pre-removal Git revision
- **Managed automatic fact extraction skips a forgotten claim instead of refusing the entity (#6506; supersedes #6507, contributed by @BichengWang).** Sync import, `put_page`, `extract_facts` and the sweep skip a candidate whose exact claim was forgotten in that source and visibility and publish the entity's other facts, counting the skips as `withdrawn_skipped` on the entity and completion receipts and the extraction result; before, one forgotten claim refused the whole group with `fact_withdrawn`. `remember` of the forgotten claim and a purge tombstone still refuse. A claim forgotten between preparation and publication refuses that entity's write with `revision_conflict` and a detail naming the withdrawal. An input-keyed extraction recovers from such a refusal, and from a batch an older release refused for a forgotten claim, on its next run: the retained facts are re-admitted as a follow-up batch with no model call (`followWithdrawalRefusals`), at most three times per batch, historical receipts untouched.
- **The claude-cli provider maps Claude Code's output-cap envelope to `finishReason: 'length'` (#6523; supersedes #6525, contributed by @javieraldape).** "API Error: Claude's response exceeded the N output token maximum…" (any cap, any exit code, no `api_error_status`) becomes a length-limited answer with empty text and the usage as reported, so the escalation ladders fire again: `loops_extract` 2048 → 8192 and the facts extractor 1× → 2×. Every other error envelope stays a typed `ClaudeCliProcessError`.
-- **`extract_atoms` no longer certifies an item complete when its text was cut at `cycle.extract_atoms.max_input_chars` (#6503; report and first visibility slice by @herman6888).** The head is extracted once and its atoms kept, but no completion stamp is written, no earlier atom is retired, the phase result and `gbrain dream --drain` count the item under `input_truncated` with a stderr line naming the knob, and the item is skipped with no model call until the cap rises or its content changes. Migration v241 adds nullable `partial_input_chars` to the two extract_atoms state tables; a managed brain records `partial` on the item's checkpoint and the completion receipt reads `status: 'partial'`. The cut moves to new `src/core/cycle/extract-atoms-input.ts`. #6503 stays open for the chunk+overlap feature.
+- **`extract_atoms` no longer certifies an item complete when its text was cut at `cycle.extract_atoms.max_input_chars` (#6503; report and first visibility slice by @herman6888).** The head is extracted once and its atoms kept, but no completion stamp is written, no earlier atom is retired, the phase result and `gbrain dream --drain` count the item under `input_truncated` with a stderr line naming the knob, and the item is skipped with no model call until the cap rises or its content changes. Migration v242 adds nullable `partial_input_chars` to the two extract_atoms state tables; a managed brain records `partial` on the item's checkpoint and the completion receipt reads `status: 'partial'`. The cut moves to new `src/core/cycle/extract-atoms-input.ts`. #6503 stays open for the chunk+overlap feature.
- **The #6333 same-page rewording shadow counter also fires on a managed brain.** New `src/core/facts/same-page-shadow.ts` is shared by the backstop and `facts-prepare.ts`; managed extraction counts `would_dedup_same_page` on the entity and completion receipts and the `extract_facts` result and prints the same stderr line; nothing is dropped; the measurement can now accumulate on a managed brain (#6334 stays open).
- **Two managed enumeration regressions for the #6500 contract**, carried as already-green tests in `test/conversation-facts-managed.test.ts` (the production fix landed in #6516): a slug keyset drains a 23-page timestamp tie without crossing source, type or soft-deletion fences, and a 13-page extraction walk survives a mid-run edit of its oldest unvisited page (supersedes #6515, contributed by @javieraldape).
- #6508 (conversation segment tail clip) was already fixed by v0.60.177.0's window bounding; closed with that pointer.
@@ -77,8 +77,8 @@ identifiers and attribution are available in the pre-removal Git revision
### Migrations
-- v240 `persistence_request_slug_intent_index`: online partial index on `persistence_requests(source_id, slug, sequence)`, `transaction: false`, CONCURRENTLY on Postgres, inline on PGLite. DDL only.
-- v241 `extract_atoms_partial_input`: `ADD COLUMN IF NOT EXISTS partial_input_chars INTEGER` on `extract_atoms_page_state` and `extract_atoms_transcript_state`. Metadata-only, no backfill.
+- v241 `persistence_request_slug_intent_index`: online partial index on `persistence_requests(source_id, slug, sequence)`, `transaction: false`, CONCURRENTLY on Postgres, inline on PGLite. DDL only.
+- v242 `extract_atoms_partial_input`: `ADD COLUMN IF NOT EXISTS partial_input_chars INTEGER` on `extract_atoms_page_state` and `extract_atoms_transcript_state`. Metadata-only, no backfill.
## [0.60.188.0] - 2026-10-12