Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/master' into capy/6712-pr4b

garrytan8661e3d73f6f
diff --cc .claude-plugin/plugin.json
index 1b23c82c3c,1b23c82c3c..a085e9825a
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "gbrain",
-- "version": "0.60.316.0",
++ "version": "0.60.317.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.json
index 0824800f1c,0824800f1c..8a66e1251c
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "gbrain",
-- "version": "0.60.316.0",
++ "version": "0.60.317.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.md
index bec7db3ba2,bec7db3ba2..9030d5b761
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@@ -1,4 -1,4 +1,4 @@@
--<!-- gbrain-runbook-stamp: 0.60.316.0 -->
++<!-- gbrain-runbook-stamp: 0.60.317.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 --cc CHANGELOG.md
index cd45db8b9b,7a80ec5f6b..57766af607
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -10,30 -10,30 +10,54 @@@ credits are retained; no result has bee
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
- ## [0.60.316.0] - 2026-10-19
++## [0.60.317.0] - 2026-10-19
+
+**A managed `gbrain sync` of an ordinary (non-company) source now compares the files at HEAD with what the brain holds, instead of replaying commits, so a reset, a revert, a rewritten history or a lost run can no longer leave pages behind, and one bad file holds only itself.** Each pass reads the committed tree, the index and the database, admits only the files whose page differs, proves nothing moved underneath it, and records the checkpoint inside the last import's own transaction. An idle sync with nothing new returns in well under a second.
+
+### What changed
+
+| Situation | Before | Now |
+|---|---|---|
+| History rewritten, reset or reverted, or a sync interrupted | replayed `last_commit..HEAD`; pages could be missed or resurrected | every file at HEAD is compared with its page and import record; what differs is admitted |
+| An idle sync with nothing new | about 3 s on a large Postgres brain (57 ms round trips) | about 0.75 s: no level read at all |
+| One odd file (unreadable, a NUL byte, a broken alias list, a page whose identity changed, a write that fails) | stopped the whole source | that file alone is held with its own code and fix; the rest syncs |
+| The checkpoint after an import | its own write request and transactions | carried by the round's last import publication (fewer statements and transactions per run) |
+| First sync after activating a classic brain with 100k pages on Postgres | did not finish | converges in one pass (about 45 s) |
+| A sync that would delete more than half of a source's pages | ran | refused until confirmed, as `repair ghost-pages` already does |
+
+### New for operators
+
+- `gbrain repair file-drift --held --side <side> [--state <state>]` resolves held file-drift pages one decision at a time.
+- `gbrain repair legacy-twins --source <id>` merges page pairs an older gbrain forked from one file (preview first, then `--apply --expect <hash>`).
+- `sync.admission` (`normal`, `imports_only`, `classify_only`) narrows what a managed sync admits; doctor warns while it is restricted.
+- `gbrain sync status --json` reports `convergence` for a managed source.
+
+No schema migration. Company-brain sources keep their existing sync path.
+
+ ## [0.60.316.0] - 2026-10-19
+
+ **A commit is searchable within about a second whenever any gbrain process is running, and a sync request is never dropped.** Before this, only `gbrain serve` watched for commits: managed sources only, after a 3 s debounce, and a wake could be lost. Classic sources never synced on commit, a lone `gbrain jobs work` took 5 s, and the autopilot daemon waited for its next wall-clock tick (up to 7 minutes). `sync.on_commit` is still off by default.
+
+ ### What changed
+
+ | Situation (10k pages, n=10) | Before (p50 / p95) | Now (p50 / p95) |
+ |---|---|---|
+ | `gbrain serve`, managed source, commit to search | 3.7 / 4.1 s | 0.6–0.7 / 0.9–1.1 s |
+ | `gbrain serve`, classic source | never synced | 0.6–1.1 / 0.7–1.1 s |
+ | only `gbrain jobs work` running (Postgres) | 5.0–5.3 / 5.1–5.5 s | 0.6–0.7 / 0.8 s |
+ | only the autopilot daemon (classic, on_commit off) | 266 / 406 s | 84 / 138 s |
+
+ The other changes:
+ - **One commit notifier per host.** It runs in `gbrain serve` (stdio and http), `gbrain jobs work` and the autopilot daemon, with one owner per host and brain. It watches classic sources this host synced as well as managed ones, and starts a sync as soon as the checkout is quiet.
+ - **Retries instead of drops.** A failed or refused sync is retried at 5 s, 15 s, 1 min and 5 min, then reported as `notifier_stalled` with the fix and a trace file.
+ - **Requests are recorded first.** `gbrain sync trigger`, webhooks and busy delegated syncs record a wanted marker before they run. Whoever drains the source re-checks it afterwards, so a request is never lost to a sync already running. `sync trigger --json` reports queued, coalesced or nudged, and adds a `no_resident` notice with the fix when no resident runs. A managed push webhook answers 409 `refresh_required`.
+ - **HEAD-driven autopilot.** The daemon dispatches when a checkout's HEAD moves past the last synced commit, with the wall-clock rule kept as a backstop. Its `--status` grades from a new heartbeat sidecar (#7003).
+ - **Worker boot.** On Postgres, `gbrain jobs work` starts the persistence consumer at boot through the existing election (#7002). An idle worker wakes on a queued sync, using LISTEN on a direct session and a 1 s poll behind a pooler.
+ - **Visibility.** `gbrain sync status` and the new doctor check `commit_notifier` name the resident that syncs each source, or say none is running and give the fix. Once a resident has run, or `sync.on_commit` is on, search and query responses carry a per-source `freshness` entry (current, behind, syncing, unknown or not_monitored).
+ - **Upgrade.** Migration v262 adds `sync_wanted_markers`, `sync_notifier_sources` and `sync_notifier_leases`.
+
+ Docs: `docs/guides/on-commit-sync.md`. `GBRAIN_NOTIFIER=0` turns the notifier off for a process.
+
## [0.60.315.0] - 2026-10-19
**Large pages stored in segments get the last of their hardening: a repair for canonical files older versions left holding withdrawn rows, a bounded retry budget for writes the database interrupts under load, and purges that leave no segment text behind.** Brains that ran a gbrain older than v0.60.299.0 with `pages.segmented_storage` on can now find and rewrite canonical files that still hold a withdrawn or purged row with `gbrain repair segmented-mirror`, preview first. A write the database cancels at a statement timeout, or that the owner cancels past the publication ceiling, now retries with backoff against its own budget instead of failing at the second interruption or retrying without limit. Upgrading adds two columns to `persistence_requests` (migration v261, no rewrite of existing rows). Nothing runs on upgrade.
diff --cc VERSION
index 6de79419fd,6de79419fd..87da3afbc3
--- a/VERSION
+++ b/VERSION
@@@ -1,1 -1,1 +1,1 @@@
--0.60.316.0
++0.60.317.0
diff --cc openclaw.plugin.json
index 86c3470c69,86c3470c69..bdfd279d1d
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@@ -1,7 -1,7 +1,7 @@@
{
"id": "gbrain-context-engine",
"name": "gbrain",
-- "version": "0.60.316.0",
++ "version": "0.60.317.0",
"description": "Personal knowledge brain with Postgres + pgvector hybrid search",
"family": "bundle-plugin",
"kind": "context-engine",
diff --cc package.json
index 95b0be72de,95b0be72de..acc2a338dc
--- a/package.json
+++ b/package.json
@@@ -241,7 -241,7 +241,7 @@@
"bun": ">=1.4.0"
},
"license": "MIT",
-- "version": "0.60.316.0",
++ "version": "0.60.317.0",
"overrides": {
"@ai-sdk/provider-utils": "4.0.56",
"@hono/node-server": "^2.0.5",
diff --cc plugin-variants/gbrain-coding/.claude-plugin/plugin.json
index b732727ac2,b732727ac2..b045f1e618
--- 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.316.0",
++ "version": "0.60.317.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.json
index 6d0343f03c,6d0343f03c..4131adc370
--- 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.316.0",
++ "version": "0.60.317.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.md
index 1c8a245f37,1c8a245f37..c6c5ae914a
--- 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.316.0 -->
++<!-- gbrain-plugin-tree-stamp: 0.60.317.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.json
index 85e4c716de,85e4c716de..b176ea5377
--- 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.316.0",
++ "version": "0.60.317.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.json
index bec1fde79e,bec1fde79e..5d167aa489
--- 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.316.0",
++ "version": "0.60.317.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.md
index 5faddcdb5d,5faddcdb5d..738fbbe2a9
--- 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.316.0 -->
++<!-- gbrain-plugin-tree-stamp: 0.60.317.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.md
index b71403058e,b71403058e..2c24cbade9
--- a/plugin/README.md
+++ b/plugin/README.md
@@@ -1,4 -1,4 +1,4 @@@
--<!-- gbrain-plugin-tree-stamp: 0.60.316.0 -->
++<!-- gbrain-plugin-tree-stamp: 0.60.317.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 --cc src/commands/doctor/registry.ts
index 2a0f19be2a,ab16f50758..cc72c86ea7
--- a/src/commands/doctor/registry.ts
+++ b/src/commands/doctor/registry.ts
@@@ -126,9 -126,9 +126,10 @@@ import { missingRecordedFilesEntry } fr
import { overwrittenEditsEntry } from './checks/overwritten-edits.ts';
import { managedSyncMovementEntry } from './checks/managed-sync-movement.ts';
import { managedSyncLatencyEntry } from './checks/managed-sync-latency.ts';
+ import { commitNotifierEntry } from './checks/commit-notifier.ts';
import { managedSyncConvergenceEntry } from './checks/managed-sync-convergence.ts';
import { managedSyncBlockedEntry } from './checks/managed-sync-blocked.ts';
+import { syncAdmissionEntry } from './checks/sync-admission.ts';
import { atomHeldFailedEntry } from './checks/atom-holds.ts';
import { extractionInputTruncatedEntry } from './checks/extraction-input.ts';
import {
diff --cc src/core/behavior-change-notice.ts
index 1765656589,155b310a47..72d5be789e
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@@ -967,40 -967,13 +967,47 @@@ export const BEHAVIOR_CHANGES: Readonly
{ since: '0.60.315.0', text: '`delete_page purge: true` (`gbrain delete --purge`) of a page stored in segments now also deletes, in the purge, the segment texts the page stopped referencing within the last hour, which used to stay in `page_segment_texts` until the hourly segment sweep removed them. A withdrawal (`forget`, `forget_fact`) followed by another write to the page (a delete and `restore_page` included) left the text that held the withdrawn row, with the page text around it, in that state, and the purge reported success. The purge also deletes every unreferenced segment text of the source that holds one of the page\'s claims (its facts, withdrawn ones included, and its takes), plain or as a facts-fence cell stores it, which covers a text another page\'s write reused after the page\'s own write record of it expired. `removed.page_segment_texts` in the purge receipt counts these texts too, and the receipt\'s `page_segment_texts` store checks for them. A text that an unpublished write of another page staged is still kept, as before for the texts the page referenced.' },
{ since: '0.60.315.0', text: '`purge_fact` (`gbrain forget <id> --purge`) of a claim containing `|` now also deletes the unreferenced segment texts that hold the claim as its facts-fence cell stores it (`|` escaped as `\\|`, a line break as `<br>`), in the purge. It matched only the claim\'s exact bytes, so after a withdrawal and another write to a page stored in segments (a delete and `restore_page` included) the text holding the old fence row stayed until the hourly segment sweep, and the receipt\'s `page_segment_texts` store did not report it. The receipt now probes both forms.' },
{ since: '0.60.315.0', text: 'A managed write the database interrupts under load is now retried with backoff instead of failing at the second interruption. A statement the database ends with a statement timeout or cancel (SQLSTATE 57014) and, new, a publication the owner cancels past `persistence.publication_ceiling_ms` (until now released and published again without limit, or on Postgres sometimes failed `storage_error` at once) count against their own budget, `persistence.max_transient_retries` (default 5, 0 to 20), instead of `persistence.max_preparation_attempts`: each one schedules the request\'s next claim after 1 s, 2 s, 4 s, 8 s, then 15 s (stored on the request, so nothing is held while it waits; `gbrain sources writer status` names the waiting head `transient_backoff`), and the interruption after the last retry ends it `failed` with `write_interrupted` as before. Its receipt names the interruptions (`attempts`), the retry limit (`limit`, `limit_key`), the cause (`statement_cancel` or `publication_ceiling`) and the SQLSTATE. An interruption of a grouped publication (a `put_pages` batch, a managed import batch or a sync lane group) counts against every member of the group, and a member already charged an interruption is claimed and published on its own from then on, so a batch that overruns only as a whole still commits page by page. Preparations cut off at their deadline still count against `persistence.max_preparation_attempts` alone, and lock timeouts, serialization failures, deadlocks and lost connections are still never counted. `persistence.preparation_deadlines false` turns this counting and the backoff off with the deadlines. Upgrading adds two columns to `persistence_requests` (migration v261, no rewrite of existing rows).' },
+ // GBRA-133 PR 2a (commit triggers that never drop a commit). `since` is restamped at the merge slot.
+ { since: '0.60.316.0', text: 'With `sync.on_commit` on, the commit watcher now runs in every resident (gbrain serve, serve --http, gbrain jobs work and the autopilot daemon; one owns it per host), watches classic sources last synced on this host as well as managed ones, starts a sync as soon as a quiet HEAD moves (the fixed 3 s debounce is now a 400 ms trailing window, `GBRAIN_NOTIFIER_QUIET_MS`), and keeps a source due across failed or refused starts with retries at 5 s, 15 s, 1 min and 5 min (`notifier_stalled` after that). `GBRAIN_NOTIFIER=0` turns it off per process; `sync.on_commit.sources` excludes sources.' },
+ { since: '0.60.316.0', text: 'A sync request is now recorded before it runs and is never dropped: `gbrain sync trigger` answers queued, coalesced or nudged (with `--json`; still `job_id=N` on stdout when a job is queued, exit 0) and adds the notice `no_resident` with the fix when nothing watches the source, a second GitHub push while the first job waits joins it instead of being ignored for 30 s, and requests are drained by residents even with `sync.on_commit` off. A push for a managed source answers 409 `refresh_required` with the `gbrain sources refresh` fix instead of queueing a sync that cannot import it.' },
+ { since: '0.60.316.0', text: 'Search and query responses carry a `freshness` entry per source (current, behind, syncing, unknown or not_monitored, the observed HEAD and time, the detection mode and the held-file count), read from the notifier\'s record without a git call, once `sync.on_commit` is on or a resident has observed a source (otherwise search output is unchanged).' },
+ { since: '0.60.316.0', text: 'The autopilot daemon dispatches a freshness sync when a checkout\'s HEAD differs from the commit its source last synced, at the next tick instead of after the 5-minute wall-clock interval (which stays as the backstop), once per HEAD and never in the middle of a rebase or merge; classic and managed sources alike. With `sync.on_commit` on, the daemon also reads every checkout\'s HEAD between ticks (every 3 s, git only; `GBRAIN_AUTOPILOT_HEAD_PROBE_MS`) and queues the sync within seconds.' },
+ { since: '0.60.316.0', text: 'On Postgres, `gbrain jobs work` starts a persistence consumer at boot (#7002), so queued persistence effects drain after a `serve` stops even while the worker is idle. It joins the existing election: with `persistence.single_consumer` on it waits beside a live owner and takes over when that owner stops; with the switch off (the default) a worker beside a `serve` runs its own full consumer, as every resident process already does, and doctor `two_consumers_on_host` lists it. A queued sync job now wakes an idle worker at once: LISTEN on a direct session (one extra connection), a 1 s sync-queue read behind a transaction pooler; `GBRAIN_WORKER_SYNC_WAKE=0` turns it off.' },
+ { since: '0.60.316.0', text: '`gbrain autopilot --status` grades a running daemon from its own schedule (#7003): the daemon writes `autopilot.heartbeat.json` beside its lock with its next tick, so a healthy daemon on a long adaptive sleep no longer reads `stale` (exit 1); a missing or outdated sidecar falls back to the interval-flag rule. `--status --json` adds `stale_after_source` (`daemon` or `flag`) and `next_tick_at`.' },
+ // #6712 PR 4b (the level-triggered sync pass, design v3.2 §13) and #6885. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
- { since: '0.60.316.0', text: 'On a managed brain a plain `gbrain sync` of a non-company source no longer imports only `last_commit..HEAD`: each pass compares every file at HEAD with what the database absorbed (the page and its import record) and admits what differs, so out-of-band changes (a reset or revert, a rewritten history, a lost manifest, an interrupted run) converge on the next plain sync with no flag. When nothing moved since the last converged pass (same HEAD, parser, schema pack and selection, nothing open), the tick is idle and only `last_sync_at` changes; a full comparison still runs at least every 200 passes or 24 hours. A pass uses at most 4 rounds. Company-brain sources keep their cursor.' },
- { since: '0.60.316.0', text: 'In committed mode (the default) a managed sync never imports a dirty working copy, as before: the level-triggered pass keeps the cursor path\'s guarantee and never adopts or writes over such a file either. When the committed file is unchanged since its import, the uncommitted edit is left alone and nothing is held; when the commit moved under an uncommitted edit, the file is held `worktree_dirty` and the page and the edit stay as they are. Commit or restore the file and sync again.' },
- { since: '0.60.316.0', text: 'A page deleted in the database is no longer brought back by a managed sync from a file that is still committed, even after `gbrain delete --purge` or a mirrored purge replay: a purge now leaves a deletion marker (the file versions the brain held) while the file is still in `last_commit` or on disk, and an unchanged file then counts as synced. A file that changed after its page was deleted is held `file_drift` with side `deleted` and state `tombstone_edited` (soft-deleted) or `purged_differs` (purged, naming its slug), and the rest of the source syncs; `gbrain repair file-drift --held --side deleted --state <state>` resolves it. A full pass retires the marker once the file has left both the commit and the disk, so a new file at that path imports as a new page. A page purged before this release has no such marker, and `--full` can still import its file.' },
- { since: '0.60.316.0', text: '`storage.keep_db` is now applied by the managed sync pass itself on the brain host, and the separate keep_db worker that resident owners ran every 10 minutes is retired. A page under a keep_db prefix whose file is clean in the commit gets the database-wins write when its database copy moved (whether or not the file changed too); the write is bound to the committed bytes and the page revision the pass read, so a later edit refuses it. A file with uncommitted changes never gets a database-wins write: it is held like any dirty file. A pass admits at most 200 of these writes; the rest wait as `keep_db_pending`, and the next sync runs a full pass that admits them. While `sync.admission` is not `normal` they wait as `paused_keep_db`. Remote callers never write them.' },
- { since: '0.60.316.0', text: 'A managed sync that would delete more than half of a source\'s file-backed pages (on a source with more than 20) no longer applies those deletes: it writes one withheld record (count, ratio, a hash of the set and up to 20 sample paths), imports everything else, holds no page and still advances `last_commit`. `gbrain sync status` reads `blocked` / `deletes_withheld` with the dry run (`gbrain sync --source <id> --dry-run --json`) as its next step, and `convergence.deletes_withheld` carries the record. If the checkout is wrong or incomplete, restore it and sync; if the deletion is intended, run `GBRAIN_ALLOW_MASS_RECONCILE=1 gbrain sync --source <id>` on the brain host, which applies the deletes and clears the record. Remote callers never apply them.' },
- { since: '0.60.316.0', text: '`gbrain sync status --json` on a managed source now reports the live pass as `convergence` (`dry_run: false`) on a plain status too, read from the pass row: its kind, outcome, stop reason, round, candidates, settled and remaining counts, held Decisions by side, `db_ahead`, `legacy_unverified`, keep_db writes, a withheld mass delete, the open episode, `not_converged_streak` and `classes`, where each class names who acts (`none`, `owner` or `repair`; `gbrain sync status --help` lists them). New field `admission` (`sync.admission`\'s value, `set_at`, `effective`) and new reasons `pass_unfinished`, `not_converged`, `settle_mismatch`, `deletes_withheld`, `selection_scoped` and `admission_paused`; a source is never `synced` while its newest pass is open or ended unconverged. A non-company source has no cursor, so `run_id`, `cursor`, `rate_pages_per_min` and `eta_seconds` read null there. Held `file_drift` files in `gbrain sources status --json` and in sync results carry `side` (`both`, `unknown`, `deleted`) and, for a deleted side, `state`.' },
- { since: '0.60.316.0', text: 'A file that a managed sync settles at the same level in 3 passes in a row but that never reads settled afterwards is now held `settle_mismatch` (it needs a person) instead of being re-imported on every pass, and the rest of the source syncs; within one pass such a file is re-admitted at most once. `gbrain sync status` reports `settle_mismatch` from the second pass. Run `gbrain doctor --json` and `gbrain sources writer status --source <id> --json` (read-only), fix or report what they name, then `gbrain sources retry-held <id>` and sync.' },
- { since: '0.60.316.0', text: 'A managed sync run at a selection other than the source\'s configured one (`--exclude`, `--include-hidden`, `--src-subpath`, a different `--strategy`, or `--working-tree` against `sync.include_working_tree`) now ends `synced` with reason `selection_scoped` when that selection converges, and does not advance `last_commit`, `last_sync_at`, the slug-root pin or `chunker_version`. `gbrain sync status` reads `synced` / `selection_scoped`, and its next step is the plain `gbrain sync`, which syncs the configured selection and advances the commit.' },
- { since: '0.60.316.0', text: '`gbrain repair file-drift` takes `--held [--side both|unknown|deleted [--state tombstone_edited|purged_differs|file_gone]]` to preview and resolve a source\'s held `file_drift` files as one Decision, narrowed by `--only` and `--skip`. In each deleted state the two `--prefer` values do opposite things: `tombstone_edited` keeps the deletion and removes the file (`database`) or restores the page and imports the file (`file`); `purged_differs` removes the file or imports it as a new page; `file_gone` recreates the file or soft-deletes the page. A selection that mixes sides or states refuses `file_drift_mixed_selection` with the narrower commands, and `--side deleted` without `--state` refuses `file_drift_state_required`; nothing is previewed. Holds written before this release carry no side and are listed for a `--slug` preview.' },
- { since: '0.60.316.0', text: '`gbrain sources refresh` no longer refuses `sync_in_progress` because a non-company source\'s managed sync is unfinished: that sync keeps no cursor and reconciles whatever HEAD its next pass reads, so moving the checkout strands nothing, and the refresh\'s own sync of the members converges at the new HEAD. A company brain\'s unfinished cursor, or an older binary\'s cursor the first pass has not retired yet, still refuses with its resume command.' },
- { since: '0.60.316.0', text: 'A `gbrain sync` that follows another drainer now counts the lease holder\'s sync-pass writes as progress, not only its commits and cursor saves, so a pass that spends minutes reading and classifying a large source is not mistaken for a wedged holder. A follower on an older gbrain counts only commits and cursor saves: beside a holder on this release that commits nothing for 5 minutes (a long classify round) it stops `blocked` (exit 1) with `drain_stalled`, cause `no_progress`, so upgrade every host that syncs a source together. Until the next schema migration, the only release to downgrade to is the one immediately before this one; its checkpoint cleanup does not keep the sync-pass rows, so after coming back the first sync runs a full pass with the embedding cost unknown until approved again.' },
- { since: '0.60.316.0', text: 'Doctor reads a non-company managed source\'s sync from its pass row instead of a cursor. When its passes keep stopping (`blocked`, a `not_converged` streak or a `settle_mismatch` streak), `managed_sync_not_moving` warns that managed sync does not converge, `git_held_files` warns even with no file held (the source is listed under `details.passes`) and `managed_sync_blocked` warns, then fails after 60 minutes; each names `gbrain sync status --source <id> --json` as the read-only next step. `terminal_failures` lists what blocks an open pass\'s checkpoint. A source whose newest pass ended `synced` or `up_to_date` at HEAD reads healthy.' },
- { since: '0.60.316.0', text: 'A managed `gbrain sync` of a non-company source now reads the checkout only through allow-listed Git plumbing (`ls-tree`, `ls-files -s`, `diff-tree --no-renames`, `cat-file --batch`, `hash-object --no-filters`) and the files\' own bytes, so the repository\'s clean, process or textconv programs never run during that sync. Before, discovery ran a porcelain `git diff`, which runs them on modified files. Company-brain sources and `--dry-run` keep the earlier discovery.' },
- { since: '0.60.316.0', text: 'A managed sync now reserves each admitted import group\'s estimated embedding cost inside that group\'s admission (one record per group), so a killed sync keeps what it reserved and a replay of the group adds nothing. When a pass\'s reservations, or an open `--full` re-import\'s, reach the approved amount (`sync.cost_gate_min_usd`, $0.50 by default, or what `gbrain sync --yes` approved), the rest of that pass imports without embeddings; the next pass does not inherit that. If the pass record is lost while reservations exist, the cost is unknown and embeddings wait until the owner approves again with `gbrain sync --source <id> --no-pull --yes`.' },
- { since: '0.60.316.0', text: '`gbrain sources set-strategy <id> <strategy>` now also refuses with `sync_run_unfinished` (exit 1, nothing written) while a sync holds the source\'s drain lease or while a re-import the source\'s sync opened (a `--full`, say) is still open. Before, it refused only over an unfinished cursor, which a non-company source no longer has. Wait for the running sync, or finish the re-import with `gbrain sync --source <id> --no-pull`; `gbrain sync status --source <id> --json` shows where it stands. Setting the strategy a source already has is not refused.' },
- { since: '0.60.316.0', text: 'Doctor `managed_sync_not_moving` now also warns when a managed source\'s newest sync pass found nothing to do (`up_to_date`) but took longer than its target: 0.5 s for an idle tick (1 s on a source over 100,000 pages), 2 s for a full round (15 s over 100,000 pages). The warning names the pass\'s `timings_ms` (an idle tick now records `setup` and `kind`), its fix is the read-only `gbrain sync status --source <id> --json --detail`, and it never fails.' },
- { since: '0.60.316.0', text: 'New doctor check `sync_admission_restricted` warns on a managed brain while `sync.admission` is not `normal`, with the value, how long ago it was set and the restore command `gbrain config set sync.admission normal`, which is the user\'s to run (never applied automatically). It reads ok on `normal` and on a brain without managed persistence.' },
- { since: '0.60.316.0', text: 'New brain-wide setting `sync.admission`: `normal` (the default), `imports_only` or `classify_only`, set on the brain host with `gbrain config set sync.admission <value>` (any other value is refused, exit 2, and nothing is written). Under `imports_only` managed sync admits no deletes and no `storage.keep_db` writes; those paths wait (`paused_deletes`, `paused_keep_db`) while imports and the checkpoint go on. Under `classify_only` it reads and classifies, writes no page and stops `resumable` / `admission_paused` (exit 0), with a `next` that asks the user to restore it. The value is read when a pass starts and in every admission, and a delete or keep_db write checks it again just before it publishes (it completes `cancelled` with `admission_paused`, nothing written). `gbrain sync status --json` reports `admission: {value, set_at, effective}`.' },
- { since: '0.60.316.0', text: 'A managed sync now records an import for each page an older gbrain imported whose file still equals the page (such pages have no import record and are counted as `legacy_unverified`). It checks every such page in the source\'s first full round, then up to 500 per pass; a later edit of that file then imports normally instead of being held for a decision. The check is read-only until it writes the record, and a page that differs from its file is left as it is. `convergence.legacy_unverified` counts the pages not yet checked.' },
- { since: '0.60.316.0', text: 'After a parser or schema-pack change, a managed sync re-imports the pages whose file and page are unchanged but whose import record names the older parser (class `reparse`, which sync finishes by itself, with no hold), as the pre-pass prescreen did; the first pass after the change reads the whole source.' },
- { since: '0.60.316.0', text: 'An interrupted `gbrain sync --full` no longer ends with the run that started it: the next plain `gbrain sync` continues the re-import under the selection the `--full` started with, and there is no command to abandon it. A `--full` with a narrower selection (a CLI `--exclude`, say) finishes its own re-import and ends `synced` with status reason `selection_scoped`, without moving `last_commit`; the next plain sync then syncs the configured selection. A plain sync closes any open re-import, and stamps `chunker_version` only when the re-import covered the whole configured selection. To pause paid work, rely on the cost gate; to pause everything, set `sync.admission classify_only`.' },
- { since: '0.60.316.0', text: 'A managed sync pass that runs 4 rounds without the source settling (another writer keeps changing it) stops `not_converged`: outcome `resumable`, exit 0, everything it admitted stands, and `next` reruns the same sync. After 3 such passes in a row, `next` switches to a report: `gbrain sync status --source <id> --json` with `safe_to_loop: false` and `fix.next: report`, and a sync job ends needing an operator, so an agent loop stops instead of retrying. The count resets when a pass converges.' },
- { since: '0.60.316.0', text: 'New explicit repair `gbrain repair legacy-twins --source <id>` (#6885) merges the page pairs syncs before #6857 forked: a legacy page with no recorded file whose slug spells the file\'s name differently from today\'s slug rules, and the twin at today\'s slug that records the file. The read-only preview lists each pair (both pages\' ids, slugs and revisions, the file, whether the contents match) and lists as decisions, never merged, pairs whose contents differ, several legacy pages for one twin, twins whose file is missing or drifted, and twins holding a link, relationship date, timeline entry or raw data row the legacy page holds differently (`twin_evidence_conflicts`). `--apply --expect <hash> --yes` merges exactly the approved pairs: the legacy page takes over the file and keeps its id, links and history, the twin\'s links and their dated transitions, timeline, raw data, user-added tags, aliases and the facts other pages state about it move over through the same twin merge as `gbrain repair origin-twins` (#6948), its slug becomes an alias, and the twin is soft-deleted (its file untouched) and purged after 72 hours. It refuses off the owner host (`not_owner_host`), when the checkout cannot be read (`legacy_twins_storage_unknown`), and when the pairs are more than half of a source\'s file-backed pages (`legacy_twin_mass_merge_refused`, unless `GBRAIN_ALLOW_MASS_RECONCILE=1`). Nothing changes on upgrade; it runs only when named.' },
- { since: '0.60.316.0', text: 'A managed sync of a non-company source that cannot decide which page a file is no longer stops the whole source with `page_identity_changed`: the file alone is held `page_identity_changed` (it needs a person; `meta.reason` names why) and the rest of the source syncs. `several_tombstones`: several deleted pages record the file as their origin; `spelling`: files differing only by letter case or separator (both are held); `identity_differs`: a file whose frontmatter id differs from the page at its slug, which keeps its id, body and slug while its old file\'s deletion waits. A dry run (and a company source) still refuses the source as before, so `gbrain sync --dry-run` reports a refusal where the sync itself holds one file; a remote sync leaves such files for the owner\'s sync to hold.' },
- { since: '0.60.316.0', text: 'A managed sync no longer stops a whole source at a Markdown file whose text holds NUL bytes (U+0000: a UTF-16 "Unicode" save, a binary file named .md, a crash-padded file). Before, every run failed at that file with `storage_error` (SQLSTATE 22P05) and nothing after it synced; now the file alone is held `content_null_bytes`, its message names the file and the first NUL\'s line (and says to save it as UTF-8 when it starts with a UTF-16 byte order mark), and the rest of the source syncs. With `sync.holds=fail` the run stops with `content_null_bytes` instead. Classic (unmanaged) sync is unchanged.' },
- { since: '0.60.316.0', text: 'A managed sync no longer stops a whole source at a committed file whose Git object the checkout lost (an interrupted gc, a partial clone): it imports the working-tree bytes when they hash to the committed blob id, and otherwise holds that file `git_object_missing` (run `git fsck`, restore the object with `git fetch` or from a backup; every sync re-tests it). An imported file that became a directory (`notes/a.md` turned into `notes/a.md/x.md`) no longer stops the source with `page_identity_changed`: its page is deleted and the new file imports.' },
- { since: '0.60.316.0', text: 'When managed sync hits an unexpected error while preparing one file (before anything is admitted), it now holds that file `page_write_failed` with `meta.write_failure.origin` `freeze` and the error in the hold message, and the rest of the source syncs; before, the source stopped on that file on every run. The next syncs re-test the file on their own until it has been held 3 times, so a passing fault clears without help. A deliberate refusal still stops the run, and so does a run in which most files fail that way (5 or more, and at least as many as prepared cleanly), which looks systemic. In a bulk group (Postgres) the failure is reported on the file that failed, not on the group\'s first file.' },
- { since: '0.60.316.0', text: '`gbrain sync status --json` no longer tells an agent to rerun a managed sync forever when every run stops on the same file with the same unclassified `storage_error`: the first such stop is still `connection` with `next` = rerun, but once two runs in a row stop on the same path with the same code and message, `last_error` is `needs_human` (class `page`, `safe_actions` `none`, new field `repeats`), the state is `blocked` / `needs_human`, and `human_reason` names the file. A message that changes between runs stays a rerun.' },
- { since: '0.60.316.0', text: 'A file whose exact bytes an earlier gbrain imported and validated, and which this release refuses (a parser regression), no longer stops the sync by default: it is held `parser_regression` alone (a gbrain bug to report; it needs a person) and the rest of the source syncs. `GBRAIN_SYNC_PARSER_REGRESSION=stop` for the process that syncs restores the old stop (`sync_parser_regression`, the checkpoint does not advance). A refusal this release makes on purpose, such as the YAML alias bound (`frontmatter_alias_limit`), is held as before under either setting.' },
- { since: '0.60.316.0', text: 'Doctor `managed_sync_blocked` (and get_brain_health `sync_blocked`) now count a managed sync pass that stopped with a recorded failure before finishing, in discovery (path `<discovery>`) or on one file, until a later sync of the source succeeds; before, such a source indexed nothing while the check said no run was blocked.' },
- { since: '0.60.316.0', text: 'A managed sync no longer stops a whole source when a file it would skip as already imported (a no-op waiver) has meanwhile become a symlink, a FIFO or an unreadable file in the working tree: that entry is simply not skipped and goes on like any other, where an unreadable file is held `file_unreadable`.' },
- { since: '0.60.316.0', text: 'A managed sync holds a committed file whose name is not valid UTF-8 (a Latin-1 name from an older system or an archive) under the new hold code `path_not_utf8`, naming the rename that fixes it, and the rest of the source syncs; before, the file was held with a raw Git error or stopped the source. Renaming the file to a UTF-8 name clears the hold. With `sync.holds=fail` the run stops with `path_not_utf8`.' },
- { since: '0.60.316.0', text: 'A managed sync of a folder of more than 20 pages moved with `git mv` keeps each page (a move, with its id, links and history): the mass-delete valve no longer counts a delete whose bytes arrive at a new path in the same round. Before, the valve withheld the old paths\' deletes in the first round, so every new path imported as a new page beside its old one (one `shares content_hash ... Indexing both` warning per file) and the old pages were deleted afterwards. A mass delete with nothing arriving is still withheld.' },
++ { since: '0.60.317.0', text: 'On a managed brain a plain `gbrain sync` of a non-company source no longer imports only `last_commit..HEAD`: each pass compares every file at HEAD with what the database absorbed (the page and its import record) and admits what differs, so out-of-band changes (a reset or revert, a rewritten history, a lost manifest, an interrupted run) converge on the next plain sync with no flag. When nothing moved since the last converged pass (same HEAD, parser, schema pack and selection, nothing open), the tick is idle and only `last_sync_at` changes; a full comparison still runs at least every 200 passes or 24 hours. A pass uses at most 4 rounds. Company-brain sources keep their cursor.' },
++ { since: '0.60.317.0', text: 'In committed mode (the default) a managed sync never imports a dirty working copy, as before: the level-triggered pass keeps the cursor path\'s guarantee and never adopts or writes over such a file either. When the committed file is unchanged since its import, the uncommitted edit is left alone and nothing is held; when the commit moved under an uncommitted edit, the file is held `worktree_dirty` and the page and the edit stay as they are. Commit or restore the file and sync again.' },
++ { since: '0.60.317.0', text: 'A page deleted in the database is no longer brought back by a managed sync from a file that is still committed, even after `gbrain delete --purge` or a mirrored purge replay: a purge now leaves a deletion marker (the file versions the brain held) while the file is still in `last_commit` or on disk, and an unchanged file then counts as synced. A file that changed after its page was deleted is held `file_drift` with side `deleted` and state `tombstone_edited` (soft-deleted) or `purged_differs` (purged, naming its slug), and the rest of the source syncs; `gbrain repair file-drift --held --side deleted --state <state>` resolves it. A full pass retires the marker once the file has left both the commit and the disk, so a new file at that path imports as a new page. A page purged before this release has no such marker, and `--full` can still import its file.' },
++ { since: '0.60.317.0', text: '`storage.keep_db` is now applied by the managed sync pass itself on the brain host, and the separate keep_db worker that resident owners ran every 10 minutes is retired. A page under a keep_db prefix whose file is clean in the commit gets the database-wins write when its database copy moved (whether or not the file changed too); the write is bound to the committed bytes and the page revision the pass read, so a later edit refuses it. A file with uncommitted changes never gets a database-wins write: it is held like any dirty file. A pass admits at most 200 of these writes; the rest wait as `keep_db_pending`, and the next sync runs a full pass that admits them. While `sync.admission` is not `normal` they wait as `paused_keep_db`. Remote callers never write them.' },
++ { since: '0.60.317.0', text: 'A managed sync that would delete more than half of a source\'s file-backed pages (on a source with more than 20) no longer applies those deletes: it writes one withheld record (count, ratio, a hash of the set and up to 20 sample paths), imports everything else, holds no page and still advances `last_commit`. `gbrain sync status` reads `blocked` / `deletes_withheld` with the dry run (`gbrain sync --source <id> --dry-run --json`) as its next step, and `convergence.deletes_withheld` carries the record. If the checkout is wrong or incomplete, restore it and sync; if the deletion is intended, run `GBRAIN_ALLOW_MASS_RECONCILE=1 gbrain sync --source <id>` on the brain host, which applies the deletes and clears the record. Remote callers never apply them.' },
++ { since: '0.60.317.0', text: '`gbrain sync status --json` on a managed source now reports the live pass as `convergence` (`dry_run: false`) on a plain status too, read from the pass row: its kind, outcome, stop reason, round, candidates, settled and remaining counts, held Decisions by side, `db_ahead`, `legacy_unverified`, keep_db writes, a withheld mass delete, the open episode, `not_converged_streak` and `classes`, where each class names who acts (`none`, `owner` or `repair`; `gbrain sync status --help` lists them). New field `admission` (`sync.admission`\'s value, `set_at`, `effective`) and new reasons `pass_unfinished`, `not_converged`, `settle_mismatch`, `deletes_withheld`, `selection_scoped` and `admission_paused`; a source is never `synced` while its newest pass is open or ended unconverged. A non-company source has no cursor, so `run_id`, `cursor`, `rate_pages_per_min` and `eta_seconds` read null there. Held `file_drift` files in `gbrain sources status --json` and in sync results carry `side` (`both`, `unknown`, `deleted`) and, for a deleted side, `state`.' },
++ { since: '0.60.317.0', text: 'A file that a managed sync settles at the same level in 3 passes in a row but that never reads settled afterwards is now held `settle_mismatch` (it needs a person) instead of being re-imported on every pass, and the rest of the source syncs; within one pass such a file is re-admitted at most once. `gbrain sync status` reports `settle_mismatch` from the second pass. Run `gbrain doctor --json` and `gbrain sources writer status --source <id> --json` (read-only), fix or report what they name, then `gbrain sources retry-held <id>` and sync.' },
++ { since: '0.60.317.0', text: 'A managed sync run at a selection other than the source\'s configured one (`--exclude`, `--include-hidden`, `--src-subpath`, a different `--strategy`, or `--working-tree` against `sync.include_working_tree`) now ends `synced` with reason `selection_scoped` when that selection converges, and does not advance `last_commit`, `last_sync_at`, the slug-root pin or `chunker_version`. `gbrain sync status` reads `synced` / `selection_scoped`, and its next step is the plain `gbrain sync`, which syncs the configured selection and advances the commit.' },
++ { since: '0.60.317.0', text: '`gbrain repair file-drift` takes `--held [--side both|unknown|deleted [--state tombstone_edited|purged_differs|file_gone]]` to preview and resolve a source\'s held `file_drift` files as one Decision, narrowed by `--only` and `--skip`. In each deleted state the two `--prefer` values do opposite things: `tombstone_edited` keeps the deletion and removes the file (`database`) or restores the page and imports the file (`file`); `purged_differs` removes the file or imports it as a new page; `file_gone` recreates the file or soft-deletes the page. A selection that mixes sides or states refuses `file_drift_mixed_selection` with the narrower commands, and `--side deleted` without `--state` refuses `file_drift_state_required`; nothing is previewed. Holds written before this release carry no side and are listed for a `--slug` preview.' },
++ { since: '0.60.317.0', text: '`gbrain sources refresh` no longer refuses `sync_in_progress` because a non-company source\'s managed sync is unfinished: that sync keeps no cursor and reconciles whatever HEAD its next pass reads, so moving the checkout strands nothing, and the refresh\'s own sync of the members converges at the new HEAD. A company brain\'s unfinished cursor, or an older binary\'s cursor the first pass has not retired yet, still refuses with its resume command.' },
++ { since: '0.60.317.0', text: 'A `gbrain sync` that follows another drainer now counts the lease holder\'s sync-pass writes as progress, not only its commits and cursor saves, so a pass that spends minutes reading and classifying a large source is not mistaken for a wedged holder. A follower on an older gbrain counts only commits and cursor saves: beside a holder on this release that commits nothing for 5 minutes (a long classify round) it stops `blocked` (exit 1) with `drain_stalled`, cause `no_progress`, so upgrade every host that syncs a source together. Until the next schema migration, the only release to downgrade to is the one immediately before this one; its checkpoint cleanup does not keep the sync-pass rows, so after coming back the first sync runs a full pass with the embedding cost unknown until approved again.' },
++ { since: '0.60.317.0', text: 'Doctor reads a non-company managed source\'s sync from its pass row instead of a cursor. When its passes keep stopping (`blocked`, a `not_converged` streak or a `settle_mismatch` streak), `managed_sync_not_moving` warns that managed sync does not converge, `git_held_files` warns even with no file held (the source is listed under `details.passes`) and `managed_sync_blocked` warns, then fails after 60 minutes; each names `gbrain sync status --source <id> --json` as the read-only next step. `terminal_failures` lists what blocks an open pass\'s checkpoint. A source whose newest pass ended `synced` or `up_to_date` at HEAD reads healthy.' },
++ { since: '0.60.317.0', text: 'A managed `gbrain sync` of a non-company source now reads the checkout only through allow-listed Git plumbing (`ls-tree`, `ls-files -s`, `diff-tree --no-renames`, `cat-file --batch`, `hash-object --no-filters`) and the files\' own bytes, so the repository\'s clean, process or textconv programs never run during that sync. Before, discovery ran a porcelain `git diff`, which runs them on modified files. Company-brain sources and `--dry-run` keep the earlier discovery.' },
++ { since: '0.60.317.0', text: 'A managed sync now reserves each admitted import group\'s estimated embedding cost inside that group\'s admission (one record per group), so a killed sync keeps what it reserved and a replay of the group adds nothing. When a pass\'s reservations, or an open `--full` re-import\'s, reach the approved amount (`sync.cost_gate_min_usd`, $0.50 by default, or what `gbrain sync --yes` approved), the rest of that pass imports without embeddings; the next pass does not inherit that. If the pass record is lost while reservations exist, the cost is unknown and embeddings wait until the owner approves again with `gbrain sync --source <id> --no-pull --yes`.' },
++ { since: '0.60.317.0', text: '`gbrain sources set-strategy <id> <strategy>` now also refuses with `sync_run_unfinished` (exit 1, nothing written) while a sync holds the source\'s drain lease or while a re-import the source\'s sync opened (a `--full`, say) is still open. Before, it refused only over an unfinished cursor, which a non-company source no longer has. Wait for the running sync, or finish the re-import with `gbrain sync --source <id> --no-pull`; `gbrain sync status --source <id> --json` shows where it stands. Setting the strategy a source already has is not refused.' },
++ { since: '0.60.317.0', text: 'Doctor `managed_sync_not_moving` now also warns when a managed source\'s newest sync pass found nothing to do (`up_to_date`) but took longer than its target: 0.5 s for an idle tick (1 s on a source over 100,000 pages), 2 s for a full round (15 s over 100,000 pages). The warning names the pass\'s `timings_ms` (an idle tick now records `setup` and `kind`), its fix is the read-only `gbrain sync status --source <id> --json --detail`, and it never fails.' },
++ { since: '0.60.317.0', text: 'New doctor check `sync_admission_restricted` warns on a managed brain while `sync.admission` is not `normal`, with the value, how long ago it was set and the restore command `gbrain config set sync.admission normal`, which is the user\'s to run (never applied automatically). It reads ok on `normal` and on a brain without managed persistence.' },
++ { since: '0.60.317.0', text: 'New brain-wide setting `sync.admission`: `normal` (the default), `imports_only` or `classify_only`, set on the brain host with `gbrain config set sync.admission <value>` (any other value is refused, exit 2, and nothing is written). Under `imports_only` managed sync admits no deletes and no `storage.keep_db` writes; those paths wait (`paused_deletes`, `paused_keep_db`) while imports and the checkpoint go on. Under `classify_only` it reads and classifies, writes no page and stops `resumable` / `admission_paused` (exit 0), with a `next` that asks the user to restore it. The value is read when a pass starts and in every admission, and a delete or keep_db write checks it again just before it publishes (it completes `cancelled` with `admission_paused`, nothing written). `gbrain sync status --json` reports `admission: {value, set_at, effective}`.' },
++ { since: '0.60.317.0', text: 'A managed sync now records an import for each page an older gbrain imported whose file still equals the page (such pages have no import record and are counted as `legacy_unverified`). It checks every such page in the source\'s first full round, then up to 500 per pass; a later edit of that file then imports normally instead of being held for a decision. The check is read-only until it writes the record, and a page that differs from its file is left as it is. `convergence.legacy_unverified` counts the pages not yet checked.' },
++ { since: '0.60.317.0', text: 'After a parser or schema-pack change, a managed sync re-imports the pages whose file and page are unchanged but whose import record names the older parser (class `reparse`, which sync finishes by itself, with no hold), as the pre-pass prescreen did; the first pass after the change reads the whole source.' },
++ { since: '0.60.317.0', text: 'An interrupted `gbrain sync --full` no longer ends with the run that started it: the next plain `gbrain sync` continues the re-import under the selection the `--full` started with, and there is no command to abandon it. A `--full` with a narrower selection (a CLI `--exclude`, say) finishes its own re-import and ends `synced` with status reason `selection_scoped`, without moving `last_commit`; the next plain sync then syncs the configured selection. A plain sync closes any open re-import, and stamps `chunker_version` only when the re-import covered the whole configured selection. To pause paid work, rely on the cost gate; to pause everything, set `sync.admission classify_only`.' },
++ { since: '0.60.317.0', text: 'A managed sync pass that runs 4 rounds without the source settling (another writer keeps changing it) stops `not_converged`: outcome `resumable`, exit 0, everything it admitted stands, and `next` reruns the same sync. After 3 such passes in a row, `next` switches to a report: `gbrain sync status --source <id> --json` with `safe_to_loop: false` and `fix.next: report`, and a sync job ends needing an operator, so an agent loop stops instead of retrying. The count resets when a pass converges.' },
++ { since: '0.60.317.0', text: 'New explicit repair `gbrain repair legacy-twins --source <id>` (#6885) merges the page pairs syncs before #6857 forked: a legacy page with no recorded file whose slug spells the file\'s name differently from today\'s slug rules, and the twin at today\'s slug that records the file. The read-only preview lists each pair (both pages\' ids, slugs and revisions, the file, whether the contents match) and lists as decisions, never merged, pairs whose contents differ, several legacy pages for one twin, twins whose file is missing or drifted, and twins holding a link, relationship date, timeline entry or raw data row the legacy page holds differently (`twin_evidence_conflicts`). `--apply --expect <hash> --yes` merges exactly the approved pairs: the legacy page takes over the file and keeps its id, links and history, the twin\'s links and their dated transitions, timeline, raw data, user-added tags, aliases and the facts other pages state about it move over through the same twin merge as `gbrain repair origin-twins` (#6948), its slug becomes an alias, and the twin is soft-deleted (its file untouched) and purged after 72 hours. It refuses off the owner host (`not_owner_host`), when the checkout cannot be read (`legacy_twins_storage_unknown`), and when the pairs are more than half of a source\'s file-backed pages (`legacy_twin_mass_merge_refused`, unless `GBRAIN_ALLOW_MASS_RECONCILE=1`). Nothing changes on upgrade; it runs only when named.' },
++ { since: '0.60.317.0', text: 'A managed sync of a non-company source that cannot decide which page a file is no longer stops the whole source with `page_identity_changed`: the file alone is held `page_identity_changed` (it needs a person; `meta.reason` names why) and the rest of the source syncs. `several_tombstones`: several deleted pages record the file as their origin; `spelling`: files differing only by letter case or separator (both are held); `identity_differs`: a file whose frontmatter id differs from the page at its slug, which keeps its id, body and slug while its old file\'s deletion waits. A dry run (and a company source) still refuses the source as before, so `gbrain sync --dry-run` reports a refusal where the sync itself holds one file; a remote sync leaves such files for the owner\'s sync to hold.' },
++ { since: '0.60.317.0', text: 'A managed sync no longer stops a whole source at a Markdown file whose text holds NUL bytes (U+0000: a UTF-16 "Unicode" save, a binary file named .md, a crash-padded file). Before, every run failed at that file with `storage_error` (SQLSTATE 22P05) and nothing after it synced; now the file alone is held `content_null_bytes`, its message names the file and the first NUL\'s line (and says to save it as UTF-8 when it starts with a UTF-16 byte order mark), and the rest of the source syncs. With `sync.holds=fail` the run stops with `content_null_bytes` instead. Classic (unmanaged) sync is unchanged.' },
++ { since: '0.60.317.0', text: 'A managed sync no longer stops a whole source at a committed file whose Git object the checkout lost (an interrupted gc, a partial clone): it imports the working-tree bytes when they hash to the committed blob id, and otherwise holds that file `git_object_missing` (run `git fsck`, restore the object with `git fetch` or from a backup; every sync re-tests it). An imported file that became a directory (`notes/a.md` turned into `notes/a.md/x.md`) no longer stops the source with `page_identity_changed`: its page is deleted and the new file imports.' },
++ { since: '0.60.317.0', text: 'When managed sync hits an unexpected error while preparing one file (before anything is admitted), it now holds that file `page_write_failed` with `meta.write_failure.origin` `freeze` and the error in the hold message, and the rest of the source syncs; before, the source stopped on that file on every run. The next syncs re-test the file on their own until it has been held 3 times, so a passing fault clears without help. A deliberate refusal still stops the run, and so does a run in which most files fail that way (5 or more, and at least as many as prepared cleanly), which looks systemic. In a bulk group (Postgres) the failure is reported on the file that failed, not on the group\'s first file.' },
++ { since: '0.60.317.0', text: '`gbrain sync status --json` no longer tells an agent to rerun a managed sync forever when every run stops on the same file with the same unclassified `storage_error`: the first such stop is still `connection` with `next` = rerun, but once two runs in a row stop on the same path with the same code and message, `last_error` is `needs_human` (class `page`, `safe_actions` `none`, new field `repeats`), the state is `blocked` / `needs_human`, and `human_reason` names the file. A message that changes between runs stays a rerun.' },
++ { since: '0.60.317.0', text: 'A file whose exact bytes an earlier gbrain imported and validated, and which this release refuses (a parser regression), no longer stops the sync by default: it is held `parser_regression` alone (a gbrain bug to report; it needs a person) and the rest of the source syncs. `GBRAIN_SYNC_PARSER_REGRESSION=stop` for the process that syncs restores the old stop (`sync_parser_regression`, the checkpoint does not advance). A refusal this release makes on purpose, such as the YAML alias bound (`frontmatter_alias_limit`), is held as before under either setting.' },
++ { since: '0.60.317.0', text: 'Doctor `managed_sync_blocked` (and get_brain_health `sync_blocked`) now count a managed sync pass that stopped with a recorded failure before finishing, in discovery (path `<discovery>`) or on one file, until a later sync of the source succeeds; before, such a source indexed nothing while the check said no run was blocked.' },
++ { since: '0.60.317.0', text: 'A managed sync no longer stops a whole source when a file it would skip as already imported (a no-op waiver) has meanwhile become a symlink, a FIFO or an unreadable file in the working tree: that entry is simply not skipped and goes on like any other, where an unreadable file is held `file_unreadable`.' },
++ { since: '0.60.317.0', text: 'A managed sync holds a committed file whose name is not valid UTF-8 (a Latin-1 name from an older system or an archive) under the new hold code `path_not_utf8`, naming the rename that fixes it, and the rest of the source syncs; before, the file was held with a raw Git error or stopped the source. Renaming the file to a UTF-8 name clears the hold. With `sync.holds=fail` the run stops with `path_not_utf8`.' },
++ { since: '0.60.317.0', text: 'A managed sync of a folder of more than 20 pages moved with `git mv` keeps each page (a move, with its id, links and history): the mass-delete valve no longer counts a delete whose bytes arrive at a new path in the same round. Before, the valve withheld the old paths\' deletes in the first round, so every new path imported as a new page beside its old one (one `shares content_hash ... Indexing both` warning per file) and the old pages were deleted afterwards. A mass delete with nothing arriving is still withheld.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
diff --cc templates/bootstrap/template-repo/README.md
index 3cbf168cf0,3cbf168cf0..288559540d
--- 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.316.0 -->
++<!-- gbrain-template-stamp: 0.60.317.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same
diff --cc test/fixtures/goldens/exports/types.json
index 865f429d81,8cbc775847..37a6ad5973
--- a/test/fixtures/goldens/exports/types.json
+++ b/test/fixtures/goldens/exports/types.json
@@@ -6421,7 -6422,7 +6422,7 @@@
{
"kind": "class",
"members": [
- "canonical?: \"unknown\" | \"keyword_candidates_incomplete\" | \"projection_pending\" | \"timeout\" | \"rate_limited\" | \"embedding_disabled\" | \"writer_lock_unavailable\" | \"writer_pool_capacity\" | \"owner_unavailable\" | \"recovery_required\" | \"queue_capacity\" | \"write_quota_exhausted\" | \"write_quota_insufficient\" | \"write_capacity_backpressure\" | \"revision_required\" | \"revision_conflict\" | \"idempotency_conflict\" | \"source_changed\" | \"write_pending\" | \"storage_error\" | \"cancelled\" | \"permission_denied\" | \"scope_denied\" | \"invalid_params\" | \"not_found\" | \"page_not_found\" | \"page_identity_changed\" | \"write_claim_lost\" | \"request_too_large\" | \"response_too_large\" | \"writer_registration_required\" | \"writer_identity_invalid\" | \"writer_not_initialized\" | \"writer_coordinator_required\" | \"fact_already_expired\" | \"source_writeback_required\" | \"unsupported_mutation_protocol\" | \"writer_upgrade_required\" | \"writer_not_quiesced\" | \"skill_bundle_required\" | \"take_row_collision\" | \"invalid_source_uri\" | \"writer_admin_locked\" | \"connector_account_changed\" | \"connector_intent_outdated\" | \"checkpoint_validation_timeout\" | \"invalid_connector_text\" | \"connector_holds_exhausted\" | \"connector_fence_below_timeline\" | \"core_budget_exceeded\" | \"core_mark_owner_only\" | \"core_remote_edit_refused\" | \"core_delete_owner_only\" | \"timeline_rows_would_be_removed\" | \"purged_content\" | \"preparation_stalled\" | \"fence_unrenderable\" | \"page_body_segmented\" | \"write_outcome_unknown\" | \"write_interrupted\" | \"embedding_failed\" | \"bucket_not_found\" | \"database_error\" | \"unknown_transport\" | \"extraction_failed\" | \"fact_not_found\" | \"provenance_required\" | \"unavailable\" | \"budget_unsatisfiable\" | \"embedding_budget_below_worst_case\" | \"absent_from_worktree\" | \"access_command_failed\" | \"access_denied_test_user\" | \"access_env_missing\" | \"acknowledgment_unavailable\" | \"admin_policy_enforced\" | \"admission_paused\" | \"ambient_capture_off\" | \"ambiguous_id\" | \"ambiguous_ref\" | \"ambiguous_skill\" | \"answer_not_yours\" | \"answer_pending\" | \"answer_unavailable\" | \"api_not_enabled\" | \"approval_required\" | \"atom_drain_incomplete\" | \"atom_drain_no_progress\" | \"atom_drain_provider_failure\" | \"autopilot_job_owned_by_other_brain\" | \"body_staging_expired\" | \"budget_below_recent_runtime\" | \"backup_dump_failed\" | \"backup_too_large\" | \"belief_coverage_required\" | \"belief_stale_preparation\" | \"benchmark_duplicate_task_id\" | \"benchmark_empty\" | \"benchmark_exists\" | \"benchmark_judge_llm_no_rubric\" | \"benchmark_judge_qrels_no_expected\" | \"benchmark_judge_rule_no_checks\" | \"benchmark_judge_unknown_kind\" | \"benchmark_malformed\" | \"benchmark_missing_judge\" | \"benchmark_missing_task\" | \"benchmark_missing_task_id\" | \"benchmark_not_found\" | \"benchmark_rule_check_bad_arg\" | \"benchmark_rule_check_malformed\" | \"benchmark_rule_check_unknown_op\" | \"bootstrap_cleanup_pending\" | \"bootstrap_empty\" | \"bootstrap_pending_review\" | \"bridge_ownership_conflict\" | \"coverage_from\" | \"coverage_gap\" | \"clock_mismatch\" | \"extract_write_lost\" | \"item_failures_systemic\" | \"known_as_of_unproven\" | \"cache_quota_exceeded\" | \"calendar_unreadable\" | \"capacity_paused\" | \"catalog_capacity_exceeded\" | \"catalog_unavailable\" | \"changed_since_preview\" | \"chronicle_skipped\" | \"no_pricing\" | \"checkpoint_missing\" | \"claim_already_used\" | \"client_json_unreadable\" | \"client_json_wrong_type\" | \"client_not_found\" | \"client_shape_invalid\" | \"code_callees_requires_symbol\" | \"code_callers_requires_symbol\" | \"code_def_requires_symbol\" | \"code_refs_requires_symbol\" | \"code_reused\" | \"colon_slug_windows_write_through\" | \"command_failed\" | \"commit_lock_busy\" | \"commit_paths_invalid\" | \"concurrent_write\" | \"config_error\" | \"confirmation_required\" | \"conflicting_source_scope\" | \"connection_lost\" | \"chunkless_pages_healable\" | \"consent_required\" | \"consent_timeout\" | \"consumers_without_heartbeat\" | \"content_repair_needs_human\" | \"content_null_bytes\" | \"content_rejected\" | \"continuation_unproven\" | \"corpus_chat_unavailable\" | \"corpus_window_backoff\" | \"corpus_window_dead_lettered\" | \"convergence_read_failed\" | \"cost_cap_exceeded\" | \"cost_preview_requires_yes\" | \"cursor_incarnation_retired\" | \"cycle_failed\" | \"d_sel_too_small\" | \"delta_cursor_upgrade_required\" | \"deleted_page_chunks_overdue\" | \"demo_graph_failed\" | \"demo_import_failed\" | \"demo_verification_failed\" | \"derived_cap_exhausted\" | \"destination_not_ready\" | \"drain_stalled\" | \"managed_sync_not_moving\" | \"dream_breaker_tripped\" | \"dirty_tree\" | \"doctor_tier_unavailable\" | \"effect_not_failed\" | \"embed_backfill_stalled\" | \"embedding_auth_failed\" | \"embedding_configuration\" | \"embedding_identity_unqualified\" | \"embedding_model_mismatch\" | \"embedding_plane_split\" | \"embedding_state_unknown\" | \"embedding_storage_unavailable\" | \"embedding_unavailable\" | \"embedding_unconfigured\" | \"embedding_width_mismatch\" | \"engine_graduated\" | \"entity_types_unavailable\" | \"eval_suite_unwired\" | \"export_limit\" | \"extractor_identity_mismatch\" | \"fact_withdrawn\" | \"fact_rows_collide\" | \"facts_absorb_write_refused\" | \"facts_backstop_skipped\" | \"facts_drain_deferred\" | \"facts_drain_job_failed\" | \"facts_payload_expired\" | \"feedback_disabled\" | \"feedback_not_authorized\" | \"fetch_failed\" | \"file_database_drift\" | \"fix_not_writable\" | \"file_drift\" | \"file_drift_mixed_selection\" | \"file_drift_state_required\" | \"file_removed_during_scan\" | \"file_unreadable\" | \"file_too_large\" | \"follow_approval_required\" | \"forget_requires_owner\" | \"frontmatter_slug_conflict\" | \"full_resync_required\" | \"gate_failed\" | \"ghost_mass_delete_refused\" | \"origin_twin_mass_merge_refused\" | \"ghost_storage_unknown\" | \"git_branch_unborn\" | \"git_durability_not_enabled\" | \"git_checkout_required\" | \"git_detached_head\" | \"git_index_locked\" | \"git_index_stale\" | \"git_target_pending\" | \"git_operation_in_progress\" | \"git_push_unavailable\" | \"git_target_unsafe\" | \"git_unavailable\" | \"git_object_missing\" | \"gitlink_not_followed\" | \"graduation_drain_timeout\" | \"graduation_embedding_dimension_mismatch\" | \"graduation_foreign_host_binding\" | \"graduation_in_progress\" | \"graduation_interrupted\" | \"graduation_rollback_writes_lost\" | \"graduation_source_writer_held\" | \"graduation_split_brain\" | \"graduation_target_auth_failed\" | \"graduation_target_ddl_unreachable\" | \"graduation_target_not_empty\" | \"graduation_target_unsupported\" | \"graduation_unclassified_table\" | \"graduation_unsupported_platform\" | \"graduation_verify_failed\" | \"grant_scope\" | \"graph_incomplete\" | \"host_identity_mismatch\" | \"harness_hook_duplicates\" | \"harness_hook_unowned\" | \"head_blocked\" | \"held_failed\" | \"held_out_overlaps_benchmark\" | \"held_out_required_for_bundled\" | \"independent_principal_required\" | \"insufficient_scope\" | \"integrate_conflict\" | \"internal\" | \"internal_error\" | \"interrupted\" | \"invalid_acknowledgment\" | \"invalid_client\" | \"invalid_fence\" | \"unclosed_ambiguous_tail\" | \"tail_exposure_approval\" | \"sync_in_progress\" | \"invalid_frontmatter\" | \"invalid_grant_clock_skew\" | \"invalid_grant_revoked\" | \"invalid_grant_testing_expiry\" | \"invalid_rating\" | \"invalid_receipt\" | \"invalid_receipt_transition\" | \"invalid_request\" | \"invalid_source\" | \"invalid_source_pin\" | \"invalid_token\" | \"invalid_write_wait\" | \"ipc_path_too_long\" | \"legacy_twin_mass_merge_refused\" | \"legacy_twins_storage_unknown\" | \"legacy_job_selection_invalid\" | \"legacy_jobs_active\" | \"legacy_lock_removal_refused\" | \"link_cursor_invalid\" | \"local_conflict\" | \"lock_busy\" | \"loops_extraction_skipped\" | \"maintenance_backpressure\" | \"maintenance_lock_busy\" | \"managed_failure_unsettled\" | \"managed_remedy_unavailable\" | \"merge_recommended\" | \"movement_unknown\" | \"managed_sync_flag_refused\" | \"managed_pull_skipped\" | \"manual_only_skipped\" | \"membership_inactive\" | \"membership_not_found\" | \"method_not_allowed\" | \"migration_lease_lost\" | \"migration_declined\" | \"migration_failed\" | \"migration_host_work_pending\" | \"migrations_pending\" | \"migrations_running\" | \"missing_source_scope\" | \"missing_source_value\" | \"models_strict_violation\" | \"no_context_ceiling\" | \"no_refresh_token\" | \"no_routing_eval\" | \"no_skill_md\" | \"no_worker\" | \"no_worker_surface\" | \"not_a_git_repo\" | \"not_converged\" | \"not_owner_host\" | \"not_connected\" | \"no_brain\" | \"overlapping_path\" | \"page_projection_conflict\" | \"page_body_rows_unreadable\" | \"page_projection_stale\" | \"page_shrink_refused\" | \"page_too_large_for_inline\" | \"parse_error\" | \"frontmatter_alias_limit\" | \"parser_regression\" | \"pasted_wrong_url\" | \"payload_too_large\" | \"path_not_utf8\" | \"pattern_claims_pending\" | \"patterns_min_interval\" | \"pending_verify\" | \"pending_writes\" | \"persistence_restart_required\" | \"pool_inflight_over_budget\" | \"deep_health_probe_failed\" | \"serve_self_exit_suppressed\" | \"serve_unhealthy_exit\" | \"persistence_write_stall\" | \"push_unconfirmed\" | \"schema_lock_blocked\" | \"pg_connection_recovery_failed\" | \"pg_connection_stuck\" | \"pg_pool_stalled\" | \"pg_statement_build_failed\" | \"pglite_busy\" | \"pglite_vector_index_too_large\" | \"plan_output_failed\" | \"plan_stale\" | \"port_in_use\" | \"preview_changed\" | \"profile_incompatible\" | \"projection_owner_resident\" | \"knock_on_exhausted\" | \"keyword_skipped_after_timeout\" | \"publication_pending\" | \"pull_blocked_local_changes\" | \"purge_blocked_pending_recovery\" | \"purge_lookup_timeout\" | \"purge_mirror_unwritable\" | \"question_not_found\" | \"question_owner_only\" | \"read_budget_exhausted\" | \"receipt_conflict\" | \"receipt_fence_changed\" | \"receipt_fence_required\" | \"receipt_identity_mismatch\" | \"pat_file_unreadable\" | \"reconcile_host_required\" | \"reconcile_read_incomplete\" | \"recovery_prior_stage_unavailable\" | \"recovery_version_unsupported\" | \"redirect_uri_mismatch\" | \"ref_not_in_answer\" | \"refresh_dirty\" | \"refresh_diverged\" | \"refresh_drain_timeout\" | \"refresh_no_upstream\" | \"refresh_not_managed\" | \"refresh_not_owner\" | \"refresh_source_changed\" | \"relay_disabled\" | \"relay_session_expired\" | \"relay_unreachable\" | \"rename_held\" | \"rename_identity_unreadable\" | \"rename_reconcile_failed\" | \"request_already_submitted\" | \"requirements_changed\" | \"requires_local_engine\" | \"reset_upstream_refused\" | \"resume_spec_mismatch\" | \"result_too_large\" | \"revision_changed\" | \"revision_unavailable\" | \"schema_owner_required\" | \"scope_missing\" | \"search_cursor_requires_keyword\" | \"search_mode_local_only\" | \"scorecard_group_by_local_only\" | \"search_offset_over_cap\" | \"segmented_mirror_writer_gate\" | \"serve_build_drift\" | \"serve_port_in_use\" | \"serve_status_only\" | \"settle_mismatch\" | \"setup_harness_unsupported\" | \"setup_hosted_connection\" | \"setup_owner_conflict\" | \"shared_skills_unavailable\" | \"shared_skills_unsupported\" | \"skill_asset_not_found\" | \"skill_candidate_invalid\" | \"skill_not_found\" | \"skill_retention_capacity\" | \"skill_unavailable\" | \"slug_page_mismatch\" | \"slug_root_mode_mismatch\" | \"source_binding_required\" | \"source_id_taken\" | \"source_mismatch\" | \"source_not_ready\" | \"source_profile_no_backfill\" | \"source_referenced\" | \"source_root_conflict\" | \"split_bad_ratio\" | \"split_unparseable\" | \"stale_unavailable\" | \"state_mismatch\" | \"sync_not_applicable\" | \"sync_admission_restricted\" | \"sync_drain_lease_held\" | \"content_receipt_stale\" | \"sync_first_run_in_progress\" | \"sync_no_successful_sync\" | \"sync_cursor_replaced\" | \"sync_parser_regression\" | \"target_escape\" | \"timeline_comment_markup\" | \"topology_change_required\" | \"transcript_secret_exposure\" | \"triage_unreliable_backoff\" | \"trust_raise_refused\" | \"two_consumers_on_host\" | \"trusted_local_only\" | \"unexpected_file_bytes\" | \"unexpected_staging_bytes\" | \"unknown_command\" | \"unknown_flag\" | \"unknown_method\" | \"unknown_source\" | \"unknown_tool\" | \"unpriced_model\" | \"unmanaged_database_path\" | \"unmanaged_path\" | \"unsupported_export_data\" | \"unsupported_path\" | \"upstream\" | \"upstream_diverged\" | \"upstream_rewritten\" | \"upstream_unknown\" | \"verification_failed\" | \"withdrawal_capacity\" | \"withdrawal_mirror_failed\" | \"withdrawal_mirror_pending\" | \"withdrawal_provenance\" | \"write_capacity_low\" | \"write_gate_rejected\" | \"write_held\" | \"worktree_dirty\" | \"writer_admin_intent_required\" | \"writer_admin_state_changed\" | \"writer_busy\" | \"writer_identity_publish_failed\" | \"writer_manifest_mismatch\" | \"writer_manifest_rescope_required\" | \"writer_manifest_unsafe\" | \"writer_regrant_required\" | \"writer_transfer_conflict\" | \"writer_transfer_required\" | \"wrong_account_consented\" | \"schema_pack_too_large\" | \"schema_pack_emit_mismatch\" | undefined",
- "canonical?: \"unknown\" | \"keyword_candidates_incomplete\" | \"projection_pending\" | \"timeout\" | \"rate_limited\" | \"embedding_disabled\" | \"writer_lock_unavailable\" | \"writer_pool_capacity\" | \"owner_unavailable\" | \"recovery_required\" | \"queue_capacity\" | \"write_quota_exhausted\" | \"write_quota_insufficient\" | \"write_capacity_backpressure\" | \"revision_required\" | \"revision_conflict\" | \"idempotency_conflict\" | \"source_changed\" | \"write_pending\" | \"storage_error\" | \"cancelled\" | \"permission_denied\" | \"scope_denied\" | \"invalid_params\" | \"not_found\" | \"page_not_found\" | \"page_identity_changed\" | \"write_claim_lost\" | \"request_too_large\" | \"response_too_large\" | \"writer_registration_required\" | \"writer_identity_invalid\" | \"writer_not_initialized\" | \"writer_coordinator_required\" | \"fact_already_expired\" | \"source_writeback_required\" | \"unsupported_mutation_protocol\" | \"writer_upgrade_required\" | \"writer_not_quiesced\" | \"skill_bundle_required\" | \"take_row_collision\" | \"invalid_source_uri\" | \"writer_admin_locked\" | \"connector_account_changed\" | \"connector_intent_outdated\" | \"checkpoint_validation_timeout\" | \"invalid_connector_text\" | \"connector_holds_exhausted\" | \"connector_fence_below_timeline\" | \"core_budget_exceeded\" | \"core_mark_owner_only\" | \"core_remote_edit_refused\" | \"core_delete_owner_only\" | \"timeline_rows_would_be_removed\" | \"purged_content\" | \"preparation_stalled\" | \"fence_unrenderable\" | \"page_body_segmented\" | \"write_outcome_unknown\" | \"write_interrupted\" | \"embedding_failed\" | \"bucket_not_found\" | \"database_error\" | \"unknown_transport\" | \"extraction_failed\" | \"fact_not_found\" | \"provenance_required\" | \"unavailable\" | \"budget_unsatisfiable\" | \"embedding_budget_below_worst_case\" | \"absent_from_worktree\" | \"access_command_failed\" | \"access_denied_test_user\" | \"access_env_missing\" | \"acknowledgment_unavailable\" | \"admin_policy_enforced\" | \"ambient_capture_off\" | \"ambiguous_id\" | \"ambiguous_ref\" | \"ambiguous_skill\" | \"answer_not_yours\" | \"answer_pending\" | \"answer_unavailable\" | \"api_not_enabled\" | \"approval_required\" | \"atom_drain_incomplete\" | \"atom_drain_no_progress\" | \"atom_drain_provider_failure\" | \"autopilot_job_owned_by_other_brain\" | \"body_staging_expired\" | \"budget_below_recent_runtime\" | \"backup_dump_failed\" | \"backup_too_large\" | \"belief_coverage_required\" | \"belief_stale_preparation\" | \"benchmark_duplicate_task_id\" | \"benchmark_empty\" | \"benchmark_exists\" | \"benchmark_judge_llm_no_rubric\" | \"benchmark_judge_qrels_no_expected\" | \"benchmark_judge_rule_no_checks\" | \"benchmark_judge_unknown_kind\" | \"benchmark_malformed\" | \"benchmark_missing_judge\" | \"benchmark_missing_task\" | \"benchmark_missing_task_id\" | \"benchmark_not_found\" | \"benchmark_rule_check_bad_arg\" | \"benchmark_rule_check_malformed\" | \"benchmark_rule_check_unknown_op\" | \"bootstrap_cleanup_pending\" | \"bootstrap_empty\" | \"bootstrap_pending_review\" | \"bridge_ownership_conflict\" | \"coverage_from\" | \"coverage_gap\" | \"clock_mismatch\" | \"extract_write_lost\" | \"item_failures_systemic\" | \"known_as_of_unproven\" | \"cache_quota_exceeded\" | \"calendar_unreadable\" | \"capacity_paused\" | \"catalog_capacity_exceeded\" | \"catalog_unavailable\" | \"changed_since_preview\" | \"chronicle_skipped\" | \"no_pricing\" | \"checkpoint_missing\" | \"claim_already_used\" | \"client_json_unreadable\" | \"client_json_wrong_type\" | \"client_not_found\" | \"client_shape_invalid\" | \"code_callees_requires_symbol\" | \"code_callers_requires_symbol\" | \"code_def_requires_symbol\" | \"code_refs_requires_symbol\" | \"code_reused\" | \"colon_slug_windows_write_through\" | \"command_failed\" | \"commit_lock_busy\" | \"commit_paths_invalid\" | \"concurrent_write\" | \"config_error\" | \"confirmation_required\" | \"conflicting_source_scope\" | \"connection_lost\" | \"chunkless_pages_healable\" | \"consent_required\" | \"consent_timeout\" | \"consumers_without_heartbeat\" | \"content_repair_needs_human\" | \"content_rejected\" | \"continuation_unproven\" | \"corpus_chat_unavailable\" | \"corpus_window_backoff\" | \"corpus_window_dead_lettered\" | \"convergence_read_failed\" | \"cost_cap_exceeded\" | \"cost_preview_requires_yes\" | \"cursor_incarnation_retired\" | \"cycle_failed\" | \"d_sel_too_small\" | \"delta_cursor_upgrade_required\" | \"deleted_page_chunks_overdue\" | \"demo_graph_failed\" | \"demo_import_failed\" | \"demo_verification_failed\" | \"derived_cap_exhausted\" | \"destination_not_ready\" | \"drain_stalled\" | \"managed_sync_not_moving\" | \"dream_breaker_tripped\" | \"dirty_tree\" | \"doctor_tier_unavailable\" | \"effect_not_failed\" | \"embed_backfill_stalled\" | \"embedding_auth_failed\" | \"embedding_configuration\" | \"embedding_identity_unqualified\" | \"embedding_model_mismatch\" | \"embedding_plane_split\" | \"embedding_state_unknown\" | \"embedding_storage_unavailable\" | \"embedding_unavailable\" | \"embedding_unconfigured\" | \"embedding_width_mismatch\" | \"engine_graduated\" | \"entity_types_unavailable\" | \"eval_suite_unwired\" | \"export_limit\" | \"extractor_identity_mismatch\" | \"fact_withdrawn\" | \"fact_rows_collide\" | \"facts_absorb_write_refused\" | \"facts_backstop_skipped\" | \"facts_drain_deferred\" | \"facts_drain_job_failed\" | \"facts_payload_expired\" | \"feedback_disabled\" | \"feedback_not_authorized\" | \"fetch_failed\" | \"file_database_drift\" | \"fix_not_writable\" | \"file_drift\" | \"file_removed_during_scan\" | \"file_unreadable\" | \"file_too_large\" | \"follow_approval_required\" | \"forget_requires_owner\" | \"frontmatter_slug_conflict\" | \"full_resync_required\" | \"gate_failed\" | \"ghost_mass_delete_refused\" | \"notifier_stalled\" | \"origin_twin_mass_merge_refused\" | \"ghost_storage_unknown\" | \"git_branch_unborn\" | \"git_durability_not_enabled\" | \"git_checkout_required\" | \"git_detached_head\" | \"git_index_locked\" | \"git_index_stale\" | \"git_target_pending\" | \"git_operation_in_progress\" | \"git_push_unavailable\" | \"git_target_unsafe\" | \"git_unavailable\" | \"gitlink_not_followed\" | \"graduation_drain_timeout\" | \"graduation_embedding_dimension_mismatch\" | \"graduation_foreign_host_binding\" | \"graduation_in_progress\" | \"graduation_interrupted\" | \"graduation_rollback_writes_lost\" | \"graduation_source_writer_held\" | \"graduation_split_brain\" | \"graduation_target_auth_failed\" | \"graduation_target_ddl_unreachable\" | \"graduation_target_not_empty\" | \"graduation_target_unsupported\" | \"graduation_unclassified_table\" | \"graduation_unsupported_platform\" | \"graduation_verify_failed\" | \"graph_incomplete\" | \"host_identity_mismatch\" | \"harness_hook_duplicates\" | \"harness_hook_unowned\" | \"head_blocked\" | \"held_failed\" | \"held_out_overlaps_benchmark\" | \"held_out_required_for_bundled\" | \"independent_principal_required\" | \"insufficient_scope\" | \"integrate_conflict\" | \"internal\" | \"internal_error\" | \"interrupted\" | \"invalid_acknowledgment\" | \"invalid_client\" | \"invalid_fence\" | \"unclosed_ambiguous_tail\" | \"tail_exposure_approval\" | \"sync_in_progress\" | \"invalid_frontmatter\" | \"invalid_grant_clock_skew\" | \"invalid_grant_revoked\" | \"invalid_grant_testing_expiry\" | \"invalid_rating\" | \"invalid_receipt\" | \"invalid_receipt_transition\" | \"invalid_request\" | \"invalid_source\" | \"invalid_source_pin\" | \"invalid_token\" | \"invalid_write_wait\" | \"ipc_path_too_long\" | \"legacy_job_selection_invalid\" | \"legacy_jobs_active\" | \"legacy_lock_removal_refused\" | \"link_cursor_invalid\" | \"local_conflict\" | \"lock_busy\" | \"loops_extraction_skipped\" | \"maintenance_backpressure\" | \"maintenance_lock_busy\" | \"managed_failure_unsettled\" | \"managed_remedy_unavailable\" | \"merge_recommended\" | \"movement_unknown\" | \"managed_sync_flag_refused\" | \"managed_pull_skipped\" | \"manual_only_skipped\" | \"membership_inactive\" | \"membership_not_found\" | \"method_not_allowed\" | \"migration_lease_lost\" | \"migration_declined\" | \"migration_failed\" | \"migration_host_work_pending\" | \"migrations_pending\" | \"migrations_running\" | \"missing_source_scope\" | \"missing_source_value\" | \"models_strict_violation\" | \"no_context_ceiling\" | \"no_refresh_token\" | \"no_routing_eval\" | \"no_skill_md\" | \"no_worker\" | \"no_worker_surface\" | \"not_a_git_repo\" | \"not_owner_host\" | \"not_connected\" | \"no_brain\" | \"overlapping_path\" | \"page_projection_conflict\" | \"page_body_rows_unreadable\" | \"page_projection_stale\" | \"page_shrink_refused\" | \"page_too_large_for_inline\" | \"parse_error\" | \"frontmatter_alias_limit\" | \"parser_regression\" | \"pasted_wrong_url\" | \"payload_too_large\" | \"pattern_claims_pending\" | \"patterns_min_interval\" | \"pending_verify\" | \"pending_writes\" | \"persistence_restart_required\" | \"pool_inflight_over_budget\" | \"deep_health_probe_failed\" | \"refresh_required\" | \"serve_self_exit_suppressed\" | \"serve_unhealthy_exit\" | \"persistence_write_stall\" | \"push_unconfirmed\" | \"schema_lock_blocked\" | \"pg_connection_recovery_failed\" | \"pg_connection_stuck\" | \"pg_pool_stalled\" | \"pg_statement_build_failed\" | \"pglite_busy\" | \"pglite_vector_index_too_large\" | \"plan_output_failed\" | \"plan_stale\" | \"port_in_use\" | \"preview_changed\" | \"profile_incompatible\" | \"projection_owner_resident\" | \"knock_on_exhausted\" | \"keyword_skipped_after_timeout\" | \"publication_pending\" | \"pull_blocked_local_changes\" | \"purge_blocked_pending_recovery\" | \"purge_lookup_timeout\" | \"purge_mirror_unwritable\" | \"question_not_found\" | \"question_owner_only\" | \"read_budget_exhausted\" | \"receipt_conflict\" | \"receipt_fence_changed\" | \"receipt_fence_required\" | \"receipt_identity_mismatch\" | \"pat_file_unreadable\" | \"reconcile_read_incomplete\" | \"recovery_prior_stage_unavailable\" | \"recovery_version_unsupported\" | \"redirect_uri_mismatch\" | \"ref_not_in_answer\" | \"refresh_dirty\" | \"refresh_diverged\" | \"refresh_drain_timeout\" | \"refresh_no_upstream\" | \"refresh_not_managed\" | \"refresh_not_owner\" | \"refresh_source_changed\" | \"relay_disabled\" | \"relay_session_expired\" | \"relay_unreachable\" | \"rename_held\" | \"rename_identity_unreadable\" | \"rename_reconcile_failed\" | \"request_already_submitted\" | \"requirements_changed\" | \"requires_local_engine\" | \"reset_upstream_refused\" | \"resume_spec_mismatch\" | \"result_too_large\" | \"revision_changed\" | \"revision_unavailable\" | \"schema_owner_required\" | \"scope_missing\" | \"search_cursor_requires_keyword\" | \"search_mode_local_only\" | \"scorecard_group_by_local_only\" | \"search_offset_over_cap\" | \"segmented_mirror_writer_gate\" | \"serve_build_drift\" | \"serve_port_in_use\" | \"serve_status_only\" | \"setup_harness_unsupported\" | \"setup_hosted_connection\" | \"setup_owner_conflict\" | \"shared_skills_unavailable\" | \"shared_skills_unsupported\" | \"skill_asset_not_found\" | \"skill_candidate_invalid\" | \"skill_not_found\" | \"skill_retention_capacity\" | \"skill_unavailable\" | \"slug_page_mismatch\" | \"slug_root_mode_mismatch\" | \"source_binding_required\" | \"source_id_taken\" | \"source_mismatch\" | \"source_not_ready\" | \"source_profile_no_backfill\" | \"source_referenced\" | \"source_root_conflict\" | \"split_bad_ratio\" | \"split_unparseable\" | \"stale_unavailable\" | \"state_mismatch\" | \"sync_not_applicable\" | \"sync_drain_lease_held\" | \"content_receipt_stale\" | \"sync_first_run_in_progress\" | \"sync_no_successful_sync\" | \"sync_cursor_replaced\" | \"sync_parser_regression\" | \"target_escape\" | \"timeline_comment_markup\" | \"topology_change_required\" | \"transcript_secret_exposure\" | \"triage_unreliable_backoff\" | \"trust_raise_refused\" | \"two_consumers_on_host\" | \"trusted_local_only\" | \"unexpected_file_bytes\" | \"unexpected_staging_bytes\" | \"unknown_command\" | \"unknown_flag\" | \"unknown_method\" | \"unknown_source\" | \"unknown_tool\" | \"unpriced_model\" | \"unmanaged_database_path\" | \"unmanaged_path\" | \"unsupported_export_data\" | \"unsupported_path\" | \"upstream\" | \"upstream_diverged\" | \"upstream_rewritten\" | \"upstream_unknown\" | \"verification_failed\" | \"withdrawal_capacity\" | \"withdrawal_mirror_failed\" | \"withdrawal_mirror_pending\" | \"withdrawal_provenance\" | \"write_capacity_low\" | \"write_gate_rejected\" | \"write_held\" | \"worktree_dirty\" | \"writer_admin_intent_required\" | \"writer_admin_state_changed\" | \"writer_busy\" | \"writer_identity_publish_failed\" | \"writer_manifest_mismatch\" | \"writer_manifest_rescope_required\" | \"writer_manifest_unsafe\" | \"writer_regrant_required\" | \"writer_transfer_conflict\" | \"writer_transfer_required\" | \"wrong_account_consented\" | \"schema_pack_too_large\" | \"schema_pack_emit_mismatch\" | undefined",
++ "canonical?: \"unknown\" | \"keyword_candidates_incomplete\" | \"projection_pending\" | \"timeout\" | \"rate_limited\" | \"embedding_disabled\" | \"writer_lock_unavailable\" | \"writer_pool_capacity\" | \"owner_unavailable\" | \"recovery_required\" | \"queue_capacity\" | \"write_quota_exhausted\" | \"write_quota_insufficient\" | \"write_capacity_backpressure\" | \"revision_required\" | \"revision_conflict\" | \"idempotency_conflict\" | \"source_changed\" | \"write_pending\" | \"storage_error\" | \"cancelled\" | \"permission_denied\" | \"scope_denied\" | \"invalid_params\" | \"not_found\" | \"page_not_found\" | \"page_identity_changed\" | \"write_claim_lost\" | \"request_too_large\" | \"response_too_large\" | \"writer_registration_required\" | \"writer_identity_invalid\" | \"writer_not_initialized\" | \"writer_coordinator_required\" | \"fact_already_expired\" | \"source_writeback_required\" | \"unsupported_mutation_protocol\" | \"writer_upgrade_required\" | \"writer_not_quiesced\" | \"skill_bundle_required\" | \"take_row_collision\" | \"invalid_source_uri\" | \"writer_admin_locked\" | \"connector_account_changed\" | \"connector_intent_outdated\" | \"checkpoint_validation_timeout\" | \"invalid_connector_text\" | \"connector_holds_exhausted\" | \"connector_fence_below_timeline\" | \"core_budget_exceeded\" | \"core_mark_owner_only\" | \"core_remote_edit_refused\" | \"core_delete_owner_only\" | \"timeline_rows_would_be_removed\" | \"purged_content\" | \"preparation_stalled\" | \"fence_unrenderable\" | \"page_body_segmented\" | \"write_outcome_unknown\" | \"write_interrupted\" | \"embedding_failed\" | \"bucket_not_found\" | \"database_error\" | \"unknown_transport\" | \"extraction_failed\" | \"fact_not_found\" | \"provenance_required\" | \"unavailable\" | \"budget_unsatisfiable\" | \"embedding_budget_below_worst_case\" | \"absent_from_worktree\" | \"access_command_failed\" | \"access_denied_test_user\" | \"access_env_missing\" | \"acknowledgment_unavailable\" | \"admin_policy_enforced\" | \"admission_paused\" | \"ambient_capture_off\" | \"ambiguous_id\" | \"ambiguous_ref\" | \"ambiguous_skill\" | \"answer_not_yours\" | \"answer_pending\" | \"answer_unavailable\" | \"api_not_enabled\" | \"approval_required\" | \"atom_drain_incomplete\" | \"atom_drain_no_progress\" | \"atom_drain_provider_failure\" | \"autopilot_job_owned_by_other_brain\" | \"body_staging_expired\" | \"budget_below_recent_runtime\" | \"backup_dump_failed\" | \"backup_too_large\" | \"belief_coverage_required\" | \"belief_stale_preparation\" | \"benchmark_duplicate_task_id\" | \"benchmark_empty\" | \"benchmark_exists\" | \"benchmark_judge_llm_no_rubric\" | \"benchmark_judge_qrels_no_expected\" | \"benchmark_judge_rule_no_checks\" | \"benchmark_judge_unknown_kind\" | \"benchmark_malformed\" | \"benchmark_missing_judge\" | \"benchmark_missing_task\" | \"benchmark_missing_task_id\" | \"benchmark_not_found\" | \"benchmark_rule_check_bad_arg\" | \"benchmark_rule_check_malformed\" | \"benchmark_rule_check_unknown_op\" | \"bootstrap_cleanup_pending\" | \"bootstrap_empty\" | \"bootstrap_pending_review\" | \"bridge_ownership_conflict\" | \"coverage_from\" | \"coverage_gap\" | \"clock_mismatch\" | \"extract_write_lost\" | \"item_failures_systemic\" | \"known_as_of_unproven\" | \"cache_quota_exceeded\" | \"calendar_unreadable\" | \"capacity_paused\" | \"catalog_capacity_exceeded\" | \"catalog_unavailable\" | \"changed_since_preview\" | \"chronicle_skipped\" | \"no_pricing\" | \"checkpoint_missing\" | \"claim_already_used\" | \"client_json_unreadable\" | \"client_json_wrong_type\" | \"client_not_found\" | \"client_shape_invalid\" | \"code_callees_requires_symbol\" | \"code_callers_requires_symbol\" | \"code_def_requires_symbol\" | \"code_refs_requires_symbol\" | \"code_reused\" | \"colon_slug_windows_write_through\" | \"command_failed\" | \"commit_lock_busy\" | \"commit_paths_invalid\" | \"concurrent_write\" | \"config_error\" | \"confirmation_required\" | \"conflicting_source_scope\" | \"connection_lost\" | \"chunkless_pages_healable\" | \"consent_required\" | \"consent_timeout\" | \"consumers_without_heartbeat\" | \"content_repair_needs_human\" | \"content_null_bytes\" | \"content_rejected\" | \"continuation_unproven\" | \"corpus_chat_unavailable\" | \"corpus_window_backoff\" | \"corpus_window_dead_lettered\" | \"convergence_read_failed\" | \"cost_cap_exceeded\" | \"cost_preview_requires_yes\" | \"cursor_incarnation_retired\" | \"cycle_failed\" | \"d_sel_too_small\" | \"delta_cursor_upgrade_required\" | \"deleted_page_chunks_overdue\" | \"demo_graph_failed\" | \"demo_import_failed\" | \"demo_verification_failed\" | \"derived_cap_exhausted\" | \"destination_not_ready\" | \"drain_stalled\" | \"managed_sync_not_moving\" | \"dream_breaker_tripped\" | \"dirty_tree\" | \"doctor_tier_unavailable\" | \"effect_not_failed\" | \"embed_backfill_stalled\" | \"embedding_auth_failed\" | \"embedding_configuration\" | \"embedding_identity_unqualified\" | \"embedding_model_mismatch\" | \"embedding_plane_split\" | \"embedding_state_unknown\" | \"embedding_storage_unavailable\" | \"embedding_unavailable\" | \"embedding_unconfigured\" | \"embedding_width_mismatch\" | \"engine_graduated\" | \"entity_types_unavailable\" | \"eval_suite_unwired\" | \"export_limit\" | \"extractor_identity_mismatch\" | \"fact_withdrawn\" | \"fact_rows_collide\" | \"facts_absorb_write_refused\" | \"facts_backstop_skipped\" | \"facts_drain_deferred\" | \"facts_drain_job_failed\" | \"facts_payload_expired\" | \"feedback_disabled\" | \"feedback_not_authorized\" | \"fetch_failed\" | \"file_database_drift\" | \"fix_not_writable\" | \"file_drift\" | \"file_drift_mixed_selection\" | \"file_drift_state_required\" | \"file_removed_during_scan\" | \"file_unreadable\" | \"file_too_large\" | \"follow_approval_required\" | \"forget_requires_owner\" | \"frontmatter_slug_conflict\" | \"full_resync_required\" | \"gate_failed\" | \"ghost_mass_delete_refused\" | \"notifier_stalled\" | \"origin_twin_mass_merge_refused\" | \"ghost_storage_unknown\" | \"git_branch_unborn\" | \"git_durability_not_enabled\" | \"git_checkout_required\" | \"git_detached_head\" | \"git_index_locked\" | \"git_index_stale\" | \"git_target_pending\" | \"git_operation_in_progress\" | \"git_push_unavailable\" | \"git_target_unsafe\" | \"git_unavailable\" | \"git_object_missing\" | \"gitlink_not_followed\" | \"graduation_drain_timeout\" | \"graduation_embedding_dimension_mismatch\" | \"graduation_foreign_host_binding\" | \"graduation_in_progress\" | \"graduation_interrupted\" | \"graduation_rollback_writes_lost\" | \"graduation_source_writer_held\" | \"graduation_split_brain\" | \"graduation_target_auth_failed\" | \"graduation_target_ddl_unreachable\" | \"graduation_target_not_empty\" | \"graduation_target_unsupported\" | \"graduation_unclassified_table\" | \"graduation_unsupported_platform\" | \"graduation_verify_failed\" | \"grant_scope\" | \"graph_incomplete\" | \"host_identity_mismatch\" | \"harness_hook_duplicates\" | \"harness_hook_unowned\" | \"head_blocked\" | \"held_failed\" | \"held_out_overlaps_benchmark\" | \"held_out_required_for_bundled\" | \"independent_principal_required\" | \"insufficient_scope\" | \"integrate_conflict\" | \"internal\" | \"internal_error\" | \"interrupted\" | \"invalid_acknowledgment\" | \"invalid_client\" | \"invalid_fence\" | \"unclosed_ambiguous_tail\" | \"tail_exposure_approval\" | \"sync_in_progress\" | \"invalid_frontmatter\" | \"invalid_grant_clock_skew\" | \"invalid_grant_revoked\" | \"invalid_grant_testing_expiry\" | \"invalid_rating\" | \"invalid_receipt\" | \"invalid_receipt_transition\" | \"invalid_request\" | \"invalid_source\" | \"invalid_source_pin\" | \"invalid_token\" | \"invalid_write_wait\" | \"ipc_path_too_long\" | \"legacy_twin_mass_merge_refused\" | \"legacy_twins_storage_unknown\" | \"legacy_job_selection_invalid\" | \"legacy_jobs_active\" | \"legacy_lock_removal_refused\" | \"link_cursor_invalid\" | \"local_conflict\" | \"lock_busy\" | \"loops_extraction_skipped\" | \"maintenance_backpressure\" | \"maintenance_lock_busy\" | \"managed_failure_unsettled\" | \"managed_remedy_unavailable\" | \"merge_recommended\" | \"movement_unknown\" | \"managed_sync_flag_refused\" | \"managed_pull_skipped\" | \"manual_only_skipped\" | \"membership_inactive\" | \"membership_not_found\" | \"method_not_allowed\" | \"migration_lease_lost\" | \"migration_declined\" | \"migration_failed\" | \"migration_host_work_pending\" | \"migrations_pending\" | \"migrations_running\" | \"missing_source_scope\" | \"missing_source_value\" | \"models_strict_violation\" | \"no_context_ceiling\" | \"no_refresh_token\" | \"no_routing_eval\" | \"no_skill_md\" | \"no_worker\" | \"no_worker_surface\" | \"not_a_git_repo\" | \"not_converged\" | \"not_owner_host\" | \"not_connected\" | \"no_brain\" | \"overlapping_path\" | \"page_projection_conflict\" | \"page_body_rows_unreadable\" | \"page_projection_stale\" | \"page_shrink_refused\" | \"page_too_large_for_inline\" | \"parse_error\" | \"frontmatter_alias_limit\" | \"parser_regression\" | \"pasted_wrong_url\" | \"payload_too_large\" | \"path_not_utf8\" | \"pattern_claims_pending\" | \"patterns_min_interval\" | \"pending_verify\" | \"pending_writes\" | \"persistence_restart_required\" | \"pool_inflight_over_budget\" | \"deep_health_probe_failed\" | \"refresh_required\" | \"serve_self_exit_suppressed\" | \"serve_unhealthy_exit\" | \"persistence_write_stall\" | \"push_unconfirmed\" | \"schema_lock_blocked\" | \"pg_connection_recovery_failed\" | \"pg_connection_stuck\" | \"pg_pool_stalled\" | \"pg_statement_build_failed\" | \"pglite_busy\" | \"pglite_vector_index_too_large\" | \"plan_output_failed\" | \"plan_stale\" | \"port_in_use\" | \"preview_changed\" | \"profile_incompatible\" | \"projection_owner_resident\" | \"knock_on_exhausted\" | \"keyword_skipped_after_timeout\" | \"publication_pending\" | \"pull_blocked_local_changes\" | \"purge_blocked_pending_recovery\" | \"purge_lookup_timeout\" | \"purge_mirror_unwritable\" | \"question_not_found\" | \"question_owner_only\" | \"read_budget_exhausted\" | \"receipt_conflict\" | \"receipt_fence_changed\" | \"receipt_fence_required\" | \"receipt_identity_mismatch\" | \"pat_file_unreadable\" | \"reconcile_host_required\" | \"reconcile_read_incomplete\" | \"recovery_prior_stage_unavailable\" | \"recovery_version_unsupported\" | \"redirect_uri_mismatch\" | \"ref_not_in_answer\" | \"refresh_dirty\" | \"refresh_diverged\" | \"refresh_drain_timeout\" | \"refresh_no_upstream\" | \"refresh_not_managed\" | \"refresh_not_owner\" | \"refresh_source_changed\" | \"relay_disabled\" | \"relay_session_expired\" | \"relay_unreachable\" | \"rename_held\" | \"rename_identity_unreadable\" | \"rename_reconcile_failed\" | \"request_already_submitted\" | \"requirements_changed\" | \"requires_local_engine\" | \"reset_upstream_refused\" | \"resume_spec_mismatch\" | \"result_too_large\" | \"revision_changed\" | \"revision_unavailable\" | \"schema_owner_required\" | \"scope_missing\" | \"search_cursor_requires_keyword\" | \"search_mode_local_only\" | \"scorecard_group_by_local_only\" | \"search_offset_over_cap\" | \"segmented_mirror_writer_gate\" | \"serve_build_drift\" | \"serve_port_in_use\" | \"serve_status_only\" | \"settle_mismatch\" | \"setup_harness_unsupported\" | \"setup_hosted_connection\" | \"setup_owner_conflict\" | \"shared_skills_unavailable\" | \"shared_skills_unsupported\" | \"skill_asset_not_found\" | \"skill_candidate_invalid\" | \"skill_not_found\" | \"skill_retention_capacity\" | \"skill_unavailable\" | \"slug_page_mismatch\" | \"slug_root_mode_mismatch\" | \"source_binding_required\" | \"source_id_taken\" | \"source_mismatch\" | \"source_not_ready\" | \"source_profile_no_backfill\" | \"source_referenced\" | \"source_root_conflict\" | \"split_bad_ratio\" | \"split_unparseable\" | \"stale_unavailable\" | \"state_mismatch\" | \"sync_not_applicable\" | \"sync_admission_restricted\" | \"sync_drain_lease_held\" | \"content_receipt_stale\" | \"sync_first_run_in_progress\" | \"sync_no_successful_sync\" | \"sync_cursor_replaced\" | \"sync_parser_regression\" | \"target_escape\" | \"timeline_comment_markup\" | \"topology_change_required\" | \"transcript_secret_exposure\" | \"triage_unreliable_backoff\" | \"trust_raise_refused\" | \"two_consumers_on_host\" | \"trusted_local_only\" | \"unexpected_file_bytes\" | \"unexpected_staging_bytes\" | \"unknown_command\" | \"unknown_flag\" | \"unknown_method\" | \"unknown_source\" | \"unknown_tool\" | \"unpriced_model\" | \"unmanaged_database_path\" | \"unmanaged_path\" | \"unsupported_export_data\" | \"unsupported_path\" | \"upstream\" | \"upstream_diverged\" | \"upstream_rewritten\" | \"upstream_unknown\" | \"verification_failed\" | \"withdrawal_capacity\" | \"withdrawal_mirror_failed\" | \"withdrawal_mirror_pending\" | \"withdrawal_provenance\" | \"write_capacity_low\" | \"write_gate_rejected\" | \"write_held\" | \"worktree_dirty\" | \"writer_admin_intent_required\" | \"writer_admin_state_changed\" | \"writer_busy\" | \"writer_identity_publish_failed\" | \"writer_manifest_mismatch\" | \"writer_manifest_rescope_required\" | \"writer_manifest_unsafe\" | \"writer_regrant_required\" | \"writer_transfer_conflict\" | \"writer_transfer_required\" | \"wrong_account_consented\" | \"schema_pack_too_large\" | \"schema_pack_emit_mismatch\" | undefined",
"canonicalCode: string",
"cause?: unknown",
"code: ErrorCode",