Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge origin/master (v0.60.72.0, #6094) into capy/fix-wave-9; restamp v0.60.73.0
time-attack97ada9513d42
diff --cc .claude-plugin/plugin.jsonindex 132c947a93,132c947a93..bddf50b0c0--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc .codex-plugin/plugin.jsonindex 57aacff013,57aacff013..09ee10b7af--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc BOOTSTRAP_FOR_AGENTS.mdindex 5537ec1ebf,5537ec1ebf..420516f89e--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-runbook-stamp: 0.60.72.0 -->++<!-- gbrain-runbook-stamp: 0.60.73.0 --><!-- This stamp must equal the VERSION file at every release; CI enforces it(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it tothe installed binary and warns on skew. -->diff --cc CHANGELOG.mdindex 109f940a09,55c79e7535..55b832f007--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -10,168 -10,21 +10,183 @@@ credits are retained; no result has beeidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).- ## [0.60.72.0] - 2026-10-05++## [0.60.73.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.72.0++## To take advantage of v0.60.73.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.72.0] - 2026-10-05++ **`ci:ubicloud` VMs carry their owner's name, an interrupted run destroys every VM it asked for, and no run destroys another owner's VMs.**++ VMs are named `ubirun-<owner>-<epoch>-<suffix>`, where the owner is `UBI_OWNER` or a per-machine id. Before, nothing showed which thread a VM belonged to, and every `up` destroyed any `ubirun-*` VM older than 12 hours, whoever started it. That sweep is now off unless `UBI_GC_HOURS` is set, and even then it only destroys the caller's own VMs. `ubi-runner.sh gc HOURS` runs the same sweep by hand.++ A run stopped with SIGTERM while VMs were still provisioning used to tear down before their create requests finished. Those VMs appeared afterwards and leaked (three `standard-16` VMs sat idle for 84 minutes). SIGHUP, which a dropped terminal or a cancelled background operation sends, was not handled at all, so the run died with every VM still up (14 leaked VMs on 2026-10-04). Now SIGINT, SIGTERM, SIGHUP and SIGQUIT all take the same teardown path, and a second signal can't cut it short. Each name is recorded before its create is sent. An interrupted `up` finishes its create request and destroys its own VM. Teardown then polls every recorded name until it is confirmed gone. Mock-API tests reproduce both old leaks (SIGTERM left two of three VMs behind, SIGHUP all three) and pass with the fix.++ `ubi-runner.sh list --mine` lists your VMs, and `ubi-runner.sh usage` shows VMs and vCPUs per owner across the project. A create refused for vCPU quota now says how many vCPUs it needed, how many the project uses and the maximum, followed by that per-owner table.++ ## To take advantage of v0.60.72.0++ - Run `UBI_OWNER=<your-thread-code> bun run ci:ubicloud`. You no longer need `UBI_GC_HOURS=0`.+ - In a multi-lane wave, lanes run `ci:ubicloud:diff` or targeted suites, and only the integrator runs the full gate. One full gate takes 64 of the project's 256 vCPUs.+## [0.60.71.0] - 2026-10-05**Turning off contextual retrieval no longer serves vectors built from an old title.**diff --cc TODOS.mdindex 119d4c5bdd,5be9d48641..ee3966eb93--- a/TODOS.md+++ b/TODOS.md@@@ -1,17 -1,5 +1,17 @@@# TODOS- ## Fix wave 9 follow-ups (filed 2026-10-05, follow-up from v0.60.72.0)++## Fix wave 9 follow-ups (filed 2026-10-05, follow-up from v0.60.73.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.72.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.++- [ ] **P2 — Re-extract conversation facts misattributed to meeting-note labels.** **What:** before v0.60.73.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.+- [ ] **P2 — Concept publication can overwrite a narrative edited in the file mid-cycle.** **What:** `src/core/cycle/concept-publication.ts` rechecks the database row against the synthesis baseline but not the markdown file it then rewrites; a file edit made after the cycle's sync and before the concept publishes is lost. **Fix:** when the file exists, also require its fence-stripped body to equal the baseline and defer with `revision_conflict` otherwise, with a test that proves no perpetual deferral on formatting-only differences. **Effort:** S. **Priority:** P2.+- [ ] **P2 — `takes remove` can free a row number for reuse.** **What:** row allocation is max(fence)+1 (`src/core/takes-fence.ts`), so removing the highest row lets the next `takes add` reuse its number; `take_proposals.promoted_row_num` and agents caching row numbers then point at a different claim. **Fix:** keep a per-page high-water mark (or a struck tombstone row) so numbers are never reused, or clear `promoted_row_num` for proposals that pointed at the removed row. **Effort:** S. **Priority:** P2.+- [ ] **P3 — Judge cost estimates ignore thinking headroom.** **What:** with `thinking: 'off'`, a thinking-by-default route without a per-call switch (GLM, claude-cli Claude 5) gets a 32,000-token output cap, but the takes-quality projection and cross-modal `--max-usd` preflight still price 2,000/4,000 output tokens. Google judges (`gemini-2.5-flash` on the default takes-quality panel) get no thinking switch at all. **Fix:** size both estimates with `thinkingOffMaxOutputTokens`, and map Google to `thinkingConfig.thinkingBudget: 0` after a live check. **Effort:** S. **Priority:** P3.+- [ ] **P3 — In-process job errors during shutdown are always treated as shutdown interruptions.** **What:** `src/core/minions/worker.ts` re-queues any in-process job that throws while shutdown is in progress (no attempt burned, `error_text` overwritten), including an `UnrecoverableError` from a handler that ignores `shutdownSignal`. **Fix:** take the shutdown path only when the error is the shutdown abort's reason (or the shell handler's shutdown kill). **Effort:** S. **Priority:** P3.+- [ ] **P3 — `jobs supervisor stop` liveness check can hit a recycled worker PID.** **What:** it checks every `worker_spawned` pid of the supervisor in this week's audit file, including workers that already exited; a recycled pid makes a clean drain exit 1 with `worker_still_running`. **Fix:** check only spawns without a later `worker_exited`, or record the last worker pid on the `stopped` event. **Effort:** S. **Priority:** P3.+- [ ] **P3 — `gbrain takes rebuild` while `gbrain serve` owns a PGLite brain.** **What:** `takes remove` delegates through the owner, but `takes rebuild` (the recovery its refusal names) opens the engine and waits on the serve's lock. **Fix:** an IPC-delegated rebuild op, or route the refusal's hint through the owner. **Effort:** M. **Priority:** P3.+- [ ] **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.+## Contributor audit wave follow-ups (filed 2026-10-05, GBRA-40)### delta (owner: GBRA-40 (delta follow-ups))diff --cc VERSIONindex 8c2cf35bfa,8c2cf35bfa..7b924ac564--- a/VERSION+++ b/VERSION@@@ -1,1 -1,1 +1,1 @@@--0.60.72.0++0.60.73.0diff --cc openclaw.plugin.jsonindex 8d17ea7d2f,8d17ea7d2f..bd4ea6f146--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@@ -1,7 -1,7 +1,7 @@@{"id": "gbrain-context-engine","name": "gbrain",-- "version": "0.60.72.0",++ "version": "0.60.73.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --cc package.jsonindex 95c0551cff,bdd1924042..46330274ea--- a/package.json+++ b/package.json@@@ -221,7 -219,7 +221,7 @@@"bun": ">=1.4.0"},"license": "MIT",-- "version": "0.60.72.0",++ "version": "0.60.73.0","overrides": {"@ai-sdk/provider-utils": "4.0.56","@hono/node-server": "^2.0.5",diff --cc plugin-variants/gbrain-coding/.claude-plugin/plugin.jsonindex db1a054886,db1a054886..8902ee4d8e--- a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json+++ b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-coding",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc plugin-variants/gbrain-coding/.codex-plugin/plugin.jsonindex 87175e19c4,87175e19c4..6e5f5401e8--- a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json+++ b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-coding",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc plugin-variants/gbrain-coding/README.mdindex a917cc3707,a917cc3707..50c4c40116--- a/plugin-variants/gbrain-coding/README.md+++ b/plugin-variants/gbrain-coding/README.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-plugin-tree-stamp: 0.60.72.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.73.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 --cc plugin-variants/gbrain-daily/.claude-plugin/plugin.jsonindex 4eff2623fb,4eff2623fb..2f4ce0e725--- a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json+++ b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-daily",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc plugin-variants/gbrain-daily/.codex-plugin/plugin.jsonindex 659ba3724c,659ba3724c..14a44b9dc2--- a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json+++ b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-daily",-- "version": "0.60.72.0",++ "version": "0.60.73.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 --cc plugin-variants/gbrain-daily/README.mdindex b317d99bc1,b317d99bc1..b6b5c5abbe--- a/plugin-variants/gbrain-daily/README.md+++ b/plugin-variants/gbrain-daily/README.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-plugin-tree-stamp: 0.60.72.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.73.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 --cc plugin/README.mdindex 650484eec9,650484eec9..77d4f3352d--- a/plugin/README.md+++ b/plugin/README.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-plugin-tree-stamp: 0.60.72.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.73.0 --># gbrain plugin skill tree (generated — do not hand-edit)This tree is the curated skill set for the gbrain Codex and Claude Codediff --cc skills/migrations/v0.60.73.0.mdindex ac7efbbf39,0000000000..2ff031ff5amode 100644,000000..100644--- a/skills/migrations/v0.60.73.0.md+++ b/skills/migrations/v0.60.73.0.md@@@ -1,36 -1,0 +1,36 @@@- # Upgrade to v0.60.72.0: fix wave 9++# Upgrade to v0.60.73.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 --cc skills/skills.lock.jsonindex ef48872285,673dbce106..645eea8db0--- a/skills/skills.lock.json+++ b/skills/skills.lock.json@@@ -171,7 -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.72.0.md": "d30db0c8d3cb96884e64c3e9e39c9ff28882a10307d41931515fe5ddc220f918",++ "migrations/v0.60.73.0.md": "7a7f4bd5e1b4a5d423dfdaf147d28aee1b05a7b7069027d7f42c489c9fd45db8","migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a","migrations/v0.8.0.md": "1919ff8b8f3680612ff888e7cfcc0d86ece5d5304ae19af4497bdf40b050561a","migrations/v0.8.1.md": "fad7341cfb5e02545fb8a23221d12ab395fc3d8db15d1d8ee8a18844aea6563a",diff --cc templates/bootstrap/template-repo/README.mdindex 1c9867208d,1c9867208d..4fafad2ab2--- a/templates/bootstrap/template-repo/README.md+++ b/templates/bootstrap/template-repo/README.md@@@ -1,6 -1,6 +1,6 @@@# gbrain agent workspace — template--<!-- gbrain-template-stamp: 0.60.72.0 -->++<!-- gbrain-template-stamp: 0.60.73.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same