Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.70.0 fix wave 9: release notes, migration playbook, follow-ups

time-attackcd5acdb279a1
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index b1ac806810..954b022210 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 5ba1079bcf..cdd97f999f 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/BOOTSTRAP_FOR_AGENTS.md b/BOOTSTRAP_FOR_AGENTS.md
index 816e31a7d5..40f779ecf7 100644
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@ -1,4 +1,4 @@
-<!-- gbrain-runbook-stamp: 0.60.69.0 -->
+<!-- gbrain-runbook-stamp: 0.60.70.0 -->
<!-- This stamp must equal the VERSION file at every release; CI enforces it
(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it to
the installed binary and warns on skew. -->
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ced2b20c69..2bb625f1e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,168 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.70.0] - 2026-10-05
+
+**Fix wave 9: cost caps hold under concurrency and bound what DeepSeek really bills, stopping a job supervisor no longer leaves work running, the nightly quality probe uses your models and tells the truth, email threads and synced fact sections reach your facts, long filenames and images stop blocking writes and sync, and OAuth access tokens can no longer live forever.**
+
+This wave fixes 47 reported issues across spending, background jobs, facts, session capture, auth and skills. The ones most people hit: a cost cap could let two paid calls through at once because a small call that finished first freed the larger call's hold, and the shipped DeepSeek output prices were about a quarter of DeepSeek's peak rate, so a cap could let up to about 4.5x the intended spend through. Stopping the job supervisor said "drained" while its worker was killed mid-job, and shell jobs left their child processes running. The nightly quality probe ignored your model settings, billed Anthropic models even on brains routed elsewhere, ran half its work with no cap, and reported a panel of one model voting twice as a real verdict. On a brain without managed persistence, a `## Facts` section that arrived through `gbrain sync` never reached the facts index. OAuth access tokens could be issued with lifetimes of years.
+
+Each fix has a test that fails on the previous release.
+
+| After upgrading | Before | After |
+| --- | --- | --- |
+| Two paid calls in flight under one cost cap | a small call finishing first freed the big call's hold | each call settles its own hold |
+| DeepSeek V4 Flash output price used by caps and estimates | $0.28 per 1M tokens | $1.20 (DeepSeek's peak rate) |
+| `gbrain jobs supervisor stop` while a job runs | says `drained`, worker killed, job stuck `active`, children orphaned | drains, hands the job back, says `drained` only when verified |
+| A shell job that started `cmd &` | the process outlived the job | terminated with the job (SIGKILL after 5 s if it ignores SIGTERM) |
+| Nightly quality probe on a brain routed to claude-cli | paid for Sonnet, Haiku and Opus over the API | uses your reader, extractor and judge settings |
+| Nightly probe panel of sonnet/opus/sonnet | pass or fail | `inconclusive` with the slot-key command to fix it |
+| `## Facts` section imported by a standalone `gbrain sync` | never indexed | indexed by the next cycle (250 pages per run) |
+| Gmail thread with replies | parsed to nothing, retried every run | one turn per message (brains without managed persistence) |
+| A page filename near the 255-byte limit | write fails with ENAMETOOLONG | writes |
+| One image in a managed source with multimodal embedding on | the whole sync refused | the image is held, everything else imports |
+| OAuth access token lifetime | whatever a client or `--token-ttl` asked for | at most 90 days |
+| A subagent turn on a slow or thinking model | cut off at 5 minutes, retried into the same wall | up to 30 minutes, bounded by the job's deadline |
+
+Thanks to the contributors whose work is folded in: @andreineacsu (#5959, #6005, #5973, #5940, #5975, #5515), @kvnloo (#5972) and @Masashi-Ono0611 (#5257).
+
+## To take advantage of v0.60.70.0
+
+`gbrain upgrade` installs the binary and runs three schema migrations: v209 adds the empty `page_facts_reconcile` table, v210 clamps stored OAuth token lifetimes and shortens outstanding access tokens to 90 days after issue, v211 pins `search_path` on every gbrain database function. Upgraded brains show a one-time notice listing the behavior changes below; `gbrain doctor --only behavior_changes` shows it again.
+
+1. **Restart every `gbrain serve --http`, autopilot and worker** after upgrading, so token issuance and the new shutdown handling take effect.
+2. **Reconnect OAuth clients that stop working.** Access tokens older than 90 days stop working; clients with a refresh token get a new one, a native OAuth client without one reconnects. `gbrain auth clients` marks clients whose lifetime was clamped.
+3. **Check scripts that read these outputs:** `gbrain jobs work` exit codes (0 after a clean SIGTERM drain, 17 when running work had to be handed back), `gbrain jobs supervisor stop --json` (`drained`, `checks`, reason `timeout`), and `gbrain sources writer status --json` (`local_process_ingress` replaces `ingress`).
+4. **Codex users:** preview restoring the user side of older sessions with `gbrain transcripts recover codex`, then `--apply`.
+5. **If you set `autopilot.nightly_quality_probe.max_usd`** and the probe routes through a model gbrain has no price for, register the rate with the `gbrain pricing set` command the audit row names, or unset `max_usd`.
+6. **Verify:**
+ ```bash
+ gbrain doctor
+ gbrain auth clients
+ gbrain models # shows the nightly probe's routes
+ ```
+7. **If any step fails,** file an issue at https://github.com/garrytan/gbrain/issues with the output of `gbrain doctor` and `~/.gbrain/upgrade-errors.jsonl` if it exists.
+
+### Behavior changes (the one-time notice lists the first six)
+
+- **Shell jobs terminate the processes they leave behind.** On Linux and macOS a shell job runs in its own process group; when the job ends, is cancelled or times out, or the worker shuts down, everything in its group is terminated. A job that intentionally starts a daemon with `cmd &` and no `wait` loses it: start long-lived processes under your service manager, or detach them with `setsid`.
+- **Brains whose schema pack declares `extract_atoms` start receiving the daily atom auto-drain on Postgres autopilot.** It used to skip them, so their atoms were never extracted. Spend stays inside the existing `autopilot.auto_drain.max_usd_per_day` cap (default $2) and one slot per source per UTC day. Opt out: `gbrain config set autopilot.auto_drain.enabled false`.
+- **OAuth access tokens are capped at 90 days** (7,776,000 seconds) whatever a client's stored lifetime, `oauth.dcr_ttl_max_seconds` or `serve --http --token-ttl` says; `serve --token-ttl` refuses values outside 60..7776000 at startup instead of silently using 3600. The upgrade clamps stored lifetimes and shortens already-issued access tokens; refresh tokens and machine bearer tokens are untouched. Every change writes an `oauth_grant_audit` row.
+- **`gbrain sources writer status --json` renames `ingress` to `local_process_ingress`,** with a `scope` note: it always described the process that answered (a one-shot CLI reports `not_running`), never whether the brain's owner is down. Ownership stays under `worktrees` and `bindings`.
+- **`gbrain jobs work` exits 0 after a SIGTERM drain (was 143),** and 17 when claims still running after 30 s had to be handed back to the queue.
+- **Unextracted session files stay longer.** Corpus retention removes a captured session file nothing has extracted only at 3x `dream.synthesize.corpus_retention_days` (90 days by default, was 30), so the corpus directory can use more disk. `gbrain doctor` `memory_writeback` names the backlog and the `gbrain sweep --once --budget-ms 600000` that clears it.
+- **brainstorm, lsd and skillopt run on a model gbrain has no price for** under the default $5 cap, with a warning; an explicit `--max-usd N` refuses it before any work and names the `gbrain pricing set` command.
+- **One cost-cap flag: `--max-usd N|off`** on `brainstorm`, `lsd`, `skillopt`, `enrich`, `onboard` and `eval longmemeval`. `--max-cost`, `--max-cost-usd` and `--no-max-cost` still work. A malformed value, a bare `0` or two disagreeing cap flags are refused before any paid call (`enrich` and `onboard` used to ignore them). `skillopt --max-cost-usd 0` is still uncapped, with a deprecation note.
+- **A remote `run_skillopt` caller must pass a positive `max_cost_usd`;** 0 (uncapped) is host-only.
+- **The nightly quality probe follows your brain's model settings** and one `max_usd` budget covers the whole run. A set `max_usd` refuses unpriced models and a `max_usd` of 0 is a $0 cap. A collapsed judge panel reports `inconclusive`. Compiled installs start running both nightly probes. New audit outcome `skipped` means the probe could not run.
+- **Eval judges (takes-quality, cross-modal, synthesize triage) turn thinking off** on Anthropic, DeepSeek and OpenRouter DeepSeek routes. Takes-quality receipts are `protocol_version: 2`: a malformed judge reply gets one correction, recorded in `corrections`; `regress` flags a protocol change.
+- **A provider 404 for a missing model reads `model_not_found`** (facts logs `gateway_model_not_found`) instead of `auth`. Fix the model id (`gbrain models`), not the key.
+- **With `chat_fallback_on_refusal false`, an HTTP 400 content-policy refusal is not sent to the next model,** the `edge_contradictions` judge keeps its own model, and a cancel during a refusal returns the refusal.
+- **Subagent turns run up to `ai.chat.per_turn_timeout_ms`** (default 30 minutes) or the job's deadline, whichever is first. Calls outside a job keep the 300 s backstop.
+- **On brains without managed persistence, the first cycles after upgrading reconcile facts** for fence pages whose index is behind (250 pages per cycle within 60 s; `gbrain dream --phase extract_facts` does all at once). New fact rows embed under your existing setup; keyless brains make no calls.
+- **Meeting-note labels (`**Attendees:**`, `**Date:**`) are never speakers.** On brains without managed persistence a prose meeting or email page, a one-message email and a page with time-only turns and no date leave the conversation-facts backlog until they change. Managed brains skip those pages and multi-message email threads without writing and retry them.
+- **`synthesize_concepts` ignores `## Facts` and `## Takes` when deciding whether a concept changed;** concepts hashed the old way are rehashed without a model call.
+- **Atom and concept files are opt-in:** `gbrain config set cycle.extract_atoms.write_through true` / `cycle.synthesize_concepts.write_through true` (brains without managed persistence).
+- **`--source` on `timeline-add`, `ontology-add` and `takes add|update|supersede` is always provenance,** on every route. Scripts that used it to pick the destination source: use `GBRAIN_SOURCE=<id>` or `.gbrain-source`.
+- **`config set embedding_disabled` writes both config planes,** and `set false`/`unset` really re-enable embedding. `config get/show schema_pack` print the pack the runtime resolves (default `gbrain-base`).
+- **Doctor `rls` warns instead of failing** for a missing-RLS table on plain Postgres with no PostgREST roles or Supabase URL.
+- **Assistant-only session files count as drift:** `gbrain transcripts ingest` holds the `--since last` watermark and the session-end hook heartbeats `degraded` / `no_user_turns`. Harvest error reasons carry a code (`operationerror:<code>`).
+- **`gbrain serve --http` sweeps the session corpus** every 10 minutes while a captured file is unextracted (one 60 s sweep, up to 20 files). Keyless brains spend nothing; `GBRAIN_SWEEP=0` turns it off. A `gbrain sweep --once` budget now stops between files and can run past the budget by one extraction call.
+- **Managed sync holds images** (`managed_image_sync_unsupported`, a durable hold doctor's `git_held_files` warns on and never escalates) instead of refusing the run when multimodal embedding is on.
+- **Staging files are hidden `.<sha256>.tmp.<uuid>` siblings.** Recovery still reads the old names.
+- **On a managed brain `gbrain reindex --markdown` runs the projection repairs** (`repair safe-chunks`, then `contextual-mode` unless `--no-embed`) and refuses `--type`.
+- **New doctor check `git_convergence`:** a source checkout with commits not on its upstream warns after 6 hours and fails after 24. `bootstrap_push_health` warns while the workspace is ahead of origin.
+- **Shared skills published without `tools:` list the caller's brain tools as `usable_tools`;** an empty SKILL.md is refused; one skill-pack adoption may write 128 files; `gbrain skillpack sync` appends what it scaffolds to an existing `skills/manifest.json`.
+- **Plugin skills carry a `when_to_use` line** for Claude Code.
+- **Every gbrain database function pins `search_path`.** Bulk fact inserts through the withdrawal trigger take a little longer (10,000 rows: PGLite 1.31-1.46 s to 1.45-1.69 s, Postgres 531-536 ms to 565-604 ms).
+
+### Numbers that change
+
+- **Cost caps and estimates on DeepSeek** use peak rates: `deepseek-flash` and `deepseek-v4-flash` $0.30 / $1.20 per 1M tokens (were $0.14 / $0.28), `deepseek-v4-pro` $1.32 / $3.96 (were $0.435 / $0.87). A run that fit a cap before may now stop at it. Estimates say `(DeepSeek at peak rates, an upper bound; off-peak bills half)`. OpenRouter's `deepseek/deepseek-v4-flash-0731` is $0.0152 / $1.28.
+- **Doctor:** `minions_migration` goes from fail to warn after a `--force-retry` and gains a warn for a skipped host migration; `rls` goes from fail to warn on plain Postgres (doctor score rises); `extract_health` reads "last halt Nd ago"; `extract_atoms_backlog` may warn on declaring-pack brains until the phase runs once; `git_convergence` is new; `memory_writeback` warns when more than 20% of at least 10 harvests failed in 7 days and before unextracted files reach their deletion day; `nightly_quality_probe_health` and `conversation_parser_probe_health` count `skipped` runs.
+- **OAuth `expires_in`** drops to 7,776,000 for clients configured above it.
+- **Nightly probe audit rows** gain `chat_cost_usd`, `unpriced_chat_calls`, `cap_usd`, `cap_source`, the judge panel, per-judge scores of failing questions and `receipt_dir`; non-pass runs keep their receipts under `~/.gbrain/audit/nightly-probe/` (newest 7).
+- **Takes-quality receipts** gain `protocol_version: 2`, `correction_selection_rule` and `corrections`.
+- **Corpus retention** of unextracted session files: 30 days to 90 by default.
+
+### Itemized changes
+
+**Spending and caps**
+- Each budget reservation is settled by its own id: `BudgetTracker.reserve()` returns an id, `record()` settles only that id and `release()` frees an attempt that never billed (unknown provider, invocation policy refusal). One price resolver, `priceFor()` in `src/core/budget/reservation-cost.ts`, serves reservations and preflights.
+- `deepseek-flash` row added and the DeepSeek and OpenRouter DeepSeek rows corrected (#5847); the recipe lists `deepseek-flash` first.
+- `gbrain brainstorm` and `gbrain lsd` run unpriced models under the default cap, reach `pricing.overrides`, count unpriced calls at Sonnet rates in the estimate and mid-run checks, and refuse them under an explicit cap; `brainstorm_health` names an unpriced model (#5873). Builds on #5959, contributed by @andreineacsu.
+- `gbrain skillopt`'s preflight uses `pricing.overrides` and the claude-cli sibling rate instead of inventing Sonnet rates, and shows `Est. cost: unpriced (...)` (#5563).
+- `gbrain pricing set 'claude-cli:*' --rate 0` prices every model of a subscription-billed provider at once; `gbrain pricing list` names the covered models.
+- `synthesize_concepts` meters claude-cli and overridden models correctly and lists fallback-metered models in `details.pricing_fallback_models` (#5166).
+- The nightly quality probe's run budget settles each call's reservation.
+- Remote `run_skillopt` with `max_cost_usd` 0, negative or non-finite is `invalid_params`.
+
+**Routing, judges and timeouts**
+- `chat({ thinking: 'off' })` per-call switch (`src/core/ai/thinking-off.ts`), used by the takes-quality, cross-modal and synthesize triage judges (#5331). Call-scoped override test from #5972, contributed by @kvnloo.
+- Takes-quality: one same-model correction per malformed slot, priced against `--budget-usd` before it is sent (#5325).
+- `model_not_found` error class for provider 404s, with a rename hint for `deepseek:deepseek-v4-flash`.
+- Fallback chain: edge judge pinned, content-policy 400s honor `chat_fallback_on_refusal false`, cancel during refusal returns the refusal.
+- `ai.chat.per_turn_timeout_ms` (default 1,800,000) bounds each subagent turn; the oneshot synthesis call gets a quarter of the job's remaining time (#4921).
+
+**Nightly quality probe**
+- Reader follows `models.eval.longmemeval` then the reasoning tier, the extractor the utility tier, the judges `models.eval.cross_modal.slot_a/b/c`; `gbrain models` prints the routes (#5872, contributed by @andreineacsu, #6005).
+- One run-level budget over LongMemEval and the judges; `budget_exceeded`, never `fail`.
+- Collapsed panel is `inconclusive` with `reason: panel_collapsed`; non-pass runs keep evidence (#5506, contributed by @andreineacsu, #6005).
+- Fixtures embedded in the binary, so compiled installs run both probes; an unreadable fixture records `skipped` (#5187; skip reporting reworked from @Masashi-Ono0611's #5257).
+- The probe keeps the daemon's gateway and no longer swaps the process-wide embedding transport.
+
+**Workers and jobs**
+- The supervisor and `jobs work` own their termination signals: one ordered shutdown keeps the queue lock through the drain, stops the worker (SIGTERM, 35 s, SIGKILL), hands interrupted claims back without burning an attempt, then emits `stopped` with `drained`, `worker_forced`, `worker_exit_code` and `lock_released`; `stop` verifies all of it (#5062).
+- Shell jobs run in their own process group; cancel, timeout and shutdown reach every descendant (#5062).
+- The extract_atoms auto-drain runs for declaring packs; `extract_atoms_backlog` reads `last_extract_atoms_at` (#5028).
+- Already-synthesized transcripts are excluded before triage on every path; synthesize details gain `synthesis_state` (#5145).
+- `cycle.consolidate.cluster_threshold` (default 0.85, (0, 1]); typed-claim facts share a take only when metric, unit and period match (#5363).
+- `gbrain eval <subcommand> --help` prints that subcommand's usage.
+
+**Facts**
+- Facts watermark: migration v209 `page_facts_reconcile`; each cycle reconciles fence pages whose facts are behind; `extract_health` names unreconciled and unreadable fences (#5151).
+- Email thread pages parse into one turn per message (pattern `email-thread-heading`) and count as one conversation; a one-message thread is an email (#5025).
+- Meeting-note labels are rejected as speakers; prose and undated pages get a not-extractable outcome on brains without managed persistence (#5025).
+- `synthesize_concepts` change check and prompt ignore fence sections; re-synthesis keeps fences, timeline, tags and frontmatter.
+- Opt-in write-through for generated atoms and concepts (#5041).
+
+**Session capture**
+- Codex 0.153+ `item_completed` UserMessage records are read; a turn recorded both ways is kept once (#5163). `gbrain transcripts recover codex` restores older imports (preview, `--apply`).
+- Busy-writer harvests retry after 5, 15 and 45 s; `memory_writeback` warns on a high failure rate (#5557, contributed by @andreineacsu, #5973).
+- `serve --http` runs the corpus drain; sweep budgets stop between files; unextracted files kept 3x longer.
+- `mentions.exclude_slugs` keeps listed pages out of mention linking; the next sweep removes their mention links; the unused `extraIgnore` option is gone (#5829).
+
+**Auth, CLI and config**
+- OAuth access-token cap, `--token-ttl` validation, migration v210 (#5040).
+- `--source` is provenance for ops that own it, on every route (#5087).
+- Local CLI reaches `get_skill_retention`, `prune_skill_revisions`, `retain_skill_revision`, `import_skill_proposal` and `gbrain takes remove` while `gbrain serve` owns a PGLite brain (#5864).
+- Every `gbrain import` refusal says why and what to run (#5268; thanks @andreineacsu, #5515).
+- `embedding_disabled` and `schema_pack` config commands report and change the runtime value (#5253).
+- Doctor `rls` warn on plain Postgres (#4939); `extract_health` dates by last halt (#5863); the migration ledger row matches `get_health`.
+- Remote code reads stay suspended with an error that names the follow-up (#5052).
+- Migration v211 pins `search_path` on gbrain plpgsql functions; the fact fingerprint functions qualify built-ins and stay inlinable (#5190).
+
+**Writes, sync and skills**
+- Short hidden staging names for atomic and journaled writes and timeline write-through (#5861; reporter @PurposeGateway's patch adapted).
+- Managed sync holds images as `managed_image_sync_unsupported` (#5493, reworked from @andreineacsu's #5975).
+- `gbrain sources set-path` repairs a stale `local_path`; the 0.53.0 migration retakes an incomplete inventory (#5569).
+- Skill-pack adoption bound 128 files; `--accept-reviewed-inventory <source>=<digest>` acceptance (#5476).
+- Portable canonical skills inherit usable tools (#5150); empty SKILL.md refused.
+- Managed `reindex --markdown` delegates to projection repairs (#5377).
+- `writer status` `local_process_ingress`.
+- Doctor `git_convergence`; `bootstrap_push_health` checks the workspace against origin; `scripts/smoke-test.sh` accepts a configured database URL and keyless embedding (#5063).
+- `gbrain takes rebuild <slug>` and `gbrain takes remove <slug> --row N` (local-only `takes_remove`) (#5167); accepted proposals record `take_proposals#<id>` (edited accepts add `(edited)`) (#5214).
+- Bundled capture and schema-author skills pass the publication parser; new `inbox/` filing rule.
+- `gbrain skillpack sync` registers scaffolded skills in an existing manifest (#4831).
+- Upgrade reinstall hints use `bun remove -g gbrain && bun add -g github:garrytan/gbrain#v<version>` (#5034).
+- Plugin and persona skill trees add `when_to_use` (#5858, reworked from @andreineacsu's #5940).
+- Skill and doc corrections: gbrain-upgrade migration playbook precedence (#5038), perplexity-research on the Agent API (#5534), automatic-capture opt-in gating in ingest, eiirp and operational-disciplines (#5101), recommended-schema frontmatter claims (#5335), contradiction probe schedule (#5559), `extract_facts` attestation receipts (#5278), autopilot env-file secrets (#5196), v0.28.0 playbook commands.
+
+### For contributors
+
+- New guards in `bun run verify`: `check:recipe-pricing` (every recipe model priced or declared unpriced) and `check:skill-publication` (every bundled SKILL.md passes the shared-skill parser).
+- `test/helpers/managed-connector-job-contract.ts` gains `extract_conversation_facts_thread`.
+
## [0.60.69.0] - 2026-10-05
**Korean entity names stop linking from inside longer words: mention precision on Hangul goes from 7% to 86%, and 65 of 74 real name mentions still link.**
diff --git a/TODOS.md b/TODOS.md
index 28af5e6f7e..15b3f020b5 100644
--- a/TODOS.md
+++ b/TODOS.md
@@ -1,8 +1,11 @@
# TODOS
-## Fix wave 9 follow-ups (filed 2026-10-05, fix wave 9)
+## Fix wave 9 follow-ups (filed 2026-10-05, follow-up from v0.60.70.0)
- [ ] **P2 — Receipted publication for managed conversation facts.** **What:** `extract-conversation-facts` replaces a page's derived fact batch through `replaceDerivedFactsForPage` (`src/core/persistence/derived-facts.ts`), a coordinated transaction with no persistence request. On a managed brain a multi-message email thread is therefore skipped without writing and retried every run (`src/core/facts/conversation-skip.ts`), as are the single-email and prose outcomes; `test/helpers/managed-connector-job-contract.ts` case `extract_conversation_facts_thread` pins it. **Fix:** admit a persistence request for the derived batch (delete-by-prefix plus insert, page revision as the CAS) in the same transaction, so the write carries a receipt; then drop the managed gate and record the single-email/prose outcomes durably there too. **Effort:** M. **Priority:** P2.
+- [ ] **P2 — Re-extract conversation facts misattributed to meeting-note labels.** **What:** before v0.60.70.0 the conversation parser read `**Date:**`, `**Attendees:**` and similar labels as speakers, so conversation facts were written with entity "Date" and an epoch date. The parser fix stops new ones; existing rows stay. **Fix:** a `gbrain` command that finds conversation facts whose provenance is a metadata-label speaker, previews them by default, and on `--apply` re-extracts the source pages under an explicit cost cap (never an automatic spend). **Effort:** M. **Priority:** P2.
+- [ ] **P3 — Stall detection for subagent turns.** **What:** `ai.chat.per_turn_timeout_ms` bounds a whole turn (default 30 min) because gateway chat calls are not streamed, so a hung provider holds the turn for the full budget. **Fix:** once chat streams, abort a turn that produces no tokens for a shorter stall window. **Effort:** M. **Priority:** P3.
+- [ ] **P3 — Nightly probe metered cost and the budget tracker price models the same way.** **What:** the probe's `chat_cost_usd` / `unpriced_chat_calls` come from `estimateChatCostUsd` (canonical table only), while its run budget prices through `priceFor()` (operator overrides, claude-cli sibling rate, free local providers). A model priced only by `pricing.overrides`, a claude-cli model or a local model is metered as unpriced in the audit row while the cap counts it. **Fix:** price the meter through `priceFor()` with the brain's overrides, keeping cache-token pricing for table rows. **Effort:** S. **Priority:** P3.
## Contributor audit wave follow-ups (filed 2026-10-05, GBRA-40)
diff --git a/VERSION b/VERSION
index 19023702bd..34c2ddde40 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.69.0
+0.60.70.0
diff --git a/docs/wave9/W.md b/docs/wave9/W.md
deleted file mode 100644
index 59c4f40444..0000000000
--- a/docs/wave9/W.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Wave 9, lane W (workers and job lifecycle): release notes for the integrator
-
-No version bump, no CHANGELOG header, no migration. These lines are for the
-integrator to fold into the wave 9 CHANGELOG entry and its upgrade section.
-
-## CHANGELOG lines
-
-- **`gbrain jobs supervisor stop` no longer reports `drained` while work survives (#5062).** A SIGTERM used to reach the generic CLI cleanup handler first: it deleted the supervisor's queue lock and exited 143 before the supervisor said `stopped`, the worker died the same way, its in-flight job stayed `active`, and the job's children were orphaned to PID 1. The supervisor and `jobs work` now own their termination signals: repeated signals join one ordered shutdown that keeps the queue lock through the drain (a second supervisor is refused mid-drain), stops the worker (SIGTERM, 35s, SIGKILL by liveness, confirmed exit), hands interrupted claims back to the queue without burning an attempt, releases the lock and only then emits `stopped`, now carrying `drained`, `worker_forced`, `worker_exit_code` and `lock_released`. `stop` reports `drained` only when the supervisor's own `stopped` row says so, every worker it spawned is gone and its lock row is released; otherwise it names the failing check (`no_stopped_event`, `worker_still_running`, `lock_unverified`, `lock_still_held`, `forced`) and exits 1.
-- **Shell jobs no longer leave processes behind (#5062).** On Linux and macOS a shell job runs in its own process group. Cancel, timeout and worker shutdown reach every descendant, a process that ignores SIGTERM is SIGKILLed after 5 seconds (the old check never escalated), and when the job's shell exits, anything it left running in its group is terminated before the job settles.
-- **Declaring `extract_atoms` in a schema pack no longer stops autopilot from running it (#5028).** On Postgres the daemon's routine cycles run only the freshness phases, so the auto-drain was the only thing that ran `extract_atoms`, and it skipped every brain whose pack declared the phase. It now runs regardless, within the existing threshold, `autopilot.auto_drain.max_usd_per_day` cap and one slot per source per UTC day. `gbrain doctor`'s `extract_atoms_backlog` check now reads the phase's own `last_extract_atoms_at` stamp, so a brain whose cycles run but whose atoms never get extracted warns instead of reporting OK.
-- **Dry runs and classic brains no longer pay to triage transcripts that are already synthesized (#5145).** Completed synthesis (both key families) is checked before the triage pass on every path. Synthesize details gain `synthesis_state: {candidates, already_synthesized}`; the triage counters and the "not yet triaged" note now cover only screened candidates.
-- **`cycle.consolidate.cluster_threshold` sets consolidate's cosine threshold (#5363),** default 0.85, any value in (0, 1], validated by `gbrain config set`. The old option was never wired. Facts with typed claims now share a take only when metric, unit and period all match: monthly vs annual, USD vs EUR, and typed vs untyped facts stay separate.
-- **`gbrain eval <subcommand> --help` prints that subcommand's usage (D-N1)** instead of the generic `eval --qrels` block (replay, gate, whoknows, trajectory, suspected-contradictions, retrieval-quality, compare, export, prune and the rest).
-- **The v0.28.0 migration's re-chunk reminder names a command that exists (D-N5):** `gbrain reindex --markdown`, not the nonexistent `gbrain extract takes --rebuild`. The v0.28.0 skill no longer cites two doctor checks that never shipped.
-
-## Upgrade notes (behavior changes worth a one-time notice)
-
-| Change | Who notices | What to do |
-|---|---|---|
-| `jobs work` exits 0 after a SIGTERM drain (was 143); exit 17 (`WORKER_EXIT_DRAIN_FORCED`) when claims still running after 30s had to be handed back | process managers and scripts that read the worker's exit code | treat 0 as a clean stop and 17 as a stop that interrupted work |
-| `jobs supervisor stop --json` gains `drained`, `checks`, `queue`; reason `timeout_40s` is now `timeout` (wait 45s); exits 1 unless the drain is verified | scripts parsing `stop` output | key on `drained` / `reason` |
-| A shell job's backgrounded processes (`cmd &` with no `wait`) are terminated when the job ends | shell jobs that intentionally start daemons | start long-lived processes under your service manager, or detach them into their own session (`setsid`) |
-| Brains whose pack declares `extract_atoms` start receiving the daily atom auto-drain on Postgres autopilot (bounded by `autopilot.auto_drain.max_usd_per_day`, default $2) | owners of declaring packs | `gbrain config set autopilot.auto_drain.enabled false` to opt out |
-| `extract_atoms_backlog` may warn right after upgrade on declaring-pack brains until the phase runs once and stamps the source | doctor readers | run the drain command the warning names, or wait for the next auto-drain |
-
-Recommended for the wave's `behavior_changes` notice: the shell-job process-group change and the declaring-pack auto-drain (spend that starts without a new opt-in, inside the existing default cap).
diff --git a/docs/wave9/lane-a.md b/docs/wave9/lane-a.md
deleted file mode 100644
index b51b588821..0000000000
--- a/docs/wave9/lane-a.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Wave 9 lane A: pricing, caps, budget reservations
-
-Integrator notes for the release files. No version stamp or CHANGELOG header
-was written on this branch.
-
-## CHANGELOG lines
-
-- **DeepSeek caps now bound what DeepSeek bills.** `deepseek-flash` (new row) and the legacy `deepseek-v4-flash` price at $0.30 / $1.20 per 1M tokens and `deepseek-v4-pro` at $1.32 / $3.96, DeepSeek's peak rates (read 2026-10-05). The old $0.14 / $0.28 and $0.435 / $0.87 rows let a cap under-enforce by up to about 4.5x on output. Estimates that use a DeepSeek row say `(DeepSeek at peak rates, an upper bound; off-peak bills half)`. The recipe lists `deepseek-flash` first for chat and expansion. The OpenRouter `deepseek/deepseek-v4-flash-0731` row is now OpenRouter's own rate ($0.0152 / $1.28). (A-N1, #5847)
-- **`gbrain brainstorm` and `gbrain lsd` run on a model gbrain has no price for.** With no cap flag the $5 default warns and runs it (priced calls stay metered; the estimate, mid-run and new pre-judge checks count it at Sonnet rates, so an oversized run still stops). `pricing.overrides` now reaches the run. An explicit `--max-usd N` refuses a run that would call an unpriced chat, judge or embedding model before any work and names the `gbrain pricing set` command. `gbrain doctor`'s `brainstorm_health` names an unpriced brainstorm model. Builds on #5959 by @andreineacsu. (#5873)
-- **`gbrain skillopt` no longer refuses a valid model only because it has no price.** The $5 default warns and runs it; an explicit cap refuses it in the preflight, before any spend, with the shared guidance. The preflight no longer invents Sonnet rates: it uses `pricing.overrides` and the claude-cli sibling rate, and shows `Est. cost: unpriced (...)` for a model nothing prices. (#5563, A-N4)
-- **One cost-cap flag everywhere: `--max-usd N|off`.** `brainstorm`, `lsd`, `skillopt`, `enrich`, `onboard` and `eval longmemeval` share one parser. Legacy spellings keep working (`--max-cost`, `--max-cost-usd`, `--no-max-cost`). A malformed value, a bare `0` or two disagreeing cap flags are refused before any paid call; `enrich` and `onboard` used to ignore them silently. brainstorm, lsd and skillopt print one `cap: ...` line naming the cap and how to remove it; brainstorm's `--json` result carries `cost.cap_usd` and `cost.cap_source`. (D19)
-- **`gbrain pricing set 'claude-cli:*' --rate 0`** prices every claude-cli model at once for subscription users. Only providers that bill by subscription accept a wildcard; an exact model entry still wins; `gbrain pricing list` names the models it covers and labels it an operator assumption. (D20)
-- **synthesize_concepts meters claude-cli models and `pricing.overrides` correctly** instead of the Sonnet fallback, and names any model it had to meter at the fallback in `details.pricing_fallback_models`. (A-N2, #5166)
-- **Concurrent paid calls can no longer slip past a cost cap.** Each budget reservation is settled by its own id: a small call finishing first no longer frees a large in-flight call's hold, and an attempt that never reached the provider (unknown provider, invocation policy refusal) no longer keeps its hold or gets charged. (eng I6)
-- **CI: every model a recipe lists is priced or declared unpriced** (`bun run check:recipe-pricing`). (X1)
-
-## Upgrade-note rows
-
-| Who | What changes | What to do |
-| --- | --- | --- |
-| DeepSeek users with a cost cap | Caps and estimates use rates up to about 4.5x the old DeepSeek rows; a run that fit before may now stop at the cap | Raise the cap, or register your own rate: `gbrain pricing set deepseek:deepseek-flash --input <usd> --output <usd>` |
-| brainstorm / lsd / skillopt on an unpriced model, no cap flag | Runs with a warning instead of exiting with `no_pricing` | Nothing; to meter it, `gbrain pricing set <model> ...` |
-| Scripts passing `--max-cost 5` / `--max-cost-usd 5` on an unpriced model | Still refused, now before any work, with the registration command | Register the rate, or pass `--max-usd off` |
-| `enrich` / `onboard` scripts passing `--max-usd 0` or a typo | Refused (exit 2 / usage error) instead of silently falling back | Pass a positive amount or `--max-usd off` |
-| `skillopt --max-cost-usd 0` | Still uncapped, with a deprecation note | Write `--max-usd off` |
-| Queued skillopt jobs from before the upgrade | Keep the old fail-closed cap behavior (no `max_cost_source` stored) | Nothing |
-| claude-cli subscription users | Can price all claude-cli models at $0 in one line; this voids every cap for claude-cli calls | `gbrain pricing set 'claude-cli:*' --rate 0` only if that is what you want |
-
-## Notes for the integrator
-
-- No migrations.
-- `src/core/budget/no-pricing.ts` is unchanged (interface and guidance text); brainstorm and skillopt call `noPricingGuidance` / `noPricingMessage` / `noPricingFix` / `pricingSetCommand`.
-- `BudgetTracker.reserve()` now returns a `BudgetReservation | undefined`; `record()` settles only the id it is given and `release(id)` frees an unbilled attempt. Lane B's fallback hops and Lane C's probe budget should keep the id from each `reserve()` and pass it to `record()` or `release()`; an id-less `record()` settles nothing.
-- `priceFor(model, kind, overrides)` in `src/core/budget/reservation-cost.ts` is the shared resolver for Lanes B and C.
-- Regenerated: `src/core/cli-flag-registry.generated.ts` (new `--max-usd` on brainstorm, lsd, skillopt).
diff --git a/docs/wave9/lane-b.md b/docs/wave9/lane-b.md
deleted file mode 100644
index 61de1a6012..0000000000
--- a/docs/wave9/lane-b.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Fix wave 9, lane B: routing and judges (integrator notes)
-
-Release files are the integrator's. This file holds the lane's CHANGELOG lines
-and upgrade-note rows. No migrations. One new config key.
-
-## CHANGELOG lines
-
-- **Subagent turns no longer die at 5 minutes.** Each turn of a background
- subagent job now runs up to `ai.chat.per_turn_timeout_ms` (default 30 min,
- the subagent job budget) or the job's own deadline, whichever comes first,
- instead of the gateway's 300 s chat backstop. A long thinking-model or
- claude-cli turn used to be cut off with nothing written, and the retry hit
- the same wall. The oneshot synthesis call gets a quarter of the job's time
- left, up to the same cap. Calls outside a job keep the 300 s backstop. (#4921)
-- **Eval judges turn thinking off.** `chat({ thinking: 'off' })` is a
- provider-agnostic per-call switch: native Anthropic, DeepSeek and
- OpenRouter DeepSeek get their thinking switch (a configured thinking budget
- is replaced, cache settings kept); a thinking-by-default model without a
- switch keeps thinking and gets the thinking output headroom. The
- takes-quality, cross-modal and synthesize triage judges use it, so a
- 2000-token judge cap is no longer spent on reasoning. Thanks to @kvnloo
- (#5972) for the call-scoped override test. (#5331)
-- **A malformed takes-quality judge reply gets one correction.** A reply that
- is unparseable (including empty) or misses a rubric dimension is re-asked
- once with the same model, the same sample and the validator's error,
- priced against `--budget-usd` before it is sent. Provider errors and valid
- low scores are never re-asked. Receipts gain `protocol_version: 2`,
- `correction_selection_rule` and `corrections`; `regress` reports a
- protocol change as a dissimilar input. (#5325)
-- **A missing model is no longer reported as a bad key.** A provider 404
- ("model does not exist or you do not have access") is now its own class,
- `model_not_found`, instead of `auth`. The error names the model and
- provider, points at `gbrain models`, and suggests
- `deepseek:deepseek-flash` for the renamed `deepseek:deepseek-v4-flash`.
- Facts extraction logs `gateway_model_not_found`. (B-N7)
-- **Fallback chain safety fixes.** The `edge_contradictions` judge keeps its
- own model (its apply mode depends on which model it certified). With
- `chat_fallback_on_refusal false`, an HTTP 400 content-policy refusal
- (OpenAI `invalid_prompt`, Azure `content_filter`, DeepSeek "Content Exists
- Risk") is no longer sent to the next model. A cancel that lands while a
- model refuses returns the refusal instead of forwarding it. (#6012 audit)
-
-## Upgrade-note rows
-
-| Change | Who notices | Before | Now | Action |
-| --- | --- | --- | --- | --- |
-| Subagent per-turn timeout | autopilot / dream synthesis users on slow or thinking models | each turn aborted at 300 s | up to 30 min per turn, bounded by the job deadline | none; tune with `gbrain config set ai.chat.per_turn_timeout_ms <ms>` |
-| Judges run with thinking off | takes-quality, cross-modal, synthesize triage on Anthropic / DeepSeek with thinking configured | the configured thinking budget applied to judge calls | judge calls disable thinking on routes with a switch | none |
-| Takes-quality protocol 2 | anyone comparing receipts over time | a malformed slot was dropped | one correction per malformed slot, recorded in `corrections` | compare protocol 2 receipts with each other; `regress` flags a protocol change |
-| `model_not_found` class | operators reading phase halts, `ingest_log` or facts errors | a 404 read `auth` / `gateway_auth` | reads `model_not_found` / `gateway_model_not_found` | fix the model id (`gbrain models`), not the key |
-| Fallback refusal and judge pinning | users with `chat_fallback_chain` set | content-policy 400s fell back even with `chat_fallback_on_refusal false`; the edge judge could fall back | neither happens | none |
-
-## New config key
-
-- `ai.chat.per_turn_timeout_ms` (DB plane, integer ms, default 1800000):
- the per-turn chat timeout for subagent jobs. Invalid or non-positive values
- fall back to the default.
diff --git a/docs/wave9/lane-c.md b/docs/wave9/lane-c.md
deleted file mode 100644
index 075ca74d7d..0000000000
--- a/docs/wave9/lane-c.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Wave 9 lane C: the nightly quality probe tells the truth
-
-For the integrator: CHANGELOG lines and upgrade-note rows for this lane. No
-version header, no migration.
-
-## CHANGELOG lines
-
-- **The nightly quality probe uses your models.** The reader follows `models.eval.longmemeval` and then the reasoning tier, the trajectory extractor follows the utility tier, and the three judges follow the new `models.eval.cross_modal.slot_a` / `slot_b` / `slot_c` keys. Before, the probe ignored every brain-side model setting and paid for `anthropic:claude-sonnet-4-6`, `claude-haiku-4-5` and `claude-opus-4-7` even on brains routed to `claude-cli`. `gbrain models` now prints the probe's routes under "Nightly quality probe". (#5872, contributed by @andreineacsu, #6005)
-- **`autopilot.nightly_quality_probe.max_usd` is a real cap now.** One budget covers every paid call of a run: the LongMemEval reader, extractor and query embeddings, then the judges. Before, the LongMemEval stage ran uncapped and the judges' cap was skipped by `--yes`. A run that hits the cap stops, makes no further paid call and records `budget_exceeded`, never `fail`. Under the default $5 cap a model with no price on file warns and runs; once you set `max_usd`, it is refused with the `no_pricing` guidance (`gbrain pricing set ...`).
-- **A judge panel that is one model voting twice no longer reports pass or fail.** When one model holds two of the slots that judged (the sonnet/opus/sonnet panel an Anthropic-only brain got by default), or fewer than two models judged, the run is `inconclusive` with `reason: panel_collapsed` and the slot-key command to fix it. (#5506)
-- **A probe run that did not pass keeps its evidence.** The audit row names the judge panel, each failing question with per-judge scores, the reader and extractor, metered chat spend (`chat_cost_usd`) and the run cap; the batch summary and LongMemEval output are kept under `~/.gbrain/audit/nightly-probe/<timestamp>/` (newest 7). (#5506, contributed by @andreineacsu, #6005)
-- **Compiled installs run both nightly probes.** The quality probe and the conversation-parser probe now carry their fixtures inside the binary. Before, the quality probe failed every night with `nightly fixture not found at <your brain repo>/test/fixtures/...` and the parser probe skipped silently while doctor said ok. If a fixture is ever unreadable, the run records `skipped` with the reason and doctor warns instead of reporting ok. (#5187, C-N6; skip reporting reworked from @Masashi-Ono0611's #5257)
-- **The probe no longer disturbs the autopilot daemon's AI gateway.** It keeps the daemon's brain-resolved gateway and no longer swaps the process-wide embedding transport for its run (the LongMemEval embedding cache is off for the probe). (C-N5)
-- **Docs:** the probe is described as what it is, a synthetic 10-question smoke test of retrieval, answering and judging, not a health score for your brain; the cost section now uses metered spend.
-
-## Upgrade-note rows (behavior changes)
-
-| Change | Who notices | What to do |
-|---|---|---|
-| The nightly probe's reader, extractor and judges follow your brain's model settings | Brains with the probe enabled and `models.tier.*` / `models.eval.longmemeval` set | Nothing; check the routes with `gbrain models`. To keep the judges off metered APIs, set `models.eval.cross_modal.slot_a/b/c` to three different models. |
-| A collapsed judge panel reports `inconclusive` instead of pass/fail | Anthropic-only brains with no slot keys (panel sonnet/opus/sonnet) | `gbrain config set models.eval.cross_modal.slot_a <model>` (and `slot_b`, `slot_c`) with three different models; one provider is enough. |
-| `max_usd` caps the whole run, and a set value refuses unpriced models | Brains that set `autopilot.nightly_quality_probe.max_usd` and route the probe through a model with no price on file (for example a local or proxy model with no `pricing.overrides` entry) | Register the rate with the `gbrain pricing set` command the audit row names, or unset `max_usd` to go back to the warn-and-run default cap. A `max_usd` of 0 now means a $0 cap. |
-| Compiled installs start running the nightly probes | Binary installs with the quality probe enabled, or `search.mode=tokenmax` (parser probe default-on) | Nothing; the first real run happens within 24h. Doctor's `nightly_quality_probe_health` / `conversation_parser_probe_health` show the result. |
-| New audit outcome `skipped` | Anyone reading `quality-probe-*.jsonl` / `parser-probe-*.jsonl` | Treat it as "no signal": the probe could not run; the row's `reason`/`detail` says why. |
diff --git a/docs/wave9/lane-e.md b/docs/wave9/lane-e.md
deleted file mode 100644
index 4b17c70bb7..0000000000
--- a/docs/wave9/lane-e.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# Fix wave 9, lane E (session capture): release notes for the integrator
-
-Branch `capy/w9-lane-e`, based on origin/master `17c5765b`. No version bump,
-no CHANGELOG header and no migration in this lane.
-
-## CHANGELOG lines
-
-- **Codex 0.153+ sessions keep your side of the conversation (#5163).** Codex
- now records the typed turn as an `item_completed` UserMessage; gbrain read
- only the older `user_message` event, so imports and session-end corpus files
- held the assistant side alone. Both parsers read the new record (a turn
- recorded both ways is kept once).
-- **Assistant-only sessions are flagged (E-N4).** A Codex or Claude Code file
- that parses to assistant turns with no user turn now counts as drift in
- `gbrain transcripts ingest` (the watermark holds) and the session-end hook
- heartbeats `degraded` / `no_user_turns`.
-- **`gbrain transcripts recover codex` restores sessions imported before the
- fix (D15).** Preview by default; `--apply` re-imports the sessions whose
- rollouts are still on disk and lists the ones that cannot be restored. No
- facts are extracted and the `--since last` watermark is untouched.
-- **Busy-writer harvests retry instead of failing (#5557).** A serve-side
- writeback turn refused because the canonical writer was busy is re-queued
- after 5, 15 and 45 s, error reasons keep their code
- (`operationerror:writer_lock_unavailable`), and `gbrain doctor`
- `memory_writeback` warns when more than 20% of at least 10 harvests failed
- in 7 days. Contributed by @andreineacsu (#5973).
-- **`gbrain serve --http` drains the session corpus (X8).** Every 10 minutes,
- while a captured session file is still unextracted, the HTTP serve runs one
- bounded sweep (60 s budget). `GBRAIN_SWEEP=0` turns it off with the other
- serve sweeps.
-- **Sweep budgets stop between files, never mid-extraction (E-N2).** A slow
- extraction (claude-cli often 8 to 25 s) used to be cut off at the 5 s
- default budget on every `gbrain sweep --once`, paying for a call that wrote
- nothing.
-- **Captured turns nothing has extracted are kept longer (E-N1).** Corpus
- retention removes an unextracted session file only at 3x
- `dream.synthesize.corpus_retention_days` (90 days by default), and
- `gbrain doctor` `memory_writeback` reports the backlog and warns before the
- deletion day.
-- **`mentions.exclude_slugs` keeps a page out of mention linking (#5829).**
- For an entity whose name is also a common word. The next sweep removes
- mention links already written to it. The unused `extraIgnore` gazetteer
- option is gone.
-
-## Upgrade-note rows
-
-| Change | Who notices | What to do |
-|---|---|---|
-| Codex user turns now import (#5163) | Codex users | Run `gbrain transcripts recover codex` to preview restoring older sessions, then `--apply`. Facts for restored sessions are a separate, explicit `gbrain transcripts ingest <rollout> --facts --max-cost-usd <n>`. |
-| Assistant-only files count as drift (E-N4) | Anyone with a genuinely assistant-only session file | The `--since last` watermark holds while such a file is in scope (re-scans stay cheap through the content-hash skip). |
-| Harvest error reasons carry a code (#5557) | Anyone parsing the hooks heartbeat | `reason` changes from `operationerror` to `operationerror:<code>`. |
-| `serve --http` sweeps (X8) | HTTP-served brains with captured sessions and an extraction model | The drain spends extraction calls on captured files the stdio serve would already have swept: at most one 60 s sweep (20 files, 32 windows) per 10 minutes, only while unextracted files exist. Keyless brains spend nothing. `GBRAIN_SWEEP=0` disables it. |
-| Sweep budget semantics (E-N2) | Anyone running `gbrain sweep --once` with a short `--budget-ms` | A sweep can now run past its budget by one extraction call; it starts no new file after the budget. |
-| Corpus retention keeps unextracted files (E-N1) | Hosts with a growing corpus dir | Unextracted session files stay up to 90 days by default instead of 30; `gbrain doctor` names the backlog and the `gbrain sweep --once --budget-ms 600000` that clears it. |
-| `mentions.exclude_slugs` (#5829) | Brains with Hangul or common-word entity names | Optional. Existing word-internal Hangul links: `gbrain extract links --by-mention --rebuild --source db`. |
-
-## Items not built here
-
-- D15 metadata-label fact re-extraction (D-N2): depends on lane P's D-N2
- parser fix, which is not on master; build it on top of lane P.
-- #5829 key name: `mentions.exclude_slugs`, not the plan's
- `by_mention.exclude_slugs`, because master adopted the `mentions.*`
- namespace (`mentions.ignore`, `mentions.entity_types`) after the plan.
-- X8 runs inside `serve --http` rather than as an autopilot phase: the HTTP
- serve owns the corpus dir and the PGLite lock (autopilot cannot open a
- PGLite brain a serve holds), it needed no edit to `autopilot-dispatch.ts`,
- and it calls the same `runMaintenanceSweep` the plan named.
diff --git a/docs/wave9/lane-f.md b/docs/wave9/lane-f.md
deleted file mode 100644
index 5a7c5e5db5..0000000000
--- a/docs/wave9/lane-f.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Fix wave 9, lane F: auth, CLI and config
-
-Integrator notes for the release files. Nothing here is a CHANGELOG header;
-copy the lines below into the release entry and the upgrade-note table.
-
-## Migrations (placeholder numbers, renumber after master's latest)
-
-| Placeholder | Name | Commit | What |
-|---|---|---|---|
-| v209 | `w9_f_clamp_oauth_token_ttl` | 5ef75378 | Handler: clamps `oauth_clients.token_ttl` into 60..7776000 (above → 7776000, 1..59 → 60, ≤0 → NULL), bumps `grant_revision`, writes `oauth_grant_audit` (`clamp_token_ttl`); shortens outstanding access tokens to `created_at + 7776000` (never lengthens; audit `shorten_access_tokens`). Refresh tokens and legacy bearer tokens untouched. Idempotent. |
-| v210 | `w9_f_function_search_path` | daf7426b | Re-creates the three fact fingerprint SQL functions (qualified built-ins, byte-identical outputs) and ALTERs every public `gbrain_*` / `auto_enable_rls` plpgsql function with no setting to `search_path = pg_catalog, public`. Idempotent. |
-
-Both tests find their migration by name (`MIGRATIONS.find(m => m.name.endsWith(...))`), so renumbering needs no test edit. Regenerate `registry.generated.ts` and `test/fixtures/goldens/migrations/records.json` after renumbering.
-
-## CHANGELOG lines
-
-- **OAuth access tokens never outlive 90 days.** Issuance caps every access token at 7,776,000 seconds, whatever a client's stored lifetime, `oauth.dcr_ttl_max_seconds` or `serve --http --token-ttl` says, and `serve --token-ttl` refuses values outside 60..7776000 at startup. The upgrade brings stored client lifetimes into that range and shortens already-issued access tokens to 90 days after issue; `gbrain auth clients` marks affected clients and `whoami` names the `--token-ttl` repair choice. (#5040)
-- **`--source` on `timeline-add`, `ontology-add` and `takes add|update|supersede` is provenance on every route.** A provenance URL is no longer refused as an invalid source id, a provenance value that is also a source name no longer redirects the write, and a running `gbrain serve` keeps the provenance. (#5087)
-- **Skill retention and proposal commands work while `gbrain serve` owns the brain.** `get_skill_retention`, `prune_skill_revisions`, `retain_skill_revision` and `import_skill_proposal` no longer answer `unknown_tool` to the local CLI. (#5864)
-- **Every `gbrain import` refusal says why and what to run.** A symlinked root on a managed brain and a refused source filesystem lock no longer exit 1 silently; the multi-source warning also names `GBRAIN_SOURCE` and `GBRAIN_ALLOW_DEFAULT_WRITE`. (#5268, thanks @andreineacsu, #5515)
-- **`config get/set/unset embedding_disabled` and `config get/show schema_pack` report and change the value the runtime uses.** `embedding_disabled` writes both planes, the enable path clears both, and `schema_pack` shows the tier `schema active` resolves. (#5253)
-- **`gbrain doctor` warns instead of failing on missing RLS when nothing exposes the public schema.** It still fails when PostgREST roles or a Supabase URL are present. (#4939)
-- **`extract_health` dates a high halt rate by the last halt** ("last halt 4d ago"), not the last clean run. (#5863)
-- **Doctor's migration row reads the ledger like `get_health`:** a `--force-retry` marker resets the wedge, and a host migration a newer one skipped past is reported with `gbrain apply-migrations --yes`. (C-NEW-2, C-NEW-3)
-- **Remote code reads stay suspended with a clearer error** that names the follow-up (#5052) and points at `search`/`query`. (#5052)
-- **Every gbrain plpgsql function pins `search_path`;** the fingerprint functions keep identical output and stay inlinable; the `check:search-path` guard now sees every definition. (#5190, C-NEW-1)
-
-## Upgrade-note rows
-
-| What changed | Who is affected | Doctor / check | How to opt back |
-|---|---|---|---|
-| Access tokens capped at 90 days; stored client lifetimes clamped; outstanding access tokens shortened to issue + 90 days | OAuth clients whose stored lifetime or server `--token-ttl` exceeded 90 days, and their already-issued access tokens. Tokens older than 90 days stop working; refresh tokens and machine credentials get new ones; a native OAuth client with no refresh token reconnects | `gbrain auth clients` (`token_lifetime_clamped`), `whoami` `token_ttl_invalid`; docs/mcp/ADMIN.md#access-token-lifetime | None (security cap). Restart every running `gbrain serve --http` after upgrading |
-| `serve --http --token-ttl` validated | Launch scripts passing a value outside 60..7776000 or a non-number (it used to fall back to 3600 silently) | `serve` refuses at startup with the bounds message | Pass a value in range or omit the flag |
-| `--source` is provenance for ops that own a `source` param | Scripts that used `timeline-add --source <source-id>` to pick the destination source | JSON result `source_id` names the destination | Use `GBRAIN_SOURCE=<id>` or `.gbrain-source` for the destination |
-| `config set embedding_disabled` writes both planes; `set false`/`unset` actually re-enable | Keyless brains being re-enabled | `gbrain config get embedding_disabled` shows both planes | `gbrain config set embedding_disabled true` |
-| `config get/show schema_pack` print the resolved pack | Scripts reading `config get schema_pack` (now the effective value, default `gbrain-base` when nothing is set, exit 0) | `gbrain schema active` | Read `~/.gbrain/config.json` directly for the file value |
-| RLS check: plain Postgres → warn | Self-hosted Postgres with no PostgREST roles and a missing-RLS table (doctor no longer exits 1 for it) | `rls` (warn), docs/guides/rls-and-you.md | Create the PostgREST roles to get the fail verdict, or enable RLS |
-| Migration ledger row | Hosts after a `--force-retry`, or with a skipped host migration (new warn) | `minions_migration` | Run `gbrain apply-migrations --yes` |
-| Function `search_path` pinned | All Postgres/PGLite brains (no behavior change; ~10-15% more time per bulk fact insert through the withdrawal trigger in a 10k-row benchmark) | Supabase linter still lists the 3 fingerprint SQL functions (expected) | None |
-
-## Numbers that change and why
-
-- `minions_migration`: hosts that were `fail` after a forced retry become `warn` (pending), and hosts with a skipped migration gain a `warn`.
-- `rls`: plain Postgres brains with a missing-RLS table move from `fail` to `warn`, which raises their doctor score.
-- `extract_health`: the age suffix now reads "last halt Nd ago" and can be older than before.
-- OAuth `expires_in` for clients with over-cap settings drops to 7776000.
diff --git a/docs/wave9/lane-p.md b/docs/wave9/lane-p.md
deleted file mode 100644
index 90d09e98af..0000000000
--- a/docs/wave9/lane-p.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Fix wave 9, lane P (fact pipelines): release notes for the integrator
-
-Branch `capy/w9-lane-p`. The integrator owns VERSION, the CHANGELOG header and
-migration numbering; the lines below go under the wave's CHANGELOG entry.
-
-## CHANGELOG lines
-
-- **Fences synced in by a standalone `gbrain sync` now reach the facts index.** On a brain without managed persistence, a `## Facts` fence imported by `gbrain sync` used to stay out of the facts index for good: the dream cycle's own sync saw nothing new, so `extract_facts` reconciled nothing. Each cycle now also reconciles pages whose facts are behind the page (up to 250 per run, within 60 seconds), so new fences, edited fences and removed fences all land. `gbrain doctor` (`extract_health`) names fence pages that are not reconciled yet and fences it cannot read; `gbrain dream --phase extract_facts` reconciles every page at once. (#5151)
-- **Email threads extract conversation facts.** Gmail thread pages (one `## Sender · date time` heading per message) now parse into one turn per message, with the sender's name and the message time, and a thread is treated as one conversation. Before, they parsed to nothing and were retried on every run. A one-message thread is an email, not a conversation, and is recorded as not extractable. (#5025)
-- **Meeting-note labels are never speakers.** `**Attendees:**`, `**Date:**`, `**Location:**`, `**Summary:**` and similar labels no longer parse as speaker turns, so facts from meeting notes are not attributed to "Date" and dated 1970-01-01. On brains without managed persistence, a meeting or email page with no speaker turns that looks like meeting notes or a calendar event is recorded as not extractable and leaves the conversation-facts backlog until the page changes (managed brains keep retrying those pages, as before); a page with time-only turns and no date is recorded the same way instead of producing epoch-dated facts (add `date:` to its frontmatter to extract it). (#5025, D-N2)
-- **Adding a fact or take to an atom no longer re-buys its concept.** The `synthesize_concepts` change check and prompt ignore `## Facts` / `## Takes` sections, and concept pages hashed the old way are updated without a model call while their atoms are unchanged. On brains without managed persistence, re-synthesizing a concept keeps the page's fences, timeline, tags and frontmatter, and a concept whose narrative changed during synthesis is left as is and retried next run. (D-N3)
-- **Opt-in files for generated atoms and concepts.** `gbrain config set cycle.extract_atoms.write_through true` and `gbrain config set cycle.synthesize_concepts.write_through true` write generated atoms and concepts as markdown files in the source checkout on brains without managed persistence; the next run also writes the ones generated before. Targets your `.gitignore` or `storage.db_only` covers stay database-only. A concept page that already has a file is now always rewritten in place, so an old file can no longer be synced back over the new narrative. (#5041)
-
-## Upgrade-note rows
-
-| Change | Who is affected | What happens on upgrade | Action |
-|---|---|---|---|
-| Migration `w9_p_facts_reconcile` (placeholder v209) adds `page_facts_reconcile` | every brain | empty side table; no page row is rewritten | none |
-| First cycles after upgrade drain the facts watermark | unmanaged brains | each cycle reconciles up to 250 fence pages (pages without a fence are settled in one bounded statement); new fact rows embed under the existing embedding setup, keyless brains make no calls | none; `gbrain dream --phase extract_facts` drains at once |
-| Concept member hash formula | brains with concept pages | unchanged concepts are rehashed without a model call on the next `synthesize_concepts` run | none |
-| Prose meeting/email, one-message email and undated pages become terminal | unmanaged brains running conversation-facts backfill (undated pages on every brain) | those pages leave the backlog once scanned | none |
-
-## Notes for the integrator
-
-- Migration file `src/core/schema-migrations/v209-w9-p-facts-reconcile.ts` (`name: 'w9_p_facts_reconcile'`) is a placeholder number; renumbering also updates `registry.generated.ts`, `test/fixtures/goldens/migrations/records.json` and the doctor JSON goldens (schema version, Postgres RLS table count 116).
-- `test/graduation-inventory.test.ts` reviewed carry count moved 105 → 106 for the new table.
-- Size ratchet raises (each justified in its TSV row): `src/core/cycle.ts` +1, `src/core/cycle/extract-atoms.ts` +5, `processPage` +12, `runPhaseSynthesizeConcepts` +16, `runPhaseExtractAtoms` +2.
-- Catalog goldens regenerated for the new table (`test/fixtures/goldens/catalog/*`, `pglite-upgrade-replay/catalog-after-boot.json`); renumbering the migration does not change them.
-- Finding for the managed-persistence owners: on a managed brain, `extract-conversation-facts` publishes its fact and audit rows through `replaceDerivedFactsForPage` (a `withCoordinatedWrite` transaction with no persistence request), which `test/helpers/managed-connector-job-contract.ts` reports as "change without a coordinator publication receipt". Master never reached it for connector pages because they did not parse; this lane keeps it unreached for the new terminal outcomes (managed brains skip them without writing), but a multi-message Gmail thread on a managed brain now extracts through that same path.
diff --git a/docs/wave9/sg.md b/docs/wave9/sg.md
deleted file mode 100644
index 48dd7fcf69..0000000000
--- a/docs/wave9/sg.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Wave 9 lane SG: CHANGELOG lines and upgrade-note rows
-
-Integrator: fold these into CHANGELOG.md and docs/UPGRADING_DOWNSTREAM_AGENTS.md at release time.
-
-## CHANGELOG lines
-
-- **Long page filenames publish again (#5861).** Atomic and journaled writes stage through a short hidden sibling (`.<sha256 of the target path>.tmp.<uuid>`) instead of appending a suffix to the full basename, so a valid basename near the 255-byte limit no longer fails with ENAMETOOLONG or leaves a write request recovering. Recovery still accepts historical stage names and, under the owner lock, durably swaps in a short name only for a recorded stage the filesystem cannot name. Timeline write-through uses the same allocator (D-NEW-3).
-- **One image no longer stops managed sync (#5493).** With multimodal embedding on, managed sync holds each image import as `managed_image_sync_unsupported` instead of refusing the whole run, so Markdown and code beside it import and the checkpoint advances. The image is recorded as incomplete coverage (a durable hold in `gbrain sources status`, doctor `git_held_files`, and the `held_files` read notice), re-screened when it changes, leaves the source, or on `gbrain sources retry-held`; deleting or renaming an image still reconciles its page. Image holds never escalate. Reworked from a contribution by @andreineacsu (#5975).
-- **`gbrain sources set-path` repairs a stale `local_path` (#5569).** Pointing set-path at the checkout the source is already bound to used to no-op even when `sources.local_path` still named an old directory; it now updates the path. The 0.53.0 shared-skills migration retakes an inventory that never completed at the corrected root instead of recording a conflict on every run; a completed inventory whose root moved still refuses.
-- **Bundled-size skill packs adopt in one publication (#5476, A-NEW-4).** One canonical adoption may now write up to 128 files (one SKILL.md per skill plus skillpack.json, the persistence bundle bound) instead of 64, so the 75-skill bundled set adopts. A pack declaring 128 or more skills is refused at inventory as an action instead of failing after it. When skill files change after inventory, the conflict lists the changed paths and an exact `gbrain apply-migrations --migration 0.53.0 --accept-reviewed-inventory <source>=<digest> --yes` acceptance command.
-- **Portable canonical skills list their usable tools (#5150).** A shared skill published without `tools:` now inherits the caller's available brain tools as `usable_tools` (list, detail, and the v1 compatibility catalog), matching host-repository skills; `tools: []` still permits none. Revisions published before this release re-read their SKILL.md on `get_skill`; `list_skills` keeps them empty until republished.
-- **`put_skill` refuses an empty SKILL.md (A-NEW-5).** An empty or whitespace-only entry point is `invalid_params` instead of publishing a blank skill.
-- **`gbrain reindex --markdown` works on managed brains (#5377, C-NEW-5).** It used to fail every page with "cannot mutate a managed brain through the legacy writer", while doctor, upgrade and post-upgrade kept prescribing it. On a managed brain it now runs the projection repairs (`gbrain repair safe-chunks`, then `contextual-mode` unless `--no-embed`): no page revision, journal request or canonical file changes. `--type` is refused on managed brains with the repair commands.
-- **`gbrain sources writer status` no longer reports a CLI's own consumer as the brain's ingress (C-NEW-4).** The `ingress` field (always `not_running` from a one-shot CLI) is replaced by `local_process_ingress`, which says it describes only the process that answered; ownership stays under `worktrees` and `bindings`.
-- **Doctor sees unpushed source checkouts (#5063).** New `git_convergence` check: a source checkout or `sync.repo_path` with commits not on its upstream warns after 6 hours and fails after 24; uncommitted changes older than 6 hours warn. It compares with the last fetched upstream and never fetches. `bootstrap_push_health` no longer says `ok` on a recent push while the workspace is still ahead of origin, and `scripts/smoke-test.sh` accepts a configured database URL and a keyless embedding provider that doctor accepts.
-- **`gbrain takes rebuild <slug>` and `gbrain takes remove <slug> --row N` (#5167).** Rebuild re-derives one page's takes index from its fence; rows whose number and claim still match keep their resolution and vector, rows the index disagrees on are re-inserted from the fence. Remove takes one row out of the fence and the index together; other row numbers do not change, and it refuses resolved rows, rows another row cites as their replacement, and rows whose index copy disagrees with the fence (it names `takes rebuild`). Local-only (`takes_remove` is not an MCP tool). The v0.28.0 migration hint now names `gbrain reindex --markdown` instead of the nonexistent `gbrain extract takes --rebuild`.
-- **Accepted take proposals keep their provenance (#5214).** `gbrain takes propose --accept <id>` records `take_proposals#<id>` as the take's source; `--claim/--weight/--who/--kind` edit the take before it is written, recorded as `take_proposals#<id> (edited)`, while the proposal keeps its original text.
-- **Bundled skills pass the shared-skill publication parser (#5476 item 1, A-NEW-3).** The capture skill declared `writes_pages:` as a list and schema-author as `[]`, which `put_skill` and the 0.53 adoption refuse, blocking any brain that adopts the bundled pack. They now use `writes_pages: true` + `writes_to: [inbox/]` (new `inbox/` filing rule) and `writes_pages: false`, and a new `check:skill-publication` guard runs every bundled SKILL.md (source, plugin and persona trees) through the parser in verify.
-- **`gbrain skillpack sync` registers what it scaffolds (#4831).** An existing, valid workspace `skills/manifest.json` gains `{name, path}` for exactly the skills the run scaffolded (append-only; user entries and other keys untouched), reported as `registered` in `--json`, so `check-resolvable --strict` no longer flags each one as an orphan trigger.
-- **Upgrade reinstall hints no longer corrupt the global Bun install (#5034, B-NEW-5).** `gbrain upgrade`'s pinned-tag and rollback hints now print `bun remove -g gbrain && bun add -g github:garrytan/gbrain#v<version>`; an in-place tag swap fails with DependencyLoop on Bun 1.3 and silently corrupts the global lock on Bun 1.4. The authorization-upgrade guide, auto-update guide and v0.50.0.0 playbook say the same.
-- **Claude Code sees skill triggers (#5858, A-NEW-6).** The plugin and persona trees add a `when_to_use` line built from each skill's first triggers (within Claude Code's 1,536-character listing cap); source skills are unchanged. INSTALL_FOR_AGENTS.md no longer says scaffold copies RESOLVER.md, and `_AGENT_README.md` says where RESOLVER.md ships and that routing rests on frontmatter where it does not. Reworked from a contribution by @andreineacsu (#5940).
-- **Skill and doc corrections.** gbrain-upgrade: a migration playbook that forbids unattended upgrades outranks `self_upgrade.mode: auto` (#5038). perplexity-research uses the Agent API (`POST /v1/agent`, preset `low`/`fast`, recency filter on the `web_search` tool) instead of the retired Sonar chat-completions endpoint (#5534; the default-provider change in #5846 is left to Garry). ingest, eiirp and operational-disciplines gate always-on capture on the explicit automatic-capture opt-in (#5101). The recommended schema no longer claims frontmatter maps to the fact store or is searchable (#5335). The contradiction probe is documented as its own paid schedule, not part of the dream cycle, with the judge resolution order (#5559). `extract_facts` attestation points at `request_id` write receipts (#5278). The autopilot env file documents keeping keys off disk with a secret-manager command substitution (#5196). The v0.28.0 playbook names `gbrain reindex --markdown` / `gbrain takes rebuild <slug>`.
-
-## Upgrade-note rows
-
-| Change | Who is affected | Doctor / check | How to opt back |
-|---|---|---|---|
-| Staging files are now hidden `.<hash>.tmp.<uuid>` siblings (#5861) | Anyone with page basenames over ~214 bytes; operators who glob for `*.tmp.*` leftovers (the new names still contain `.tmp.`) | `gbrain sources writer status --json` shows any recovery that still holds a stage | None needed; historical journals keep working |
-| Managed sync holds images instead of refusing the run (#5493) | Managed brains with `embedding_multimodal` on whose sources contain images | doctor `git_held_files` warns with `managed_image_sync_unsupported` paths (never fails for them) | Exclude images with `sync.exclude`, or turn multimodal embedding off; either clears the holds on the next sync |
-| set-path updates a stale `sources.local_path` (#5569) | Sources whose DB path drifted from their writer binding | `gbrain sources list --json` shows the corrected path | None |
-| 0.53.0 migration: re-inventory, 128-file pack adoption, reviewed acceptance (#5476) | Brains adopting shared skills with >63 skills or edited packs | `gbrain apply-migrations --migration 0.53.0 --dry-run --json` shows per-source stages | Don't pass `--accept-reviewed-inventory`; the conflict stays until reviewed |
-| Canonical skills without `tools:` inherit brain tools (#5150) | Clients reading `usable_tools` for shared skills | `gbrain call get_skill '{"name":"<skill>"}'` | Declare `tools:` in the skill to narrow it |
-| Empty SKILL.md refused (A-NEW-5) | Editors publishing placeholder skills | none | Write a non-empty SKILL.md |
-| Managed `reindex --markdown` delegates to projection repairs (#5377) | Managed brains with chunker or contextual-mode drift | doctor calibration hint (`gbrain reindex --markdown`) now works | Run `gbrain repair safe-chunks` / `contextual-mode` directly for per-kind control |
-| `writer status`: `ingress` → `local_process_ingress` with a `scope` note (C-NEW-4) | Scripts reading `ingress` from `gbrain sources writer status --json` | none | Read `local_process_ingress.state`; for ownership read `worktrees`/`bindings` |
-| New doctor `git_convergence`; `bootstrap_push_health` warns when ahead (#5063) | Brains syncing from Git checkouts with an upstream | `gbrain doctor --only git_convergence` | Push the checkout; checkouts without an upstream are skipped |
-| New `takes rebuild` / `takes remove` (local-only op `takes_remove`) (#5167) | Operators repairing takes | `gbrain takes <slug> --json` | None |
-| Accepted proposals carry `source: take_proposals#<id>` (#5214) | Anyone reading take sources | `gbrain takes <slug>` | None |
-| Bundled capture/schema-author frontmatter fixed; new `check:skill-publication` guard (#5476, A-NEW-3) | Brains adopting the bundled pack (0.53) | `bun run check:skill-publication` (repo) | None |
-| `skillpack sync` appends to an existing manifest.json (#4831) | Workspaces with a hand-kept skills/manifest.json | `gbrain check-resolvable --strict` | Remove the appended entries by hand |
-| Reinstall hints use remove + add (#5034) | Bun global installs on a pinned tag | `gbrain --version` after reinstall | None |
-| Plugin skills gain `when_to_use` (#5858) | Claude Code / Codex plugin users | `gbrain skillpack list` | None |
diff --git a/openclaw.plugin.json b/openclaw.plugin.json
index eb9eeb1a09..3c618b5d81 100644
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@ -1,7 +1,7 @@
{
"id": "gbrain-context-engine",
"name": "gbrain",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Personal knowledge brain with Postgres + pgvector hybrid search",
"family": "bundle-plugin",
"kind": "context-engine",
diff --git a/package.json b/package.json
index 7169eee0f8..806a7dfdba 100644
--- a/package.json
+++ b/package.json
@@ -221,7 +221,7 @@
"bun": ">=1.4.0"
},
"license": "MIT",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"overrides": {
"@ai-sdk/provider-utils": "4.0.56",
"@hono/node-server": "^2.0.5",
diff --git a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
index a0a5b42859..f195704633 100644
--- a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
index 9491c53e87..82034c0970 100644
--- a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/README.md b/plugin-variants/gbrain-coding/README.md
index fa5cff2d97..af8ad25b1f 100644
--- a/plugin-variants/gbrain-coding/README.md
+++ b/plugin-variants/gbrain-coding/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.69.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->
# gbrain-coding (generated persona variant — do not hand-edit)
Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant.
diff --git a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
index 1100944314..677d01ae6f 100644
--- a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
index f592f18427..50e27aad1d 100644
--- a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.69.0",
+ "version": "0.60.70.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/README.md b/plugin-variants/gbrain-daily/README.md
index fce4fbdf0c..85f3ca6890 100644
--- a/plugin-variants/gbrain-daily/README.md
+++ b/plugin-variants/gbrain-daily/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.69.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->
# gbrain-daily (generated persona variant — do not hand-edit)
Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant.
diff --git a/plugin/README.md b/plugin/README.md
index 66eba794be..ef4dcc135c 100644
--- a/plugin/README.md
+++ b/plugin/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.69.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->
# gbrain plugin skill tree (generated — do not hand-edit)
This tree is the curated skill set for the gbrain Codex and Claude Code
diff --git a/skills/migrations/v0.60.70.0.md b/skills/migrations/v0.60.70.0.md
new file mode 100644
index 0000000000..0708bacd78
--- /dev/null
+++ b/skills/migrations/v0.60.70.0.md
@@ -0,0 +1,36 @@
+# Upgrade to v0.60.70.0: fix wave 9
+
+Bug fixes across cost caps, background jobs, the nightly quality probe, facts, session capture, auth and skills. Three schema migrations; a few outputs and defaults change. Nothing here needs the user's consent, but relay the one-time `behavior_changes` notice when gbrain prints it.
+
+1. **Finish the upgrade.** `gbrain upgrade` runs it. To be sure, on the brain host:
+ ```bash
+ gbrain apply-migrations --yes --no-autopilot-install
+ ```
+ v209 adds the empty `page_facts_reconcile` table. v210 clamps stored OAuth client token lifetimes into 60..7,776,000 seconds and shortens already-issued access tokens to 90 days after issue (refresh and machine bearer tokens untouched). v211 pins `search_path` on gbrain's database functions.
+
+2. **Restart long-running processes.** Tell the user to restart every `gbrain serve --http`, autopilot daemon and `gbrain jobs work` worker so the token cap and the new shutdown handling take effect.
+
+3. **Relay the behavior changes.** The one-time notice names six changes the user may notice: shell jobs terminate processes they leave behind (`setsid` or a service manager for daemons), declaring-pack brains start the daily `extract_atoms` auto-drain within `autopilot.auto_drain.max_usd_per_day` (opt out: `gbrain config set autopilot.auto_drain.enabled false`), OAuth access tokens last at most 90 days (a client without a refresh token reconnects), `gbrain sources writer status --json` renames `ingress` to `local_process_ingress`, `gbrain jobs work` exits 0 after a SIGTERM drain and 17 when work was handed back, and unextracted session files are kept up to 90 days. `gbrain doctor --only behavior_changes` shows it again.
+
+4. **Update scripts and skill forks you maintain.**
+ - Read `local_process_ingress.state` instead of `ingress`; for ownership read `worktrees` / `bindings`.
+ - `gbrain jobs supervisor stop --json` gains `drained`, `checks` and `queue`; reason `timeout_40s` is now `timeout`.
+ - Cost caps use one flag, `--max-usd N|off`; a bare `0` is refused (write `off`). Remote `run_skillopt` needs a positive `max_cost_usd`.
+ - `--source` on `timeline-add`, `ontology-add` and `takes add|update|supersede` is provenance; choose the destination with `GBRAIN_SOURCE=<id>` or `.gbrain-source`.
+ - A fork of the bundled `capture` skill: frontmatter is `writes_pages: true` with `writes_to: [inbox/]`; `schema-author` is `writes_pages: false`. A list-valued `writes_pages` is refused by `put_skill` and the 0.53.0 adoption.
+ - A fork of `perplexity-research`: the Sonar chat-completions endpoint is retired; use the Agent API (`POST /v1/agent`).
+ - Forks of `ingest`, `eiirp` and `operational-disciplines`: always-on capture runs only after the user's explicit automatic-capture opt-in.
+ - A fork of `gbrain-upgrade`: a migration playbook that forbids unattended upgrades outranks `self_upgrade.mode: auto`.
+ - Upgrade hints to a pinned tag: `bun remove -g gbrain && bun add -g github:garrytan/gbrain#v<version>`, never an in-place tag swap.
+
+5. **Optional follow-ups to offer the user.**
+ - Codex users: `gbrain transcripts recover codex` previews restoring the user side of sessions imported before this release; `--apply` re-imports them (no facts extracted).
+ - Nightly quality probe: `gbrain models` shows its routes. On an Anthropic-only brain, set three different judges so the panel can reach a verdict: `gbrain config set models.eval.cross_modal.slot_a <model>` (and `slot_b`, `slot_c`). If the user set `autopilot.nightly_quality_probe.max_usd`, an unpriced model is refused; register its rate with `gbrain pricing set`.
+ - Brains without managed persistence: `gbrain dream --phase extract_facts` reconciles every synced `## Facts` section at once instead of 250 pages per cycle.
+
+6. **Verify.**
+ ```bash
+ gbrain doctor
+ gbrain auth clients
+ gbrain sources writer status --json
+ ```
diff --git a/skills/skills.lock.json b/skills/skills.lock.json
index 52548911ee..f31d73fde6 100644
--- a/skills/skills.lock.json
+++ b/skills/skills.lock.json
@@ -171,6 +171,7 @@
"migrations/v0.60.61.0.md": "7071a52b954f42d18bcf73e115926ba77025e0fc35640ba84d2eb5d048105af7",
"migrations/v0.60.62.0.md": "e91c9b8caee58f6cfa519177ba2b0625b73cf26756a28a451003d78646a5eacf",
"migrations/v0.60.63.0.md": "cdc9f862a719bdb76140b5069fb659987978bc2d90498d808bc5d766dbf16891",
+ "migrations/v0.60.70.0.md": "a1efea5b4b0b29ef4cbe8abb3d820d885c4f78da87e7ebe7d8087cf3e5776260",
"migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a",
"migrations/v0.8.0.md": "1919ff8b8f3680612ff888e7cfcc0d86ece5d5304ae19af4497bdf40b050561a",
"migrations/v0.8.1.md": "fad7341cfb5e02545fb8a23221d12ab395fc3d8db15d1d8ee8a18844aea6563a",
diff --git a/src/core/cli-flag-registry.generated.ts b/src/core/cli-flag-registry.generated.ts
index af608f8e4a..1cb9b312b1 100644
--- a/src/core/cli-flag-registry.generated.ts
+++ b/src/core/cli-flag-registry.generated.ts
@@ -71,7 +71,7 @@ export const CLI_FLAG_REGISTRY: Record<string, readonly string[]> = {
'graph-query': ['--brain', '--depth', '--direction', '--help', '--hop', '--include-foreign', '--json', '--mcp-only', '--source', '--type'],
'hook': ['--allow-unverified-remote', '--auto', '--brain', '--branch', '--cached', '--count', '--diff-filter', '--end-of-options', '--env', '--get', '--harness', '--help', '--jq', '--json', '--name-only', '--others', '--path', '--porcelain', '--pure', '--quiet', '--seat', '--session', '--show-current', '--show-toplevel', '--source'],
'import': ['--accept-pending', '--allow-empty', '--allow-noncanonical-root', '--apply', '--background', '--brain', '--cached', '--diff-filter', '--dim', '--embedding-dimensions', '--embedding-model', '--empty', '--exclude', '--exclude-standard', '--explain', '--follow', '--force', '--force-rechunk', '--format', '--fresh', '--help', '--include-gitignored', '--is-shallow-repository', '--json', '--log-noop', '--name-only', '--no-accept-pending', '--no-embed', '--no-embedding', '--no-gpg-sign', '--no-pull', '--no-renames', '--no-verify', '--only', '--others', '--path', '--probe', '--progress-interval', '--progress-json', '--quiet', '--show-toplevel', '--skip-failed', '--slugs', '--source', '--source-id', '--stale', '--status', '--supabase', '--timeout', '--to', '--url', '--verify', '--wait', '--workers'],
- 'init': ['--access', '--allow-create-db', '--allow-docker', '--brain', '--break-lock', '--chat-model', '--check', '--content-root', '--db-only', '--dim', '--embedding-dimensions', '--embedding-model', '--expansion-model', '--force', '--git', '--grant-types', '--help', '--http', '--issuer-url', '--json', '--key', '--local-postgres', '--mcp-only', '--mcp-url', '--migrate-only', '--model', '--no-autopilot-install', '--no-embedding', '--no-expand', '--no-git', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--only', '--path', '--pglite', '--plan', '--prefer-postgres', '--probe', '--provenance', '--query', '--quiet', '--save', '--schema-pack', '--scopes', '--show-toplevel', '--skip-embed-check', '--source', '--stale', '--status', '--supabase', '--surface', '--to', '--touchpoint', '--url', '--url-env', '--version', '--yes'],
+ 'init': ['--access', '--allow-create-db', '--allow-docker', '--brain', '--break-lock', '--budget-ms', '--chat-model', '--check', '--content-root', '--db-only', '--dim', '--embedding-dimensions', '--embedding-model', '--expansion-model', '--force', '--git', '--grant-types', '--help', '--http', '--issuer-url', '--json', '--key', '--local-postgres', '--mcp-only', '--mcp-url', '--migrate-only', '--model', '--no-autopilot-install', '--no-embedding', '--no-expand', '--no-git', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--once', '--only', '--path', '--pglite', '--plan', '--prefer-postgres', '--probe', '--provenance', '--query', '--quiet', '--save', '--schema-pack', '--scopes', '--show-toplevel', '--skip-embed-check', '--source', '--stale', '--status', '--supabase', '--surface', '--to', '--touchpoint', '--url', '--url-env', '--version', '--yes'],
'integrations': ['--auto', '--brain', '--dry-run', '--help', '--json', '--overwrite', '--refresh', '--source', '--target'],
'integrity': ['--accept-pending', '--auto', '--backend', '--background', '--brain', '--confidence', '--cost', '--dry-run', '--explain', '--follow', '--fresh', '--help', '--json', '--limit', '--no-accept-pending', '--probe', '--progress-interval', '--progress-json', '--quiet', '--review-lower', '--skip-bare-tweet', '--skip-urls', '--source', '--supabase', '--timeout', '--type', '--url', '--wait'],
'jobs': ['--abbrev-ref', '--access', '--add', '--aliases', '--all', '--allow-empty', '--allow-shell-jobs', '--allowed-operations', '--apply', '--asof', '--auto', '--background', '--backoff-delay', '--backoff-jitter', '--backoff-type', '--batch-size', '--bound-slug-prefixes', '--brain', '--break-lock', '--by-mention', '--cached', '--catch-up', '--cli-path', '--client', '--cluster-errors', '--concurrency', '--confidence', '--confirm-destructive', '--cost-estimate', '--date', '--dated-since', '--days', '--delay', '--detach', '--diff-filter', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--entities', '--exclude', '--exclude-standard', '--expect', '--explain', '--facts', '--federated-read', '--filters', '--fix', '--follow', '--force', '--force-break-lock', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--fuzzy', '--group', '--hard-deadline', '--health-interval', '--help', '--http', '--id', '--idempotency-key', '--ids', '--images', '--include-deleted', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--infer-dates', '--inject-bootstrap', '--inline', '--input', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--job-id', '--job-isolation', '--json', '--kind', '--limit', '--lock-duration-ms', '--log-noop', '--markdown', '--max-age', '--max-attempts', '--max-cost', '--max-cost-usd', '--max-crashes', '--max-rss', '--max-sources', '--max-stalled', '--max-usd', '--max-waiting', '--mcp-only', '--min-context', '--missing-path', '--model', '--multimodal', '--name-only', '--ner', '--nice', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-confirm', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-inject', '--no-pull', '--no-renames', '--no-schema-pack', '--no-verify', '--no-worker', '--non-interactive', '--now', '--older-than', '--once', '--only', '--order', '--others', '--output', '--override-disabled', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--pause', '--phase', '--pid-file', '--priority', '--probe', '--prune-orphans', '--queue', '--queue-only', '--quiet', '--reason', '--rebuild', '--recent', '--redact-secrets', '--reenrich-after', '--refresh-ms', '--refresh-operations', '--replace', '--repo', '--reset-checkpoint', '--resume', '--retry-failed', '--retry-held', '--review-lower', '--row', '--scopes', '--segment-limit', '--select', '--serial', '--session', '--show-toplevel', '--sigkill-rescue', '--since', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--sleep', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--status', '--strategy', '--surface', '--swap-only', '--target', '--thin', '--thin-threshold', '--timeout', '--timeout-ms', '--to', '--trust', '--type', '--types', '--uninstall', '--url', '--user', '--vectors', '--verbose', '--verify', '--version', '--watch', '--wedge-rescue', '--workers', '--working-tree', '--yes'],
diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.md
index f28859beed..fc55d828ad 100644
--- a/templates/bootstrap/template-repo/README.md
+++ b/templates/bootstrap/template-repo/README.md
@@ -1,6 +1,6 @@
# gbrain agent workspace — template
-<!-- gbrain-template-stamp: 0.60.69.0 -->
+<!-- gbrain-template-stamp: 0.60.70.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same