Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
chore(schema): upstream observation columns keep upgrade column order; regenerate goldens, flag registry, llms
garrytana51d3c1f6504
diff --git a/docs/architecture/canonical-writers.tsv b/docs/architecture/canonical-writers.tsvindex 42c4b63f99..8065afb9d4 100644--- a/docs/architecture/canonical-writers.tsv+++ b/docs/architecture/canonical-writers.tsv@@ -123,7 +123,7 @@ src/commands/files.ts 0 filesystem_guard Attachment copying, redirection, restorsrc/commands/schema.ts 0 filesystem_guard Schema manifest scaffolding and forks check managed roots before creating files; separate config settings are control data.src/core/ingestion/sources/inbox-folder.ts 0 filesystem_guard Inbox archive moves refuse managed canonical input paths before emitting the event or moving source bytes.src/core/persistence/links-preparation.ts 2 coordinator Automatic graph projections publish inside canonical page transactions; delayed reconciliation locks all affected page keys and compares the originating revision.-src/core/persistence/sync-prepare.ts 7 coordinator Managed imports and deletes validate the recorded raw file hash plus enumerated page identity/revision; a managed rename moves the page with updateSlug and re-infers an implicit type inside the same journal publication after the renamed page's identity and revision are rechecked; the source-exclusive final checkpoint requires every selected receipt to be committed. Its importFromContent calls carry prepare and run inside the coordinator publication.+src/core/persistence/sync-prepare.ts 8 coordinator Managed imports and deletes validate the recorded raw file hash plus enumerated page identity/revision; a managed rename moves the page with updateSlug and re-infers an implicit type inside the same journal publication after the renamed page's identity and revision are rechecked; the source-exclusive final checkpoint requires every selected receipt to be committed. Its importFromContent calls carry prepare and run inside the coordinator publication. The checkpoint also stamps sources.chunker_version after a full walk (#5566), inside the same source-exclusive publication; the column is outside managed_writer_guard's protected checkpoint tuple.src/commands/enrich.ts 0 coordinator A managed brain preflights maintenance authority before any model spend and publishes each enriched page through publishMaintenancePage; unmanaged enrichment writes through the put_page operation.src/core/persistence/source-lifecycle.ts 6 coordinator Native affected roots precede topology, source, principal and receipt guards; every shared-root generation and old queued intent changes together.src/core/persistence/topology-recovery.ts 2 coordinator Verified directory-swap recovery checks source incarnation, current logical manifest and physical identity before topology commitment; permanent receipt IDs survive deletion.@@ -198,4 +198,5 @@ src/core/repair/extractor-facts.ts 1 coordinator `gbrain repair extractor-facts`src/core/persistence/atom-maintenance.ts 1 coordinator A managed atom retirement stamps retired_by/retired_at on the tombstone inside the coordinator publication of its managed_atom_delete request, after the page deletion path removed the canonical file, so the database row and file change commit or roll back together.src/core/repair/stale-atoms.ts 2 coordinator gbrain repair stale-atoms retires an atom on a managed brain through a managed_maintenance_retire_stale_atoms coordinated request (the marker stamp runs in its publication); only an unmanaged brain soft-deletes and stamps in a direct page-locked transaction, where no canonical writer enforcement applies.src/commands/sources-mirror.ts 1 engine_guard `gbrain sources mirror-readonly|mirror-writable` (#5409) updates only sources.config.mirror_read_only, exactly as `sources federate` updates sources.config.federated; the sources managed_writer_guard trigger governs the row and no page, fact or file is written.+src/core/sync-upstream.ts 1 engine_guard `recordUpstreamObservation` (#5255/#5176) updates only sources.upstream_checked_at, upstream_commit and upstream_behind, observations of the checkout's Git upstream outside managed_writer_guard's protected topology and checkpoint tuples; no page, fact or file is written, and a failure never fails the sync.src/core/persistence/mirror-read-only.ts 1 coordinator classifyMirrorPage stamps pages.database_only_reason=mirror_read_only only inside the coordinator publication transaction of a page write that published no file into a read-only mirror source (#5409), as classifyUnboundPage does for unbound sources.diff --git a/llms-full.txt b/llms-full.txtindex 53d90d6a17..a8df250308 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -9576,11 +9576,15 @@ of making a duplicate.| `targets_parked` (doctor: `parked_effects`) | effect `error_code` | A Git backup or withdrawal target failed five times in a row and was set aside so the other pages keep committing. An effect `error_code` of `git_index_stale` means an index lock older than 10 minutes blocks the checkout: `.git/index.lock` in it (`git -C <checkout> rev-parse --git-path index.lock` for a linked worktree). Remove it only if no git command is running there, then run the `retry-effects` command. A fresher lock (`git_index_locked`) is retried as contention and never parks. The page write itself committed; its Git backup or withdrawal is incomplete. Contention, dependency waits, shutdown and transient database errors never count toward the five. | `gbrain sources writer status <source>`, fix the cause it names, preview with `gbrain sources writer retry-effects <source> --request-id <id> --dry-run`, then run it without `--dry-run`. Each run grants one more attempt per parked target; a target that fails again parks again. || <a id="writer_admin_locked"></a>`writer_admin_locked` | `writer_admin_locked` | The operator set the brain's writer admin lock (`gbrain sources writer lock`), so writer claim, activate, transfer prepare and transfer accept refuse for every caller. Ordinary writes are not affected. | Agents: stop and ask the operator; do not unlock it yourself. The operator runs, on the brain host, `gbrain sources writer unlock`, re-reads `gbrain sources writer status <source> --json`, administers, then `gbrain sources writer lock` again. See the [writer admin lock](../architecture/topologies.md#writer-admin-lock). || <a id="writer_not_quiesced"></a>`writer_not_quiesced` | `writer_not_quiesced` | Activation found an older writer, a legacy lock, or queued, running or recovering work. When work blocks it, the message names the blocking effect id, kind, source, page and request id. | Stop the writers named in the [claim and activate runbook](../architecture/topologies.md#claim-and-activate-runbook), inspect the named work with `gbrain sources writer status <source> --json`, let it finish, then retry. A committed write whose embedding effect is stuck queued or failed is settled by `gbrain repair embedding-effects --source <source>` (preview), then the same command with `--apply`; see [stale queued embedding effects](repair.md#stale-queued-embedding-effects). |+| <a id="activation_source_path_missing"></a>`source_path_missing` | `source_changed` | `gbrain sources writer activate` (with or without `--dry-run`) found a source whose recorded `local_path` no longer exists on this host, for example a checkout that lived in a temporary directory. Activation cannot verify that source's canonical directory, so nothing changed. The message names the source and the missing path. Claiming the source at another directory does not help while the stale path stays recorded. | Run the command the suggestion prints: `gbrain sources set-path <source> <directory>` to point the source at its checkout (the suggestion fills in the claimed directory when the source is claimed), or `gbrain sources remove <source> --confirm-destructive` when the source is no longer needed (`gbrain sources archive <source>` keeps a 72-hour grace period). Then `gbrain sources writer activate --confirm-quiesced --dry-run` and activate. |+| <a id="source_checkout_missing"></a>canonical checkout missing | `recovery_required` | A managed source lifecycle command (`gbrain sources archive`, `remove`, `purge`, `restore`, `rebind`) found that the source's canonical checkout directory was deleted out of band. A source with **no pages** that is the **only** source on that checkout is retired anyway: archive, remove and purge succeed and the receipt records `retired_without_checkout` with the missing path. Otherwise nothing changed; the message names the path, the page count and how many other sources share the checkout. Recreating an empty directory at the same path does not help (its physical identity differs). | Restore the checkout (for example from a backup) and retry. If it is gone for good, switch the brain to classic mode with `gbrain sources writer deactivate --dry-run`, then the printed `apply_command` (see the [deactivate runbook](../architecture/topologies.md#deactivate-runbook)), and retire the source there with `gbrain sources archive <source>`. || <a id="migrations_running"></a>`migrations_running` | `migrations_running` (exit 75) | `gbrain apply-migrations` (or the post-upgrade step of `gbrain upgrade`) found another runner holding the brain's orchestration lock and stopped before touching the migration ledger, so migrations never run twice in parallel. The message names the holder's host and pid. A holder that died is taken over automatically on the next run. `gbrain upgrade` reports this as `Migrations: running`, not as a failed upgrade. | Wait for the other run to finish; `gbrain doctor` shows migration progress. Then `gbrain apply-migrations --yes` confirms everything is applied. || <a id="writer_deactivate"></a>`writer_deactivate` blockers | `writer_not_quiesced`, `writer_admin_locked`, `writer_admin_state_changed`, `writer_lock_unavailable` | `gbrain sources writer deactivate` found pending work (a queued, running or recovering write, a topology change or effect that is not settled, a held connector item, or a live connector or maintenance lease), the writer admin lock, a changed admin state, or a local process holding a worktree lock. Nothing changed. The suggestion names each blocker and its exit. | Run `gbrain sources writer deactivate --dry-run` for the full list, run each named exit (`gbrain cancel-write-request <request_id>`, `gbrain sync --source <id> --no-pull --retry-failed`, `gbrain repair embedding-effects --source <id>`, `gbrain sources writer retry-effects <source> --request-id <id> --dry-run`, `gbrain sources writer unlock`, `gbrain sources retry-held <id>`), then deactivate again with a fresh `--expected-state` from `gbrain sources writer status --json`. See the [deactivate runbook](../architecture/topologies.md#deactivate-runbook). || unknown option (repair) | `invalid_params` | `gbrain repair` refuses any option it does not list, so a mistyped flag or `--max-usd` never runs a repair silently without it. | Fix the option (`gbrain repair --help`). To cap paid repair work, run `gbrain doctor --remediate --yes --include-repairs --max-usd <n>`. || <a id="colon_slug_windows_write_through"></a>`colon_slug_windows_write_through` | `colon_slug_windows_write_through` | A page slug such as `calendar:abc` is valid, but its canonical file name would contain `:`, which Windows cannot store (it names an alternate data stream). On Windows, a write that would publish that file is refused before admission, and `gbrain sync` skips each such file with this reason instead of failing the run. Database-only writes of the same slug (no repo configured, `sync.write_through` off, an unbound source, or a [read-only mirror](multi-source-brains.md#read-only-mirror-sources) source and pages created while it was one) still succeed, and macOS and Linux are unchanged. | Use a slug without `:` (the suggestion names one), or write the page from a macOS or Linux host that owns the source. For a skipped sync file, rename it without `:` on a macOS or Linux checkout, commit, then run `gbrain sync --source <source> --no-pull` on the Windows host. || <a id="embedding_auth_failed"></a>`embedding_auth_failed` | `embedding_auth_failed` | The embedding provider rejected the configured key (HTTP 401 or 403). Printed once per process on stderr, naming the key source in effect: an environment variable (for example `OPENAI_API_KEY`, which wins over the config key) or the config key in `~/.gbrain/config.json`. No key or part of one is printed. | Environment key in effect but the config key is right: remove the variable from the environment of the process that reported it (shell profile, `~/.gbrain/.env`, or a daemon's service definition) and restart that process. Environment key intended: replace it with a valid key, restart, and run `gbrain config unset openai_api_key` (or the matching key). Config key in effect: `gbrain config set openai_api_key <valid key>`. Then `gbrain embed --stale` embeds what was saved meanwhile. `gbrain doctor` (`embedding_key_source`) shows the key source in doctor's own environment. |+| <a id="managed_pull_skipped"></a>`managed_pull_skipped` (cycle warn); doctor `sync_freshness` "upstream unknown" or "upstream N commit(s) ahead" | `managed_pull_skipped` | A managed brain never runs `git pull` inside a cycle: Git pull needs an explicit drained maintenance window, so an explicit `gbrain sync` without `--no-pull` is refused with `writer_coordinator_required`. An unattended cycle asked to pull (autopilot passes `pull: true`, `gbrain dream --pull`) instead syncs the checkout as it is and reports it: the sync phase result carries `details.upstream_refresh` (`pulled`, `failed`, `skipped_managed` or `not_requested`), and when the checkout tracks an upstream the phase is `warn` with `details.warning` (`code`, `cause`, `fix`, `docs`). Every sync also records the checkout's last upstream observation (the upstream commit, when it was last fetched or pushed, and how many upstream commits the synced commit lacks) in the source row. Doctor `sync_freshness` reports that separately from the local projection: a source with a `remote_url` whose observation is missing or older than 24 hours is "upstream unknown", and any source whose observation saw upstream commits it has not synced is "behind"; neither is reported fresh. `details.upstream_unknown_count` and `details.upstream_behind_count` count them. | For a source whose remote is authoritative (it never receives brain writes you need as files), make it a [read-only mirror](multi-source-brains.md#read-only-mirror-sources) once, then advance it and sync without pulling: `gbrain sources mirror-readonly <source> && git -C <checkout> pull --ff-only && gbrain sync --source <source> --no-pull`. The printed `fix` fills in the real source and checkout. On a brain that is not managed, `gbrain sync --source <source>` pulls and records the observation. A coordinated in-gbrain fast-forward refresh is planned; until then this is the supported sequence. |+| <a id="facts_absorb_write_refused"></a>`facts_absorb_write_refused (<code>)`; `ingest_log` `write_refused: <code> …` | `facts_absorb_write_refused` | A durable `facts-absorb` job extracted facts but the write path refused to store them, for example `writer_coordinator_required` because the entity's Markdown file sits in a claimed canonical worktree before `sources writer activate`, or `permission_denied`, `invalid_params` or `writer_registration_required`. These refusals do not change on retry, so the job goes straight to `dead` on its first attempt instead of re-running inference; the `facts:absorb` row in `ingest_log` (and doctor `facts_extraction_health`) records `write_refused` with the real code, not a provider failure. The source page itself was already saved. | Fix the named cause first: `gbrain sources writer status <source>`, then finish the [claim and activate runbook](../architecture/topologies.md#claim-and-activate-runbook) for a claimed worktree, or fix the grant. Then `gbrain jobs retry <job id>` (the error names the id). |### Other error codesdiff --git a/scripts/build-schema.ts b/scripts/build-schema.tsindex 0d5d0a9910..649d7c3287 100644--- a/scripts/build-schema.ts+++ b/scripts/build-schema.ts@@ -367,6 +367,9 @@ const MIGRATION_TIMING = 'PGLite gets it later from its migration, so fresh PGLiexport const PGLITE_RULES: readonly Rule[] = [{ id: 'extension:pgcrypto', reason: 'PGLite ships no pgcrypto; gen_random_uuid() is core', action: 'drop' },{ id: 'table:sources', reason: `sources.chunker_version: ${MIGRATION_TIMING}`, action: omitColumns('chunker_version') },+ { id: 'add-column:sources.upstream_checked_at', reason: MIGRATION_TIMING, action: 'drop' },+ { id: 'add-column:sources.upstream_commit', reason: MIGRATION_TIMING, action: 'drop' },+ { id: 'add-column:sources.upstream_behind', reason: MIGRATION_TIMING, action: 'drop' },{ id: 'index:pages_generation_idx', reason: MIGRATION_TIMING, action: 'drop' },{ id: 'index:idx_pages_updated_at_desc', reason: MIGRATION_TIMING, action: 'drop' },{diff --git a/src/core/cli-flag-registry.generated.ts b/src/core/cli-flag-registry.generated.tsindex 6b9da0a73d..2c2ffaf7c3 100644--- a/src/core/cli-flag-registry.generated.ts+++ b/src/core/cli-flag-registry.generated.ts@@ -46,7 +46,7 @@ export const CLI_FLAG_REGISTRY: Record<string, readonly string[]> = {'creds': ['--allow-create-db', '--allow-docker', '--brain', '--chat-model', '--content-root', '--db-only', '--embedding-dimensions', '--embedding-model', '--entity', '--expansion-model', '--force', '--git', '--grant-types', '--help', '--http', '--ids', '--issuer-url', '--json', '--key', '--local-postgres', '--mcp-only', '--mcp-url', '--migrate-only', '--model', '--no-embedding', '--no-git', '--non-interactive', '--oauth-client-id', '--oauth-client-secret', '--out', '--passphrase-env', '--path', '--pglite', '--prefer-postgres', '--provenance', '--provider', '--schema-pack', '--scopes', '--skip-embed-check', '--source', '--status', '--supabase', '--surface', '--to', '--url', '--version'],'db-repair': ['--apply', '--apply-rewrites', '--brain', '--break-lock', '--db-url', '--dry-run', '--filter', '--force', '--force-retry', '--format', '--help', '--json', '--locks', '--name', '--path', '--prefer-postgres', '--remediate', '--restart', '--skip-verify', '--source', '--supabase', '--undo-last-rewrite', '--url', '--version', '--yes'],'decide': ['--all', '--all-from', '--brain', '--call-site', '--dataset', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--from', '--help', '--input', '--json', '--limit', '--min', '--out', '--provider', '--query', '--recommended', '--shadow', '--since', '--slot', '--source', '--status', '--suite', '--target', '--threshold', '--what-if-threshold', '--yes'],- 'doctor': ['--abbrev-ref', '--abort', '--admin-intent', '--all', '--all-from', '--allow-old-serve', '--allow-shell-jobs', '--allow-unverified-remote', '--apply', '--apply-rewrites', '--auto', '--auto-fix', '--background', '--brain', '--branch', '--break-lock', '--by-mention', '--cached', '--call-site', '--check', '--concurrency', '--confidence', '--confirm', '--content-audit', '--count', '--dataset', '--db-url', '--delete-brain', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--env', '--exclude', '--exclude-standard', '--exit-code', '--expect', '--expected-epoch', '--expected-state', '--explain', '--fast', '--federated-read', '--file', '--fix', '--follow', '--force', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from', '--from-pages', '--full', '--gbrain-bin', '--get', '--get-url', '--git-dir', '--git-path', '--harness', '--help', '--home', '--http', '--id', '--ignore-env-override', '--include-ambiguous', '--include-flagged', '--include-gitignored', '--include-hidden', '--include-pseudo', '--include-repairs', '--index-audit', '--init', '--input', '--install', '--is-ancestor', '--is-inside-work-tree', '--job-isolation', '--jq', '--json', '--lang', '--limit', '--link-source', '--link-type', '--local', '--locks', '--log-noop', '--manifest', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-usd', '--mcp-only', '--migrate-only', '--min', '--mode', '--multimodal', '--name', '--name-only', '--nice', '--no-autopilot-install', '--no-capture', '--no-cron', '--no-embed', '--no-embedding', '--no-extract', '--no-hooks', '--no-migrate', '--no-pull', '--no-schema-pack', '--no-tags', '--no-verify', '--no-write-fetch-head', '--older-than', '--once', '--others', '--out', '--overwrite', '--parallel', '--params', '--pat-file', '--path', '--pglite', '--phase', '--pid-file', '--porcelain', '--port', '--prefer-postgres', '--preset', '--preview', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--provider', '--prune-orphans', '--pure', '--push', '--push-only', '--query', '--queue', '--quiet', '--reauth', '--rebase', '--recommended', '--refresh', '--regenerate', '--reissue', '--remediate', '--remediation-plan', '--remove', '--repo', '--request-id', '--reranker', '--reset', '--reset-checkpoint', '--restore-only', '--resume', '--retry-failed', '--review-lower', '--scope', '--scopes', '--select', '--self-transfer', '--session', '--set', '--shadow', '--short', '--show-current', '--show-token', '--show-toplevel', '--since', '--skills', '--skills-dir', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--skip-verify', '--slot', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--status', '--strategy', '--strict', '--suite', '--supabase', '--surface', '--symbol-kind', '--target', '--target-score', '--threshold', '--timeout', '--to', '--token', '--token-name', '--token-ttl', '--top-k', '--type', '--unsafe-bypass-dream-guard', '--unset-all', '--untracked-files', '--url', '--user', '--vectors', '--verbose', '--verify', '--version', '--what-if-threshold', '--window', '--workers', '--working-tree', '--yes'],+ 'doctor': ['--abbrev-ref', '--abort', '--admin-intent', '--all', '--all-from', '--allow-old-serve', '--allow-shell-jobs', '--allow-unverified-remote', '--apply', '--apply-rewrites', '--auto', '--auto-fix', '--background', '--brain', '--branch', '--break-lock', '--by-mention', '--cached', '--call-site', '--check', '--concurrency', '--confidence', '--confirm', '--content-audit', '--count', '--dataset', '--db-url', '--delete-brain', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--egress', '--embedding-dimensions', '--embedding-model', '--env', '--exclude', '--exclude-standard', '--exit-code', '--expect', '--expected-epoch', '--expected-state', '--explain', '--fast', '--federated-read', '--ff-only', '--file', '--fix', '--follow', '--force', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from', '--from-pages', '--full', '--gbrain-bin', '--get', '--get-url', '--git-dir', '--git-path', '--harness', '--help', '--home', '--http', '--id', '--ignore-env-override', '--include-ambiguous', '--include-flagged', '--include-gitignored', '--include-hidden', '--include-pseudo', '--include-repairs', '--index-audit', '--init', '--input', '--install', '--is-ancestor', '--is-inside-work-tree', '--job-isolation', '--jq', '--json', '--lang', '--limit', '--link-source', '--link-type', '--local', '--locks', '--log-noop', '--manifest', '--markdown', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-usd', '--mcp-only', '--migrate-only', '--min', '--mode', '--multimodal', '--name', '--name-only', '--nice', '--no-autopilot-install', '--no-capture', '--no-cron', '--no-embed', '--no-embedding', '--no-extract', '--no-hooks', '--no-migrate', '--no-pull', '--no-schema-pack', '--no-tags', '--no-verify', '--no-write-fetch-head', '--older-than', '--once', '--others', '--out', '--overwrite', '--parallel', '--params', '--pat-file', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--porcelain', '--port', '--prefer-postgres', '--preset', '--preview', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--provider', '--prune-orphans', '--pure', '--push', '--push-only', '--query', '--queue', '--quiet', '--reauth', '--rebase', '--recommended', '--refresh', '--regenerate', '--reissue', '--remediate', '--remediation-plan', '--remove', '--repo', '--request-id', '--reranker', '--reset', '--reset-checkpoint', '--restore-only', '--resume', '--retry-failed', '--review-lower', '--scope', '--scopes', '--select', '--self-transfer', '--session', '--set', '--shadow', '--short', '--show-current', '--show-token', '--show-toplevel', '--since', '--skills', '--skills-dir', '--skip-bare-tweet', '--skip-failed', '--skip-urls', '--skip-verify', '--slot', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--status', '--strategy', '--strict', '--suite', '--supabase', '--surface', '--symbol-kind', '--symbolic-full-name', '--target', '--target-score', '--threshold', '--timeout', '--to', '--token', '--token-name', '--token-ttl', '--top-k', '--type', '--unsafe-bypass-dream-guard', '--unset-all', '--untracked-files', '--url', '--user', '--vectors', '--verbose', '--verify', '--version', '--what-if-threshold', '--window', '--workers', '--working-tree', '--yes'],'dream': ['--audit-rejects', '--brain', '--cancel-unmatched', '--date', '--dir', '--drain', '--dry-run', '--eval-run', '--force', '--force-retry', '--from', '--help', '--input', '--install', '--json', '--limit', '--list', '--max-usd', '--once', '--path', '--phase', '--pull', '--reconcile-queue', '--since', '--source', '--source-id', '--threshold', '--to', '--unsafe-bypass-dream-guard', '--window', '--yes'],'edges-backfill': ['--all-sources', '--brain', '--concurrency', '--help', '--json', '--max-chunks', '--source', '--workers'],'embed': ['--all', '--background', '--batch-size', '--brain', '--break-lock', '--budget-ms', '--catch-up', '--db-url', '--dim', '--dry-run', '--embedding-dimensions', '--embedding-model', '--explain', '--facts', '--follow', '--force', '--help', '--images', '--include-null-signature', '--json', '--max-cost-usd', '--max-facts', '--no-embed', '--no-embedding', '--pace', '--pace-max-concurrency', '--path', '--pglite', '--priority', '--progress-interval', '--progress-json', '--quiet', '--show-toplevel', '--slugs', '--source', '--stale', '--status', '--supabase', '--timeout', '--to', '--yes'],@@ -118,7 +118,7 @@ export const CLI_FLAG_REGISTRY: Record<string, readonly string[]> = {'status': ['--abbrev-ref', '--all', '--allow-empty', '--brain', '--break-lock', '--cached', '--concurrency', '--confirm-destructive', '--deadline-ms', '--diff-filter', '--empty', '--exclude', '--exclude-standard', '--fast', '--filters', '--fix', '--force-break-lock', '--format', '--full', '--full-history', '--hard-deadline', '--help', '--include-gitignored', '--include-hidden', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--max-age', '--max-sources', '--mcp-only', '--missing-path', '--name-only', '--no-auto-embed', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-pull', '--no-renames', '--no-schema-pack', '--no-verify', '--others', '--parallel', '--path', '--priority', '--quiet', '--repo', '--reset-checkpoint', '--retry-failed', '--section', '--serial', '--show-toplevel', '--skip-failed', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--strategy', '--timeout', '--url', '--verify', '--watch', '--workers', '--working-tree', '--yes'],'storage': ['--brain', '--fix', '--help', '--json', '--repo', '--restore-only', '--source', '--to'],'sweep': ['--background', '--batch-limit', '--brain', '--budget-ms', '--delete-brain', '--explain', '--follow', '--help', '--home', '--json', '--no-delegate', '--once', '--progress-interval', '--progress-json', '--quiet', '--source', '--timeout'],- 'sync': ['--abbrev-ref', '--abort', '--account', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--by-mention', '--cached', '--catch-up', '--concurrency', '--confirm-destructive', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--exclude', '--exclude-standard', '--expect', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--hard-deadline', '--harness', '--help', '--home', '--http', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lang', '--link-source', '--link-type', '--locks', '--log-noop', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-only', '--missing-path', '--multimodal', '--name-only', '--name-status', '--ner', '--no-auto-embed', '--no-autopilot-install', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-pull', '--no-recurse-submodules', '--no-renames', '--no-schema-pack', '--no-verify', '--older-than', '--others', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--parallel', '--params', '--path', '--pglite', '--phase', '--pid-file', '--porcelain', '--prefer-postgres', '--preview', '--priority', '--probe-pglite', '--progress-interval', '--progress-json', '--prune-orphans', '--query', '--queue', '--quiet', '--reauth', '--rebase', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--restore-only', '--resume', '--retry-failed', '--scope', '--scopes', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip-failed', '--slot', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--target', '--target-score', '--timeout', '--to', '--top-k', '--type', '--url', '--verbose', '--verify', '--version', '--watch', '--window', '--workers', '--working-tree', '--yes'],+ 'sync': ['--abbrev-ref', '--abort', '--account', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--by-mention', '--cached', '--catch-up', '--concurrency', '--confirm-destructive', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--exclude', '--exclude-standard', '--expect', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--hard-deadline', '--harness', '--help', '--home', '--http', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lang', '--link-source', '--link-type', '--locks', '--log-noop', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-only', '--missing-path', '--multimodal', '--name-only', '--name-status', '--ner', '--no-auto-embed', '--no-autopilot-install', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-pull', '--no-recurse-submodules', '--no-renames', '--no-schema-pack', '--no-verify', '--older-than', '--others', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--parallel', '--params', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--porcelain', '--prefer-postgres', '--preview', '--priority', '--probe-pglite', '--progress-interval', '--progress-json', '--prune-orphans', '--query', '--queue', '--quiet', '--reauth', '--rebase', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--restore-only', '--resume', '--retry-failed', '--scope', '--scopes', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip-failed', '--slot', '--slugs', '--source', '--source-id', '--src-subpath', '--stale', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--symbolic-full-name', '--target', '--target-score', '--timeout', '--to', '--top-k', '--type', '--url', '--verbose', '--verify', '--version', '--watch', '--window', '--workers', '--working-tree', '--yes'],'takes': ['--accept', '--batch-size', '--brain', '--bucket-size', '--by', '--claim', '--dim', '--dir', '--domain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--evidence', '--expected-revision', '--expired', '--force', '--from-pages', '--help', '--holder', '--include-covered', '--json', '--kind', '--limit', '--max-pages', '--no-embed', '--no-embedding', '--offset', '--outcome', '--pglite', '--quality', '--reject', '--request-id', '--row', '--semantic', '--since', '--sort', '--source', '--source-id', '--stale', '--status', '--supabase', '--to', '--unit', '--until', '--value', '--weight', '--who', '--yes'],'think': ['--anchor', '--brain', '--calibration-holder', '--help', '--json', '--mcp-only', '--model', '--rounds', '--save', '--since', '--source', '--take', '--until', '--with-calibration'],'transcripts': ['--all', '--all-discovery', '--background', '--brain', '--days', '--dry-run', '--embed', '--explain', '--facts', '--follow', '--format', '--full', '--help', '--include-self', '--json', '--limit', '--max-bytes', '--max-cost-usd', '--progress-interval', '--progress-json', '--quiet', '--since', '--source', '--source-id', '--timeout'],diff --git a/src/core/pglite-schema.generated.ts b/src/core/pglite-schema.generated.tsindex e1773e0468..7317984b02 100644--- a/src/core/pglite-schema.generated.ts+++ b/src/core/pglite-schema.generated.ts@@ -28,9 +28,6 @@ CREATE TABLE IF NOT EXISTS sources (contextual_retrieval_mode TEXT,trust_frontmatter_overrides BOOLEAN NOT NULL DEFAULT false,newest_content_at TIMESTAMPTZ,- upstream_checked_at TIMESTAMPTZ,- upstream_commit TEXT,- upstream_behind INTEGER,created_at TIMESTAMPTZ NOT NULL DEFAULT now());@@ -1736,6 +1733,7 @@ DO \$rls\$ BEGINEND IF;END \$rls\$;+`;export function getPGLiteSchema(diff --git a/src/core/schema-embedded.generated.ts b/src/core/schema-embedded.generated.tsindex d10e801e15..cff4fcc986 100644--- a/src/core/schema-embedded.generated.ts+++ b/src/core/schema-embedded.generated.ts@@ -58,12 +58,6 @@ CREATE TABLE IF NOT EXISTS sources (-- of shelling out to git on a DB-supplied local_path, preserving the-- v0.41.27.0 trust boundary. NULL → reader falls back to wall-clock.newest_content_at TIMESTAMPTZ,- -- #5255/#5176 (O-DX-8): last upstream observation, recorded by sync from the- -- checkout's Git state (upstream ref, its last fetch/push time, commits the- -- synced commit lacks). doctor sync_freshness reads it with no subprocess.- upstream_checked_at TIMESTAMPTZ,- upstream_commit TEXT,- upstream_behind INTEGER,created_at TIMESTAMPTZ NOT NULL DEFAULT now());@@ -2454,4 +2448,12 @@ DO \$rls\$ BEGINEND IF;END \$rls\$;-- END GENERATED from src/core/facts/relink-schema.ts (FACT_RELINK_SCHEMA_SQL)++-- #5255/#5176 (O-DX-8): last upstream observation per source, recorded by sync+-- from the checkout's Git state (upstream ref, its last fetch/push time, commits+-- the synced commit lacks); doctor sync_freshness reads it with no subprocess.+-- Added last so a fresh install has the column order an upgraded brain gets.+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_checked_at TIMESTAMPTZ;+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_commit TEXT;+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_behind INTEGER;`;diff --git a/src/schema.sql b/src/schema.sqlindex dc1d59c457..dcb5929f6b 100644--- a/src/schema.sql+++ b/src/schema.sql@@ -54,12 +54,6 @@ CREATE TABLE IF NOT EXISTS sources (-- of shelling out to git on a DB-supplied local_path, preserving the-- v0.41.27.0 trust boundary. NULL → reader falls back to wall-clock.newest_content_at TIMESTAMPTZ,- -- #5255/#5176 (O-DX-8): last upstream observation, recorded by sync from the- -- checkout's Git state (upstream ref, its last fetch/push time, commits the- -- synced commit lacks). doctor sync_freshness reads it with no subprocess.- upstream_checked_at TIMESTAMPTZ,- upstream_commit TEXT,- upstream_behind INTEGER,created_at TIMESTAMPTZ NOT NULL DEFAULT now());@@ -2450,3 +2444,11 @@ DO $rls$ BEGINEND IF;END $rls$;-- END GENERATED from src/core/facts/relink-schema.ts (FACT_RELINK_SCHEMA_SQL)++-- #5255/#5176 (O-DX-8): last upstream observation per source, recorded by sync+-- from the checkout's Git state (upstream ref, its last fetch/push time, commits+-- the synced commit lacks); doctor sync_freshness reads it with no subprocess.+-- Added last so a fresh install has the column order an upgraded brain gets.+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_checked_at TIMESTAMPTZ;+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_commit TEXT;+ALTER TABLE sources ADD COLUMN IF NOT EXISTS upstream_behind INTEGER;diff --git a/test/archived-source-scoping.test.ts b/test/archived-source-scoping.test.tsindex c9a805d02d..aa098e92a7 100644--- a/test/archived-source-scoping.test.ts+++ b/test/archived-source-scoping.test.ts@@ -100,7 +100,9 @@ describe('#3880 structural pins — all-source local_path selections filter archconst sites: Array<{ file: string; patched: number }> = [{ file: 'src/commands/sync/run.ts', patched: 1 },{ file: 'src/core/brain-writer.ts', patched: 1 },- { file: 'src/commands/doctor/checks/extraction-sync.ts', patched: 3 },+ { file: 'src/commands/doctor/checks/extraction-sync.ts', patched: 2 },+ // sync_freshness's loader (loadSyncFreshnessSources) moved here from extraction-sync.ts.+ { file: 'src/core/source-health.ts', patched: 2 },{ file: 'src/commands/frontmatter-install-hook.ts', patched: 1 },{ file: 'src/commands/sources-harden.ts', patched: 1 },];diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-default.json b/test/fixtures/goldens/catalog/pglite-engine-init-default.jsonindex a215177ea9..18469e2824 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-default.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-default.json@@ -2391,12 +2391,12 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",- "18 chunker_version text/text NULL"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "15 chunker_version text/text NULL",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.jsonindex 582bc7af70..0be1b88538 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json@@ -2391,12 +2391,12 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",- "18 chunker_version text/text NULL"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "15 chunker_version text/text NULL",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.jsonindex 249c2da626..30096b7479 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json@@ -2387,12 +2387,12 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",- "18 chunker_version text/text NULL"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "15 chunker_version text/text NULL",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json b/test/fixtures/goldens/catalog/pglite-schema-blob-default.jsonindex 0ad8d5f249..1df1435835 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-default.json@@ -1827,11 +1827,8 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.jsonindex 59c879ddea..9ef54603ca 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json@@ -1827,11 +1827,8 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.jsonindex 338db5dff2..88aa7a6f30 100644--- a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json@@ -1826,11 +1826,8 @@"10 contextual_retrieval_mode text/text NULL","11 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","12 newest_content_at timestamp with time zone/timestamptz NULL",- "13 upstream_checked_at timestamp with time zone/timestamptz NULL",- "14 upstream_commit text/text NULL",- "15 upstream_behind integer/int4 NULL",- "16 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "17 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",+ "14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-db-initschema.json b/test/fixtures/goldens/catalog/postgres-db-initschema.jsonindex 8bc1fc8c86..78d57586db 100644--- a/test/fixtures/goldens/catalog/postgres-db-initschema.json+++ b/test/fixtures/goldens/catalog/postgres-db-initschema.json@@ -1890,7 +1890,10 @@"12 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","13 newest_content_at timestamp with time zone/timestamptz NULL","14 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-default.json b/test/fixtures/goldens/catalog/postgres-engine-init-default.jsonindex 6456eba8d2..20ae4f713f 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-default.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-default.json@@ -2417,7 +2417,10 @@"12 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","13 newest_content_at timestamp with time zone/timestamptz NULL","14 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.jsonindex c3b6aae34b..3fb64bf5b3 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json@@ -2417,7 +2417,10 @@"12 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","13 newest_content_at timestamp with time zone/timestamptz NULL","14 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.jsonindex b2515727af..2119662e6f 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json@@ -2413,7 +2413,10 @@"12 trust_frontmatter_overrides boolean/bool NOT NULL DEFAULT false","13 newest_content_at timestamp with time zone/timestamptz NULL","14 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",- "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()"+ "15 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/doctor/json-pglite-degraded.json b/test/fixtures/goldens/doctor/json-pglite-degraded.jsonindex 95f3ecb7cd..85775470af 100644--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json@@ -381,13 +381,13 @@},{"category": "meta",- "message": "Version 189 (latest: 189)",+ "message": "Version 190 (latest: 190)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "810 column(s) verified against live schema",+ "message": "813 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-pglite-fresh.json b/test/fixtures/goldens/doctor/json-pglite-fresh.jsonindex 5e51eb5d56..9559c91a22 100644--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json@@ -381,13 +381,13 @@},{"category": "meta",- "message": "Version 189 (latest: 189)",+ "message": "Version 190 (latest: 190)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "810 column(s) verified against live schema",+ "message": "813 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.jsonindex 331e21e9d5..6c99205daa 100644--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json@@ -387,13 +387,13 @@},{"category": "meta",- "message": "Version 189 (latest: 189)",+ "message": "Version 190 (latest: 190)","name": "schema_version","status": "ok"},{"category": "meta",- "message": "816 column(s) verified against live schema",+ "message": "819 column(s) verified against live schema","name": "schema_columns","status": "ok"},diff --git a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.jsonindex 4de2df37f2..b907582bf9 100644--- a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json+++ b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json@@ -2393,7 +2393,10 @@"12 newest_content_at timestamp with time zone/timestamptz NULL","13 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()","14 incarnation uuid/uuid NOT NULL DEFAULT gen_random_uuid()",- "15 chunker_version text/text NULL"+ "15 chunker_version text/text NULL",+ "16 upstream_checked_at timestamp with time zone/timestamptz NULL",+ "17 upstream_commit text/text NULL",+ "18 upstream_behind integer/int4 NULL"],"flags": "relkind=r rls=false force_rls=false"},diff --git a/test/schema-bootstrap-coverage.test.ts b/test/schema-bootstrap-coverage.test.tsindex b7b9cea3dd..2488e356d3 100644--- a/test/schema-bootstrap-coverage.test.ts+++ b/test/schema-bootstrap-coverage.test.ts@@ -894,6 +894,11 @@ const COLUMN_EXEMPTIONS = new Set<string>(['minion_jobs.quiet_hours','minion_jobs.stagger_key','sources.chunker_version',+ // #5255/#5176: the upstream observation columns follow the same chain (PGLite+ // gets them from migration sources_upstream_observation; no index uses them).+ 'sources.upstream_checked_at',+ 'sources.upstream_commit',+ 'sources.upstream_behind','access_tokens.permissions','takes.resolved_quality','pages.emotional_weight_recomputed_at',