Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge capy/w14-pr4b (cbdaf053a, .167/v236 over master 3001fd9a5) into wave 14 PR1 rebuilt from ee69bcc0e without #6447; stamp 0.60.168.0 (GBRA-40 reorder)
garrytan3b5d3487241c
diff --cc .claude-plugin/plugin.jsonindex 6382e20a1b,6382e20a1b..7708e0512f--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",-- "version": "0.60.167.0",++ "version": "0.60.168.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 d6fbe051ea,d6fbe051ea..9e11040df8--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",-- "version": "0.60.167.0",++ "version": "0.60.168.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 4d986d4141,4d986d4141..fde69d5981--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-runbook-stamp: 0.60.167.0 -->++<!-- gbrain-runbook-stamp: 0.60.168.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 7eb80f9785,3b8f56ed04..5ab6f1235d--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -10,53 -10,7 +10,53 @@@ 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.167.0] - 2026-10-11++## [0.60.168.0] - 2026-10-11++**Fix wave 14, part 1: the big-brain memory blowups stop, a renamed page keeps its history, and `gbrain init` tells you who is blocking it instead of hanging.**++Eleven reports from large brains, managed checkouts and the schema tooling. Each one was reproduced on the current tree with a test that failed first, and the fix was written in our own code; one contributor diagnosis is credited below.++### What you see++| Where | What changed |+|---|---|+| `gbrain backlinks` and the autopilot backlinks phase | The gap scan streams the brain in passes and keeps only slugs, titles and candidate targets per page, so memory tracks the largest file, not the brain (384 MiB of markdown: +88 MB RSS, was +1.47 GB). The walk yields every 64 files, so the heartbeat and the RSS watchdog run again (#6438). |+| `gbrain schema` mutations on a YAML pack | Quoted scalars decode on the way back in, so a link-type regex no longer doubles its backslashes on every alias change. The writer re-reads its own output and refuses `schema_pack_emit_mismatch` with the file untouched; a pack over 8 MiB refuses `schema_pack_too_large` before it is read; doctor warns on a mutable pack over 1 MiB with the hand-repair runbook (#6432). |+| A recreated or symlinked canonical root | `transfer prepare/accept --self-transfer --confirm-relocated-root` waives only the inode and birth comparison, and only when the outside-root reservation and every other identity field agree. The pre-activation release stops asserting physical identity, `deactivate --dry-run` lists `physical_root` exactly when its real run would refuse, and `sources set-path` converges a checkout reached through a symlink (#5914). |+| Ownership markers in a Git checkout | Stamping a root appends the marker patterns to `<gitdir>/info/exclude`; the push deny list and the bootstrap `.gitignore` carry them plus `.gbrain-bootstrap.lock/**`; doctor warns `tracked_ownership_marker` with the `git rm --cached` fix (#5186). |+| A root `AGENTS.md` or `CLAUDE.md` | Sync and import treat them as scaffolding, like `README.md`, instead of pages (#5186). |+| `gbrain skillpack reference` | `--dry-run=true`, a typo or an unknown flag exits 2 before any write instead of running the real apply (#5491). |+| Renaming a file onto an occupied slug | The unique violation is classified instead of swallowed. A tombstone at the destination is merged in one transaction (re-keyed `<slug>~purged-<id>`, history kept) and the page moves with its id and a repaired `source_path`. When the destination is a live page the existing add-and-soft-delete fallback still runs, but it now carries the old row's versions, timeline, edges, aliases and fact withdrawals onto the surviving row first, deduplicated on the links key. Any other error fails the file without advancing the checkpoint (#5431). |+| `sources archive / remove / purge` | A retire no longer hashes the whole checkout when every binding already carries a verified digest; the dry run reports `manifest_required` either way (#5200). |+| Chat transcript pages with a `timezone` | Time-only timestamps are read in the page's declared zone and stored as UTC; an unknown zone is reported as `invalid_timezone` (#5430). |+| Pages whose slug the file path cannot derive (`notes/a--b`) | Export and managed writes stamp `slug:` into the frontmatter; `gbrain repair frontmatter` adds it to legacy files as a safe candidate; the reconcile audit classifies such pages `slug_rule_mismatch` (#5966). |+| `gbrain init` / `upgrade` on Postgres | The schema replay and each migration wait at most `GBRAIN_SCHEMA_LOCK_TIMEOUT_SECONDS` (default 60) for a table lock, then stop with `schema_lock_blocked` naming the blocking sessions by pid, application and state (never their query text) and the `pg_terminate_backend` exit; init retries with a short backoff. The row-level-security block skips tables already covered, so a re-run takes no exclusive lock on them (#5227). |++### Things to watch++- **Chat timestamps move.** A conversation page that declares `timezone:` now has its time-only timestamps converted to UTC (`09:15` in `America/Los_Angeles` is stored as `16:15Z`, was `09:15Z`). Pages imported earlier keep their stored values until re-ingested.+- **Export output gains a line.** A page whose slug the path cannot derive is exported with `slug:` in its frontmatter; byte-for-byte comparisons of such exports change once.+- **A live-destination rename is not held.** Holding it would break the pinned fallback-reconcile contract (#3056, #3479, #3583); the fallback keeps running and now carries the page's identity. The hold design is parked, not shipped.+- **`init` and `upgrade` can now fail where they used to wait.** A blocked step exits with `schema_lock_blocked` after the bound; rerun after the named session ends. Set `GBRAIN_SCHEMA_LOCK_TIMEOUT_SECONDS` higher for a maintenance window where waiting is wanted.+- **Shipped migration text is unchanged.** Only the `src/schema.sql` base RLS block became conditional; the TS schema fragments that double as migration text (`v184`–`v187`, `v204`, `v212`, `v213`, `v227`, the shared-skills and purge fragments) keep their bytes, so their replays at init still take ACCESS EXCLUSIVE on their tables, now under the bounded `lock_timeout` with the blocker named.+- **Not fixed here:** the `transaction: false` handler migrations and the post-migration `verifySchema` run outside the lock bound (they issue their own statements); the recorded flake in the v24 RLS test stays open while that test now calls the migration handler directly.++### Itemized changes++- `findBacklinkGaps` is a three-pass stream (`findBacklinkGapsAsync` yields every 64 files); `runBacklinksCore` returns the gap list so the CLI walks once (#6438).+- Schema-pack loader decodes the JSON escape subset in double-quoted scalars and `''` in single-quoted ones; `writePackManifest` parses its own output before the atomic write (`schema_pack_emit_mismatch`); `loadPackFromFile` refuses `schema_pack_too_large` from the descriptor size (`GBRAIN_SCHEMA_PACK_MAX_BYTES`); doctor `schema_pack_active` warns on an oversized mutable pack (#6432).+- `--confirm-relocated-root` on self-transfer prepare/accept, persisted on the prepared record and re-stamped through compare-and-swap (`stale_record` detail on a foreign change); `releasePreActivationClaims` locks by reservation worktree id and token; deactivate previews match their real operations; `sources set-path` accepts `realpath(old) === new` with matching token (#5914).+- Ownership markers excluded in `<gitdir>/info/exclude`, `PUSH_DENY_GLOBS` and the bootstrap template; doctor `tracked_ownership_marker` rides the git-convergence entry (#5186). Root `AGENTS.md` / `CLAUDE.md` join `SYNC_ROOT_SKIP_FILES` via `isSyncMetafile` (#5186).+- `skillpack reference` registered in `STRICT_SELF_HELP_SUBCOMMANDS`; help splits the per-skill and `--all` grammars (#5491).+- `renamePageOntoSlug` runs the rename and the `source_path` repair in one maintenance transaction and classifies SQLSTATE 23505; `carryRenameIdentity` runs `recordRenameAlias`, `moveSlugBindings` and `movePageIdReferences` in one transaction before the stale row is soft-deleted (#5431).+- Source retire hashes a checkout only when a binding lacks a verified digest; `canonical_stamp` is refreshed in place; the worktree-manifest refusal no longer talks about a transfer (#5200).+- `localToUtcIso` / `isValidTimeZone` in the conversation parser; `DateContext.invalid_timezone` (#5430).+- `slugStampedFrontmatter` in markdown serialization and export; `slugStampCandidate` safe repair; reconcile-audit verdict `slug_rule_mismatch` (#5966).+- Schema-pack loader reads a pack bundled into a compiled binary (`/$bunfs/...`) whole and bounds it on the bytes read, since the virtual filesystem has no descriptors (#6432). A managed import of a new file renders its page with the request slug, so the #5966 stamp never sees a slug-less page.+- `postgres-engine/schema-lock-timeout.ts`: session-level `lock_timeout` on the reserved DDL backend restored on release, `SET LOCAL` inside transaction-wrapped migrations, `pg_blocking_pids()` sampling on a one-backend diagnostic connection, `schema_lock_blocked` registry row; conditional `ENABLE ROW LEVEL SECURITY` in `schema.sql` and eight fragment schemas; `init-schema-retry` retries SQLSTATE 55P03; the v24 RLS E2E test calls `runMigrationSQL` directly and the remaining `init` spawns dump `pg_stat_activity` at half their budget (#5227).++Contributed by @andreineacsu (#5517 diagnosis of #5491).- ## [0.60.166.0] - 2026-10-11+ ## [0.60.167.0] - 2026-10-11**Wave 14 PR4: the Google connector, open loops, contacts, calendar, Windows and polish.** Gmail loops now find the person page wherever it lives in the brain, extraction runs under a daily spend cap and your own label exclusions, contacts land next to your people pages, and three Windows reports (parked tests, console windows, backups) get native coverage on CI.diff --cc VERSIONindex 3fb9c41e0a,3fb9c41e0a..d586f56b2f--- a/VERSION+++ b/VERSION@@@ -1,1 -1,1 +1,1 @@@--0.60.167.0++0.60.168.0diff --cc openclaw.plugin.jsonindex 14d819da36,14d819da36..9bdb41fe01--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@@ -1,7 -1,7 +1,7 @@@{"id": "gbrain-context-engine","name": "gbrain",-- "version": "0.60.167.0",++ "version": "0.60.168.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --cc package.jsonindex da7b88625b,da7b88625b..71432ec2b3--- a/package.json+++ b/package.json@@@ -232,7 -232,7 +232,7 @@@"bun": ">=1.4.0"},"license": "MIT",-- "version": "0.60.167.0",++ "version": "0.60.168.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 3a01d547d0,3a01d547d0..3e4f86108c--- 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.167.0",++ "version": "0.60.168.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 8038e89d3a,8038e89d3a..e814a53aa3--- 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.167.0",++ "version": "0.60.168.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 85df832419,85df832419..571bc20fa9--- 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.167.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.168.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 67e357439d,67e357439d..b309714850--- 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.167.0",++ "version": "0.60.168.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 547f6a8a01,547f6a8a01..65b5052cd0--- 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.167.0",++ "version": "0.60.168.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 ac8a5ec64f,ac8a5ec64f..94ea38b34a--- 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.167.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.168.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 73ea726746,73ea726746..3c70e1939f--- a/plugin/README.md+++ b/plugin/README.md@@@ -1,4 -1,4 +1,4 @@@--<!-- gbrain-plugin-tree-stamp: 0.60.167.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.168.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 src/core/behavior-change-notice.tsindex 5ad1f61e75,165ac22c35..364bd67776--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@@ -373,18 -373,10 +373,22 @@@ export const BEHAVIOR_CHANGES: Readonly{ since: '0.60.147.0', text: 'In a brain folder with the Git durability hook, a write that arrives while the effect worker commits a backlog of Git effects now publishes after the group in flight, inside its 5 s wait, instead of returning pending after the whole backlog; Git effects still commit in order. A write waiting on a busy worktree is reported as `writer_busy` without a stale preparing phase.' },// `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.{ since: '0.60.151.0', text: '`delta` and `context_pack` called without `include_private`, and the per-turn context block that harness hooks inject, now apply to their facts the same page-visibility rule they already apply to their pages. With `include_private` from the local CLI, `delta` and `context_pack` output is unchanged.' },+ { since: '0.60.167.0', text: 'Open-loop extraction from Gmail threads (`loops_extract` jobs) now runs under a $2.00 per UTC day cap, brain-wide: every job a sweep or the managed catch-up queues shares the day\'s spend group, an attempt the cap cannot admit is refused before the provider call and the thread is queued again on a later day, and a sweep that finds the day at its cap queues nothing (`daily_spend_cap`). `gbrain config set loops.extraction_max_usd_per_day <usd>` changes the cap (0 queues no paid extraction).' },+ { since: '0.60.167.0', text: 'A Gmail thread\'s open loop now attaches to the counterparty\'s page even when that page lives in another source (`default:people/<slug>` on a federated brain), by identity only: the exact email as that page\'s alias or an `entity_identities` canonical member; a display name alone never crosses a source and a tie leaves the loop with no counterparty page. The loop row records the page\'s source (`counterparty_source_id`), the `owes_to` / `awaiting_reply_from` edge points there, and the entity card, `gbrain waiting` and `open_loops` read the loop from that page rather than from a namesake in another source. Rows written before this change keep reading as their own source.' },+ { since: '0.60.167.0', text: '`gbrain lint` no longer reports `missing-created` on a page that carries any parseable date under `created`, `event_date`, `date`, `published`, `captured_at` or `ingested_at`, and `--fix` (the cycle\'s lint phase included) no longer copies `captured_at` / `ingested_at` into `created`: ingest time is not creation time, and the copy rewrote every page gbrain itself exported. Pages that got a `created:` that way keep it; nothing is removed.' },+ { since: '0.60.167.0', text: 'Gmail labels named in a source\'s `g_loops_exclude_labels` (or the brain-wide `loops.extraction_exclude_labels`) keep their threads out of paid loop extraction and the deterministic detector. A name that does not resolve against the account\'s labels fails closed: no NEW paid extraction for that source until it resolves (`excluded_label_unresolved` in the sweep counters, retried every sweep); existing loops, closes and the email pages themselves are unaffected.' },+ { since: '0.60.166.0', text: 'Open-loop extraction from Gmail threads (`loops_extract` jobs) now runs under a $2.00 per UTC day cap, brain-wide: every job a sweep or the managed catch-up queues shares the day\'s spend group, an attempt the cap cannot admit is refused before the provider call and the thread is queued again on a later day, and a sweep that finds the day at its cap queues nothing (`daily_spend_cap`). `gbrain config set loops.extraction_max_usd_per_day <usd>` changes the cap (0 queues no paid extraction).' },+ { since: '0.60.166.0', text: 'A Gmail thread\'s open loop now attaches to the counterparty\'s page even when that page lives in another source (`default:people/<slug>` on a federated brain), by identity only: the exact email as that page\'s alias or an `entity_identities` canonical member; a display name alone never crosses a source and a tie leaves the loop with no counterparty page. The loop row records the page\'s source (`counterparty_source_id`), the `owes_to` / `awaiting_reply_from` edge points there, and the entity card, `gbrain waiting` and `open_loops` read the loop from that page rather than from a namesake in another source. Rows written before this change keep reading as their own source.' },+ { since: '0.60.166.0', text: '`gbrain lint` no longer reports `missing-created` on a page that carries any parseable date under `created`, `event_date`, `date`, `published`, `captured_at` or `ingested_at`, and `--fix` (the cycle\'s lint phase included) no longer copies `captured_at` / `ingested_at` into `created`: ingest time is not creation time, and the copy rewrote every page gbrain itself exported. Pages that got a `created:` that way keep it; nothing is removed.' },+ { since: '0.60.166.0', text: 'Gmail labels named in a source\'s `g_loops_exclude_labels` (or the brain-wide `loops.extraction_exclude_labels`) keep their threads out of paid loop extraction and the deterministic detector. A name that does not resolve against the account\'s labels fails closed: no NEW paid extraction for that source until it resolves (`excluded_label_unresolved` in the sweep counters, retried every sweep); existing loops, closes and the email pages themselves are unaffected.' },- { since: '0.60.167.0', text: 'A managed checkout deleted and recreated at its recorded path (restore from backup, rebuilt container, Migration Assistant copy) has two deliberate exits instead of `recovery_required` from every verb: `gbrain sources writer transfer prepare/accept <source> --self-transfer --confirm-relocated-root` waives only the directory identity comparison when the stamp and the reservation beside the root agree on everything else, and `gbrain sources set-path <source> <path>` converges a checkout moved behind a symlink at its recorded path, keeping the worktree. `gbrain sources writer deactivate --dry-run` now lists a `physical_root` blocker exactly when its real run would refuse, and the classic (pre-activation) release no longer refuses on a recreated directory whose reservation and stamp still agree.' },- { since: '0.60.167.0', text: 'Schema-pack YAML now decodes quoted scalars: a double-quoted value carries the JSON escape subset and a single-quoted value is literal text with `\'\'` for one quote, so a link-type regex written as `"\\\\b"` loads as `\\b` and a `gbrain schema` mutation writes it back unchanged (before, every mutation doubled the backslashes of every quoted scalar). A hand-written double-quoted value that meant two backslashes now means one. A mutation whose emitted YAML does not read back as the manifest refuses with `schema_pack_emit_mismatch` and leaves the file unchanged; a pack file above 8 MiB refuses to load with `schema_pack_too_large` instead of being read, and `gbrain doctor` warns on a mutable pack above 1 MiB with the hand-repair runbook.' },- { since: '0.60.167.0', text: 'A Git rename onto a slug a soft-deleted page still holds now moves the page onto that slug with its id, history, edges, facts and aliases in one transaction; the tombstone keeps its own history under `<slug>~purged-<id>`, a name no file can take, so nothing is hard-deleted. A rename whose destination a live page holds still imports the renamed content there, but the old row\'s edges, timeline, versions, facts, withdrawals and aliases now move to that page (with `[[old-slug]]` recorded as an alias) before the old row is soft-deleted, instead of being stranded on the tombstone. Any other database error on the rename fails the file and leaves the sync checkpoint where it was, where it used to be swallowed. The renamed page\'s `source_path` is repaired inside the rename transaction, so a later `gbrain sync --full` cannot read the live page as a removed file.' },- { since: '0.60.167.0', text: '`gbrain sources archive`, `remove` and `purge` no longer walk and hash a canonical checkout that already has a verified manifest: they compare no bytes, so a symlink or submodule that appeared in the checkout after it was claimed no longer refuses them with `writer_manifest_unsafe` while their dry run said they would succeed. The stored manifest keeps its digest and gets a fresh `canonical_stamp`; a source claimed before activation, whose manifest was never recorded, still records it on retire. Claim, set-path (rebind), restore and reclone still hash the checkout, and every lifecycle dry run now reports `manifest_required`.' },- { since: '0.60.167.0', text: 'A root-level `AGENTS.md` or `CLAUDE.md` in a source (the agent instructions `gbrain harden` writes) is no longer imported as a page: sync and `gbrain import` classify it as a metafile like `README.md`, while the same file inside a directory is still a page. A root `agents` or `claude` page an earlier version indexed is kept, not deleted; `gbrain delete agents` removes it if it is unwanted.' },- { since: '0.60.167.0', text: 'The conversation parser now reads chat timestamps in the page\'s declared `timezone:` (an IANA zone such as Asia/Tokyo) and stores them in UTC, so a 09:00 Tokyo message is 00:00Z and the facts extracted from it carry the right `valid_from`; before, the zone only silenced the UTC warning and every timestamp was stored as if it were UTC. Conversation pages with a declared zone give different timestamps than before on re-extraction. A zone the runtime does not know keeps UTC and the warning names it. In a daylight-saving fold the first occurrence is taken; a time inside a spring-forward gap resolves with the offset in force before the change.' },- { since: '0.60.167.0', text: 'A page whose slug its file path cannot derive (a doubled hyphen, which the path rule collapses to one) is now written with a `slug:` frontmatter stamp by every render (write-through, repairs, export), so sync, reconcile and repair find the page again; the stamp does not change the page\'s content digest. A file an earlier version rendered without the stamp still refuses `source_changed` on reconcile until it is repaired: `gbrain repair frontmatter --source <id>` proposes the stamp as a safe repair, and the reconcile audit\'s classify mode reports such pages as `slug_rule_mismatch`.' },- { since: '0.60.167.0', text: 'On Postgres, `gbrain init` and `gbrain upgrade` no longer hang silently when another session holds a table lock (an open transaction in another client): the schema replay and each migration wait at most `GBRAIN_SCHEMA_LOCK_TIMEOUT_SECONDS` (default 60) and then stop with `schema_lock_blocked`, which names the blocking sessions by pid, application and state (never their query text) and the `pg_terminate_backend` exit; init retries a few times with a short backoff. The row-level-security block now skips tables where it is already on, so a re-run takes no exclusive lock on them.' },++ { since: '0.60.168.0', text: 'A managed checkout deleted and recreated at its recorded path (restore from backup, rebuilt container, Migration Assistant copy) has two deliberate exits instead of `recovery_required` from every verb: `gbrain sources writer transfer prepare/accept <source> --self-transfer --confirm-relocated-root` waives only the directory identity comparison when the stamp and the reservation beside the root agree on everything else, and `gbrain sources set-path <source> <path>` converges a checkout moved behind a symlink at its recorded path, keeping the worktree. `gbrain sources writer deactivate --dry-run` now lists a `physical_root` blocker exactly when its real run would refuse, and the classic (pre-activation) release no longer refuses on a recreated directory whose reservation and stamp still agree.' },++ { since: '0.60.168.0', text: 'Schema-pack YAML now decodes quoted scalars: a double-quoted value carries the JSON escape subset and a single-quoted value is literal text with `\'\'` for one quote, so a link-type regex written as `"\\\\b"` loads as `\\b` and a `gbrain schema` mutation writes it back unchanged (before, every mutation doubled the backslashes of every quoted scalar). A hand-written double-quoted value that meant two backslashes now means one. A mutation whose emitted YAML does not read back as the manifest refuses with `schema_pack_emit_mismatch` and leaves the file unchanged; a pack file above 8 MiB refuses to load with `schema_pack_too_large` instead of being read, and `gbrain doctor` warns on a mutable pack above 1 MiB with the hand-repair runbook.' },++ { since: '0.60.168.0', text: 'A Git rename onto a slug a soft-deleted page still holds now moves the page onto that slug with its id, history, edges, facts and aliases in one transaction; the tombstone keeps its own history under `<slug>~purged-<id>`, a name no file can take, so nothing is hard-deleted. A rename whose destination a live page holds still imports the renamed content there, but the old row\'s edges, timeline, versions, facts, withdrawals and aliases now move to that page (with `[[old-slug]]` recorded as an alias) before the old row is soft-deleted, instead of being stranded on the tombstone. Any other database error on the rename fails the file and leaves the sync checkpoint where it was, where it used to be swallowed. The renamed page\'s `source_path` is repaired inside the rename transaction, so a later `gbrain sync --full` cannot read the live page as a removed file.' },++ { since: '0.60.168.0', text: '`gbrain sources archive`, `remove` and `purge` no longer walk and hash a canonical checkout that already has a verified manifest: they compare no bytes, so a symlink or submodule that appeared in the checkout after it was claimed no longer refuses them with `writer_manifest_unsafe` while their dry run said they would succeed. The stored manifest keeps its digest and gets a fresh `canonical_stamp`; a source claimed before activation, whose manifest was never recorded, still records it on retire. Claim, set-path (rebind), restore and reclone still hash the checkout, and every lifecycle dry run now reports `manifest_required`.' },++ { since: '0.60.168.0', text: 'A root-level `AGENTS.md` or `CLAUDE.md` in a source (the agent instructions `gbrain harden` writes) is no longer imported as a page: sync and `gbrain import` classify it as a metafile like `README.md`, while the same file inside a directory is still a page. A root `agents` or `claude` page an earlier version indexed is kept, not deleted; `gbrain delete agents` removes it if it is unwanted.' },++ { since: '0.60.168.0', text: 'The conversation parser now reads chat timestamps in the page\'s declared `timezone:` (an IANA zone such as Asia/Tokyo) and stores them in UTC, so a 09:00 Tokyo message is 00:00Z and the facts extracted from it carry the right `valid_from`; before, the zone only silenced the UTC warning and every timestamp was stored as if it were UTC. Conversation pages with a declared zone give different timestamps than before on re-extraction. A zone the runtime does not know keeps UTC and the warning names it. In a daylight-saving fold the first occurrence is taken; a time inside a spring-forward gap resolves with the offset in force before the change.' },++ { since: '0.60.168.0', text: 'A page whose slug its file path cannot derive (a doubled hyphen, which the path rule collapses to one) is now written with a `slug:` frontmatter stamp by every render (write-through, repairs, export), so sync, reconcile and repair find the page again; the stamp does not change the page\'s content digest. A file an earlier version rendered without the stamp still refuses `source_changed` on reconcile until it is repaired: `gbrain repair frontmatter --source <id>` proposes the stamp as a safe repair, and the reconcile audit\'s classify mode reports such pages as `slug_rule_mismatch`.' },++ { since: '0.60.168.0', text: 'On Postgres, `gbrain init` and `gbrain upgrade` no longer hang silently when another session holds a table lock (an open transaction in another client): the schema replay and each migration wait at most `GBRAIN_SCHEMA_LOCK_TIMEOUT_SECONDS` (default 60) and then stop with `schema_lock_blocked`, which names the blocking sessions by pid, application and state (never their query text) and the `pg_terminate_backend` exit; init retries a few times with a short backoff. The row-level-security block now skips tables where it is already on, so a re-run takes no exclusive lock on them.' },// Fix wave 14 PR2 (GBRA-79). `since` is a placeholder equal to the branch's VERSION; the integrator sets it to the merge-slot stamp.{ since: '0.60.163.0', text: 'On a managed brain, whether the persistence owner commits and pushes page writes is now a recorded setting: `gbrain sources writer git-durability <source> --enable|--disable` (with `--pat-file <path>` for the push credential) records it on the host binding, and a binding with nothing recorded keeps consulting the post-commit hook as before. `gbrain sources push` on a managed worktree, `bootstrap verify`\'s push probe and the skill-pack writer guard now refuse by naming that verb and `writer status`. `writer activate` on an already-managed brain answers `already_enabled`; doctor adds `foreign_ownership_marker`; `gbrain repair managed-sync-orphans --source <id>` (explicit, preview-bound) retires sync bookkeeping nothing current can resume; a stale transcript part is deleted through the coordinator on re-ingest.' },{ since: '0.60.163.0', text: '`gbrain sources set-strategy <id> <strategy>` persists a code source\'s sync strategy and refuses `sync_run_unfinished` while a managed sync run of that source is unfinished. `gbrain bootstrap status` reports a project-scoped Codex MCP server in `<workspace>/.codex/config.toml` as `partial` (detected) instead of `pending`, and `gbrain bootstrap hooks --adopt --harness codex` records it as the wire evidence after a passing verify; nothing is written to the Codex config.' },diff --cc templates/bootstrap/template-repo/README.mdindex 325d9ac27a,325d9ac27a..79ee872b66--- 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.167.0 -->++<!-- gbrain-template-stamp: 0.60.168.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same