Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge lane B3 (embedding state, pages unsearchable) into capy/gbra93-bc
garrytan7883a85d665b
diff --cc CHANGELOG.mdindex 7012a123de,b54a14ea38..730062e0e4--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -20,8 -20,6 +20,9 @@@ identifiers and attribution are availab- Let the brain's own serve keep derived folders on the database copy: add `keep_db:` under `storage:` in the source's `gbrain.yml` (for example `keep_db: [concepts/]`). It is off until you add it.- See whether serve runs an older build than your checkout: `gbrain doctor --only serve_build_drift --json`.- Clear a wedged migration after fixing its cause: `gbrain apply-migrations --force-retry <version>`, then `gbrain apply-migrations --yes`.+- See what is wrong in seconds: `gbrain doctor --tier ops --json` (capacity, write failures, sync movement, receipt compaction, serve build, schema pack) under a 4 s deadline; `--budget-ms <n>` changes it, `--tier deep` runs the full scans.++- List what search cannot fully see: `gbrain pages unsearchable --source <id> --json`.+- From an agent without admin scope: MCP `get_brain_health` returns the same health as bands; `gbrain doctor --tier ops` from a thin client uses it when the token is not admin.### What you'd see@@@ -51,11 -46,6 +52,13 @@@- **Slug-conflict repair agrees with sync** (`src/core/repair/slug-conflicts.ts`, `src/core/persistence/sync-screen.ts`, `src/core/persistence/file-repair.ts`): `gbrain repair content` judges a held `frontmatter_slug_conflict` file with the screen managed sync froze it with. A file sync would accept as it is imports unchanged and its hold clears, bound to the hold it read (a newer hold stays, with a retry); a source in a Git subfolder loses its stray `slug:` line; a file sync would hold whatever the repair writes is `slug_page_mismatch`, naming both slugs and the edit.- **`remember` row numbers** (`src/core/persistence/memory-prepare.ts`): a remembered fact is numbered past both the page's fence rows and the facts rows recorded for the page, and a collision names the fact holding the row.- **Terminal receipts** (`src/core/persistence/terminal-classify.ts`): a write refused because its page's file is missing is category `canonical_file_missing`, whose fix previews `gbrain repair ghost-pages --source <id>`. A `fence_unrenderable` adoption refusal is its own category, historical when written by a build older than 0.60.218.0. `docs/guides/write-refusals.md` tells SQL readers that `error_message` is the short form and that `gbrain sources writer failures` carries the exit.+- **Doctor tiers and budgets** (`src/commands/doctor/budget.ts`, `registry.ts`, `context.ts`, `src/cli/commands/doctor.ts`): `--tier ops|standard|deep` and `--budget-ms`. The ops sections run first in every tier; `--tier ops` runs only them under one deadline (default 4000 ms) that also bounds each Postgres statement (`executeRaw` `deadlineAt`, re-read after the pool wait). Other tiers bound each check by `doctor.entry_budget_ms` (default 15000). A check that did not finish is a warn with `details.health: "unknown"`, `reason: "budget"` and a rerun-alone fix; the report adds `tier`, `complete`, `unknown_sections`, `elapsed_ms` and `budget_ms` when a tier or budget is given, and every check carries `elapsed_ms`. On PGLite, ops sections that need a Postgres serve read `not_applicable` (info) and the report stays complete. `getHealth` runs once per doctor run.- - **Receipt compaction freshness** (`src/commands/doctor/checks/ops-sections.ts`): new ops check `receipt_compaction` warns when the last compaction (`persistence.maintenance.last_compaction`) is older than 24 hours while a persistence consumer is live.++- **Receipt compaction freshness** (`src/commands/doctor/checks/ops-sections.ts`): new ops check `receipt_compaction` warns when the last compaction (`persistence.maintenance.last_compaction`) is older than 24 hours while a persistence consumer is live. The local doctor now also runs `schema_pack_consistency` as an ops section; before, only the remote `run_doctor` report did.+- **Sampled orphan ratio** (`src/commands/doctor/checks/orphan-estimate.ts`, `graph-health.ts`): above `doctor.orphan_ratio.full_scan_max_pages` (default 50000) `orphan_ratio` estimates from a `TABLESAMPLE` of about 2,000 pages and says so (`estimated: true`, `exact: false`); `--tier deep` scans fully.+- **Health for agents without admin** (`src/commands/doctor/brain-health-bands.ts`, `src/core/ops/admin.ts`): new read-scope MCP op `get_brain_health` returns capacity as `ok|low|critical` with a days band and write failures as count bands for the caller's readable sources, with no slugs or exact counters, cached 60 s. It is the MCP verify of the capacity and `maintenance_backpressure` fixes (`src/core/persistence/capacity-view.ts`).+- **Ops tier over MCP and the thin client** (`src/commands/doctor/remote-tier.ts`, `src/core/doctor-remote-tier.ts`): `run_doctor` takes `tier: "ops"` and `only`. A thin client's `gbrain doctor --tier ops` or `--only <check>` uses them when the serve lists them, falls back to `get_brain_health` bands for a read token, and otherwise refuses with the new `doctor_tier_unavailable` (run doctor on the brain host); it never runs the full remote report instead. `/admin/api/ops` serves one ops run a minute (`ops-snapshot.ts`).++- **Embedding state** (`src/core/embedding-state.ts`, `src/core/engine-sql/chunks.ts`, `src/commands/doctor/checks/embedding-state.ts`): new doctor check `embedding_state` (ops section) counts where indexed text stands against the active embedding column: embedded, pending, keyword-only, quarantined, empty, chunks on deleted pages and chunkless pages. It warns only on chunks of pages soft-deleted more than 72 hours ago and, on a keyed brain, on chunkless pages with body text; on the ops tier it counts only index-backed states and reports `unknown` without a covering index instead of scanning. `get_brain_health` adds the unsearchable count as a band.++- **`gbrain pages unsearchable`** (`src/commands/pages-unsearchable.ts`): `--source <id> [--state] [--limit] [--json]` lists what search cannot fully see, one row per page and state with its fix; read-only.## [0.60.230.0] - 2026-10-14diff --cc src/commands/doctor/brain-health-bands.tsindex 9b2a2d09ad,0000000000..97179e3719mode 100644,000000..100644--- a/src/commands/doctor/brain-health-bands.ts+++ b/src/commands/doctor/brain-health-bands.ts@@@ -1,64 -1,0 +1,70 @@@+/**+ * #6696 B2 (Garry decision d2b): what a remote agent without admin scope may+ * see of brain health — bands, never exact counters, slugs, paths, request ids+ * or principal identities. Served by the read-scope operation+ * `get_brain_health` and the thin client's `gbrain doctor --only+ * persistence_capacity` when its token lacks admin.+ *+ * Capacity is brain-wide host state (one band for the brain and every+ * principal); write failures are scoped to the caller's readable sources. A+ * section that could not be read is `unknown`, never a clear band. Answers are+ * cached per engine and scope for 60 s, so a polling agent costs one read a+ * minute.+ */+import type { BrainEngine } from '../../core/engine.ts';+import { capacityBands, readCapacityView, type CapacityBand, type DaysBand } from '../../core/persistence/capacity-view.ts';+import { cachedTerminalSummary } from '../serve-http-metrics.ts';++import { readEmbeddingState } from '../../core/embedding-state.ts';++export const BRAIN_HEALTH_TTL_MS = 60_000;+export type CountBand = 'none' | '1-9' | '10-99' | '100-999' | '1000+' | 'unknown';++export function countBand(n: number | null | undefined): CountBand {+ if (n === null || n === undefined || !Number.isFinite(n) || n < 0) return 'unknown';+ return n === 0 ? 'none' : n < 10 ? '1-9' : n < 100 ? '10-99' : n < 1000 ? '100-999' : '1000+';+}++export interface BrainHealthBands {+ schema_version: 1;+ status: 'ok' | 'attention' | 'unknown';+ capacity: { band: CapacityBand | 'unknown'; days: DaysBand; max_pct_band: '<80' | '80-95' | '>=95' | 'unknown'; forecast: 'available' | 'unavailable' };+ write_failures: { band: CountBand; active_blockers: CountBand; window_days: number | null };++ /** Chunks search cannot fully see (ops-mode, index-backed: `lower_bound` when some states were not counted). */++ unsearchable: { band: CountBand; lower_bound: boolean };+ /** The read-only command an operator runs on the brain host for the full report. */+ host_command: string[];+}++const cache = new WeakMap<BrainEngine, Map<string, { at: number; value: Promise<BrainHealthBands> }>>();++/** `sourceIds`: the sources this caller may read (undefined: every source). */+export function readBrainHealthBands(engine: BrainEngine, opts: { sourceIds?: string[] } = {}, now = Date.now()): Promise<BrainHealthBands> {+ const key = opts.sourceIds ? [...opts.sourceIds].sort().join('\u0000') : '*';+ const perEngine = cache.get(engine) ?? new Map();+ cache.set(engine, perEngine);+ const hit = perEngine.get(key);+ if (hit && now - hit.at < BRAIN_HEALTH_TTL_MS) return hit.value;+ const value = computeBands(engine, opts.sourceIds);+ perEngine.set(key, { at: now, value });+ return value;+}++async function computeBands(engine: BrainEngine, sourceIds: string[] | undefined): Promise<BrainHealthBands> {- const [capacity, failures] = await Promise.all([++ const [capacity, failures, unsearchable] = await Promise.all([+ readCapacityView(engine).then((view) => ({ ...capacityBands(view), forecast: view.forecast ? 'available' as const : 'unavailable' as const }))+ .catch(() => ({ capacity: 'unknown' as const, days: 'unknown' as const, max_pct_band: 'unknown' as const, forecast: 'unavailable' as const })),+ cachedTerminalSummary(engine).then((summary) => {+ if (summary.status !== 'ok') return { band: 'unknown' as const, active_blockers: 'unknown' as const, window_days: null };+ const visible = summary.sources.filter((s) => !sourceIds || sourceIds.includes(s.source_id));+ return { band: countBand(visible.reduce((n, s) => n + s.unresolved.rows, 0)), active_blockers: countBand(visible.reduce((n, s) => n + s.active_blockers.length, 0)),+ window_days: summary.window_days };+ }),++ readEmbeddingState(engine, { mode: 'ops', ...(sourceIds ? { sourceIds } : {}) })++ .then((state) => state.status === 'unknown' ? { band: 'unknown' as const, lower_bound: false } : { band: countBand(state.unsearchable), lower_bound: state.unsearchable_complete === false })++ .catch(() => ({ band: 'unknown' as const, lower_bound: false })),+ ]);- const bands = { capacity: { band: capacity.capacity, days: capacity.days, max_pct_band: capacity.max_pct_band, forecast: capacity.forecast }, write_failures: failures };++ const bands = { capacity: { band: capacity.capacity, days: capacity.days, max_pct_band: capacity.max_pct_band, forecast: capacity.forecast }, write_failures: failures, unsearchable };+ const unknown = bands.capacity.band === 'unknown' || failures.band === 'unknown';+ const attention = bands.capacity.band === 'low' || bands.capacity.band === 'critical' || (failures.active_blockers !== 'none' && failures.active_blockers !== 'unknown');+ return { schema_version: 1, status: attention ? 'attention' : unknown ? 'unknown' : 'ok', ...bands, host_command: ['gbrain', 'doctor', '--tier', 'ops', '--json'] };+}diff --cc src/commands/doctor/checks/embedding-state.tsindex 0000000000,55abc7972c..da0b6b3ca5mode 000000,100644..100644--- a/src/commands/doctor/checks/embedding-state.ts+++ b/src/commands/doctor/checks/embedding-state.ts@@@ -1,0 -1,73 +1,73 @@@+ /**+ * Doctor `embedding_state` (#6696 B3, BRAIN): where indexed text stands against+ * the ACTIVE embedding column, from the derived classifier in+ * src/core/embedding-state.ts. The ops tier reads only index-backed counts+ * (unknown without a covering partial index); every other tier counts exactly.+ *+ * It warns only on what no other check owns: chunks of pages soft-deleted+ * longer than the purge window (fix: `gbrain pages purge-deleted`), and live+ * pages with body text but no chunk rows on a keyed brain (fix: `gbrain embed+ * --stale`). The pending backlog stays the `embeddings` check's warning (it+ * ages the backlog; this check only counts it), and quarantined pages stay+ * `quarantined_pages`'. keyword_only (embed_skip by design), deleted chunks+ * still inside the window and a brain keyless by choice are information.+ */+ import type { Check } from '../../doctor.ts';+ import { connectedEngine, type DoctorContext, type DoctorEntry } from '../context.ts';+ import { agentFix, checkError, doctorVerify, infoCheck, keylessEnablementFix } from '../check-fix.ts';+ import { EMBEDDING_STATE_DOCS, embeddingStateFix, readEmbeddingState, type EmbeddingState } from '../../../core/embedding-state.ts';++ const LABELS: Record<EmbeddingState, string> = {+ embedded: 'embedded', pending: 'pending', keyword_only: 'keyword-only', quarantined: 'quarantined',+ empty: 'empty', deleted_page_chunks: 'on deleted pages', chunkless_healable: 'chunkless (healable)',+ };++ async function runEmbeddingState(ctx: DoctorContext): Promise<Check[]> {+ const engine = connectedEngine(ctx);+ const checks: Check[] = [];+ ctx.progress.heartbeat('embedding_state');+ try {- const state = await readEmbeddingState(engine, { mode: ctx.tier === 'ops' ? 'ops' : 'full' });++ const state = await readEmbeddingState(engine, { mode: ctx.tier === 'ops' ? 'ops' : 'full', ...(ctx.sourceIds ? { sourceIds: ctx.sourceIds } : {}) });+ const details: Record<string, unknown> = { ...state, exact: state.basis === 'exact' };+ if (state.status === 'unknown') {+ checks.push({ name: 'embedding_state', status: 'warn',+ message: `Embedding state is unknown on the ops tier: the active embedding column '${state.active_column}' has no covering partial index (WHERE ${state.active_column} IS NULL), and the ops tier never scans. The standard tier counts it exactly.`,+ details: { ...details, code: 'embedding_state_unknown', health: 'unknown', exact: false },+ fix: agentFix(['gbrain', 'doctor', '--only', 'embedding_state', '--json'], 'The standard tier counts every embedding state exactly; it reads the database and changes nothing.', 'embedding_state', { docs: EMBEDDING_STATE_DOCS }) });+ return checks;+ }+ const counts = state.counts;+ const deleted = state.deleted_page_chunks as { within_window: number; past_window: number; window_hours: number };+ const enabled = state.embeddings_enabled === true;+ const healable = enabled ? counts.chunkless_healable ?? 0 : 0;+ const listed = (Object.keys(LABELS) as EmbeddingState[]).filter(s => counts[s] !== undefined).map(s => `${counts[s]} ${LABELS[s]}`).join(', ');+ const summary = `Embedding state (${state.basis}, column '${state.active_column}'): ${listed}; ${state.unsearchable}${state.unsearchable_complete ? '' : '+'} unsearchable.`;+ const notes: string[] = [];+ if ((counts.pending ?? 0) > 0) notes.push(enabled ? 'The pending backlog is the embeddings check\'s to age and warn on.' : 'Embeddings are disabled by choice: keyword search reads the pending chunks.');+ if ((counts.quarantined ?? 0) > 0) notes.push('Quarantined pages are reviewed under quarantined_pages.');+ if ((counts.keyword_only ?? 0) > 0) notes.push('Keyword-only chunks sit on embed_skip pages by design (split the page or approve a higher content_sanity.bytes_block; `gbrain pages unsearchable --state keyword_only` lists them).');+ if (deleted.within_window > 0) notes.push(`${deleted.within_window} chunk(s) on pages soft-deleted within ${deleted.window_hours}h wait for the purge lifecycle.`);+ if (deleted.past_window > 0 || healable > 0) {+ const warnings: string[] = [];+ if (deleted.past_window > 0) warnings.push(`${deleted.past_window} chunk(s) belong to pages soft-deleted more than ${deleted.window_hours}h ago; \`gbrain pages purge-deleted\` removes them (preview with --dry-run --json; it is brain-wide and irreversible, so ask the user first).`);+ if (healable > 0) warnings.push(`${healable} live page(s) have body text but no chunk rows, so search cannot read their body; \`gbrain embed --stale\` chunks and embeds them (paid).`);+ const fix = embeddingStateFix(deleted.past_window > 0 ? 'deleted_page_chunks' : 'chunkless_healable', { embeddingsEnabled: enabled, verify: doctorVerify('embedding_state') });+ checks.push({ name: 'embedding_state', status: 'warn', message: [summary, ...warnings, ...notes].join(' '),+ details: { ...details, code: deleted.past_window > 0 ? 'deleted_page_chunks_overdue' : 'chunkless_pages_healable' }, ...(fix ? { fix } : {}) });+ return checks;+ }+ const message = [summary, ...notes].join(' ');+ if (!enabled) {+ checks.push(infoCheck('embedding_state', message, 'disabled_by_choice', keylessEnablementFix(), details));+ } else if ((counts.keyword_only ?? 0) > 0 || deleted.within_window > 0) {+ checks.push(infoCheck('embedding_state', message, (counts.keyword_only ?? 0) > 0 ? 'disabled_by_choice' : 'not_applicable', undefined, details));+ } else {+ checks.push({ name: 'embedding_state', status: 'ok', message, details });+ }+ } catch (err) {+ checks.push(checkError('embedding_state', 'read embedding state', err, { details: { health: 'unknown', exact: false } }));+ }+ return checks;+ }++ export const embeddingStateEntry: DoctorEntry = { name: 'embedding_state', emits: ['embedding_state'], run: runEmbeddingState, tier: 'ops', opsPglite: 'not_applicable' };diff --cc src/commands/doctor/registry.tsindex b3c94d439f,48f92578c5..48d33bdd04--- a/src/commands/doctor/registry.ts+++ b/src/commands/doctor/registry.ts@@@ -148,13 -139,6 +149,14 @@@ export const DOCTOR_CHECK_REGISTRY: readbChecksGateEntry,connectionEntry,connectionGateEntry,+ // #6696 B1: ops sections first (`tier: 'ops'`), so a default run answers them before the slower checks.+ persistenceCapacityEntry,+ terminalFailuresEntry,+ managedSyncMovementEntry,+ receiptCompactionEntry,+ serveBuildDriftEntry,+ schemaPackConsistencyEntry,++ embeddingStateEntry,pgvectorEntry,rlsEntry,schemaVersionEntry,diff --cc src/core/behavior-change-notice.tsindex f5793e5bd1,40f03d341a..7802acd20e--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@@ -572,9 -572,9 +572,11 @@@ export const BEHAVIOR_CHANGES: Readonly{ since: '0.60.229.0', text: 'A `gbrain sync` handed to a running `gbrain serve` on a managed brain now treats processing options as the in-process sync does. With no `--no-embed` / `--no-extract` / `--no-schema-pack` flag it adopts an unfinished run\'s stored options instead of refusing `invalid_params`; an older CLI that omits the explicit-flag list counts each processing flag it sends as true as typed. The resident-owner lane of a PGLite brain follows the same rule and keeps an explicit list it is sent. A cost-gate embedding deferral stays a property of that run, so resuming a run that stored embedding on embeds nothing in it. A source with a configured strategy now gets one cursor for `gbrain sync --all`, a single-source sync, the cycle and a delegated run; an unfinished run under the old key finishes under that key first.' },{ since: '0.60.229.0', text: '`--skip-failed` and `--include-gitignored` on a managed source now refuse with `managed_sync_flag_refused`, naming the flag, before anything runs: at `gbrain sync` parse (`--all` included), before a hand-off to `gbrain serve`, and for jobs, MCP and the cycle. Before, the refusal was `writer_coordinator_required` "cannot bypass ignored-file or failed-receipt guards", raised later. Rerun without the flag.' },{ since: '0.60.229.0', text: '`gbrain sync --retry-failed` on a managed source now prints, for each failure held under another run\'s options, its class and the command that settles it: `resumable` (a replay of the unfinished run, or a fresh discovery under the failed run\'s options, labelled apart), `safely orphaned` (the `gbrain repair managed-sync-orphans` preview) or `unresolved` (what has to finish first). A failure recorded before runs kept their options no longer prints "with the same options as the failed run (this receipt no longer records them)"; its options are recovered when an option set reproduces its cursor key exactly.' },- // #6696 PR B (GBRA-93 lane B3). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.+ // #6696 PR B (GBRA-93 lane B). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.- { since: '0.60.229.0', text: '`gbrain doctor` now runs its operator sections (write capacity, unresolved write failures, managed sync movement, receipt compaction, serve build drift, schema-pack consistency) before the slower checks, and bounds every other check by `doctor.entry_budget_ms` (default 15000). A check that does not finish in time is a warn with `details.health: "unknown"` and `reason: "budget"` and a command to rerun it alone, instead of holding the whole run; every check reports `elapsed_ms`. Above `doctor.orphan_ratio.full_scan_max_pages` pages (default 50000) `orphan_ratio` is a sampled estimate marked `estimated: true`; `gbrain doctor --tier deep` scans fully. New: `gbrain doctor --tier ops` runs only the operator sections under a 4000 ms deadline (`--budget-ms` changes it) and reports `complete`, `unknown_sections` and `elapsed_ms`; on PGLite the sections that need a Postgres serve read `not_applicable`. New check `receipt_compaction` warns when receipts were last compacted more than 24 hours ago while a persistence consumer is live.' },++ { since: '0.60.229.0', text: '`gbrain doctor` now runs its operator sections (write capacity, unresolved write failures, managed sync movement, receipt compaction, serve build drift, schema-pack consistency) before the slower checks, and bounds every other check by `doctor.entry_budget_ms` (default 15000). A check that does not finish in time is a warn with `details.health: "unknown"` and `reason: "budget"` and a command to rerun it alone, instead of holding the whole run; every check reports `elapsed_ms`. Above `doctor.orphan_ratio.full_scan_max_pages` pages (default 50000) `orphan_ratio` is a sampled estimate marked `estimated: true`; `gbrain doctor --tier deep` scans fully. New: `gbrain doctor --tier ops` runs only the operator sections under a 4000 ms deadline (`--budget-ms` changes it) and reports `complete`, `unknown_sections` and `elapsed_ms`; on PGLite the sections that need a Postgres serve read `not_applicable`. New check `receipt_compaction` warns when receipts were last compacted more than 24 hours ago while a persistence consumer is live, and the local doctor now runs `schema_pack_consistency` (pages whose type the source\'s schema pack neither declares nor aliases), which only the remote `run_doctor` report ran before.' },+ { since: '0.60.229.0', text: 'A thin client\'s `gbrain doctor --tier ops` or `gbrain doctor --only <check>` now asks the remote serve instead of running the thin-client connectivity checks with `--only` ignored: an admin token gets `run_doctor` with `tier: "ops"` / `only`, a read token gets the new read-scope MCP operation `get_brain_health` (write capacity as `ok|low|critical` with a days band, write failures as count bands for the sources it can read, no slugs or exact counts, cached 60 s), and a serve older than this release refuses with `doctor_tier_unavailable` naming `gbrain doctor --tier ops --json` on the brain host. `get_brain_health` is also the MCP verify of the capacity and `maintenance_backpressure` fixes.' },+ { since: '0.60.229.0', text: 'New doctor check `embedding_state` (brain, runs on the ops tier) counts where indexed text stands against the active embedding column: embedded, pending, keyword_only (embed_skip pages, by design), quarantined, empty, chunks on deleted pages and chunkless pages. It warns only on chunks of pages soft-deleted more than 72 hours ago (`deleted_page_chunks_overdue`, fix `gbrain pages purge-deleted`) and, on a keyed brain, on live pages with body text but no chunk rows (`chunkless_pages_healable`, fix `gbrain embed --stale`); the pending backlog stays the `embeddings` check\'s warning and quarantined pages stay `quarantined_pages`\'. On the ops tier a brain whose active embedding column has no partial index `WHERE <column> IS NULL` reports `unknown` (`embedding_state_unknown`) instead of scanning. Check with `gbrain doctor --only embedding_state --json`.' },+ { since: '0.60.229.0', text: 'New read-only `gbrain pages unsearchable --source <id> [--state <state>] [--limit N] [--json]` lists the pages search cannot fully see, one row per page and embedding state with its reason, chunk count, bytes and fix; an unknown `--state` refuses with `invalid_params` naming the valid states.' },// GBRA-96 (default reranker). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.{ since: '0.60.228.0', text: 'The default search reranker is now Voyage `rerank-3-lite` instead of `rerank-2.5`, for brains that never set `search.reranker.model` (a brain that set one keeps it). In gbrain-evals #148 (v0.10.93) it cut rerank cost 60% at the same 50 candidates × 1,400 tokens, with retrieval quality within noise. To go back: `gbrain config set search.reranker.model voyage:rerank-2.5`.' },// #6650 follow-up (group follower stamps). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.diff --cc src/core/cli-flag-registry.generated.tsindex d66c72c249,91f6335535..0ef2bd70cc--- a/src/core/cli-flag-registry.generated.ts+++ b/src/core/cli-flag-registry.generated.ts@@@ -47,7 -47,7 +47,7 @@@ export const CLI_FLAG_REGISTRY: Record<'creds': ['--allow-create-db', '--allow-docker', '--brain', '--chat-model', '--content-root', '--db-only', '--embedding-dimensions', '--embedding-model', '--expansion-model', '--force', '--git', '--grant-types', '--help', '--http', '--ids', '--issuer-url', '--json', '--key', '--local-postgres', '--mcp-only', '--mcp-url', '--migrate-only', '--model', '--no-embedding', '--no-git', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--out', '--passphrase-env', '--path', '--pglite', '--plan', '--prefer-postgres', '--provenance', '--provider', '--query', '--schema-pack', '--scopes', '--search-mode', '--skip-embed-check', '--source', '--status', '--supabase', '--surface', '--to', '--url', '--version'],'db-repair': ['--accept-pending', '--apply', '--apply-rewrites', '--background', '--brain', '--break-lock', '--db-url', '--dry-run', '--explain', '--filter', '--follow', '--force', '--force-retry', '--format', '--help', '--http', '--json', '--locks', '--name', '--no-accept-pending', '--path', '--prefer-postgres', '--probe', '--progress-interval', '--progress-json', '--quiet', '--remediate', '--restart', '--skip-verify', '--source', '--supabase', '--timeout', '--undo-last-rewrite', '--url', '--version', '--wait', '--yes'],'decide': ['--accept-all', '--all', '--all-from', '--apply', '--brain', '--call-site', '--dataset', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--expect', '--from', '--help', '--include-withdrawals', '--input', '--json', '--kind', '--limit', '--max-cost', '--max-usd', '--min', '--non-interactive', '--out', '--provenance', '--provider', '--query', '--rate', '--reason', '--reason-family', '--recommended', '--remove', '--shadow', '--since', '--slot', '--source', '--status', '--suite', '--target', '--threshold', '--trust', '--undo', '--uri-prefix', '--version', '--what-if-threshold', '--yes'],- 'doctor': ['--abandon', '--abbrev-ref', '--accept-pending', '--access', '--acknowledge-managed', '--add', '--admin-intent', '--adopt', '--adopt-columns', '--adopt-permissions', '--all', '--all-drifted', '--all-from', '--allow-old-serve', '--allow-shell-jobs', '--allow-unverified-remote', '--allowed-operations', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--auto-fix', '--autostash', '--background', '--bound-brain', '--bound-max-concurrent', '--bound-slug-prefixes', '--bound-source', '--bound-tools', '--brain', '--branch', '--break-lock', '--budget-ms', '--budget-usd', '--by-mention', '--cached', '--call-site', '--catch-up', '--check', '--class', '--client', '--concurrency', '--confidence', '--confirm', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--content-root', '--count', '--dataset', '--db-url', '--delegated-namespace', '--delegated-slug-prefixes', '--delete-brain', '--dest', '--detach', '--diff-filter', '--dim', '--dir', '--disable', '--drain', '--drain-timeout', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--enable', '--enable-dcr', '--end-of-options', '--env', '--error-unmatch', '--exclude', '--exclude-standard', '--expand', '--expect', '--expect-remote', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--federated-read', '--fetch-timeout-ms', '--ff-only', '--file', '--fix', '--follow', '--force', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from', '--from-meetings', '--from-pages', '--full', '--fuzzy', '--get', '--git-common-dir', '--git-dir', '--git-path', '--group', '--group-by', '--hard', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--if-version', '--ignore-env-override', '--images', '--include-ambiguous', '--include-deleted', '--include-flagged', '--include-gitignored', '--include-hidden', '--include-pseudo', '--include-repairs', '--include-withdrawals', '--index-audit', '--init', '--input', '--install', '--is-ancestor', '--is-inside-work-tree', '--job-isolation', '--jq', '--json', '--keep', '--lanes', '--lang', '--left-right', '--limit', '--link-source', '--link-type', '--list', '--local', '--local-env-vars', '--locks', '--log-noop', '--manifest', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-runtime', '--max-usd', '--max-waiting', '--mcp-only', '--migrate-legacy', '--migrate-only', '--migration', '--min', '--mode', '--multimodal', '--name', '--name-only', '--nice', '--no-accept-pending', '--no-autopilot-install', '--no-autostash', '--no-capture', '--no-confirm', '--no-cron', '--no-delegate', '--no-edit', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-hooks', '--no-lanes', '--no-llm', '--no-migrate', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-seat', '--no-tags', '--no-verify', '--non-interactive', '--now', '--once', '--only', '--operations', '--others', '--out', '--output', '--overwrite', '--page', '--parallel', '--params', '--pat-file', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--port', '--prefer', '--prefer-postgres', '--preset', '--preview', '--probe', '--probe-pglite', '--profile', '--progress-interval', '--progress-json', '--project', '--provider', '--providers', '--prune-orphans', '--public-url', '--pull', '--pure', '--purge', '--push-only', '--query', '--question', '--queue', '--quiet', '--rate', '--reauth', '--rebase', '--recommended', '--reference-date', '--refresh', '--refresh-operations', '--refresh-skills', '--regenerate', '--reissue', '--relative', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--repair', '--replace', '--repo', '--request', '--request-id', '--require-clean', '--reranker', '--reset', '--reset-checkpoint', '--reset-default', '--resolve', '--restore-only', '--resume', '--retry-failed', '--reverse', '--review-lower', '--revision', '--rollback-to-source', '--scope', '--scopes', '--search-mode', '--seat', '--section', '--select', '--self-transfer', '--session', '--set', '--set-upstream-to', '--shadow', '--short', '--show-current', '--show-prefix', '--show-token', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--skip-verify', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--staged', '--stale', '--status', '--stdin', '--strategy', '--strict', '--suite', '--supabase', '--surface', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--threshold', '--tier', '--timeout', '--to', '--token', '--token-ttl', '--top-k', '--trust', '--type', '--uninstall', '--unsafe-bypass-dream-guard', '--unset-all', '--untracked-files', '--url', '--url-env', '--user', '--vectors', '--verbose', '--verify', '--version', '--wait', '--wait-drain', '--warn-only', '--what-if-threshold', '--window', '--workers', '--working-tree', '--workspace', '--yes'],- 'doctor': ['--abandon', '--abbrev-ref', '--accept-pending', '--access', '--acknowledge-managed', '--add', '--admin-intent', '--adopt', '--adopt-columns', '--adopt-permissions', '--all', '--all-drifted', '--all-from', '--allow-old-serve', '--allow-shell-jobs', '--allow-unverified-remote', '--allowed-operations', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--auto-fix', '--autostash', '--background', '--bound-brain', '--bound-max-concurrent', '--bound-slug-prefixes', '--bound-source', '--bound-tools', '--brain', '--branch', '--break-lock', '--budget-ms', '--budget-usd', '--by-mention', '--cached', '--call-site', '--catch-up', '--check', '--class', '--client', '--concurrency', '--confidence', '--confirm', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--content-root', '--count', '--dataset', '--db-url', '--delegated-namespace', '--delegated-slug-prefixes', '--delete-brain', '--dest', '--detach', '--diff-filter', '--dim', '--dir', '--disable', '--drain', '--drain-timeout', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--enable', '--enable-dcr', '--end-of-options', '--env', '--error-unmatch', '--exclude', '--exclude-standard', '--expand', '--expect', '--expect-remote', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--federated-read', '--fetch-timeout-ms', '--ff-only', '--file', '--fix', '--follow', '--force', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from', '--from-meetings', '--from-pages', '--full', '--get', '--git-common-dir', '--git-dir', '--git-path', '--group', '--group-by', '--hard', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--if-version', '--ignore-env-override', '--images', '--include-ambiguous', '--include-flagged', '--include-gitignored', '--include-hidden', '--include-pseudo', '--include-repairs', '--include-withdrawals', '--index-audit', '--init', '--input', '--install', '--is-ancestor', '--is-inside-work-tree', '--job-isolation', '--jq', '--json', '--keep', '--lanes', '--lang', '--left-right', '--limit', '--link-source', '--link-type', '--list', '--local', '--local-env-vars', '--locks', '--log-noop', '--manifest', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-runtime', '--max-usd', '--max-waiting', '--mcp-only', '--migrate-legacy', '--migrate-only', '--migration', '--min', '--mode', '--multimodal', '--name', '--name-only', '--nice', '--no-accept-pending', '--no-autopilot-install', '--no-autostash', '--no-capture', '--no-confirm', '--no-cron', '--no-delegate', '--no-edit', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-hooks', '--no-lanes', '--no-llm', '--no-migrate', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-seat', '--no-tags', '--no-verify', '--non-interactive', '--now', '--once', '--only', '--operations', '--others', '--out', '--output', '--overwrite', '--page', '--parallel', '--params', '--pat-file', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--port', '--prefer', '--prefer-postgres', '--preset', '--preview', '--probe', '--probe-pglite', '--profile', '--progress-interval', '--progress-json', '--project', '--provider', '--providers', '--prune-orphans', '--public-url', '--pull', '--pure', '--purge', '--push-only', '--query', '--question', '--queue', '--quiet', '--rate', '--reauth', '--rebase', '--recommended', '--reference-date', '--refresh', '--refresh-operations', '--refresh-skills', '--regenerate', '--reissue', '--relative', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--repair', '--replace', '--repo', '--request', '--request-id', '--require-clean', '--reranker', '--reset', '--reset-checkpoint', '--reset-default', '--resolve', '--restore-only', '--resume', '--retry-failed', '--reverse', '--review-lower', '--revision', '--rollback-to-source', '--scope', '--scopes', '--search-mode', '--seat', '--section', '--select', '--self-transfer', '--session', '--set', '--set-upstream-to', '--shadow', '--short', '--show-current', '--show-prefix', '--show-token', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--skip-verify', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--staged', '--stale', '--state', '--status', '--stdin', '--strategy', '--strict', '--suite', '--supabase', '--surface', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--threshold', '--timeout', '--to', '--token', '--token-ttl', '--top-k', '--trust', '--type', '--uninstall', '--unsafe-bypass-dream-guard', '--unset-all', '--untracked-files', '--url', '--url-env', '--user', '--vectors', '--verbose', '--verify', '--version', '--wait', '--wait-drain', '--warn-only', '--what-if-threshold', '--window', '--workers', '--working-tree', '--workspace', '--yes'],++ 'doctor': ['--abandon', '--abbrev-ref', '--accept-pending', '--access', '--acknowledge-managed', '--add', '--admin-intent', '--adopt', '--adopt-columns', '--adopt-permissions', '--all', '--all-drifted', '--all-from', '--allow-old-serve', '--allow-shell-jobs', '--allow-unverified-remote', '--allowed-operations', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--auto-fix', '--autostash', '--background', '--bound-brain', '--bound-max-concurrent', '--bound-slug-prefixes', '--bound-source', '--bound-tools', '--brain', '--branch', '--break-lock', '--budget-ms', '--budget-usd', '--by-mention', '--cached', '--call-site', '--catch-up', '--check', '--class', '--client', '--concurrency', '--confidence', '--confirm', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--content-root', '--count', '--dataset', '--db-url', '--delegated-namespace', '--delegated-slug-prefixes', '--delete-brain', '--dest', '--detach', '--diff-filter', '--dim', '--dir', '--disable', '--drain', '--drain-timeout', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--enable', '--enable-dcr', '--end-of-options', '--env', '--error-unmatch', '--exclude', '--exclude-standard', '--expand', '--expect', '--expect-remote', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--federated-read', '--fetch-timeout-ms', '--ff-only', '--file', '--fix', '--follow', '--force', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from', '--from-meetings', '--from-pages', '--full', '--fuzzy', '--get', '--git-common-dir', '--git-dir', '--git-path', '--group', '--group-by', '--hard', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--if-version', '--ignore-env-override', '--images', '--include-ambiguous', '--include-deleted', '--include-flagged', '--include-gitignored', '--include-hidden', '--include-pseudo', '--include-repairs', '--include-withdrawals', '--index-audit', '--init', '--input', '--install', '--is-ancestor', '--is-inside-work-tree', '--job-isolation', '--jq', '--json', '--keep', '--lanes', '--lang', '--left-right', '--limit', '--link-source', '--link-type', '--list', '--local', '--local-env-vars', '--locks', '--log-noop', '--manifest', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-runtime', '--max-usd', '--max-waiting', '--mcp-only', '--migrate-legacy', '--migrate-only', '--migration', '--min', '--mode', '--multimodal', '--name', '--name-only', '--nice', '--no-accept-pending', '--no-autopilot-install', '--no-autostash', '--no-capture', '--no-confirm', '--no-cron', '--no-delegate', '--no-edit', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-hooks', '--no-lanes', '--no-llm', '--no-migrate', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-seat', '--no-tags', '--no-verify', '--non-interactive', '--now', '--once', '--only', '--operations', '--others', '--out', '--output', '--overwrite', '--page', '--parallel', '--params', '--pat-file', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--port', '--prefer', '--prefer-postgres', '--preset', '--preview', '--probe', '--probe-pglite', '--profile', '--progress-interval', '--progress-json', '--project', '--provider', '--providers', '--prune-orphans', '--public-url', '--pull', '--pure', '--purge', '--push-only', '--query', '--question', '--queue', '--quiet', '--rate', '--reauth', '--rebase', '--recommended', '--reference-date', '--refresh', '--refresh-operations', '--refresh-skills', '--regenerate', '--reissue', '--relative', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--repair', '--replace', '--repo', '--request', '--request-id', '--require-clean', '--reranker', '--reset', '--reset-checkpoint', '--reset-default', '--resolve', '--restore-only', '--resume', '--retry-failed', '--reverse', '--review-lower', '--revision', '--rollback-to-source', '--scope', '--scopes', '--search-mode', '--seat', '--section', '--select', '--self-transfer', '--session', '--set', '--set-upstream-to', '--shadow', '--short', '--show-current', '--show-prefix', '--show-token', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--skip-verify', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--staged', '--stale', '--state', '--status', '--stdin', '--strategy', '--strict', '--suite', '--supabase', '--surface', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--threshold', '--tier', '--timeout', '--to', '--token', '--token-ttl', '--top-k', '--trust', '--type', '--uninstall', '--unsafe-bypass-dream-guard', '--unset-all', '--untracked-files', '--url', '--url-env', '--user', '--vectors', '--verbose', '--verify', '--version', '--wait', '--wait-drain', '--warn-only', '--what-if-threshold', '--window', '--workers', '--working-tree', '--workspace', '--yes'],'dream': ['--audit-rejects', '--brain', '--cancel-unmatched', '--date', '--dir', '--drain', '--dry-run', '--eval-run', '--force', '--from', '--help', '--input', '--install', '--json', '--limit', '--list', '--max-usd', '--once', '--path', '--phase', '--pull', '--reconcile-queue', '--since', '--source', '--source-id', '--threshold', '--to', '--unsafe-bypass-dream-guard', '--window', '--yes'],'edge-proposals': ['--access', '--add', '--all-applied', '--all-held', '--allowed-operations', '--asof', '--bound-slug-prefixes', '--brain', '--client', '--date', '--dated-since', '--days', '--entities', '--federated-read', '--full', '--fuzzy', '--help', '--http', '--id', '--include-deleted', '--json', '--kind', '--limit', '--max-usd', '--model', '--multimodal', '--no-autopilot-install', '--page', '--params', '--path', '--phase', '--purge', '--recent', '--refresh-operations', '--row', '--scopes', '--session', '--since', '--slugs', '--source', '--sources', '--stale', '--status', '--surface', '--to', '--updated-after', '--url', '--yes'],'edges-backfill': ['--all-sources', '--brain', '--concurrency', '--help', '--json', '--max-chunks', '--source', '--workers'],@@@ -73,14 -73,14 +73,14 @@@'graph-query': ['--brain', '--depth', '--direction', '--help', '--hop', '--include-foreign', '--json', '--mcp-only', '--source', '--type'],'hook': ['--allow-unverified-remote', '--auto', '--brain', '--branch', '--cached', '--count', '--diff-filter', '--enable', '--end-of-options', '--env', '--get', '--harness', '--help', '--jq', '--json', '--limit', '--name-only', '--others', '--pat-file', '--path', '--porcelain', '--pure', '--quiet', '--remove', '--seat', '--session', '--show-current', '--show-toplevel', '--since', '--source', '--yes'],'import': ['--accept-pending', '--admin-intent', '--allow-empty', '--allow-noncanonical-root', '--apply', '--background', '--brain', '--cached', '--confirm-relocated-root', '--diff-filter', '--dim', '--embedding-dimensions', '--embedding-model', '--empty', '--exclude', '--exclude-standard', '--expected-epoch', '--expected-state', '--explain', '--follow', '--force', '--force-rechunk', '--format', '--fresh', '--help', '--include-gitignored', '--is-shallow-repository', '--json', '--log-noop', '--manifest', '--name-only', '--no-accept-pending', '--no-embed', '--no-embedding', '--no-gpg-sign', '--no-pull', '--no-renames', '--no-verify', '--only', '--others', '--path', '--probe', '--progress-interval', '--progress-json', '--quiet', '--self-transfer', '--show-toplevel', '--skip-failed', '--slugs', '--source', '--source-id', '--stale', '--status', '--supabase', '--timeout', '--to', '--url', '--verify', '--wait', '--workers'],- 'init': ['--access', '--acknowledge-managed', '--adopt', '--all', '--allow-create-db', '--allow-docker', '--apply', '--assign-corpus', '--audit', '--auto', '--background', '--bound-slug-prefixes', '--brain', '--break-lock', '--budget-ms', '--budget-usd', '--chat-model', '--check', '--confirm-relocated-root', '--conflicts', '--content-root', '--db-only', '--dest', '--dim', '--disable', '--drain', '--embedding-dimensions', '--embedding-model', '--enable', '--expand', '--expansion-model', '--expect', '--expect-remote', '--facts', '--fast', '--fix', '--force', '--force-retry', '--from-meetings', '--full', '--git', '--grant-types', '--group-by', '--harness', '--help', '--http', '--id', '--images', '--include-gitignored', '--issuer-url', '--json', '--keep', '--key', '--lanes', '--limit', '--list', '--local-postgres', '--markdown', '--max-usd', '--mcp-only', '--mcp-url', '--migrate-only', '--migration', '--model', '--no-autopilot-install', '--no-autostash', '--no-delegate', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-git', '--no-llm', '--no-pull', '--no-repair', '--no-schema-pack', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--once', '--only', '--page', '--params', '--pat-file', '--path', '--pglite', '--phase', '--plan', '--prefer', '--prefer-postgres', '--preview', '--probe', '--profile', '--provenance', '--providers', '--pull', '--purge', '--push-only', '--query', '--question', '--quiet', '--rebase', '--reference-date', '--remediate', '--remove', '--reset', '--resolve', '--resume', '--retry-failed', '--save', '--schema-pack', '--scope', '--scopes', '--search-mode', '--section', '--self-transfer', '--show-toplevel', '--skip', '--skip-embed-check', '--skip-failed', '--slugs', '--source', '--source-id', '--stale', '--status', '--supabase', '--surface', '--tier', '--to', '--touchpoint', '--url', '--url-env', '--user', '--version', '--wait', '--warn-only', '--workspace', '--yes'],- 'init': ['--access', '--acknowledge-managed', '--adopt', '--all', '--allow-create-db', '--allow-docker', '--apply', '--assign-corpus', '--audit', '--auto', '--background', '--bound-slug-prefixes', '--brain', '--break-lock', '--budget-ms', '--budget-usd', '--chat-model', '--check', '--confirm-relocated-root', '--conflicts', '--content-root', '--db-only', '--dest', '--dim', '--disable', '--drain', '--embedding-dimensions', '--embedding-model', '--enable', '--expand', '--expansion-model', '--expect', '--expect-remote', '--facts', '--fast', '--fix', '--force', '--force-retry', '--from-meetings', '--full', '--git', '--grant-types', '--group-by', '--harness', '--help', '--http', '--id', '--images', '--include-gitignored', '--issuer-url', '--json', '--keep', '--key', '--lanes', '--limit', '--list', '--local-postgres', '--markdown', '--max-usd', '--mcp-only', '--mcp-url', '--migrate-only', '--migration', '--model', '--no-autopilot-install', '--no-autostash', '--no-delegate', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-git', '--no-llm', '--no-pull', '--no-repair', '--no-schema-pack', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--once', '--only', '--page', '--params', '--pat-file', '--path', '--pglite', '--phase', '--plan', '--prefer', '--prefer-postgres', '--preview', '--probe', '--profile', '--provenance', '--providers', '--pull', '--purge', '--push-only', '--query', '--question', '--quiet', '--rebase', '--reference-date', '--remediate', '--remove', '--reset', '--resolve', '--resume', '--retry-failed', '--save', '--schema-pack', '--scope', '--scopes', '--search-mode', '--section', '--self-transfer', '--show-toplevel', '--skip', '--skip-embed-check', '--skip-failed', '--slugs', '--source', '--source-id', '--stale', '--state', '--status', '--supabase', '--surface', '--to', '--touchpoint', '--url', '--url-env', '--user', '--version', '--wait', '--warn-only', '--workspace', '--yes'],++ 'init': ['--access', '--acknowledge-managed', '--adopt', '--all', '--allow-create-db', '--allow-docker', '--apply', '--assign-corpus', '--audit', '--auto', '--background', '--bound-slug-prefixes', '--brain', '--break-lock', '--budget-ms', '--budget-usd', '--chat-model', '--check', '--confirm-relocated-root', '--conflicts', '--content-root', '--db-only', '--dest', '--dim', '--disable', '--drain', '--embedding-dimensions', '--embedding-model', '--enable', '--expand', '--expansion-model', '--expect', '--expect-remote', '--facts', '--fast', '--fix', '--force', '--force-retry', '--from-meetings', '--full', '--git', '--grant-types', '--group-by', '--harness', '--help', '--http', '--id', '--images', '--include-gitignored', '--issuer-url', '--json', '--keep', '--key', '--lanes', '--limit', '--list', '--local-postgres', '--markdown', '--max-usd', '--mcp-only', '--mcp-url', '--migrate-only', '--migration', '--model', '--no-autopilot-install', '--no-autostash', '--no-delegate', '--no-embed', '--no-embedding', '--no-expand', '--no-extract', '--no-git', '--no-llm', '--no-pull', '--no-repair', '--no-schema-pack', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--once', '--only', '--page', '--params', '--pat-file', '--path', '--pglite', '--phase', '--plan', '--prefer', '--prefer-postgres', '--preview', '--probe', '--profile', '--provenance', '--providers', '--pull', '--purge', '--push-only', '--query', '--question', '--quiet', '--rebase', '--reference-date', '--remediate', '--remove', '--reset', '--resolve', '--resume', '--retry-failed', '--save', '--schema-pack', '--scope', '--scopes', '--search-mode', '--section', '--self-transfer', '--show-toplevel', '--skip', '--skip-embed-check', '--skip-failed', '--slugs', '--source', '--source-id', '--stale', '--state', '--status', '--supabase', '--surface', '--tier', '--to', '--touchpoint', '--url', '--url-env', '--user', '--version', '--wait', '--warn-only', '--workspace', '--yes'],'integrations': ['--auto', '--brain', '--dry-run', '--help', '--json', '--overwrite', '--refresh', '--source', '--target'],'integrity': ['--accept-pending', '--auto', '--backend', '--background', '--brain', '--confidence', '--cost', '--dry-run', '--explain', '--follow', '--fresh', '--help', '--json', '--limit', '--no-accept-pending', '--probe', '--progress-interval', '--progress-json', '--quiet', '--review-lower', '--skip-bare-tweet', '--skip-urls', '--source', '--supabase', '--timeout', '--type', '--url', '--wait'],'jobs': ['--abbrev-ref', '--access', '--acknowledge-managed', '--add', '--admin-intent', '--aliases', '--all', '--allow-empty', '--allow-shell-jobs', '--allowed-operations', '--apply', '--asof', '--auto', '--background', '--backoff-delay', '--backoff-jitter', '--backoff-type', '--batch-size', '--bound-slug-prefixes', '--brain', '--break-lock', '--by-mention', '--cached', '--catch-up', '--check', '--cli-path', '--client', '--cluster-errors', '--concurrency', '--confidence', '--confirm-destructive', '--confirm-quiesced', '--cost-estimate', '--date', '--dated-since', '--days', '--delay', '--detach', '--diff-filter', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--entities', '--exclude', '--exclude-standard', '--expect', '--expected-state', '--explain', '--facts', '--federated-read', '--filters', '--fix', '--follow', '--force', '--force-break-lock', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--fuzzy', '--grammar-diagnostics', '--group', '--hard-deadline', '--health-interval', '--help', '--http', '--id', '--idempotency-key', '--ids', '--images', '--include-deleted', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--infer-dates', '--inject-bootstrap', '--inline', '--input', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--job-id', '--job-isolation', '--json', '--kind', '--lanes', '--limit', '--lock-duration-ms', '--log-noop', '--markdown', '--max-age', '--max-attempts', '--max-cost', '--max-cost-usd', '--max-crashes', '--max-rss', '--max-sources', '--max-stalled', '--max-usd', '--max-waiting', '--mcp-only', '--min-context', '--missing-path', '--model', '--multimodal', '--name-only', '--ner', '--nice', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-confirm', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-inject', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--no-worker', '--non-interactive', '--now', '--older-than', '--once', '--only', '--order', '--others', '--output', '--override-disabled', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--pause', '--phase', '--pid-file', '--priority', '--probe', '--prune-orphans', '--purge', '--queue', '--queue-only', '--quiet', '--reason', '--rebuild', '--recent', '--redact-secrets', '--reenrich-after', '--refresh-ms', '--refresh-operations', '--replace', '--repo', '--reset-checkpoint', '--resume', '--retry-failed', '--retry-held', '--review-lower', '--row', '--scopes', '--segment-limit', '--select', '--serial', '--session', '--show-toplevel', '--sigkill-rescue', '--since', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--sleep', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--status', '--strategy', '--surface', '--swap-only', '--target', '--thin', '--thin-threshold', '--timeout', '--timeout-ms', '--to', '--trust', '--type', '--types', '--uninstall', '--updated-after', '--url', '--user', '--vectors', '--verbose', '--verify', '--version', '--watch', '--wedge-rescue', '--workers', '--working-tree', '--yes'],'lint': ['--abbrev-ref', '--accept-pending', '--adopt-slug-path', '--audit', '--autostash', '--background', '--brain', '--branch', '--cached', '--client', '--confirm-relocated-root', '--conflicts', '--dry-run', '--enable', '--exclude', '--expect-remote', '--expected-epoch', '--expected-revision', '--explain', '--ff-only', '--file', '--fix', '--follow', '--force', '--full', '--get', '--git-dir', '--git-path', '--grammar-diagnostics', '--hard', '--help', '--id', '--is-inside-work-tree', '--json', '--local', '--local-env-vars', '--manifest', '--no-accept-pending', '--no-autostash', '--no-cron', '--no-pull', '--no-tags', '--no-verify', '--only', '--pat-file', '--path', '--prefer', '--preview', '--probe', '--progress-interval', '--progress-json', '--pull', '--purge', '--push-only', '--quiet', '--rebase', '--require-clean', '--resolve', '--scopes', '--self-transfer', '--short', '--show-toplevel', '--slug', '--source', '--source-id', '--timeout', '--unset-all', '--wait', '--yes'],'loops': ['--all', '--as-of', '--brain', '--fail-fast', '--help', '--json', '--note', '--source', '--stale-ok', '--status', '--tools-json', '--top', '--type'],'lsd': ['--brain', '--force-resume', '--help', '--json', '--judge-model', '--limit', '--list-runs', '--max-cost', '--max-far-set', '--max-ideas-per-judge-call', '--max-usd', '--no-save', '--resume', '--save', '--source', '--strict-budget', '--yes'],- 'maintain': ['--adopt-columns', '--adopt-permissions', '--all', '--apply', '--assign-corpus', '--audit', '--background', '--brain', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--concurrency', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--detach', '--dim', '--dir', '--drain', '--dry-run', '--enable', '--expect', '--expected-revision', '--explain', '--facts', '--fast', '--fix', '--follow', '--force', '--force-retry', '--force-schema', '--format', '--from-meetings', '--full', '--group-by', '--hard-deadline', '--harness', '--help', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--json', '--kind', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-usd', '--migrate-legacy', '--migrate-only', '--multimodal', '--name', '--ner', '--no-autopilot-install', '--no-capture', '--no-delegate', '--no-embed', '--no-pull', '--once', '--only', '--operations', '--pack', '--page', '--parallel', '--params', '--path', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--preview', '--probe', '--probe-pglite', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--reauth', '--rebuild', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--request-id', '--reset', '--reset-default', '--resume', '--retry-failed', '--reverse', '--safe', '--scope', '--scopes', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--stale', '--status', '--supabase', '--symbol-kind', '--takes-holders', '--target', '--target-score', '--tier', '--to', '--token', '--top-k', '--type', '--url-env', '--user', '--verbose', '--version', '--window', '--workers', '--yes'],- 'maintain': ['--adopt-columns', '--adopt-permissions', '--all', '--apply', '--assign-corpus', '--audit', '--background', '--brain', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--concurrency', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--detach', '--dim', '--dir', '--drain', '--dry-run', '--enable', '--expect', '--expected-revision', '--explain', '--facts', '--fast', '--fix', '--follow', '--force', '--force-retry', '--force-schema', '--format', '--from-meetings', '--full', '--group-by', '--hard-deadline', '--harness', '--help', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--json', '--kind', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-usd', '--migrate-legacy', '--migrate-only', '--multimodal', '--name', '--ner', '--no-autopilot-install', '--no-capture', '--no-delegate', '--no-embed', '--no-pull', '--once', '--only', '--operations', '--pack', '--page', '--parallel', '--params', '--path', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--preview', '--probe', '--probe-pglite', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--reauth', '--rebuild', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--request-id', '--reset', '--reset-default', '--resume', '--retry-failed', '--reverse', '--safe', '--scope', '--scopes', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--stale', '--state', '--status', '--supabase', '--symbol-kind', '--takes-holders', '--target', '--target-score', '--to', '--token', '--top-k', '--type', '--url-env', '--user', '--verbose', '--version', '--window', '--workers', '--yes'],++ 'maintain': ['--adopt-columns', '--adopt-permissions', '--all', '--apply', '--assign-corpus', '--audit', '--background', '--brain', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--concurrency', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--detach', '--dim', '--dir', '--drain', '--dry-run', '--enable', '--expect', '--expected-revision', '--explain', '--facts', '--fast', '--fix', '--follow', '--force', '--force-retry', '--force-schema', '--format', '--from-meetings', '--full', '--group-by', '--hard-deadline', '--harness', '--help', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--json', '--kind', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-usd', '--migrate-legacy', '--migrate-only', '--multimodal', '--name', '--ner', '--no-autopilot-install', '--no-capture', '--no-delegate', '--no-embed', '--no-pull', '--once', '--only', '--operations', '--pack', '--page', '--parallel', '--params', '--path', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--preview', '--probe', '--probe-pglite', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--reauth', '--rebuild', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--request-id', '--reset', '--reset-default', '--resume', '--retry-failed', '--reverse', '--safe', '--scope', '--scopes', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--stale', '--state', '--status', '--supabase', '--symbol-kind', '--takes-holders', '--target', '--target-score', '--tier', '--to', '--token', '--top-k', '--type', '--url-env', '--user', '--verbose', '--version', '--window', '--workers', '--yes'],'mcp': ['--admin-token-file', '--agent', '--arg', '--bearer-token-env-var', '--bound-brain', '--bound-max-concurrent', '--bound-slug-prefixes', '--bound-source', '--bound-tools', '--brain', '--budget-usd-per-day', '--client', '--credentials-file', '--credentials-out', '--delegate', '--delegated-namespace', '--delegated-slug-prefixes', '--dry-run', '--enable-dcr', '--federated-read', '--flow', '--force', '--funnel', '--harness', '--header', '--help', '--if-version', '--install', '--issuer-url', '--json', '--limit', '--mcp-only', '--mcp-url', '--no-install', '--no-service', '--no-tailscale', '--oauth-client-id', '--oauth-client-secret', '--oauth-request', '--port', '--profile', '--queue', '--redirect-uri', '--remove', '--resume', '--root', '--scope', '--scopes', '--skills', '--source', '--status', '--surface', '--timeout-ms', '--token', '--token-endpoint-auth-method', '--token-ttl', '--url', '--yes'],'migrate': ['--accept-pending', '--admin-intent', '--all', '--apply', '--background', '--batch-size', '--brain', '--catch-up', '--dim', '--drain-timeout', '--dry-run', '--embedding-dimensions', '--embedding-model', '--expect', '--expected-epoch', '--expected-state', '--explain', '--facts', '--follow', '--force', '--force-retry', '--full', '--harness', '--help', '--ignore-env-override', '--images', '--include-null-signature', '--json', '--locks', '--manifest', '--max-cost', '--max-cost-usd', '--max-usd', '--no-accept-pending', '--no-embed', '--no-embedding', '--no-migrate', '--non-interactive', '--only', '--pace', '--pace-max-concurrency', '--path', '--pglite', '--plan', '--priority', '--probe', '--progress-interval', '--progress-json', '--quiet', '--replace', '--reranker', '--resume', '--retarget', '--rollback-to-source', '--scope', '--skip-verify', '--slugs', '--source', '--stale', '--status', '--timeout', '--to', '--trigger-bypass', '--trust', '--url', '--url-env', '--wait', '--yes'],'models': ['--batch', '--brain', '--concurrent', '--cycles', '--dim', '--dimensions', '--embedding-dimensions', '--embedding-model', '--help', '--json', '--limit', '--max-tokens', '--max-usd', '--output', '--receipt-dir', '--skip', '--slot-a-model', '--slot-b-model', '--slot-c-model', '--slug', '--source', '--status', '--task', '--to', '--yes'],@@@ -128,7 -128,7 +128,7 @@@'status': ['--abbrev-ref', '--acknowledge-managed', '--all', '--allow-empty', '--apply', '--brain', '--break-lock', '--cached', '--concurrency', '--confirm-destructive', '--deadline-ms', '--diff-filter', '--empty', '--exclude', '--exclude-standard', '--fast', '--filters', '--fix', '--force-break-lock', '--format', '--full', '--full-history', '--hard-deadline', '--help', '--include-gitignored', '--include-hidden', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--lanes', '--max-age', '--max-sources', '--mcp-only', '--missing-path', '--name-only', '--no-auto-embed', '--no-bulk', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--others', '--parallel', '--path', '--priority', '--quiet', '--repo', '--reset-checkpoint', '--retry-failed', '--retry-held', '--section', '--serial', '--show-toplevel', '--skip-failed', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--strategy', '--timeout', '--url', '--verify', '--watch', '--workers', '--working-tree', '--yes'],'storage': ['--brain', '--fix', '--help', '--json', '--plan', '--repo', '--restore-only', '--source', '--to'],'sweep': ['--accept-pending', '--apply', '--assign-corpus', '--background', '--batch-limit', '--brain', '--budget-ms', '--delete-brain', '--explain', '--follow', '--help', '--home', '--json', '--no-accept-pending', '--no-delegate', '--once', '--only', '--progress-interval', '--progress-json', '--quiet', '--session', '--source', '--timeout', '--wait'],- 'sync': ['--abbrev-ref', '--accept-pending', '--account', '--acknowledge-managed', '--admin-intent', '--adopt-columns', '--adopt-permissions', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--client', '--concurrency', '--confirm-destructive', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--enable', '--exclude', '--exclude-standard', '--expect', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--first-parent', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--group-by', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lanes', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--log-noop', '--manifest', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-legacy', '--migrate-only', '--missing-path', '--multimodal', '--name', '--name-only', '--name-status', '--ner', '--no-accept-pending', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-capture', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--once', '--only', '--operations', '--others', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--prefer-postgres', '--preview', '--priority', '--probe', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--quiet', '--reauth', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--replace', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--reset-default', '--restore-only', '--resume', '--retry-failed', '--retry-held', '--reverse', '--scope', '--scopes', '--self-transfer', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--tier', '--timeout', '--to', '--token', '--top-k', '--type', '--url', '--url-env', '--user', '--verbose', '--verify', '--version', '--wait', '--watch', '--window', '--workers', '--working-tree', '--yes'],- 'sync': ['--abbrev-ref', '--accept-pending', '--account', '--acknowledge-managed', '--admin-intent', '--adopt-columns', '--adopt-permissions', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--client', '--concurrency', '--confirm-destructive', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--enable', '--exclude', '--exclude-standard', '--expect', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--first-parent', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--group-by', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lanes', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--log-noop', '--manifest', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-legacy', '--migrate-only', '--missing-path', '--multimodal', '--name', '--name-only', '--name-status', '--ner', '--no-accept-pending', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-capture', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--once', '--only', '--operations', '--others', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--prefer-postgres', '--preview', '--priority', '--probe', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--quiet', '--reauth', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--replace', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--reset-default', '--restore-only', '--resume', '--retry-failed', '--retry-held', '--reverse', '--scope', '--scopes', '--self-transfer', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--state', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--timeout', '--to', '--token', '--top-k', '--type', '--url', '--url-env', '--user', '--verbose', '--verify', '--version', '--wait', '--watch', '--window', '--workers', '--working-tree', '--yes'],++ 'sync': ['--abbrev-ref', '--accept-pending', '--account', '--acknowledge-managed', '--admin-intent', '--adopt-columns', '--adopt-permissions', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--client', '--concurrency', '--confirm-destructive', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--enable', '--exclude', '--exclude-standard', '--expect', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--first-parent', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--group-by', '--hard-deadline', '--harness', '--help', '--home', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lanes', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--log-noop', '--manifest', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-legacy', '--migrate-only', '--missing-path', '--multimodal', '--name', '--name-only', '--name-status', '--ner', '--no-accept-pending', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-capture', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--once', '--only', '--operations', '--others', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--prefer-postgres', '--preview', '--priority', '--probe', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--providers', '--prune-orphans', '--query', '--queue', '--quiet', '--reauth', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--replace', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--reset-default', '--restore-only', '--resume', '--retry-failed', '--retry-held', '--reverse', '--scope', '--scopes', '--self-transfer', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--state', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--tier', '--timeout', '--to', '--token', '--top-k', '--type', '--url', '--url-env', '--user', '--verbose', '--verify', '--version', '--wait', '--watch', '--window', '--workers', '--working-tree', '--yes'],'takes': ['--accept', '--batch-size', '--before', '--brain', '--bucket-size', '--by', '--claim', '--dim', '--dir', '--domain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--evidence', '--expected-revision', '--expired', '--force', '--from-pages', '--help', '--holder', '--include-covered', '--json', '--kind', '--limit', '--max-pages', '--no-embed', '--no-embedding', '--offset', '--outcome', '--path', '--quality', '--reject', '--request-id', '--row', '--semantic', '--since', '--sort', '--source', '--source-id', '--stale', '--status', '--supabase', '--to', '--unit', '--until', '--value', '--weight', '--who', '--yes'],'think': ['--anchor', '--brain', '--calibration-holder', '--help', '--json', '--mcp-only', '--model', '--only', '--reference-date', '--rounds', '--save', '--since', '--source', '--take', '--until', '--with-calibration'],'transcripts': ['--accept-pending', '--all', '--all-discovery', '--apply', '--background', '--brain', '--days', '--dry-run', '--embed', '--explain', '--facts', '--follow', '--format', '--full', '--help', '--include-self', '--json', '--limit', '--max-bytes', '--max-cost-usd', '--no-accept-pending', '--only', '--progress-interval', '--progress-json', '--purge', '--quiet', '--since', '--source', '--source-id', '--timeout', '--wait'],diff --cc test/doctor-ops-remote-6696.test.tsindex b45d518355,0000000000..e830da0a0cmode 100644,000000..100644--- a/test/doctor-ops-remote-6696.test.ts+++ b/test/doctor-ops-remote-6696.test.ts@@@ -1,244 -1,0 +1,246 @@@+/**+ * #6696 B2: the ops tier for agents and remote clients.+ *+ * - `get_brain_health` (read scope) answers bands only, scoped to the caller's+ * sources, cached 60 s per engine and scope.+ * - `run_doctor` takes `tier: "ops"` and `only`, runs only the ops sections and+ * refuses other tiers and unknown names.+ * - The thin client's `gbrain doctor --tier ops` / `--only persistence_capacity`+ * asks the serve what it lists: run_doctor with the parameters, else the+ * read-scope bands, else the structured handoff `doctor_tier_unavailable`.+ * - `/admin/api/ops` is served from one ops run a minute.+ * - Capacity fixes verify through MCP `get_brain_health` as well as the CLI.+ */+import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';+import { createServer, type Server } from 'http';+import { randomUUID } from 'crypto';+import { PGLiteEngine } from '../src/core/pglite-engine.ts';+import type { OperationContext } from '../src/core/ops/contract.ts';+import { operations } from '../src/core/operations.ts';+import { BRAIN_HEALTH_TTL_MS, countBand, readBrainHealthBands } from '../src/commands/doctor/brain-health-bands.ts';+import { runRemoteDoctorTier } from '../src/commands/doctor/remote-tier.ts';+import { cachedOpsSnapshot, OPS_SNAPSHOT_TTL_MS } from '../src/commands/doctor/ops-snapshot.ts';+import { opsCheckNames } from '../src/commands/doctor/registry.ts';+import { capacityVerify } from '../src/core/persistence/capacity-view.ts';+import { runScopedRemoteDoctor } from '../src/core/doctor-remote-tier.ts';+import { _resetCliExitVerdictForTests, currentExitCode } from '../src/core/cli-force-exit.ts';+import type { GBrainConfig } from '../src/core/config.ts';++let engine: PGLiteEngine;++beforeAll(async () => {+ engine = new PGLiteEngine();+ await engine.connect({});+ await engine.initSchema();+ await engine.executeRaw("INSERT INTO sources(id,name) VALUES('acme-a','acme-a'),('fund-b','fund-b') ON CONFLICT DO NOTHING");+}, 120_000);++afterAll(async () => {+ await engine.disconnect();+});++async function seedFailures(source: string, count: number): Promise<void> {+ for (let i = 0; i < count; i++) {+ await engine.executeRaw(`INSERT INTO persistence_requests(principal_kind,principal_id,request_id,operation,source_id,source_incarnation,slug,digest,authority,intent_bytes,terminal_reservation,+ state,error_code,error_message,intent,completed_at,updated_at,admitter_version)+ VALUES('local_cli','fixture',$1::uuid,'put_page',$2,(SELECT incarnation FROM sources WHERE id=$2),$3,$4,'{}'::jsonb,0,0,'failed','made_up_code','fixture failure','{"content":"x"}'::jsonb,+ now()-interval '1 hour',now()-interval '1 hour','0.60.229.0')`,+ [randomUUID(), source, `notes/alice-example-${source}-${i}`, randomUUID()]);+ }+}++function ctx(o: Partial<OperationContext> = {}): OperationContext {+ return { engine, remote: true, transport: 'http', sourceId: 'default', config: {} as never,+ logger: { info() {}, warn() {}, error() {} }, ...o } as unknown as OperationContext;+}++describe('get_brain_health bands', () => {+ test('the operation is read scope, takes no parameters and is not admin-only', () => {+ const op = operations.find((o) => o.name === 'get_brain_health')!;+ expect(op.scope).toBe('read');+ expect(op.mutating).toBe(false);+ expect(Object.keys(op.params)).toEqual([]);+ const runDoctor = operations.find((o) => o.name === 'run_doctor')!;+ expect(runDoctor.scope).toBe('admin');+ expect(Object.keys(runDoctor.params)).toEqual(expect.arrayContaining(['tier', 'only']));+ });++ test('countBand never leaks an exact count', () => {+ expect([0, 1, 9, 10, 99, 100, 999, 1000, 50_000].map(countBand)).toEqual(['none', '1-9', '1-9', '10-99', '10-99', '100-999', '100-999', '1000+', '1000+']);+ expect(countBand(null)).toBe('unknown');+ expect(countBand(Number.NaN)).toBe('unknown');+ });++ test('write failures are banded per readable source; no slug, request id or exact count leaves', async () => {+ await engine.executeRaw('DELETE FROM persistence_requests');+ await seedFailures('acme-a', 12);+ await seedFailures('fund-b', 3);+ const t = Date.now() + 10 * BRAIN_HEALTH_TTL_MS;+ const acme = await readBrainHealthBands(engine, { sourceIds: ['acme-a'] }, t);+ const fund = await readBrainHealthBands(engine, { sourceIds: ['fund-b'] }, t);+ const all = await readBrainHealthBands(engine, {}, t);+ expect(acme.write_failures.band).toBe('10-99');+ expect(fund.write_failures.band).toBe('1-9');+ expect(all.write_failures.band).toBe('10-99');+ expect(['ok', 'low', 'critical', 'unknown']).toContain(acme.capacity.band);+ expect(acme.capacity.forecast).toBe('unavailable');++ expect(['none', '1-9', '10-99', '100-999', '1000+', 'unknown']).toContain(acme.unsearchable.band);++ expect(typeof acme.unsearchable.lower_bound).toBe('boolean');+ expect(acme.host_command).toEqual(['gbrain', 'doctor', '--tier', 'ops', '--json']);+ const wire = JSON.stringify([acme, fund, all]);+ expect(wire).not.toMatch(/alice-example|"12"|:12\b|:15\b|:3\b/);+ });++ test('cached 60 s per engine and scope', async () => {+ const t = Date.now() + 100 * BRAIN_HEALTH_TTL_MS;+ const first = readBrainHealthBands(engine, { sourceIds: ['acme-a'] }, t);+ expect(readBrainHealthBands(engine, { sourceIds: ['acme-a'] }, t + BRAIN_HEALTH_TTL_MS - 1)).toBe(first);+ expect(readBrainHealthBands(engine, { sourceIds: ['fund-b'] }, t)).not.toBe(first);+ expect(readBrainHealthBands(engine, { sourceIds: ['acme-a'] }, t + BRAIN_HEALTH_TTL_MS)).not.toBe(first);+ await first;+ });++ test('the handler scopes to the caller grant', async () => {+ const op = operations.find((o) => o.name === 'get_brain_health')!;+ const out = await op.handler(ctx({ sourceId: 'fund-b' }), {}) as { write_failures: { band: string } };+ expect(['1-9', 'unknown']).toContain(out.write_failures.band);+ });++ test('capacity fixes verify through MCP get_brain_health and the CLI', () => {+ expect(capacityVerify()).toMatchObject({ argv: ['gbrain', 'doctor', '--only', 'persistence_capacity', '--json'], mcp: { tool: 'get_brain_health', arguments: {} } });+ });+});++describe('run_doctor tier / only', () => {+ test('tier ops runs only the ops sections on the serve', async () => {+ const report = await runRemoteDoctorTier(ctx({ remote: false }), { tier: 'ops' });+ const ops = opsCheckNames();+ expect(report.checks.length).toBeGreaterThan(0);+ expect(report.checks.every((c) => ops.has(c.name) || c.name === 'connection')).toBe(true);+ expect(report.tier).toBe('ops');+ expect(report.complete).toBe(true);+ });++ test('only narrows to the named section', async () => {+ const report = await runRemoteDoctorTier(ctx(), { only: ['persistence_capacity'] });+ expect(report.checks.map((c) => c.name)).toEqual(['persistence_capacity']);+ });++ test('other tiers and unknown names are invalid_params', async () => {+ await expect(runRemoteDoctorTier(ctx(), { tier: 'deep' })).rejects.toMatchObject({ code: 'invalid_params' });+ await expect(runRemoteDoctorTier(ctx(), { only: ['no_such_check'] })).rejects.toMatchObject({ code: 'invalid_params' });+ await expect(runRemoteDoctorTier(ctx(), { only: [] })).rejects.toMatchObject({ code: 'invalid_params' });+ });+});++describe('/admin/api/ops snapshot', () => {+ test('one ops run per engine a minute', async () => {+ const t = Date.now();+ const first = cachedOpsSnapshot(engine, t);+ expect(cachedOpsSnapshot(engine, t + OPS_SNAPSHOT_TTL_MS - 1)).toBe(first);+ const snap = await first;+ expect(snap.report.tier).toBe('ops');+ expect(cachedOpsSnapshot(engine, t + OPS_SNAPSHOT_TTL_MS)).not.toBe(first);+ });+});++// ---- thin client against a scripted serve ----------------------------------+let server: Server;+let port: number;+let listed: Array<{ name: string; inputSchema: Record<string, unknown> }> = [];+let results: Record<string, unknown> = {};+let calls: Array<{ name: string; args: unknown }> = [];++describe('thin-client doctor --tier ops / --only routing', () => {+ beforeAll(async () => {+ server = createServer((req, res) => {+ if (req.url === '/.well-known/oauth-authorization-server') {+ res.setHeader('Content-Type', 'application/json');+ res.end(JSON.stringify({ token_endpoint: `http://localhost:${port}/token` }));+ return;+ }+ if (req.url === '/token') {+ res.setHeader('Content-Type', 'application/json');+ res.end(JSON.stringify({ access_token: `t-${randomUUID()}`, token_type: 'bearer', expires_in: 3600, scope: 'read' }));+ return;+ }+ let body = '';+ req.on('data', (c) => { body += c; });+ req.on('end', () => {+ const msg = JSON.parse(body || '{}') as { id?: number; method?: string; params?: { name?: string; arguments?: unknown } };+ if (msg.id === undefined) { res.statusCode = 202; res.end(); return; }+ res.setHeader('Content-Type', 'application/json');+ const reply = (result: unknown) => res.end(JSON.stringify({ jsonrpc: '2.0', id: msg.id, result }));+ if (msg.method === 'initialize') return reply({ protocolVersion: '2025-03-26', capabilities: { tools: {} }, serverInfo: { name: 'fixture', version: '1' } });+ if (msg.method === 'tools/list') return reply({ tools: listed });+ if (msg.method === 'tools/call') {+ calls.push({ name: msg.params!.name!, args: msg.params!.arguments });+ return reply({ content: [{ type: 'text', text: JSON.stringify(results[msg.params!.name!] ?? {}) }] });+ }+ reply({});+ });+ });+ await new Promise<void>((r) => server.listen(0, '127.0.0.1', () => r()));+ port = (server.address() as { port: number }).port;+ });+ afterAll(async () => { await new Promise<void>((r) => server.close(() => r())); });++ let out = '';+ const restore: Array<() => void> = [];+ beforeEach(() => {+ listed = []; results = {}; calls = []; out = '';+ _resetCliExitVerdictForTests();+ const so = process.stdout.write.bind(process.stdout), se = process.stderr.write.bind(process.stderr), log = console.log;+ process.stdout.write = ((s: string) => { out += s; return true; }) as typeof process.stdout.write;+ process.stderr.write = ((s: string) => { out += s; return true; }) as typeof process.stderr.write;+ console.log = (...a: unknown[]) => { out += a.join(' ') + '\n'; };+ restore.push(() => { process.stdout.write = so; process.stderr.write = se; console.log = log; });+ });+ afterEach(() => { while (restore.length) restore.pop()!(); _resetCliExitVerdictForTests(); });++ const config = (): GBrainConfig => ({ engine: 'postgres', remote_mcp: { issuer_url: `http://localhost:${port}`, mcp_url: `http://localhost:${port}/mcp`,+ oauth_client_id: `client-${randomUUID()}`, oauth_client_secret: 's' } } as GBrainConfig);+ const tool = (name: string, props: string[] = []) => ({ name, inputSchema: { type: 'object', properties: Object.fromEntries(props.map((p) => [p, { type: 'string' }])) } });+ const bands = { schema_version: 1, status: 'attention', capacity: { band: 'low', days: '7_to_30', max_pct_band: '80-95', forecast: 'available' },+ write_failures: { band: '1-9', active_blockers: 'none', window_days: 30 }, host_command: ['gbrain', 'doctor', '--tier', 'ops', '--json'] };++ test('an admin token on a current serve: run_doctor with tier ops', async () => {+ listed = [tool('run_doctor', ['tier', 'only']), tool('get_brain_health')];+ results.run_doctor = { status: 'healthy', tier: 'ops', checks: [{ name: 'persistence_capacity', status: 'ok', message: 'fine' }] };+ await runScopedRemoteDoctor(config(), { tier: 'ops', only: null, json: true, label: '--tier ops' });+ expect(calls).toEqual([{ name: 'run_doctor', args: { tier: 'ops' } }]);+ expect(JSON.parse(out)).toMatchObject({ tier: 'ops', checks: [{ name: 'persistence_capacity' }] });+ expect(currentExitCode()).toBe(0);+ });++ test('a read token (run_doctor not listed): --only persistence_capacity answers from get_brain_health bands', async () => {+ listed = [tool('get_brain_health')];+ results.get_brain_health = bands;+ await runScopedRemoteDoctor(config(), { only: new Set(['persistence_capacity']), json: true, label: '--only persistence_capacity' });+ expect(calls.map((c) => c.name)).toEqual(['get_brain_health']);+ const report = JSON.parse(out);+ expect(report).toMatchObject({ mode: 'bands', source: 'get_brain_health', status: 'warnings' });+ expect(report.checks).toEqual([expect.objectContaining({ name: 'persistence_capacity', status: 'warn', details: expect.objectContaining({ band: 'low' }) })]);+ });++ test('an older serve: structured handoff doctor_tier_unavailable, never the full report', async () => {+ listed = [tool('run_doctor'), tool('get_brain_identity')];+ await runScopedRemoteDoctor(config(), { tier: 'ops', only: null, json: true, label: '--tier ops' });+ expect(calls).toEqual([]);+ expect(out).toContain('doctor_tier_unavailable');+ expect(out).toContain('gbrain doctor --tier ops --json');+ expect(currentExitCode()).not.toBe(0);+ });++ test('a read token asking for a check the bands do not cover: handoff', async () => {+ listed = [tool('get_brain_health')];+ await runScopedRemoteDoctor(config(), { only: new Set(['receipt_compaction']), json: true, label: '--only receipt_compaction' });+ expect(calls).toEqual([]);+ expect(out).toContain('doctor_tier_unavailable');+ });++ test('--tier deep is never served remotely', async () => {+ await runScopedRemoteDoctor(config(), { tier: 'deep', only: null, json: true, label: '--tier deep' });+ expect(out).toContain('doctor_tier_unavailable');+ });+});diff --cc test/doctor-tier-6696.test.tsindex 99253e7134,0000000000..8cecc3b7e3mode 100644,000000..100644--- a/test/doctor-tier-6696.test.ts+++ b/test/doctor-tier-6696.test.ts@@@ -1,165 -1,0 +1,165 @@@+/**+ * #6696 B1: doctor tiers and budgets (in-process, PGLite).+ *+ * - `--tier ops` runs only the ops sections plus the connection lane, reads no+ * page aggregate (getHealth / findOrphanPages / getStats throw if called) on a+ * 2,000-page brain, reports PGLite-skipped sections as `not_applicable` info,+ * and stays complete.+ * - The default run puts every ops section before the slower checks and reads+ * getHealth once.+ * - A section past the deadline (or the per-entry budget) is unknown with+ * `reason: budget`, `exact: false`, `elapsed_ms`; the report says+ * `complete: false` and names it.+ * - `orphan_ratio` estimates above `doctor.orphan_ratio.full_scan_max_pages`+ * and scans fully under `--tier deep`.+ * - A connect the deadline ended reports every check of the tier as unknown.+ */+import { afterAll, beforeAll, beforeEach, describe, expect, test } from 'bun:test';+import { PGLiteEngine } from '../src/core/pglite-engine.ts';+import type { BrainEngine } from '../src/core/engine.ts';+import { sqlQueryForEngine } from '../src/core/sql-query.ts';+import { resetPgliteState } from './helpers/reset-pglite.ts';+import { buildChecks, computeDoctorReport, doctorRunSummary, type Check } from '../src/commands/doctor.ts';+import { DOCTOR_CHECK_REGISTRY, opsCheckNames } from '../src/commands/doctor/registry.ts';+import { DoctorBudgetError, parseBudgetMs, parseDoctorTier, startDoctorDeadline, OPS_BUDGET_MS_DEFAULT } from '../src/commands/doctor/budget.ts';+import { ORPHAN_FULL_SCAN_KEY } from '../src/commands/doctor/checks/orphan-estimate.ts';++let engine: PGLiteEngine;++beforeAll(async () => {+ engine = new PGLiteEngine();+ await engine.connect({ database_url: '' });+ await engine.initSchema();+});++afterAll(async () => {+ await engine.disconnect();+});++beforeEach(async () => {+ await resetPgliteState(engine);+});++async function insertNotes(count: number, prefix = 'notes/acme-example'): Promise<void> {+ const sql = sqlQueryForEngine(engine);+ await sql`+ INSERT INTO pages (slug, source_id, type, title, compiled_truth, frontmatter, content_hash, created_at, updated_at)+ SELECT ${prefix}::text || '-' || g, 'default', 'note', 'Note ' || g, '', '{}', ${prefix}::text || '-h' || g, now(), now()+ FROM generate_series(1, ${count}::int) AS g+ `;+}++/** The engine with the named methods throwing, and executeRaw optionally delayed for statements matching `slow`. */+function guarded(throwing: string[], slow?: { match: RegExp; ms: number }, calls?: Record<string, number>): BrainEngine {+ return new Proxy(engine, {+ get(target, key) {+ if (typeof key === 'string' && throwing.includes(key)) return () => { throw new Error(`${key} must not run in this tier`); };+ if (key === 'getHealth' && calls) return (...a: unknown[]) => { calls.getHealth = (calls.getHealth ?? 0) + 1; return target.getHealth(...(a as [])); };+ if (key === 'executeRaw' && slow) {+ return async (sql: string, params?: unknown[], opts?: unknown) => {+ if (slow.match.test(sql)) await new Promise((r) => setTimeout(r, slow.ms));+ return target.executeRaw(sql, params, opts as never);+ };+ }+ const value = Reflect.get(target, key, target);+ return typeof value === 'function' ? value.bind(target) : value;+ },+ }) as BrainEngine;+}++const names = (checks: Check[]) => checks.map((c) => c.name);++describe('#6696 B1 doctor tiers', () => {+ test('parses --tier and --budget-ms; ops defaults to a 4000 ms deadline, others to none', () => {+ expect(parseDoctorTier([])).toBe('standard');+ expect(parseDoctorTier(['--tier', 'ops'])).toBe('ops');+ expect(parseDoctorTier(['--tier=deep'])).toBe('deep');+ expect(() => parseDoctorTier(['--tier', 'fast'])).toThrow(/Unknown doctor tier/);+ expect(parseBudgetMs(['--tier', 'ops'], 'ops')).toBe(OPS_BUDGET_MS_DEFAULT);+ expect(parseBudgetMs([], 'standard')).toBeNull();+ expect(parseBudgetMs(['--budget-ms', '900'], 'standard')).toBe(900);+ expect(() => parseBudgetMs(['--budget-ms', '0'], 'ops')).toThrow(/positive integer/);+ });++ test('--tier ops on a 2,000-page PGLite brain: only ops sections, no page aggregates, complete, PGLite skips are not_applicable info', async () => {+ await insertNotes(2000);+ const args = ['--json', '--tier', 'ops'];+ const deadline = startDoctorDeadline(args);+ const checks = await buildChecks(guarded(['getHealth', 'findOrphanPages', 'getStats']), args, undefined, undefined, deadline);+ const ops = opsCheckNames();+ expect(names(checks).filter((n) => n !== 'connection').every((n) => ops.has(n))).toBe(true);- for (const n of ['persistence_capacity', 'persistence_terminal_failures', 'managed_sync_not_moving', 'receipt_compaction', 'serve_build_drift', 'schema_pack_consistency']) {++ for (const n of ['persistence_capacity', 'persistence_terminal_failures', 'managed_sync_not_moving', 'receipt_compaction', 'serve_build_drift', 'schema_pack_consistency', 'embedding_state']) {+ expect(names(checks)).toContain(n);+ }+ expect(checks.filter((c) => c.status !== 'ok')).toEqual([]);+ const skipped = checks.filter((c) => c.details?.health === 'not_applicable');- expect(skipped.map((c) => c.name).sort()).toEqual(['managed_sync_not_moving', 'persistence_terminal_failures', 'schema_pack_consistency']);++ expect(skipped.map((c) => c.name).sort()).toEqual(['embedding_state', 'managed_sync_not_moving', 'persistence_terminal_failures', 'schema_pack_consistency']);+ for (const c of skipped) expect(c.severity).toBe('info');+ const report = computeDoctorReport(checks, { engine: 'pglite', run: doctorRunSummary(args, deadline) });+ expect(report.tier).toBe('ops');+ expect(report.complete).toBe(true);+ expect(report.unknown_sections).toEqual([]);+ expect(report.budget_ms).toBe(OPS_BUDGET_MS_DEFAULT);+ expect(checks.every((c) => typeof c.elapsed_ms === 'number')).toBe(true);+ });++ test('the default run puts every ops section before the slower checks and reads getHealth once', async () => {+ const calls: Record<string, number> = {};+ const checks = await buildChecks(guarded([], undefined, calls), ['--json', '--scope=brain']);+ const order = names(checks);+ const ops = [...opsCheckNames()].filter((n) => order.includes(n));+ const firstSlow = order.indexOf('pgvector');+ expect(firstSlow).toBeGreaterThan(0);+ for (const n of ops) expect(order.indexOf(n)).toBeLessThan(firstSlow);+ expect(calls.getHealth).toBe(1);+ expect(checks.every((c) => typeof c.elapsed_ms === 'number')).toBe(true);+ // The registry tags exactly the plan's ops sections.+ expect(DOCTOR_CHECK_REGISTRY.filter((e) => e.tier === 'ops').map((e) => e.name)).toEqual(- expect.arrayContaining(['persistence_capacity', 'persistence_terminal_failures', 'managed_sync_not_moving', 'receipt_compaction', 'serve_build_drift', 'schema_pack_consistency']));++ expect.arrayContaining(['persistence_capacity', 'persistence_terminal_failures', 'managed_sync_not_moving', 'receipt_compaction', 'serve_build_drift', 'schema_pack_consistency', 'embedding_state']));+ });++ test('a section past the --budget-ms deadline is unknown (reason budget) and the report is incomplete', async () => {+ const args = ['--json', '--tier', 'ops', '--budget-ms', '150'];+ const deadline = startDoctorDeadline(args);+ const started = Date.now();+ const checks = await buildChecks(guarded([], { match: /FROM persistence_counters/, ms: 600 }), args, undefined, undefined, deadline);+ expect(Date.now() - started).toBeLessThan(600);+ const capacity = checks.find((c) => c.name === 'persistence_capacity')!;+ expect(capacity.status).toBe('warn');+ expect(capacity.details).toMatchObject({ health: 'unknown', reason: 'budget', exact: false });+ expect(typeof capacity.elapsed_ms).toBe('number');+ expect(capacity.fix).toBeDefined();+ const report = computeDoctorReport(checks, { engine: 'pglite', run: doctorRunSummary(args, deadline) });+ expect(report.complete).toBe(false);+ expect(report.unknown_sections).toContain('persistence_capacity');+ });++ test('the per-entry budget (doctor.entry_budget_ms) bounds a standard-tier entry', async () => {+ await engine.setConfig('doctor.entry_budget_ms', '100');+ const checks = await buildChecks(guarded([], { match: /FROM persistence_counters/, ms: 500 }), ['--json', '--scope=brain', '--only', 'persistence_capacity']);+ const capacity = checks.find((c) => c.name === 'persistence_capacity')!;+ expect(capacity.details).toMatchObject({ health: 'unknown', reason: 'budget', budget_ms: 100 });+ });++ test('a connect the deadline ended: connection and every ops section are unknown, nothing claims clear', async () => {+ const args = ['--json', '--tier', 'ops', '--budget-ms', '50'];+ const deadline = startDoctorDeadline(args);+ const checks = await buildChecks(null, args, 'config-file', new DoctorBudgetError(60), deadline);+ const connection = checks.find((c) => c.name === 'connection')!;+ expect(connection.details).toMatchObject({ health: 'unknown', reason: 'budget' });+ for (const n of opsCheckNames()) expect(checks.find((c) => c.name === n)?.details?.health).toBe('unknown');+ expect(computeDoctorReport(checks, { run: doctorRunSummary(args, deadline) }).complete).toBe(false);+ });++ test('orphan_ratio estimates above the full-scan cutoff in standard and scans fully under --tier deep', async () => {+ await insertNotes(400, 'people/alice-example');+ await engine.executeRaw(`UPDATE pages SET type = 'person' WHERE slug LIKE 'people/%'`);+ await engine.setConfig(ORPHAN_FULL_SCAN_KEY, '100');+ const standard = (await buildChecks(engine, ['--json', '--scope=brain', '--only', 'orphan_ratio'])).find((c) => c.name === 'orphan_ratio')!;+ expect(standard.details).toMatchObject({ estimated: true, exact: false, full_scan_max_pages: 100 });+ expect(standard.message).toMatch(/estimated/);+ const deep = (await buildChecks(engine, ['--json', '--scope=brain', '--tier', 'deep', '--only', 'orphan_ratio'])).find((c) => c.name === 'orphan_ratio')!;+ expect(deep.details?.estimated).toBeUndefined();+ expect(deep.message).toMatch(/400\/400 linkable pages/);+ });+});diff --cc test/fixtures/goldens/doctor/hot-checks-pglite-json.jsonindex 31b03ab795,31b03ab795..d0573537fe--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json@@@ -15,13 -15,13 +15,14 @@@],"category_scores": {"brain": 45,-- "meta": 100,++ "meta": 95,"ops": 100,"skill": 95},"checks": [{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skills, all reachable","name": "resolver_health","status": "ok"@@@ -36,6 -36,6 +37,7 @@@"path": "pglite — serve IPC socket not present","policy_skill_installed": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "user","consent": [@@@ -59,30 -59,30 +61,35 @@@"channels": {},"window_days": 7},++ "elapsed_ms": "<volatile>","message": "no push-context activity in 7 days — if a hook adapter is installed, confirm its registration landed and the harness session was RESTARTED (hooks snapshot at session start); a serve older than this build logs NOTHING for the hook lane — restart serve on the new build to activate the feedback loop","name": "volunteer_channels","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","name": "memory_verbs_usage","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1/1 skills pass","name": "skill_conformance","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skill(s) compliant or exempt","name": "skill_brain_first","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "No skills.lock.json in <home>/skills — integrity check not applicable","name": "skills_manifest_integrity","status": "ok"@@@ -158,6 -158,6 +165,7 @@@"webhook-transforms"]},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -165,6 -165,6 +173,7 @@@},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no installed skills declare preconditions","name": "skill_preconditions","status": "ok"@@@ -176,6 -176,6 +185,7 @@@"out_of_band_settable": true,"reason": "disabled"},++ "elapsed_ms": "<volatile>","message": "memorable relay off (default)","name": "memorable_relay_health","status": "ok"@@@ -209,12 -209,12 +219,14 @@@"ttl_valid": true,"visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"},++ "elapsed_ms": "<volatile>","message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient","name": "memory_writeback","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat connectors configured (optional).","name": "connectors","status": "ok"@@@ -228,6 -228,6 +240,7 @@@"keys": [],"threshold": 3},++ "elapsed_ms": "<volatile>","message": "No dream key died 3+ times in 24h","name": "dream_paid_loop","status": "ok"@@@ -243,6 -243,6 +256,7 @@@"0.53.0"]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -275,18 -275,18 +289,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "mode=notify","name": "self_upgrade_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Bun <bun-version> (minimum 1.4.0)","name": "bun_runtime","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","name": "nightly_quality_probe_health","status": "ok"@@@ -297,12 -297,12 +314,14 @@@"kinds": [],"schema_version": 1},++ "elapsed_ms": "<volatile>","message": "no extractions in last 7 days","name": "extract_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","name": "conversation_facts_backlog","status": "ok"@@@ -314,6 -314,6 +333,7 @@@"known_approximation": "page backlog only; transcript corpus not counted","pack_declares_phase": false},++ "elapsed_ms": "<volatile>","message": "no pages awaiting atom extraction","name": "extract_atoms_backlog","status": "ok"@@@ -328,36 -328,36 +348,42 @@@"source_gone": 0,"total_atoms": 0},++ "elapsed_ms": "<volatile>","message": "no atoms to check","name": "atom_provenance_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No conversation-type pages — coverage check not applicable","name": "conversation_format_coverage","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No progressive-batch operations in the last 7 days","name": "progressive_batch_audit_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`","name": "conversation_parser_probe_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "gbrain home is outside any enclosing git worktree.","name": "home_dir_in_worktree","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default","name": "default_source_local_path","status": "ok"@@@ -372,6 -372,6 +398,7 @@@"unreadable_sources": [],"walk_truncated": false},++ "elapsed_ms": "<volatile>","message": "No cross-source slug drift detected.","name": "multi_source_drift","status": "ok"@@@ -388,6 -388,6 +415,7 @@@"embedding_model": "voyage:voyage-4","shadows": []},++ "elapsed_ms": "<volatile>","message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.","name": "embedding_key_source","status": "ok"@@@ -398,6 -398,6 +426,7 @@@"decision": null,"provider_env": []},++ "elapsed_ms": "<volatile>","message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.","name": "provider_consent","readiness_state": "not_applicable",@@@ -409,6 -409,6 +438,7 @@@"details": {"reason": "no_harness_detected"},++ "elapsed_ms": "<volatile>","fix": {"actor": "user","consent": [@@@ -436,24 -436,24 +466,263 @@@"json_document_missing": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).","name": "agent_contract","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Connected, 20 pages","name": "connection","status": "ok"},{"category": "ops",++ "details": {++ "commands": [],++ "exact": true,++ "inspected": 2,++ "resources": [],++ "truncated": false++ },++ "elapsed_ms": "<volatile>",++ "message": "Managed write capacity is below 80% of every cumulative limit.",++ "name": "persistence_capacity",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "active_blockers": [],++ "config": {++ "receipt_retention_days": 30,++ "spike_factor": {++ "key": "persistence.terminal_failures.spike_factor",++ "value": 3++ },++ "spike_min": {++ "key": "persistence.terminal_failures.spike_min",++ "value": 25++ },++ "window_clamped": false,++ "window_days": {++ "key": "persistence.terminal_failures.window_days",++ "value": 7++ }++ },++ "count": 0,++ "defects": [],++ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",++ "historical_rows": 0,++ "new_last_24h": 0,++ "sources": [],++ "spike": {++ "daily_7d": [++ 0,++ 0,++ 0,++ 0,++ 0,++ 0,++ 0++ ],++ "last_24h": 0,++ "median_7d": 0,++ "spiking": false++ },++ "unresolved": {++ "distinct_intents": 0,++ "distinct_slugs": 0,++ "oldest_age_seconds": null,++ "rows": 0++ },++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No terminal write failures in the last 7 d.",++ "name": "persistence_terminal_failures",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",++ "parked": 0,++ "sources": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No managed sync is pending.",++ "name": "managed_sync_not_moving",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "docs": "docs/guides/troubleshooting.md#receipt-compaction",++ "recorded": false++ },++ "elapsed_ms": "<volatile>",++ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",++ "name": "receipt_compaction",++ "readiness_state": "not_applicable",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#serve-build-drift"++ },++ "elapsed_ms": "<volatile>",++ "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",++ "name": "serve_build_drift",++ "status": "ok"++ },++ {++ "category": "meta",++ "details": {++ "code": "page_type_undeclared",++ "docs": "docs/architecture/schema-packs.md#undeclared-page-types",++ "per_source": [++ {++ "pack": "gbrain-base-v2",++ "source_id": "notes",++ "total": 19,++ "undeclared": 1,++ "undeclared_types": [++ {++ "count": 1,++ "type": "2024"++ }++ ],++ "untyped": 0++ },++ {++ "pack": "gbrain-base-v2",++ "source_id": "plain",++ "total": 1,++ "undeclared": 0,++ "undeclared_types": [],++ "untyped": 0++ }++ ],++ "unresolved_sources": []++ },++ "elapsed_ms": "<volatile>",++ "fix_unavailable_reason": "unstructured",++ "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn"++ },++ {++ "category": "brain",++ "details": {++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 1,++ "keyword_only": 0,++ "pending": 23,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 23,++ "embedded": 0,++ "ratio": 0++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 1,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }++ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024",++ "--path",++ "<home>/.gbrain/brain.pglite"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024 --path <home>/.gbrain/brain.pglite",++ "consent": [++ "credentials",++ "paid"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for the PGLite brain at <home>/.gbrain/brain.pglite. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."++ },++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "pages has the UNIQUE(source_id, slug) upsert arbiter","name": "pages_upsert_arbiter","status": "ok"@@@ -464,24 -464,24 +733,12 @@@"readiness": "projection_pending","ready": false},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Visible pages have missing or stale text projections; search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.","name": "text_projection_readiness","status": "warn"},-- {-- "category": "ops",-- "details": {-- "commands": [],-- "exact": true,-- "inspected": 2,-- "resources": [],-- "truncated": false-- },-- "message": "Managed write capacity is below 80% of every cumulative limit.",-- "name": "persistence_capacity",-- "status": "ok"-- },{"category": "brain","details": {@@@ -491,6 -491,6 +748,7 @@@"parked_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No Git or withdrawal effect is parked.","name": "parked_effects","status": "ok"@@@ -500,6 -500,6 +758,7 @@@"details": {"refreshes": []},++ "elapsed_ms": "<volatile>","message": "No worktree refresh is stuck.","name": "worktree_refresh_stuck","status": "ok"@@@ -511,6 -511,6 +770,7 @@@"page_child_source_columns": [],"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"},++ "elapsed_ms": "<volatile>","message": "Guarded tables carry only the columns gbrain creates.","name": "managed_guard_schema_drift","status": "ok"@@@ -524,48 -524,48 +784,56 @@@"unclassified_p0001": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No write was refused by a database guard in the last 7 days.","name": "publication_refusals","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "links_link_source_check has the v114 kebab-case gate","name": "links_link_source_check","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite at 20 pages — comfortable below the 1000-page threshold","name": "pglite_scale","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Skipped (PGLite — no PostgREST exposure, RLS not applicable)","name": "rls","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Version <latest> (latest: <latest>)","name": "schema_version","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "1115 column(s) verified against live schema","name": "schema_columns","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Skipped (PGLite — no event trigger support)","name": "rls_event_trigger","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -615,6 -615,6 +883,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -664,24 -664,24 +933,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Registry healthy: 1 columns (embedding_image); primary embeddings disabled","name": "embedding_column_registry","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding env overrides set","name": "embedding_env_override","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding migration in flight","name": "embedding_migration_state","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.","name": "supersession_calibration","readiness_state": "not_applicable",@@@ -690,24 -690,24 +963,28 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat_fallback_chain is set: every chat call uses only its own model.","name": "chat_fallback_chain","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.","name": "behavior_changes","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale","name": "graph_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -741,24 -741,24 +1018,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.","name": "orphan_ratio","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No by-mention links in this brain.","name": "stale_mentions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No orphaned timeline rows across 4 page(s).","name": "timeline_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No slug collisions across 3 source checkout(s).","name": "slug_collisions","status": "ok"@@@ -774,6 -774,6 +1055,7 @@@"repair": "timeline","truncated": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -815,6 -815,6 +1097,7 @@@"unstamped_atoms": 0,"unstamped_concepts": 0},++ "elapsed_ms": "<volatile>","message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.","name": "derived_visibility","status": "ok"@@@ -828,6 -828,6 +1111,7 @@@"repair": "safe-chunks","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every re-sealable page is at the safe-chunk index version.","name": "safe_index_pending","status": "ok"@@@ -840,6 -840,6 +1124,7 @@@"pages_pending": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No page waits for the credential-safe re-chunk.","name": "credential_projection_pending","status": "ok"@@@ -854,6 -854,6 +1139,7 @@@"retries": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No orphan connector checkpoint rows older than 7 days.","name": "connector_checkpoints","status": "ok"@@@ -880,6 -880,6 +1166,7 @@@],"repair": "request-indexes"},++ "elapsed_ms": "<volatile>","message": "Managed sync request indexes are valid.","name": "persistence_request_indexes","status": "ok"@@@ -918,6 -918,6 +1205,7 @@@"verify": "gbrain doctor --json (check persistence_request_growth)","window_days": 7},++ "elapsed_ms": "<volatile>","message": "22 request row(s); no scope exhausts its lifetime request IDs within 90 days at its last-7-day rate.","name": "persistence_request_growth","status": "ok"@@@ -937,6 -937,6 +1225,7 @@@},"stalls": []},++ "elapsed_ms": "<volatile>","message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).","name": "persistence_write_stall","status": "ok"@@@ -950,62 -950,62 +1239,11 @@@"repair": "failed-writes","writes": []},++ "elapsed_ms": "<volatile>","message": "Every caller write with a retained receipt committed or was superseded.","name": "lost_caller_writes","status": "ok"},-- {-- "category": "ops",-- "details": {-- "active_blockers": [],-- "config": {-- "receipt_retention_days": 30,-- "spike_factor": {-- "key": "persistence.terminal_failures.spike_factor",-- "value": 3-- },-- "spike_min": {-- "key": "persistence.terminal_failures.spike_min",-- "value": 25-- },-- "window_clamped": false,-- "window_days": {-- "key": "persistence.terminal_failures.window_days",-- "value": 7-- }-- },-- "count": 0,-- "defects": [],-- "docs": "docs/guides/troubleshooting.md#terminal-write-failures",-- "historical_rows": 0,-- "new_last_24h": 0,-- "sources": [],-- "spike": {-- "daily_7d": [-- 0,-- 0,-- 0,-- 0,-- 0,-- 0,-- 0-- ],-- "last_24h": 0,-- "median_7d": 0,-- "spiking": false-- },-- "unresolved": {-- "distinct_intents": 0,-- "distinct_slugs": 0,-- "oldest_age_seconds": null,-- "rows": 0-- },-- "window_days": 7-- },-- "message": "No terminal write failures in the last 7 d.",-- "name": "persistence_terminal_failures",-- "status": "ok"-- },{"category": "ops","details": {@@@ -1013,6 -1013,6 +1251,7 @@@"configured": "5min","docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"},++ "elapsed_ms": "<volatile>","message": "PGLite has no session to time out.","name": "persistence_session_timeouts","status": "ok"@@@ -1024,6 -1024,6 +1263,7 @@@"held": 0,"sources": []},++ "elapsed_ms": "<volatile>","message": "No connector items are held.","name": "connector_held_items","status": "ok"@@@ -1090,6 -1090,6 +1330,7 @@@}]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1130,6 -1130,6 +1371,7 @@@"docs": "docs/guides/repair.md#held-files","hooks": []},++ "elapsed_ms": "<volatile>","message": "No outdated gbrain frontmatter pre-commit hook is installed.","name": "frontmatter_hook","status": "ok"@@@ -1143,6 -1143,6 +1385,7 @@@"repair": "orphan-bindings","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every persistence source binding belongs to an existing source.","name": "orphan_persistence_bindings","status": "ok"@@@ -1154,6 -1154,6 +1397,7 @@@"docs": "docs/guides/write-refusals.md#foreign-ownership-marker","markers": []},++ "elapsed_ms": "<volatile>","message": "Every ownership marker beside a source checkout belongs to this brain.","name": "foreign_ownership_marker","status": "ok"@@@ -1164,6 -1164,6 +1408,7 @@@"sources": [],"total": 0},++ "elapsed_ms": "<volatile>","message": "No page was written database-only to an unbound source.","name": "unbound_source","status": "ok"@@@ -1193,6 -1193,6 +1438,7 @@@"truncated": false,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.","name": "writer_version","status": "ok"@@@ -1205,6 -1205,6 +1451,7 @@@"truncated": false,"unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No session corpus is configured; nothing to classify.","name": "self_capture","status": "ok"@@@ -1215,6 -1215,6 +1462,7 @@@"outcome": "skipped","reason": "pglite"},++ "elapsed_ms": "<volatile>","message": "Skipped: PGLite runs vector search in-process; the plan check applies to Postgres brains.","name": "vector_plan","status": "ok"@@@ -1225,6 -1225,6 +1473,7 @@@"outcome": "skipped","reason": "pglite"},++ "elapsed_ms": "<volatile>","message": "Skipped: PGLite runs keyword search with no statement timeout; the canary applies to Postgres brains.","name": "keyword_plan","status": "ok"@@@ -1243,6 -1243,6 +1492,7 @@@"stale_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No committed write has a stale queued or failed embedding effect.","name": "stale_embedding_effects","status": "ok"@@@ -1255,6 -1255,6 +1505,7 @@@"repair": "google-file-modes","sources": []},++ "elapsed_ms": "<volatile>","message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.","name": "google_file_modes","status": "ok"@@@ -1268,6 -1268,6 +1519,7 @@@"excluded": 0,"repair": "extractor-facts"},++ "elapsed_ms": "<volatile>","message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.","name": "extractor_facts_expired","status": "ok"@@@ -1280,6 -1280,6 +1532,7 @@@"evidenced": 0,"repair": "conversation-labels"},++ "elapsed_ms": "<volatile>","message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).","name": "conversation_label_facts","status": "ok"@@@ -1295,6 -1295,6 +1548,7 @@@"stale": 0,"unstamped": 0},++ "elapsed_ms": "<volatile>","message": "No conversation extraction outcome predates extractor version 1.","name": "conversation_outcomes_stale","status": "ok"@@@ -1309,6 -1309,6 +1563,7 @@@"repair": "captured-facts","unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.","name": "captured_facts_active","status": "ok"@@@ -1320,6 -1320,6 +1575,7 @@@"drifted": 0,"repair": "loop-facts"},++ "elapsed_ms": "<volatile>","message": "Every closed commitment loop has its fact retired.","name": "loop_facts_drift","status": "ok"@@@ -1333,6 -1333,6 +1589,7 @@@"repair": "ontology-facts","retired": 0},++ "elapsed_ms": "<volatile>","message": "No ontology observation is held by a page's Facts table.","name": "ontology_facts_fenced","status": "ok"@@@ -1346,6 -1346,6 +1603,7 @@@"source_ids": [],"sources": []},++ "elapsed_ms": "<volatile>","message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).","name": "stale_frontmatter_keys","status": "ok"@@@ -1360,102 -1360,102 +1618,119 @@@"sources": [],"window_sequences": 20000},++ "elapsed_ms": "<volatile>","message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.","name": "maintenance_write_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).","name": "extraction_date_grounding","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sampled 20 pages; no bare-tweet phrases or external links.","name": "integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All JSONB columns store objects/arrays","name": "jsonb_integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No takes yet","name": "takes_weight_grid","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All FK-child tables clean (10 tables checked)","name": "child_table_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All synthesized pages carry a raw trace or explicit exemption","name": "raw_provenance","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All source config values are JSON objects","name": "source_config_shape","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","name": "whoknows_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All image-asset chunks have modality=image","name": "cross_modal_modality_backfill","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "search.unified_multimodal is off; coverage check N/A","name": "unified_multimodal_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No truncated bodies detected","name": "markdown_body_completeness","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No pages exceed 500000 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)","name": "oversized_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)","name": "scraper_junk_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","name": "content_sanity_audit_recent","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No quarantined pages","name": "quarantined_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No flagged pages","name": "flagged_pages","status": "ok"@@@ -1467,12 -1467,12 +1742,14 @@@"days": 7,"source_id": null},++ "elapsed_ms": "<volatile>","message": "No stale unverified extraction stubs","name": "unverified_extractions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes","name": "frontmatter_integrity",@@@ -1526,6 -1526,6 +1803,7 @@@],"unscanned": []},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1559,30 -1559,30 +1837,35 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "No capture failures in the last 24h","name": "eval_capture","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","name": "contradictions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).","name": "facts_extraction_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","name": "effective_date_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","name": "salience_health","status": "ok"@@@ -1595,24 -1595,24 +1878,28 @@@"engine": "pglite","worker_alive": true},++ "elapsed_ms": "<volatile>","message": "PGLite: no jobs waiting for a worker.","name": "queue_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","name": "subagent_capability","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","name": "facts_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Brain-wide maintenance jobs are finishing within their deadline.","name": "global_maintenance_timeouts","status": "ok"@@@ -1635,6 -1635,6 +1922,7 @@@"unsupported": 0,"unsupported_ids": []},++ "elapsed_ms": "<volatile>","message": "No queued job predates submission authority.","name": "legacy_job_authority","status": "ok"@@@ -1648,6 -1648,6 +1936,7 @@@"malformed": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.","name": "legacy_token_grant_shape","status": "ok"@@@ -1659,6 -1659,6 +1948,7 @@@"drift": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "No legacy token grant has drifted from its permissions mirror.","name": "legacy_token_grant_drift","status": "ok"@@@ -1670,6 -1670,6 +1960,7 @@@"null_scope_count": 0,"tokens": []},++ "elapsed_ms": "<volatile>","message": "Every active legacy token has explicit scopes.","name": "legacy_token_null_scope","status": "ok"@@@ -1681,18 -1681,18 +1972,21 @@@"grants": [],"server_surface": "full"},++ "elapsed_ms": "<volatile>","message": "Every active client and token can call the operations its scopes allow.","name": "grant_new_ops_available","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No image assets indexed yet","name": "image_assets","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "OCR not in use (or no images ingested with OCR opt-in)","name": "ocr_health","status": "ok"@@@ -1706,6 -1706,6 +2000,7 @@@"unsupported_holds": 0,"without_image_vector": 0},++ "elapsed_ms": "<volatile>","message": "No image pages indexed yet.","name": "image_embedding_coverage","status": "ok"@@@ -1718,6 -1718,6 +2013,7 @@@"unchanged_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness",@@@ -1730,6 -1730,6 +2026,7 @@@"recovering_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","message": "1 writer-owned content source(s); no pending canonical publication or recovery.","name": "canonical_content_writes","status": "ok"@@@ -1752,6 -1752,6 +2049,7 @@@"unpushed": 0}},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1796,18 -1796,18 +2094,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.","name": "sync_consolidation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)","name": "links_extraction_lag","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.","name": "cycle_freshness","readiness_state": "not_applicable",@@@ -1816,24 -1816,24 +2117,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No same-source content-hash duplicate groups","name": "content_hash_duplicates","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All code-page chunks carry symbol metadata","name": "code_chunk_metadata","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/).","name": "undeclared_db_only_pages","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No configured collectors declare output paths","name": "db_only_collector_collision","status": "ok"@@@ -1844,12 -1844,12 +2149,14 @@@"checkouts": 1,"tracked": []},++ "elapsed_ms": "<volatile>","message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).","name": "tracked_ownership_marker","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "System One is off (every decide slot is off; nothing is sent).","name": "decide_health","status": "ok"@@@ -1880,6 -1880,6 +2187,7 @@@"unlinked": 0}},++ "elapsed_ms": "<volatile>","message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none","name": "unlinked_facts","status": "ok"@@@ -1898,6 -1898,6 +2206,7 @@@"relationships": {},"stale_assertions": []},++ "elapsed_ms": "<volatile>","message": "relationships: none yet; read policy on; contradiction mode propose (default)","name": "edge_validity","status": "ok"@@@ -1936,6 -1936,6 +2245,7 @@@"unpricedCalls": 0}},++ "elapsed_ms": "<volatile>","message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.","name": "auto_chronicle","readiness_state": "missing",@@@ -1943,6 -1943,6 +2253,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "chronicle.* settings are valid.","name": "chronicle_config_invalid","status": "ok"@@@ -2054,6 -2054,6 +2365,7 @@@},"severity": "info"},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2109,6 -2109,6 +2421,7 @@@"last_run": null,"max_jobs": 50},++ "elapsed_ms": "<volatile>","message": "No facts-absorb jobs are queued (no run recorded yet).","name": "facts_drain","status": "ok"@@@ -2118,6 -2118,6 +2431,7 @@@"details": {"applicable": false},++ "elapsed_ms": "<volatile>","message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).","name": "fact_take_vectors","readiness_state": "disabled_by_choice",@@@ -2141,6 -2141,6 +2455,7 @@@"missing_search_statistics": [],"stale": []},++ "elapsed_ms": "<volatile>","message": "Planner statistics are fresh on 6 hot tables.","name": "planner_stats_stale","status": "ok"@@@ -2161,6 -2161,6 +2476,7 @@@"weights": 0,"weights_off_neutral": 0},++ "elapsed_ms": "<volatile>","message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true","name": "retrieval_feedback_health","status": "ok"@@@ -2172,6 -2172,6 +2488,7 @@@"failed": [],"pending": 0},++ "elapsed_ms": "<volatile>","message": "Every page has its revision; the page revision backfill is complete.","name": "revision_backfill","status": "ok"@@@ -2249,6 -2249,6 +2566,7 @@@],"unknown_pct": 10},++ "elapsed_ms": "<volatile>","message": "10% of 30 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for.","name": "trust_tiers","status": "ok"@@@ -2266,6 -2266,6 +2584,7 @@@"timeline_entries": 0}},++ "elapsed_ms": "<volatile>","message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.","name": "trust_scan","status": "ok"@@@ -2277,6 -2277,6 +2596,7 @@@"pending": [],"unclaimed": []},++ "elapsed_ms": "<volatile>","message": "No unclaimed source holds rows from before trust tiers.","name": "trust_sources_unclaimed","status": "ok"@@@ -2292,22 -2292,22 +2612,11 @@@"enabled": false,"pages": 0},++ "elapsed_ms": "<volatile>","message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.","name": "core_memory","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",-- "parked": 0,-- "sources": []-- },-- "message": "No managed sync is pending.",-- "name": "managed_sync_not_moving",-- "status": "ok"-- },{"category": "ops","details": {@@@ -2315,6 -2315,6 +2624,7 @@@"count": 0,"docs": "docs/guides/troubleshooting.md#two-consumers-on-host"},++ "elapsed_ms": "<volatile>","message": "PGLite admits one process; no consumer heartbeat rows are kept.","name": "two_consumers_on_host","status": "ok"@@@ -2326,6 -2326,6 +2636,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","owners": []},++ "elapsed_ms": "<volatile>","message": "PGLite admits one process; no consumer heartbeat rows are kept.","name": "consumers_without_heartbeat","status": "ok"@@@ -2339,20 -2339,20 +2650,11 @@@"host_json_path": "<home>/.gbrain/persistence/host.json","mismatches": []},++ "elapsed_ms": "<volatile>","message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.","name": "host_identity_mismatch","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#serve-build-drift"-- },-- "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",-- "name": "serve_build_drift",-- "status": "ok"-- },{"category": "brain","details": {@@@ -2360,6 -2360,6 +2662,7 @@@"held": 0,"items": []},++ "elapsed_ms": "<volatile>","message": "No managed atom page or transcript is held after repeated extraction failures.","name": "extract_atoms_held_failed","status": "ok"@@@ -2594,6 -2594,6 +2897,7 @@@},"warn_at_normalized_7d": 20},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2658,6 -2658,6 +2962,7 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).","name": "search_mode","status": "ok"@@@ -2672,114 -2672,114 +2977,133 @@@".raw/"]},++ "elapsed_ms": "<volatile>","message": "No pages hidden by search-exclude policy.","name": "hidden_by_search_policy","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No retrieval-affecting files changed in working tree.","name": "eval_drift","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Reranker disabled — no failures expected","name": "reranker_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No exhausted batch retries in last 24h.","name": "batch_retry_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite — no queue to check","name": "wedged_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No orphaned private queues","name": "orphaned_private_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite — single-writer, fan-out is 1","name": "autopilot_fanout_concurrency","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "no Google accounts connected (gbrain google connect to start)","name": "google_oauth","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "graph_signals disabled — coverage not checked","name": "graph_signals_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)","name": "junk_entity_hubs","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","name": "brainstorm_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.","name": "link_resolution_opportunity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings disabled — no active embedding width to reconcile.","name": "embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped on PGLite (single bundled pgvector version).","name": "facts_embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Multi-source brain (2 non-default source(s)); all populated","name": "source_routing_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No OAuth clients registered","name": "oauth_confidential_client_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","name": "oauth_client_scope_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Lock path: <home>/.gbrain/autopilot.lock","name": "autopilot_lock_scope","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No stale locks (no rows with ttl_expires_at < NOW())","name": "stale_locks","status": "ok"@@@ -2824,12 -2824,12 +3148,14 @@@"synthesize_concepts": "global"}},++ "elapsed_ms": "<volatile>","message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -2879,18 -2879,18 +3205,21 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "entity_link_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "timeline_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2930,18 -2930,18 +3259,21 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Active pack [email protected]+a50a67b9 is current (no successor declared)","name": "pack_upgrade_available","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "5 distinct typed values (pack gbrain-base-v2 declares 20)","name": "type_proliferation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No dangling aliases","name": "dangling_aliases","status": "ok"@@@ -2949,7 -2949,7 +3281,7 @@@],"db_url_source": null,"engine": "pglite",-- "health_score": 40,++ "health_score": 35,"schema_version": 2,"status": "unhealthy","top_issues": [@@@ -3130,6 -3130,6 +3462,12 @@@"status": "warn","tier": "symptom"},++ {++ "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn",++ "tier": "symptom"++ },{"fix": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -3196,13 -3196,13 +3534,14 @@@],"category_scores": {"brain": 45,-- "meta": 100,++ "meta": 95,"ops": 100,"skill": 95},"checks": [{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skills, all reachable","name": "resolver_health","status": "ok"@@@ -3217,6 -3217,6 +3556,7 @@@"path": "pglite — serve IPC socket not present","policy_skill_installed": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "user","consent": [@@@ -3240,30 -3240,30 +3580,35 @@@"channels": {},"window_days": 7},++ "elapsed_ms": "<volatile>","message": "no push-context activity in 7 days — if a hook adapter is installed, confirm its registration landed and the harness session was RESTARTED (hooks snapshot at session start); a serve older than this build logs NOTHING for the hook lane — restart serve on the new build to activate the feedback loop","name": "volunteer_channels","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","name": "memory_verbs_usage","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1/1 skills pass","name": "skill_conformance","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skill(s) compliant or exempt","name": "skill_brain_first","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "No skills.lock.json in <home>/skills — integrity check not applicable","name": "skills_manifest_integrity","status": "ok"@@@ -3339,6 -3339,6 +3684,7 @@@"webhook-transforms"]},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -3346,6 -3346,6 +3692,7 @@@},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no installed skills declare preconditions","name": "skill_preconditions","status": "ok"@@@ -3357,6 -3357,6 +3704,7 @@@"out_of_band_settable": true,"reason": "disabled"},++ "elapsed_ms": "<volatile>","message": "memorable relay off (default)","name": "memorable_relay_health","status": "ok"@@@ -3390,12 -3390,12 +3738,14 @@@"ttl_valid": true,"visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"},++ "elapsed_ms": "<volatile>","message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient","name": "memory_writeback","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat connectors configured (optional).","name": "connectors","status": "ok"@@@ -3409,6 -3409,6 +3759,7 @@@"keys": [],"threshold": 3},++ "elapsed_ms": "<volatile>","message": "No dream key died 3+ times in 24h","name": "dream_paid_loop","status": "ok"@@@ -3424,6 -3424,6 +3775,7 @@@"0.53.0"]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3456,18 -3456,18 +3808,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "mode=notify","name": "self_upgrade_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Bun <bun-version> (minimum 1.4.0)","name": "bun_runtime","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","name": "nightly_quality_probe_health","status": "ok"@@@ -3478,12 -3478,12 +3833,14 @@@"kinds": [],"schema_version": 1},++ "elapsed_ms": "<volatile>","message": "no extractions in last 7 days","name": "extract_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","name": "conversation_facts_backlog","status": "ok"@@@ -3495,6 -3495,6 +3852,7 @@@"known_approximation": "page backlog only; transcript corpus not counted","pack_declares_phase": false},++ "elapsed_ms": "<volatile>","message": "no pages awaiting atom extraction","name": "extract_atoms_backlog","status": "ok"@@@ -3509,132 -3509,132 +3867,381 @@@"source_gone": 0,"total_atoms": 0},-- "message": "no atoms to check",-- "name": "atom_provenance_drift",-- "status": "ok"-- },-- {-- "category": "brain",-- "message": "No conversation-type pages — coverage check not applicable",-- "name": "conversation_format_coverage",++ "elapsed_ms": "<volatile>",++ "message": "no atoms to check",++ "name": "atom_provenance_drift",++ "status": "ok"++ },++ {++ "category": "brain",++ "elapsed_ms": "<volatile>",++ "message": "No conversation-type pages — coverage check not applicable",++ "name": "conversation_format_coverage",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>",++ "message": "No progressive-batch operations in the last 7 days",++ "name": "progressive_batch_audit_health",++ "status": "ok"++ },++ {++ "category": "brain",++ "elapsed_ms": "<volatile>",++ "message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`",++ "name": "conversation_parser_probe_health",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>",++ "message": "gbrain home is outside any enclosing git worktree.",++ "name": "home_dir_in_worktree",++ "status": "ok"++ },++ {++ "category": "meta",++ "elapsed_ms": "<volatile>",++ "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",++ "name": "default_source_local_path",++ "status": "ok"++ },++ {++ "category": "meta",++ "details": {++ "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",++ "git_root_skipped": [],++ "limit": 10000,++ "timeout_ms": "<volatile>",++ "unreadable_sources": [],++ "walk_truncated": false++ },++ "elapsed_ms": "<volatile>",++ "message": "No cross-source slug drift detected.",++ "name": "multi_source_drift",++ "status": "ok"++ },++ {++ "category": "brain",++ "details": {++ "docs": "docs/guides/repair.md#embedding-key-source",++ "embedding_key": {++ "config_key": "voyage_api_key",++ "kind": "missing",++ "variable": "VOYAGE_API_KEY"++ },++ "embedding_model": "voyage:voyage-4",++ "shadows": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",++ "name": "embedding_key_source",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "decision": null,++ "provider_env": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",++ "name": "provider_consent",++ "readiness_state": "not_applicable",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "reason": "no_harness_detected"++ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "consent": [++ "persistent_install"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",++ "next": "report",++ "requires_exclusive": false,++ "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",++ "why": "Register `<absolute path to gbrain> serve --surface full` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."++ },++ "message": "No agent harness was detected. Wire one when the user picks an agent app.",++ "name": "harness_wiring",++ "readiness_state": "missing",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "meta",++ "details": {++ "consent_refused": 0,++ "derived_cap_exhausted": 0,++ "events": 0,++ "internal_errors": 0,++ "json_document_missing": 0,++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",++ "name": "agent_contract",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>",++ "message": "Connected, 20 pages",++ "name": "connection",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "commands": [],++ "exact": true,++ "inspected": 2,++ "resources": [],++ "truncated": false++ },++ "elapsed_ms": "<volatile>",++ "message": "Managed write capacity is below 80% of every cumulative limit.",++ "name": "persistence_capacity",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "active_blockers": [],++ "config": {++ "receipt_retention_days": 30,++ "spike_factor": {++ "key": "persistence.terminal_failures.spike_factor",++ "value": 3++ },++ "spike_min": {++ "key": "persistence.terminal_failures.spike_min",++ "value": 25++ },++ "window_clamped": false,++ "window_days": {++ "key": "persistence.terminal_failures.window_days",++ "value": 7++ }++ },++ "count": 0,++ "defects": [],++ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",++ "historical_rows": 0,++ "new_last_24h": 0,++ "sources": [],++ "spike": {++ "daily_7d": [++ 0,++ 0,++ 0,++ 0,++ 0,++ 0,++ 0++ ],++ "last_24h": 0,++ "median_7d": 0,++ "spiking": false++ },++ "unresolved": {++ "distinct_intents": 0,++ "distinct_slugs": 0,++ "oldest_age_seconds": null,++ "rows": 0++ },++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No terminal write failures in the last 7 d.",++ "name": "persistence_terminal_failures","status": "ok"},{"category": "ops",-- "message": "No progressive-batch operations in the last 7 days",-- "name": "progressive_batch_audit_health",-- "status": "ok"-- },-- {-- "category": "brain",-- "message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`",-- "name": "conversation_parser_probe_health",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",++ "parked": 0,++ "sources": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No managed sync is pending.",++ "name": "managed_sync_not_moving","status": "ok"},{"category": "ops",-- "message": "gbrain home is outside any enclosing git worktree.",-- "name": "home_dir_in_worktree",-- "status": "ok"-- },-- {-- "category": "meta",-- "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",-- "name": "default_source_local_path",-- "status": "ok"-- },-- {-- "category": "meta","details": {-- "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",-- "git_root_skipped": [],-- "limit": 10000,-- "timeout_ms": "<volatile>",-- "unreadable_sources": [],-- "walk_truncated": false++ "docs": "docs/guides/troubleshooting.md#receipt-compaction",++ "recorded": false},-- "message": "No cross-source slug drift detected.",-- "name": "multi_source_drift",++ "elapsed_ms": "<volatile>",++ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",++ "name": "receipt_compaction",++ "readiness_state": "not_applicable",++ "severity": "info","status": "ok"},{-- "category": "brain",++ "category": "ops","details": {-- "docs": "docs/guides/repair.md#embedding-key-source",-- "embedding_key": {-- "config_key": "voyage_api_key",-- "kind": "missing",-- "variable": "VOYAGE_API_KEY"-- },-- "embedding_model": "voyage:voyage-4",-- "shadows": []++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#serve-build-drift"},-- "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",-- "name": "embedding_key_source",++ "elapsed_ms": "<volatile>",++ "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",++ "name": "serve_build_drift","status": "ok"},{-- "category": "ops",++ "category": "meta","details": {-- "decision": null,-- "provider_env": []++ "code": "page_type_undeclared",++ "docs": "docs/architecture/schema-packs.md#undeclared-page-types",++ "per_source": [++ {++ "pack": "gbrain-base-v2",++ "source_id": "notes",++ "total": 19,++ "undeclared": 1,++ "undeclared_types": [++ {++ "count": 1,++ "type": "2024"++ }++ ],++ "untyped": 0++ },++ {++ "pack": "gbrain-base-v2",++ "source_id": "plain",++ "total": 1,++ "undeclared": 0,++ "undeclared_types": [],++ "untyped": 0++ }++ ],++ "unresolved_sources": []},-- "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",-- "name": "provider_consent",-- "readiness_state": "not_applicable",-- "severity": "info",-- "status": "ok"++ "elapsed_ms": "<volatile>",++ "fix_unavailable_reason": "unstructured",++ "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn"},{-- "category": "ops",++ "category": "brain","details": {-- "reason": "no_harness_detected"++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 1,++ "keyword_only": 0,++ "pending": 23,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 23,++ "embedded": 0,++ "ratio": 0++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 1,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }},++ "elapsed_ms": "<volatile>","fix": {"actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024",++ "--path",++ "<home>/.gbrain/brain.pglite"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024 --path <home>/.gbrain/brain.pglite","consent": [-- "persistent_install"++ "credentials",++ "paid"],-- "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",-- "next": "report",-- "requires_exclusive": false,-- "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",-- "why": "Register `<absolute path to gbrain> serve --surface full` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for the PGLite brain at <home>/.gbrain/brain.pglite. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."},-- "message": "No agent harness was detected. Wire one when the user picks an agent app.",-- "name": "harness_wiring",-- "readiness_state": "missing",++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice","severity": "info","status": "ok"},-- {-- "category": "meta",-- "details": {-- "consent_refused": 0,-- "derived_cap_exhausted": 0,-- "events": 0,-- "internal_errors": 0,-- "json_document_missing": 0,-- "window_days": 7-- },-- "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",-- "name": "agent_contract",-- "status": "ok"-- },-- {-- "category": "ops",-- "message": "Connected, 20 pages",-- "name": "connection",-- "status": "ok"-- },{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "pages has the UNIQUE(source_id, slug) upsert arbiter","name": "pages_upsert_arbiter","status": "ok"@@@ -3645,24 -3645,24 +4252,12 @@@"readiness": "projection_pending","ready": false},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Visible pages have missing or stale text projections; search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.","name": "text_projection_readiness","status": "warn"},-- {-- "category": "ops",-- "details": {-- "commands": [],-- "exact": true,-- "inspected": 2,-- "resources": [],-- "truncated": false-- },-- "message": "Managed write capacity is below 80% of every cumulative limit.",-- "name": "persistence_capacity",-- "status": "ok"-- },{"category": "brain","details": {@@@ -3672,6 -3672,6 +4267,7 @@@"parked_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No Git or withdrawal effect is parked.","name": "parked_effects","status": "ok"@@@ -3681,6 -3681,6 +4277,7 @@@"details": {"refreshes": []},++ "elapsed_ms": "<volatile>","message": "No worktree refresh is stuck.","name": "worktree_refresh_stuck","status": "ok"@@@ -3692,6 -3692,6 +4289,7 @@@"page_child_source_columns": [],"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"},++ "elapsed_ms": "<volatile>","message": "Guarded tables carry only the columns gbrain creates.","name": "managed_guard_schema_drift","status": "ok"@@@ -3705,48 -3705,48 +4303,56 @@@"unclassified_p0001": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No write was refused by a database guard in the last 7 days.","name": "publication_refusals","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "links_link_source_check has the v114 kebab-case gate","name": "links_link_source_check","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite at 20 pages — comfortable below the 1000-page threshold","name": "pglite_scale","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Skipped (PGLite — no PostgREST exposure, RLS not applicable)","name": "rls","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Version <latest> (latest: <latest>)","name": "schema_version","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "1115 column(s) verified against live schema","name": "schema_columns","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Skipped (PGLite — no event trigger support)","name": "rls_event_trigger","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -3796,6 -3796,6 +4402,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -3845,24 -3845,24 +4452,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Registry healthy: 1 columns (embedding_image); primary embeddings disabled","name": "embedding_column_registry","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding env overrides set","name": "embedding_env_override","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding migration in flight","name": "embedding_migration_state","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.","name": "supersession_calibration","readiness_state": "not_applicable",@@@ -3871,24 -3871,24 +4482,28 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat_fallback_chain is set: every chat call uses only its own model.","name": "chat_fallback_chain","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.","name": "behavior_changes","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale","name": "graph_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3922,24 -3922,24 +4537,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.","name": "orphan_ratio","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No by-mention links in this brain.","name": "stale_mentions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No orphaned timeline rows across 4 page(s).","name": "timeline_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No slug collisions across 3 source checkout(s).","name": "slug_collisions","status": "ok"@@@ -3955,6 -3955,6 +4574,7 @@@"repair": "timeline","truncated": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3996,6 -3996,6 +4616,7 @@@"unstamped_atoms": 0,"unstamped_concepts": 0},++ "elapsed_ms": "<volatile>","message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.","name": "derived_visibility","status": "ok"@@@ -4009,6 -4009,6 +4630,7 @@@"repair": "safe-chunks","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every re-sealable page is at the safe-chunk index version.","name": "safe_index_pending","status": "ok"@@@ -4021,6 -4021,6 +4643,7 @@@"pages_pending": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No page waits for the credential-safe re-chunk.","name": "credential_projection_pending","status": "ok"@@@ -4035,6 -4035,6 +4658,7 @@@"retries": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No orphan connector checkpoint rows older than 7 days.","name": "connector_checkpoints","status": "ok"@@@ -4061,6 -4061,6 +4685,7 @@@],"repair": "request-indexes"},++ "elapsed_ms": "<volatile>","message": "Managed sync request indexes are valid.","name": "persistence_request_indexes","status": "ok"@@@ -4099,6 -4099,6 +4724,7 @@@"verify": "gbrain doctor --json (check persistence_request_growth)","window_days": 7},++ "elapsed_ms": "<volatile>","message": "22 request row(s); no scope exhausts its lifetime request IDs within 90 days at its last-7-day rate.","name": "persistence_request_growth","status": "ok"@@@ -4118,6 -4118,6 +4744,7 @@@},"stalls": []},++ "elapsed_ms": "<volatile>","message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).","name": "persistence_write_stall","status": "ok"@@@ -4131,62 -4131,62 +4758,11 @@@"repair": "failed-writes","writes": []},++ "elapsed_ms": "<volatile>","message": "Every caller write with a retained receipt committed or was superseded.","name": "lost_caller_writes","status": "ok"},-- {-- "category": "ops",-- "details": {-- "active_blockers": [],-- "config": {-- "receipt_retention_days": 30,-- "spike_factor": {-- "key": "persistence.terminal_failures.spike_factor",-- "value": 3-- },-- "spike_min": {-- "key": "persistence.terminal_failures.spike_min",-- "value": 25-- },-- "window_clamped": false,-- "window_days": {-- "key": "persistence.terminal_failures.window_days",-- "value": 7-- }-- },-- "count": 0,-- "defects": [],-- "docs": "docs/guides/troubleshooting.md#terminal-write-failures",-- "historical_rows": 0,-- "new_last_24h": 0,-- "sources": [],-- "spike": {-- "daily_7d": [-- 0,-- 0,-- 0,-- 0,-- 0,-- 0,-- 0-- ],-- "last_24h": 0,-- "median_7d": 0,-- "spiking": false-- },-- "unresolved": {-- "distinct_intents": 0,-- "distinct_slugs": 0,-- "oldest_age_seconds": null,-- "rows": 0-- },-- "window_days": 7-- },-- "message": "No terminal write failures in the last 7 d.",-- "name": "persistence_terminal_failures",-- "status": "ok"-- },{"category": "ops","details": {@@@ -4194,6 -4194,6 +4770,7 @@@"configured": "5min","docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"},++ "elapsed_ms": "<volatile>","message": "PGLite has no session to time out.","name": "persistence_session_timeouts","status": "ok"@@@ -4205,6 -4205,6 +4782,7 @@@"held": 0,"sources": []},++ "elapsed_ms": "<volatile>","message": "No connector items are held.","name": "connector_held_items","status": "ok"@@@ -4271,6 -4271,6 +4849,7 @@@}]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4311,6 -4311,6 +4890,7 @@@"docs": "docs/guides/repair.md#held-files","hooks": []},++ "elapsed_ms": "<volatile>","message": "No outdated gbrain frontmatter pre-commit hook is installed.","name": "frontmatter_hook","status": "ok"@@@ -4324,6 -4324,6 +4904,7 @@@"repair": "orphan-bindings","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every persistence source binding belongs to an existing source.","name": "orphan_persistence_bindings","status": "ok"@@@ -4335,6 -4335,6 +4916,7 @@@"docs": "docs/guides/write-refusals.md#foreign-ownership-marker","markers": []},++ "elapsed_ms": "<volatile>","message": "Every ownership marker beside a source checkout belongs to this brain.","name": "foreign_ownership_marker","status": "ok"@@@ -4345,6 -4345,6 +4927,7 @@@"sources": [],"total": 0},++ "elapsed_ms": "<volatile>","message": "No page was written database-only to an unbound source.","name": "unbound_source","status": "ok"@@@ -4374,6 -4374,6 +4957,7 @@@"truncated": false,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.","name": "writer_version","status": "ok"@@@ -4386,6 -4386,6 +4970,7 @@@"truncated": false,"unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No session corpus is configured; nothing to classify.","name": "self_capture","status": "ok"@@@ -4396,6 -4396,6 +4981,7 @@@"outcome": "skipped","reason": "pglite"},++ "elapsed_ms": "<volatile>","message": "Skipped: PGLite runs vector search in-process; the plan check applies to Postgres brains.","name": "vector_plan","status": "ok"@@@ -4406,6 -4406,6 +4992,7 @@@"outcome": "skipped","reason": "pglite"},++ "elapsed_ms": "<volatile>","message": "Skipped: PGLite runs keyword search with no statement timeout; the canary applies to Postgres brains.","name": "keyword_plan","status": "ok"@@@ -4424,6 -4424,6 +5011,7 @@@"stale_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No committed write has a stale queued or failed embedding effect.","name": "stale_embedding_effects","status": "ok"@@@ -4436,6 -4436,6 +5024,7 @@@"repair": "google-file-modes","sources": []},++ "elapsed_ms": "<volatile>","message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.","name": "google_file_modes","status": "ok"@@@ -4449,6 -4449,6 +5038,7 @@@"excluded": 0,"repair": "extractor-facts"},++ "elapsed_ms": "<volatile>","message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.","name": "extractor_facts_expired","status": "ok"@@@ -4461,6 -4461,6 +5051,7 @@@"evidenced": 0,"repair": "conversation-labels"},++ "elapsed_ms": "<volatile>","message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).","name": "conversation_label_facts","status": "ok"@@@ -4476,6 -4476,6 +5067,7 @@@"stale": 0,"unstamped": 0},++ "elapsed_ms": "<volatile>","message": "No conversation extraction outcome predates extractor version 1.","name": "conversation_outcomes_stale","status": "ok"@@@ -4490,6 -4490,6 +5082,7 @@@"repair": "captured-facts","unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.","name": "captured_facts_active","status": "ok"@@@ -4501,6 -4501,6 +5094,7 @@@"drifted": 0,"repair": "loop-facts"},++ "elapsed_ms": "<volatile>","message": "Every closed commitment loop has its fact retired.","name": "loop_facts_drift","status": "ok"@@@ -4514,6 -4514,6 +5108,7 @@@"repair": "ontology-facts","retired": 0},++ "elapsed_ms": "<volatile>","message": "No ontology observation is held by a page's Facts table.","name": "ontology_facts_fenced","status": "ok"@@@ -4527,6 -4527,6 +5122,7 @@@"source_ids": [],"sources": []},++ "elapsed_ms": "<volatile>","message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).","name": "stale_frontmatter_keys","status": "ok"@@@ -4541,102 -4541,102 +5137,119 @@@"sources": [],"window_sequences": 20000},++ "elapsed_ms": "<volatile>","message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.","name": "maintenance_write_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).","name": "extraction_date_grounding","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sampled 20 pages; no bare-tweet phrases or external links.","name": "integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All JSONB columns store objects/arrays","name": "jsonb_integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No takes yet","name": "takes_weight_grid","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All FK-child tables clean (10 tables checked)","name": "child_table_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All synthesized pages carry a raw trace or explicit exemption","name": "raw_provenance","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All source config values are JSON objects","name": "source_config_shape","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","name": "whoknows_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All image-asset chunks have modality=image","name": "cross_modal_modality_backfill","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "search.unified_multimodal is off; coverage check N/A","name": "unified_multimodal_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No truncated bodies detected","name": "markdown_body_completeness","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No pages exceed 500000 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)","name": "oversized_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)","name": "scraper_junk_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","name": "content_sanity_audit_recent","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No quarantined pages","name": "quarantined_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No flagged pages","name": "flagged_pages","status": "ok"@@@ -4648,12 -4648,12 +5261,14 @@@"days": 7,"source_id": null},++ "elapsed_ms": "<volatile>","message": "No stale unverified extraction stubs","name": "unverified_extractions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes","name": "frontmatter_integrity",@@@ -4707,6 -4707,6 +5322,7 @@@],"unscanned": []},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4740,30 -4740,30 +5356,35 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "No capture failures in the last 24h","name": "eval_capture","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","name": "contradictions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).","name": "facts_extraction_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","name": "effective_date_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","name": "salience_health","status": "ok"@@@ -4776,24 -4776,24 +5397,28 @@@"engine": "pglite","worker_alive": true},++ "elapsed_ms": "<volatile>","message": "PGLite: no jobs waiting for a worker.","name": "queue_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","name": "subagent_capability","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","name": "facts_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Brain-wide maintenance jobs are finishing within their deadline.","name": "global_maintenance_timeouts","status": "ok"@@@ -4816,6 -4816,6 +5441,7 @@@"unsupported": 0,"unsupported_ids": []},++ "elapsed_ms": "<volatile>","message": "No queued job predates submission authority.","name": "legacy_job_authority","status": "ok"@@@ -4829,6 -4829,6 +5455,7 @@@"malformed": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.","name": "legacy_token_grant_shape","status": "ok"@@@ -4840,6 -4840,6 +5467,7 @@@"drift": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "No legacy token grant has drifted from its permissions mirror.","name": "legacy_token_grant_drift","status": "ok"@@@ -4851,6 -4851,6 +5479,7 @@@"null_scope_count": 0,"tokens": []},++ "elapsed_ms": "<volatile>","message": "Every active legacy token has explicit scopes.","name": "legacy_token_null_scope","status": "ok"@@@ -4862,18 -4862,18 +5491,21 @@@"grants": [],"server_surface": "full"},++ "elapsed_ms": "<volatile>","message": "Every active client and token can call the operations its scopes allow.","name": "grant_new_ops_available","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No image assets indexed yet","name": "image_assets","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "OCR not in use (or no images ingested with OCR opt-in)","name": "ocr_health","status": "ok"@@@ -4887,6 -4887,6 +5519,7 @@@"unsupported_holds": 0,"without_image_vector": 0},++ "elapsed_ms": "<volatile>","message": "No image pages indexed yet.","name": "image_embedding_coverage","status": "ok"@@@ -4899,6 -4899,6 +5532,7 @@@"unchanged_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness",@@@ -4911,6 -4911,6 +5545,7 @@@"recovering_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","message": "1 writer-owned content source(s); no pending canonical publication or recovery.","name": "canonical_content_writes","status": "ok"@@@ -4933,6 -4933,6 +5568,7 @@@"unpushed": 0}},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4977,18 -4977,18 +5613,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.","name": "sync_consolidation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)","name": "links_extraction_lag","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.","name": "cycle_freshness","readiness_state": "not_applicable",@@@ -4997,24 -4997,24 +5636,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No same-source content-hash duplicate groups","name": "content_hash_duplicates","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All code-page chunks carry symbol metadata","name": "code_chunk_metadata","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/).","name": "undeclared_db_only_pages","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No configured collectors declare output paths","name": "db_only_collector_collision","status": "ok"@@@ -5025,12 -5025,12 +5668,14 @@@"checkouts": 1,"tracked": []},++ "elapsed_ms": "<volatile>","message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).","name": "tracked_ownership_marker","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "System One is off (every decide slot is off; nothing is sent).","name": "decide_health","status": "ok"@@@ -5061,6 -5061,6 +5706,7 @@@"unlinked": 0}},++ "elapsed_ms": "<volatile>","message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none","name": "unlinked_facts","status": "ok"@@@ -5079,6 -5079,6 +5725,7 @@@"relationships": {},"stale_assertions": []},++ "elapsed_ms": "<volatile>","message": "relationships: none yet; read policy on; contradiction mode propose (default)","name": "edge_validity","status": "ok"@@@ -5117,6 -5117,6 +5764,7 @@@"unpricedCalls": 0}},++ "elapsed_ms": "<volatile>","message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.","name": "auto_chronicle","readiness_state": "missing",@@@ -5124,6 -5124,6 +5772,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "chronicle.* settings are valid.","name": "chronicle_config_invalid","status": "ok"@@@ -5235,6 -5235,6 +5884,7 @@@},"severity": "info"},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -5290,6 -5290,6 +5940,7 @@@"last_run": null,"max_jobs": 50},++ "elapsed_ms": "<volatile>","message": "No facts-absorb jobs are queued (no run recorded yet).","name": "facts_drain","status": "ok"@@@ -5299,6 -5299,6 +5950,7 @@@"details": {"applicable": false},++ "elapsed_ms": "<volatile>","message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).","name": "fact_take_vectors","readiness_state": "disabled_by_choice",@@@ -5322,6 -5322,6 +5974,7 @@@"missing_search_statistics": [],"stale": []},++ "elapsed_ms": "<volatile>","message": "Planner statistics are fresh on 6 hot tables.","name": "planner_stats_stale","status": "ok"@@@ -5342,6 -5342,6 +5995,7 @@@"weights": 0,"weights_off_neutral": 0},++ "elapsed_ms": "<volatile>","message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true","name": "retrieval_feedback_health","status": "ok"@@@ -5353,6 -5353,6 +6007,7 @@@"failed": [],"pending": 0},++ "elapsed_ms": "<volatile>","message": "Every page has its revision; the page revision backfill is complete.","name": "revision_backfill","status": "ok"@@@ -5430,6 -5430,6 +6085,7 @@@],"unknown_pct": 12.9},++ "elapsed_ms": "<volatile>","message": "12.9% of 31 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for.","name": "trust_tiers","status": "ok"@@@ -5447,6 -5447,6 +6103,7 @@@"timeline_entries": 0}},++ "elapsed_ms": "<volatile>","message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.","name": "trust_scan","status": "ok"@@@ -5458,6 -5458,6 +6115,7 @@@"pending": [],"unclaimed": []},++ "elapsed_ms": "<volatile>","message": "No unclaimed source holds rows from before trust tiers.","name": "trust_sources_unclaimed","status": "ok"@@@ -5473,22 -5473,22 +6131,11 @@@"enabled": false,"pages": 0},++ "elapsed_ms": "<volatile>","message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.","name": "core_memory","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",-- "parked": 0,-- "sources": []-- },-- "message": "No managed sync is pending.",-- "name": "managed_sync_not_moving",-- "status": "ok"-- },{"category": "ops","details": {@@@ -5496,6 -5496,6 +6143,7 @@@"count": 0,"docs": "docs/guides/troubleshooting.md#two-consumers-on-host"},++ "elapsed_ms": "<volatile>","message": "PGLite admits one process; no consumer heartbeat rows are kept.","name": "two_consumers_on_host","status": "ok"@@@ -5507,6 -5507,6 +6155,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","owners": []},++ "elapsed_ms": "<volatile>","message": "PGLite admits one process; no consumer heartbeat rows are kept.","name": "consumers_without_heartbeat","status": "ok"@@@ -5520,20 -5520,20 +6169,11 @@@"host_json_path": "<home>/.gbrain/persistence/host.json","mismatches": []},++ "elapsed_ms": "<volatile>","message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.","name": "host_identity_mismatch","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#serve-build-drift"-- },-- "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",-- "name": "serve_build_drift",-- "status": "ok"-- },{"category": "brain","details": {@@@ -5541,6 -5541,6 +6181,7 @@@"held": 0,"items": []},++ "elapsed_ms": "<volatile>","message": "No managed atom page or transcript is held after repeated extraction failures.","name": "extract_atoms_held_failed","status": "ok"@@@ -5775,6 -5775,6 +6416,7 @@@},"warn_at_normalized_7d": 20},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -5839,6 -5839,6 +6481,7 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).","name": "search_mode","status": "ok"@@@ -5853,114 -5853,114 +6496,133 @@@".raw/"]},++ "elapsed_ms": "<volatile>","message": "No pages hidden by search-exclude policy.","name": "hidden_by_search_policy","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No retrieval-affecting files changed in working tree.","name": "eval_drift","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Reranker disabled — no failures expected","name": "reranker_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No exhausted batch retries in last 24h.","name": "batch_retry_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite — no queue to check","name": "wedged_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No orphaned private queues","name": "orphaned_private_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "PGLite — single-writer, fan-out is 1","name": "autopilot_fanout_concurrency","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "no Google accounts connected (gbrain google connect to start)","name": "google_oauth","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "graph_signals disabled — coverage not checked","name": "graph_signals_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)","name": "junk_entity_hubs","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","name": "brainstorm_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.","name": "link_resolution_opportunity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings disabled — no active embedding width to reconcile.","name": "embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped on PGLite (single bundled pgvector version).","name": "facts_embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Multi-source brain (2 non-default source(s)); all populated","name": "source_routing_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No OAuth clients registered","name": "oauth_confidential_client_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","name": "oauth_client_scope_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Lock path: <home>/.gbrain/autopilot.lock","name": "autopilot_lock_scope","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No stale locks (no rows with ttl_expires_at < NOW())","name": "stale_locks","status": "ok"@@@ -6005,12 -6005,12 +6667,14 @@@"synthesize_concepts": "global"}},++ "elapsed_ms": "<volatile>","message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -6060,18 -6060,18 +6724,21 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "entity_link_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "timeline_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -6111,18 -6111,18 +6778,21 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Active pack [email protected]+a50a67b9 is current (no successor declared)","name": "pack_upgrade_available","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "5 distinct typed values (pack gbrain-base-v2 declares 20)","name": "type_proliferation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No dangling aliases","name": "dangling_aliases","status": "ok"@@@ -6130,7 -6130,7 +6800,7 @@@],"db_url_source": null,"engine": "pglite",-- "health_score": 40,++ "health_score": 35,"schema_version": 2,"status": "unhealthy","top_issues": [@@@ -6311,6 -6311,6 +6981,12 @@@"status": "warn","tier": "symptom"},++ {++ "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn",++ "tier": "symptom"++ },{"fix": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",diff --cc test/fixtures/goldens/doctor/hot-checks-postgres-json.jsonindex e5979480ab,db5702764e..5de390f643--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json@@@ -15,13 -15,13 +15,14 @@@],"category_scores": {"brain": 45,-- "meta": 100,++ "meta": 95,"ops": 100,"skill": 95},"checks": [{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skills, all reachable","name": "resolver_health","status": "ok"@@@ -36,6 -36,6 +37,7 @@@"path": "postgres direct","policy_skill_installed": false},++ "elapsed_ms": "<volatile>","message": "postgres direct; enabled; not observed firing yet — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`","name": "retrieval_reflex_health","status": "ok"@@@ -46,30 -46,30 +48,35 @@@"channels": {},"window_days": 7},++ "elapsed_ms": "<volatile>","message": "no push-context activity in 7 days — note: the harness-hook channels require a PGLite serve socket — on this engine the hook lane stays quiet by design (pull-mode retrieval covers it)","name": "volunteer_channels","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","name": "memory_verbs_usage","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1/1 skills pass","name": "skill_conformance","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skill(s) compliant or exempt","name": "skill_brain_first","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "No skills.lock.json in <home>/skills — integrity check not applicable","name": "skills_manifest_integrity","status": "ok"@@@ -145,6 -145,6 +152,7 @@@"webhook-transforms"]},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -152,6 -152,6 +160,7 @@@},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no installed skills declare preconditions","name": "skill_preconditions","status": "ok"@@@ -163,6 -163,6 +172,7 @@@"out_of_band_settable": true,"reason": "disabled"},++ "elapsed_ms": "<volatile>","message": "memorable relay off (default)","name": "memorable_relay_health","status": "ok"@@@ -196,12 -196,12 +206,14 @@@"ttl_valid": true,"visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"},++ "elapsed_ms": "<volatile>","message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient","name": "memory_writeback","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat connectors configured (optional).","name": "connectors","status": "ok"@@@ -215,6 -215,6 +227,7 @@@"keys": [],"threshold": 3},++ "elapsed_ms": "<volatile>","message": "No dream key died 3+ times in 24h","name": "dream_paid_loop","status": "ok"@@@ -230,6 -230,6 +243,7 @@@"0.53.0"]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -262,18 -262,18 +276,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "mode=notify","name": "self_upgrade_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Bun <bun-version> (minimum 1.4.0)","name": "bun_runtime","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","name": "nightly_quality_probe_health","status": "ok"@@@ -284,12 -284,12 +301,14 @@@"kinds": [],"schema_version": 1},++ "elapsed_ms": "<volatile>","message": "no extractions in last 7 days","name": "extract_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","name": "conversation_facts_backlog","status": "ok"@@@ -301,6 -301,6 +320,7 @@@"known_approximation": "page backlog only; transcript corpus not counted","pack_declares_phase": false},++ "elapsed_ms": "<volatile>","message": "no pages awaiting atom extraction","name": "extract_atoms_backlog","status": "ok"@@@ -315,42 -315,42 +335,49 @@@"source_gone": 0,"total_atoms": 0},++ "elapsed_ms": "<volatile>","message": "no atoms to check","name": "atom_provenance_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No conversation-type pages — coverage check not applicable","name": "conversation_format_coverage","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No progressive-batch operations in the last 7 days","name": "progressive_batch_audit_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`","name": "conversation_parser_probe_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "gbrain home is outside any enclosing git worktree.","name": "home_dir_in_worktree","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No abandoned PGLite store under the gbrain home (engine: postgres).","name": "pglite_leftovers","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default","name": "default_source_local_path","status": "ok"@@@ -365,6 -365,6 +392,7 @@@"unreadable_sources": [],"walk_truncated": false},++ "elapsed_ms": "<volatile>","message": "No cross-source slug drift detected.","name": "multi_source_drift","status": "ok"@@@ -381,6 -381,6 +409,7 @@@"embedding_model": "voyage:voyage-4","shadows": []},++ "elapsed_ms": "<volatile>","message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.","name": "embedding_key_source","status": "ok"@@@ -391,6 -391,6 +420,7 @@@"decision": null,"provider_env": []},++ "elapsed_ms": "<volatile>","message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.","name": "provider_consent","readiness_state": "not_applicable",@@@ -402,6 -402,6 +432,7 @@@"details": {"reason": "no_harness_detected"},++ "elapsed_ms": "<volatile>","fix": {"actor": "user","consent": [@@@ -429,30 -429,30 +460,272 @@@"json_document_missing": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).","name": "agent_contract","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Connected, 20 pages","name": "connection","status": "ok"},{"category": "ops",++ "details": {++ "commands": [],++ "exact": true,++ "inspected": 2,++ "resources": [],++ "truncated": false++ },++ "elapsed_ms": "<volatile>",++ "message": "Managed write capacity is below 80% of every cumulative limit.",++ "name": "persistence_capacity",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "active_blockers": [],++ "config": {++ "receipt_retention_days": 30,++ "spike_factor": {++ "key": "persistence.terminal_failures.spike_factor",++ "value": 3++ },++ "spike_min": {++ "key": "persistence.terminal_failures.spike_min",++ "value": 25++ },++ "window_clamped": false,++ "window_days": {++ "key": "persistence.terminal_failures.window_days",++ "value": 7++ }++ },++ "count": 0,++ "defects": [],++ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",++ "historical_rows": 0,++ "new_last_24h": 0,++ "sources": [],++ "spike": {++ "daily_7d": [++ 0,++ 0,++ 0,++ 0,++ 0,++ 0,++ 0++ ],++ "last_24h": 0,++ "median_7d": 0,++ "spiking": false++ },++ "unresolved": {++ "distinct_intents": 0,++ "distinct_slugs": 0,++ "oldest_age_seconds": null,++ "rows": 0++ },++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No terminal write failures in the last 7 d.",++ "name": "persistence_terminal_failures",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",++ "parked": 0,++ "sources": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No managed sync is pending.",++ "name": "managed_sync_not_moving",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "docs": "docs/guides/troubleshooting.md#receipt-compaction",++ "recorded": false++ },++ "elapsed_ms": "<volatile>",++ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",++ "name": "receipt_compaction",++ "readiness_state": "not_applicable",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#serve-build-drift",++ "newer": [],++ "older": [],++ "owner": null,++ "this_version": "<version>"++ },++ "elapsed_ms": "<volatile>",++ "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",++ "name": "serve_build_drift",++ "status": "ok"++ },++ {++ "category": "meta",++ "details": {++ "code": "page_type_undeclared",++ "docs": "docs/architecture/schema-packs.md#undeclared-page-types",++ "per_source": [++ {++ "pack": "gbrain-base-v2",++ "source_id": "notes",++ "total": 19,++ "undeclared": 1,++ "undeclared_types": [++ {++ "count": 1,++ "type": "2024"++ }++ ],++ "untyped": 0++ },++ {++ "pack": "gbrain-base-v2",++ "source_id": "plain",++ "total": 1,++ "undeclared": 0,++ "undeclared_types": [],++ "untyped": 0++ }++ ],++ "unresolved_sources": []++ },++ "elapsed_ms": "<volatile>",++ "fix_unavailable_reason": "unstructured",++ "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn"++ },++ {++ "category": "brain",++ "details": {++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 1,++ "keyword_only": 0,++ "pending": 23,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 23,++ "embedded": 0,++ "ratio": 0++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 1,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }++ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",++ "consent": [++ "credentials",++ "paid"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."++ },++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Postgres driver supports safe query cancellation.","name": "postgres_cancellation_driver","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "pages has the UNIQUE(source_id, slug) upsert arbiter","name": "pages_upsert_arbiter","status": "ok"@@@ -463,24 -463,24 +736,12 @@@"readiness": "projection_pending","ready": false},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Visible pages have missing or stale text projections; search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.","name": "text_projection_readiness","status": "warn"},-- {-- "category": "ops",-- "details": {-- "commands": [],-- "exact": true,-- "inspected": 2,-- "resources": [],-- "truncated": false-- },-- "message": "Managed write capacity is below 80% of every cumulative limit.",-- "name": "persistence_capacity",-- "status": "ok"-- },{"category": "brain","details": {@@@ -490,6 -490,6 +751,7 @@@"parked_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No Git or withdrawal effect is parked.","name": "parked_effects","status": "ok"@@@ -499,6 -499,6 +761,7 @@@"details": {"refreshes": []},++ "elapsed_ms": "<volatile>","message": "No worktree refresh is stuck.","name": "worktree_refresh_stuck","status": "ok"@@@ -510,6 -510,6 +773,7 @@@"page_child_source_columns": [],"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"},++ "elapsed_ms": "<volatile>","message": "Guarded tables carry only the columns gbrain creates.","name": "managed_guard_schema_drift","status": "ok"@@@ -523,42 -523,42 +787,49 @@@"unclassified_p0001": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No write was refused by a database guard in the last 7 days.","name": "publication_refusals","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "links_link_source_check has the v114 kebab-case gate","name": "links_link_source_check","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "RLS enabled on 134/134 public tables","name": "rls","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Version <latest> (latest: <latest>)","name": "schema_version","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "1121 column(s) verified against live schema","name": "schema_columns","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Auto-RLS event trigger installed","name": "rls_event_trigger","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -606,6 -606,98 +877,7 @@@},{"category": "brain",- "details": {- "active_column": "embedding",- "basis": "exact",- "counts": {- "chunkless_healable": 0,- "deleted_page_chunks": 0,- "embedded": 0,- "empty": 1,- "keyword_only": 0,- "pending": 23,- "quarantined": 0- },- "coverage": {- "basis": "exact",- "eligible": 23,- "embedded": 0,- "ratio": 0- },- "covering_index": null,- "deleted_page_chunks": {- "past_window": 0,- "window_hours": 72,- "within_window": 0- },- "embeddings_enabled": false,- "exact": true,- "keyword_only": {- "marker_bytes": 0,- "pages": 0,- "reason": "embed_skip",- "threshold_bytes": 500000- },- "mode": "full",- "omitted_states": [],- "reason": "embeddings_disabled",- "status": "known",- "units": "content_chunks rows, plus one unit per page with no chunk rows",- "unsearchable": 1,- "unsearchable_complete": true,- "unstamped_pending": {- "count": 0,- "created_at_lower_bound": null,- "writer_version": "<version>"- }- },- "fix": {- "actor": "user",- "argv": [- "gbrain",- "init",- "--force",- "--embedding-model",- "voyage:voyage-4",- "--embedding-dimensions",- "1024"- ],- "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",- "consent": [- "credentials",- "paid"- ],- "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",- "inputs": [- {- "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",- "name": "VOYAGE_API_KEY"- }- ],- "next": "tell_user_to_run",- "requires_exclusive": true,- "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",- "verify": {- "argv": [- "gbrain",- "doctor",- "--only",- "embeddings",- "--json",- "--brain",- "host"- ]- },- "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."- },- "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",- "name": "embedding_state",- "readiness_state": "disabled_by_choice",- "severity": "info",- "status": "ok"- },- {- "category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -653,24 -745,24 +925,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled","name": "embedding_column_registry","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding env overrides set","name": "embedding_env_override","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding migration in flight","name": "embedding_migration_state","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.","name": "supersession_calibration","readiness_state": "not_applicable",@@@ -679,24 -771,24 +955,28 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat_fallback_chain is set: every chat call uses only its own model.","name": "chat_fallback_chain","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.","name": "behavior_changes","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale","name": "graph_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -730,24 -822,24 +1010,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.","name": "orphan_ratio","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No by-mention links in this brain.","name": "stale_mentions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No orphaned timeline rows across 4 page(s).","name": "timeline_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No slug collisions across 3 source checkout(s).","name": "slug_collisions","status": "ok"@@@ -763,6 -855,6 +1047,7 @@@"repair": "timeline","truncated": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -804,6 -896,6 +1089,7 @@@"unstamped_atoms": 0,"unstamped_concepts": 0},++ "elapsed_ms": "<volatile>","message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.","name": "derived_visibility","status": "ok"@@@ -817,6 -909,6 +1103,7 @@@"repair": "safe-chunks","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every re-sealable page is at the safe-chunk index version.","name": "safe_index_pending","status": "ok"@@@ -829,6 -921,6 +1116,7 @@@"pages_pending": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No page waits for the credential-safe re-chunk.","name": "credential_projection_pending","status": "ok"@@@ -843,6 -935,6 +1131,7 @@@"retries": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No orphan connector checkpoint rows older than 7 days.","name": "connector_checkpoints","status": "ok"@@@ -869,6 -961,6 +1158,7 @@@],"repair": "request-indexes"},++ "elapsed_ms": "<volatile>","message": "Managed sync request indexes are valid.","name": "persistence_request_indexes","status": "ok"@@@ -907,6 -999,6 +1197,7 @@@"verify": "gbrain doctor --json (check persistence_request_growth)","window_days": 7},++ "elapsed_ms": "<volatile>","message": "~22 request row(s); no scope exhausts its lifetime request IDs within 90 days at its last-7-day rate.","name": "persistence_request_growth","status": "ok"@@@ -914,87 -1006,87 +1205,37 @@@{"category": "ops","details": {- "config_key": "persistence.max_claim_ms",- "count": 0,- "docs": "docs/guides/troubleshooting.md#persistence-write-stall",- "max_claim_ms": "<volatile>",- "preparation_policy": {- "maintenance_preparation_ms": "<volatile>",- "max_preparation_attempts": 2,- "preparation_ceiling_ms": "<volatile>",- "sync_preparation_ms": "<volatile>"- },- "stalls": []- },- "message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).",- "name": "persistence_write_stall",- "status": "ok"- },- {- "category": "ops",- "details": {- "compacted_unreplayable": 0,- "count": 0,- "docs": "docs/guides/repair.md#failed-writes",- "repair": "failed-writes",- "writes": []- },- "message": "Every caller write with a retained receipt committed or was superseded.",- "name": "lost_caller_writes",- "status": "ok"- },- {- "category": "ops",- "details": {- "active_blockers": [],- "config": {- "receipt_retention_days": 30,- "spike_factor": {- "key": "persistence.terminal_failures.spike_factor",- "value": 3- },- "spike_min": {- "key": "persistence.terminal_failures.spike_min",- "value": 25- },- "window_clamped": false,- "window_days": {- "key": "persistence.terminal_failures.window_days",- "value": 7- }- },- "count": 0,- "defects": [],- "docs": "docs/guides/troubleshooting.md#terminal-write-failures",- "historical_rows": 0,- "new_last_24h": 0,- "sources": [],- "spike": {- "daily_7d": [- 0,- 0,- 0,- 0,- 0,- 0,- 0- ],- "last_24h": 0,- "median_7d": 0,- "spiking": false- },- "unresolved": {- "distinct_intents": 0,- "distinct_slugs": 0,- "oldest_age_seconds": null,- "rows": 0+ "config_key": "persistence.max_claim_ms",+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#persistence-write-stall",+ "max_claim_ms": "<volatile>",+ "preparation_policy": {+ "maintenance_preparation_ms": "<volatile>",+ "max_preparation_attempts": 2,+ "preparation_ceiling_ms": "<volatile>",+ "sync_preparation_ms": "<volatile>"},- "window_days": 7+ "stalls": []},- "message": "No terminal write failures in the last 7 d.",- "name": "persistence_terminal_failures",++ "elapsed_ms": "<volatile>",+ "message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).",+ "name": "persistence_write_stall",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "compacted_unreplayable": 0,+ "count": 0,+ "docs": "docs/guides/repair.md#failed-writes",+ "repair": "failed-writes",+ "writes": []+ },++ "elapsed_ms": "<volatile>",+ "message": "Every caller write with a retained receipt committed or was superseded.",+ "name": "lost_caller_writes","status": "ok"},- {- "category": "ops",- "details": {- "active_blockers": [],- "config": {- "receipt_retention_days": 30,- "spike_factor": {- "key": "persistence.terminal_failures.spike_factor",- "value": 3- },- "spike_min": {- "key": "persistence.terminal_failures.spike_min",- "value": 25- },- "window_clamped": false,- "window_days": {- "key": "persistence.terminal_failures.window_days",- "value": 7- }- },- "count": 0,- "defects": [],- "docs": "docs/guides/troubleshooting.md#terminal-write-failures",- "historical_rows": 0,- "new_last_24h": 0,- "sources": [],- "spike": {- "daily_7d": [- 0,- 0,- 0,- 0,- 0,- 0,- 0- ],- "last_24h": 0,- "median_7d": 0,- "spiking": false- },- "unresolved": {- "distinct_intents": 0,- "distinct_slugs": 0,- "oldest_age_seconds": null,- "rows": 0- },- "window_days": 7- },- "message": "No terminal write failures in the last 7 d.",- "name": "persistence_terminal_failures",- "status": "ok"- },{"category": "ops","details": {@@@ -1002,6 -1094,6 +1243,7 @@@"configured": "5min","docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"},++ "elapsed_ms": "<volatile>","message": "The session statement_timeout (5min) reaches the server.","name": "persistence_session_timeouts","status": "ok"@@@ -1013,6 -1105,6 +1255,7 @@@"held": 0,"sources": []},++ "elapsed_ms": "<volatile>","message": "No connector items are held.","name": "connector_held_items","status": "ok"@@@ -1079,6 -1171,6 +1322,7 @@@}]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1119,6 -1211,6 +1363,7 @@@"docs": "docs/guides/repair.md#held-files","hooks": []},++ "elapsed_ms": "<volatile>","message": "No outdated gbrain frontmatter pre-commit hook is installed.","name": "frontmatter_hook","status": "ok"@@@ -1132,6 -1224,6 +1377,7 @@@"repair": "orphan-bindings","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every persistence source binding belongs to an existing source.","name": "orphan_persistence_bindings","status": "ok"@@@ -1143,6 -1235,6 +1389,7 @@@"docs": "docs/guides/write-refusals.md#foreign-ownership-marker","markers": []},++ "elapsed_ms": "<volatile>","message": "Every ownership marker beside a source checkout belongs to this brain.","name": "foreign_ownership_marker","status": "ok"@@@ -1153,6 -1245,6 +1400,7 @@@"sources": [],"total": 0},++ "elapsed_ms": "<volatile>","message": "No page was written database-only to an unbound source.","name": "unbound_source","status": "ok"@@@ -1182,6 -1274,6 +1430,7 @@@"truncated": false,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.","name": "writer_version","status": "ok"@@@ -1194,6 -1286,6 +1443,7 @@@"truncated": false,"unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No session corpus is configured; nothing to classify.","name": "self_capture","status": "ok"@@@ -1208,6 -1300,6 +1458,7 @@@"outcome": "skipped","reason": "small_brain"},++ "elapsed_ms": "<volatile>","message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.","name": "vector_plan","status": "ok"@@@ -1221,6 -1313,6 +1472,7 @@@"reason": "small_brain","timeout_ms": "<volatile>"},++ "elapsed_ms": "<volatile>","message": "Skipped: fewer than 10000 chunks by the planner's estimate; the keyword statements finish well inside search.keyword_statement_timeout_ms = 8000 ms (range 1000-60000).","name": "keyword_plan","status": "ok"@@@ -1239,6 -1331,6 +1491,7 @@@"stale_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No committed write has a stale queued or failed embedding effect.","name": "stale_embedding_effects","status": "ok"@@@ -1251,6 -1343,6 +1504,7 @@@"repair": "google-file-modes","sources": []},++ "elapsed_ms": "<volatile>","message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.","name": "google_file_modes","status": "ok"@@@ -1264,6 -1356,6 +1518,7 @@@"excluded": 0,"repair": "extractor-facts"},++ "elapsed_ms": "<volatile>","message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.","name": "extractor_facts_expired","status": "ok"@@@ -1276,6 -1368,6 +1531,7 @@@"evidenced": 0,"repair": "conversation-labels"},++ "elapsed_ms": "<volatile>","message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).","name": "conversation_label_facts","status": "ok"@@@ -1291,6 -1383,6 +1547,7 @@@"stale": 0,"unstamped": 0},++ "elapsed_ms": "<volatile>","message": "No conversation extraction outcome predates extractor version 1.","name": "conversation_outcomes_stale","status": "ok"@@@ -1305,6 -1397,6 +1562,7 @@@"repair": "captured-facts","unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.","name": "captured_facts_active","status": "ok"@@@ -1316,6 -1408,6 +1574,7 @@@"drifted": 0,"repair": "loop-facts"},++ "elapsed_ms": "<volatile>","message": "Every closed commitment loop has its fact retired.","name": "loop_facts_drift","status": "ok"@@@ -1329,6 -1421,6 +1588,7 @@@"repair": "ontology-facts","retired": 0},++ "elapsed_ms": "<volatile>","message": "No ontology observation is held by a page's Facts table.","name": "ontology_facts_fenced","status": "ok"@@@ -1342,6 -1434,6 +1602,7 @@@"source_ids": [],"sources": []},++ "elapsed_ms": "<volatile>","message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).","name": "stale_frontmatter_keys","status": "ok"@@@ -1356,102 -1448,102 +1617,119 @@@"sources": [],"window_sequences": 20000},++ "elapsed_ms": "<volatile>","message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.","name": "maintenance_write_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).","name": "extraction_date_grounding","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sampled 20 pages; no bare-tweet phrases or external links.","name": "integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All JSONB columns store objects/arrays","name": "jsonb_integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No takes yet","name": "takes_weight_grid","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All FK-child tables clean (10 tables checked)","name": "child_table_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All synthesized pages carry a raw trace or explicit exemption","name": "raw_provenance","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All source config values are JSON objects","name": "source_config_shape","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","name": "whoknows_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All image-asset chunks have modality=image","name": "cross_modal_modality_backfill","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "search.unified_multimodal is off; coverage check N/A","name": "unified_multimodal_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No truncated bodies detected","name": "markdown_body_completeness","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No pages exceed 500000 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)","name": "oversized_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)","name": "scraper_junk_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","name": "content_sanity_audit_recent","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No quarantined pages","name": "quarantined_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No flagged pages","name": "flagged_pages","status": "ok"@@@ -1463,12 -1555,12 +1741,14 @@@"days": 7,"source_id": null},++ "elapsed_ms": "<volatile>","message": "No stale unverified extraction stubs","name": "unverified_extractions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes","name": "frontmatter_integrity",@@@ -1522,6 -1614,6 +1802,7 @@@],"unscanned": []},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1555,30 -1647,30 +1836,35 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "No capture failures in the last 24h","name": "eval_capture","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","name": "contradictions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).","name": "facts_extraction_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","name": "effective_date_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","name": "salience_health","status": "ok"@@@ -1590,24 -1682,24 +1876,28 @@@"oldest_age_seconds": null,"worker_alive": true},++ "elapsed_ms": "<volatile>","message": "No stalled-forever jobs; no queue over depth 10; no old embed-backfill jobs without a worker.","name": "queue_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","name": "subagent_capability","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","name": "facts_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Brain-wide maintenance jobs are finishing within their deadline.","name": "global_maintenance_timeouts","status": "ok"@@@ -1630,6 -1722,6 +1920,7 @@@"unsupported": 0,"unsupported_ids": []},++ "elapsed_ms": "<volatile>","message": "No queued job predates submission authority.","name": "legacy_job_authority","status": "ok"@@@ -1643,6 -1735,6 +1934,7 @@@"malformed": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.","name": "legacy_token_grant_shape","status": "ok"@@@ -1654,6 -1746,6 +1946,7 @@@"drift": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "No legacy token grant has drifted from its permissions mirror.","name": "legacy_token_grant_drift","status": "ok"@@@ -1665,6 -1757,6 +1958,7 @@@"null_scope_count": 0,"tokens": []},++ "elapsed_ms": "<volatile>","message": "Every active legacy token has explicit scopes.","name": "legacy_token_null_scope","status": "ok"@@@ -1676,18 -1768,18 +1970,21 @@@"grants": [],"server_surface": "full"},++ "elapsed_ms": "<volatile>","message": "Every active client and token can call the operations its scopes allow.","name": "grant_new_ops_available","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No image assets indexed yet","name": "image_assets","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "OCR not in use (or no images ingested with OCR opt-in)","name": "ocr_health","status": "ok"@@@ -1701,6 -1793,6 +1998,7 @@@"unsupported_holds": 0,"without_image_vector": 0},++ "elapsed_ms": "<volatile>","message": "No image pages indexed yet.","name": "image_embedding_coverage","status": "ok"@@@ -1713,6 -1805,6 +2011,7 @@@"unchanged_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness",@@@ -1725,6 -1817,6 +2024,7 @@@"recovering_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","message": "1 writer-owned content source(s); no pending canonical publication or recovery.","name": "canonical_content_writes","status": "ok"@@@ -1747,6 -1839,6 +2047,7 @@@"unpushed": 0}},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -1791,18 -1883,18 +2092,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.","name": "sync_consolidation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)","name": "links_extraction_lag","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.","name": "cycle_freshness","readiness_state": "not_applicable",@@@ -1811,24 -1903,24 +2115,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No same-source content-hash duplicate groups","name": "content_hash_duplicates","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All code-page chunks carry symbol metadata","name": "code_chunk_metadata","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/).","name": "undeclared_db_only_pages","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No configured collectors declare output paths","name": "db_only_collector_collision","status": "ok"@@@ -1839,12 -1931,12 +2147,14 @@@"checkouts": 1,"tracked": []},++ "elapsed_ms": "<volatile>","message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).","name": "tracked_ownership_marker","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "System One is off (every decide slot is off; nothing is sent).","name": "decide_health","status": "ok"@@@ -1875,6 -1967,6 +2185,7 @@@"unlinked": 0}},++ "elapsed_ms": "<volatile>","message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none","name": "unlinked_facts","status": "ok"@@@ -1893,6 -1985,6 +2204,7 @@@"relationships": {},"stale_assertions": []},++ "elapsed_ms": "<volatile>","message": "relationships: none yet; read policy on; contradiction mode propose (default)","name": "edge_validity","status": "ok"@@@ -1931,6 -2023,6 +2243,7 @@@"unpricedCalls": 0}},++ "elapsed_ms": "<volatile>","message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.","name": "auto_chronicle","readiness_state": "missing",@@@ -1938,6 -2030,6 +2251,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "chronicle.* settings are valid.","name": "chronicle_config_invalid","status": "ok"@@@ -2049,6 -2141,6 +2363,7 @@@},"severity": "info"},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2100,6 -2192,6 +2415,7 @@@"health": "not_applicable","last_run": null},++ "elapsed_ms": "<volatile>","message": "Postgres brains run facts-absorb jobs on the job worker (gbrain jobs supervisor), not the automatic drain.","name": "facts_drain","readiness_state": "not_applicable",@@@ -2111,6 -2203,6 +2427,7 @@@"details": {"applicable": false},++ "elapsed_ms": "<volatile>","message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).","name": "fact_take_vectors","readiness_state": "disabled_by_choice",@@@ -2134,6 -2226,6 +2451,7 @@@"missing_search_statistics": [],"stale": []},++ "elapsed_ms": "<volatile>","message": "Planner statistics are fresh on 6 hot tables.","name": "planner_stats_stale","status": "ok"@@@ -2154,6 -2246,6 +2472,7 @@@"weights": 0,"weights_off_neutral": 0},++ "elapsed_ms": "<volatile>","message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true","name": "retrieval_feedback_health","status": "ok"@@@ -2165,6 -2257,6 +2484,7 @@@"failed": [],"pending": 0},++ "elapsed_ms": "<volatile>","message": "Every page has its revision; the page revision backfill is complete.","name": "revision_backfill","status": "ok"@@@ -2242,6 -2334,6 +2562,7 @@@],"unknown_pct": 10},++ "elapsed_ms": "<volatile>","message": "10% of 30 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for.","name": "trust_tiers","status": "ok"@@@ -2259,6 -2351,6 +2580,7 @@@"timeline_entries": 0}},++ "elapsed_ms": "<volatile>","message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.","name": "trust_scan","status": "ok"@@@ -2270,6 -2362,6 +2592,7 @@@"pending": [],"unclaimed": []},++ "elapsed_ms": "<volatile>","message": "No unclaimed source holds rows from before trust tiers.","name": "trust_sources_unclaimed","status": "ok"@@@ -2285,22 -2377,22 +2608,11 @@@"enabled": false,"pages": 0},++ "elapsed_ms": "<volatile>","message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.","name": "core_memory","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",-- "parked": 0,-- "sources": []-- },-- "message": "No managed sync is pending.",-- "name": "managed_sync_not_moving",-- "status": "ok"-- },{"category": "ops","details": {@@@ -2309,6 -2401,6 +2621,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","min_age_ms": "<volatile>"},++ "elapsed_ms": "<volatile>","message": "No persistence consumer is running on this host.","name": "two_consumers_on_host","status": "ok"@@@ -2320,6 -2412,6 +2633,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","owners": []},++ "elapsed_ms": "<volatile>","message": "Every owner of a live running claim on this host has a consumer heartbeat row.","name": "consumers_without_heartbeat","status": "ok"@@@ -2333,24 -2425,24 +2647,11 @@@"host_json_path": "<home>/.gbrain/persistence/host.json","mismatches": []},++ "elapsed_ms": "<volatile>","message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.","name": "host_identity_mismatch","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#serve-build-drift",-- "newer": [],-- "older": [],-- "owner": null,-- "this_version": "<version>"-- },-- "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",-- "name": "serve_build_drift",-- "status": "ok"-- },{"category": "brain","details": {@@@ -2358,6 -2450,6 +2659,7 @@@"held": 0,"items": []},++ "elapsed_ms": "<volatile>","message": "No managed atom page or transcript is held after repeated extraction failures.","name": "extract_atoms_held_failed","status": "ok"@@@ -2592,6 -2684,6 +2894,7 @@@},"warn_at_normalized_7d": 20},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2656,6 -2748,6 +2959,7 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).","name": "search_mode","status": "ok"@@@ -2670,114 -2762,114 +2974,133 @@@".raw/"]},++ "elapsed_ms": "<volatile>","message": "No pages hidden by search-exclude policy.","name": "hidden_by_search_policy","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No retrieval-affecting files changed in working tree.","name": "eval_drift","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Reranker disabled — no failures expected","name": "reranker_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No exhausted batch retries in last 24h. Disconnect-call audit: 14 call(s) in 24h (most recent caller: <frame>).","name": "batch_retry_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No wedged queues","name": "wedged_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No orphaned private queues","name": "orphaned_private_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No supervisor observed — skipping fan-out/concurrency check","name": "autopilot_fanout_concurrency","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "no Google accounts connected (gbrain google connect to start)","name": "google_oauth","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "graph_signals disabled — coverage not checked","name": "graph_signals_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)","name": "junk_entity_hubs","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","name": "brainstorm_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.","name": "link_resolution_opportunity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings disabled — no active embedding width to reconcile.","name": "embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "gateway not configured — facts.embedding width check skipped.","name": "facts_embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Multi-source brain (2 non-default source(s)); all populated","name": "source_routing_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No OAuth clients registered","name": "oauth_confidential_client_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","name": "oauth_client_scope_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Lock path: <home>/.gbrain/autopilot.lock","name": "autopilot_lock_scope","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No stale locks (no rows with ttl_expires_at < NOW())","name": "stale_locks","status": "ok"@@@ -2822,12 -2914,12 +3145,14 @@@"synthesize_concepts": "global"}},++ "elapsed_ms": "<volatile>","message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -2875,18 -2967,18 +3200,21 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "entity_link_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "timeline_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -2926,18 -3018,18 +3254,21 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Active pack [email protected]+a50a67b9 is current (no successor declared)","name": "pack_upgrade_available","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "5 distinct typed values (pack gbrain-base-v2 declares 20)","name": "type_proliferation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No dangling aliases","name": "dangling_aliases","status": "ok"@@@ -2945,7 -3037,7 +3276,7 @@@],"db_url_source": null,"engine": "postgres",-- "health_score": 40,++ "health_score": 35,"schema_version": 2,"status": "unhealthy","top_issues": [@@@ -3126,6 -3218,6 +3457,12 @@@"status": "warn","tier": "symptom"},++ {++ "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn",++ "tier": "symptom"++ },{"fix": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -3192,13 -3284,13 +3529,14 @@@],"category_scores": {"brain": 45,-- "meta": 100,++ "meta": 95,"ops": 100,"skill": 95},"checks": [{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skills, all reachable","name": "resolver_health","status": "ok"@@@ -3213,6 -3305,6 +3551,7 @@@"path": "postgres direct","policy_skill_installed": false},++ "elapsed_ms": "<volatile>","message": "postgres direct; enabled; not observed firing yet — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`","name": "retrieval_reflex_health","status": "ok"@@@ -3223,30 -3315,30 +3562,35 @@@"channels": {},"window_days": 7},++ "elapsed_ms": "<volatile>","message": "no push-context activity in 7 days — note: the harness-hook channels require a PGLite serve socket — on this engine the hook lane stays quiet by design (pull-mode retrieval covers it)","name": "volunteer_channels","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","name": "memory_verbs_usage","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1/1 skills pass","name": "skill_conformance","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "1 skill(s) compliant or exempt","name": "skill_brain_first","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "No skills.lock.json in <home>/skills — integrity check not applicable","name": "skills_manifest_integrity","status": "ok"@@@ -3322,6 -3414,6 +3666,7 @@@"webhook-transforms"]},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",@@@ -3329,6 -3421,6 +3674,7 @@@},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "no installed skills declare preconditions","name": "skill_preconditions","status": "ok"@@@ -3340,6 -3432,6 +3686,7 @@@"out_of_band_settable": true,"reason": "disabled"},++ "elapsed_ms": "<volatile>","message": "memorable relay off (default)","name": "memorable_relay_health","status": "ok"@@@ -3373,12 -3465,12 +3720,14 @@@"ttl_valid": true,"visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"},++ "elapsed_ms": "<volatile>","message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient","name": "memory_writeback","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat connectors configured (optional).","name": "connectors","status": "ok"@@@ -3392,6 -3484,6 +3741,7 @@@"keys": [],"threshold": 3},++ "elapsed_ms": "<volatile>","message": "No dream key died 3+ times in 24h","name": "dream_paid_loop","status": "ok"@@@ -3407,6 -3499,6 +3757,7 @@@"0.53.0"]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3439,18 -3531,18 +3790,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "mode=notify","name": "self_upgrade_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Bun <bun-version> (minimum 1.4.0)","name": "bun_runtime","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","name": "nightly_quality_probe_health","status": "ok"@@@ -3461,12 -3553,12 +3815,14 @@@"kinds": [],"schema_version": 1},++ "elapsed_ms": "<volatile>","message": "no extractions in last 7 days","name": "extract_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","name": "conversation_facts_backlog","status": "ok"@@@ -3478,6 -3570,6 +3834,7 @@@"known_approximation": "page backlog only; transcript corpus not counted","pack_declares_phase": false},++ "elapsed_ms": "<volatile>","message": "no pages awaiting atom extraction","name": "extract_atoms_backlog","status": "ok"@@@ -3492,144 -3584,144 +3849,397 @@@"source_gone": 0,"total_atoms": 0},++ "elapsed_ms": "<volatile>","message": "no atoms to check","name": "atom_provenance_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No conversation-type pages — coverage check not applicable","name": "conversation_format_coverage","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No progressive-batch operations in the last 7 days","name": "progressive_batch_audit_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`","name": "conversation_parser_probe_health","status": "ok"},{"category": "ops",- "message": "gbrain home is outside any enclosing git worktree.",- "name": "home_dir_in_worktree",++ "elapsed_ms": "<volatile>",+ "message": "gbrain home is outside any enclosing git worktree.",+ "name": "home_dir_in_worktree",+ "status": "ok"+ },+ {+ "category": "ops",++ "elapsed_ms": "<volatile>",+ "message": "No abandoned PGLite store under the gbrain home (engine: postgres).",+ "name": "pglite_leftovers",+ "status": "ok"+ },+ {+ "category": "meta",++ "elapsed_ms": "<volatile>",+ "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",+ "name": "default_source_local_path",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",+ "git_root_skipped": [],+ "limit": 10000,+ "timeout_ms": "<volatile>",+ "unreadable_sources": [],+ "walk_truncated": false+ },++ "elapsed_ms": "<volatile>",+ "message": "No cross-source slug drift detected.",+ "name": "multi_source_drift",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#embedding-key-source",+ "embedding_key": {+ "config_key": "voyage_api_key",+ "kind": "missing",+ "variable": "VOYAGE_API_KEY"+ },+ "embedding_model": "voyage:voyage-4",+ "shadows": []+ },++ "elapsed_ms": "<volatile>",+ "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",+ "name": "embedding_key_source",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "decision": null,+ "provider_env": []+ },++ "elapsed_ms": "<volatile>",+ "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",+ "name": "provider_consent",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "reason": "no_harness_detected"+ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "consent": [++ "persistent_install"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",++ "next": "report",++ "requires_exclusive": false,++ "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",++ "why": "Register `<absolute path to gbrain> serve --surface full` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."++ },++ "message": "No agent harness was detected. Wire one when the user picks an agent app.",++ "name": "harness_wiring",++ "readiness_state": "missing",++ "severity": "info",++ "status": "ok"++ },++ {++ "category": "meta",++ "details": {++ "consent_refused": 0,++ "derived_cap_exhausted": 0,++ "events": 0,++ "internal_errors": 0,++ "json_document_missing": 0,++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",++ "name": "agent_contract",++ "status": "ok"++ },++ {++ "category": "ops",++ "elapsed_ms": "<volatile>",++ "message": "Connected, 20 pages",++ "name": "connection",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "commands": [],++ "exact": true,++ "inspected": 2,++ "resources": [],++ "truncated": false++ },++ "elapsed_ms": "<volatile>",++ "message": "Managed write capacity is below 80% of every cumulative limit.",++ "name": "persistence_capacity",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "active_blockers": [],++ "config": {++ "receipt_retention_days": 30,++ "spike_factor": {++ "key": "persistence.terminal_failures.spike_factor",++ "value": 3++ },++ "spike_min": {++ "key": "persistence.terminal_failures.spike_min",++ "value": 25++ },++ "window_clamped": false,++ "window_days": {++ "key": "persistence.terminal_failures.window_days",++ "value": 7++ }++ },++ "count": 0,++ "defects": [],++ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",++ "historical_rows": 0,++ "new_last_24h": 0,++ "sources": [],++ "spike": {++ "daily_7d": [++ 0,++ 0,++ 0,++ 0,++ 0,++ 0,++ 0++ ],++ "last_24h": 0,++ "median_7d": 0,++ "spiking": false++ },++ "unresolved": {++ "distinct_intents": 0,++ "distinct_slugs": 0,++ "oldest_age_seconds": null,++ "rows": 0++ },++ "window_days": 7++ },++ "elapsed_ms": "<volatile>",++ "message": "No terminal write failures in the last 7 d.",++ "name": "persistence_terminal_failures",++ "status": "ok"++ },++ {++ "category": "ops",++ "details": {++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",++ "parked": 0,++ "sources": []++ },++ "elapsed_ms": "<volatile>",++ "message": "No managed sync is pending.",++ "name": "managed_sync_not_moving",+ "status": "ok"+ },+ {+ "category": "ops",- "message": "No abandoned PGLite store under the gbrain home (engine: postgres).",- "name": "pglite_leftovers",- "status": "ok"- },- {- "category": "meta",- "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",- "name": "default_source_local_path",- "status": "ok"- },- {- "category": "meta",+ "details": {- "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",- "git_root_skipped": [],- "limit": 10000,- "timeout_ms": "<volatile>",- "unreadable_sources": [],- "walk_truncated": false++ "docs": "docs/guides/troubleshooting.md#receipt-compaction",++ "recorded": false+ },- "message": "No cross-source slug drift detected.",- "name": "multi_source_drift",++ "elapsed_ms": "<volatile>",++ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",++ "name": "receipt_compaction",++ "readiness_state": "not_applicable",++ "severity": "info",+ "status": "ok"+ },+ {- "category": "brain",++ "category": "ops",+ "details": {- "docs": "docs/guides/repair.md#embedding-key-source",- "embedding_key": {- "config_key": "voyage_api_key",- "kind": "missing",- "variable": "VOYAGE_API_KEY"- },- "embedding_model": "voyage:voyage-4",- "shadows": []++ "count": 0,++ "docs": "docs/guides/troubleshooting.md#serve-build-drift",++ "newer": [],++ "older": [],++ "owner": null,++ "this_version": "<version>"+ },- "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",- "name": "embedding_key_source",++ "elapsed_ms": "<volatile>",++ "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",++ "name": "serve_build_drift",+ "status": "ok"+ },+ {- "category": "ops",++ "category": "meta",+ "details": {- "decision": null,- "provider_env": []++ "code": "page_type_undeclared",++ "docs": "docs/architecture/schema-packs.md#undeclared-page-types",++ "per_source": [++ {++ "pack": "gbrain-base-v2",++ "source_id": "notes",++ "total": 19,++ "undeclared": 1,++ "undeclared_types": [++ {++ "count": 1,++ "type": "2024"++ }++ ],++ "untyped": 0++ },++ {++ "pack": "gbrain-base-v2",++ "source_id": "plain",++ "total": 1,++ "undeclared": 0,++ "undeclared_types": [],++ "untyped": 0++ }++ ],++ "unresolved_sources": []+ },- "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",- "name": "provider_consent",- "readiness_state": "not_applicable",- "severity": "info",- "status": "ok"++ "elapsed_ms": "<volatile>",++ "fix_unavailable_reason": "unstructured",++ "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn"+ },+ {- "category": "ops",++ "category": "brain",+ "details": {- "reason": "no_harness_detected"++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 1,++ "keyword_only": 0,++ "pending": 23,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 23,++ "embedded": 0,++ "ratio": 0++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 1,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }+ },++ "elapsed_ms": "<volatile>","fix": {"actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024","consent": [-- "persistent_install"++ "credentials",++ "paid"],-- "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",-- "next": "report",-- "requires_exclusive": false,-- "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",-- "why": "Register `<absolute path to gbrain> serve --surface full` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."},-- "message": "No agent harness was detected. Wire one when the user picks an agent app.",-- "name": "harness_wiring",-- "readiness_state": "missing",++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice","severity": "info","status": "ok"},-- {-- "category": "meta",-- "details": {-- "consent_refused": 0,-- "derived_cap_exhausted": 0,-- "events": 0,-- "internal_errors": 0,-- "json_document_missing": 0,-- "window_days": 7-- },-- "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",-- "name": "agent_contract",-- "status": "ok"-- },-- {-- "category": "ops",-- "message": "Connected, 20 pages",-- "name": "connection",-- "status": "ok"-- },{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Postgres driver supports safe query cancellation.","name": "postgres_cancellation_driver","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "pages has the UNIQUE(source_id, slug) upsert arbiter","name": "pages_upsert_arbiter","status": "ok"@@@ -3640,24 -3732,24 +4250,12 @@@"readiness": "projection_pending","ready": false},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Visible pages have missing or stale text projections; search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.","name": "text_projection_readiness","status": "warn"},-- {-- "category": "ops",-- "details": {-- "commands": [],-- "exact": true,-- "inspected": 2,-- "resources": [],-- "truncated": false-- },-- "message": "Managed write capacity is below 80% of every cumulative limit.",-- "name": "persistence_capacity",-- "status": "ok"-- },{"category": "brain","details": {@@@ -3667,6 -3759,6 +4265,7 @@@"parked_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No Git or withdrawal effect is parked.","name": "parked_effects","status": "ok"@@@ -3676,6 -3768,6 +4275,7 @@@"details": {"refreshes": []},++ "elapsed_ms": "<volatile>","message": "No worktree refresh is stuck.","name": "worktree_refresh_stuck","status": "ok"@@@ -3687,6 -3779,6 +4287,7 @@@"page_child_source_columns": [],"runbook": "docs/guides/write-refusals.md#managed-guard-page-children"},++ "elapsed_ms": "<volatile>","message": "Guarded tables carry only the columns gbrain creates.","name": "managed_guard_schema_drift","status": "ok"@@@ -3700,42 -3792,42 +4301,49 @@@"unclassified_p0001": 0,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "No write was refused by a database guard in the last 7 days.","name": "publication_refusals","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "links_link_source_check has the v114 kebab-case gate","name": "links_link_source_check","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "RLS enabled on 134/134 public tables","name": "rls","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Version <latest> (latest: <latest>)","name": "schema_version","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "1121 column(s) verified against live schema","name": "schema_columns","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Auto-RLS event trigger installed","name": "rls_event_trigger","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -3783,6 -3875,98 +4391,7 @@@},{"category": "brain",- "details": {- "active_column": "embedding",- "basis": "exact",- "counts": {- "chunkless_healable": 0,- "deleted_page_chunks": 0,- "embedded": 0,- "empty": 1,- "keyword_only": 0,- "pending": 23,- "quarantined": 0- },- "coverage": {- "basis": "exact",- "eligible": 23,- "embedded": 0,- "ratio": 0- },- "covering_index": null,- "deleted_page_chunks": {- "past_window": 0,- "window_hours": 72,- "within_window": 0- },- "embeddings_enabled": false,- "exact": true,- "keyword_only": {- "marker_bytes": 0,- "pages": 0,- "reason": "embed_skip",- "threshold_bytes": 500000- },- "mode": "full",- "omitted_states": [],- "reason": "embeddings_disabled",- "status": "known",- "units": "content_chunks rows, plus one unit per page with no chunk rows",- "unsearchable": 1,- "unsearchable_complete": true,- "unstamped_pending": {- "count": 0,- "created_at_lower_bound": null,- "writer_version": "<version>"- }- },- "fix": {- "actor": "user",- "argv": [- "gbrain",- "init",- "--force",- "--embedding-model",- "voyage:voyage-4",- "--embedding-dimensions",- "1024"- ],- "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",- "consent": [- "credentials",- "paid"- ],- "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",- "inputs": [- {- "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",- "name": "VOYAGE_API_KEY"- }- ],- "next": "tell_user_to_run",- "requires_exclusive": true,- "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",- "verify": {- "argv": [- "gbrain",- "doctor",- "--only",- "embeddings",- "--json",- "--brain",- "host"- ]- },- "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."- },- "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",- "name": "embedding_state",- "readiness_state": "disabled_by_choice",- "severity": "info",- "status": "ok"- },- {- "category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -3830,24 -4014,24 +4439,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled","name": "embedding_column_registry","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding env overrides set","name": "embedding_env_override","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "no embedding migration in flight","name": "embedding_migration_state","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.","name": "supersession_calibration","readiness_state": "not_applicable",@@@ -3856,24 -4040,24 +4469,28 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No chat_fallback_chain is set: every chat call uses only its own model.","name": "chat_fallback_chain","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.","name": "behavior_changes","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale","name": "graph_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3907,24 -4091,24 +4524,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.","name": "orphan_ratio","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No by-mention links in this brain.","name": "stale_mentions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No orphaned timeline rows across 4 page(s).","name": "timeline_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No slug collisions across 3 source checkout(s).","name": "slug_collisions","status": "ok"@@@ -3940,6 -4124,6 +4561,7 @@@"repair": "timeline","truncated": false},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -3981,6 -4165,6 +4603,7 @@@"unstamped_atoms": 0,"unstamped_concepts": 0},++ "elapsed_ms": "<volatile>","message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.","name": "derived_visibility","status": "ok"@@@ -3994,6 -4178,6 +4617,7 @@@"repair": "safe-chunks","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every re-sealable page is at the safe-chunk index version.","name": "safe_index_pending","status": "ok"@@@ -4006,6 -4190,6 +4630,7 @@@"pages_pending": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No page waits for the credential-safe re-chunk.","name": "credential_projection_pending","status": "ok"@@@ -4020,6 -4204,6 +4645,7 @@@"retries": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No orphan connector checkpoint rows older than 7 days.","name": "connector_checkpoints","status": "ok"@@@ -4046,6 -4230,6 +4672,7 @@@],"repair": "request-indexes"},++ "elapsed_ms": "<volatile>","message": "Managed sync request indexes are valid.","name": "persistence_request_indexes","status": "ok"@@@ -4084,6 -4268,6 +4711,7 @@@"verify": "gbrain doctor --json (check persistence_request_growth)","window_days": 7},++ "elapsed_ms": "<volatile>","message": "~22 request row(s); no scope exhausts its lifetime request IDs within 90 days at its last-7-day rate.","name": "persistence_request_growth","status": "ok"@@@ -4103,6 -4287,6 +4731,7 @@@},"stalls": []},++ "elapsed_ms": "<volatile>","message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).","name": "persistence_write_stall","status": "ok"@@@ -4116,62 -4300,62 +4745,11 @@@"repair": "failed-writes","writes": []},++ "elapsed_ms": "<volatile>","message": "Every caller write with a retained receipt committed or was superseded.","name": "lost_caller_writes","status": "ok"},-- {-- "category": "ops",-- "details": {-- "active_blockers": [],-- "config": {-- "receipt_retention_days": 30,-- "spike_factor": {-- "key": "persistence.terminal_failures.spike_factor",-- "value": 3-- },-- "spike_min": {-- "key": "persistence.terminal_failures.spike_min",-- "value": 25-- },-- "window_clamped": false,-- "window_days": {-- "key": "persistence.terminal_failures.window_days",-- "value": 7-- }-- },-- "count": 0,-- "defects": [],-- "docs": "docs/guides/troubleshooting.md#terminal-write-failures",-- "historical_rows": 0,-- "new_last_24h": 0,-- "sources": [],-- "spike": {-- "daily_7d": [-- 0,-- 0,-- 0,-- 0,-- 0,-- 0,-- 0-- ],-- "last_24h": 0,-- "median_7d": 0,-- "spiking": false-- },-- "unresolved": {-- "distinct_intents": 0,-- "distinct_slugs": 0,-- "oldest_age_seconds": null,-- "rows": 0-- },-- "window_days": 7-- },-- "message": "No terminal write failures in the last 7 d.",-- "name": "persistence_terminal_failures",-- "status": "ok"-- },{"category": "ops","details": {@@@ -4179,6 -4363,6 +4757,7 @@@"configured": "5min","docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"},++ "elapsed_ms": "<volatile>","message": "The session statement_timeout (5min) reaches the server.","name": "persistence_session_timeouts","status": "ok"@@@ -4190,6 -4374,6 +4769,7 @@@"held": 0,"sources": []},++ "elapsed_ms": "<volatile>","message": "No connector items are held.","name": "connector_held_items","status": "ok"@@@ -4256,6 -4440,6 +4836,7 @@@}]},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4296,6 -4480,6 +4877,7 @@@"docs": "docs/guides/repair.md#held-files","hooks": []},++ "elapsed_ms": "<volatile>","message": "No outdated gbrain frontmatter pre-commit hook is installed.","name": "frontmatter_hook","status": "ok"@@@ -4309,6 -4493,6 +4891,7 @@@"repair": "orphan-bindings","truncated": false},++ "elapsed_ms": "<volatile>","message": "Every persistence source binding belongs to an existing source.","name": "orphan_persistence_bindings","status": "ok"@@@ -4320,6 -4504,6 +4903,7 @@@"docs": "docs/guides/write-refusals.md#foreign-ownership-marker","markers": []},++ "elapsed_ms": "<volatile>","message": "Every ownership marker beside a source checkout belongs to this brain.","name": "foreign_ownership_marker","status": "ok"@@@ -4330,6 -4514,6 +4914,7 @@@"sources": [],"total": 0},++ "elapsed_ms": "<volatile>","message": "No page was written database-only to an unbound source.","name": "unbound_source","status": "ok"@@@ -4359,6 -4543,6 +4944,7 @@@"truncated": false,"window_days": 7},++ "elapsed_ms": "<volatile>","message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.","name": "writer_version","status": "ok"@@@ -4371,6 -4555,6 +4957,7 @@@"truncated": false,"unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No session corpus is configured; nothing to classify.","name": "self_capture","status": "ok"@@@ -4385,6 -4569,6 +4972,7 @@@"outcome": "skipped","reason": "small_brain"},++ "elapsed_ms": "<volatile>","message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.","name": "vector_plan","status": "ok"@@@ -4398,6 -4582,6 +4986,7 @@@"reason": "small_brain","timeout_ms": "<volatile>"},++ "elapsed_ms": "<volatile>","message": "Skipped: fewer than 10000 chunks by the planner's estimate; the keyword statements finish well inside search.keyword_statement_timeout_ms = 8000 ms (range 1000-60000).","name": "keyword_plan","status": "ok"@@@ -4416,6 -4600,6 +5005,7 @@@"stale_effects": 0,"truncated": false},++ "elapsed_ms": "<volatile>","message": "No committed write has a stale queued or failed embedding effect.","name": "stale_embedding_effects","status": "ok"@@@ -4428,6 -4612,6 +5018,7 @@@"repair": "google-file-modes","sources": []},++ "elapsed_ms": "<volatile>","message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.","name": "google_file_modes","status": "ok"@@@ -4441,6 -4625,6 +5032,7 @@@"excluded": 0,"repair": "extractor-facts"},++ "elapsed_ms": "<volatile>","message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.","name": "extractor_facts_expired","status": "ok"@@@ -4453,6 -4637,6 +5045,7 @@@"evidenced": 0,"repair": "conversation-labels"},++ "elapsed_ms": "<volatile>","message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).","name": "conversation_label_facts","status": "ok"@@@ -4468,6 -4652,6 +5061,7 @@@"stale": 0,"unstamped": 0},++ "elapsed_ms": "<volatile>","message": "No conversation extraction outcome predates extractor version 1.","name": "conversation_outcomes_stale","status": "ok"@@@ -4482,6 -4666,6 +5076,7 @@@"repair": "captured-facts","unclassifiable": 0},++ "elapsed_ms": "<volatile>","message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.","name": "captured_facts_active","status": "ok"@@@ -4493,6 -4677,6 +5088,7 @@@"drifted": 0,"repair": "loop-facts"},++ "elapsed_ms": "<volatile>","message": "Every closed commitment loop has its fact retired.","name": "loop_facts_drift","status": "ok"@@@ -4506,6 -4690,6 +5102,7 @@@"repair": "ontology-facts","retired": 0},++ "elapsed_ms": "<volatile>","message": "No ontology observation is held by a page's Facts table.","name": "ontology_facts_fenced","status": "ok"@@@ -4519,6 -4703,6 +5116,7 @@@"source_ids": [],"sources": []},++ "elapsed_ms": "<volatile>","message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).","name": "stale_frontmatter_keys","status": "ok"@@@ -4533,102 -4717,102 +5131,119 @@@"sources": [],"window_sequences": 20000},++ "elapsed_ms": "<volatile>","message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.","name": "maintenance_write_drift","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).","name": "extraction_date_grounding","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sampled 20 pages; no bare-tweet phrases or external links.","name": "integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All JSONB columns store objects/arrays","name": "jsonb_integrity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No takes yet","name": "takes_weight_grid","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All FK-child tables clean (10 tables checked)","name": "child_table_orphans","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All synthesized pages carry a raw trace or explicit exemption","name": "raw_provenance","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All source config values are JSON objects","name": "source_config_shape","status": "ok"},{"category": "skill",++ "elapsed_ms": "<volatile>","message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","name": "whoknows_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All image-asset chunks have modality=image","name": "cross_modal_modality_backfill","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "search.unified_multimodal is off; coverage check N/A","name": "unified_multimodal_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No truncated bodies detected","name": "markdown_body_completeness","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No pages exceed 500000 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)","name": "oversized_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)","name": "scraper_junk_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","name": "content_sanity_audit_recent","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No quarantined pages","name": "quarantined_pages","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No flagged pages","name": "flagged_pages","status": "ok"@@@ -4640,12 -4824,12 +5255,14 @@@"days": 7,"source_id": null},++ "elapsed_ms": "<volatile>","message": "No stale unverified extraction stubs","name": "unverified_extractions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes","name": "frontmatter_integrity",@@@ -4699,6 -4883,6 +5316,7 @@@],"unscanned": []},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4732,30 -4916,30 +5350,35 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "No capture failures in the last 24h","name": "eval_capture","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","name": "contradictions","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).","name": "facts_extraction_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","name": "effective_date_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","name": "salience_health","status": "ok"@@@ -4767,24 -4951,24 +5390,28 @@@"oldest_age_seconds": null,"worker_alive": true},++ "elapsed_ms": "<volatile>","message": "No stalled-forever jobs; no queue over depth 10; no old embed-backfill jobs without a worker.","name": "queue_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","name": "subagent_capability","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","name": "facts_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Brain-wide maintenance jobs are finishing within their deadline.","name": "global_maintenance_timeouts","status": "ok"@@@ -4807,6 -4991,6 +5434,7 @@@"unsupported": 0,"unsupported_ids": []},++ "elapsed_ms": "<volatile>","message": "No queued job predates submission authority.","name": "legacy_job_authority","status": "ok"@@@ -4820,6 -5004,6 +5448,7 @@@"malformed": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.","name": "legacy_token_grant_shape","status": "ok"@@@ -4831,6 -5015,6 +5460,7 @@@"drift": [],"mirror_window_ends": "2026-11-04"},++ "elapsed_ms": "<volatile>","message": "No legacy token grant has drifted from its permissions mirror.","name": "legacy_token_grant_drift","status": "ok"@@@ -4842,6 -5026,6 +5472,7 @@@"null_scope_count": 0,"tokens": []},++ "elapsed_ms": "<volatile>","message": "Every active legacy token has explicit scopes.","name": "legacy_token_null_scope","status": "ok"@@@ -4853,18 -5037,18 +5484,21 @@@"grants": [],"server_surface": "full"},++ "elapsed_ms": "<volatile>","message": "Every active client and token can call the operations its scopes allow.","name": "grant_new_ops_available","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No image assets indexed yet","name": "image_assets","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "OCR not in use (or no images ingested with OCR opt-in)","name": "ocr_health","status": "ok"@@@ -4878,6 -5062,6 +5512,7 @@@"unsupported_holds": 0,"without_image_vector": 0},++ "elapsed_ms": "<volatile>","message": "No image pages indexed yet.","name": "image_embedding_coverage","status": "ok"@@@ -4890,6 -5074,6 +5525,7 @@@"unchanged_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","fix_unavailable_reason": "unstructured","message": "Source 'plain' has never been synced. Run `gbrain sync --source <id> --no-pull` for each stale source. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status","name": "sync_freshness",@@@ -4902,6 -5086,6 +5538,7 @@@"recovering_count": 0,"writer_owned_count": 1},++ "elapsed_ms": "<volatile>","message": "1 writer-owned content source(s); no pending canonical publication or recovery.","name": "canonical_content_writes","status": "ok"@@@ -4924,6 -5108,6 +5561,7 @@@"unpushed": 0}},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -4968,18 -5152,18 +5606,21 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.","name": "sync_consolidation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)","name": "links_extraction_lag","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.","name": "cycle_freshness","readiness_state": "not_applicable",@@@ -4988,24 -5172,24 +5629,28 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No same-source content-hash duplicate groups","name": "content_hash_duplicates","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "All code-page chunks carry symbol metadata","name": "code_chunk_metadata","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/).","name": "undeclared_db_only_pages","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No configured collectors declare output paths","name": "db_only_collector_collision","status": "ok"@@@ -5016,12 -5200,12 +5661,14 @@@"checkouts": 1,"tracked": []},++ "elapsed_ms": "<volatile>","message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).","name": "tracked_ownership_marker","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "System One is off (every decide slot is off; nothing is sent).","name": "decide_health","status": "ok"@@@ -5052,6 -5236,6 +5699,7 @@@"unlinked": 0}},++ "elapsed_ms": "<volatile>","message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none","name": "unlinked_facts","status": "ok"@@@ -5070,6 -5254,6 +5718,7 @@@"relationships": {},"stale_assertions": []},++ "elapsed_ms": "<volatile>","message": "relationships: none yet; read policy on; contradiction mode propose (default)","name": "edge_validity","status": "ok"@@@ -5108,6 -5292,6 +5757,7 @@@"unpricedCalls": 0}},++ "elapsed_ms": "<volatile>","message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.","name": "auto_chronicle","readiness_state": "missing",@@@ -5115,6 -5299,6 +5765,7 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "chronicle.* settings are valid.","name": "chronicle_config_invalid","status": "ok"@@@ -5226,6 -5410,6 +5877,7 @@@},"severity": "info"},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -5277,6 -5461,6 +5929,7 @@@"health": "not_applicable","last_run": null},++ "elapsed_ms": "<volatile>","message": "Postgres brains run facts-absorb jobs on the job worker (gbrain jobs supervisor), not the automatic drain.","name": "facts_drain","readiness_state": "not_applicable",@@@ -5288,6 -5472,6 +5941,7 @@@"details": {"applicable": false},++ "elapsed_ms": "<volatile>","message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).","name": "fact_take_vectors","readiness_state": "disabled_by_choice",@@@ -5311,6 -5495,6 +5965,7 @@@"missing_search_statistics": [],"stale": []},++ "elapsed_ms": "<volatile>","message": "Planner statistics are fresh on 6 hot tables.","name": "planner_stats_stale","status": "ok"@@@ -5331,6 -5515,6 +5986,7 @@@"weights": 0,"weights_off_neutral": 0},++ "elapsed_ms": "<volatile>","message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true","name": "retrieval_feedback_health","status": "ok"@@@ -5342,6 -5526,6 +5998,7 @@@"failed": [],"pending": 0},++ "elapsed_ms": "<volatile>","message": "Every page has its revision; the page revision backfill is complete.","name": "revision_backfill","status": "ok"@@@ -5419,6 -5603,6 +6076,7 @@@],"unknown_pct": 12.9},++ "elapsed_ms": "<volatile>","message": "12.9% of 31 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for.","name": "trust_tiers","status": "ok"@@@ -5436,6 -5620,6 +6094,7 @@@"timeline_entries": 0}},++ "elapsed_ms": "<volatile>","message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.","name": "trust_scan","status": "ok"@@@ -5447,6 -5631,6 +6106,7 @@@"pending": [],"unclaimed": []},++ "elapsed_ms": "<volatile>","message": "No unclaimed source holds rows from before trust tiers.","name": "trust_sources_unclaimed","status": "ok"@@@ -5462,22 -5646,22 +6122,11 @@@"enabled": false,"pages": 0},++ "elapsed_ms": "<volatile>","message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.","name": "core_memory","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",-- "parked": 0,-- "sources": []-- },-- "message": "No managed sync is pending.",-- "name": "managed_sync_not_moving",-- "status": "ok"-- },{"category": "ops","details": {@@@ -5486,6 -5670,6 +6135,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","min_age_ms": "<volatile>"},++ "elapsed_ms": "<volatile>","message": "No persistence consumer is running on this host.","name": "two_consumers_on_host","status": "ok"@@@ -5497,6 -5681,6 +6147,7 @@@"docs": "docs/guides/troubleshooting.md#two-consumers-on-host","owners": []},++ "elapsed_ms": "<volatile>","message": "Every owner of a live running claim on this host has a consumer heartbeat row.","name": "consumers_without_heartbeat","status": "ok"@@@ -5510,24 -5694,24 +6161,11 @@@"host_json_path": "<home>/.gbrain/persistence/host.json","mismatches": []},++ "elapsed_ms": "<volatile>","message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.","name": "host_identity_mismatch","status": "ok"},-- {-- "category": "ops",-- "details": {-- "count": 0,-- "docs": "docs/guides/troubleshooting.md#serve-build-drift",-- "newer": [],-- "older": [],-- "owner": null,-- "this_version": "<version>"-- },-- "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",-- "name": "serve_build_drift",-- "status": "ok"-- },{"category": "brain","details": {@@@ -5535,6 -5719,6 +6173,7 @@@"held": 0,"items": []},++ "elapsed_ms": "<volatile>","message": "No managed atom page or transcript is held after repeated extraction failures.","name": "extract_atoms_held_failed","status": "ok"@@@ -5769,6 -5953,6 +6408,7 @@@},"warn_at_normalized_7d": 20},++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -5833,6 -6017,6 +6473,7 @@@},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Mode: conservative (no per-key overrides — mode bundle is canonical).","name": "search_mode","status": "ok"@@@ -5847,114 -6031,114 +6488,133 @@@".raw/"]},++ "elapsed_ms": "<volatile>","message": "No pages hidden by search-exclude policy.","name": "hidden_by_search_policy","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No retrieval-affecting files changed in working tree.","name": "eval_drift","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Reranker disabled — no failures expected","name": "reranker_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No exhausted batch retries in last 24h. Disconnect-call audit: 16 call(s) in 24h (most recent caller: <frame>).","name": "batch_retry_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No wedged queues","name": "wedged_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No orphaned private queues","name": "orphaned_private_queue","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No supervisor observed — skipping fan-out/concurrency check","name": "autopilot_fanout_concurrency","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "no Google accounts connected (gbrain google connect to start)","name": "google_oauth","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "graph_signals disabled — coverage not checked","name": "graph_signals_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)","name": "junk_entity_hubs","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","name": "brainstorm_health","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.","name": "link_resolution_opportunity","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Embeddings disabled — no active embedding width to reconcile.","name": "embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "gateway not configured — facts.embedding width check skipped.","name": "facts_embedding_width_consistency","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Multi-source brain (2 non-default source(s)); all populated","name": "source_routing_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No OAuth clients registered","name": "oauth_confidential_client_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","name": "oauth_client_scope_health","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "Lock path: <home>/.gbrain/autopilot.lock","name": "autopilot_lock_scope","status": "ok"},{"category": "ops",++ "elapsed_ms": "<volatile>","message": "No stale locks (no rows with ttl_expires_at < NOW())","name": "stale_locks","status": "ok"@@@ -5999,12 -6183,12 +6659,14 @@@"synthesize_concepts": "global"}},++ "elapsed_ms": "<volatile>","message": "Phase taxonomy: 12 source-scoped, 15 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","name": "cycle_phase_scope","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "user","argv": [@@@ -6052,18 -6236,18 +6714,21 @@@},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "entity_link_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale","name": "timeline_coverage","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","fix": {"actor": "agent","argv": [@@@ -6103,18 -6287,18 +6768,21 @@@},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "Active pack [email protected]+a50a67b9 is current (no successor declared)","name": "pack_upgrade_available","status": "ok"},{"category": "meta",++ "elapsed_ms": "<volatile>","message": "5 distinct typed values (pack gbrain-base-v2 declares 20)","name": "type_proliferation","status": "ok"},{"category": "brain",++ "elapsed_ms": "<volatile>","message": "No dangling aliases","name": "dangling_aliases","status": "ok"@@@ -6122,7 -6306,7 +6790,7 @@@],"db_url_source": null,"engine": "postgres",-- "health_score": 40,++ "health_score": 35,"schema_version": 2,"status": "unhealthy","top_issues": [@@@ -6303,6 -6487,6 +6971,12 @@@"status": "warn","tier": "symptom"},++ {++ "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",++ "name": "schema_pack_consistency",++ "status": "warn",++ "tier": "symptom"++ },{"fix": "64 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +56 more. Add them with `gbrain skillpack sync`.","name": "skill_currency",diff --cc test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex d47ac36b8e,369a12cb20..5e6f4daef3--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@@ -461,118 -430,6 +461,169 @@@},{"category": "ops",+ "details": {+ "commands": [],+ "exact": true,+ "inspected": 2,+ "resources": [],+ "truncated": false+ },+ "elapsed_ms": "<volatile>",+ "message": "Managed write capacity is below 80% of every cumulative limit.",+ "name": "persistence_capacity",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_blockers": [],+ "config": {+ "receipt_retention_days": 30,+ "spike_factor": {+ "key": "persistence.terminal_failures.spike_factor",+ "value": 3+ },+ "spike_min": {+ "key": "persistence.terminal_failures.spike_min",+ "value": 25+ },+ "window_clamped": false,+ "window_days": {+ "key": "persistence.terminal_failures.window_days",+ "value": 7+ }+ },+ "count": 0,+ "defects": [],+ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",+ "historical_rows": 0,+ "new_last_24h": 0,+ "sources": [],+ "spike": {+ "daily_7d": [+ 0,+ 0,+ 0,+ 0,+ 0,+ 0,+ 0+ ],+ "last_24h": 0,+ "median_7d": 0,+ "spiking": false+ },+ "unresolved": {+ "distinct_intents": 0,+ "distinct_slugs": 0,+ "oldest_age_seconds": null,+ "rows": 0+ },+ "window_days": 7+ },+ "elapsed_ms": "<volatile>",+ "message": "No terminal write failures in the last 7 d.",+ "name": "persistence_terminal_failures",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",+ "parked": 0,+ "sources": []+ },+ "elapsed_ms": "<volatile>",+ "message": "No managed sync is pending.",+ "name": "managed_sync_not_moving",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/guides/troubleshooting.md#receipt-compaction",+ "recorded": false+ },+ "elapsed_ms": "<volatile>",+ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",+ "name": "receipt_compaction",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#serve-build-drift"+ },+ "elapsed_ms": "<volatile>",+ "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",+ "name": "serve_build_drift",+ "status": "ok"+ },+ {+ "category": "meta",+ "elapsed_ms": "<volatile>",+ "message": "No pages in any source — schema consistency N/A.",+ "name": "schema_pack_consistency",+ "status": "ok"+ },++ {++ "category": "brain",++ "details": {++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 0,++ "keyword_only": 0,++ "pending": 0,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 0,++ "embedded": 0,++ "ratio": null++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": true,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 0,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }++ },++ "elapsed_ms": "<volatile>",++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 0 pending, 0 keyword-only, 0 quarantined, 0 empty, 0 on deleted pages, 0 chunkless (healable); 0 unsearchable.",++ "name": "embedding_state",++ "status": "ok"++ },+ {+ "category": "ops",+ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"diff --cc test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex b132031224,312cb36e54..8051b13575--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@@ -464,118 -433,6 +464,213 @@@},{"category": "ops",+ "details": {+ "commands": [],+ "exact": true,+ "inspected": 2,+ "resources": [],+ "truncated": false+ },+ "elapsed_ms": "<volatile>",+ "message": "Managed write capacity is below 80% of every cumulative limit.",+ "name": "persistence_capacity",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_blockers": [],+ "config": {+ "receipt_retention_days": 30,+ "spike_factor": {+ "key": "persistence.terminal_failures.spike_factor",+ "value": 3+ },+ "spike_min": {+ "key": "persistence.terminal_failures.spike_min",+ "value": 25+ },+ "window_clamped": false,+ "window_days": {+ "key": "persistence.terminal_failures.window_days",+ "value": 7+ }+ },+ "count": 0,+ "defects": [],+ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",+ "historical_rows": 0,+ "new_last_24h": 0,+ "sources": [],+ "spike": {+ "daily_7d": [+ 0,+ 0,+ 0,+ 0,+ 0,+ 0,+ 0+ ],+ "last_24h": 0,+ "median_7d": 0,+ "spiking": false+ },+ "unresolved": {+ "distinct_intents": 0,+ "distinct_slugs": 0,+ "oldest_age_seconds": null,+ "rows": 0+ },+ "window_days": 7+ },+ "elapsed_ms": "<volatile>",+ "message": "No terminal write failures in the last 7 d.",+ "name": "persistence_terminal_failures",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",+ "parked": 0,+ "sources": []+ },+ "elapsed_ms": "<volatile>",+ "message": "No managed sync is pending.",+ "name": "managed_sync_not_moving",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/guides/troubleshooting.md#receipt-compaction",+ "recorded": false+ },+ "elapsed_ms": "<volatile>",+ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",+ "name": "receipt_compaction",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#serve-build-drift"+ },+ "elapsed_ms": "<volatile>",+ "message": "PGLite admits one process; no consumer heartbeat rows are kept to compare builds.",+ "name": "serve_build_drift",+ "status": "ok"+ },+ {+ "category": "meta",+ "elapsed_ms": "<volatile>",+ "message": "No pages in any source — schema consistency N/A.",+ "name": "schema_pack_consistency",+ "status": "ok"+ },++ {++ "category": "brain",++ "details": {++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 0,++ "keyword_only": 0,++ "pending": 0,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 0,++ "embedded": 0,++ "ratio": null++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 0,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }++ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024",++ "--path",++ "<home>/.gbrain/brain.pglite"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024 --path <home>/.gbrain/brain.pglite",++ "consent": [++ "credentials",++ "paid"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for the PGLite brain at <home>/.gbrain/brain.pglite. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."++ },++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 0 pending, 0 keyword-only, 0 quarantined, 0 empty, 0 on deleted pages, 0 chunkless (healable); 0 unsearchable.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice",++ "severity": "info",++ "status": "ok"++ },+ {+ "category": "ops",+ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"diff --cc test/fixtures/goldens/doctor/json-postgres-fresh.jsonindex 5253ef2601,fb93bd40f3..8f3d28c1fa--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@@ -458,122 -426,6 +458,215 @@@},{"category": "ops",+ "details": {+ "commands": [],+ "exact": true,+ "inspected": 2,+ "resources": [],+ "truncated": false+ },+ "elapsed_ms": "<volatile>",+ "message": "Managed write capacity is below 80% of every cumulative limit.",+ "name": "persistence_capacity",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_blockers": [],+ "config": {+ "receipt_retention_days": 30,+ "spike_factor": {+ "key": "persistence.terminal_failures.spike_factor",+ "value": 3+ },+ "spike_min": {+ "key": "persistence.terminal_failures.spike_min",+ "value": 25+ },+ "window_clamped": false,+ "window_days": {+ "key": "persistence.terminal_failures.window_days",+ "value": 7+ }+ },+ "count": 0,+ "defects": [],+ "docs": "docs/guides/troubleshooting.md#terminal-write-failures",+ "historical_rows": 0,+ "new_last_24h": 0,+ "sources": [],+ "spike": {+ "daily_7d": [+ 0,+ 0,+ 0,+ 0,+ 0,+ 0,+ 0+ ],+ "last_24h": 0,+ "median_7d": 0,+ "spiking": false+ },+ "unresolved": {+ "distinct_intents": 0,+ "distinct_slugs": 0,+ "oldest_age_seconds": null,+ "rows": 0+ },+ "window_days": 7+ },+ "elapsed_ms": "<volatile>",+ "message": "No terminal write failures in the last 7 d.",+ "name": "persistence_terminal_failures",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",+ "parked": 0,+ "sources": []+ },+ "elapsed_ms": "<volatile>",+ "message": "No managed sync is pending.",+ "name": "managed_sync_not_moving",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/guides/troubleshooting.md#receipt-compaction",+ "recorded": false+ },+ "elapsed_ms": "<volatile>",+ "message": "No receipt compaction recorded yet (persistence.maintenance.last_compaction is unset): the persistence consumer records one after it compacts.",+ "name": "receipt_compaction",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#serve-build-drift",+ "newer": [],+ "older": [],+ "owner": null,+ "this_version": "<version>"+ },+ "elapsed_ms": "<volatile>",+ "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",+ "name": "serve_build_drift",+ "status": "ok"+ },+ {+ "category": "meta",+ "elapsed_ms": "<volatile>",+ "message": "No pages in any source — schema consistency N/A.",+ "name": "schema_pack_consistency",+ "status": "ok"+ },++ {++ "category": "brain",++ "details": {++ "active_column": "embedding",++ "basis": "exact",++ "counts": {++ "chunkless_healable": 0,++ "deleted_page_chunks": 0,++ "embedded": 0,++ "empty": 0,++ "keyword_only": 0,++ "pending": 0,++ "quarantined": 0++ },++ "coverage": {++ "basis": "exact",++ "eligible": 0,++ "embedded": 0,++ "ratio": null++ },++ "covering_index": null,++ "deleted_page_chunks": {++ "past_window": 0,++ "window_hours": 72,++ "within_window": 0++ },++ "embeddings_enabled": false,++ "exact": true,++ "keyword_only": {++ "marker_bytes": 0,++ "pages": 0,++ "reason": "embed_skip",++ "threshold_bytes": 500000++ },++ "mode": "full",++ "omitted_states": [],++ "reason": "embeddings_disabled",++ "status": "known",++ "units": "content_chunks rows, plus one unit per page with no chunk rows",++ "unsearchable": 0,++ "unsearchable_complete": true,++ "unstamped_pending": {++ "count": 0,++ "created_at_lower_bound": null,++ "writer_version": "<version>"++ }++ },++ "elapsed_ms": "<volatile>",++ "fix": {++ "actor": "user",++ "argv": [++ "gbrain",++ "init",++ "--force",++ "--embedding-model",++ "voyage:voyage-4",++ "--embedding-dimensions",++ "1024"++ ],++ "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",++ "consent": [++ "credentials",++ "paid"++ ],++ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",++ "inputs": [++ {++ "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",++ "name": "VOYAGE_API_KEY"++ }++ ],++ "next": "tell_user_to_run",++ "requires_exclusive": true,++ "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",++ "verify": {++ "argv": [++ "gbrain",++ "doctor",++ "--only",++ "embeddings",++ "--json",++ "--brain",++ "host"++ ]++ },++ "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."++ },++ "message": "Embedding state (exact, column 'embedding'): 0 embedded, 0 pending, 0 keyword-only, 0 quarantined, 0 empty, 0 on deleted pages, 0 chunkless (healable); 0 unsearchable.",++ "name": "embedding_state",++ "readiness_state": "disabled_by_choice",++ "severity": "info",++ "status": "ok"++ },+ {+ "category": "ops",+ "elapsed_ms": "<volatile>","message": "Extension installed","name": "pgvector","status": "ok"diff --cc test/fixtures/goldens/doctor/registry-build-checks.jsonindex ce438d2005,c863259200..961a868636--- a/test/fixtures/goldens/doctor/registry-build-checks.json+++ b/test/fixtures/goldens/doctor/registry-build-checks.json@@@ -271,19 -259,11 +271,23 @@@},{"category": "meta",- "name": "pages_upsert_arbiter"+ "name": "schema_pack_consistency"+ },++ {++ "category": "brain",++ "name": "embedding_state"+ },{"category": "ops",- "name": "persistence_capacity"+ "name": "pgvector"+ },+ {+ "category": "ops",+ "name": "postgres_cancellation_driver"+ },+ {+ "category": "meta",+ "name": "pages_upsert_arbiter"},{"category": "brain",