Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(doctor): full doctor --json golden on a hot-check fixture, PGLite + Postgres (captured on 3f960312a)
time-attack884a4eafc613
diff --git a/test/doctor-hot-checks-golden.test.ts b/test/doctor-hot-checks-golden.test.tsnew file mode 100644index 0000000000..78b994d0e5--- /dev/null+++ b/test/doctor-hot-checks-golden.test.ts@@ -0,0 +1,60 @@+/**+ * GBRA-75 wave 10: full `gbrain doctor --json` golden on a PGLite brain whose+ * content exercises every finding of the doctor hot checks+ * (`frontmatter_integrity`, `frontmatter_repairable`, the `timeline_history`+ * group, `fence_integrity`; fixture in test/helpers/doctor-hot-checks-fixture.ts).+ * Pins the first doctor run, then a second one after edits (incremental+ * census pass, resumed timeline state). Captured on 3f960312a before the+ * doctor speedups (shared parse pass, batched reads, Git memo), which must+ * reproduce it byte for byte after the hermetic doctor-json-v1 normalizer+ * (timings, timestamps and paths only).+ *+ * Postgres twin: test/e2e/doctor-hot-checks-golden.test.ts. PGLite, $0.+ */+import { afterAll, describe, expect, test } from 'bun:test';+import { readFileSync } from 'node:fs';+import { join } from 'node:path';+import { PGLiteEngine } from '../src/core/pglite-engine.ts';+import { defineNormalizer, expectGolden, expectNormalizerStable } from './helpers/golden.ts';+import { doctorJsonNormalizer, makeDoctorHome, networkAttempts, runGbrain, type DoctorHome, type GbrainRun } from './helpers/doctor-json-golden.ts';+import { buildHotCheckFixture, editHotCheckFixture, type Sql } from './helpers/doctor-hot-checks-fixture.ts';++const DOCTOR = doctorJsonNormalizer();+const homes: DoctorHome[] = [];+afterAll(() => {+ for (const h of homes) h.cleanup();+});++type Captures = { first: GbrainRun; second: GbrainRun };+const BOTH = defineNormalizer<Captures>(DOCTOR.name, (c) => ({ first: DOCTOR.apply(c.first), second: DOCTOR.apply(c.second) }));++async function capture(): Promise<Captures> {+ const h = makeDoctorHome('doctor-hot-checks');+ homes.push(h);+ const init = await runGbrain(h, ['init', '--pglite', '--no-embedding']);+ if (init.exitCode !== 0) throw new Error(`gbrain init failed (${init.exitCode}): ${init.stderr}`);+ const { database_path } = JSON.parse(readFileSync(join(h.home, '.gbrain', 'config.json'), 'utf8')) as { database_path: string };+ const sql: Sql = async (statements) => {+ const engine = new PGLiteEngine();+ await engine.connect({ database_path });+ try {+ await engine.transaction(async (tx) => { for (const [q, p] of statements) await tx.executeRaw(q, p); });+ } finally {+ await engine.disconnect();+ }+ };+ await buildHotCheckFixture(h, sql);+ const first = await runGbrain(h, ['doctor', '--json', '--skills-dir', h.skillsDir]);+ await editHotCheckFixture(h, sql);+ const second = await runGbrain(h, ['doctor', '--json', '--skills-dir', h.skillsDir]);+ expect(networkAttempts(h)).toEqual([]);+ return { first, second };+}++describe('gbrain doctor --json golden on the hot-check fixture (PGLite)', () => {+ test('first and second doctor runs match the 3f960312a capture', async () => {+ const c = await expectNormalizerStable(capture, BOTH);+ for (const run of [c.first, c.second]) expect(run.json).not.toBeNull();+ expectGolden('doctor/hot-checks-pglite-json', c, BOTH);+ }, 300_000);+});diff --git a/test/e2e/doctor-hot-checks-golden.test.ts b/test/e2e/doctor-hot-checks-golden.test.tsnew file mode 100644index 0000000000..d5e04107b2--- /dev/null+++ b/test/e2e/doctor-hot-checks-golden.test.ts@@ -0,0 +1,88 @@+/**+ * GBRA-75 wave 10: Postgres twin of test/doctor-hot-checks-golden.test.ts.+ * Full `gbrain doctor --json` on the hot-check fixture+ * (test/helpers/doctor-hot-checks-fixture.ts), first run and a second run+ * after edits, on a scratch database per capture+ * (`gbrain_test_doctor_hot_<uuid>`). Captured on 3f960312a before the doctor+ * speedups, which must reproduce it after the doctor-json-pg-v1 normalizer.+ *+ * Tier 1 (no API keys). Skips without DATABASE_URL.+ * Run: DATABASE_URL=... bun test test/e2e/doctor-hot-checks-golden.test.ts+ */+import { afterAll, describe, expect, test } from 'bun:test';+import { randomUUID } from 'node:crypto';+import postgres from '#postgres';+import { assertSafeE2eDatabaseUrl } from '../helpers/db-guard.ts';+import { defineNormalizer, expectGolden, expectNormalizerStable } from '../helpers/golden.ts';+import { doctorJsonNormalizer, makeDoctorHome, networkAttempts, runGbrain, type DoctorHome, type GbrainRun } from '../helpers/doctor-json-golden.ts';+import { buildHotCheckFixture, editHotCheckFixture, type Sql } from '../helpers/doctor-hot-checks-fixture.ts';++const DATABASE_URL = process.env.DATABASE_URL;+const describeE2E = DATABASE_URL ? describe : describe.skip;+if (!DATABASE_URL) console.log('Skipping E2E doctor hot-check golden (DATABASE_URL not set)');++const homes: DoctorHome[] = [];+const drops: Array<() => Promise<void>> = [];+afterAll(async () => {+ for (const drop of drops) await drop();+ for (const h of homes) h.cleanup();+});++interface PgCaptures { first: GbrainRun; second: GbrainRun; url: string; name: string }++function pgNormalizer(base: URL) {+ const inner = (url: string, name: string) => doctorJsonNormalizer([+ [url, '<database_url>'],+ [name, '<database>'],+ [`${base.hostname}:${base.port || '5432'}`, '<pg_host>:<pg_port>'],+ [/\bgbrain_test_doctor_hot_[0-9a-f]{32}\b/g, '<database>'],+ ], 'doctor-json-pg-v1');+ return defineNormalizer<PgCaptures>('doctor-json-pg-v1', (c) => {+ const n = inner(c.url, c.name);+ return { first: n.apply(c.first), second: n.apply(c.second) };+ });+}++async function capture(adminUrl: string): Promise<PgCaptures> {+ const name = `gbrain_test_doctor_hot_${randomUUID().replaceAll('-', '')}`;+ const admin = postgres(adminUrl, { max: 1, prepare: false });+ await admin.unsafe(`CREATE DATABASE ${name}`);+ const target = new URL(adminUrl);+ target.pathname = `/${name}`;+ const url = target.toString();+ drops.push(async () => {+ try {+ await admin.unsafe(`DROP DATABASE IF EXISTS ${name} WITH (FORCE)`);+ } finally {+ await admin.end();+ }+ });+ const h = makeDoctorHome('doctor-hot-checks-pg');+ homes.push(h);+ const init = await runGbrain(h, ['init', '--non-interactive', '--url', url, '--no-embedding']);+ if (init.exitCode !== 0) throw new Error(`gbrain init failed (${init.exitCode}): ${init.stderr}`);+ const sql: Sql = async (statements) => {+ const db = postgres(url, { max: 1, prepare: false });+ try {+ await db.begin(async (tx) => { for (const [q, p] of statements) await tx.unsafe(q, p as never[]); });+ } finally {+ await db.end();+ }+ };+ await buildHotCheckFixture(h, sql);+ const first = await runGbrain(h, ['doctor', '--json', '--skills-dir', h.skillsDir]);+ await editHotCheckFixture(h, sql);+ const second = await runGbrain(h, ['doctor', '--json', '--skills-dir', h.skillsDir]);+ expect(networkAttempts(h)).toEqual([]);+ return { first, second, url, name };+}++describeE2E('gbrain doctor --json golden on the hot-check fixture (Postgres)', () => {+ test('first and second doctor runs match the 3f960312a capture', async () => {+ assertSafeE2eDatabaseUrl(DATABASE_URL!);+ const normalizer = pgNormalizer(new URL(DATABASE_URL!));+ const c = await expectNormalizerStable(() => capture(DATABASE_URL!), normalizer);+ for (const run of [c.first, c.second]) expect((run.json as { engine?: string } | null)?.engine).toBe('postgres');+ expectGolden('doctor/hot-checks-postgres-json', c, normalizer);+ }, 400_000);+});diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.jsonnew file mode 100644index 0000000000..12f1707f74--- /dev/null+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json@@ -0,0 +1,5991 @@+{+ "golden": {+ "first": {+ "args": [+ "doctor",+ "--json",+ "--skills-dir",+ "<home>/skills"+ ],+ "exit_code": 1,+ "report": {+ "brain_checks_score": 45,+ "capped_by": [+ "embeddings_disabled"+ ],+ "category_scores": {+ "brain": 45,+ "meta": 100,+ "ops": 100,+ "skill": 95+ },+ "checks": [+ {+ "category": "skill",+ "message": "1 skills, all reachable",+ "name": "resolver_health",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "enabled": true,+ "engine": "pglite",+ "fired_recently": false,+ "last_fired": null,+ "path": "pglite — serve IPC socket not present",+ "policy_skill_installed": false+ },+ "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": "pglite — serve IPC socket not present; enabled but NO resolve path exists right now: the IPC socket is only bound by a running `gbrain serve` (stdio or --http) — until one is up, hooks/reflex degrade to no_serve on this brain (host capability may still supply pointers; policy skill carries otherwise) — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`",+ "name": "retrieval_reflex_health",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "channels": {},+ "window_days": 7+ },+ "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",+ "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",+ "name": "memory_verbs_usage",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1/1 skills pass",+ "name": "skill_conformance",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1 skill(s) compliant or exempt",+ "name": "skill_brain_first",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "No skills.lock.json in <home>/skills — integrity check not applicable",+ "name": "skills_manifest_integrity",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "drifted": [],+ "new": [+ "academic-verify",+ "archive-crawler",+ "article-enrichment",+ "ask-user",+ "blog-ingest",+ "book-mirror",+ "brain-ingest-gate",+ "brain-link-discipline",+ "brain-ops",+ "brain-pdf",+ "brain-taxonomist",+ "briefing",+ "bulk-ingestion",+ "capture",+ "chat-connectors",+ "citation-fixer",+ "citation-graph-ingest",+ "cold-start",+ "company-brainify",+ "concept-synthesis",+ "context-audit",+ "conversation-archive",+ "correction-pipeline",+ "cron-scheduler",+ "cross-modal-review",+ "daily-task-manager",+ "daily-task-prep",+ "data-loss-gate",+ "data-research",+ "draft-in-voice",+ "eiirp",+ "enrich",+ "fact-check",+ "functional-area-resolver",+ "gbrain-advisor",+ "google-loops",+ "idea-ingest",+ "idea-lineage",+ "ingest",+ "maintain",+ "mcp-access",+ "measure-before-you-fix",+ "media-ingest",+ "meeting-ingestion",+ "minion-orchestrator",+ "perplexity-research",+ "publish",+ "query",+ "repo-architecture",+ "reports",+ "research-compendium",+ "resolve-before-asking",+ "signal-detector",+ "skill-autobench",+ "skill-creator",+ "skillify",+ "skillpack-check",+ "skillpack-harvest",+ "soul-audit",+ "strategic-reading",+ "testing",+ "two-tier-extraction",+ "voice-note-ingest",+ "webhook-transforms"+ ]+ },+ "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",+ "status": "warn"+ },+ {+ "category": "skill",+ "message": "no installed skills declare preconditions",+ "name": "skill_preconditions",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "enabled": false,+ "out_of_band_settable": true,+ "reason": "disabled"+ },+ "message": "memorable relay off (default)",+ "name": "memorable_relay_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "audience": "personal",+ "audience_reasons": [+ "no shared declaration; 0 non-automation client(s) active in 30d"+ ],+ "backstop_visibility": "private",+ "capture_lanes": {+ "compact": "extract",+ "session_end": "extract",+ "writeback": "retire"+ },+ "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",+ "cross_lane_duplicates_7d": 0,+ "instruction_visibility": "world",+ "mode": "off",+ "mode_valid": true,+ "near_duplicates_shadow_7d": 0,+ "nudge_shown": false,+ "transient_ttl": "3d",+ "ttl_valid": true,+ "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"+ },+ "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",+ "message": "No chat connectors configured (optional).",+ "name": "connectors",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "breaker_enabled": true,+ "count_exact": true,+ "inspected_keys": 0,+ "keys": [],+ "threshold": 3+ },+ "message": "No dream key died 3+ times in 24h",+ "name": "dream_paid_loop",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "pending_fresh_install": [+ "0.11.0",+ "0.14.0",+ "0.22.4",+ "0.28.0",+ "0.53.0"+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "apply-migrations",+ "--yes",+ "--no-autopilot-install"+ ],+ "command": "gbrain apply-migrations --yes --no-autopilot-install",+ "consent": [],+ "next": "run",+ "requires_exclusive": true,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "minions_migration",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."+ },+ "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",+ "name": "minions_migration",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "mode=notify",+ "name": "self_upgrade_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Bun <bun-version> (minimum 1.4.0)",+ "name": "bun_runtime",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",+ "name": "nightly_quality_probe_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "kinds": [],+ "schema_version": 1+ },+ "message": "no extractions in last 7 days",+ "name": "extract_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",+ "name": "conversation_facts_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": 0,+ "known_approximation": "page backlog only; transcript corpus not counted",+ "pack_declares_phase": false+ },+ "message": "no pages awaiting atom extraction",+ "name": "extract_atoms_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "drift_pct": 0,+ "drifted": 0,+ "slug_unbound": 0,+ "source_changed": 0,+ "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",+ "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",+ "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+ },+ "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": []+ },+ "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": {+ "reason": "no_harness_detected"+ },+ "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+ },+ "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",+ "message": "Extension installed",+ "name": "pgvector",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",+ "name": "pages_upsert_arbiter",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "readiness": "projection_pending",+ "ready": false+ },+ "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": {+ "effects": [],+ "exact": true,+ "inspected": 0,+ "parked_effects": 0,+ "truncated": false+ },+ "message": "No Git or withdrawal effect is parked.",+ "name": "parked_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "refreshes": []+ },+ "message": "No worktree refresh is stuck.",+ "name": "worktree_refresh_stuck",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "extra_columns": [],+ "page_child_source_columns": [],+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"+ },+ "message": "Guarded tables carry only the columns gbrain creates.",+ "name": "managed_guard_schema_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "guard_refusals": 0,+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",+ "trigger_refusals": 0,+ "unclassified_p0001": 0,+ "window_days": 7+ },+ "message": "No write was refused by a database guard in the last 7 days.",+ "name": "publication_refusals",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "links_link_source_check has the v114 kebab-case gate",+ "name": "links_link_source_check",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite at 20 pages — comfortable below the 1000-page threshold",+ "name": "pglite_scale",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Skipped (PGLite — no PostgREST exposure, RLS not applicable)",+ "name": "rls",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Version <latest> (latest: <latest>)",+ "name": "schema_version",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "1066 column(s) verified against live schema",+ "name": "schema_columns",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Skipped (PGLite — no event trigger support)",+ "name": "rls_event_trigger",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "embeddings",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",+ "name": "embedding_provider",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Registry healthy: 1 columns (embedding_image); primary embeddings disabled",+ "name": "embedding_column_registry",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding env overrides set",+ "name": "embedding_env_override",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding migration in flight",+ "name": "embedding_migration_state",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No chat_fallback_chain is set: every chat call uses only its own model.",+ "name": "chat_fallback_chain",+ "status": "ok"+ },+ {+ "category": "meta",+ "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",+ "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "graph_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn"+ },+ {+ "category": "brain",+ "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",+ "name": "orphan_ratio",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No by-mention links in this brain.",+ "name": "stale_mentions",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No orphaned timeline rows across 4 page(s).",+ "name": "timeline_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No slug collisions across 3 source checkout(s).",+ "name": "slug_collisions",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_unrenderable_rows": 1,+ "materializable_rows": 1,+ "pages_affected": 1,+ "pages_inspected": 4,+ "repair": "timeline",+ "truncated": false+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "message": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "looser_atoms": 0,+ "looser_concepts": 0,+ "repair": "visibility",+ "truncated": false,+ "unstamped_atoms": 0,+ "unstamped_concepts": 0+ },+ "message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.",+ "name": "derived_visibility",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "repair": "safe-chunks",+ "truncated": false+ },+ "message": "Every re-sealable page is at the safe-chunk index version.",+ "name": "safe_index_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "truncated": false+ },+ "message": "No page waits for the credential-safe re-chunk.",+ "name": "credential_projection_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "checkpoints": 0,+ "count": 0,+ "docs": "docs/guides/repair.md#connector-checkpoints",+ "repair": "connector-checkpoints",+ "retries": 0,+ "truncated": false+ },+ "message": "No orphan connector checkpoint rows older than 7 days.",+ "name": "connector_checkpoints",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair request-indexes --apply",+ "count": 0,+ "docs": "docs/guides/repair.md#request-indexes",+ "indexes": [+ {+ "name": "persistence_requests_sync_run_open",+ "state": "valid"+ },+ {+ "name": "persistence_requests_sync_run_committed",+ "state": "valid"+ }+ ],+ "repair": "request-indexes"+ },+ "message": "Managed sync request indexes are valid.",+ "name": "persistence_request_indexes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "commands": [],+ "docs": "docs/guides/repair.md#request-growth",+ "rows": 22,+ "rows_exact": true,+ "scopes": [+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.brain_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 1000000,+ "per_day": 3,+ "scope": "brain",+ "window_days": 7+ },+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.principal_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 250000,+ "per_day": 3,+ "scope": "principal:local_cli:<uuid>",+ "window_days": 7+ }+ ],+ "verify": "gbrain doctor --json (check persistence_request_growth)",+ "window_days": 7+ },+ "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"+ },+ {+ "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": {+ "applied": null,+ "configured": "5min",+ "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"+ },+ "message": "PGLite has no session to time out.",+ "name": "persistence_session_timeouts",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#connector-held-items",+ "held": 0,+ "sources": []+ },+ "message": "No connector items are held.",+ "name": "connector_held_items",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/repair.md#held-files",+ "escalate_count": 50,+ "fences": 2,+ "held": 8,+ "source_ids": [+ "notes"+ ],+ "sources": [+ {+ "escalated": false,+ "fences": 2,+ "first": [+ {+ "code": "invalid_fence",+ "path": "fences/llm.md",+ "reason": "no_header",+ "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_fence",+ "path": "fences/manual.md",+ "reason": "takes_kind_unsupported",+ "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/dash-line.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/duplicate-key.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/indented-close.md",+ "reason": "yaml_parse",+ "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."+ }+ ],+ "held": 8,+ "missing": 8,+ "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",+ "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",+ "source_id": "notes",+ "stale": 0,+ "status": "gbrain sources status notes"+ }+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "status": "warn"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/repair.md#held-files",+ "hooks": []+ },+ "message": "No outdated gbrain frontmatter pre-commit hook is installed.",+ "name": "frontmatter_hook",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bindings": [],+ "count": 0,+ "docs": "docs/guides/repair.md#orphan-bindings",+ "repair": "orphan-bindings",+ "truncated": false+ },+ "message": "Every persistence source binding belongs to an existing source.",+ "name": "orphan_persistence_bindings",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "sources": [],+ "total": 0+ },+ "message": "No page was written database-only to an unbound source.",+ "name": "unbound_source",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "floor": "0.60.5.0",+ "hosts": [],+ "observed": [+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "consumer",+ "version": "<version>"+ },+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "admitter",+ "version": "<version>"+ }+ ],+ "truncated": false,+ "window_days": 7+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "classified": 0,+ "count": "exact",+ "truncated": false,+ "unclassifiable": 0+ },+ "message": "No session corpus is configured; nothing to classify.",+ "name": "self_capture",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "outcome": "skipped",+ "reason": "pglite"+ },+ "message": "Skipped: PGLite runs vector search in-process; the plan check applies to Postgres brains.",+ "name": "vector_plan",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair embedding-effects",+ "count": "exact",+ "docs": "docs/guides/repair.md#stale-queued-embedding-effects",+ "effects": [],+ "failed_effects": 0,+ "repair": "embedding-effects",+ "resolution": "repairable",+ "retry_queued_effects": 0,+ "stale_effects": 0,+ "truncated": false+ },+ "message": "No committed write has a stale queued or failed embedding effect.",+ "name": "stale_embedding_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/google-connect.md",+ "repair": "google-file-modes",+ "sources": []+ },+ "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",+ "name": "google_file_modes",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "extractor-facts"+ },+ "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",+ "name": "extractor_facts_expired",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "evidenced": 0,+ "repair": "conversation-labels"+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "extractor_version": 1,+ "sample": [],+ "scanned": 0,+ "stale": 0,+ "unstamped": 0+ },+ "message": "No conversation extraction outcome predates extractor version 1.",+ "name": "conversation_outcomes_stale",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "captured-facts",+ "unclassifiable": 0+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "drifted": 0,+ "repair": "loop-facts"+ },+ "message": "Every closed commitment loop has its fact retired.",+ "name": "loop_facts_drift",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "excluded": 0,+ "fenced": 0,+ "repair": "ontology-facts",+ "retired": 0+ },+ "message": "No ontology observation is held by a page's Facts table.",+ "name": "ontology_facts_fenced",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "Sampled 20 pages; no bare-tweet phrases or external links.",+ "name": "integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All JSONB columns store objects/arrays",+ "name": "jsonb_integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No takes yet",+ "name": "takes_weight_grid",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All FK-child tables clean (10 tables checked)",+ "name": "child_table_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All synthesized pages carry a raw trace or explicit exemption",+ "name": "raw_provenance",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All source config values are JSON objects",+ "name": "source_config_shape",+ "status": "ok"+ },+ {+ "category": "skill",+ "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",+ "message": "All image-asset chunks have modality=image",+ "name": "cross_modal_modality_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "search.unified_multimodal is off; coverage check N/A",+ "name": "unified_multimodal_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No truncated bodies detected",+ "name": "markdown_body_completeness",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",+ "name": "scraper_junk_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No quarantined pages",+ "name": "quarantined_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No flagged pages",+ "name": "flagged_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": 0,+ "days": 7,+ "source_id": null+ },+ "message": "No stale unverified extraction stubs",+ "name": "unverified_extractions",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#frontmatter",+ "partial": false,+ "repairable": 13,+ "source_ids": [+ "notes",+ "plain"+ ],+ "sources": [+ {+ "by_code": {+ "FRONTMATTER_COMMENT_VALUE": 1,+ "MISSING_CLOSE": 2,+ "NESTED_QUOTES": 1,+ "NULL_BYTES": 2,+ "SLUG_MISMATCH": 1,+ "YAML_PARSE": 2,+ "needs_interpretation": 4+ },+ "files": 12,+ "preview": "gbrain repair frontmatter --source notes",+ "sample_paths": [+ "fm/comment-value.md",+ "fm/dash-line.md",+ "fm/duplicate-key.md",+ "fm/missing-close.md",+ "fm/needs-interpretation.md"+ ],+ "source_id": "notes",+ "status": "scanned"+ },+ {+ "by_code": {+ "needs_interpretation": 1+ },+ "files": 1,+ "preview": "gbrain repair frontmatter --source plain",+ "sample_paths": [+ "broken.md"+ ],+ "source_id": "plain",+ "status": "scanned"+ }+ ],+ "unscanned": []+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn"+ },+ {+ "category": "meta",+ "message": "No capture failures in the last 24h",+ "name": "eval_capture",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "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",+ "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",+ "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",+ "name": "salience_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "by_queue": {},+ "depth": 0,+ "engine": "pglite",+ "worker_alive": true+ },+ "message": "PGLite: no jobs waiting for a worker.",+ "name": "queue_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",+ "name": "subagent_capability",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",+ "name": "facts_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Brain-wide maintenance jobs are finishing within their deadline.",+ "name": "global_maintenance_timeouts",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_ids": [],+ "authorizable": {},+ "authorizable_total": 0,+ "docs": "docs/guides/repair.md#legacy-job-authority",+ "live": 0,+ "queued_spend": {+ "by_basis": {},+ "long_waiting": 0,+ "long_waiting_ids": []+ },+ "terminal_keyed": {},+ "terminal_keyed_total": 0,+ "unsupported": 0,+ "unsupported_ids": []+ },+ "message": "No queued job predates submission authority.",+ "name": "legacy_job_authority",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "convertible_count": 0,+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "legacy_shape_count": 0,+ "malformed": [],+ "mirror_window_ends": "2026-11-04"+ },+ "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"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "drift": [],+ "mirror_window_ends": "2026-11-04"+ },+ "message": "No legacy token grant has drifted from its permissions mirror.",+ "name": "legacy_token_grant_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",+ "null_scope_count": 0,+ "tokens": []+ },+ "message": "Every active legacy token has explicit scopes.",+ "name": "legacy_token_null_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",+ "grants": [],+ "server_surface": "full"+ },+ "message": "Every active client and token can call the operations its scopes allow.",+ "name": "grant_new_ops_available",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No image assets indexed yet",+ "name": "image_assets",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "OCR not in use (or no images ingested with OCR opt-in)",+ "name": "ocr_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "stale_count": 1,+ "synced_recently_count": 1,+ "unchanged_count": 0,+ "writer_owned_count": 1+ },+ "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",+ "status": "fail"+ },+ {+ "category": "ops",+ "details": {+ "pending_count": 0,+ "recovering_count": 0,+ "writer_owned_count": 1+ },+ "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",+ "name": "canonical_content_writes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "cache_age": "under an hour ago",+ "checked_at": "<ts>",+ "computed_by": "doctor",+ "degraded": false,+ "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",+ "totals": {+ "assets": 3,+ "configured_repos": 0,+ "failing": 0,+ "no_remote": 1,+ "pages_at_risk": 0,+ "recoverable_repos": 0,+ "unpushed": 0+ }+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "export",+ "--source",+ "default",+ "--dir",+ "<BACKUP_DIR>/default",+ "--brain",+ "host"+ ],+ "command": "gbrain export --source default --dir '<BACKUP_DIR>/default' --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/operations/backup-check.md",+ "inputs": [+ {+ "how": "Ask the user where backups should live (a directory outside the brain, ideally synced or on another disk).",+ "name": "BACKUP_DIR"+ }+ ],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "backup_coverage",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Writes a Markdown copy of 'default' (pages and facts) to a directory outside the brain so it survives losing the database."+ },+ "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",+ "name": "backup_coverage",+ "readiness_state": "degraded",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No same-source content-hash duplicate groups",+ "name": "content_hash_duplicates",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All code-page chunks carry symbol metadata",+ "name": "code_chunk_metadata",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No configured collectors declare output paths",+ "name": "db_only_collector_collision",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "System One is off (every decide slot is off; nothing is sent).",+ "name": "decide_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "fix": "preview links: gbrain facts relink --dry-run",+ "inferred_7d": {+ "mention": 0,+ "page": 0+ },+ "new_7d": {+ "eligible": 3,+ "facts": 3,+ "no_subject": 0,+ "unlinked": 0,+ "unlinked_eligible": 0+ },+ "no_subject": 0,+ "origins": [],+ "relinked_7d": {},+ "sources": 3,+ "window": {+ "active": 3,+ "capped": false,+ "fence_owned": 0,+ "unlinked": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "contradiction_mode": "propose (default)",+ "lagging": 0,+ "proposals": {+ "applied": 0,+ "proposed": 0,+ "undated": 0+ },+ "read_policy": "on",+ "relationships": {},+ "stale_assertions": []+ },+ "message": "relationships: none yet; read policy on; contradiction mode propose (default)",+ "name": "edge_validity",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_calls_24h": 0,+ "chat_available": false,+ "daily_limit": 200,+ "docs": "docs/guides/life-chronicle.md",+ "enabled": true,+ "job_budget_usd": 0.25,+ "last_7d": {+ "extracted": 0,+ "failed": 0,+ "failedReasons": {},+ "reasons": {},+ "skipped": 0+ },+ "ledger_available": true,+ "pending": 0,+ "principals_24h": [],+ "readiness": "missing",+ "run_now": [+ "gbrain",+ "dream",+ "--phase",+ "chronicle"+ ],+ "severity": "info",+ "source": "default",+ "spend_7d": {+ "incompleteRecords": 0,+ "knownUsd": 0,+ "unpricedCalls": 0+ }+ },+ "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",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "chronicle.* settings are valid.",+ "name": "chronicle_config_invalid",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ask_user": true,+ "code": "auto_chronicle_default_on",+ "decisions": [+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "id": "keep",+ "label": "Keep automatic extraction on"+ },+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "consent": [],+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."+ },+ "id": "opt_out",+ "label": "Turn automatic extraction off"+ }+ ],+ "default": "keep",+ "docs": "docs/guides/life-chronicle.md",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "severity": "info"+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set auto_chronicle true --brain host",+ "consent": [+ "paid",+ "egress"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",+ "name": "auto_chronicle_default_on",+ "readiness_state": "ok",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": {+ "active": 0,+ "delayed": 0,+ "waiting": 0+ },+ "budget_usd": 1,+ "daily_budget_usd": 5,+ "daily_spent_usd": 0,+ "docs": "docs/guides/facts-drain.md",+ "enabled": true,+ "health": "idle",+ "last_run": null,+ "max_jobs": 50+ },+ "message": "No facts-absorb jobs are queued (no run recorded yet).",+ "name": "facts_drain",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "applicable": false+ },+ "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "fact_take_vectors",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "auto_analyze": true,+ "checked": [+ "pages",+ "links",+ "facts",+ "takes",+ "content_chunks",+ "timeline_entries"+ ],+ "engine": "pglite",+ "fix": "gbrain repair planner-stats --apply",+ "missing_search_statistics": [],+ "stale": []+ },+ "message": "Planner statistics are fresh on 6 hot tables.",+ "name": "planner_stats_stale",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "answers_recorded": 0,+ "docs": "docs/guides/retrieval-feedback.md",+ "enabled": false,+ "implicit": false,+ "influence": 0.1,+ "last_rating_at": null,+ "learn": true,+ "ratings_cited": 0,+ "ratings_explicit": 0,+ "top_client_share_7d": null,+ "weights": 0,+ "weights_off_neutral": 0+ },+ "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"+ },+ {+ "category": "meta",+ "details": {+ "column": "not_null",+ "failed": [],+ "pending": 0+ },+ "message": "Every page has its revision; the page revision backfill is complete.",+ "name": "revision_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backfill": {+ "completed_at": "<ts>",+ "interrupted": false+ },+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 27,+ "tool_observed": 0,+ "unknown": 3,+ "user_confirmed": 0+ },+ "derived": {+ "external_pct": 0,+ "external_untrusted": 0,+ "rows": 0+ },+ "rows": 30,+ "tables": [+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 19,+ "tool_observed": 0,+ "unknown": 1,+ "user_confirmed": 0+ },+ "rows": 20,+ "table": "pages"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 3,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 3,+ "table": "facts"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 0,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 0,+ "table": "takes"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 5,+ "tool_observed": 0,+ "unknown": 2,+ "user_confirmed": 0+ },+ "rows": 7,+ "table": "timeline_entries"+ }+ ],+ "unknown_pct": 10+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "completed_at": null,+ "detector_version": 2,+ "total_unscanned": 0,+ "unscanned": {+ "facts": 0,+ "pages": 0,+ "takes": 0,+ "timeline_entries": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "legacy_unknown": 0,+ "pending": [],+ "unclaimed": []+ },+ "message": "No unclaimed source holds rows from before trust tiers.",+ "name": "trust_sources_unclaimed",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": false,+ "pages": 0+ },+ "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": {+ "consumers": [],+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host"+ },+ "message": "PGLite admits one process; no consumer heartbeat rows are kept.",+ "name": "two_consumers_on_host",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "owners": []+ },+ "message": "PGLite admits one process; no consumer heartbeat rows are kept.",+ "name": "consumers_without_heartbeat",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",+ "host_id": "<uuid>",+ "host_json_path": "<home>/.gbrain/persistence/host.json",+ "mismatches": []+ },+ "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",+ "name": "host_identity_mismatch",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/write-refusals.md#invalid_fence",+ "model_repair": {+ "max_usd_per_day": 1,+ "max_usd_per_page": 0.3,+ "reserved_today_usd": 0,+ "spent_today_usd": 0+ },+ "partial": false,+ "partial_sources": [],+ "sources": [+ {+ "by_tier": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "default",+ "total": 0+ },+ {+ "by_tier": {+ "deterministic": 2,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 4+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 2+ },+ "oldest_hold_at": "<ts>",+ "pages": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "sample": [+ {+ "bucket": "hold",+ "key": "fences/llm",+ "path": "fences/llm.md",+ "reasons": [+ "no_header"+ ],+ "tier": "llm"+ },+ {+ "bucket": "hold",+ "key": "fences/manual",+ "path": "fences/manual.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "file",+ "key": "fences/untracked",+ "path": "fences/untracked.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ },+ {+ "bucket": "page",+ "key": "notes/stored-fence",+ "path": "notes/stored-fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "notes",+ "total": 4+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fence",+ "path": "fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "plain",+ "total": 1+ }+ ],+ "timeout_ms": "<volatile>",+ "total": 5,+ "trend": [+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "default",+ "top_writers": []+ },+ {+ "by_day": [+ {+ "count": 1,+ "day": "2026-10-10"+ }+ ],+ "normalized_7d": 1,+ "source_id": "notes",+ "top_writers": [+ {+ "count": 1,+ "writer": "fences/"+ }+ ]+ },+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "plain",+ "top_writers": []+ }+ ],+ "uncommitted_repairs": 0,+ "unrenderable_legacy_facts": {+ "complete": true,+ "pages": [],+ "total": 0+ },+ "warn_at_normalized_7d": 20+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn"+ },+ {+ "category": "ops",+ "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",+ "name": "search_mode",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "counts": {},+ "prefixes": [+ "test/",+ "attachments/",+ ".raw/"+ ]+ },+ "message": "No pages hidden by search-exclude policy.",+ "name": "hidden_by_search_policy",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No retrieval-affecting files changed in working tree.",+ "name": "eval_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Reranker disabled — no failures expected",+ "name": "reranker_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No exhausted batch retries in last 24h.",+ "name": "batch_retry_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite — no queue to check",+ "name": "wedged_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No orphaned private queues",+ "name": "orphaned_private_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite — single-writer, fan-out is 1",+ "name": "autopilot_fanout_concurrency",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "no Google accounts connected (gbrain google connect to start)",+ "name": "google_oauth",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "graph_signals disabled — coverage not checked",+ "name": "graph_signals_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",+ "name": "junk_entity_hubs",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "message": "Embeddings disabled — no active embedding width to reconcile.",+ "name": "embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Skipped on PGLite (single bundled pgvector version).",+ "name": "facts_embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Multi-source brain (2 non-default source(s)); all populated",+ "name": "source_routing_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No OAuth clients registered",+ "name": "oauth_confidential_client_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "Lock path: <home>/.gbrain/autopilot.lock",+ "name": "autopilot_lock_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No stale locks (no rows with ttl_expires_at < NOW())",+ "name": "stale_locks",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "counts": {+ "global": 14,+ "mixed": 2,+ "source": 12+ },+ "phase_scope_map": {+ "backlinks": "source",+ "calibration_profile": "global",+ "chronicle": "global",+ "consolidate": "source",+ "content_repair": "global",+ "conversation_facts_backfill": "source",+ "drift": "global",+ "edge_contradictions": "global",+ "embed": "global",+ "enrich_thin": "source",+ "extract": "source",+ "extract_atoms": "source",+ "extract_facts": "source",+ "facts_drain": "global",+ "fence_repair": "global",+ "grade_takes": "global",+ "lint": "source",+ "orphans": "global",+ "patterns": "mixed",+ "propose_takes": "source",+ "purge": "global",+ "recompute_emotional_weight": "source",+ "resolve_symbol_edges": "global",+ "schema-suggest": "source",+ "skillopt": "global",+ "sync": "source",+ "synthesize": "mixed",+ "synthesize_concepts": "global"+ }+ },+ "message": "Phase taxonomy: 12 source-scoped, 14 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, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "name": "cycle_phase_scope",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",+ "name": "embed_staleness",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "entity_link_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "timeline_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "takes.bootstrap_enabled",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set takes.bootstrap_enabled true --brain host",+ "consent": [+ "paid"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "takes_count",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."+ },+ "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",+ "name": "takes_count",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Active pack [email protected]+a50a67b9 is current (no successor declared)",+ "name": "pack_upgrade_available",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "5 distinct typed values (pack declares 20)",+ "name": "type_proliferation",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No dangling aliases",+ "name": "dangling_aliases",+ "status": "ok"+ }+ ],+ "db_url_source": null,+ "engine": "pglite",+ "health_score": 40,+ "schema_version": 2,+ "status": "unhealthy",+ "top_issues": [+ {+ "fix": "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",+ "status": "fail",+ "tier": "root"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "fix": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn",+ "tier": "symptom"+ }+ ]+ },+ "stderr": [+ "[backup] checked 3 asset(s): 1 without a git remote (computed_by=doctor)"+ ],+ "stdout": "<json>"+ },+ "second": {+ "args": [+ "doctor",+ "--json",+ "--skills-dir",+ "<home>/skills"+ ],+ "exit_code": 1,+ "report": {+ "brain_checks_score": 45,+ "capped_by": [+ "embeddings_disabled"+ ],+ "category_scores": {+ "brain": 45,+ "meta": 100,+ "ops": 100,+ "skill": 95+ },+ "checks": [+ {+ "category": "skill",+ "message": "1 skills, all reachable",+ "name": "resolver_health",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "enabled": true,+ "engine": "pglite",+ "fired_recently": false,+ "last_fired": null,+ "path": "pglite — serve IPC socket not present",+ "policy_skill_installed": false+ },+ "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": "pglite — serve IPC socket not present; enabled but NO resolve path exists right now: the IPC socket is only bound by a running `gbrain serve` (stdio or --http) — until one is up, hooks/reflex degrade to no_serve on this brain (host capability may still supply pointers; policy skill carries otherwise) — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`",+ "name": "retrieval_reflex_health",+ "readiness_state": "not_applicable",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "channels": {},+ "window_days": 7+ },+ "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",+ "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",+ "name": "memory_verbs_usage",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1/1 skills pass",+ "name": "skill_conformance",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1 skill(s) compliant or exempt",+ "name": "skill_brain_first",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "No skills.lock.json in <home>/skills — integrity check not applicable",+ "name": "skills_manifest_integrity",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "drifted": [],+ "new": [+ "academic-verify",+ "archive-crawler",+ "article-enrichment",+ "ask-user",+ "blog-ingest",+ "book-mirror",+ "brain-ingest-gate",+ "brain-link-discipline",+ "brain-ops",+ "brain-pdf",+ "brain-taxonomist",+ "briefing",+ "bulk-ingestion",+ "capture",+ "chat-connectors",+ "citation-fixer",+ "citation-graph-ingest",+ "cold-start",+ "company-brainify",+ "concept-synthesis",+ "context-audit",+ "conversation-archive",+ "correction-pipeline",+ "cron-scheduler",+ "cross-modal-review",+ "daily-task-manager",+ "daily-task-prep",+ "data-loss-gate",+ "data-research",+ "draft-in-voice",+ "eiirp",+ "enrich",+ "fact-check",+ "functional-area-resolver",+ "gbrain-advisor",+ "google-loops",+ "idea-ingest",+ "idea-lineage",+ "ingest",+ "maintain",+ "mcp-access",+ "measure-before-you-fix",+ "media-ingest",+ "meeting-ingestion",+ "minion-orchestrator",+ "perplexity-research",+ "publish",+ "query",+ "repo-architecture",+ "reports",+ "research-compendium",+ "resolve-before-asking",+ "signal-detector",+ "skill-autobench",+ "skill-creator",+ "skillify",+ "skillpack-check",+ "skillpack-harvest",+ "soul-audit",+ "strategic-reading",+ "testing",+ "two-tier-extraction",+ "voice-note-ingest",+ "webhook-transforms"+ ]+ },+ "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",+ "status": "warn"+ },+ {+ "category": "skill",+ "message": "no installed skills declare preconditions",+ "name": "skill_preconditions",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "enabled": false,+ "out_of_band_settable": true,+ "reason": "disabled"+ },+ "message": "memorable relay off (default)",+ "name": "memorable_relay_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "audience": "personal",+ "audience_reasons": [+ "no shared declaration; 0 non-automation client(s) active in 30d"+ ],+ "backstop_visibility": "private",+ "capture_lanes": {+ "compact": "extract",+ "session_end": "extract",+ "writeback": "retire"+ },+ "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",+ "cross_lane_duplicates_7d": 0,+ "instruction_visibility": "world",+ "mode": "off",+ "mode_valid": true,+ "near_duplicates_shadow_7d": 0,+ "nudge_shown": false,+ "transient_ttl": "3d",+ "ttl_valid": true,+ "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"+ },+ "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",+ "message": "No chat connectors configured (optional).",+ "name": "connectors",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "breaker_enabled": true,+ "count_exact": true,+ "inspected_keys": 0,+ "keys": [],+ "threshold": 3+ },+ "message": "No dream key died 3+ times in 24h",+ "name": "dream_paid_loop",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "pending_fresh_install": [+ "0.11.0",+ "0.14.0",+ "0.22.4",+ "0.28.0",+ "0.53.0"+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "apply-migrations",+ "--yes",+ "--no-autopilot-install"+ ],+ "command": "gbrain apply-migrations --yes --no-autopilot-install",+ "consent": [],+ "next": "run",+ "requires_exclusive": true,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "minions_migration",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."+ },+ "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",+ "name": "minions_migration",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "mode=notify",+ "name": "self_upgrade_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Bun <bun-version> (minimum 1.4.0)",+ "name": "bun_runtime",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",+ "name": "nightly_quality_probe_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "kinds": [],+ "schema_version": 1+ },+ "message": "no extractions in last 7 days",+ "name": "extract_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",+ "name": "conversation_facts_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": 0,+ "known_approximation": "page backlog only; transcript corpus not counted",+ "pack_declares_phase": false+ },+ "message": "no pages awaiting atom extraction",+ "name": "extract_atoms_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "drift_pct": 0,+ "drifted": 0,+ "slug_unbound": 0,+ "source_changed": 0,+ "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",+ "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",+ "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+ },+ "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": []+ },+ "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": {+ "reason": "no_harness_detected"+ },+ "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+ },+ "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",+ "message": "Extension installed",+ "name": "pgvector",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",+ "name": "pages_upsert_arbiter",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "readiness": "projection_pending",+ "ready": false+ },+ "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": {+ "effects": [],+ "exact": true,+ "inspected": 0,+ "parked_effects": 0,+ "truncated": false+ },+ "message": "No Git or withdrawal effect is parked.",+ "name": "parked_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "refreshes": []+ },+ "message": "No worktree refresh is stuck.",+ "name": "worktree_refresh_stuck",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "extra_columns": [],+ "page_child_source_columns": [],+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"+ },+ "message": "Guarded tables carry only the columns gbrain creates.",+ "name": "managed_guard_schema_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "guard_refusals": 0,+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",+ "trigger_refusals": 0,+ "unclassified_p0001": 0,+ "window_days": 7+ },+ "message": "No write was refused by a database guard in the last 7 days.",+ "name": "publication_refusals",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "links_link_source_check has the v114 kebab-case gate",+ "name": "links_link_source_check",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite at 20 pages — comfortable below the 1000-page threshold",+ "name": "pglite_scale",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Skipped (PGLite — no PostgREST exposure, RLS not applicable)",+ "name": "rls",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Version <latest> (latest: <latest>)",+ "name": "schema_version",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "1066 column(s) verified against live schema",+ "name": "schema_columns",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Skipped (PGLite — no event trigger support)",+ "name": "rls_event_trigger",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "embeddings",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",+ "name": "embedding_provider",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Registry healthy: 1 columns (embedding_image); primary embeddings disabled",+ "name": "embedding_column_registry",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding env overrides set",+ "name": "embedding_env_override",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding migration in flight",+ "name": "embedding_migration_state",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No chat_fallback_chain is set: every chat call uses only its own model.",+ "name": "chat_fallback_chain",+ "status": "ok"+ },+ {+ "category": "meta",+ "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",+ "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "graph_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn"+ },+ {+ "category": "brain",+ "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",+ "name": "orphan_ratio",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No by-mention links in this brain.",+ "name": "stale_mentions",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No orphaned timeline rows across 4 page(s).",+ "name": "timeline_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No slug collisions across 3 source checkout(s).",+ "name": "slug_collisions",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_unrenderable_rows": 1,+ "materializable_rows": 2,+ "pages_affected": 2,+ "pages_inspected": 4,+ "repair": "timeline",+ "truncated": false+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "message": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "looser_atoms": 0,+ "looser_concepts": 0,+ "repair": "visibility",+ "truncated": false,+ "unstamped_atoms": 0,+ "unstamped_concepts": 0+ },+ "message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.",+ "name": "derived_visibility",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "repair": "safe-chunks",+ "truncated": false+ },+ "message": "Every re-sealable page is at the safe-chunk index version.",+ "name": "safe_index_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "truncated": false+ },+ "message": "No page waits for the credential-safe re-chunk.",+ "name": "credential_projection_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "checkpoints": 0,+ "count": 0,+ "docs": "docs/guides/repair.md#connector-checkpoints",+ "repair": "connector-checkpoints",+ "retries": 0,+ "truncated": false+ },+ "message": "No orphan connector checkpoint rows older than 7 days.",+ "name": "connector_checkpoints",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair request-indexes --apply",+ "count": 0,+ "docs": "docs/guides/repair.md#request-indexes",+ "indexes": [+ {+ "name": "persistence_requests_sync_run_open",+ "state": "valid"+ },+ {+ "name": "persistence_requests_sync_run_committed",+ "state": "valid"+ }+ ],+ "repair": "request-indexes"+ },+ "message": "Managed sync request indexes are valid.",+ "name": "persistence_request_indexes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "commands": [],+ "docs": "docs/guides/repair.md#request-growth",+ "rows": 22,+ "rows_exact": true,+ "scopes": [+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.brain_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 1000000,+ "per_day": 3,+ "scope": "brain",+ "window_days": 7+ },+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.principal_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 250000,+ "per_day": 3,+ "scope": "principal:local_cli:<uuid>",+ "window_days": 7+ }+ ],+ "verify": "gbrain doctor --json (check persistence_request_growth)",+ "window_days": 7+ },+ "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"+ },+ {+ "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": {+ "applied": null,+ "configured": "5min",+ "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"+ },+ "message": "PGLite has no session to time out.",+ "name": "persistence_session_timeouts",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#connector-held-items",+ "held": 0,+ "sources": []+ },+ "message": "No connector items are held.",+ "name": "connector_held_items",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/repair.md#held-files",+ "escalate_count": 50,+ "fences": 2,+ "held": 8,+ "source_ids": [+ "notes"+ ],+ "sources": [+ {+ "escalated": false,+ "fences": 2,+ "first": [+ {+ "code": "invalid_fence",+ "path": "fences/llm.md",+ "reason": "no_header",+ "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_fence",+ "path": "fences/manual.md",+ "reason": "takes_kind_unsupported",+ "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/dash-line.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/duplicate-key.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/indented-close.md",+ "reason": "yaml_parse",+ "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."+ }+ ],+ "held": 8,+ "missing": 8,+ "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",+ "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",+ "source_id": "notes",+ "stale": 0,+ "status": "gbrain sources status notes"+ }+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "status": "warn"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/repair.md#held-files",+ "hooks": []+ },+ "message": "No outdated gbrain frontmatter pre-commit hook is installed.",+ "name": "frontmatter_hook",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bindings": [],+ "count": 0,+ "docs": "docs/guides/repair.md#orphan-bindings",+ "repair": "orphan-bindings",+ "truncated": false+ },+ "message": "Every persistence source binding belongs to an existing source.",+ "name": "orphan_persistence_bindings",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "sources": [],+ "total": 0+ },+ "message": "No page was written database-only to an unbound source.",+ "name": "unbound_source",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "floor": "0.60.5.0",+ "hosts": [],+ "observed": [+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "consumer",+ "version": "<version>"+ },+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "admitter",+ "version": "<version>"+ }+ ],+ "truncated": false,+ "window_days": 7+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "classified": 0,+ "count": "exact",+ "truncated": false,+ "unclassifiable": 0+ },+ "message": "No session corpus is configured; nothing to classify.",+ "name": "self_capture",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "outcome": "skipped",+ "reason": "pglite"+ },+ "message": "Skipped: PGLite runs vector search in-process; the plan check applies to Postgres brains.",+ "name": "vector_plan",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair embedding-effects",+ "count": "exact",+ "docs": "docs/guides/repair.md#stale-queued-embedding-effects",+ "effects": [],+ "failed_effects": 0,+ "repair": "embedding-effects",+ "resolution": "repairable",+ "retry_queued_effects": 0,+ "stale_effects": 0,+ "truncated": false+ },+ "message": "No committed write has a stale queued or failed embedding effect.",+ "name": "stale_embedding_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/google-connect.md",+ "repair": "google-file-modes",+ "sources": []+ },+ "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",+ "name": "google_file_modes",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "extractor-facts"+ },+ "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",+ "name": "extractor_facts_expired",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "evidenced": 0,+ "repair": "conversation-labels"+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "extractor_version": 1,+ "sample": [],+ "scanned": 0,+ "stale": 0,+ "unstamped": 0+ },+ "message": "No conversation extraction outcome predates extractor version 1.",+ "name": "conversation_outcomes_stale",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "captured-facts",+ "unclassifiable": 0+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "drifted": 0,+ "repair": "loop-facts"+ },+ "message": "Every closed commitment loop has its fact retired.",+ "name": "loop_facts_drift",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "excluded": 0,+ "fenced": 0,+ "repair": "ontology-facts",+ "retired": 0+ },+ "message": "No ontology observation is held by a page's Facts table.",+ "name": "ontology_facts_fenced",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "Sampled 20 pages; no bare-tweet phrases or external links.",+ "name": "integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All JSONB columns store objects/arrays",+ "name": "jsonb_integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No takes yet",+ "name": "takes_weight_grid",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All FK-child tables clean (10 tables checked)",+ "name": "child_table_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All synthesized pages carry a raw trace or explicit exemption",+ "name": "raw_provenance",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All source config values are JSON objects",+ "name": "source_config_shape",+ "status": "ok"+ },+ {+ "category": "skill",+ "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",+ "message": "All image-asset chunks have modality=image",+ "name": "cross_modal_modality_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "search.unified_multimodal is off; coverage check N/A",+ "name": "unified_multimodal_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No truncated bodies detected",+ "name": "markdown_body_completeness",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",+ "name": "scraper_junk_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No quarantined pages",+ "name": "quarantined_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No flagged pages",+ "name": "flagged_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": 0,+ "days": 7,+ "source_id": null+ },+ "message": "No stale unverified extraction stubs",+ "name": "unverified_extractions",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#frontmatter",+ "partial": false,+ "repairable": 14,+ "source_ids": [+ "notes",+ "plain"+ ],+ "sources": [+ {+ "by_code": {+ "FRONTMATTER_COMMENT_VALUE": 1,+ "MISSING_CLOSE": 2,+ "NESTED_QUOTES": 2,+ "NULL_BYTES": 2,+ "SLUG_MISMATCH": 1,+ "YAML_PARSE": 3,+ "needs_interpretation": 4+ },+ "files": 13,+ "preview": "gbrain repair frontmatter --source notes",+ "sample_paths": [+ "fm/comment-value.md",+ "fm/dash-line.md",+ "fm/duplicate-key.md",+ "fm/late-broken.md",+ "fm/missing-close.md"+ ],+ "source_id": "notes",+ "status": "scanned"+ },+ {+ "by_code": {+ "needs_interpretation": 1+ },+ "files": 1,+ "preview": "gbrain repair frontmatter --source plain",+ "sample_paths": [+ "broken.md"+ ],+ "source_id": "plain",+ "status": "scanned"+ }+ ],+ "unscanned": []+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn"+ },+ {+ "category": "meta",+ "message": "No capture failures in the last 24h",+ "name": "eval_capture",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "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",+ "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",+ "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",+ "name": "salience_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "by_queue": {},+ "depth": 0,+ "engine": "pglite",+ "worker_alive": true+ },+ "message": "PGLite: no jobs waiting for a worker.",+ "name": "queue_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",+ "name": "subagent_capability",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",+ "name": "facts_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Brain-wide maintenance jobs are finishing within their deadline.",+ "name": "global_maintenance_timeouts",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_ids": [],+ "authorizable": {},+ "authorizable_total": 0,+ "docs": "docs/guides/repair.md#legacy-job-authority",+ "live": 0,+ "queued_spend": {+ "by_basis": {},+ "long_waiting": 0,+ "long_waiting_ids": []+ },+ "terminal_keyed": {},+ "terminal_keyed_total": 0,+ "unsupported": 0,+ "unsupported_ids": []+ },+ "message": "No queued job predates submission authority.",+ "name": "legacy_job_authority",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "convertible_count": 0,+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "legacy_shape_count": 0,+ "malformed": [],+ "mirror_window_ends": "2026-11-04"+ },+ "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"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "drift": [],+ "mirror_window_ends": "2026-11-04"+ },+ "message": "No legacy token grant has drifted from its permissions mirror.",+ "name": "legacy_token_grant_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",+ "null_scope_count": 0,+ "tokens": []+ },+ "message": "Every active legacy token has explicit scopes.",+ "name": "legacy_token_null_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",+ "grants": [],+ "server_surface": "full"+ },+ "message": "Every active client and token can call the operations its scopes allow.",+ "name": "grant_new_ops_available",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No image assets indexed yet",+ "name": "image_assets",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "OCR not in use (or no images ingested with OCR opt-in)",+ "name": "ocr_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "stale_count": 1,+ "synced_recently_count": 1,+ "unchanged_count": 0,+ "writer_owned_count": 1+ },+ "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",+ "status": "fail"+ },+ {+ "category": "ops",+ "details": {+ "pending_count": 0,+ "recovering_count": 0,+ "writer_owned_count": 1+ },+ "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",+ "name": "canonical_content_writes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "cache_age": "under an hour ago",+ "checked_at": "<ts>",+ "computed_by": "doctor",+ "degraded": false,+ "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",+ "totals": {+ "assets": 3,+ "configured_repos": 0,+ "failing": 0,+ "no_remote": 1,+ "pages_at_risk": 0,+ "recoverable_repos": 0,+ "unpushed": 0+ }+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "export",+ "--source",+ "default",+ "--dir",+ "<BACKUP_DIR>/default",+ "--brain",+ "host"+ ],+ "command": "gbrain export --source default --dir '<BACKUP_DIR>/default' --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/operations/backup-check.md",+ "inputs": [+ {+ "how": "Ask the user where backups should live (a directory outside the brain, ideally synced or on another disk).",+ "name": "BACKUP_DIR"+ }+ ],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "backup_coverage",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Writes a Markdown copy of 'default' (pages and facts) to a directory outside the brain so it survives losing the database."+ },+ "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",+ "name": "backup_coverage",+ "readiness_state": "degraded",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No same-source content-hash duplicate groups",+ "name": "content_hash_duplicates",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All code-page chunks carry symbol metadata",+ "name": "code_chunk_metadata",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No configured collectors declare output paths",+ "name": "db_only_collector_collision",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "System One is off (every decide slot is off; nothing is sent).",+ "name": "decide_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "fix": "preview links: gbrain facts relink --dry-run",+ "inferred_7d": {+ "mention": 0,+ "page": 0+ },+ "new_7d": {+ "eligible": 3,+ "facts": 3,+ "no_subject": 0,+ "unlinked": 0,+ "unlinked_eligible": 0+ },+ "no_subject": 0,+ "origins": [],+ "relinked_7d": {},+ "sources": 3,+ "window": {+ "active": 3,+ "capped": false,+ "fence_owned": 0,+ "unlinked": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "contradiction_mode": "propose (default)",+ "lagging": 0,+ "proposals": {+ "applied": 0,+ "proposed": 0,+ "undated": 0+ },+ "read_policy": "on",+ "relationships": {},+ "stale_assertions": []+ },+ "message": "relationships: none yet; read policy on; contradiction mode propose (default)",+ "name": "edge_validity",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_calls_24h": 0,+ "chat_available": false,+ "daily_limit": 200,+ "docs": "docs/guides/life-chronicle.md",+ "enabled": true,+ "job_budget_usd": 0.25,+ "last_7d": {+ "extracted": 0,+ "failed": 0,+ "failedReasons": {},+ "reasons": {},+ "skipped": 0+ },+ "ledger_available": true,+ "pending": 0,+ "principals_24h": [],+ "readiness": "missing",+ "run_now": [+ "gbrain",+ "dream",+ "--phase",+ "chronicle"+ ],+ "severity": "info",+ "source": "default",+ "spend_7d": {+ "incompleteRecords": 0,+ "knownUsd": 0,+ "unpricedCalls": 0+ }+ },+ "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",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "chronicle.* settings are valid.",+ "name": "chronicle_config_invalid",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ask_user": true,+ "code": "auto_chronicle_default_on",+ "decisions": [+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "id": "keep",+ "label": "Keep automatic extraction on"+ },+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "consent": [],+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."+ },+ "id": "opt_out",+ "label": "Turn automatic extraction off"+ }+ ],+ "default": "keep",+ "docs": "docs/guides/life-chronicle.md",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "severity": "info"+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set auto_chronicle true --brain host",+ "consent": [+ "paid",+ "egress"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",+ "name": "auto_chronicle_default_on",+ "readiness_state": "ok",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": {+ "active": 0,+ "delayed": 0,+ "waiting": 0+ },+ "budget_usd": 1,+ "daily_budget_usd": 5,+ "daily_spent_usd": 0,+ "docs": "docs/guides/facts-drain.md",+ "enabled": true,+ "health": "idle",+ "last_run": null,+ "max_jobs": 50+ },+ "message": "No facts-absorb jobs are queued (no run recorded yet).",+ "name": "facts_drain",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "applicable": false+ },+ "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "fact_take_vectors",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "auto_analyze": true,+ "checked": [+ "pages",+ "links",+ "facts",+ "takes",+ "content_chunks",+ "timeline_entries"+ ],+ "engine": "pglite",+ "fix": "gbrain repair planner-stats --apply",+ "missing_search_statistics": [],+ "stale": []+ },+ "message": "Planner statistics are fresh on 6 hot tables.",+ "name": "planner_stats_stale",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "answers_recorded": 0,+ "docs": "docs/guides/retrieval-feedback.md",+ "enabled": false,+ "implicit": false,+ "influence": 0.1,+ "last_rating_at": null,+ "learn": true,+ "ratings_cited": 0,+ "ratings_explicit": 0,+ "top_client_share_7d": null,+ "weights": 0,+ "weights_off_neutral": 0+ },+ "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"+ },+ {+ "category": "meta",+ "details": {+ "column": "not_null",+ "failed": [],+ "pending": 0+ },+ "message": "Every page has its revision; the page revision backfill is complete.",+ "name": "revision_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backfill": {+ "completed_at": "<ts>",+ "interrupted": false+ },+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 27,+ "tool_observed": 0,+ "unknown": 4,+ "user_confirmed": 0+ },+ "derived": {+ "external_pct": 0,+ "external_untrusted": 0,+ "rows": 0+ },+ "rows": 31,+ "tables": [+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 19,+ "tool_observed": 0,+ "unknown": 1,+ "user_confirmed": 0+ },+ "rows": 20,+ "table": "pages"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 3,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 3,+ "table": "facts"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 0,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 0,+ "table": "takes"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 5,+ "tool_observed": 0,+ "unknown": 3,+ "user_confirmed": 0+ },+ "rows": 8,+ "table": "timeline_entries"+ }+ ],+ "unknown_pct": 12.9+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "completed_at": null,+ "detector_version": 2,+ "total_unscanned": 0,+ "unscanned": {+ "facts": 0,+ "pages": 0,+ "takes": 0,+ "timeline_entries": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "legacy_unknown": 0,+ "pending": [],+ "unclaimed": []+ },+ "message": "No unclaimed source holds rows from before trust tiers.",+ "name": "trust_sources_unclaimed",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": false,+ "pages": 0+ },+ "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": {+ "consumers": [],+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host"+ },+ "message": "PGLite admits one process; no consumer heartbeat rows are kept.",+ "name": "two_consumers_on_host",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "owners": []+ },+ "message": "PGLite admits one process; no consumer heartbeat rows are kept.",+ "name": "consumers_without_heartbeat",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",+ "host_id": "<uuid>",+ "host_json_path": "<home>/.gbrain/persistence/host.json",+ "mismatches": []+ },+ "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",+ "name": "host_identity_mismatch",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/write-refusals.md#invalid_fence",+ "model_repair": {+ "max_usd_per_day": 1,+ "max_usd_per_page": 0.3,+ "reserved_today_usd": 0,+ "spent_today_usd": 0+ },+ "partial": false,+ "partial_sources": [],+ "sources": [+ {+ "by_tier": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "default",+ "total": 0+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 1,+ "manual": 2,+ "resolver": 0,+ "total": 4+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 1,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 2+ },+ "oldest_hold_at": "<ts>",+ "pages": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fences/late",+ "path": "fences/late.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "hold",+ "key": "fences/llm",+ "path": "fences/llm.md",+ "reasons": [+ "no_header"+ ],+ "tier": "llm"+ },+ {+ "bucket": "hold",+ "key": "fences/manual",+ "path": "fences/manual.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "page",+ "key": "notes/stored-fence",+ "path": "notes/stored-fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "notes",+ "total": 4+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fence",+ "path": "fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "plain",+ "total": 1+ }+ ],+ "timeout_ms": "<volatile>",+ "total": 5,+ "trend": [+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "default",+ "top_writers": []+ },+ {+ "by_day": [+ {+ "count": 1,+ "day": "2026-10-10"+ }+ ],+ "normalized_7d": 1,+ "source_id": "notes",+ "top_writers": [+ {+ "count": 1,+ "writer": "fences/"+ }+ ]+ },+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "plain",+ "top_writers": []+ }+ ],+ "uncommitted_repairs": 0,+ "unrenderable_legacy_facts": {+ "complete": true,+ "pages": [],+ "total": 0+ },+ "warn_at_normalized_7d": 20+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn"+ },+ {+ "category": "ops",+ "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",+ "name": "search_mode",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "counts": {},+ "prefixes": [+ "test/",+ "attachments/",+ ".raw/"+ ]+ },+ "message": "No pages hidden by search-exclude policy.",+ "name": "hidden_by_search_policy",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No retrieval-affecting files changed in working tree.",+ "name": "eval_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Reranker disabled — no failures expected",+ "name": "reranker_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No exhausted batch retries in last 24h.",+ "name": "batch_retry_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite — no queue to check",+ "name": "wedged_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No orphaned private queues",+ "name": "orphaned_private_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "PGLite — single-writer, fan-out is 1",+ "name": "autopilot_fanout_concurrency",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "no Google accounts connected (gbrain google connect to start)",+ "name": "google_oauth",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "graph_signals disabled — coverage not checked",+ "name": "graph_signals_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",+ "name": "junk_entity_hubs",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "message": "Embeddings disabled — no active embedding width to reconcile.",+ "name": "embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Skipped on PGLite (single bundled pgvector version).",+ "name": "facts_embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Multi-source brain (2 non-default source(s)); all populated",+ "name": "source_routing_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No OAuth clients registered",+ "name": "oauth_confidential_client_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "Lock path: <home>/.gbrain/autopilot.lock",+ "name": "autopilot_lock_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No stale locks (no rows with ttl_expires_at < NOW())",+ "name": "stale_locks",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "counts": {+ "global": 14,+ "mixed": 2,+ "source": 12+ },+ "phase_scope_map": {+ "backlinks": "source",+ "calibration_profile": "global",+ "chronicle": "global",+ "consolidate": "source",+ "content_repair": "global",+ "conversation_facts_backfill": "source",+ "drift": "global",+ "edge_contradictions": "global",+ "embed": "global",+ "enrich_thin": "source",+ "extract": "source",+ "extract_atoms": "source",+ "extract_facts": "source",+ "facts_drain": "global",+ "fence_repair": "global",+ "grade_takes": "global",+ "lint": "source",+ "orphans": "global",+ "patterns": "mixed",+ "propose_takes": "source",+ "purge": "global",+ "recompute_emotional_weight": "source",+ "resolve_symbol_edges": "global",+ "schema-suggest": "source",+ "skillopt": "global",+ "sync": "source",+ "synthesize": "mixed",+ "synthesize_concepts": "global"+ }+ },+ "message": "Phase taxonomy: 12 source-scoped, 14 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, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "name": "cycle_phase_scope",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",+ "name": "embed_staleness",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "entity_link_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "timeline_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "takes.bootstrap_enabled",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set takes.bootstrap_enabled true --brain host",+ "consent": [+ "paid"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "takes_count",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."+ },+ "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",+ "name": "takes_count",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Active pack [email protected]+a50a67b9 is current (no successor declared)",+ "name": "pack_upgrade_available",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "5 distinct typed values (pack declares 20)",+ "name": "type_proliferation",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No dangling aliases",+ "name": "dangling_aliases",+ "status": "ok"+ }+ ],+ "db_url_source": null,+ "engine": "pglite",+ "health_score": 40,+ "schema_version": 2,+ "status": "unhealthy",+ "top_issues": [+ {+ "fix": "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",+ "status": "fail",+ "tier": "root"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "fix": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn",+ "tier": "symptom"+ }+ ]+ },+ "stderr": [],+ "stdout": "<json>"+ }+ },+ "normalizer": "doctor-json-v1"+}diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.jsonnew file mode 100644index 0000000000..8e0034b13c--- /dev/null+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json@@ -0,0 +1,5969 @@+{+ "golden": {+ "first": {+ "args": [+ "doctor",+ "--json",+ "--skills-dir",+ "<home>/skills"+ ],+ "exit_code": 1,+ "report": {+ "brain_checks_score": 45,+ "capped_by": [+ "embeddings_disabled"+ ],+ "category_scores": {+ "brain": 45,+ "meta": 100,+ "ops": 100,+ "skill": 95+ },+ "checks": [+ {+ "category": "skill",+ "message": "1 skills, all reachable",+ "name": "resolver_health",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "enabled": true,+ "engine": "postgres",+ "fired_recently": false,+ "last_fired": null,+ "path": "postgres direct",+ "policy_skill_installed": false+ },+ "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"+ },+ {+ "category": "skill",+ "details": {+ "channels": {},+ "window_days": 7+ },+ "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",+ "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",+ "name": "memory_verbs_usage",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1/1 skills pass",+ "name": "skill_conformance",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1 skill(s) compliant or exempt",+ "name": "skill_brain_first",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "No skills.lock.json in <home>/skills — integrity check not applicable",+ "name": "skills_manifest_integrity",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "drifted": [],+ "new": [+ "academic-verify",+ "archive-crawler",+ "article-enrichment",+ "ask-user",+ "blog-ingest",+ "book-mirror",+ "brain-ingest-gate",+ "brain-link-discipline",+ "brain-ops",+ "brain-pdf",+ "brain-taxonomist",+ "briefing",+ "bulk-ingestion",+ "capture",+ "chat-connectors",+ "citation-fixer",+ "citation-graph-ingest",+ "cold-start",+ "company-brainify",+ "concept-synthesis",+ "context-audit",+ "conversation-archive",+ "correction-pipeline",+ "cron-scheduler",+ "cross-modal-review",+ "daily-task-manager",+ "daily-task-prep",+ "data-loss-gate",+ "data-research",+ "draft-in-voice",+ "eiirp",+ "enrich",+ "fact-check",+ "functional-area-resolver",+ "gbrain-advisor",+ "google-loops",+ "idea-ingest",+ "idea-lineage",+ "ingest",+ "maintain",+ "mcp-access",+ "measure-before-you-fix",+ "media-ingest",+ "meeting-ingestion",+ "minion-orchestrator",+ "perplexity-research",+ "publish",+ "query",+ "repo-architecture",+ "reports",+ "research-compendium",+ "resolve-before-asking",+ "signal-detector",+ "skill-autobench",+ "skill-creator",+ "skillify",+ "skillpack-check",+ "skillpack-harvest",+ "soul-audit",+ "strategic-reading",+ "testing",+ "two-tier-extraction",+ "voice-note-ingest",+ "webhook-transforms"+ ]+ },+ "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",+ "status": "warn"+ },+ {+ "category": "skill",+ "message": "no installed skills declare preconditions",+ "name": "skill_preconditions",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "enabled": false,+ "out_of_band_settable": true,+ "reason": "disabled"+ },+ "message": "memorable relay off (default)",+ "name": "memorable_relay_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "audience": "personal",+ "audience_reasons": [+ "no shared declaration; 0 non-automation client(s) active in 30d"+ ],+ "backstop_visibility": "private",+ "capture_lanes": {+ "compact": "extract",+ "session_end": "extract",+ "writeback": "retire"+ },+ "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",+ "cross_lane_duplicates_7d": 0,+ "instruction_visibility": "world",+ "mode": "off",+ "mode_valid": true,+ "near_duplicates_shadow_7d": 0,+ "nudge_shown": false,+ "transient_ttl": "3d",+ "ttl_valid": true,+ "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"+ },+ "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",+ "message": "No chat connectors configured (optional).",+ "name": "connectors",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "breaker_enabled": true,+ "count_exact": true,+ "inspected_keys": 0,+ "keys": [],+ "threshold": 3+ },+ "message": "No dream key died 3+ times in 24h",+ "name": "dream_paid_loop",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "pending_fresh_install": [+ "0.11.0",+ "0.14.0",+ "0.22.4",+ "0.28.0",+ "0.53.0"+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "apply-migrations",+ "--yes",+ "--no-autopilot-install"+ ],+ "command": "gbrain apply-migrations --yes --no-autopilot-install",+ "consent": [],+ "next": "run",+ "requires_exclusive": true,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "minions_migration",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."+ },+ "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",+ "name": "minions_migration",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "mode=notify",+ "name": "self_upgrade_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Bun <bun-version> (minimum 1.4.0)",+ "name": "bun_runtime",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",+ "name": "nightly_quality_probe_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "kinds": [],+ "schema_version": 1+ },+ "message": "no extractions in last 7 days",+ "name": "extract_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",+ "name": "conversation_facts_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": 0,+ "known_approximation": "page backlog only; transcript corpus not counted",+ "pack_declares_phase": false+ },+ "message": "no pages awaiting atom extraction",+ "name": "extract_atoms_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "drift_pct": 0,+ "drifted": 0,+ "slug_unbound": 0,+ "source_changed": 0,+ "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",+ "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",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "gbrain home is outside any enclosing git worktree.",+ "name": "home_dir_in_worktree",+ "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+ },+ "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": []+ },+ "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": {+ "reason": "no_harness_detected"+ },+ "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+ },+ "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",+ "message": "Extension installed",+ "name": "pgvector",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Postgres driver supports safe query cancellation.",+ "name": "postgres_cancellation_driver",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",+ "name": "pages_upsert_arbiter",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "readiness": "projection_pending",+ "ready": false+ },+ "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": {+ "effects": [],+ "exact": true,+ "inspected": 0,+ "parked_effects": 0,+ "truncated": false+ },+ "message": "No Git or withdrawal effect is parked.",+ "name": "parked_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "refreshes": []+ },+ "message": "No worktree refresh is stuck.",+ "name": "worktree_refresh_stuck",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "extra_columns": [],+ "page_child_source_columns": [],+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"+ },+ "message": "Guarded tables carry only the columns gbrain creates.",+ "name": "managed_guard_schema_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "guard_refusals": 0,+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",+ "trigger_refusals": 0,+ "unclassified_p0001": 0,+ "window_days": 7+ },+ "message": "No write was refused by a database guard in the last 7 days.",+ "name": "publication_refusals",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "links_link_source_check has the v114 kebab-case gate",+ "name": "links_link_source_check",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "RLS enabled on 132/132 public tables",+ "name": "rls",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Version <latest> (latest: <latest>)",+ "name": "schema_version",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "1072 column(s) verified against live schema",+ "name": "schema_columns",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Auto-RLS event trigger installed",+ "name": "rls_event_trigger",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "embeddings",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",+ "name": "embedding_provider",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled",+ "name": "embedding_column_registry",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding env overrides set",+ "name": "embedding_env_override",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding migration in flight",+ "name": "embedding_migration_state",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No chat_fallback_chain is set: every chat call uses only its own model.",+ "name": "chat_fallback_chain",+ "status": "ok"+ },+ {+ "category": "meta",+ "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",+ "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "graph_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn"+ },+ {+ "category": "brain",+ "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",+ "name": "orphan_ratio",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No by-mention links in this brain.",+ "name": "stale_mentions",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No orphaned timeline rows across 4 page(s).",+ "name": "timeline_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No slug collisions across 3 source checkout(s).",+ "name": "slug_collisions",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_unrenderable_rows": 1,+ "materializable_rows": 1,+ "pages_affected": 1,+ "pages_inspected": 4,+ "repair": "timeline",+ "truncated": false+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "message": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "looser_atoms": 0,+ "looser_concepts": 0,+ "repair": "visibility",+ "truncated": false,+ "unstamped_atoms": 0,+ "unstamped_concepts": 0+ },+ "message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.",+ "name": "derived_visibility",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "repair": "safe-chunks",+ "truncated": false+ },+ "message": "Every re-sealable page is at the safe-chunk index version.",+ "name": "safe_index_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "truncated": false+ },+ "message": "No page waits for the credential-safe re-chunk.",+ "name": "credential_projection_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "checkpoints": 0,+ "count": 0,+ "docs": "docs/guides/repair.md#connector-checkpoints",+ "repair": "connector-checkpoints",+ "retries": 0,+ "truncated": false+ },+ "message": "No orphan connector checkpoint rows older than 7 days.",+ "name": "connector_checkpoints",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair request-indexes --apply",+ "count": 0,+ "docs": "docs/guides/repair.md#request-indexes",+ "indexes": [+ {+ "name": "persistence_requests_sync_run_open",+ "state": "valid"+ },+ {+ "name": "persistence_requests_sync_run_committed",+ "state": "valid"+ }+ ],+ "repair": "request-indexes"+ },+ "message": "Managed sync request indexes are valid.",+ "name": "persistence_request_indexes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "commands": [],+ "docs": "docs/guides/repair.md#request-growth",+ "rows": 0,+ "rows_exact": false,+ "scopes": [+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.brain_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 1000000,+ "per_day": 3,+ "scope": "brain",+ "window_days": 7+ },+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.principal_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 250000,+ "per_day": 3,+ "scope": "principal:local_cli:<uuid>",+ "window_days": 7+ }+ ],+ "verify": "gbrain doctor --json (check persistence_request_growth)",+ "window_days": 7+ },+ "message": "~0 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"+ },+ {+ "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": {+ "applied": "5min",+ "configured": "5min",+ "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"+ },+ "message": "The session statement_timeout (5min) reaches the server.",+ "name": "persistence_session_timeouts",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#connector-held-items",+ "held": 0,+ "sources": []+ },+ "message": "No connector items are held.",+ "name": "connector_held_items",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/repair.md#held-files",+ "escalate_count": 50,+ "fences": 2,+ "held": 8,+ "source_ids": [+ "notes"+ ],+ "sources": [+ {+ "escalated": false,+ "fences": 2,+ "first": [+ {+ "code": "invalid_fence",+ "path": "fences/llm.md",+ "reason": "no_header",+ "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_fence",+ "path": "fences/manual.md",+ "reason": "takes_kind_unsupported",+ "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/dash-line.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/duplicate-key.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/indented-close.md",+ "reason": "yaml_parse",+ "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."+ }+ ],+ "held": 8,+ "missing": 8,+ "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",+ "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",+ "source_id": "notes",+ "stale": 0,+ "status": "gbrain sources status notes"+ }+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "status": "warn"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/repair.md#held-files",+ "hooks": []+ },+ "message": "No outdated gbrain frontmatter pre-commit hook is installed.",+ "name": "frontmatter_hook",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bindings": [],+ "count": 0,+ "docs": "docs/guides/repair.md#orphan-bindings",+ "repair": "orphan-bindings",+ "truncated": false+ },+ "message": "Every persistence source binding belongs to an existing source.",+ "name": "orphan_persistence_bindings",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "sources": [],+ "total": 0+ },+ "message": "No page was written database-only to an unbound source.",+ "name": "unbound_source",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "floor": "0.60.5.0",+ "hosts": [],+ "observed": [+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "consumer",+ "version": "<version>"+ },+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "admitter",+ "version": "<version>"+ }+ ],+ "truncated": false,+ "window_days": 7+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "classified": 0,+ "count": "exact",+ "truncated": false,+ "unclassifiable": 0+ },+ "message": "No session corpus is configured; nothing to classify.",+ "name": "self_capture",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "column": "embedding",+ "column_type": "vector(1024)",+ "docs": "docs/guides/troubleshooting.md#hybrid-search-returns-only-keyword-hits",+ "embedded_chunks_estimate": 0,+ "outcome": "skipped",+ "reason": "small_brain"+ },+ "message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.",+ "name": "vector_plan",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair embedding-effects",+ "count": "exact",+ "docs": "docs/guides/repair.md#stale-queued-embedding-effects",+ "effects": [],+ "failed_effects": 0,+ "repair": "embedding-effects",+ "resolution": "repairable",+ "retry_queued_effects": 0,+ "stale_effects": 0,+ "truncated": false+ },+ "message": "No committed write has a stale queued or failed embedding effect.",+ "name": "stale_embedding_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/google-connect.md",+ "repair": "google-file-modes",+ "sources": []+ },+ "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",+ "name": "google_file_modes",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "extractor-facts"+ },+ "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",+ "name": "extractor_facts_expired",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "evidenced": 0,+ "repair": "conversation-labels"+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "extractor_version": 1,+ "sample": [],+ "scanned": 0,+ "stale": 0,+ "unstamped": 0+ },+ "message": "No conversation extraction outcome predates extractor version 1.",+ "name": "conversation_outcomes_stale",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "captured-facts",+ "unclassifiable": 0+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "drifted": 0,+ "repair": "loop-facts"+ },+ "message": "Every closed commitment loop has its fact retired.",+ "name": "loop_facts_drift",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "excluded": 0,+ "fenced": 0,+ "repair": "ontology-facts",+ "retired": 0+ },+ "message": "No ontology observation is held by a page's Facts table.",+ "name": "ontology_facts_fenced",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "Sampled 20 pages; no bare-tweet phrases or external links.",+ "name": "integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All JSONB columns store objects/arrays",+ "name": "jsonb_integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No takes yet",+ "name": "takes_weight_grid",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All FK-child tables clean (10 tables checked)",+ "name": "child_table_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All synthesized pages carry a raw trace or explicit exemption",+ "name": "raw_provenance",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All source config values are JSON objects",+ "name": "source_config_shape",+ "status": "ok"+ },+ {+ "category": "skill",+ "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",+ "message": "All image-asset chunks have modality=image",+ "name": "cross_modal_modality_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "search.unified_multimodal is off; coverage check N/A",+ "name": "unified_multimodal_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No truncated bodies detected",+ "name": "markdown_body_completeness",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",+ "name": "scraper_junk_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No quarantined pages",+ "name": "quarantined_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No flagged pages",+ "name": "flagged_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": 0,+ "days": 7,+ "source_id": null+ },+ "message": "No stale unverified extraction stubs",+ "name": "unverified_extractions",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#frontmatter",+ "partial": false,+ "repairable": 13,+ "source_ids": [+ "notes",+ "plain"+ ],+ "sources": [+ {+ "by_code": {+ "FRONTMATTER_COMMENT_VALUE": 1,+ "MISSING_CLOSE": 2,+ "NESTED_QUOTES": 1,+ "NULL_BYTES": 2,+ "SLUG_MISMATCH": 1,+ "YAML_PARSE": 2,+ "needs_interpretation": 4+ },+ "files": 12,+ "preview": "gbrain repair frontmatter --source notes",+ "sample_paths": [+ "fm/comment-value.md",+ "fm/dash-line.md",+ "fm/duplicate-key.md",+ "fm/missing-close.md",+ "fm/needs-interpretation.md"+ ],+ "source_id": "notes",+ "status": "scanned"+ },+ {+ "by_code": {+ "needs_interpretation": 1+ },+ "files": 1,+ "preview": "gbrain repair frontmatter --source plain",+ "sample_paths": [+ "broken.md"+ ],+ "source_id": "plain",+ "status": "scanned"+ }+ ],+ "unscanned": []+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn"+ },+ {+ "category": "meta",+ "message": "No capture failures in the last 24h",+ "name": "eval_capture",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "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",+ "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",+ "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",+ "name": "salience_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "depth": 0,+ "oldest_age_seconds": null,+ "worker_alive": true+ },+ "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",+ "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",+ "name": "subagent_capability",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",+ "name": "facts_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Brain-wide maintenance jobs are finishing within their deadline.",+ "name": "global_maintenance_timeouts",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_ids": [],+ "authorizable": {},+ "authorizable_total": 0,+ "docs": "docs/guides/repair.md#legacy-job-authority",+ "live": 0,+ "queued_spend": {+ "by_basis": {},+ "long_waiting": 0,+ "long_waiting_ids": []+ },+ "terminal_keyed": {},+ "terminal_keyed_total": 0,+ "unsupported": 0,+ "unsupported_ids": []+ },+ "message": "No queued job predates submission authority.",+ "name": "legacy_job_authority",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "convertible_count": 0,+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "legacy_shape_count": 0,+ "malformed": [],+ "mirror_window_ends": "2026-11-04"+ },+ "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"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "drift": [],+ "mirror_window_ends": "2026-11-04"+ },+ "message": "No legacy token grant has drifted from its permissions mirror.",+ "name": "legacy_token_grant_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",+ "null_scope_count": 0,+ "tokens": []+ },+ "message": "Every active legacy token has explicit scopes.",+ "name": "legacy_token_null_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",+ "grants": [],+ "server_surface": "full"+ },+ "message": "Every active client and token can call the operations its scopes allow.",+ "name": "grant_new_ops_available",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No image assets indexed yet",+ "name": "image_assets",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "OCR not in use (or no images ingested with OCR opt-in)",+ "name": "ocr_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "stale_count": 1,+ "synced_recently_count": 1,+ "unchanged_count": 0,+ "writer_owned_count": 1+ },+ "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",+ "status": "fail"+ },+ {+ "category": "ops",+ "details": {+ "pending_count": 0,+ "recovering_count": 0,+ "writer_owned_count": 1+ },+ "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",+ "name": "canonical_content_writes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "cache_age": "under an hour ago",+ "checked_at": "<ts>",+ "computed_by": "doctor",+ "degraded": false,+ "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",+ "totals": {+ "assets": 3,+ "configured_repos": 0,+ "failing": 0,+ "no_remote": 1,+ "pages_at_risk": 0,+ "recoverable_repos": 0,+ "unpushed": 0+ }+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "export",+ "--source",+ "default",+ "--dir",+ "<BACKUP_DIR>/default",+ "--brain",+ "host"+ ],+ "command": "gbrain export --source default --dir '<BACKUP_DIR>/default' --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/operations/backup-check.md",+ "inputs": [+ {+ "how": "Ask the user where backups should live (a directory outside the brain, ideally synced or on another disk).",+ "name": "BACKUP_DIR"+ }+ ],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "backup_coverage",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Writes a Markdown copy of 'default' (pages and facts) to a directory outside the brain so it survives losing the database."+ },+ "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",+ "name": "backup_coverage",+ "readiness_state": "degraded",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No same-source content-hash duplicate groups",+ "name": "content_hash_duplicates",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All code-page chunks carry symbol metadata",+ "name": "code_chunk_metadata",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No configured collectors declare output paths",+ "name": "db_only_collector_collision",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "System One is off (every decide slot is off; nothing is sent).",+ "name": "decide_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "fix": "preview links: gbrain facts relink --dry-run",+ "inferred_7d": {+ "mention": 0,+ "page": 0+ },+ "new_7d": {+ "eligible": 3,+ "facts": 3,+ "no_subject": 0,+ "unlinked": 0,+ "unlinked_eligible": 0+ },+ "no_subject": 0,+ "origins": [],+ "relinked_7d": {},+ "sources": 3,+ "window": {+ "active": 3,+ "capped": false,+ "fence_owned": 0,+ "unlinked": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "contradiction_mode": "propose (default)",+ "lagging": 0,+ "proposals": {+ "applied": 0,+ "proposed": 0,+ "undated": 0+ },+ "read_policy": "on",+ "relationships": {},+ "stale_assertions": []+ },+ "message": "relationships: none yet; read policy on; contradiction mode propose (default)",+ "name": "edge_validity",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_calls_24h": 0,+ "chat_available": false,+ "daily_limit": 200,+ "docs": "docs/guides/life-chronicle.md",+ "enabled": true,+ "job_budget_usd": 0.25,+ "last_7d": {+ "extracted": 0,+ "failed": 0,+ "failedReasons": {},+ "reasons": {},+ "skipped": 0+ },+ "ledger_available": true,+ "pending": 0,+ "principals_24h": [],+ "readiness": "missing",+ "run_now": [+ "gbrain",+ "dream",+ "--phase",+ "chronicle"+ ],+ "severity": "info",+ "source": "default",+ "spend_7d": {+ "incompleteRecords": 0,+ "knownUsd": 0,+ "unpricedCalls": 0+ }+ },+ "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",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "chronicle.* settings are valid.",+ "name": "chronicle_config_invalid",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ask_user": true,+ "code": "auto_chronicle_default_on",+ "decisions": [+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "id": "keep",+ "label": "Keep automatic extraction on"+ },+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "consent": [],+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."+ },+ "id": "opt_out",+ "label": "Turn automatic extraction off"+ }+ ],+ "default": "keep",+ "docs": "docs/guides/life-chronicle.md",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "severity": "info"+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set auto_chronicle true --brain host",+ "consent": [+ "paid",+ "egress"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",+ "name": "auto_chronicle_default_on",+ "readiness_state": "ok",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": {+ "active": 0,+ "delayed": 0,+ "waiting": 0+ },+ "daily_spent_usd": 0,+ "docs": "docs/guides/facts-drain.md",+ "health": "not_applicable",+ "last_run": null+ },+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "applicable": false+ },+ "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "fact_take_vectors",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "auto_analyze": null,+ "checked": [+ "pages",+ "links",+ "facts",+ "takes",+ "content_chunks",+ "timeline_entries"+ ],+ "engine": "postgres",+ "fix": "gbrain repair planner-stats --apply",+ "missing_search_statistics": [],+ "stale": []+ },+ "message": "Planner statistics are fresh on 6 hot tables.",+ "name": "planner_stats_stale",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "answers_recorded": 0,+ "docs": "docs/guides/retrieval-feedback.md",+ "enabled": false,+ "implicit": false,+ "influence": 0.1,+ "last_rating_at": null,+ "learn": true,+ "ratings_cited": 0,+ "ratings_explicit": 0,+ "top_client_share_7d": null,+ "weights": 0,+ "weights_off_neutral": 0+ },+ "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"+ },+ {+ "category": "meta",+ "details": {+ "column": "not_null",+ "failed": [],+ "pending": 0+ },+ "message": "Every page has its revision; the page revision backfill is complete.",+ "name": "revision_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backfill": {+ "completed_at": "<ts>",+ "interrupted": false+ },+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 27,+ "tool_observed": 0,+ "unknown": 3,+ "user_confirmed": 0+ },+ "derived": {+ "external_pct": 0,+ "external_untrusted": 0,+ "rows": 0+ },+ "rows": 30,+ "tables": [+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 19,+ "tool_observed": 0,+ "unknown": 1,+ "user_confirmed": 0+ },+ "rows": 20,+ "table": "pages"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 3,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 3,+ "table": "facts"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 0,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 0,+ "table": "takes"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 5,+ "tool_observed": 0,+ "unknown": 2,+ "user_confirmed": 0+ },+ "rows": 7,+ "table": "timeline_entries"+ }+ ],+ "unknown_pct": 10+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "completed_at": null,+ "detector_version": 2,+ "total_unscanned": 0,+ "unscanned": {+ "facts": 0,+ "pages": 0,+ "takes": 0,+ "timeline_entries": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "legacy_unknown": 0,+ "pending": [],+ "unclaimed": []+ },+ "message": "No unclaimed source holds rows from before trust tiers.",+ "name": "trust_sources_unclaimed",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": false,+ "pages": 0+ },+ "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": {+ "consumers": [],+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "min_age_ms": "<volatile>"+ },+ "message": "No persistence consumer is running on this host.",+ "name": "two_consumers_on_host",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "owners": []+ },+ "message": "Every owner of a live running claim on this host has a consumer heartbeat row.",+ "name": "consumers_without_heartbeat",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",+ "host_id": "<uuid>",+ "host_json_path": "<home>/.gbrain/persistence/host.json",+ "mismatches": []+ },+ "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",+ "name": "host_identity_mismatch",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/write-refusals.md#invalid_fence",+ "model_repair": {+ "max_usd_per_day": 1,+ "max_usd_per_page": 0.3,+ "reserved_today_usd": 0,+ "spent_today_usd": 0+ },+ "partial": false,+ "partial_sources": [],+ "sources": [+ {+ "by_tier": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "default",+ "total": 0+ },+ {+ "by_tier": {+ "deterministic": 2,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 4+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 2+ },+ "oldest_hold_at": "<ts>",+ "pages": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "sample": [+ {+ "bucket": "hold",+ "key": "fences/llm",+ "path": "fences/llm.md",+ "reasons": [+ "no_header"+ ],+ "tier": "llm"+ },+ {+ "bucket": "hold",+ "key": "fences/manual",+ "path": "fences/manual.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "file",+ "key": "fences/untracked",+ "path": "fences/untracked.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ },+ {+ "bucket": "page",+ "key": "notes/stored-fence",+ "path": "notes/stored-fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "notes",+ "total": 4+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fence",+ "path": "fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "plain",+ "total": 1+ }+ ],+ "timeout_ms": "<volatile>",+ "total": 5,+ "trend": [+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "default",+ "top_writers": []+ },+ {+ "by_day": [+ {+ "count": 1,+ "day": "2026-10-10"+ }+ ],+ "normalized_7d": 1,+ "source_id": "notes",+ "top_writers": [+ {+ "count": 1,+ "writer": "fences/"+ }+ ]+ },+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "plain",+ "top_writers": []+ }+ ],+ "uncommitted_repairs": 0,+ "unrenderable_legacy_facts": {+ "complete": true,+ "pages": [],+ "total": 0+ },+ "warn_at_normalized_7d": 20+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn"+ },+ {+ "category": "ops",+ "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",+ "name": "search_mode",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "counts": {},+ "prefixes": [+ "test/",+ "attachments/",+ ".raw/"+ ]+ },+ "message": "No pages hidden by search-exclude policy.",+ "name": "hidden_by_search_policy",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No retrieval-affecting files changed in working tree.",+ "name": "eval_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Reranker disabled — no failures expected",+ "name": "reranker_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "No wedged queues",+ "name": "wedged_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No orphaned private queues",+ "name": "orphaned_private_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No supervisor observed — skipping fan-out/concurrency check",+ "name": "autopilot_fanout_concurrency",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "no Google accounts connected (gbrain google connect to start)",+ "name": "google_oauth",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "graph_signals disabled — coverage not checked",+ "name": "graph_signals_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",+ "name": "junk_entity_hubs",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "message": "Embeddings disabled — no active embedding width to reconcile.",+ "name": "embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "gateway not configured — facts.embedding width check skipped.",+ "name": "facts_embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Multi-source brain (2 non-default source(s)); all populated",+ "name": "source_routing_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No OAuth clients registered",+ "name": "oauth_confidential_client_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "Lock path: <home>/.gbrain/autopilot.lock",+ "name": "autopilot_lock_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No stale locks (no rows with ttl_expires_at < NOW())",+ "name": "stale_locks",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "counts": {+ "global": 14,+ "mixed": 2,+ "source": 12+ },+ "phase_scope_map": {+ "backlinks": "source",+ "calibration_profile": "global",+ "chronicle": "global",+ "consolidate": "source",+ "content_repair": "global",+ "conversation_facts_backfill": "source",+ "drift": "global",+ "edge_contradictions": "global",+ "embed": "global",+ "enrich_thin": "source",+ "extract": "source",+ "extract_atoms": "source",+ "extract_facts": "source",+ "facts_drain": "global",+ "fence_repair": "global",+ "grade_takes": "global",+ "lint": "source",+ "orphans": "global",+ "patterns": "mixed",+ "propose_takes": "source",+ "purge": "global",+ "recompute_emotional_weight": "source",+ "resolve_symbol_edges": "global",+ "schema-suggest": "source",+ "skillopt": "global",+ "sync": "source",+ "synthesize": "mixed",+ "synthesize_concepts": "global"+ }+ },+ "message": "Phase taxonomy: 12 source-scoped, 14 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, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "name": "cycle_phase_scope",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",+ "name": "embed_staleness",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "entity_link_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "timeline_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "takes.bootstrap_enabled",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set takes.bootstrap_enabled true --brain host",+ "consent": [+ "paid"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "takes_count",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."+ },+ "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",+ "name": "takes_count",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Active pack [email protected]+a50a67b9 is current (no successor declared)",+ "name": "pack_upgrade_available",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "5 distinct typed values (pack declares 20)",+ "name": "type_proliferation",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No dangling aliases",+ "name": "dangling_aliases",+ "status": "ok"+ }+ ],+ "db_url_source": null,+ "engine": "postgres",+ "health_score": 40,+ "schema_version": 2,+ "status": "unhealthy",+ "top_issues": [+ {+ "fix": "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",+ "status": "fail",+ "tier": "root"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "fix": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn",+ "tier": "symptom"+ }+ ]+ },+ "stderr": [+ "[backup] checked 3 asset(s): 1 without a git remote (computed_by=doctor)"+ ],+ "stdout": "<json>"+ },+ "second": {+ "args": [+ "doctor",+ "--json",+ "--skills-dir",+ "<home>/skills"+ ],+ "exit_code": 1,+ "report": {+ "brain_checks_score": 45,+ "capped_by": [+ "embeddings_disabled"+ ],+ "category_scores": {+ "brain": 45,+ "meta": 100,+ "ops": 100,+ "skill": 95+ },+ "checks": [+ {+ "category": "skill",+ "message": "1 skills, all reachable",+ "name": "resolver_health",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "enabled": true,+ "engine": "postgres",+ "fired_recently": false,+ "last_fired": null,+ "path": "postgres direct",+ "policy_skill_installed": false+ },+ "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"+ },+ {+ "category": "skill",+ "details": {+ "channels": {},+ "window_days": 7+ },+ "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",+ "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",+ "name": "memory_verbs_usage",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1/1 skills pass",+ "name": "skill_conformance",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "1 skill(s) compliant or exempt",+ "name": "skill_brain_first",+ "status": "ok"+ },+ {+ "category": "skill",+ "message": "No skills.lock.json in <home>/skills — integrity check not applicable",+ "name": "skills_manifest_integrity",+ "status": "ok"+ },+ {+ "category": "skill",+ "details": {+ "drifted": [],+ "new": [+ "academic-verify",+ "archive-crawler",+ "article-enrichment",+ "ask-user",+ "blog-ingest",+ "book-mirror",+ "brain-ingest-gate",+ "brain-link-discipline",+ "brain-ops",+ "brain-pdf",+ "brain-taxonomist",+ "briefing",+ "bulk-ingestion",+ "capture",+ "chat-connectors",+ "citation-fixer",+ "citation-graph-ingest",+ "cold-start",+ "company-brainify",+ "concept-synthesis",+ "context-audit",+ "conversation-archive",+ "correction-pipeline",+ "cron-scheduler",+ "cross-modal-review",+ "daily-task-manager",+ "daily-task-prep",+ "data-loss-gate",+ "data-research",+ "draft-in-voice",+ "eiirp",+ "enrich",+ "fact-check",+ "functional-area-resolver",+ "gbrain-advisor",+ "google-loops",+ "idea-ingest",+ "idea-lineage",+ "ingest",+ "maintain",+ "mcp-access",+ "measure-before-you-fix",+ "media-ingest",+ "meeting-ingestion",+ "minion-orchestrator",+ "perplexity-research",+ "publish",+ "query",+ "repo-architecture",+ "reports",+ "research-compendium",+ "resolve-before-asking",+ "signal-detector",+ "skill-autobench",+ "skill-creator",+ "skillify",+ "skillpack-check",+ "skillpack-harvest",+ "soul-audit",+ "strategic-reading",+ "testing",+ "two-tier-extraction",+ "voice-note-ingest",+ "webhook-transforms"+ ]+ },+ "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",+ "status": "warn"+ },+ {+ "category": "skill",+ "message": "no installed skills declare preconditions",+ "name": "skill_preconditions",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "enabled": false,+ "out_of_band_settable": true,+ "reason": "disabled"+ },+ "message": "memorable relay off (default)",+ "name": "memorable_relay_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "audience": "personal",+ "audience_reasons": [+ "no shared declaration; 0 non-automation client(s) active in 30d"+ ],+ "backstop_visibility": "private",+ "capture_lanes": {+ "compact": "extract",+ "session_end": "extract",+ "writeback": "retire"+ },+ "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",+ "cross_lane_duplicates_7d": 0,+ "instruction_visibility": "world",+ "mode": "off",+ "mode_valid": true,+ "near_duplicates_shadow_7d": 0,+ "nudge_shown": false,+ "transient_ttl": "3d",+ "ttl_valid": true,+ "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"+ },+ "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",+ "message": "No chat connectors configured (optional).",+ "name": "connectors",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "breaker_enabled": true,+ "count_exact": true,+ "inspected_keys": 0,+ "keys": [],+ "threshold": 3+ },+ "message": "No dream key died 3+ times in 24h",+ "name": "dream_paid_loop",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "pending_fresh_install": [+ "0.11.0",+ "0.14.0",+ "0.22.4",+ "0.28.0",+ "0.53.0"+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "apply-migrations",+ "--yes",+ "--no-autopilot-install"+ ],+ "command": "gbrain apply-migrations --yes --no-autopilot-install",+ "consent": [],+ "next": "run",+ "requires_exclusive": true,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "minions_migration",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."+ },+ "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",+ "name": "minions_migration",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "mode=notify",+ "name": "self_upgrade_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Bun <bun-version> (minimum 1.4.0)",+ "name": "bun_runtime",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",+ "name": "nightly_quality_probe_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "kinds": [],+ "schema_version": 1+ },+ "message": "no extractions in last 7 days",+ "name": "extract_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",+ "name": "conversation_facts_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": 0,+ "known_approximation": "page backlog only; transcript corpus not counted",+ "pack_declares_phase": false+ },+ "message": "no pages awaiting atom extraction",+ "name": "extract_atoms_backlog",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "drift_pct": 0,+ "drifted": 0,+ "slug_unbound": 0,+ "source_changed": 0,+ "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",+ "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",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "gbrain home is outside any enclosing git worktree.",+ "name": "home_dir_in_worktree",+ "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+ },+ "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": []+ },+ "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": {+ "reason": "no_harness_detected"+ },+ "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+ },+ "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",+ "message": "Extension installed",+ "name": "pgvector",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Postgres driver supports safe query cancellation.",+ "name": "postgres_cancellation_driver",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",+ "name": "pages_upsert_arbiter",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "readiness": "projection_pending",+ "ready": false+ },+ "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": {+ "effects": [],+ "exact": true,+ "inspected": 0,+ "parked_effects": 0,+ "truncated": false+ },+ "message": "No Git or withdrawal effect is parked.",+ "name": "parked_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "refreshes": []+ },+ "message": "No worktree refresh is stuck.",+ "name": "worktree_refresh_stuck",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "extra_columns": [],+ "page_child_source_columns": [],+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"+ },+ "message": "Guarded tables carry only the columns gbrain creates.",+ "name": "managed_guard_schema_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "guard_refusals": 0,+ "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",+ "trigger_refusals": 0,+ "unclassified_p0001": 0,+ "window_days": 7+ },+ "message": "No write was refused by a database guard in the last 7 days.",+ "name": "publication_refusals",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "links_link_source_check has the v114 kebab-case gate",+ "name": "links_link_source_check",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "RLS enabled on 132/132 public tables",+ "name": "rls",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Version <latest> (latest: <latest>)",+ "name": "schema_version",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "1072 column(s) verified against live schema",+ "name": "schema_columns",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Auto-RLS event trigger installed",+ "name": "rls_event_trigger",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "embeddings",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",+ "name": "embedding_provider",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled",+ "name": "embedding_column_registry",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding env overrides set",+ "name": "embedding_env_override",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "no embedding migration in flight",+ "name": "embedding_migration_state",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No chat_fallback_chain is set: every chat call uses only its own model.",+ "name": "chat_fallback_chain",+ "status": "ok"+ },+ {+ "category": "meta",+ "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",+ "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "graph_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn"+ },+ {+ "category": "brain",+ "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",+ "name": "orphan_ratio",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No by-mention links in this brain.",+ "name": "stale_mentions",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No orphaned timeline rows across 4 page(s).",+ "name": "timeline_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No slug collisions across 3 source checkout(s).",+ "name": "slug_collisions",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_unrenderable_rows": 1,+ "materializable_rows": 2,+ "pages_affected": 2,+ "pages_inspected": 4,+ "repair": "timeline",+ "truncated": false+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "message": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "looser_atoms": 0,+ "looser_concepts": 0,+ "repair": "visibility",+ "truncated": false,+ "unstamped_atoms": 0,+ "unstamped_concepts": 0+ },+ "message": "Every extracted atom and synthesized concept carries an explicit visibility no looser than its origin.",+ "name": "derived_visibility",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "repair": "safe-chunks",+ "truncated": false+ },+ "message": "Every re-sealable page is at the safe-chunk index version.",+ "name": "safe_index_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": "exact",+ "kept_pages": 0,+ "pages_pending": 0,+ "truncated": false+ },+ "message": "No page waits for the credential-safe re-chunk.",+ "name": "credential_projection_pending",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "checkpoints": 0,+ "count": 0,+ "docs": "docs/guides/repair.md#connector-checkpoints",+ "repair": "connector-checkpoints",+ "retries": 0,+ "truncated": false+ },+ "message": "No orphan connector checkpoint rows older than 7 days.",+ "name": "connector_checkpoints",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair request-indexes --apply",+ "count": 0,+ "docs": "docs/guides/repair.md#request-indexes",+ "indexes": [+ {+ "name": "persistence_requests_sync_run_open",+ "state": "valid"+ },+ {+ "name": "persistence_requests_sync_run_committed",+ "state": "valid"+ }+ ],+ "repair": "request-indexes"+ },+ "message": "Managed sync request indexes are valid.",+ "name": "persistence_request_indexes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "commands": [],+ "docs": "docs/guides/repair.md#request-growth",+ "rows": 0,+ "rows_exact": false,+ "scopes": [+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.brain_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 1000000,+ "per_day": 3,+ "scope": "brain",+ "window_days": 7+ },+ {+ "admissions_in_window": 22,+ "config_key": "persistence.limits.principal_lifetime_ids",+ "days_to_exhaustion": null,+ "exhaustion_date": null,+ "lifetime_ids": 24,+ "limit": 250000,+ "per_day": 3,+ "scope": "principal:local_cli:<uuid>",+ "window_days": 7+ }+ ],+ "verify": "gbrain doctor --json (check persistence_request_growth)",+ "window_days": 7+ },+ "message": "~0 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"+ },+ {+ "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": {+ "applied": "5min",+ "configured": "5min",+ "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"+ },+ "message": "The session statement_timeout (5min) reaches the server.",+ "name": "persistence_session_timeouts",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#connector-held-items",+ "held": 0,+ "sources": []+ },+ "message": "No connector items are held.",+ "name": "connector_held_items",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/repair.md#held-files",+ "escalate_count": 50,+ "fences": 2,+ "held": 8,+ "source_ids": [+ "notes"+ ],+ "sources": [+ {+ "escalated": false,+ "fences": 2,+ "first": [+ {+ "code": "invalid_fence",+ "path": "fences/llm.md",+ "reason": "no_header",+ "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_fence",+ "path": "fences/manual.md",+ "reason": "takes_kind_unsupported",+ "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/dash-line.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/duplicate-key.md",+ "reason": "needs_interpretation",+ "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."+ },+ {+ "code": "invalid_frontmatter",+ "path": "fm/indented-close.md",+ "reason": "yaml_parse",+ "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."+ }+ ],+ "held": 8,+ "missing": 8,+ "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",+ "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",+ "source_id": "notes",+ "stale": 0,+ "status": "gbrain sources status notes"+ }+ ]+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "status": "warn"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/repair.md#held-files",+ "hooks": []+ },+ "message": "No outdated gbrain frontmatter pre-commit hook is installed.",+ "name": "frontmatter_hook",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bindings": [],+ "count": 0,+ "docs": "docs/guides/repair.md#orphan-bindings",+ "repair": "orphan-bindings",+ "truncated": false+ },+ "message": "Every persistence source binding belongs to an existing source.",+ "name": "orphan_persistence_bindings",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "sources": [],+ "total": 0+ },+ "message": "No page was written database-only to an unbound source.",+ "name": "unbound_source",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "floor": "0.60.5.0",+ "hosts": [],+ "observed": [+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "consumer",+ "version": "<version>"+ },+ {+ "host_id": "<uuid>",+ "last_seen": "<ts>",+ "principal": "local_cli:<uuid>",+ "role": "admitter",+ "version": "<version>"+ }+ ],+ "truncated": false,+ "window_days": 7+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "classified": 0,+ "count": "exact",+ "truncated": false,+ "unclassifiable": 0+ },+ "message": "No session corpus is configured; nothing to classify.",+ "name": "self_capture",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "column": "embedding",+ "column_type": "vector(1024)",+ "docs": "docs/guides/troubleshooting.md#hybrid-search-returns-only-keyword-hits",+ "embedded_chunks_estimate": 0,+ "outcome": "skipped",+ "reason": "small_brain"+ },+ "message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.",+ "name": "vector_plan",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "command": "gbrain repair embedding-effects",+ "count": "exact",+ "docs": "docs/guides/repair.md#stale-queued-embedding-effects",+ "effects": [],+ "failed_effects": 0,+ "repair": "embedding-effects",+ "resolution": "repairable",+ "retry_queued_effects": 0,+ "stale_effects": 0,+ "truncated": false+ },+ "message": "No committed write has a stale queued or failed embedding effect.",+ "name": "stale_embedding_effects",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/google-connect.md",+ "repair": "google-file-modes",+ "sources": []+ },+ "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",+ "name": "google_file_modes",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "extractor-facts"+ },+ "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",+ "name": "extractor_facts_expired",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "evidenced": 0,+ "repair": "conversation-labels"+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "capped": false,+ "docs": "docs/guides/repair.md#conversation-labels",+ "extractor_version": 1,+ "sample": [],+ "scanned": 0,+ "stale": 0,+ "unstamped": 0+ },+ "message": "No conversation extraction outcome predates extractor version 1.",+ "name": "conversation_outcomes_stale",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ambiguous": 0,+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "evidenced": 0,+ "excluded": 0,+ "repair": "captured-facts",+ "unclassifiable": 0+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "drifted": 0,+ "repair": "loop-facts"+ },+ "message": "Every closed commitment loop has its fact retired.",+ "name": "loop_facts_drift",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#explicit-only-repair-kinds",+ "excluded": 0,+ "fenced": 0,+ "repair": "ontology-facts",+ "retired": 0+ },+ "message": "No ontology observation is held by a page's Facts table.",+ "name": "ontology_facts_fenced",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "Sampled 20 pages; no bare-tweet phrases or external links.",+ "name": "integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All JSONB columns store objects/arrays",+ "name": "jsonb_integrity",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No takes yet",+ "name": "takes_weight_grid",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All FK-child tables clean (10 tables checked)",+ "name": "child_table_orphans",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All synthesized pages carry a raw trace or explicit exemption",+ "name": "raw_provenance",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All source config values are JSON objects",+ "name": "source_config_shape",+ "status": "ok"+ },+ {+ "category": "skill",+ "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",+ "message": "All image-asset chunks have modality=image",+ "name": "cross_modal_modality_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "search.unified_multimodal is off; coverage check N/A",+ "name": "unified_multimodal_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No truncated bodies detected",+ "name": "markdown_body_completeness",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",+ "name": "scraper_junk_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No quarantined pages",+ "name": "quarantined_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No flagged pages",+ "name": "flagged_pages",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "count": 0,+ "days": 7,+ "source_id": null+ },+ "message": "No stale unverified extraction stubs",+ "name": "unverified_extractions",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "status": "warn"+ },+ {+ "category": "brain",+ "details": {+ "docs": "docs/guides/repair.md#frontmatter",+ "partial": false,+ "repairable": 14,+ "source_ids": [+ "notes",+ "plain"+ ],+ "sources": [+ {+ "by_code": {+ "FRONTMATTER_COMMENT_VALUE": 1,+ "MISSING_CLOSE": 2,+ "NESTED_QUOTES": 2,+ "NULL_BYTES": 2,+ "SLUG_MISMATCH": 1,+ "YAML_PARSE": 3,+ "needs_interpretation": 4+ },+ "files": 13,+ "preview": "gbrain repair frontmatter --source notes",+ "sample_paths": [+ "fm/comment-value.md",+ "fm/dash-line.md",+ "fm/duplicate-key.md",+ "fm/late-broken.md",+ "fm/missing-close.md"+ ],+ "source_id": "notes",+ "status": "scanned"+ },+ {+ "by_code": {+ "needs_interpretation": 1+ },+ "files": 1,+ "preview": "gbrain repair frontmatter --source plain",+ "sample_paths": [+ "broken.md"+ ],+ "source_id": "plain",+ "status": "scanned"+ }+ ],+ "unscanned": []+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "message": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn"+ },+ {+ "category": "meta",+ "message": "No capture failures in the last 24h",+ "name": "eval_capture",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "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",+ "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",+ "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",+ "name": "salience_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "depth": 0,+ "oldest_age_seconds": null,+ "worker_alive": true+ },+ "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",+ "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",+ "name": "subagent_capability",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",+ "name": "facts_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Brain-wide maintenance jobs are finishing within their deadline.",+ "name": "global_maintenance_timeouts",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "active_ids": [],+ "authorizable": {},+ "authorizable_total": 0,+ "docs": "docs/guides/repair.md#legacy-job-authority",+ "live": 0,+ "queued_spend": {+ "by_basis": {},+ "long_waiting": 0,+ "long_waiting_ids": []+ },+ "terminal_keyed": {},+ "terminal_keyed_total": 0,+ "unsupported": 0,+ "unsupported_ids": []+ },+ "message": "No queued job predates submission authority.",+ "name": "legacy_job_authority",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "convertible_count": 0,+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "legacy_shape_count": 0,+ "malformed": [],+ "mirror_window_ends": "2026-11-04"+ },+ "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"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#legacy-token-grants",+ "drift": [],+ "mirror_window_ends": "2026-11-04"+ },+ "message": "No legacy token grant has drifted from its permissions mirror.",+ "name": "legacy_token_grant_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",+ "null_scope_count": 0,+ "tokens": []+ },+ "message": "Every active legacy token has explicit scopes.",+ "name": "legacy_token_null_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",+ "grants": [],+ "server_surface": "full"+ },+ "message": "Every active client and token can call the operations its scopes allow.",+ "name": "grant_new_ops_available",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No image assets indexed yet",+ "name": "image_assets",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "OCR not in use (or no images ingested with OCR opt-in)",+ "name": "ocr_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "stale_count": 1,+ "synced_recently_count": 1,+ "unchanged_count": 0,+ "writer_owned_count": 1+ },+ "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",+ "status": "fail"+ },+ {+ "category": "ops",+ "details": {+ "pending_count": 0,+ "recovering_count": 0,+ "writer_owned_count": 1+ },+ "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",+ "name": "canonical_content_writes",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "cache_age": "under an hour ago",+ "checked_at": "<ts>",+ "computed_by": "doctor",+ "degraded": false,+ "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",+ "totals": {+ "assets": 3,+ "configured_repos": 0,+ "failing": 0,+ "no_remote": 1,+ "pages_at_risk": 0,+ "recoverable_repos": 0,+ "unpushed": 0+ }+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "export",+ "--source",+ "default",+ "--dir",+ "<BACKUP_DIR>/default",+ "--brain",+ "host"+ ],+ "command": "gbrain export --source default --dir '<BACKUP_DIR>/default' --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/operations/backup-check.md",+ "inputs": [+ {+ "how": "Ask the user where backups should live (a directory outside the brain, ideally synced or on another disk).",+ "name": "BACKUP_DIR"+ }+ ],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "backup_coverage",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Writes a Markdown copy of 'default' (pages and facts) to a directory outside the brain so it survives losing the database."+ },+ "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",+ "name": "backup_coverage",+ "readiness_state": "degraded",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No same-source content-hash duplicate groups",+ "name": "content_hash_duplicates",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "All code-page chunks carry symbol metadata",+ "name": "code_chunk_metadata",+ "status": "ok"+ },+ {+ "category": "brain",+ "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",+ "message": "No configured collectors declare output paths",+ "name": "db_only_collector_collision",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "System One is off (every decide slot is off; nothing is sent).",+ "name": "decide_health",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "fix": "preview links: gbrain facts relink --dry-run",+ "inferred_7d": {+ "mention": 0,+ "page": 0+ },+ "new_7d": {+ "eligible": 3,+ "facts": 3,+ "no_subject": 0,+ "unlinked": 0,+ "unlinked_eligible": 0+ },+ "no_subject": 0,+ "origins": [],+ "relinked_7d": {},+ "sources": 3,+ "window": {+ "active": 3,+ "capped": false,+ "fence_owned": 0,+ "unlinked": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "contradiction_mode": "propose (default)",+ "lagging": 0,+ "proposals": {+ "applied": 0,+ "proposed": 0,+ "undated": 0+ },+ "read_policy": "on",+ "relationships": {},+ "stale_assertions": []+ },+ "message": "relationships: none yet; read policy on; contradiction mode propose (default)",+ "name": "edge_validity",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_calls_24h": 0,+ "chat_available": false,+ "daily_limit": 200,+ "docs": "docs/guides/life-chronicle.md",+ "enabled": true,+ "job_budget_usd": 0.25,+ "last_7d": {+ "extracted": 0,+ "failed": 0,+ "failedReasons": {},+ "reasons": {},+ "skipped": 0+ },+ "ledger_available": true,+ "pending": 0,+ "principals_24h": [],+ "readiness": "missing",+ "run_now": [+ "gbrain",+ "dream",+ "--phase",+ "chronicle"+ ],+ "severity": "info",+ "source": "default",+ "spend_7d": {+ "incompleteRecords": 0,+ "knownUsd": 0,+ "unpricedCalls": 0+ }+ },+ "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",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "chronicle.* settings are valid.",+ "name": "chronicle_config_invalid",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "ask_user": true,+ "code": "auto_chronicle_default_on",+ "decisions": [+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "id": "keep",+ "label": "Keep automatic extraction on"+ },+ {+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "false"+ ],+ "consent": [],+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."+ },+ "id": "opt_out",+ "label": "Turn automatic extraction off"+ }+ ],+ "default": "keep",+ "docs": "docs/guides/life-chronicle.md",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true"+ ],+ "consent": [+ "paid",+ "egress"+ ],+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "severity": "info"+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "auto_chronicle",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set auto_chronicle true --brain host",+ "consent": [+ "paid",+ "egress"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "auto_chronicle_default_on",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."+ },+ "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",+ "name": "auto_chronicle_default_on",+ "readiness_state": "ok",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backlog": {+ "active": 0,+ "delayed": 0,+ "waiting": 0+ },+ "daily_spent_usd": 0,+ "docs": "docs/guides/facts-drain.md",+ "health": "not_applicable",+ "last_run": null+ },+ "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",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "applicable": false+ },+ "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",+ "name": "fact_take_vectors",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "auto_analyze": null,+ "checked": [+ "pages",+ "links",+ "facts",+ "takes",+ "content_chunks",+ "timeline_entries"+ ],+ "engine": "postgres",+ "fix": "gbrain repair planner-stats --apply",+ "missing_search_statistics": [],+ "stale": []+ },+ "message": "Planner statistics are fresh on 6 hot tables.",+ "name": "planner_stats_stale",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "answers_recorded": 0,+ "docs": "docs/guides/retrieval-feedback.md",+ "enabled": false,+ "implicit": false,+ "influence": 0.1,+ "last_rating_at": null,+ "learn": true,+ "ratings_cited": 0,+ "ratings_explicit": 0,+ "top_client_share_7d": null,+ "weights": 0,+ "weights_off_neutral": 0+ },+ "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"+ },+ {+ "category": "meta",+ "details": {+ "column": "not_null",+ "failed": [],+ "pending": 0+ },+ "message": "Every page has its revision; the page revision backfill is complete.",+ "name": "revision_backfill",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "backfill": {+ "completed_at": "<ts>",+ "interrupted": false+ },+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 27,+ "tool_observed": 0,+ "unknown": 4,+ "user_confirmed": 0+ },+ "derived": {+ "external_pct": 0,+ "external_untrusted": 0,+ "rows": 0+ },+ "rows": 31,+ "tables": [+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 19,+ "tool_observed": 0,+ "unknown": 1,+ "user_confirmed": 0+ },+ "rows": 20,+ "table": "pages"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 3,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 3,+ "table": "facts"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 0,+ "tool_observed": 0,+ "unknown": 0,+ "user_confirmed": 0+ },+ "rows": 0,+ "table": "takes"+ },+ {+ "by_tier": {+ "agent_written": 0,+ "external_untrusted": 0,+ "operator_curated": 5,+ "tool_observed": 0,+ "unknown": 3,+ "user_confirmed": 0+ },+ "rows": 8,+ "table": "timeline_entries"+ }+ ],+ "unknown_pct": 12.9+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "completed_at": null,+ "detector_version": 2,+ "total_unscanned": 0,+ "unscanned": {+ "facts": 0,+ "pages": 0,+ "takes": 0,+ "timeline_entries": 0+ }+ },+ "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"+ },+ {+ "category": "brain",+ "details": {+ "legacy_unknown": 0,+ "pending": [],+ "unclaimed": []+ },+ "message": "No unclaimed source holds rows from before trust tiers.",+ "name": "trust_sources_unclaimed",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "bad_config": [],+ "chars_limit": 4000,+ "chars_used": 0,+ "compiled": [],+ "docs": "docs/guides/core-memory.md",+ "enabled": false,+ "pages": 0+ },+ "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": {+ "consumers": [],+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "min_age_ms": "<volatile>"+ },+ "message": "No persistence consumer is running on this host.",+ "name": "two_consumers_on_host",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",+ "owners": []+ },+ "message": "Every owner of a live running claim on this host has a consumer heartbeat row.",+ "name": "consumers_without_heartbeat",+ "status": "ok"+ },+ {+ "category": "ops",+ "details": {+ "count": 0,+ "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",+ "host_id": "<uuid>",+ "host_json_path": "<home>/.gbrain/persistence/host.json",+ "mismatches": []+ },+ "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",+ "name": "host_identity_mismatch",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "auto_repair": {+ "active": false,+ "enabled": true,+ "last_maintenance_at": null,+ "llm": true+ },+ "docs": "docs/guides/write-refusals.md#invalid_fence",+ "model_repair": {+ "max_usd_per_day": 1,+ "max_usd_per_page": 0.3,+ "reserved_today_usd": 0,+ "spent_today_usd": 0+ },+ "partial": false,+ "partial_sources": [],+ "sources": [+ {+ "by_tier": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "default",+ "total": 0+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 1,+ "manual": 2,+ "resolver": 0,+ "total": 4+ },+ "files": {+ "deterministic": 0,+ "llm": 0,+ "manual": 1,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 1,+ "manual": 1,+ "resolver": 0,+ "total": 2+ },+ "oldest_hold_at": "<ts>",+ "pages": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fences/late",+ "path": "fences/late.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "hold",+ "key": "fences/llm",+ "path": "fences/llm.md",+ "reasons": [+ "no_header"+ ],+ "tier": "llm"+ },+ {+ "bucket": "hold",+ "key": "fences/manual",+ "path": "fences/manual.md",+ "reasons": [+ "takes_kind_unsupported"+ ],+ "tier": "manual"+ },+ {+ "bucket": "page",+ "key": "notes/stored-fence",+ "path": "notes/stored-fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "notes",+ "total": 4+ },+ {+ "by_tier": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "files": {+ "deterministic": 1,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 1+ },+ "holds": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "oldest_hold_at": null,+ "pages": {+ "deterministic": 0,+ "llm": 0,+ "manual": 0,+ "resolver": 0,+ "total": 0+ },+ "sample": [+ {+ "bucket": "file",+ "key": "fence",+ "path": "fence.md",+ "reasons": [+ "close_fence"+ ],+ "tier": "deterministic"+ }+ ],+ "scan": {+ "backfill_done": true,+ "checked_at": "<ts>",+ "complete": true,+ "fresh_at": "<ts>",+ "walking": false+ },+ "source_id": "plain",+ "total": 1+ }+ ],+ "timeout_ms": "<volatile>",+ "total": 5,+ "trend": [+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "default",+ "top_writers": []+ },+ {+ "by_day": [+ {+ "count": 1,+ "day": "2026-10-10"+ }+ ],+ "normalized_7d": 1,+ "source_id": "notes",+ "top_writers": [+ {+ "count": 1,+ "writer": "fences/"+ }+ ]+ },+ {+ "by_day": [],+ "normalized_7d": 0,+ "source_id": "plain",+ "top_writers": []+ }+ ],+ "uncommitted_repairs": 0,+ "unrenderable_legacy_facts": {+ "complete": true,+ "pages": [],+ "total": 0+ },+ "warn_at_normalized_7d": 20+ },+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn"+ },+ {+ "category": "ops",+ "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",+ "name": "search_mode",+ "status": "ok"+ },+ {+ "category": "brain",+ "details": {+ "counts": {},+ "prefixes": [+ "test/",+ "attachments/",+ ".raw/"+ ]+ },+ "message": "No pages hidden by search-exclude policy.",+ "name": "hidden_by_search_policy",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No retrieval-affecting files changed in working tree.",+ "name": "eval_drift",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "Reranker disabled — no failures expected",+ "name": "reranker_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "No wedged queues",+ "name": "wedged_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No orphaned private queues",+ "name": "orphaned_private_queue",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No supervisor observed — skipping fan-out/concurrency check",+ "name": "autopilot_fanout_concurrency",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "no Google accounts connected (gbrain google connect to start)",+ "name": "google_oauth",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "graph_signals disabled — coverage not checked",+ "name": "graph_signals_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",+ "name": "junk_entity_hubs",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "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",+ "message": "Embeddings disabled — no active embedding width to reconcile.",+ "name": "embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "gateway not configured — facts.embedding width check skipped.",+ "name": "facts_embedding_width_consistency",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Multi-source brain (2 non-default source(s)); all populated",+ "name": "source_routing_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No OAuth clients registered",+ "name": "oauth_confidential_client_health",+ "status": "ok"+ },+ {+ "category": "ops",+ "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",+ "message": "Lock path: <home>/.gbrain/autopilot.lock",+ "name": "autopilot_lock_scope",+ "status": "ok"+ },+ {+ "category": "ops",+ "message": "No stale locks (no rows with ttl_expires_at < NOW())",+ "name": "stale_locks",+ "status": "ok"+ },+ {+ "category": "meta",+ "details": {+ "counts": {+ "global": 14,+ "mixed": 2,+ "source": 12+ },+ "phase_scope_map": {+ "backlinks": "source",+ "calibration_profile": "global",+ "chronicle": "global",+ "consolidate": "source",+ "content_repair": "global",+ "conversation_facts_backfill": "source",+ "drift": "global",+ "edge_contradictions": "global",+ "embed": "global",+ "enrich_thin": "source",+ "extract": "source",+ "extract_atoms": "source",+ "extract_facts": "source",+ "facts_drain": "global",+ "fence_repair": "global",+ "grade_takes": "global",+ "lint": "source",+ "orphans": "global",+ "patterns": "mixed",+ "propose_takes": "source",+ "purge": "global",+ "recompute_emotional_weight": "source",+ "resolve_symbol_edges": "global",+ "schema-suggest": "source",+ "skillopt": "global",+ "sync": "source",+ "synthesize": "mixed",+ "synthesize_concepts": "global"+ }+ },+ "message": "Phase taxonomy: 12 source-scoped, 14 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, chronicle, facts_drain, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].",+ "name": "cycle_phase_scope",+ "status": "ok"+ },+ {+ "category": "brain",+ "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": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",+ "name": "embed_staleness",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "entity_link_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",+ "name": "timeline_coverage",+ "status": "ok"+ },+ {+ "category": "brain",+ "fix": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "config",+ "set",+ "takes.bootstrap_enabled",+ "true",+ "--brain",+ "host"+ ],+ "command": "gbrain config set takes.bootstrap_enabled true --brain host",+ "consent": [+ "paid"+ ],+ "next": "ask_user",+ "requires_exclusive": false,+ "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "takes_count",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."+ },+ "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",+ "name": "takes_count",+ "readiness_state": "disabled_by_choice",+ "severity": "info",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "Active pack [email protected]+a50a67b9 is current (no successor declared)",+ "name": "pack_upgrade_available",+ "status": "ok"+ },+ {+ "category": "meta",+ "message": "5 distinct typed values (pack declares 20)",+ "name": "type_proliferation",+ "status": "ok"+ },+ {+ "category": "brain",+ "message": "No dangling aliases",+ "name": "dangling_aliases",+ "status": "ok"+ }+ ],+ "db_url_source": null,+ "engine": "postgres",+ "health_score": 40,+ "schema_version": 2,+ "status": "unhealthy",+ "top_issues": [+ {+ "fix": "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",+ "status": "fail",+ "tier": "root"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "doctor",+ "--remediation-plan",+ "--json",+ "--brain",+ "host"+ ],+ "command": "gbrain doctor --remediation-plan --json --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "brain_score",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."+ },+ "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",+ "name": "brain_score",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",+ "next": "run",+ "requires_exclusive": false,+ "then": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "fences",+ "--source",+ "notes",+ "--apply",+ "--brain",+ "host"+ ],+ "command": "gbrain repair fences --source notes --apply --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."+ },+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "fence_integrity",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."+ },+ "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",+ "name": "fence_integrity",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "frontmatter_repairable",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",+ "name": "frontmatter_repairable",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "frontmatter",+ "--source",+ "notes",+ "--brain",+ "host"+ ],+ "command": "gbrain repair frontmatter --source notes --brain host",+ "consent": [],+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "git_held_files",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."+ },+ "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",+ "name": "git_held_files",+ "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",+ "status": "warn",+ "tier": "symptom"+ },+ {+ "fix": "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",+ "tier": "symptom"+ },+ {+ "action": {+ "actor": "agent",+ "argv": [+ "gbrain",+ "repair",+ "timeline",+ "--brain",+ "host"+ ],+ "command": "gbrain repair timeline --brain host",+ "consent": [],+ "next": "run",+ "requires_exclusive": false,+ "verify": {+ "argv": [+ "gbrain",+ "doctor",+ "--only",+ "timeline_history",+ "--json",+ "--brain",+ "host"+ ]+ },+ "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."+ },+ "fix": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",+ "name": "timeline_history",+ "status": "warn",+ "tier": "symptom"+ }+ ]+ },+ "stderr": [],+ "stdout": "<json>"+ }+ },+ "normalizer": "doctor-json-pg-v1"+}diff --git a/test/helpers/doctor-hot-checks-fixture.ts b/test/helpers/doctor-hot-checks-fixture.tsnew file mode 100644index 0000000000..21a5707984--- /dev/null+++ b/test/helpers/doctor-hot-checks-fixture.ts@@ -0,0 +1,161 @@+/**+ * Fixture brain for the doctor hot-check goldens (GBRA-75 wave 10): a Git+ * source whose files and stored rows exercise every finding of+ * `frontmatter_integrity`, `frontmatter_repairable`, the `timeline_history`+ * group and `fence_integrity`, built through the CLI plus a few direct SQL+ * edits (database-only timeline rows, a stored page with a malformed fence).+ * Shared by the PGLite golden (test/doctor-hot-checks-golden.test.ts) and its+ * Postgres twin (test/e2e/doctor-hot-checks-golden.test.ts).+ *+ * Synthetic content only.+ */+import { execFileSync } from 'node:child_process';+import { mkdirSync, writeFileSync } from 'node:fs';+import { dirname, join } from 'node:path';+import { runGbrain, type DoctorHome, type GbrainRun } from './doctor-json-golden.ts';++/** Runs the statements in one transaction against the brain's database (the CLI holds no connection between calls). */+export type Sql = (statements: Array<[string, unknown[]]>) => Promise<void>;++const FB = '<!--- gbrain:facts:begin -->', FE = '<!--- gbrain:facts:end -->';+const FH = '| # | claim | kind | confidence | visibility | notability | valid_from | valid_until | source | context |\n|---|---|---|---|---|---|---|---|---|---|';+const T = '<!--- gbrain:takes:begin -->', TE = '<!--- gbrain:takes:end -->';+const TH = '| # | claim | kind | who | weight | since | source |\n|---|---|---|---|---|---|---|';+const row = (n: number, claim: string) => `| ${n} | ${claim} | fact | 1.0 | private | medium | 2026-01-01 | | call | |`;+/** Facts fence with no end marker: Tier 1 closes it. */+const DETERMINISTIC_FENCE = `${FB}\n${FH}\n${row(1, 'Synthetic fact')}\n${row(2, 'Second synthetic fact')}\n\n`;+/** Facts fence with no header row: model tier. */+const LLM_FENCE = `${FB}\n${row(1, 'Synthetic fact')}\n${row(2, 'Another synthetic fact')}\n${FE}\n`;+/** Takes fence with an unknown kind: manual. */+const MANUAL_FENCE = `${T}\n${TH}\n| 1 | Synthetic take | sentinelkind | brain | 0.7 | 2026-01 | chat |\n${TE}\n`;+const CLEAN_FENCE = `${FB}\n${FH}\n${row(1, 'Clean synthetic fact')}\n${FE}\n`;++const fm = (title: string, type = 'note') => ['---', `title: ${title}`, `type: ${type}`, '---'].join('\n');++/** Committed and imported before doctor runs. */+const IMPORTED: Record<string, string> = {+ 'people/alice-example.md': `${fm('Alice Example', 'person')}\n# Alice Example\n\nAlice works with [[acme-example]].\n\n## Facts\n\n${CLEAN_FENCE}\n## Timeline\n\n- **2024-03-05** | Joined Acme\n- **2024-04-10** | Promoted\n`,+ 'companies/acme-example.md': `${fm('Acme Example', 'company')}\n# Acme Example\n\nAcme raised a round.\n\n## Timeline\n\n- **2024-02-01** | Raised a round\n`,+ 'notes/timeline-a.md': `${fm('Timeline A')}\nBody A.\n\n## Timeline\n\n- **2024-05-01** | Event A happened\n`,+ 'notes/timeline-b.md': `${fm('Timeline B')}\nBody B.\n\n## Timeline\n\n- **2024-05-02** | Event B happened\n`,+ 'notes/stored-fence.md': `${fm('Stored Fence')}\nA page whose stored copy gets a malformed fence.\n`,+ 'notes/crlf.md': ['---', 'title: Crlf', '---', 'Line one [[acme-example]]', ''].join('\r\n'),+ 'notes/leading-blank.md': `\n\n${fm('Leading Blank')}\nBody after blank lines.\n`,+};++/** Written after the import, so only the filesystem readers (and the sync) see them. */+const ON_DISK: Record<string, string> = {+ 'fm/missing-open.md': 'No frontmatter here.\n',+ 'fm/empty-file.md': ' \n',+ 'fm/missing-close.md': '---\ntitle: Missing Close\n# Heading\nBody.\n',+ 'fm/empty-frontmatter.md': '---\n---\nBody.\n',+ 'fm/nested-quotes.md': '---\ntitle: "Name "Nick" Last"\n---\nBody.\n',+ 'fm/needs-interpretation.md': '---\ntitle: [unclosed\ntags: a: b\n---\nBody.\n',+ 'fm/recoverable-colon.md': '---\ntitle: Ratio: 3:1 split\ntype: note\n---\nBody.\n',+ 'fm/duplicate-key.md': '---\ntitle: One\ntitle: Two\n---\nBody.\n',+ 'fm/slug-mismatch.md': '---\ntitle: Slug Mismatch\nslug: somewhere-else\n---\nBody.\n',+ 'fm/slug-equivalent.md': '---\ntitle: Slug Equivalent\nslug: FM/Slug-Equivalent\n---\nBody.\n',+ 'fm/non-string.md': '---\ntitle: 123\ntype: 2024\n---\nBody.\n',+ 'fm/comment-value.md': '---\ntitle: #hashtag title\n---\nBody.\n',+ 'fm/bom.md': '\uFEFF---\ntitle: Bom\n---\nBody.\n',+ 'fm/language.md': '---yaml\ntitle: Language\n---\nBody.\n',+ 'fm/indented-close.md': '---\ntitle: Indented\n ---\nBody\n---\nMore.\n',+ 'fm/dash-line.md': '---\ntitle: Dash\n---x\n---\nBody.\n',+ 'fm/protected-unclosed.md': '---\nslug: x\ntitle: Protected\n',+ 'fences/deterministic.md': `${fm('Deterministic Fence')}\n## Facts\n\n${DETERMINISTIC_FENCE}`,+ 'fences/llm.md': `${fm('Llm Fence')}\n## Facts\n\n${LLM_FENCE}`,+ 'fences/manual.md': `${fm('Manual Fence')}\n## Takes\n\n${MANUAL_FENCE}`,+};++/** Untracked (a stored NUL byte fails the sync's write, so these never reach it): only the working-tree readers see them. */+const UNTRACKED: Record<string, string> = {+ 'fm/untracked-yaml.md': '---\ntitle: [unclosed\n---\nBody.\n',+ 'fm/null-bytes.md': '---\ntitle: Null Bytes\n---\nBody \u0000 here.\n',+ 'fm/null-in-frontmatter.md': '---\ntitle: Null\u0000 Front\n---\nBody.\n',+ 'fm/image.png': 'not really a png \u0000',+};++/** A plain directory source (no Git): the pruned walk and the mtime-based census. */+const PLAIN: Record<string, string> = {+ 'clean.md': `${fm('Plain Clean')}\nBody.\n`,+ 'broken.md': '---\ntitle: [unclosed\n---\nBody.\n',+ 'fence.md': `${fm('Plain Fence')}\n## Facts\n\n${DETERMINISTIC_FENCE}`,+ 'node_modules/pkg/broken.md': '---\ntitle: [pruned\n---\n',+ '.hidden/broken.md': '---\ntitle: [pruned\n---\n',+};++const FIXED_DATE = '2024-01-01T00:00:00Z';++function writeAll(dir: string, files: Record<string, string>): void {+ for (const [rel, body] of Object.entries(files)) {+ mkdirSync(join(dir, dirname(rel)), { recursive: true });+ writeFileSync(join(dir, rel), body);+ }+}++function git(dir: string, ...args: string[]): void {+ const env = { ...process.env, GIT_AUTHOR_DATE: FIXED_DATE, GIT_COMMITTER_DATE: FIXED_DATE, GIT_CONFIG_GLOBAL: '/dev/null', GIT_CONFIG_NOSYSTEM: '1' };+ execFileSync('git', ['-C', dir, '-c', 'user.name=fixture', '-c', '[email protected]', ...args], { env, stdio: 'ignore' });+}++async function gbrain(h: DoctorHome, args: string[]): Promise<GbrainRun> {+ const run = await runGbrain(h, args);+ if (run.exitCode !== 0) throw new Error(`gbrain ${args.join(' ')} failed (${run.exitCode}): ${run.stderr}`);+ return run;+}++/**+ * Builds the fixture on an initialized brain (`init` already ran) and returns+ * nothing; doctor runs next.+ */+export async function buildHotCheckFixture(h: DoctorHome, sql: Sql): Promise<void> {+ const src = join(h.home, 'notes-src');+ writeAll(src, IMPORTED);+ git(src, 'init', '-q', '-b', 'main');+ git(src, 'add', '-A');+ git(src, 'commit', '-q', '-m', 'fixture');+ await gbrain(h, ['sources', 'add', 'notes', '--path', src, '--federated', '--force']);+ await gbrain(h, ['import', src, '--no-embed', '--source-id', 'notes']);+ await gbrain(h, ['extract', 'all', '--source', 'db']);+ const plain = join(h.home, 'plain-src');+ writeAll(plain, { 'clean.md': PLAIN['clean.md']! });+ await gbrain(h, ['sources', 'add', 'plain', '--path', plain, '--federated', '--force']);+ await gbrain(h, ['import', plain, '--no-embed', '--source-id', 'plain']);+ writeAll(plain, PLAIN);++ // Committed but not synced: the sync holds what it refuses; the rest waits in the checkout.+ writeAll(src, ON_DISK);+ git(src, 'add', '-A');+ git(src, 'commit', '-q', '-m', 'broken files');+ await runGbrain(h, ['sync', '--source', 'notes', '--no-pull', '--no-embed']);+ // After the sync (a full catch-up re-imports changed pages): database-only timeline rows, one materializable and one that cannot round-trip (comment markup).+ const insert = `INSERT INTO timeline_entries(page_id,date,source,summary,detail)+ SELECT id, $2::date, $3, $4, '' FROM pages WHERE slug = $1 AND source_id = 'notes'`;+ await sql([+ ["SELECT set_config('gbrain.write_sources', $1, true)", [JSON.stringify(['notes'])]],+ [insert, ['notes/timeline-a', '2024-06-01', 'legacy', 'A database-only event']],+ [insert, ['notes/timeline-b', '2024-06-02', 'legacy', 'Hidden <!-- markup --> event']],+ // A stored page whose fence is malformed (the file stays clean).+ [`UPDATE pages SET compiled_truth = compiled_truth || $2 WHERE slug = $1 AND source_id = 'notes'`, ['notes/stored-fence', `\n\n## Facts\n\n${DETERMINISTIC_FENCE}`]],+ ]);+ writeAll(src, { ...UNTRACKED, 'fences/untracked.md': `${fm('Untracked Fence')}\n## Facts\n\n${DETERMINISTIC_FENCE}` });+}++/**+ * Edits between the first and second doctor run, so the second run takes the+ * incremental paths (changed-file census pass, resumed timeline state): one+ * waiting fence fixed, one new broken file, one new database-only row.+ */+export async function editHotCheckFixture(h: DoctorHome, sql: Sql): Promise<void> {+ const src = join(h.home, 'notes-src');+ writeAll(src, {+ 'fences/untracked.md': `${fm('Untracked Fence')}\n## Facts\n\n${CLEAN_FENCE}`,+ 'fm/late-broken.md': '---\ntitle: "Late "Broken" One"\n---\nBody.\n',+ 'fences/late.md': `${fm('Late Fence')}\n## Takes\n\n${MANUAL_FENCE}`,+ });+ await sql([+ ["SELECT set_config('gbrain.write_sources', $1, true)", [JSON.stringify(['notes'])]],+ [`INSERT INTO timeline_entries(page_id,date,source,summary,detail)+ SELECT id, '2024-07-01', 'legacy', 'A later database-only event', '' FROM pages WHERE slug = 'companies/acme-example' AND source_id = 'notes'`, []],+ ]);+}