Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.106.0 docs(release): fix wave 12 CHANGELOG, behavior-change rows and TODOS follow-ups
time-attack41c76b1235fa
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex aad91c9f25..909f65aad1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,70 @@ credits are retained; no result has been reassigned to another provider. Originaidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [0.60.106.0] - 2026-10-07++**Fix wave 12: one bad link no longer stops extraction, cut-off model answers stop counting as real ones, and paid loops stop paying.**++About 25 bug reports and 16 contributor PRs arrived after wave 11's cutoff, plus the findings wave 11's own security review left open. Each bug was reproduced on the wave 11 tree first. Good contributor ideas were rewritten in our own code with tests that fail before the fix and pass after; no contributor lines were merged. The worst ones: one odd wikilink aborted every extract run with nothing saved; a model answer cut off by its output cap marked a page atom-free forever (and on managed brains deleted its atoms); dream patterns could outgrow a 1M-token window every night while the paid-loop breaker never tripped; `onboard --auto` ran steps labeled manual-only; and a few typed passwords still got past transcript redaction.++### How to use it++```bash+gbrain extract --stale # finishes past a bad link and keeps the pages it already did+gbrain dream reset-key 'dream:patterns:source:<id>' # clear a tripped per-source patterns breaker+gbrain dream retriage --force # re-judge transcripts in triage backoff now+gbrain quarantine clear <slug> --force # works on managed brains; stays cleared until title, type or body change+gbrain reindex --markdown --dry-run # the real run now asks first (--yes or --max-usd)+gbrain config set facts.page_write_notability_filter medium-and-up # optional; default stays all+gbrain search modes --reset --mode <mode> # --source <mode> still works, with a notice+```++### What you see++| Where | What changed |+|---|---|+| Link extraction | `extract --stale`, `extract links`, the serve sweep and managed `put_page` skip a link no page can have (bracketed code on a code page, `[[memory:123]]` naming no source) instead of aborting; a stale sweep keeps the pages it finished before an error. |+| Dream atoms and concepts | An answer that hit its output cap or was refused (claude-cli included) is a failure, never "nothing to extract". Managed brains keep the page's earlier atoms and wait for an approved retry; a concept that fails 3 times on unchanged atoms stops paying until they change. |+| Dream patterns | Quarantined claims store their reflection list once per page, every path kept, and existing pages are rewritten that way before the next run; the breaker counts deaths per source, including paid runs cancelled at their timeout. |+| Dream synthesize | A transcript the triage model can't score backs off 24 h, doubling to 7 days, instead of being re-judged nightly; logs carry the stop reason, length and a digest, never the model's text. Quote checks count `**bold**`, `` `code` `` and `~~strike~~` source text as found. |+| `gbrain dream` beside autopilot | The run that starts second skips only the brain-wide phases (`maintenance_lock_busy`) and still runs its source phases. |+| Onboard and remediation | `onboard --auto`, `doctor --remediate` and MCP `run_onboard` never run the schema-pack upgrade or the paid takes bootstrap; they list them under `manual_only_skipped` with the command to run. |+| `gbrain reindex --markdown` | Asks before re-embedding: without a terminal it exits 3 with the page count and estimate. A queued `reindex` job re-embeds only with approval stored at submit. Migration notes and the conversation-archive skill now ask first too. |+| Transcript redaction | Also redacts `--password X`, `--pass "…"`, `PASSWORD_DB=`, `FOO_PASSWORD_BAR=`, a value on the line after `password:`, and Markdown table password cells. Pages imported earlier are not rewritten: rerun `gbrain transcripts audit-secrets --json`. |+| Managed Git effects | A failed durability check retries as `git_unavailable` instead of completing without a commit or push; only a directory with no Git checkout at or above it reads as not durable. |+| Reconcile | No longer refuses a page whose file name more than 100 pages share, and its ownership check is indexed (458 ms to 0.1 ms per call at 490k pages). `poll_command` is the working `gbrain write-request --brain <id> -- <request_id>`. |+| `embed --stale` | Embeds everything else when a few pages (usually images) still need a text projection, and names those pages with the command that rebuilds them. |+| Timeline citations | `[Source: A, date; B, date]` files one entry per dated source, without emphasis markers. Rows the older reading stored are deleted on the page's next write or extraction, never written back. |+| `context_pack` / `delta` | Facts carry `fact_id` and `provenance`. |+| Legacy slugs | Pages stored under a slug that's now invalid (`people/jane doe`) can be deleted, restored and purged, database-only. |++### Things to watch++- **Scripts:** `reindex --markdown` now exits 3 without approval; `edge-proposals list` with a bad `--limit` exits 2; `search modes --reset` refuses a missing or conflicting `--mode`/`--source`.+- **The patterns breaker counts per source,** so a brain in the reported overflow state is refused right after the upgrade; clear it with `gbrain dream reset-key 'dream:patterns:source:<id>'`.+- **Upgrade builds two indexes on `pages`** (online on Postgres) for the reconcile check.+- **The MCP instructions move the `forget` caveat** inside the 2,048 characters Claude Code reads, and put_page asks for a request_id UUID again. A smoke on the newest Opus, GPT and Sonnet models compared it with the previous text before release.+- **Not fixed here:** the hard ceiling for a stuck write (waits for the sync-speed rework), the free relabel for a legacy bare `embedding_model` (the refusal now names the migrate preview), the transcript budget for dream patterns, and Cyrillic slug folding (#6235 declined; the bug stays open). See TODOS.md.++### Itemized changes++- Wanted-links store filters rows `lockPageKeys` would reject before locking, so one invalid slug or unknown source can't abort a run (#6228, #6225); stale sweeps stamp finished pages before rethrowing.+- Timeline citations: per-source dates and emphasis stripping on wave 11's comment handling; a `superseded` row state retires extractor-written rows of the old reading, and annotated rows stay database-only (#6226).+- `facts.page_write_notability_filter` (`all` | `medium-and-up` | `high-only`, default `all`) for page-write fact extraction (#6231); `facts_backstop: false` page opt-out, and meeting-ingestion drafts with extraction off until verified (#6232).+- Legacy-slug delete/restore/purge admitted only for an exact existing row and published database-only; remote purge stays denied (#6212). The enrich skill files by the active schema pack (#6030).+- Dream: top-level-only honest `[]` atom parsing, claude-cli `stop_reason` mapping, a managed atoms failure receipt, a concept retry bound per member hash (#6260); lossless pattern-claim dedupe, a per-source breaker, claude-cli tool-call replay arguments (#6236); triage backoff with digest-only logging (#6069); lock-set split so a source-scoped dream takes `gbrain-cycle` only for brain-wide phases, and `SYNTH_PHASE_FAIL` names the slug (#6242); markup-tolerant quote verification (#6258).+- `isManualOnlyStep` is the one predicate onboard, remediation and autopilot dispatch share (#6248). Doctor `sync_consolidation` and the cron-scheduler and cold-start skills give the cron line a managed brain accepts (#6244); `source_routing_health` accepts a dedicated skills source (#6076). `lint` `empty-section` skips fenced code (#6257).+- Git durability probes run with `LC_ALL=C` and settle per root; `classifyGitCheckout` decides "not a checkout" from the filesystem, shared with the writer manifest, which now refuses `writer_manifest_unsafe` when Git can't read a checkout (#6210).+- Reconcile pages through every same-name candidate; migration v219 adds `pages_source_path_name_idx` and `pages_file_uri_name_idx` (#6222, #6254). `poll_command` matches the envelope's `fix.argv`; `write-request --help` (#6255).+- `quarantine clear` publishes through the canonical owner with the snapshot's `expected_revision`; `--force` writes `quarantine_override` bound to title, type and body and stripped from every remote route; `scan --apply` refuses on managed brains (#6259).+- `embed --stale` and embed-backfill drain past blocked projections with a keyset walk (#6223). A bare legacy `embedding_model` row refuses naming `gbrain migrate embeddings --to <provider>:<model> --dry-run` (#6113).+- Hardened Git allows only filter-free plumbing, and `hardenedPathDirty` replaces `git status` in the reconcile preview, so a checkout's clean or process filters never run. Writeback-off records are keyed per brain, unioned from the legacy record and held when unreadable. `--project` counts edited harness hooks. `LLMS_REPO_BASE` must be https.+- Skill-refs lint fails closed, checks every link form, and fails a paid command that pre-approves spend; `jobs smoke --sigkill-rescue`/`--wedge-rescue` claim through the queue; `schema remove-*` and `add-link-type --inverse` parse names after flag values; `repair failed-writes` classifies hand-edit drift as `file_database_drift`; filesystem link extraction builds its basename index once.+- `edge-proposals list` reads `--limit=N` and `--status=X` (#6249). The put_page description restores the request_id UUID guidance within its 1,460-character budget.+- `llms-full.txt` drops the MCP deployment runbook (still linked from `llms.txt`) to stay under its budget.++Contributed by @andreineacsu (#6233, #6237, #6238, #6239, #6241, #6245, #6250, #6251), @javieraldape (#6234, #6240, #6256), @MarvinDontPanic (#6210). Each idea was re-implemented; their PRs are superseded.+## [0.60.105.0] - 2026-10-07**Fix wave 11: asking for help never deletes anything, "off" means off, and your files stop getting quietly rewritten.**diff --git a/TODOS.md b/TODOS.mdindex 45c6a84cb8..68d6a98208 100644--- a/TODOS.md+++ b/TODOS.md@@ -1,5 +1,17 @@# TODOS+## Fix wave 12 follow-ups (filed 2026-10-07, GBRA-57)++- [ ] **P2 — Free relabel for a legacy bare `embedding_model` row (#6113, carried from wave 11 W4.7).** **What:** wave 12 ships the refusal that names `gbrain migrate embeddings --to <provider:model> --dry-run`; the zero-cost relabel is not built. **Fix:** a restamp-only branch taken only when bare row, recipe, unambiguous model, dimensions, gateway config and every stored chunk/fact/take stamp agree (a NULL stamp on a non-null vector refuses), translating the model-bound chunk input hashes (`embedding-input-hash.ts`) and recording prior labels; doctor `embedding_identity_unqualified`. Needs a concurrent old-model worker test on Postgres. **Effort:** M-L. **Priority:** P2.+- [ ] **P2 — Hard ceiling for a stuck managed write (W3.3b, #6176).** **What:** still detection only. **Fix:** reuse `persistence.max_claim_ms` as a ceiling during preparation, fail as `write_stalled` after 3 releases, keep publication detection-only; it needs two `consumer.ts` hunks, so it lands after GBRA-45's sync-feeder rework. **Effort:** M. **Priority:** P2.+- [ ] **P3 — Transcript budget for dream patterns children (#6236).** **What:** wave 12 de-duplicates claim records and counts deaths per source; a per-job transcript budget and subagent tool wrapper are not built. **Effort:** M. **Priority:** P3.+- [ ] **P3 — Quarantine junk classifier masks code (#6259).** **What:** fenced and inline code still trip junk patterns; wave 12 ships the override only. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Restore image pages' text projection after managed activation (#6223).** **What:** activation clears every page's projection marker; only `embed --stale --images` restores image pages. **Effort:** S. **Priority:** P3.+- [ ] **P3 — `type: code` pages skip body link extraction (#6228).** **What:** code pages no longer abort extraction but still add noise rows to `gbrain wanted`. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Cyrillic-aware slug folding (#6235's bug).** **What:** `Сергей` slugs to `сергеи` because й loses its breve; #6235 was declined (undisclosed changes, a self-granting migration). Needs its own designed wave covering aliases and in-place upgrade. **Effort:** L. **Priority:** P3.+- [ ] **P3 — `extract all --source db` keeps finished pages on an abort (#6228 S4).** **What:** only the stale sweep stamps finished pages; the `all` path runs links then timeline, so stamping on a links abort would mark pages timeline-fresh. **Fix:** per-phase stamps. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Postgres vector arm without Materialize (#6039, second half).** **What:** `enable_material=off` was moved out of wave 12 because one scale run can't show no regression. **Fix:** a retrieval-latency eval at several brain sizes before changing the default. **Effort:** M. **Priority:** P3.+## Fix wave 11 follow-ups (filed 2026-10-07, GBRA-55)- [ ] **P2 — Ceiling for a stuck managed publication (W3.3b, #6176).** **What:** a publication that hangs inside a live consumer keeps renewing its claim; wave 11 ships detection only (`claim_phase`, doctor `persistence_write_stall` past `persistence.max_claim_ms`). **Fix:** a phase-split ceiling: a statement timeout inside `publishMutation`, a recovery handoff that releases the root, and a bounded abandonment counter, written against the consumer/coordinator after GBRA-45's sync-feeder work lands. **Effort:** M. **Priority:** P2.diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex 8c2f00bc37..1b6acaf91c 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -290,19 +290,19 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }{ since: '0.60.105.0', text: 'Filtered vector search on Postgres runs pgvector iterative scans in relaxed_order, which keeps closer in-filter matches strict order dropped; `gbrain config set search.hnsw_iterative_scan strict_order` and a restart of serve and autopilot restore the old mode.' },{ since: '0.60.105.0', text: 'With retrieval feedback on, MCP search and query results carry one visible line with the answer id (`Rate after use: rate_answer { answer_id: "ans_…", rating: 1-5 }`), so hosts that hide `_meta` can still rate.' },{ since: '0.60.105.0', text: 'Imported transcript pages now also redact a password typed after a credential label (`password: …`, `login alice / …`) as `<REDACTED:labeled_credential>`; pages imported earlier are not rewritten, so run `gbrain transcripts audit-secrets --json` to list them (doctor `transcript_secret_exposure`).' },- { since: 'WAVE12', text: 'A managed Git effect whose durability check fails (a git timeout, a damaged checkout, an unreadable hook) now stays queued with `git_unavailable` and retries instead of completing as `durability_not_enabled` without a commit or push; only a directory with no Git checkout at or above it reads as not durable. Check with `gbrain sources writer status --json`.' },- { since: 'WAVE12', text: '`gbrain embed --stale` and the embed-backfill job no longer stop when some pages still need a text projection: everything else embeds, and the blocked pages (often image pages) are counted and named with `gbrain embed --stale --images` or `gbrain sync --full`.' },- { since: 'WAVE12', text: '`gbrain sources reconcile` no longer refuses a page whose file name more than 100 other pages share; upgrading builds two indexes on `pages` (online on Postgres) for that check.' },- { since: 'WAVE12', text: 'A pending write\'s `poll_command` is now `gbrain write-request --brain <id> -- <request_id>`, the same command as the error\'s `fix`, instead of `gbrain call get_write_request ...`.' },- { since: 'WAVE12', text: '`gbrain quarantine clear` works on a managed brain, and `--force` records `quarantine_override` in the page frontmatter so the page stays cleared until its title, type or body changes; `quarantine scan --apply` refuses on a managed brain. Preview with `gbrain quarantine list`.' },- { since: 'WAVE12', text: 'An inline `[Source: A, date; B, date]` citation now files one timeline entry per dated source instead of one entry with the last date, and timeline summaries drop paired `**`, `__`, `*` and `_` emphasis markers. Rows stored under the older reading are deleted the next time their page is written or extracted, never written back into the page; a row someone gave its own detail stays. Pages nobody edits keep the old rows until the timeline prune-orphans cleanup runs (see `gbrain extract timeline --help`).' },- { since: 'WAVE12', text: '`gbrain edge-proposals list` now reads `--limit=N` and `--status=X` (they were ignored), and a `--limit` that is not a whole number from 1 up exits 2 instead of failing in the database or silently becoming 1.' },- { since: 'WAVE12', text: 'Dream atom and concept extraction no longer accept a model answer that stopped at the output cap or was refused (claude-cli included): such an answer counts as a failure, never as "nothing to extract" or a new concept narrative. On a managed brain the failed atom batch keeps the page\'s earlier atoms and waits for an approved retry (`gbrain jobs submit extract-atoms-drain --params \'{"sourceId":"<id>","retryRequestId":"<request>"}\'`); a concept that fails 3 times on unchanged atoms is skipped until they change (`gbrain config unset dream.concepts.failed_attempts` retries it now).' },- { since: 'WAVE12', text: 'The dream patterns breaker now counts deaths per source (`dream:patterns:source:<id>`), including runs cancelled at their timeout after paid work, so a brain whose patterns runs keep dying is refused at once after the upgrade; fix the cause, then `gbrain dream reset-key \'dream:patterns:source:<id>\'`. Pattern pages store a quarantined claim\'s reflection list once per page (`unverified_claim_sources`); the first patterns run rewrites existing pages that way (frontmatter only, no model call) before it pays for a run.' },- { since: 'WAVE12', text: 'Dream triage no longer re-judges a transcript every cycle after a truncated, refused or unparseable verdict: it waits 24 hours, doubling per repeat up to 7 days (`triage_unreliable_backoff`), and a content or triage-model change re-judges at once; `gbrain dream retriage --force` re-judges now and pays per file.' },- { since: 'WAVE12', text: 'A `gbrain dream` scoped to a source, including a bare `gbrain dream` on the default source, now also takes the brain-wide `gbrain-cycle` lease for synthesize, patterns, embed and the other brain-wide phases: while autopilot maintenance holds it, those phases are skipped as `maintenance_lock_busy` and the source phases still run, and autopilot maintenance skips its window while a dream holds it. `gbrain status --section locks --json` shows the holder.' },- { since: 'WAVE12', text: '`gbrain onboard --auto` (including cron runs), `doctor --remediate` and MCP `run_onboard` never submit a manual-only step: the schema-pack upgrade (`unify-types`) and the paid takes bootstrap (`extract-takes-from-pages`) are listed under `manual_only_skipped` with the command to run them yourself. A job of either kind an earlier run already queued still runs: find it with `gbrain jobs list --status waiting` and cancel it with `gbrain jobs cancel <id>` if you did not want it.' },- { since: 'WAVE12', text: '`gbrain reindex --markdown` asks before re-embedding (paid): without a terminal it exits 3 with an ask_user payload naming the page count, the estimate and the `--yes` command; `--yes` or `--max-usd <usd>` approves it, and `--dry-run`, `--no-embed` and a keyless brain never ask. A queued `reindex` job re-embeds only with the approval stored at submit time (`gbrain jobs submit reindex ... --yes`, or the search-mode switch prompt); one queued without it fails with `confirmation_required`.' },+ { since: '0.60.106.0', text: 'A managed Git effect whose durability check fails (a git timeout, a damaged checkout, an unreadable hook) now stays queued with `git_unavailable` and retries instead of completing as `durability_not_enabled` without a commit or push; only a directory with no Git checkout at or above it reads as not durable. Check with `gbrain sources writer status --json`.' },+ { since: '0.60.106.0', text: '`gbrain embed --stale` and the embed-backfill job no longer stop when some pages still need a text projection: everything else embeds, and the blocked pages (often image pages) are counted and named with `gbrain embed --stale --images` or `gbrain sync --full`.' },+ { since: '0.60.106.0', text: '`gbrain sources reconcile` no longer refuses a page whose file name more than 100 other pages share; upgrading builds two indexes on `pages` (online on Postgres) for that check.' },+ { since: '0.60.106.0', text: 'A pending write\'s `poll_command` is now `gbrain write-request --brain <id> -- <request_id>`, the same command as the error\'s `fix`, instead of `gbrain call get_write_request ...`.' },+ { since: '0.60.106.0', text: '`gbrain quarantine clear` works on a managed brain, and `--force` records `quarantine_override` in the page frontmatter so the page stays cleared until its title, type or body changes; `quarantine scan --apply` refuses on a managed brain. Preview with `gbrain quarantine list`.' },+ { since: '0.60.106.0', text: 'An inline `[Source: A, date; B, date]` citation now files one timeline entry per dated source instead of one entry with the last date, and timeline summaries drop paired `**`, `__`, `*` and `_` emphasis markers. Rows stored under the older reading are deleted the next time their page is written or extracted, never written back into the page; a row someone gave its own detail stays. Pages nobody edits keep the old rows until the timeline prune-orphans cleanup runs (see `gbrain extract timeline --help`).' },+ { since: '0.60.106.0', text: '`gbrain edge-proposals list` now reads `--limit=N` and `--status=X` (they were ignored), and a `--limit` that is not a whole number from 1 up exits 2 instead of failing in the database or silently becoming 1.' },+ { since: '0.60.106.0', text: 'Dream atom and concept extraction no longer accept a model answer that stopped at the output cap or was refused (claude-cli included): such an answer counts as a failure, never as "nothing to extract" or a new concept narrative. On a managed brain the failed atom batch keeps the page\'s earlier atoms and waits for an approved retry (`gbrain jobs submit extract-atoms-drain --params \'{"sourceId":"<id>","retryRequestId":"<request>"}\'`); a concept that fails 3 times on unchanged atoms is skipped until they change (`gbrain config unset dream.concepts.failed_attempts` retries it now).' },+ { since: '0.60.106.0', text: 'The dream patterns breaker now counts deaths per source (`dream:patterns:source:<id>`), including runs cancelled at their timeout after paid work, so a brain whose patterns runs keep dying is refused at once after the upgrade; fix the cause, then `gbrain dream reset-key \'dream:patterns:source:<id>\'`. Pattern pages store a quarantined claim\'s reflection list once per page (`unverified_claim_sources`); the first patterns run rewrites existing pages that way (frontmatter only, no model call) before it pays for a run.' },+ { since: '0.60.106.0', text: 'Dream triage no longer re-judges a transcript every cycle after a truncated, refused or unparseable verdict: it waits 24 hours, doubling per repeat up to 7 days (`triage_unreliable_backoff`), and a content or triage-model change re-judges at once; `gbrain dream retriage --force` re-judges now and pays per file.' },+ { since: '0.60.106.0', text: 'A `gbrain dream` scoped to a source, including a bare `gbrain dream` on the default source, now also takes the brain-wide `gbrain-cycle` lease for synthesize, patterns, embed and the other brain-wide phases: while autopilot maintenance holds it, those phases are skipped as `maintenance_lock_busy` and the source phases still run, and autopilot maintenance skips its window while a dream holds it. `gbrain status --section locks --json` shows the holder.' },+ { since: '0.60.106.0', text: '`gbrain onboard --auto` (including cron runs), `doctor --remediate` and MCP `run_onboard` never submit a manual-only step: the schema-pack upgrade (`unify-types`) and the paid takes bootstrap (`extract-takes-from-pages`) are listed under `manual_only_skipped` with the command to run them yourself. A job of either kind an earlier run already queued still runs: find it with `gbrain jobs list --status waiting` and cancel it with `gbrain jobs cancel <id>` if you did not want it.' },+ { since: '0.60.106.0', text: '`gbrain reindex --markdown` asks before re-embedding (paid): without a terminal it exits 3 with an ask_user payload naming the page count, the estimate and the `--yes` command; `--yes` or `--max-usd <usd>` approves it, and `--dry-run`, `--no-embed` and a keyless brain never ask. A queued `reindex` job re-embeds only with the approval stored at submit time (`gbrain jobs submit reindex ... --yes`, or the search-mode switch prompt); one queued without it fails with `confirmation_required`.' },];/** The newest disclosed change's release: the notice id moves only when a release adds rows. */