You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gbrain sync --strategy code fails with "managed canonical worktree" after lock-contention bug is worked around #2920
Repo scope: ~1360 files under the code source, includes several suite/<app>/assets/*.js built/vendored JS bundles
Two distinct issues found
1. Lock contention (worked around, root cause identified — not filing this part as a bug, just context)
Initial gbrain sync --strategy code --source <id> --full --yes attempts against a real repo failed partway through (50–155 files successfully imported) with:
lock 'gbrain-fs:<hash>' was stolen or released out from under this holder (fenced refresh matched 0 rows)
Root cause: a live gbrain serve (MCP stdio) process was running concurrently (registered via claude mcp add ... gbrain serve) and holding the PGLite lock. Stopping that process (taskkill) before running the CLI sync resolved this specific error. gbrain reindex-code correctly detected and refused to fight this same live-serve lock ("Use the live serve's IPC/MCP tools or stop it before opening this PGLite datastore") — sync did not have the same guard and instead hit the "stolen" error mid-run.
2. "This file belongs to a managed canonical worktree." — reproducible, not full-flag-specific
After stopping the live serve process, every subsequent gbrain sync --strategy code attempt against the same source immediately short-circuits with:
This file belongs to a managed canonical worktree.
No file/page progress is printed at all before this. Tried 5 variants, all identical result:
gbrain sync --strategy code --source <id> --full --yes (no exclude)
gbrain sync --strategy code --source <id> --yes (no --full)
Via the gstack orchestrator: bun run gstack-gbrain-sync.ts --full --code-only
gbrain reindex-code --source <id> --yes — this one "succeeds," but only re-processes the 50 pages already imported from the earlier partial lock-contention runs (all skipped via content_hash short-circuit). It does not discover/import new files, so it's not a substitute for sync.
Ruled out
gbrain sources writer status --source <id> shows the canonical-ownership/writer coordination system is disabled and empty:
{ "enabled": false, "worktrees": [], ... }
So despite the error wording, this doesn't appear to be gating on that mechanism — or if it is, the state shown by writer status doesn't reflect why it's blocking.
Expected behavior
A full code sync of a git-tracked working directory should either succeed, or fail with an error that identifies the specific file/path and condition that tripped the guard — not a generic message with zero progress and no indication of which file or why.
Additional info available on request
Full source ID / doctor --json output / sources status output (omitted here as it's fairly verbose)
That error text ("This file belongs to a managed canonical worktree") comes from the gbrain binary, not from gstack, so we need gbrain's side to diagnose it. Could you post the file path it names, gbrain doctor --json, gbrain sources status, and your gbrain version? It would also help to know whether it happens on a non-Windows PGLite brain.
Hi @frobinson47, a quick follow-up. That error comes from the gbrain binary rather than gstack, and gstack now manages gbrain 0.60 (gstack v1.91.88.0 onward), well past the 0.51 you reported on.
Could you retry on gstack v1.91.122.0 (/gstack-upgrade) and, if it still fails, post the path the error names plus gbrain doctor --json and gbrain sources status? If we don't hear back by 2026-10-31 we'll close this as stale (reopening is always welcome), and anything gbrain-specific will go to the gbrain repo.
Thanks @capy-ai. Update from the same machine (Windows Server 2019, PGLite). I have not yet retried on gstack v1.91.122.0: this box is still on gstack 1.87.5.0 with gbrain 0.56.1.0. It is also no longer local-stdio: gbrain runs as gbrain serve --http under a service, with OAuth MCP clients.
Code sync works for me on gbrain 0.56.1.0, but only against a managed clone, not the working directory:
The first run reported PARTIAL / write_pending ("re-run the same sync options to resume"); re-running the same command completed (96 files, 450 chunks). So the original "managed canonical worktree" error may be specific to pointing a source at the live working tree. I can't confirm that; I have not reproduced the original error on this version.
Related findings, same session:
gbrain sources add <id> --path <valid git repo on a Windows drive letter path> returned not_a_git_repo, although git rev-parse on that path succeeds. With --force it returned request_too_large (source manifest exceeds the 1 MiB administration metadata bound), presumably because the working tree includes node_modules.
With a live gbrain serve holding the PGLite lock, CLI commands refuse with the "already open through gbrain serve" message, as noted in the original report.
Unqualified MCP search returns only the default source even when the client's federated_read includes the code source. Passing source_id explicitly works.
Requested diagnostics are below (gbrain 0.56.1.0, taken with the server stopped). Redacted: private repo/source names are replaced with src-B, src-C, code-src-1, code-src-2, artifacts-src; file paths and page slugs from other repos are replaced with <path>/<page-slug>/transcripts/<redacted>; the Windows user name is <user>. No other fields were changed.
gbrain doctor --json (redacted, 112 checks: 94 ok / 15 warn / 3 fail)
{"schema_version":2,"status":"unhealthy","health_score":0,"brain_checks_score":0,"category_scores":{"brain":0,"skill":85,"ops":90,"meta":100},"checks":[{"name":"resolver_health","status":"ok","message":"75 skills, all reachable","category":"skill"},{"name":"retrieval_reflex_health","status":"warn","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>`","details":{"enabled":true,"engine":"pglite","path":"pglite — serve IPC socket not present","fired_recently":false,"last_fired":null,"policy_skill_installed":false},"category":"skill"},{"name":"volunteer_channels","status":"ok","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","details":{"window_days":7,"channels":{}},"category":"skill"},{"name":"memory_verbs_usage","status":"ok","message":"no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","category":"skill"},{"name":"skill_conformance","status":"ok","message":"75/75 skills pass","category":"skill"},{"name":"skill_brain_first","status":"ok","message":"75 skill(s) compliant or exempt (note: 3 skill(s) have brain_first typo hints: data-loss-gate, brain-ingest-gate, company-brainify)","category":"skill"},{"name":"skills_manifest_integrity","status":"warn","message":"skills/ drifted from skills.lock.json (advisory — local edits are fine): 51 modified (_brain-filing-rules.json, academic-verify/routing-eval.jsonl, archive-crawler/routing-eval.jsonl, article-enrichment/routing-eval.jsonl, blog-ingest/routing-eval.jsonl, … +46 more). If intentional, regenerate: bun run scripts/generate-skills-manifest.ts","details":{"modified":["_brain-filing-rules.json","academic-verify/routing-eval.jsonl","archive-crawler/routing-eval.jsonl","article-enrichment/routing-eval.jsonl","blog-ingest/routing-eval.jsonl","book-mirror/routing-eval.jsonl","brain-ingest-gate/routing-eval.jsonl","brain-link-discipline/routing-eval.jsonl","brain-pdf/routing-eval.jsonl","brain-taxonomist/routing-eval.jsonl","briefing/routing-eval.jsonl","bulk-ingestion/routing-eval.jsonl","chat-connectors/routing-eval.jsonl","citation-fixer/routing-eval.jsonl","citation-graph-ingest/routing-eval.jsonl","company-brainify/routing-eval.jsonl","concept-synthesis/routing-eval.jsonl","context-audit/routing-eval.jsonl","conventions/cross-modal.yaml","conversation-archive/routing-eval.jsonl","correction-pipeline/routing-eval.jsonl","daily-task-manager/routing-eval.jsonl","data-loss-gate/routing-eval.jsonl","db-repair/routing-eval.jsonl","draft-in-voice/routing-eval.jsonl","eiirp/routing-eval.jsonl","fact-check/routing-eval.jsonl","frontmatter-guard/routing-eval.jsonl","functional-area-resolver/routing-eval.jsonl","idea-lineage/routing-eval.jsonl","manifest.json","measure-before-you-fix/routing-eval.jsonl","meeting-ingestion/routing-eval.jsonl","minion-orchestrator/routing-eval.jsonl","perplexity-research/routing-eval.jsonl","plugin-exclusions.json","plugin-lanes.json","postgres-adopt/routing-eval.jsonl","query/routing-eval.jsonl","remote-mcp/routing-eval.jsonl","reports/routing-eval.jsonl","research-compendium/routing-eval.jsonl","resolve-before-asking/routing-eval.jsonl","skill-autobench/routing-eval.jsonl","skill-optimizer/routing-eval.jsonl","skill-optimizer/skillopt-benchmark.jsonl","skillify/routing-eval.jsonl","skillpack-harvest/routing-eval.jsonl","strategic-reading/routing-eval.jsonl","two-tier-extraction/routing-eval.jsonl","voice-note-ingest/routing-eval.jsonl"],"missing":[],"extra":[]},"category":"skill"},{"name":"skill_currency","status":"ok","message":"skill currency not applicable (running inside the gbrain repo)","category":"skill"},{"name":"skill_preconditions","status":"warn","message":"1 unmet skill precondition(s):\n skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run","details":{"unmet":["skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run"]},"category":"skill"},{"name":"memorable_relay_health","status":"ok","message":"memorable relay off (default)","details":{"enabled":false,"out_of_band_settable":true,"reason":"disabled"},"category":"ops"},{"name":"memory_writeback","status":"ok","message":"ambient writeback off (default). Enable: gbrain config set memory.auto_writeback salient","details":{"mode":"off","mode_valid":true,"transient_ttl":"3d","ttl_valid":true,"instruction_visibility":"world","backstop_visibility":"private","visibility_note":"world = readable by agents authorized on THIS brain, not the public internet","audience":"shared","audience_reasons":["heuristic: 5 distinct non-automation MCP clients active in 30d (threshold 3) — declare the truth with: gbrain config set brain.audience personal|shared"],"nudge_shown":false,"counters_note":"local, append-only, loss-tolerant observability over the last 7d — never a source of truth"},"category":"brain"},{"name":"connectors","status":"ok","message":"No chat connectors configured (optional).","category":"ops"},{"name":"upgrade_errors","status":"ok","message":"Past post-upgrade failure on 2026-09-21 (0.51.0.0 → 0.51.6.0) superseded: binary now 0.56.1.0, schema current.","category":"meta"},{"name":"self_upgrade_health","status":"ok","message":"mode=notify; update available: 0.56.1.0 -> 0.60.300.0 (run: gbrain self-upgrade)","category":"ops"},{"name":"sync_failures","status":"fail","message":"2 unresolved sync failure(s). source=src-C path=<path> code=revision_conflict: A page changed after this sync cursor was enumerated. request=<not-admitted> run=291ee19d-34d8-4732-b2d5-c391483b31bc target=02b71b09f0641d5590a0f4c0e2369c8b6e92b7fd; source=src-B path=<discovery> code=page_identity_changed: A different origin occupies the imported slug. request=<not-admitted> run=eb9056d3-601b-4e85-8225-0c85a7bf9862 target=6e406040f200f4cc3464b399f0faa812ca6018a4 Fix the cause, then run gbrain sync --no-pull --retry-failed with the same source and options. Completed full runs do not resolve a different unfinished cursor.","remediation_status":"blocked","category":"brain"},{"name":"nightly_quality_probe_health","status":"ok","message":"disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","category":"brain"},{"name":"extract_health","status":"ok","message":"no extractions in last 7 days","details":{"schema_version":1,"kinds":[]},"category":"brain"},{"name":"conversation_facts_backlog","status":"ok","message":"disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","category":"brain"},{"name":"extract_atoms_backlog","status":"warn","message":"216 pages eligible for atom extraction but the active pack does not run extract_atoms — backlog growing. Fix: gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)","details":{"backlog":216,"backlog_by_source":[{"source_id":"src-B","backlog":16},{"source_id":"default","backlog":200}],"pack_declares_phase":false,"fix_hint":"gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)","known_approximation":"page backlog only; transcript corpus not counted"},"category":"brain"},{"name":"atom_provenance_drift","status":"ok","message":"no atoms to check","details":{"total_atoms":0,"slug_unbound":0,"drifted":0,"source_changed":0,"source_gone":0,"drift_pct":0},"category":"brain"},{"name":"conversation_format_coverage","status":"ok","message":"No conversation-type pages — coverage check not applicable","category":"brain"},{"name":"progressive_batch_audit_health","status":"ok","message":"No progressive-batch operations in the last 7 days","category":"ops"},{"name":"conversation_parser_probe_health","status":"ok","message":"enabled but no probe events in the last 7 days (next run by autopilot; fixtures require a source-checkout install).","category":"brain"},{"name":"home_dir_in_worktree","status":"ok","message":"gbrain home is outside any enclosing git worktree.","category":"ops"},{"name":"default_source_local_path","status":"ok","message":"default source local_path is set: C:/Users/<user>\\.gbrain-default-owner","category":"meta"},{"name":"multi_source_drift","status":"ok","message":"No cross-source slug drift detected among checked sources. 4 source(s) not checked (git-root-pinned, prefix-aware matching not yet implemented — #4712): src-C, src-B, code-src-1, code-src-2.","category":"meta"},{"name":"orphan_clones","status":"ok","message":"No stale clone temp dirs in C:/Users/<user>\\.gbrain\\clones\\.tmp.","category":"ops"},{"name":"connection","status":"ok","message":"Connected, 1603 pages","category":"ops"},{"name":"pgvector","status":"ok","message":"Extension installed","category":"ops"},{"name":"pages_upsert_arbiter","status":"ok","message":"pages has the UNIQUE(source_id, slug) upsert arbiter","category":"meta"},{"name":"text_projection_readiness","status":"ok","message":"Visible text projections match their canonical revisions.","details":{"readiness":"ready","ready":true},"category":"brain"},{"name":"links_link_source_check","status":"ok","message":"links_link_source_check has the v114 kebab-case gate","category":"meta"},{"name":"pglite_scale","status":"warn","message":"PGLite brain has 1603 pages (threshold 1000). Postgres gives faster search and concurrent access at this size. Move when ready: gbrain migrate --to supabase --url <postgres-conn> (the postgres-adopt skill walks it).","category":"ops"},{"name":"rls","status":"ok","message":"Skipped (PGLite — no PostgREST exposure, RLS not applicable)","category":"ops"},{"name":"schema_version","status":"ok","message":"Version 164 (latest: 164)","category":"meta"},{"name":"schema_columns","status":"ok","message":"700 column(s) verified against live schema","category":"meta"},{"name":"rls_event_trigger","status":"ok","message":"Skipped (PGLite — no event trigger support)","category":"ops"},{"name":"embeddings","status":"ok","message":"97% coverage, 450 missing","category":"brain"},{"name":"embedding_provider","status":"ok","message":"openai:text-embedding-3-large ✓ 735ms, 1536 dims, DB aligned","category":"brain"},{"name":"embedding_column_registry","status":"ok","message":"Registry healthy: 2 columns (embedding, embedding_image); active='embedding'","category":"brain"},{"name":"embedding_env_override","status":"ok","message":"no embedding env overrides set","category":"brain"},{"name":"embedding_migration_state","status":"ok","message":"no embedding migration in flight","category":"brain"},{"name":"graph_coverage","status":"ok","message":"No entity pages — graph_coverage not applicable (markdown-only brain)","category":"brain"},{"name":"brain_score","status":"warn","message":"Brain score 44/100 (embed 34/35, links 0/25, timeline density (all pages) 0/15, orphans 0/15, dead-links 10/10)","category":"brain"},{"name":"orphan_ratio","status":"ok","message":"Vacuous: 0 entity pages (<100). Orphan ratio not meaningful at this scale.","category":"brain"},{"name":"stale_mentions","status":"ok","message":"No by-mention links in this brain.","category":"brain"},{"name":"integrity","status":"ok","message":"Sampled 500 pages; 3 external link(s) (no bare tweets).","category":"brain"},{"name":"jsonb_integrity","status":"ok","message":"All JSONB columns store objects/arrays","category":"brain"},{"name":"takes_weight_grid","status":"ok","message":"No takes yet","category":"brain"},{"name":"child_table_orphans","status":"ok","message":"All FK-child tables clean (10 tables checked)","category":"brain"},{"name":"raw_provenance","status":"ok","message":"All synthesized pages carry a raw trace or explicit exemption","category":"brain"},{"name":"source_config_shape","status":"ok","message":"All source config values are JSON objects","category":"brain"},{"name":"whoknows_health","status":"ok","message":"whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","category":"skill"},{"name":"cross_modal_modality_backfill","status":"ok","message":"All image-asset chunks have modality=image","category":"brain"},{"name":"unified_multimodal_coverage","status":"ok","message":"search.unified_multimodal is off; coverage check N/A","category":"brain"},{"name":"markdown_body_completeness","status":"ok","message":"No truncated bodies detected","category":"brain"},{"name":"oversized_pages","status":"warn","message":"1 page(s) exceed 500000-byte block threshold. Top: <page-slug> (582281b, src=code-src-1). New ingests with the same shape get frontmatter.embed_skip set automatically; existing oversized pages can be split or accepted as non-embeddable.","category":"brain"},{"name":"scraper_junk_pages","status":"ok","message":"No junk-pattern hits in 1000 recent page(s) (use --content-audit for full scan)","category":"brain"},{"name":"content_sanity_audit_recent","status":"ok","message":"No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","category":"brain"},{"name":"quarantined_pages","status":"ok","message":"No quarantined pages","category":"brain"},{"name":"flagged_pages","status":"ok","message":"No flagged pages","category":"brain"},{"name":"unverified_extractions","status":"ok","message":"No stale unverified extraction stubs","details":{"count":0,"days":7,"source_id":null},"category":"brain"},{"name":"frontmatter_integrity","status":"ok","message":"6 source(s) clean — no frontmatter issues","category":"brain"},{"name":"eval_capture","status":"ok","message":"No capture failures in the last 24h","category":"meta"},{"name":"contradictions","status":"ok","message":"No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","category":"brain"},{"name":"facts_extraction_health","status":"ok","message":"No facts:absorb failures in the last 24h.","category":"brain"},{"name":"effective_date_health","status":"ok","message":"Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","category":"brain"},{"name":"salience_health","status":"ok","message":"Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","category":"brain"},{"name":"queue_health","status":"ok","message":"Skipped (PGLite — no multi-process worker surface)","category":"ops"},{"name":"subagent_capability","status":"ok","message":"Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","category":"ops"},{"name":"facts_health","status":"ok","message":"facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","category":"brain"},{"name":"image_assets","status":"ok","message":"No image assets indexed yet","category":"brain"},{"name":"ocr_health","status":"ok","message":"OCR not in use (or no images ingested with OCR opt-in)","category":"brain"},{"name":"sync_freshness","status":"fail","message":"Source 'default' has never been synced; Source 'src-C' last synced 23d ago — brain search is stale!; Source 'src-B' (src-B) last synced 23d ago — brain search is stale!; Source 'code-src-1' last synced 23d ago — brain search is stale!; Source 'code-src-2' last synced 63h ago. Run `gbrain sync --source <id>` for each stale source","details":{"unchanged_count":1,"synced_recently_count":0,"stale_count":5},"category":"brain"},{"name":"backup_coverage","status":"warn","message":"0 knowledge asset(s) have no git remote: . Current recovery is not verified for all repositories. Run `gbrain backup status` for fix commands (`gbrain bootstrap repo` / `git remote add origin <url>` / `gbrain sources harden <id>`).","details":{"totals":{"assets":6,"no_remote":0,"unpushed":0,"failing":0,"configured_repos":5,"recoverable_repos":0,"pages_at_risk":0},"checked_at":"2026-10-18T12:42:07.302Z","computed_by":"doctor","cache_age":"under an hour ago","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.","degraded":false},"category":"ops"},{"name":"sync_consolidation","status":"ok","message":"6 active sources detected. Recommended cron: `gbrain sync --all --parallel 4 --workers 4 --skip-failed`. If your crontab has separate per-source entries, replace them with one --all line — future sources auto-pick-up without a crontab edit.","category":"ops"},{"name":"links_extraction_lag","status":"warn","message":"1092/1603 pages (68%) have un-extracted edges. Run: gbrain extract --stale","details":{"total":1603,"stale":1092,"pct":68,"warn_pct":20,"fail_pct":null,"source_id":null},"category":"brain"},{"name":"cycle_freshness","status":"fail","message":"Source 'default' has never completed a full cycle; Source 'src-B' (src-B) last cycled 648h ago; Source 'artifacts-src' last cycled 649h ago; Source 'code-src-1' has never completed a full cycle; Source 'code-src-2' has never completed a full cycle; Source 'src-C' has never completed a full cycle. Run `gbrain dream --source <id>` for each stale source, or start `gbrain autopilot`.","category":"brain"},{"name":"content_hash_duplicates","status":"warn","message":"1 content-hash duplicate pair(s) detected (same content, differing slug forms — usually an import run from the wrong root, which drops the path prefix). Sample: <page-slug> <-> <page-slug>. Fix: gbrain pages delete <bare-slug> for each pair, then gbrain pages purge-deleted --older-than 0","details":{"pair_count":1,"hash_groups":1,"sample_pairs":["<page-slug> <-> <page-slug>"],"distinct_slug_group_count":0,"sample_distinct_slug_groups":[]},"category":"brain"},{"name":"code_chunk_metadata","status":"ok","message":"All code-page chunks carry symbol metadata","category":"brain"},{"name":"undeclared_db_only_pages","status":"warn","message":"298 DB page(s) have no backing file and sit outside every declared/default db_only path — invisible to file-lane backup/recovery. Sample: transcripts/<redacted> (src=default); <page-slug> (src=default); pricing-strategy-report (src=default); docs/ideas/loop-2026-07-17-summary (src=default); openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default). Fix: restore or export the files, or declare their prefixes under storage.db_only in gbrain.yml (derive-phase defaults already cover: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/)","details":{"total":298,"per_source":{"default":298},"sample_slugs":["transcripts/<redacted> (src=default)","<page-slug> (src=default)","pricing-strategy-report (src=default)","docs/ideas/loop-2026-07-17-summary (src=default)","openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default)"]},"category":"brain"},{"name":"db_only_collector_collision","status":"ok","message":"No configured collectors declare output paths","category":"ops"},{"name":"search_mode","status":"ok","message":"Mode: tokenmax with 1 per-key override(s) (search.reranker.enabled). To consolidate to the pure mode bundle: gbrain search modes --reset","category":"ops"},{"name":"hidden_by_search_policy","status":"ok","message":"No pages hidden by search-exclude policy.","details":{"prefixes":["test/","attachments/",".raw/"],"counts":{}},"category":"brain"},{"name":"eval_drift","status":"ok","message":"No retrieval-affecting files changed in working tree.","category":"brain"},{"name":"reranker_health","status":"ok","message":"Reranker disabled — no failures expected","category":"ops"},{"name":"batch_retry_health","status":"ok","message":"No exhausted batch retries in last 24h.","category":"ops"},{"name":"wedged_queue","status":"ok","message":"PGLite — no queue to check","category":"ops"},{"name":"orphaned_private_queue","status":"ok","message":"No orphaned private queues","category":"ops"},{"name":"autopilot_fanout_concurrency","status":"ok","message":"PGLite — single-writer, fan-out is 1","category":"ops"},{"name":"google_oauth","status":"ok","message":"no Google accounts connected (gbrain google connect to start)","category":"ops"},{"name":"graph_signals_coverage","status":"warn","message":"graph_signals enabled but only 0.7% of pages have inbound links (<10%). Signal will rarely fire. Fix: `gbrain extract all` to populate the link graph from frontmatter + markdown.","category":"brain"},{"name":"junk_entity_hubs","status":"ok","message":"No junk entity hubs (pages with <=2 chunks and >1000 edges)","category":"brain"},{"name":"brainstorm_health","status":"ok","message":"Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","category":"ops"},{"name":"link_resolution_opportunity","status":"ok","message":"23 bare wikilink(s) found, but none have basename matches in the brain.","category":"brain"},{"name":"ze_embedding_health","status":"ok","message":"Configured embedding model \"openai:text-embedding-3-large\" is not ZeroEntropy — skip.","category":"ops"},{"name":"provider_sunset","status":"ok","message":"No configured provider has an announced shutdown (embedding: openai:text-embedding-3-large).","category":"ops"},{"name":"embedding_width_consistency","status":"ok","message":"Schema width (1536d) matches gateway embedding_dimensions","category":"brain"},{"name":"facts_embedding_width_consistency","status":"ok","message":"Skipped on PGLite (single bundled pgvector version).","category":"brain"},{"name":"source_routing_health","status":"warn","message":"1 non-default source(s) have zero pages: artifacts-src. If you've recently run `gbrain import --source-id <id>` against these, the writes may have silently fallen to the default source pre-v0.37.7.0. Re-run with --source-id; verify via `gbrain sources current --json`.","category":"brain"},{"name":"oauth_confidential_client_health","status":"ok","message":"3 OAuth client(s) registered; all auth shapes consistent","category":"ops"},{"name":"oauth_client_scope_health","status":"ok","message":"Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","category":"ops"},{"name":"autopilot_lock_scope","status":"ok","message":"Lock path: C:/Users/<user>\\.gbrain\\autopilot.lock","category":"ops"},{"name":"stale_locks","status":"ok","message":"No stale locks (no rows with ttl_expires_at < NOW())","category":"ops"},{"name":"cycle_phase_scope","status":"ok","message":"Phase taxonomy: 12 source-scoped, 9 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: [resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, drift, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","details":{"phase_scope_map":{"lint":"source","backlinks":"source","sync":"source","synthesize":"mixed","extract":"source","extract_facts":"source","resolve_symbol_edges":"global","patterns":"mixed","recompute_emotional_weight":"source","consolidate":"source","propose_takes":"source","grade_takes":"global","calibration_profile":"global","drift":"global","embed":"global","orphans":"global","purge":"global","schema-suggest":"source","extract_atoms":"source","synthesize_concepts":"global","conversation_facts_backfill":"source","enrich_thin":"source","skillopt":"global"},"counts":{"source":12,"global":9,"mixed":2}},"category":"meta"},{"name":"embed_staleness","status":"warn","message":"450 stale chunks (small backlog)","category":"brain"},{"name":"entity_link_coverage","status":"ok","message":"No entity pages — coverage check vacuous","category":"brain"},{"name":"timeline_coverage","status":"ok","message":"No entity pages — coverage check vacuous","category":"brain"},{"name":"takes_count","status":"warn","message":"0 takes (takes.bootstrap_enabled is false; opt in to enable)","category":"brain"},{"name":"pack_upgrade_available","status":"ok","message":"Active pack gbrain-base-v2@1.2.0+1a2aee67 is current (no successor declared)","category":"meta"},{"name":"type_proliferation","status":"ok","message":"4 distinct typed values (pack declares 19)","category":"meta"},{"name":"dangling_aliases","status":"ok","message":"No dangling aliases","category":"brain"}],"top_issues":[{"name":"sync_freshness","status":"fail","tier":"root","fix":"Source 'default' has never been synced; Source 'src-C' last synced 23d ago — brain search is stale!; Source 'src-B' (src-B) last synced 23d ago — brain search is stale!; Source 'code-src-1' last synced 23d ago — brain search is stale!; Source 'code-src-2' last synced 63h ago. Run `gbrain sync --source <id>` for each stale source"},{"name":"cycle_freshness","status":"fail","tier":"symptom","fix":"Source 'default' has never completed a full cycle; Source 'src-B' (src-B) last cycled 648h ago; Source 'artifacts-src' last cycled 649h ago; Source 'code-src-1' has never completed a full cycle; Source 'code-src-2' has never completed a full cycle; Source 'src-C' has never completed a full cycle. Run `gbrain dream --source <id>` for each stale source, or start `gbrain autopilot`."},{"name":"sync_failures","status":"fail","tier":"symptom","fix":"2 unresolved sync failure(s). source=src-C path=<path> code=revision_conflict: A page changed after this sync cursor was enumerated. request=<not-admitted> run=291ee19d-34d8-4732-b2d5-c391483b31bc target=02b71b09f0641d5590a0f4c0e2369c8b6e92b7fd; source=src-B path=<discovery> code=page_identity_changed: A different origin occupies the imported slug. request=<not-admitted> run=eb9056d3-601b-4e85-8225-0c85a7bf9862 target=6e406040f200f4cc3464b399f0faa812ca6018a4 Fix the cause, then run gbrain sync --no-pull --retry-failed with the same source and options. Completed full runs do not resolve a different unfinished cursor."},{"name":"backup_coverage","status":"warn","tier":"symptom","fix":"0 knowledge asset(s) have no git remote: . Current recovery is not verified for all repositories. Run `gbrain backup status` for fix commands (`gbrain bootstrap repo` / `git remote add origin <url>` / `gbrain sources harden <id>`)."},{"name":"brain_score","status":"warn","tier":"symptom","fix":"Brain score 44/100 (embed 34/35, links 0/25, timeline density (all pages) 0/15, orphans 0/15, dead-links 10/10)"},{"name":"content_hash_duplicates","status":"warn","tier":"symptom","fix":"1 content-hash duplicate pair(s) detected (same content, differing slug forms — usually an import run from the wrong root, which drops the path prefix). Sample: <page-slug> <-> <page-slug>. Fix: gbrain pages delete <bare-slug> for each pair, then gbrain pages purge-deleted --older-than 0"},{"name":"embed_staleness","status":"warn","tier":"symptom","fix":"450 stale chunks (small backlog)"},{"name":"extract_atoms_backlog","status":"warn","tier":"symptom","fix":"gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)"},{"name":"graph_signals_coverage","status":"warn","tier":"symptom","fix":"graph_signals enabled but only 0.7% of pages have inbound links (<10%). Signal will rarely fire. Fix: `gbrain extract all` to populate the link graph from frontmatter + markdown."},{"name":"links_extraction_lag","status":"warn","tier":"symptom","fix":"1092/1603 pages (68%) have un-extracted edges. Run: gbrain extract --stale"},{"name":"oversized_pages","status":"warn","tier":"symptom","fix":"1 page(s) exceed 500000-byte block threshold. Top: <page-slug> (582281b, src=code-src-1). New ingests with the same shape get frontmatter.embed_skip set automatically; existing oversized pages can be split or accepted as non-embeddable."},{"name":"pglite_scale","status":"warn","tier":"symptom","fix":"PGLite brain has 1603 pages (threshold 1000). Postgres gives faster search and concurrent access at this size. Move when ready: gbrain migrate --to supabase --url <postgres-conn> (the postgres-adopt skill walks it)."},{"name":"retrieval_reflex_health","status":"warn","tier":"symptom","fix":"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":"skill_preconditions","status":"warn","tier":"symptom","fix":"1 unmet skill precondition(s):\n skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run"},{"name":"skills_manifest_integrity","status":"warn","tier":"symptom","fix":"skills/ drifted from skills.lock.json (advisory — local edits are fine): 51 modified (_brain-filing-rules.json, academic-verify/routing-eval.jsonl, archive-crawler/routing-eval.jsonl, article-enrichment/routing-eval.jsonl, blog-ingest/routing-eval.jsonl, … +46 more). If intentional, regenerate: bun run scripts/generate-skills-manifest.ts"},{"name":"source_routing_health","status":"warn","tier":"symptom","fix":"1 non-default source(s) have zero pages: artifacts-src. If you've recently run `gbrain import --source-id <id>` against these, the writes may have silently fallen to the default source pre-v0.37.7.0. Re-run with --source-id; verify via `gbrain sources current --json`."},{"name":"takes_count","status":"warn","tier":"symptom","fix":"0 takes (takes.bootstrap_enabled is false; opt in to enable)"},{"name":"undeclared_db_only_pages","status":"warn","tier":"symptom","fix":"298 DB page(s) have no backing file and sit outside every declared/default db_only path — invisible to file-lane backup/recovery. Sample: transcripts/<redacted> (src=default); <page-slug> (src=default); pricing-strategy-report (src=default); docs/ideas/loop-2026-07-17-summary (src=default); openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default). Fix: restore or export the files, or declare their prefixes under storage.db_only in gbrain.yml (derive-phase defaults already cover: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/)"}],"engine":"pglite","db_url_source":null}
I'll retest on 1.91.122.0 and report back before 2026-10-31 if the original error still reproduces.
Follow-up with more detail on the original error, from other sessions on the same machine (Windows, PGLite). Session notes from before today are marked as such; the last point I re-checked today.
What I believe the original error was. On 2026-09-21 (gbrain 0.51.0.0) the same "This file belongs to a managed canonical worktree." message also blocked both markdown and --strategy code sync on a second source that is registered with --path at a live working directory, on a source that had synced fine hours earlier. What we found:
The writer / canonical-ownership subsystem (gbrain sources writer status|claim|activate|transfer) held a server-side binding for that worktree, keyed by its local_path. gbrain sources detach (dropping the local .gbrain-source pin) did not clear it.
gbrain sources writer status showed enabled: false at the top level, yet the binding still gated sync. This matches what the original report saw (writer system disabled, zero registered worktrees).
Fully activating the coordinator worked, but required claiming every filesystem source first, including default, whose local_path is NULL by design. We claimed it against a small marker directory outside ~/.gbrain; a path inside ~/.gbrain conflicts with the coordination lock files.
The message changed after a self-upgrade. After gbrain self-upgrade from 0.51.0.0 to 0.51.6.0 the generic text was replaced with an actionable one: "Managed sync requires --no-pull; Git pull/rebase needs an explicit drained maintenance window." Adding --no-pull to gbrain sync --strategy code then worked (session note, 2026-09-21). Re-checked today on 0.56.1.0: the same message appeared verbatim on a fresh managed source, and --no-pull resolved it.
So my current guess is that the original error is fixed from 0.51.6.0 onward, because the cryptic text became a clear instruction, and that it only ever surfaced on sources registered against a live working tree. I have not reproduced the original text on a recent version, I have not retested on gstack v1.91.122.0, and I can't rule out that the original source still behaves differently. I will still retest as promised before 2026-10-31.
Two other things from those same sessions that may belong in the gbrain repo, in case they are useful: gbrain sync delegating to a live gbrain serve over IPC failed with storage_error: "The persistence owner could not complete this request." on 0.51.0.0 and 0.51.6.0 (workaround: stop the server and use --no-pull --no-delegate), and the sync bookmark is shared across --strategy values, so syncing one strategy first makes the other report "up to date" without importing its files.
Activity
capy-ai commentedon Oct 11, 2026
That error text ("This file belongs to a managed canonical worktree") comes from the gbrain binary, not from gstack, so we need gbrain's side to diagnose it. Could you post the file path it names,
gbrain doctor --json,gbrain sources status, and your gbrain version? It would also help to know whether it happens on a non-Windows PGLite brain.capy-ai commentedon Oct 17, 2026
Hi @frobinson47, a quick follow-up. That error comes from the gbrain binary rather than gstack, and gstack now manages gbrain 0.60 (gstack v1.91.88.0 onward), well past the 0.51 you reported on.
Could you retry on gstack v1.91.122.0 (
/gstack-upgrade) and, if it still fails, post the path the error names plusgbrain doctor --jsonandgbrain sources status? If we don't hear back by 2026-10-31 we'll close this as stale (reopening is always welcome), and anything gbrain-specific will go to the gbrain repo.frobinson47 commentedon Oct 18, 2026
Thanks @capy-ai. Update from the same machine (Windows Server 2019, PGLite). I have not yet retried on gstack v1.91.122.0: this box is still on gstack 1.87.5.0 with gbrain 0.56.1.0. It is also no longer local-stdio: gbrain runs as
gbrain serve --httpunder a service, with OAuth MCP clients.Code sync works for me on gbrain 0.56.1.0, but only against a managed clone, not the working directory:
git clone <repo> ~/.gbrain-clones/<name>gbrain sources add <id> --path <clone>gbrain sync --source <id> --repo <clone> --strategy code --no-pullThe first run reported PARTIAL /
write_pending("re-run the same sync options to resume"); re-running the same command completed (96 files, 450 chunks). So the original "managed canonical worktree" error may be specific to pointing a source at the live working tree. I can't confirm that; I have not reproduced the original error on this version.Related findings, same session:
gbrain sources add <id> --path <valid git repo on a Windows drive letter path>returnednot_a_git_repo, althoughgit rev-parseon that path succeeds. With--forceit returnedrequest_too_large(source manifest exceeds the 1 MiB administration metadata bound), presumably because the working tree includesnode_modules.gbrain serveholding the PGLite lock, CLI commands refuse with the "already open through gbrain serve" message, as noted in the original report.searchreturns only the default source even when the client'sfederated_readincludes the code source. Passingsource_idexplicitly works.Requested diagnostics are below (gbrain 0.56.1.0, taken with the server stopped). Redacted: private repo/source names are replaced with
src-B,src-C,code-src-1,code-src-2,artifacts-src; file paths and page slugs from other repos are replaced with<path>/<page-slug>/transcripts/<redacted>; the Windows user name is<user>. No other fields were changed.gbrain sources statusgbrain doctor --json(redacted, 112 checks: 94 ok / 15 warn / 3 fail){"schema_version":2,"status":"unhealthy","health_score":0,"brain_checks_score":0,"category_scores":{"brain":0,"skill":85,"ops":90,"meta":100},"checks":[{"name":"resolver_health","status":"ok","message":"75 skills, all reachable","category":"skill"},{"name":"retrieval_reflex_health","status":"warn","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>`","details":{"enabled":true,"engine":"pglite","path":"pglite — serve IPC socket not present","fired_recently":false,"last_fired":null,"policy_skill_installed":false},"category":"skill"},{"name":"volunteer_channels","status":"ok","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","details":{"window_days":7,"channels":{}},"category":"skill"},{"name":"memory_verbs_usage","status":"ok","message":"no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)","category":"skill"},{"name":"skill_conformance","status":"ok","message":"75/75 skills pass","category":"skill"},{"name":"skill_brain_first","status":"ok","message":"75 skill(s) compliant or exempt (note: 3 skill(s) have brain_first typo hints: data-loss-gate, brain-ingest-gate, company-brainify)","category":"skill"},{"name":"skills_manifest_integrity","status":"warn","message":"skills/ drifted from skills.lock.json (advisory — local edits are fine): 51 modified (_brain-filing-rules.json, academic-verify/routing-eval.jsonl, archive-crawler/routing-eval.jsonl, article-enrichment/routing-eval.jsonl, blog-ingest/routing-eval.jsonl, … +46 more). If intentional, regenerate: bun run scripts/generate-skills-manifest.ts","details":{"modified":["_brain-filing-rules.json","academic-verify/routing-eval.jsonl","archive-crawler/routing-eval.jsonl","article-enrichment/routing-eval.jsonl","blog-ingest/routing-eval.jsonl","book-mirror/routing-eval.jsonl","brain-ingest-gate/routing-eval.jsonl","brain-link-discipline/routing-eval.jsonl","brain-pdf/routing-eval.jsonl","brain-taxonomist/routing-eval.jsonl","briefing/routing-eval.jsonl","bulk-ingestion/routing-eval.jsonl","chat-connectors/routing-eval.jsonl","citation-fixer/routing-eval.jsonl","citation-graph-ingest/routing-eval.jsonl","company-brainify/routing-eval.jsonl","concept-synthesis/routing-eval.jsonl","context-audit/routing-eval.jsonl","conventions/cross-modal.yaml","conversation-archive/routing-eval.jsonl","correction-pipeline/routing-eval.jsonl","daily-task-manager/routing-eval.jsonl","data-loss-gate/routing-eval.jsonl","db-repair/routing-eval.jsonl","draft-in-voice/routing-eval.jsonl","eiirp/routing-eval.jsonl","fact-check/routing-eval.jsonl","frontmatter-guard/routing-eval.jsonl","functional-area-resolver/routing-eval.jsonl","idea-lineage/routing-eval.jsonl","manifest.json","measure-before-you-fix/routing-eval.jsonl","meeting-ingestion/routing-eval.jsonl","minion-orchestrator/routing-eval.jsonl","perplexity-research/routing-eval.jsonl","plugin-exclusions.json","plugin-lanes.json","postgres-adopt/routing-eval.jsonl","query/routing-eval.jsonl","remote-mcp/routing-eval.jsonl","reports/routing-eval.jsonl","research-compendium/routing-eval.jsonl","resolve-before-asking/routing-eval.jsonl","skill-autobench/routing-eval.jsonl","skill-optimizer/routing-eval.jsonl","skill-optimizer/skillopt-benchmark.jsonl","skillify/routing-eval.jsonl","skillpack-harvest/routing-eval.jsonl","strategic-reading/routing-eval.jsonl","two-tier-extraction/routing-eval.jsonl","voice-note-ingest/routing-eval.jsonl"],"missing":[],"extra":[]},"category":"skill"},{"name":"skill_currency","status":"ok","message":"skill currency not applicable (running inside the gbrain repo)","category":"skill"},{"name":"skill_preconditions","status":"warn","message":"1 unmet skill precondition(s):\n skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run","details":{"unmet":["skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run"]},"category":"skill"},{"name":"memorable_relay_health","status":"ok","message":"memorable relay off (default)","details":{"enabled":false,"out_of_band_settable":true,"reason":"disabled"},"category":"ops"},{"name":"memory_writeback","status":"ok","message":"ambient writeback off (default). Enable: gbrain config set memory.auto_writeback salient","details":{"mode":"off","mode_valid":true,"transient_ttl":"3d","ttl_valid":true,"instruction_visibility":"world","backstop_visibility":"private","visibility_note":"world = readable by agents authorized on THIS brain, not the public internet","audience":"shared","audience_reasons":["heuristic: 5 distinct non-automation MCP clients active in 30d (threshold 3) — declare the truth with: gbrain config set brain.audience personal|shared"],"nudge_shown":false,"counters_note":"local, append-only, loss-tolerant observability over the last 7d — never a source of truth"},"category":"brain"},{"name":"connectors","status":"ok","message":"No chat connectors configured (optional).","category":"ops"},{"name":"upgrade_errors","status":"ok","message":"Past post-upgrade failure on 2026-09-21 (0.51.0.0 → 0.51.6.0) superseded: binary now 0.56.1.0, schema current.","category":"meta"},{"name":"self_upgrade_health","status":"ok","message":"mode=notify; update available: 0.56.1.0 -> 0.60.300.0 (run: gbrain self-upgrade)","category":"ops"},{"name":"sync_failures","status":"fail","message":"2 unresolved sync failure(s). source=src-C path=<path> code=revision_conflict: A page changed after this sync cursor was enumerated. request=<not-admitted> run=291ee19d-34d8-4732-b2d5-c391483b31bc target=02b71b09f0641d5590a0f4c0e2369c8b6e92b7fd; source=src-B path=<discovery> code=page_identity_changed: A different origin occupies the imported slug. request=<not-admitted> run=eb9056d3-601b-4e85-8225-0c85a7bf9862 target=6e406040f200f4cc3464b399f0faa812ca6018a4 Fix the cause, then run gbrain sync --no-pull --retry-failed with the same source and options. Completed full runs do not resolve a different unfinished cursor.","remediation_status":"blocked","category":"brain"},{"name":"nightly_quality_probe_health","status":"ok","message":"disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true","category":"brain"},{"name":"extract_health","status":"ok","message":"no extractions in last 7 days","details":{"schema_version":1,"kinds":[]},"category":"brain"},{"name":"conversation_facts_backlog","status":"ok","message":"disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true","category":"brain"},{"name":"extract_atoms_backlog","status":"warn","message":"216 pages eligible for atom extraction but the active pack does not run extract_atoms — backlog growing. Fix: gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)","details":{"backlog":216,"backlog_by_source":[{"source_id":"src-B","backlog":16},{"source_id":"default","backlog":200}],"pack_declares_phase":false,"fix_hint":"gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)","known_approximation":"page backlog only; transcript corpus not counted"},"category":"brain"},{"name":"atom_provenance_drift","status":"ok","message":"no atoms to check","details":{"total_atoms":0,"slug_unbound":0,"drifted":0,"source_changed":0,"source_gone":0,"drift_pct":0},"category":"brain"},{"name":"conversation_format_coverage","status":"ok","message":"No conversation-type pages — coverage check not applicable","category":"brain"},{"name":"progressive_batch_audit_health","status":"ok","message":"No progressive-batch operations in the last 7 days","category":"ops"},{"name":"conversation_parser_probe_health","status":"ok","message":"enabled but no probe events in the last 7 days (next run by autopilot; fixtures require a source-checkout install).","category":"brain"},{"name":"home_dir_in_worktree","status":"ok","message":"gbrain home is outside any enclosing git worktree.","category":"ops"},{"name":"default_source_local_path","status":"ok","message":"default source local_path is set: C:/Users/<user>\\.gbrain-default-owner","category":"meta"},{"name":"multi_source_drift","status":"ok","message":"No cross-source slug drift detected among checked sources. 4 source(s) not checked (git-root-pinned, prefix-aware matching not yet implemented — #4712): src-C, src-B, code-src-1, code-src-2.","category":"meta"},{"name":"orphan_clones","status":"ok","message":"No stale clone temp dirs in C:/Users/<user>\\.gbrain\\clones\\.tmp.","category":"ops"},{"name":"connection","status":"ok","message":"Connected, 1603 pages","category":"ops"},{"name":"pgvector","status":"ok","message":"Extension installed","category":"ops"},{"name":"pages_upsert_arbiter","status":"ok","message":"pages has the UNIQUE(source_id, slug) upsert arbiter","category":"meta"},{"name":"text_projection_readiness","status":"ok","message":"Visible text projections match their canonical revisions.","details":{"readiness":"ready","ready":true},"category":"brain"},{"name":"links_link_source_check","status":"ok","message":"links_link_source_check has the v114 kebab-case gate","category":"meta"},{"name":"pglite_scale","status":"warn","message":"PGLite brain has 1603 pages (threshold 1000). Postgres gives faster search and concurrent access at this size. Move when ready: gbrain migrate --to supabase --url <postgres-conn> (the postgres-adopt skill walks it).","category":"ops"},{"name":"rls","status":"ok","message":"Skipped (PGLite — no PostgREST exposure, RLS not applicable)","category":"ops"},{"name":"schema_version","status":"ok","message":"Version 164 (latest: 164)","category":"meta"},{"name":"schema_columns","status":"ok","message":"700 column(s) verified against live schema","category":"meta"},{"name":"rls_event_trigger","status":"ok","message":"Skipped (PGLite — no event trigger support)","category":"ops"},{"name":"embeddings","status":"ok","message":"97% coverage, 450 missing","category":"brain"},{"name":"embedding_provider","status":"ok","message":"openai:text-embedding-3-large ✓ 735ms, 1536 dims, DB aligned","category":"brain"},{"name":"embedding_column_registry","status":"ok","message":"Registry healthy: 2 columns (embedding, embedding_image); active='embedding'","category":"brain"},{"name":"embedding_env_override","status":"ok","message":"no embedding env overrides set","category":"brain"},{"name":"embedding_migration_state","status":"ok","message":"no embedding migration in flight","category":"brain"},{"name":"graph_coverage","status":"ok","message":"No entity pages — graph_coverage not applicable (markdown-only brain)","category":"brain"},{"name":"brain_score","status":"warn","message":"Brain score 44/100 (embed 34/35, links 0/25, timeline density (all pages) 0/15, orphans 0/15, dead-links 10/10)","category":"brain"},{"name":"orphan_ratio","status":"ok","message":"Vacuous: 0 entity pages (<100). Orphan ratio not meaningful at this scale.","category":"brain"},{"name":"stale_mentions","status":"ok","message":"No by-mention links in this brain.","category":"brain"},{"name":"integrity","status":"ok","message":"Sampled 500 pages; 3 external link(s) (no bare tweets).","category":"brain"},{"name":"jsonb_integrity","status":"ok","message":"All JSONB columns store objects/arrays","category":"brain"},{"name":"takes_weight_grid","status":"ok","message":"No takes yet","category":"brain"},{"name":"child_table_orphans","status":"ok","message":"All FK-child tables clean (10 tables checked)","category":"brain"},{"name":"raw_provenance","status":"ok","message":"All synthesized pages carry a raw trace or explicit exemption","category":"brain"},{"name":"source_config_shape","status":"ok","message":"All source config values are JSON objects","category":"brain"},{"name":"whoknows_health","status":"ok","message":"whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.","category":"skill"},{"name":"cross_modal_modality_backfill","status":"ok","message":"All image-asset chunks have modality=image","category":"brain"},{"name":"unified_multimodal_coverage","status":"ok","message":"search.unified_multimodal is off; coverage check N/A","category":"brain"},{"name":"markdown_body_completeness","status":"ok","message":"No truncated bodies detected","category":"brain"},{"name":"oversized_pages","status":"warn","message":"1 page(s) exceed 500000-byte block threshold. Top: <page-slug> (582281b, src=code-src-1). New ingests with the same shape get frontmatter.embed_skip set automatically; existing oversized pages can be split or accepted as non-embeddable.","category":"brain"},{"name":"scraper_junk_pages","status":"ok","message":"No junk-pattern hits in 1000 recent page(s) (use --content-audit for full scan)","category":"brain"},{"name":"content_sanity_audit_recent","status":"ok","message":"No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)","category":"brain"},{"name":"quarantined_pages","status":"ok","message":"No quarantined pages","category":"brain"},{"name":"flagged_pages","status":"ok","message":"No flagged pages","category":"brain"},{"name":"unverified_extractions","status":"ok","message":"No stale unverified extraction stubs","details":{"count":0,"days":7,"source_id":null},"category":"brain"},{"name":"frontmatter_integrity","status":"ok","message":"6 source(s) clean — no frontmatter issues","category":"brain"},{"name":"eval_capture","status":"ok","message":"No capture failures in the last 24h","category":"meta"},{"name":"contradictions","status":"ok","message":"No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.","category":"brain"},{"name":"facts_extraction_health","status":"ok","message":"No facts:absorb failures in the last 24h.","category":"brain"},{"name":"effective_date_health","status":"ok","message":"Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)","category":"brain"},{"name":"salience_health","status":"ok","message":"Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)","category":"brain"},{"name":"queue_health","status":"ok","message":"Skipped (PGLite — no multi-process worker surface)","category":"ops"},{"name":"subagent_capability","status":"ok","message":"Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability","category":"ops"},{"name":"facts_health","status":"ok","message":"facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —","category":"brain"},{"name":"image_assets","status":"ok","message":"No image assets indexed yet","category":"brain"},{"name":"ocr_health","status":"ok","message":"OCR not in use (or no images ingested with OCR opt-in)","category":"brain"},{"name":"sync_freshness","status":"fail","message":"Source 'default' has never been synced; Source 'src-C' last synced 23d ago — brain search is stale!; Source 'src-B' (src-B) last synced 23d ago — brain search is stale!; Source 'code-src-1' last synced 23d ago — brain search is stale!; Source 'code-src-2' last synced 63h ago. Run `gbrain sync --source <id>` for each stale source","details":{"unchanged_count":1,"synced_recently_count":0,"stale_count":5},"category":"brain"},{"name":"backup_coverage","status":"warn","message":"0 knowledge asset(s) have no git remote: . Current recovery is not verified for all repositories. Run `gbrain backup status` for fix commands (`gbrain bootstrap repo` / `git remote add origin <url>` / `gbrain sources harden <id>`).","details":{"totals":{"assets":6,"no_remote":0,"unpushed":0,"failing":0,"configured_repos":5,"recoverable_repos":0,"pages_at_risk":0},"checked_at":"2026-10-18T12:42:07.302Z","computed_by":"doctor","cache_age":"under an hour ago","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.","degraded":false},"category":"ops"},{"name":"sync_consolidation","status":"ok","message":"6 active sources detected. Recommended cron: `gbrain sync --all --parallel 4 --workers 4 --skip-failed`. If your crontab has separate per-source entries, replace them with one --all line — future sources auto-pick-up without a crontab edit.","category":"ops"},{"name":"links_extraction_lag","status":"warn","message":"1092/1603 pages (68%) have un-extracted edges. Run: gbrain extract --stale","details":{"total":1603,"stale":1092,"pct":68,"warn_pct":20,"fail_pct":null,"source_id":null},"category":"brain"},{"name":"cycle_freshness","status":"fail","message":"Source 'default' has never completed a full cycle; Source 'src-B' (src-B) last cycled 648h ago; Source 'artifacts-src' last cycled 649h ago; Source 'code-src-1' has never completed a full cycle; Source 'code-src-2' has never completed a full cycle; Source 'src-C' has never completed a full cycle. Run `gbrain dream --source <id>` for each stale source, or start `gbrain autopilot`.","category":"brain"},{"name":"content_hash_duplicates","status":"warn","message":"1 content-hash duplicate pair(s) detected (same content, differing slug forms — usually an import run from the wrong root, which drops the path prefix). Sample: <page-slug> <-> <page-slug>. Fix: gbrain pages delete <bare-slug> for each pair, then gbrain pages purge-deleted --older-than 0","details":{"pair_count":1,"hash_groups":1,"sample_pairs":["<page-slug> <-> <page-slug>"],"distinct_slug_group_count":0,"sample_distinct_slug_groups":[]},"category":"brain"},{"name":"code_chunk_metadata","status":"ok","message":"All code-page chunks carry symbol metadata","category":"brain"},{"name":"undeclared_db_only_pages","status":"warn","message":"298 DB page(s) have no backing file and sit outside every declared/default db_only path — invisible to file-lane backup/recovery. Sample: transcripts/<redacted> (src=default); <page-slug> (src=default); pricing-strategy-report (src=default); docs/ideas/loop-2026-07-17-summary (src=default); openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default). Fix: restore or export the files, or declare their prefixes under storage.db_only in gbrain.yml (derive-phase defaults already cover: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/)","details":{"total":298,"per_source":{"default":298},"sample_slugs":["transcripts/<redacted> (src=default)","<page-slug> (src=default)","pricing-strategy-report (src=default)","docs/ideas/loop-2026-07-17-summary (src=default)","openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default)"]},"category":"brain"},{"name":"db_only_collector_collision","status":"ok","message":"No configured collectors declare output paths","category":"ops"},{"name":"search_mode","status":"ok","message":"Mode: tokenmax with 1 per-key override(s) (search.reranker.enabled). To consolidate to the pure mode bundle: gbrain search modes --reset","category":"ops"},{"name":"hidden_by_search_policy","status":"ok","message":"No pages hidden by search-exclude policy.","details":{"prefixes":["test/","attachments/",".raw/"],"counts":{}},"category":"brain"},{"name":"eval_drift","status":"ok","message":"No retrieval-affecting files changed in working tree.","category":"brain"},{"name":"reranker_health","status":"ok","message":"Reranker disabled — no failures expected","category":"ops"},{"name":"batch_retry_health","status":"ok","message":"No exhausted batch retries in last 24h.","category":"ops"},{"name":"wedged_queue","status":"ok","message":"PGLite — no queue to check","category":"ops"},{"name":"orphaned_private_queue","status":"ok","message":"No orphaned private queues","category":"ops"},{"name":"autopilot_fanout_concurrency","status":"ok","message":"PGLite — single-writer, fan-out is 1","category":"ops"},{"name":"google_oauth","status":"ok","message":"no Google accounts connected (gbrain google connect to start)","category":"ops"},{"name":"graph_signals_coverage","status":"warn","message":"graph_signals enabled but only 0.7% of pages have inbound links (<10%). Signal will rarely fire. Fix: `gbrain extract all` to populate the link graph from frontmatter + markdown.","category":"brain"},{"name":"junk_entity_hubs","status":"ok","message":"No junk entity hubs (pages with <=2 chunks and >1000 edges)","category":"brain"},{"name":"brainstorm_health","status":"ok","message":"Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.","category":"ops"},{"name":"link_resolution_opportunity","status":"ok","message":"23 bare wikilink(s) found, but none have basename matches in the brain.","category":"brain"},{"name":"ze_embedding_health","status":"ok","message":"Configured embedding model \"openai:text-embedding-3-large\" is not ZeroEntropy — skip.","category":"ops"},{"name":"provider_sunset","status":"ok","message":"No configured provider has an announced shutdown (embedding: openai:text-embedding-3-large).","category":"ops"},{"name":"embedding_width_consistency","status":"ok","message":"Schema width (1536d) matches gateway embedding_dimensions","category":"brain"},{"name":"facts_embedding_width_consistency","status":"ok","message":"Skipped on PGLite (single bundled pgvector version).","category":"brain"},{"name":"source_routing_health","status":"warn","message":"1 non-default source(s) have zero pages: artifacts-src. If you've recently run `gbrain import --source-id <id>` against these, the writes may have silently fallen to the default source pre-v0.37.7.0. Re-run with --source-id; verify via `gbrain sources current --json`.","category":"brain"},{"name":"oauth_confidential_client_health","status":"ok","message":"3 OAuth client(s) registered; all auth shapes consistent","category":"ops"},{"name":"oauth_client_scope_health","status":"ok","message":"Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)","category":"ops"},{"name":"autopilot_lock_scope","status":"ok","message":"Lock path: C:/Users/<user>\\.gbrain\\autopilot.lock","category":"ops"},{"name":"stale_locks","status":"ok","message":"No stale locks (no rows with ttl_expires_at < NOW())","category":"ops"},{"name":"cycle_phase_scope","status":"ok","message":"Phase taxonomy: 12 source-scoped, 9 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: [resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, drift, skillopt, embed, orphans, purge]. Mixed: [synthesize, patterns].","details":{"phase_scope_map":{"lint":"source","backlinks":"source","sync":"source","synthesize":"mixed","extract":"source","extract_facts":"source","resolve_symbol_edges":"global","patterns":"mixed","recompute_emotional_weight":"source","consolidate":"source","propose_takes":"source","grade_takes":"global","calibration_profile":"global","drift":"global","embed":"global","orphans":"global","purge":"global","schema-suggest":"source","extract_atoms":"source","synthesize_concepts":"global","conversation_facts_backfill":"source","enrich_thin":"source","skillopt":"global"},"counts":{"source":12,"global":9,"mixed":2}},"category":"meta"},{"name":"embed_staleness","status":"warn","message":"450 stale chunks (small backlog)","category":"brain"},{"name":"entity_link_coverage","status":"ok","message":"No entity pages — coverage check vacuous","category":"brain"},{"name":"timeline_coverage","status":"ok","message":"No entity pages — coverage check vacuous","category":"brain"},{"name":"takes_count","status":"warn","message":"0 takes (takes.bootstrap_enabled is false; opt in to enable)","category":"brain"},{"name":"pack_upgrade_available","status":"ok","message":"Active pack gbrain-base-v2@1.2.0+1a2aee67 is current (no successor declared)","category":"meta"},{"name":"type_proliferation","status":"ok","message":"4 distinct typed values (pack declares 19)","category":"meta"},{"name":"dangling_aliases","status":"ok","message":"No dangling aliases","category":"brain"}],"top_issues":[{"name":"sync_freshness","status":"fail","tier":"root","fix":"Source 'default' has never been synced; Source 'src-C' last synced 23d ago — brain search is stale!; Source 'src-B' (src-B) last synced 23d ago — brain search is stale!; Source 'code-src-1' last synced 23d ago — brain search is stale!; Source 'code-src-2' last synced 63h ago. Run `gbrain sync --source <id>` for each stale source"},{"name":"cycle_freshness","status":"fail","tier":"symptom","fix":"Source 'default' has never completed a full cycle; Source 'src-B' (src-B) last cycled 648h ago; Source 'artifacts-src' last cycled 649h ago; Source 'code-src-1' has never completed a full cycle; Source 'code-src-2' has never completed a full cycle; Source 'src-C' has never completed a full cycle. Run `gbrain dream --source <id>` for each stale source, or start `gbrain autopilot`."},{"name":"sync_failures","status":"fail","tier":"symptom","fix":"2 unresolved sync failure(s). source=src-C path=<path> code=revision_conflict: A page changed after this sync cursor was enumerated. request=<not-admitted> run=291ee19d-34d8-4732-b2d5-c391483b31bc target=02b71b09f0641d5590a0f4c0e2369c8b6e92b7fd; source=src-B path=<discovery> code=page_identity_changed: A different origin occupies the imported slug. request=<not-admitted> run=eb9056d3-601b-4e85-8225-0c85a7bf9862 target=6e406040f200f4cc3464b399f0faa812ca6018a4 Fix the cause, then run gbrain sync --no-pull --retry-failed with the same source and options. Completed full runs do not resolve a different unfinished cursor."},{"name":"backup_coverage","status":"warn","tier":"symptom","fix":"0 knowledge asset(s) have no git remote: . Current recovery is not verified for all repositories. Run `gbrain backup status` for fix commands (`gbrain bootstrap repo` / `git remote add origin <url>` / `gbrain sources harden <id>`)."},{"name":"brain_score","status":"warn","tier":"symptom","fix":"Brain score 44/100 (embed 34/35, links 0/25, timeline density (all pages) 0/15, orphans 0/15, dead-links 10/10)"},{"name":"content_hash_duplicates","status":"warn","tier":"symptom","fix":"1 content-hash duplicate pair(s) detected (same content, differing slug forms — usually an import run from the wrong root, which drops the path prefix). Sample: <page-slug> <-> <page-slug>. Fix: gbrain pages delete <bare-slug> for each pair, then gbrain pages purge-deleted --older-than 0"},{"name":"embed_staleness","status":"warn","tier":"symptom","fix":"450 stale chunks (small backlog)"},{"name":"extract_atoms_backlog","status":"warn","tier":"symptom","fix":"gbrain dream --phase extract_atoms --drain --source src-B --window 120 (repeat for backlog source(s): src-B, default; or declare extract_atoms in your active schema pack)"},{"name":"graph_signals_coverage","status":"warn","tier":"symptom","fix":"graph_signals enabled but only 0.7% of pages have inbound links (<10%). Signal will rarely fire. Fix: `gbrain extract all` to populate the link graph from frontmatter + markdown."},{"name":"links_extraction_lag","status":"warn","tier":"symptom","fix":"1092/1603 pages (68%) have un-extracted edges. Run: gbrain extract --stale"},{"name":"oversized_pages","status":"warn","tier":"symptom","fix":"1 page(s) exceed 500000-byte block threshold. Top: <page-slug> (582281b, src=code-src-1). New ingests with the same shape get frontmatter.embed_skip set automatically; existing oversized pages can be split or accepted as non-embeddable."},{"name":"pglite_scale","status":"warn","tier":"symptom","fix":"PGLite brain has 1603 pages (threshold 1000). Postgres gives faster search and concurrent access at this size. Move when ready: gbrain migrate --to supabase --url <postgres-conn> (the postgres-adopt skill walks it)."},{"name":"retrieval_reflex_health","status":"warn","tier":"symptom","fix":"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":"skill_preconditions","status":"warn","tier":"symptom","fix":"1 unmet skill precondition(s):\n skill-autobench: dir:conversations/ — populate conversations/ (see the conversation-archive skill), then re-run"},{"name":"skills_manifest_integrity","status":"warn","tier":"symptom","fix":"skills/ drifted from skills.lock.json (advisory — local edits are fine): 51 modified (_brain-filing-rules.json, academic-verify/routing-eval.jsonl, archive-crawler/routing-eval.jsonl, article-enrichment/routing-eval.jsonl, blog-ingest/routing-eval.jsonl, … +46 more). If intentional, regenerate: bun run scripts/generate-skills-manifest.ts"},{"name":"source_routing_health","status":"warn","tier":"symptom","fix":"1 non-default source(s) have zero pages: artifacts-src. If you've recently run `gbrain import --source-id <id>` against these, the writes may have silently fallen to the default source pre-v0.37.7.0. Re-run with --source-id; verify via `gbrain sources current --json`."},{"name":"takes_count","status":"warn","tier":"symptom","fix":"0 takes (takes.bootstrap_enabled is false; opt in to enable)"},{"name":"undeclared_db_only_pages","status":"warn","tier":"symptom","fix":"298 DB page(s) have no backing file and sit outside every declared/default db_only path — invisible to file-lane backup/recovery. Sample: transcripts/<redacted> (src=default); <page-slug> (src=default); pricing-strategy-report (src=default); docs/ideas/loop-2026-07-17-summary (src=default); openspec/specs/vocalforge-instrumentforge-soloforge/spec (src=default). Fix: restore or export the files, or declare their prefixes under storage.db_only in gbrain.yml (derive-phase defaults already cover: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/)"}],"engine":"pglite","db_url_source":null}I'll retest on 1.91.122.0 and report back before 2026-10-31 if the original error still reproduces.
frobinson47 commentedon Oct 18, 2026
Follow-up with more detail on the original error, from other sessions on the same machine (Windows, PGLite). Session notes from before today are marked as such; the last point I re-checked today.
What I believe the original error was. On 2026-09-21 (gbrain 0.51.0.0) the same
"This file belongs to a managed canonical worktree."message also blocked both markdown and--strategy codesync on a second source that is registered with--pathat a live working directory, on a source that had synced fine hours earlier. What we found:gbrain sources writer status|claim|activate|transfer) held a server-side binding for that worktree, keyed by itslocal_path.gbrain sources detach(dropping the local.gbrain-sourcepin) did not clear it.gbrain sources writer statusshowedenabled: falseat the top level, yet the binding still gatedsync. This matches what the original report saw (writer system disabled, zero registered worktrees).default, whoselocal_pathis NULL by design. We claimed it against a small marker directory outside~/.gbrain; a path inside~/.gbrainconflicts with the coordination lock files.The message changed after a self-upgrade. After
gbrain self-upgradefrom 0.51.0.0 to 0.51.6.0 the generic text was replaced with an actionable one:"Managed sync requires --no-pull; Git pull/rebase needs an explicit drained maintenance window."Adding--no-pulltogbrain sync --strategy codethen worked (session note, 2026-09-21). Re-checked today on 0.56.1.0: the same message appeared verbatim on a fresh managed source, and--no-pullresolved it.So my current guess is that the original error is fixed from 0.51.6.0 onward, because the cryptic text became a clear instruction, and that it only ever surfaced on sources registered against a live working tree. I have not reproduced the original text on a recent version, I have not retested on gstack v1.91.122.0, and I can't rule out that the original source still behaves differently. I will still retest as promised before 2026-10-31.
Two other things from those same sessions that may belong in the gbrain repo, in case they are useful:
gbrain syncdelegating to a livegbrain serveover IPC failed withstorage_error: "The persistence owner could not complete this request."on 0.51.0.0 and 0.51.6.0 (workaround: stop the server and use--no-pull --no-delegate), and the sync bookmark is shared across--strategyvalues, so syncing one strategy first makes the other report "up to date" without importing its files.