Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/evalwave-fixes-c' into capy/fix-wave-6

garrytan912322af8d41
diff --cc docs/architecture/key-files/core-services-1.md
index 72aacbea87,4f9ee33dd8..f83899604d
--- a/docs/architecture/key-files/core-services-1.md
+++ b/docs/architecture/key-files/core-services-1.md
@@@ -25,7 -25,7 +25,7 @@@ Current behavior and load-bearing invar
- `src/core/budget/budget-tracker.ts` — the keystone budget primitive. One typed error (`BudgetExhausted` with `reason: 'cost' | 'runtime' | 'no_pricing'`), one schema-stable audit JSONL at `~/.gbrain/audit/budget-YYYY-Www.jsonl`. Contracts: `record()` throws when cumulative spend exceeds cap (the cap is a real ceiling, not a suggestion); `reserve()` admission checks cumulative + OUTSTANDING spend — each admitted projection is held until its `record()` settles it, so N concurrent callers (skillopt's validation gate) can't all pass against the same cumulative and breach `--max-cost-usd` by (N-1)×per-call cost; `reserve()` hard-fails with `reason: 'no_pricing'` when `maxCostUsd` is set AND the model is missing from pricing maps (warn-once preserved when cap is unset); `lookupPricing` normalizes recipe aliases through `resolveRecipe` before consulting the pricing tables, so `claude-cli:haiku` prices exactly like `claude-cli:claude-haiku-4-5-20251001` at `reserve()`, `record()` and `isModelPriceable()` alike (the gateway reserves with the pre-resolution string the user configured); `extractUsageFromError(err, fallback)` returns `err.usage` when the SDK provides it, else the pessimistic fallback (caller passes `maxOutputTokens`, not the optimistic pre-call estimate). `onExhausted(cb)` fires once synchronously BEFORE the throw propagates so callers can persist checkpoints. Pricing math (`reservationCostUsd`, overrides, free local providers, unknown-price `null`) lives in the pure `src/core/budget/reservation-cost.ts`, shared with skillopt preflight's impossible-reservation check so the two cannot disagree. Every `record()` also feeds an in-memory model ledger keyed by (requested model, served model, touchpoint, purpose) — updated BEFORE the cap throw and before the unpriced early return — exposed as `snapshot().models`; `BudgetActualUsage` carries `requestedModelId`, `purpose`, `failed`, `countsAsCall` (default true) and `estimated`, and rows track `calls` (gateway operations), `attempts` (every record), `failed_calls`, tokens, `cost_usd` (`null` when unpriced) and `cost_basis` (`estimated` if any contributing record was). `src/core/budget/models-used.ts` maps labels to touchpoints (`gateway.chat`→chat, `gateway.expand*`→expansion, `gateway.embed*`→embedding, `gateway.rerank*`→rerank, `gateway.ocr*`→ocr, else other), builds receipt rows (`buildModelsUsed`), merges resumed segments and renders the "Models called" table. No DB change. Shared by brainstorm, cycle/budget-meter, and eval-contradictions; `BudgetMeter` keeps its public shape over it (`schema_version: 1` stamped on every dream-budget audit line). Pinned by 18 unit cases.
- - `src/core/chronicle/{eligibility,config,backstop,extract-events,ontology,narrative}.ts` + `src/eval/chronicle/harness.ts` + `src/commands/eval-chronicle.ts` — Life Chronicle: the temporal spine. `eligibility.isChronicleEligible` decides which pages auto-emit events (meeting/conversation/calendar-event + directory rescue; diary and event pages NEVER eligible — privacy + anti-loop). `backstop.runChronicleBackstop` is the put_page hook body (fires ONLY on `status==='imported'` + the auto-link trust gate + the default-OFF `auto_chronicle` flag; enqueues a `chronicle_extract` minion job — LLM never runs on the write path). `extract-events.runChronicleExtract` is the job body: deterministic when/who, injectable judge (default = chat gateway; output cap 4000 tokens by default, operator override `chronicle.judge_max_tokens`), an ALL-or-nothing parse barrier (`isValidProposal` requires a real parseable date — a malformed batch writes NOTHING), then content-addressed `life/events/` pages + a `timeline_entries` projection via `engine.upsertEventProjection` (dedup `(event_page_id, date)`; idempotent re-runs). An unusable judge response is never recorded as `no_events`: a `stopReason: 'length'` truncation or a no-JSON-array response (`parseJudgeJson` returns `null` on parse failure; `[]` only for a legitimate empty array) surfaces as `status: 'skipped'` with reason `judge_truncated` / `judge_parse_failed`. `ontology.ts` carries the deterministic pieces of the bi-temporal per-entity ontology that RIDES THE `facts` TABLE (migration v122 adds `dimension`/`value`/`value_hash`/`dim_status`): `valueHash` (normalized, timestamp-free → crash-retry idempotent), `normalizeDimension` (seed alias lexicon), `isNovelDimension` (novel → quarantined, excluded from resolution/context until confirmed). The engine methods (`mergeOntologyFact` — corroborate on same value, forward-supersede via `valid_until`+`superseded_by` on a new value, backdated conflicts kept + flagged; `getOntology` with `--asof` valid-time travel; `discoverOntologyDimensions`; `findOntologyConflicts` — currently-open rows only) live in BOTH engines; both engines are on the R8 `valid_until` write allow-list (engine-layer, `dimension IS NOT NULL` rows only). Chronicle reads (`getTimelineForDate`/`getSince`/`getLastSeen`/`getOnThisDay`) JOIN the depth page (`deleted_at IS NULL`), hide soft-deleted event projections at READ time, and order by event `effective_date` for intra-day sequence. Ops: `chronicle_day`/`chronicle_since`/`chronicle_last_seen`/`chronicle_on_this_day`/`ontology_*`/`volunteer_chronicle` (agent orientation via `src/core/context/chronicle-context.ts`)/`chronicle_backfill` (admin, localOnly). Diary privacy: fail-closed for `ctx.remote !== false` callers — diary-sourced ontology + conflict values are redacted, the four timeline read ops (`chronicle_day`/`chronicle_since`/`chronicle_on_this_day` + `volunteer_chronicle`'s `recent_timeline`) drop rows whose depth page, event page, or `source` provenance lives under `life/diary/`, and `chronicle_last_seen` answers the never-seen shape (`last_date`/`last_event_slug`/`days_ago` all null) when the latest sighting is diary-sourced or a diary page is queried as the entity. Page visibility rides the same policy: `ontology_get`/`ontology_conflicts`/`volunteer_chronicle`'s ontologies resolve through `readPolicyOpts`, and both engines' `getOntology`/`findOntologyConflicts` apply `privateProvenanceFilterFragment` (an observation whose provenance page, looked up in the fact's own source, is `visibility: private` is dropped BEFORE per-dimension resolution and before the conflict HAVING, so an untrusted caller resolves the newest value they may see rather than a private value or a hole). The chronicle reads' event-page LEFT JOIN carries the caller's source scope in BOTH engines, so a scoped read can't surface another source's event pages through the join. Search: `applyChronicleTypeBoost` in `search/hybrid.ts` (bounded [1.0,1.25], fires only inside the `recency !== 'off'` post-fusion branch → non-temporal search bit-for-bit unchanged). Advisor collector `collect-chronicle.ts` (conflicts + coverage gap); doctor `chronicle_projection_health` (BRAIN category). Eval: `gbrain eval chronicle` — deterministic, own in-memory PGLite, 6 gold tasks (day order, last-seen, supersession, asof, conflict, isolation), exit 0 iff 6/6. Tests: `test/chronicle-*.test.ts`, `test/eval-chronicle.test.ts`.
-- `src/core/chronicle/{eligibility,config,backstop,extract-events,ontology,narrative}.ts` + `src/eval/chronicle/harness.ts` + `src/commands/eval-chronicle.ts` — Life Chronicle: the temporal spine. `eligibility.isChronicleEligible` decides which pages auto-emit events (meeting/conversation/calendar-event + directory rescue; diary and event pages NEVER eligible — privacy + anti-loop). `backstop.runChronicleBackstop` is the put_page hook body (fires ONLY on `status==='imported'` + the auto-link trust gate + the default-OFF `auto_chronicle` flag; enqueues a `chronicle_extract` minion job — LLM never runs on the write path). `extract-events.runChronicleExtract` is the job body: deterministic when/who, injectable judge (default = chat gateway; output cap 4000 tokens by default, operator override `chronicle.judge_max_tokens`), an ALL-or-nothing parse barrier (`isValidProposal` requires a real parseable date — a malformed batch writes NOTHING), then content-addressed `life/events/` pages + a `timeline_entries` projection via `engine.upsertEventProjection` (dedup `(event_page_id, date)`; idempotent re-runs). An unusable judge response is never recorded as `no_events`: a `stopReason: 'length'` truncation or a no-JSON-array response (`parseJudgeJson` returns `null` on parse failure; `[]` only for a legitimate empty array) surfaces as `status: 'skipped'` with reason `judge_truncated` / `judge_parse_failed`. `ontology.ts` carries the deterministic pieces of the bi-temporal per-entity ontology that RIDES THE `facts` TABLE (migration v122 adds `dimension`/`value`/`value_hash`/`dim_status`): `valueHash` (normalized, timestamp-free; the v189 dedup index adds the stint's `valid_from`, so a crash-retry conflicts while a same-provenance return to an earlier value records a new interval), `normalizeDimension` (seed alias lexicon), `isNovelDimension` (novel → quarantined, excluded from resolution/context until confirmed). The engine methods (`mergeOntologyFact` — corroborate on same value (noop when the same provenance already observed it during the current stint), forward-supersede via `valid_until`+`superseded_by` on a new value, backdated conflicts kept + flagged; `getOntology` with `--asof` valid-time travel; `discoverOntologyDimensions`; `findOntologyConflicts` — currently-open rows only) live in BOTH engines; both engines are on the R8 `valid_until` write allow-list (engine-layer, `dimension IS NOT NULL` rows only). Chronicle reads (`getTimelineForDate`/`getSince`/`getLastSeen`/`getOnThisDay`) JOIN the depth page (`deleted_at IS NULL`), hide soft-deleted event projections at READ time, and order by event `effective_date` for intra-day sequence. Ops: `chronicle_day`/`chronicle_since`/`chronicle_last_seen`/`chronicle_on_this_day`/`ontology_*`/`volunteer_chronicle` (agent orientation via `src/core/context/chronicle-context.ts`)/`chronicle_backfill` (admin, localOnly). Diary privacy: fail-closed for `ctx.remote !== false` callers — diary-sourced ontology + conflict values are redacted, the four timeline read ops (`chronicle_day`/`chronicle_since`/`chronicle_on_this_day` + `volunteer_chronicle`'s `recent_timeline`) drop rows whose depth page, event page, or `source` provenance lives under `life/diary/`, and `chronicle_last_seen` answers the never-seen shape (`last_date`/`last_event_slug`/`days_ago` all null) when the latest sighting is diary-sourced or a diary page is queried as the entity. Remote callers read only `visibility = 'world'` observations, like recall: `getOntology`/`findOntologyConflicts` take a `visibility` filter applied before resolution and the conflict HAVING. `ontology_propose` commits through `coordinatedDatabaseWrite` on a managed brain. Page visibility rides the same policy: `ontology_get`/`ontology_conflicts`/`volunteer_chronicle`'s ontologies resolve through `readPolicyOpts`, and both engines' `getOntology`/`findOntologyConflicts` apply `privateProvenanceFilterFragment` (an observation whose provenance page, looked up in the fact's own source, is `visibility: private` is dropped BEFORE per-dimension resolution and before the conflict HAVING, so an untrusted caller resolves the newest value they may see rather than a private value or a hole). The chronicle reads' event-page LEFT JOIN carries the caller's source scope in BOTH engines, so a scoped read can't surface another source's event pages through the join. Search: `applyChronicleTypeBoost` in `search/hybrid.ts` (bounded [1.0,1.25], fires only inside the `recency !== 'off'` post-fusion branch → non-temporal search bit-for-bit unchanged). Advisor collector `collect-chronicle.ts` (conflicts + coverage gap); doctor `chronicle_projection_health` (BRAIN category). Eval: `gbrain eval chronicle` — deterministic, own in-memory PGLite, 6 gold tasks (day order, last-seen, supersession, asof, conflict, isolation), exit 0 iff 6/6. Tests: `test/chronicle-*.test.ts`, `test/eval-chronicle.test.ts`.
++- `src/core/chronicle/{eligibility,config,backstop,extract-events,ontology,narrative}.ts` + `src/eval/chronicle/harness.ts` + `src/commands/eval-chronicle.ts` — Life Chronicle: the temporal spine. `eligibility.isChronicleEligible` decides which pages auto-emit events (meeting/conversation/calendar-event + directory rescue; diary and event pages NEVER eligible — privacy + anti-loop). `backstop.runChronicleBackstop` is the put_page hook body (fires ONLY on `status==='imported'` + the auto-link trust gate + the default-OFF `auto_chronicle` flag; enqueues a `chronicle_extract` minion job — LLM never runs on the write path). `extract-events.runChronicleExtract` is the job body: deterministic when/who, injectable judge (default = chat gateway; output cap 4000 tokens by default, operator override `chronicle.judge_max_tokens`), an ALL-or-nothing parse barrier (`isValidProposal` requires a real parseable date — a malformed batch writes NOTHING), then content-addressed `life/events/` pages + a `timeline_entries` projection via `engine.upsertEventProjection` (dedup `(event_page_id, date)`; idempotent re-runs). An unusable judge response is never recorded as `no_events`: a `stopReason: 'length'` truncation or a no-JSON-array response (`parseJudgeJson` returns `null` on parse failure; `[]` only for a legitimate empty array) surfaces as `status: 'skipped'` with reason `judge_truncated` / `judge_parse_failed`. `ontology.ts` carries the deterministic pieces of the bi-temporal per-entity ontology that RIDES THE `facts` TABLE (migration v122 adds `dimension`/`value`/`value_hash`/`dim_status`): `valueHash` (normalized, timestamp-free; the v188 dedup index adds the stint's `valid_from`, so a crash-retry conflicts while a same-provenance return to an earlier value records a new interval), `normalizeDimension` (seed alias lexicon), `isNovelDimension` (novel → quarantined, excluded from resolution/context until confirmed). The engine methods (`mergeOntologyFact` — corroborate on same value (noop when the same provenance already observed it during the current stint), forward-supersede via `valid_until`+`superseded_by` on a new value, backdated conflicts kept + flagged; `getOntology` with `--asof` valid-time travel; `discoverOntologyDimensions`; `findOntologyConflicts` — currently-open rows only) live in BOTH engines; both engines are on the R8 `valid_until` write allow-list (engine-layer, `dimension IS NOT NULL` rows only). Chronicle reads (`getTimelineForDate`/`getSince`/`getLastSeen`/`getOnThisDay`) JOIN the depth page (`deleted_at IS NULL`), hide soft-deleted event projections at READ time, and order by event `effective_date` for intra-day sequence. Ops: `chronicle_day`/`chronicle_since`/`chronicle_last_seen`/`chronicle_on_this_day`/`ontology_*`/`volunteer_chronicle` (agent orientation via `src/core/context/chronicle-context.ts`)/`chronicle_backfill` (admin, localOnly). Diary privacy: fail-closed for `ctx.remote !== false` callers — diary-sourced ontology + conflict values are redacted, the four timeline read ops (`chronicle_day`/`chronicle_since`/`chronicle_on_this_day` + `volunteer_chronicle`'s `recent_timeline`) drop rows whose depth page, event page, or `source` provenance lives under `life/diary/`, and `chronicle_last_seen` answers the never-seen shape (`last_date`/`last_event_slug`/`days_ago` all null) when the latest sighting is diary-sourced or a diary page is queried as the entity. Remote callers read only `visibility = 'world'` observations, like recall: `getOntology`/`findOntologyConflicts` take a `visibility` filter applied before resolution and the conflict HAVING. `ontology_propose` commits through `coordinatedDatabaseWrite` on a managed brain. Page visibility rides the same policy: `ontology_get`/`ontology_conflicts`/`volunteer_chronicle`'s ontologies resolve through `readPolicyOpts`, and both engines' `getOntology`/`findOntologyConflicts` apply `privateProvenanceFilterFragment` (an observation whose provenance page, looked up in the fact's own source, is `visibility: private` is dropped BEFORE per-dimension resolution and before the conflict HAVING, so an untrusted caller resolves the newest value they may see rather than a private value or a hole). The chronicle reads' event-page LEFT JOIN carries the caller's source scope in BOTH engines, so a scoped read can't surface another source's event pages through the join. Search: `applyChronicleTypeBoost` in `search/hybrid.ts` (bounded [1.0,1.25], fires only inside the `recency !== 'off'` post-fusion branch → non-temporal search bit-for-bit unchanged). Advisor collector `collect-chronicle.ts` (conflicts + coverage gap); doctor `chronicle_projection_health` (BRAIN category). Eval: `gbrain eval chronicle` — deterministic, own in-memory PGLite, 6 gold tasks (day order, last-seen, supersession, asof, conflict, isolation), exit 0 iff 6/6. Tests: `test/chronicle-*.test.ts`, `test/eval-chronicle.test.ts`.
- `src/core/chunkers/` — 3-tier chunking (recursive, semantic, LLM-guided). `code.ts` is a tree-sitter-based semantic chunker for 30 languages (plus SQL via DerekStride/tree-sitter-sql) with embedded-asset WASMs (`src/assets/wasm/`), `@dqbd/tiktoken` cl100k_base tokenizer, small-sibling merging. `CHUNKER_VERSION` is folded into `importCodeFile`'s `content_hash` so chunker shape changes force clean re-chunks across releases. `extractSymbolName` has an inline SQL branch (`extractSqlSymbolName`) diving through DerekStride's `statement` wrapper into the inner DDL child (`create_table`/`create_function`/`create_view`/`create_index`/`create_procedure`/`create_type`/`create_schema`/`create_database`/`create_trigger`/`alter_table`/`alter_view`) and extracting the target identifier via the `name` field with identifier-shaped fallback; DML kinds (`select`/`insert`/`update`/`delete`/`merge`/`with`) deliberately return null so chunks emit unnamed (code-def is a DDL signal). `normalizeSymbolType` has parallel SQL branches mapping `create_table → 'table'`, `create_view → 'view'`, etc. `DEF_TYPES` (owned by `src/core/chunkers/def-types.ts`, re-exported by `src/commands/code-def.ts` — see that entry) carries the SQL kinds (`'table' | 'view' | 'index' | 'procedure' | 'schema' | 'database' | 'trigger'`) so the new chunks surface in `gbrain code-def <name>` queries.
diff --cc docs/architecture/key-files/google-and-loops-continued.md
index 00074a893d,b9ffff2065..8f9f7bf579
--- a/docs/architecture/key-files/google-and-loops-continued.md
+++ b/docs/architecture/key-files/google-and-loops-continued.md
@@@ -9,7 -9,7 +9,7 @@@
- `src/core/serve-service.ts` — the persistent-service half of `mcp expose`, everything under `gbrainPath('serve')` (`serveDir`, `adminTokenPath`, `wrapperPath`, `receiptPath`, `serveLogPath`, `serveErrPath`) so `GBRAIN_HOME` is honored. `SERVE_LAUNCHD_LABEL = 'com.gbrain.serve'`, `SERVE_SYSTEMD_UNIT = 'gbrain-serve.service'`, `detectServiceTarget(signals)` → `'macos' | 'linux-systemd' | 'none'` (a working user bus is required for systemd; cloud sandboxes and ephemeral containers fall to `none`). `renderServeWrapper` produces the 0755 launcher that sources the shell profiles and `~/.gbrain/env`, prepends the Bun dir to `PATH`, reads the admin token from its file at run time into `GBRAIN_ADMIN_BOOTSTRAP_TOKEN` (the token is never written into the wrapper, plist or unit), resolves `gbrain` the way autopilot's wrapper does (baked installer path, `type -P gbrain` fallback) and `exec`s `serve --http --port N --public-url URL [--surface] [--enable-dcr]`. `resolveServeGbrainCommand({ which, execPath, argv1, metaUrl, fileExists })` picks the baked program: a `gbrain` on PATH wins; a COMPILED binary — `import.meta.url` (or the injected `metaUrl`) under `/$bunfs/`, or an `execPath` that is not the bun runtime while `argv[1]` is absent/virtual — is `[execPath]` whatever its basename (release assets are renamed); otherwise the `[bun, <cli.ts>]` dev form only when that `cli.ts` exists on disk, else `[execPath]` rather than a path that cannot run; `renderServeLaunchdPlist` (RunAtLoad, KeepAlive, ThrottleInterval 30, logs to `serve.log` / `serve.err`, local `escapeXml`) and `renderServeSystemdUnit` (After=network-online.target, Restart=always, RestartSec=10, start-limit window; systemd specifiers escaped — `%` → `%%` in `ExecStart` and both `append:` log paths, `$` → `$$` in `ExecStart`). `ensureAdminToken` (0700 dir, 0600 file created with `wx` semantics, 64 hex chars; reuse a file matching the exported `ADMIN_TOKEN_SHAPE` = `^[A-Za-z0-9_-]{32,}$` — the same regex `serve-http.ts`'s `resolveBootstrapToken` accepts, so the file and the env var can never disagree on what a valid token is — unlink and regenerate otherwise), `installServeService` (launchd: domain-explicit `launchctl bootout gui/<uid> <plist>` — failure ignored — then `launchctl bootstrap gui/<uid> <plist>`, both through the one `launchctl(run, uid, plist, { modern, legacy })` helper whose legacy `launchctl unload` / `load` fallback is used ONLY when the modern verb exits non-zero with stderr matching `/Unknown command|unrecognized|not found/i`, never on a genuine failure or a killed call, and which reports the `verb` whose result it returns; a bootstrap that fails with stderr matching `LAUNCHCTL_SETTLE_RE` (`Input/output error`, `already in progress`, `\b5\b`, `\b37\b` — launchd still unloading the previous job) is retried up to `LAUNCHCTL_SETTLE_RETRIES` (5) times, `LAUNCHCTL_SETTLE_MS` (1s) apart through the injectable `sleep` param (default `setTimeout`; `mcp-expose.ts` passes `d.sleep`), a success after retries is a note and an exhausted retry appends "(after N settle retries)" to `error`; systemd: `daemon-reload` → `enable` → `restart` so a regenerated wrapper takes effect; `loginctl enable-linger` best effort) / `uninstallServeService` (launchd: the same `bootout gui/<uid>` with the same fallback; a bootout that exits non-zero — or is killed — with stderr NOT matching `LAUNCHCTL_NOT_LOADED_RE` (`No such process|not loaded|Could not find|not find service`) pushes `launchctl <verb> failed: <describeFailure>` into `notes`, and the exported `launchdBootoutFailed(result)` recognizes that note so `mcp-expose.ts` can say the job may still be loaded) / `serveServiceState` (`launchctl print gui/<uid>/<label>` / `systemctl --user is-active`); all three take `uid?: number` defaulting to `process.getuid?.() ?? 501`, threaded from `mcp-expose.ts`. Every supervisor subprocess carries a timeout — 60s for `launchctl bootstrap/bootout` (and the legacy `load/unload`) and `systemctl --user enable/restart/disable`, 15s for `launchctl print`, `daemon-reload`, `is-active` and `loginctl enable-linger` — and a `status: null` (killed) result counts as a failure (`error` / note) or `unknown` state; a failed call is described by `describeFailure` (its stderr, else stdout, else `exit <status>`). `readExposeReceipt` / `writeExposeReceipt` (`expose.json`, 0600, version 1, no secrets): the reader is a structural shape guard, not just `version`/`port`/`public_url` — it also requires `mode` in `tailnet|funnel`, a `service` object with a string `wrapper_path`, a `target` in `macos|linux-systemd|none`, a string `state` and string-or-null `plist_path` / `unit_path`, a `tailscale` object whose `binary` / `dns_name` are string-or-null, and string `mcp_url` / `admin_url` / `admin_token_file`; anything less is null (absent), so `--status` / `--remove` never dereference a half-written receipt. The token, receipt, wrapper, plist and unit writers refuse (clear error) when the target path is a symlink (`lstatSync`) before any supervisor call runs. Uses `shellQuote` from `src/core/mcp-registration.ts`; every filesystem/exec effect is behind injectable deps.
- `src/core/harness/verify.ts` — Randomized server-side memory verification with revision-conditional cleanup and retained mutation UUIDs, with separate transport, identity, authority, read, write/readback, delegation and cleanup verdicts. Lost mutation responses are reconciled before retry; server success never certifies native-harness activation or cross-conversation behavior.
- - `src/core/persistence/memory-mutations.ts` + `memory-prepare.ts` — managed `remember`, `forget`, and `forget_fact`: durable same-ID replay precedes entity/TTL/provider work; semantic append preparation preserves hidden canonical fences and revalidates dedup under page guards. Embedding preparation records the stored model/dimension generation and publication compares it under transaction row locks, preserving unchanged runtime overrides while refusing intervening migrations; fact vectors retain their actual provider model. Withdrawal admits and completes in one source-exclusive database transaction, independent of filesystem ownership, with durable mirror/projection work. `src/core/facts/single-prepare.ts` isolates provider preparation from the SQL-only semantic decision and propagates cooperative provider abort without degrading it into success. Preparation checkpoints prevent a late aborted result from reaching publication. Tests: `test/persistence-memory-mutations.test.ts` runs identical races on PGLite and PostgreSQL. #5836: an omitted `entity` is inferred before admission (`inferRememberTarget`), and the inferred slug is used only when `planRememberTarget`'s checks pass as predicates (plus withdrawal, fence parse, no owner claim); otherwise the save is unattributed with `warnings` (`NO_ENTITY`/`ENTITY_LINK_FAILED`) + `hint`. The `entity_inferred` intent marker makes preparation dedup exact text only (never supersede) and notes the context; `test/remember-entity-inference.test.ts`.
-- `src/core/persistence/memory-mutations.ts` + `memory-prepare.ts` — managed `remember`, `forget`, and `forget_fact`: durable same-ID replay precedes entity/TTL/provider work; semantic append preparation preserves hidden canonical fences and revalidates dedup under page guards. Embedding preparation records the stored model/dimension generation and publication compares it under transaction row locks, preserving unchanged runtime overrides while refusing intervening migrations; fact vectors retain their actual provider model. Withdrawal admits and completes in one source-exclusive database transaction, independent of filesystem ownership, with durable mirror/projection work; the call then rebuilds the withdrawn pages' text projections before acknowledging, because a CLI process has no resident projection worker (a failed rebuild stays queued). `src/core/facts/single-prepare.ts` isolates provider preparation from the SQL-only semantic decision and propagates cooperative provider abort without degrading it into success. Preparation checkpoints prevent a late aborted result from reaching publication. Tests: `test/persistence-memory-mutations.test.ts` runs identical races on PGLite and PostgreSQL; `test/withdrawal-followup-writes.test.ts` covers writes after a forget whose effects stay queued.
++- `src/core/persistence/memory-mutations.ts` + `memory-prepare.ts` — managed `remember`, `forget`, and `forget_fact`: durable same-ID replay precedes entity/TTL/provider work; semantic append preparation preserves hidden canonical fences and revalidates dedup under page guards. Embedding preparation records the stored model/dimension generation and publication compares it under transaction row locks, preserving unchanged runtime overrides while refusing intervening migrations; fact vectors retain their actual provider model. Withdrawal admits and completes in one source-exclusive database transaction, independent of filesystem ownership, with durable mirror/projection work; the call then rebuilds the withdrawn pages' text projections before acknowledging, because a CLI process has no resident projection worker (a failed rebuild stays queued). `src/core/facts/single-prepare.ts` isolates provider preparation from the SQL-only semantic decision and propagates cooperative provider abort without degrading it into success. Preparation checkpoints prevent a late aborted result from reaching publication. Tests: `test/persistence-memory-mutations.test.ts` runs identical races on PGLite and PostgreSQL; `test/withdrawal-followup-writes.test.ts` covers writes after a forget whose effects stay queued. #5836: an omitted `entity` is inferred before admission (`inferRememberTarget`), and the inferred slug is used only when `planRememberTarget`'s checks pass as predicates (plus withdrawal, fence parse, no owner claim); otherwise the save is unattributed with `warnings` (`NO_ENTITY`/`ENTITY_LINK_FAILED`) + `hint`. The `entity_inferred` intent marker makes preparation dedup exact text only (never supersede) and notes the context; `test/remember-entity-inference.test.ts`.
- `src/core/page-state/import-guard.ts` — imported canonical bytes publish only after source/page identity and knowledge-revision CAS, including unchanged-file and legacy hash-repair paths. Prepared same-hash imports compare full canonical metadata and additive tags, since captured timestamps are excluded from content hashes. Tests: `import-revision-concurrency.test.ts`.
- `src/core/persistence/{maintenance,root-registry,filesystem-guard,writer-guard-schema}.ts` — fail-closed legacy writer coverage: durable private refusal records and shared refusal-only root markers work before PGLite connect, resolve symlink ancestors, and retain stale roots conservatively. The selected PGLite path is registered at connect/init and source claim refresh, so managed reinit refuses even offline; unmanaged backup acquires the stable sibling native lock through rename. SQL guards include free-text aliases and canonical source sync checkpoints. `docs/architecture/canonical-writers.tsv` is the finite writer census; `canonical-writer-inventory.test.ts` rejects unreviewed additions, and `persistence-writer-fences.test.ts`/`pglite-maintenance-fence.test.ts` exercise real engines, competing processes and separate homes.
diff --cc docs/fix-wave-notes/capy-evalwave-fixes-c.md
index 0000000000,932ef1584f..802e17296d
mode 000000,100644..100644
--- a/docs/fix-wave-notes/capy-evalwave-fixes-c.md
+++ b/docs/fix-wave-notes/capy-evalwave-fixes-c.md
@@@ -1,0 -1,165 +1,165 @@@
+ # Eval-category wave, fix lane C (`capy/evalwave-fixes-c`)
+
+ Bugs from gbrain-evals branch `capy/wave-n1-n5` (repros in
+ `docs/benchmarks/2026-10-01-n1-n5/repro/`, ledger
+ `docs/benchmarks/2026-10-01-wave-bugs.md`). Every item has a failing test
+ first, then a root-cause fix, on both engines. No version bump or CHANGELOG
+ entry: the integrator owns those. Base: `capy/fix-wave-5` (a551d84b).
+
+ ## Integration notes
+
-- **Migration v189** (`facts_ontology_stint_dedup`). GBRA-37 holds v187 and
++- **Migration v188** (`facts_ontology_stint_dedup`). GBRA-37 holds v187 and
+ lane B v188. Standalone, this branch has a gap at 187–188, so three
+ count-based assertions fail until those land and pass once they do:
+ `test/migrations-golden.test.ts` (gap list `[17,18,19,100]`),
+ `test/fix-wave-4-integration.test.ts` X1 (`applied: LATEST_VERSION - 178`)
+ and `test/persistence-diagnostics.test.ts` (`applied` count). Every other
+ suite is green here.
+ - **Goldens.** The catalog, doctor `schema_version`, export-surface, migration
- record and SQL-text goldens were regenerated for v189 and the new
++ record and SQL-text goldens were regenerated for v188 and the new
+ `visibility` read option. After merging v187/v188, regenerate them once
+ more with `GBRAIN_TEST_UPDATE_GOLDENS=1` (unit and the Postgres E2E
+ catalog/doctor/replay files) rather than hand-merging the JSON.
+ - **Ratchets.** `scripts/module-size-limits.tsv` (both engines, `types.ts`)
+ and `scripts/function-size-baseline.tsv` (`dispatchToolCall` +3) record
+ the growth with rationale.
+ - `isFactWithdrawn` / `recordFactWithdrawal` signatures are unchanged.
+ - No edits to `src/core/ops/context.ts`, `src/core/ops/links.ts`,
+ `src/commands/hook.ts` or the vector search SQL.
+
+ ## N1-3 — ontology reads returned private observations to remote callers (privacy)
+
+ `ontology_get` (and `ontology_conflicts`, `volunteer_chronicle`'s
+ ontologies) only redacted diary-sourced rows and rows whose provenance page
+ is private; `facts.visibility` was never checked, so a remote caller saw an
+ observation proposed with `visibility: private`.
+
+ - `getOntology` and `findOntologyConflicts` take a `visibility` tier list
+ (both engines), applied before the per-dimension `DISTINCT ON` and the
+ conflict `HAVING`, so an untrusted caller resolves the newest world value
+ instead of a private value or a hole.
+ - The three ops pass `['world']` for `ctx.remote !== false` (the recall and
+ hot-memory rule); trusted local callers read every tier.
+ - Existing chronicle fixtures that expected remote callers to see
+ default-private observations now write those rows as `visibility: world`,
+ so they keep isolating the diary and provenance-page rules.
+ - Tests: `test/ontology-fact-visibility.test.ts` (handler and MCP dispatch,
+ remote `true`/`undefined` vs local, conflicts, `volunteer_chronicle`);
+ Postgres parity in `test/e2e/ontology-merge-parity.test.ts`.
+
+ ## N1-1 — `ontology_propose` refused on every `gbrain init` brain
+
+ `mergeOntologyFact` inserts into `facts` directly, and the managed writer
+ guard trigger rejects that whenever managed persistence is on.
+
+ - New `coordinatedDatabaseWrite` (`src/core/persistence/database-write.ts`):
+ the managed path for database-only rows. It checks the caller's durable
+ write authority, then runs the write inside `withCoordinatedWrite` with
+ the source incarnation revalidated and the given page keys held.
+ `coordinatedManualLinkWrite` now delegates to it (behavior unchanged).
+ - `ontology_propose` uses it with the entity's page key; unmanaged brains
+ keep the direct engine call. A direct engine write on a managed brain is
+ still refused.
+ - Tests: `test/managed-ontology-propose.test.ts` (PGLite and Postgres via
+ `test/e2e/managed-ontology-propose-postgres.test.ts`).
+
+ ## N1-2 — same-provenance revert was a silent noop
+
+ The dedup index `(source_id, entity_slug, dimension, value_hash,
+ source_markdown_slug)` had no time component, so Lisbon → Porto → Lisbon from
+ one provenance collided with the first Lisbon row and Porto stayed current.
+
-- Migration v189 replaces it with `idx_facts_ontology_stint_dedup`, which adds
++- Migration v188 replaces it with `idx_facts_ontology_stint_dedup`, which adds
+ `valid_from`. The new key is strictly finer, so existing rows satisfy it.
+ - `mergeOntologyFact` (both engines) keeps same-stint repeats idempotent: when
+ the incoming value equals the current open value and the same provenance
+ already observed it at or after the current stint's start, it returns
+ `noop` instead of inserting a corroboration echo. Exact replays of any
+ step conflict on the new key and stay noops.
+ - Tests: `test/ontology-revert.test.ts` (dated, undated, replay),
+ `test/managed-ontology-propose.test.ts` (through the coordinator), parity
+ in `test/e2e/ontology-merge-parity.test.ts`; `test/e2e/schema-drift.test.ts`
+ pins the new index shape.
+
+ ## N5-1 — hot memory served a forgotten fact for up to 30 s
+
+ `getBrainHotMemoryMeta` (`src/core/facts/meta-hook.ts`) caches per process for
+ 30 s, and nothing invalidated it (`bumpHotMemoryCache` had no caller), so
+ `context_pack` and `_meta.brain_hot_memory` kept a withdrawn claim.
+
+ - `dispatchToolCall` calls `invalidateHotMemoryForEngine(engine)` after every
+ mutating op, on success and on failure (a failed write may have committed
+ part of its work). Both MCP transports dispatch here.
+ - A per-engine generation stops a build that raced an invalidation from
+ storing its stale payload.
+ - Each cache hit revalidates the source's `fact_withdrawals` watermark (count
+ and latest `withdrawn_at`, read before the rows), so a forget committed by
+ another process (a CLI next to a running server) is not served either.
+ - Tests: `test/hot-memory-invalidation.test.ts` (forget via dispatch on both
+ tiers in `_meta` and `context_pack`, an out-of-dispatcher withdrawal, a
+ fresh write, the race), PGLite and Postgres via
+ `test/e2e/hot-memory-invalidation-postgres.test.ts`.
+
+ ## N5-3 — first remember after a forget refused as stale bytes (PGLite CLI)
+
+ The forget commits, queues its `withdrawal-mirror` effect and exits; a CLI
+ process has no resident consumer. The next process (the remember) starts a
+ consumer whose effect worker and request worker run in the same tick
+ (`consumer.ts` `doTick`). The mirror rewrites the page file after the remember
+ captured `expectedBeforeHash` and before it publishes, at an unchanged page
+ revision, so publication refused with `source_changed` → `raw_file_changed`.
+ Postgres and the servers hid it by timing.
+
+ - `CLAIMABLE_WRITE_SQL` (`journal.ts`): a file write is not claimed while a
+ queued or running withdrawal mirror targets its page (an untargeted legacy
+ mirror blocks its whole worktree). Writes to other pages are unaffected.
+ - `publishMutation` (`coordinator.ts`): changed bytes **and** a moved page
+ revision (a forget committed while the write was preparing) throw
+ `revision_conflict`, so semantic writes reprepare; changed bytes at an
+ unchanged revision still refuse as `raw_file_changed`.
+ - Tests: `test/withdrawal-followup-writes.test.ts` (PGLite and Postgres via
+ `test/e2e/withdrawal-followup-writes-postgres.test.ts`).
+
+ ## N5-2 — forget under concurrent CLI writes on PGLite
+
+ Two independent causes. The ledger said the `owner_unavailable` forgets had
+ committed; they had not (refused before sending, fact still active).
+
+ - **Missing chunks.** `recordFactWithdrawal` deletes the withdrawn pages'
+ chunks in the commit and leaves the rebuild to the resident projection
+ worker, which a CLI forget never runs. It reproduced without concurrency
+ (forget, then search). `submitForgetMutation` now rebuilds those pages'
+ text projections after the commit and before answering
+ (`rebuildPendingPageProjections` gained a `pages` filter). A failed rebuild
+ stays queued as durable projection work and does not turn a committed
+ forget into an error.
+ - **`owner_unavailable`.** `maybeDelegateLocalOperation` treated any PGLite
+ lock holder as a resident owner; when the holder was another CLI call
+ there was no owner socket, so concurrent CLI writes (forgets and remembers)
+ got `owner_unavailable` with `submission_status: not_sent`. A holder that
+ is not a serve and answers no owner socket now falls through to the engine
+ path, which already waits up to 30 s for the lock. A serve holder, or a
+ socket that answered, still makes every failure final.
+ `maybeDelegateLocalAdministration` is unchanged.
+ - Behavior change to call out: concurrent CLI calls on one PGLite brain now
+ take turns on the lock instead of failing fast; behind a long-running
+ non-serve holder (e.g. a jobs daemon) a CLI write waits and then fails
+ lock-busy rather than answering `owner_unavailable` immediately.
+ - `test/persistence-memory-mutations.test.ts` "forget commits offline" used
+ to assert the chunks were empty after a forget (the N5-2 behavior); it now
+ asserts the chunks keep the retained text and drop the withdrawn claim.
+ - Tests: `test/withdrawal-followup-writes.test.ts` (retained fact in chunks
+ and keyword search after an acknowledged forget),
+ `test/persistence-local-client.test.ts` (non-serve holder falls through;
+ serve holder without a socket still throws).
+
+ ## Repros (gbrain-evals `capy/wave-n1-n5`, run against this checkout)
+
+ | Repro | Before (a551d84b) | After |
+ |---|---|---|
+ | N1-1 | `ontology-add` exit 1 `writer_coordinator_required`; `ontology_get` `[]` | exit 0; `ontology_get` returns location = Lisbon |
+ | N1-2 | third write `noop`; current Porto | third write `superseded_prior`; current Lisbon |
+ | N1-3 | remote sees `decision_style=deliberate, risk_tolerance=high (private marker)` | remote sees `decision_style=deliberate` |
+ | N5-1 | `context_pack` and `get_page` `_meta` right after forget carry the fact | both `false` |
+ | N5-2 | rounds lose chunks after `forget ok` (search false) or answer `owner_unavailable` (2/5 each) | 10/10 rounds over two runs: forget ok, retained neighbor in recall and search |
+ | N5-3 | first remember `scope_denied: The source file bytes changed after this request was accepted.`; retry ok | first remember ok |
diff --cc scripts/e2e-test-map.ts
index f789f99179,03a522672d..fb5886dec3
--- a/scripts/e2e-test-map.ts
+++ b/scripts/e2e-test-map.ts
@@@ -426,7 -423,16 +426,16 @@@ export const E2E_TEST_MAP: Record<strin
"src/core/ops/chronicle.ts": [
"test/e2e/ontology-merge-parity.test.ts",
"test/e2e/chronicle-event-projection-parity.test.ts",
+ "test/e2e/managed-ontology-propose-postgres.test.ts",
],
+ // Eval-category wave lane C: coordinated database-only writes (manual links,
+ // ontology observations) and the per-stint ontology dedup key.
+ "src/core/persistence/database-write.ts": ["test/e2e/managed-ontology-propose-postgres.test.ts", "test/e2e/managed-writers-w3.test.ts"],
- "src/core/schema-migrations/v189-facts-ontology-stint-dedup.ts": ["test/e2e/ontology-merge-parity.test.ts", "test/e2e/schema-drift.test.ts"],
++ "src/core/schema-migrations/v188-facts-ontology-stint-dedup.ts": ["test/e2e/ontology-merge-parity.test.ts", "test/e2e/schema-drift.test.ts"],
+ "src/core/persistence/memory-mutations.ts": ["test/e2e/withdrawal-followup-writes-postgres.test.ts"],
+ "src/core/persistence/coordinator.ts": ["test/e2e/withdrawal-followup-writes-postgres.test.ts"],
+ "src/core/facts/meta-hook.ts": ["test/e2e/hot-memory-invalidation-postgres.test.ts", "test/e2e/facts-context-injection-postgres.test.ts", "test/e2e/serve-http-meta.test.ts"],
+ "src/mcp/dispatch.ts": ["test/e2e/hot-memory-invalidation-postgres.test.ts"],
// Schema source of truth: any change must pass the cross-engine drift gate.
"src/schema.sql": ["test/e2e/schema-drift.test.ts", "test/e2e/schema-catalog-golden.test.ts"],
"src/core/pglite-schema.ts": ["test/e2e/schema-drift.test.ts", "test/e2e/schema-catalog-golden.test.ts"],
diff --cc src/core/persistence/memory-mutations.ts
index 6e4189c181,92ed720940..e87cd51111
--- a/src/core/persistence/memory-mutations.ts
+++ b/src/core/persistence/memory-mutations.ts
@@@ -3,10 -3,8 +3,11 @@@ import type { OperationContext } from '
import { OperationError, verbError } from '../ops/contract.ts';
import { enforceClientSlugFence, enforceSubagentSlugFence, validatePageSlug } from '../ops/context.ts';
import { isNullLikeEntity } from '../facts/write-single.ts';
- import { isFactWithdrawn, recordFactWithdrawal } from '../facts/withdrawal.ts';
-import { recordFactWithdrawal, type WithdrawalCommit } from '../facts/withdrawal.ts';
++import { isFactWithdrawn, recordFactWithdrawal, type WithdrawalCommit } from '../facts/withdrawal.ts';
+ import { rebuildPendingPageProjections } from '../page-state/projections.ts';
+import { inferFactSubject, isEntityInferenceEnabled, type InferredVia } from '../facts/subject-infer.ts';
+import { parseFactsFence } from '../facts-fence.ts';
+import { excludesPrivateWrites } from './page-visibility.ts';
import { initializeLocalPersistence, requestPrincipalForContext } from './page-mutations.ts';
import { authorizeStoredRequest, submissionAuthority } from './authority.ts';
import { admitWrite, admitWriteInTransaction, assertPageRequestIdentity, assertReplayIntent, completeWrite, getWriteRequest, intentDigest } from './journal.ts';
diff --cc src/core/schema-migrations/registry.generated.ts
index 6d93d77d73,665c8615f7..a4d3590a61
--- a/src/core/schema-migrations/registry.generated.ts
+++ b/src/core/schema-migrations/registry.generated.ts
@@@ -187,7 -187,7 +187,8 @@@ import { v183 } from './v183-persistenc
import { v184 } from './v184-decision-receipts.ts';
import { v185 } from './v185-decide-calibrations.ts';
import { v186 } from './v186-decide-proposals.ts';
-import { v189 } from './v189-facts-ontology-stint-dedup.ts';
+import { v187 } from './v187-fact-relink-attempts.ts';
++import { v188 } from './v188-facts-ontology-stint-dedup.ts';
// Array order is historical (see HISTORICAL_ARRAY_ORDER in the generator); the
// runner sorts by version before applying.
@@@ -373,5 -373,5 +374,6 @@@ export const MIGRATIONS: Migration[] =
v184,
v185,
v186,
- v189,
+ v187,
++ v188,
];
diff --cc src/core/schema-migrations/v188-facts-ontology-stint-dedup.ts
index 0000000000,045a098f5e..0b4d3711fe
mode 000000,100644..100644
--- a/src/core/schema-migrations/v188-facts-ontology-stint-dedup.ts
+++ b/src/core/schema-migrations/v188-facts-ontology-stint-dedup.ts
@@@ -1,0 -1,20 +1,20 @@@
+ import type { Migration } from './types.ts';
+
+ // Life Chronicle ontology dedup keyed per stint: the observation's valid_from
+ // joins (source, entity, dimension, value, provenance), so returning to an
+ // earlier value with the same provenance (A → B → A) records a new interval
+ // instead of colliding with the first stint. A crash-retry of the same
+ // observation still conflicts; a same-stint repeat is a noop in
+ // mergeOntologyFact. The new key is strictly finer than the old one, so
+ // existing rows always satisfy it.
-export const v189: Migration = {
- version: 189,
++export const v188: Migration = {
++ version: 188,
+ name: 'facts_ontology_stint_dedup',
+ idempotent: true,
+ sql: `
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_facts_ontology_stint_dedup
+ ON facts(source_id, entity_slug, dimension, value_hash, source_markdown_slug, valid_from)
+ WHERE dimension IS NOT NULL;
+ DROP INDEX IF EXISTS idx_facts_ontology_dedup;
+ `,
+ };
diff --cc test/e2e/schema-drift.test.ts
index 8adf92cb46,2b67c7c0d2..9b272521a3
--- a/test/e2e/schema-drift.test.ts
+++ b/test/e2e/schema-drift.test.ts
@@@ -269,9 -269,10 +269,10 @@@ describe.skipIf(skip)('schema drift: PG
],
},
{
- // Facts ontology dedup (migration 122): partial unique keyed on the
- // deterministic value_hash, scoped WHERE dimension IS NOT NULL.
- name: 'idx_facts_ontology_dedup',
- // Facts ontology dedup (migration 189): partial unique keyed on the
++ // Facts ontology dedup (migration 188): partial unique keyed on the
+ // deterministic value_hash plus the stint's valid_from, scoped
+ // WHERE dimension IS NOT NULL.
+ name: 'idx_facts_ontology_stint_dedup',
table: 'facts',
defMust: [
'create unique index',
diff --cc test/fixtures/goldens/doctor/json-pglite-degraded.json
index f59c7da78a,41e9b5cb79..3f52cd819e
--- a/test/fixtures/goldens/doctor/json-pglite-degraded.json
+++ b/test/fixtures/goldens/doctor/json-pglite-degraded.json
@@@ -381,7 -381,7 +381,7 @@@
},
{
"category": "meta",
- "message": "Version 187 (latest: 187)",
- "message": "Version 189 (latest: 189)",
++ "message": "Version 188 (latest: 188)",
"name": "schema_version",
"status": "ok"
},
diff --cc test/fixtures/goldens/doctor/json-pglite-fresh.json
index 5431e85339,0f9dd9599d..d7d2b960e9
--- a/test/fixtures/goldens/doctor/json-pglite-fresh.json
+++ b/test/fixtures/goldens/doctor/json-pglite-fresh.json
@@@ -381,7 -381,7 +381,7 @@@
},
{
"category": "meta",
- "message": "Version 187 (latest: 187)",
- "message": "Version 189 (latest: 189)",
++ "message": "Version 188 (latest: 188)",
"name": "schema_version",
"status": "ok"
},
diff --cc test/fixtures/goldens/migrations/records.json
index bb9f3dc5c6,49359b6b9e..5222124254
--- a/test/fixtures/goldens/migrations/records.json
+++ b/test/fixtures/goldens/migrations/records.json
@@@ -1,6 -1,6 +1,6 @@@
{
"golden": {
-- "count": 182,
++ "count": 183,
"gaps": [
17,
18,
@@@ -27,7 -27,7 +27,7 @@@
"slugifyPath": "401dbca23580865d8b168dd8d84db4a6c708c6610d7cb61abafc7d0ee9809063",
"verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"
},
- "latest": 187,
- "latest": 189,
++ "latest": 188,
"records": [
{
"handler": {
@@@ -2754,26 -2754,18 +2754,39 @@@
"verify": "absent",
"version": 186
},
+ {
+ "handler": {
+ "form": "arrow",
+ "helpers": [
+ "FACT_RELINK_TABLE_SQL",
+ "FACT_UNLINKED_INDEX_SQL",
+ "dropInvalidConcurrentIndex"
+ ],
+ "sha256": "b4d519036887e9ba4f75e78b94982150f0f1b26a5f2c01ae5c7796d0cfdceed8"
+ },
+ "idempotent": true,
+ "name": "fact_relink_attempts",
+ "sql": {
+ "length": 0,
+ "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+ },
+ "sqlFor": "absent",
+ "transaction": false,
+ "verify": "absent",
+ "version": 187
++ },
+ {
+ "handler": "absent",
+ "idempotent": true,
+ "name": "facts_ontology_stint_dedup",
+ "sql": {
+ "length": 264,
+ "sha256": "4b1e09f341664813647809462824659f7eea74998e3a4be8600d251428127bf5"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
- "version": 189
++ "version": 188
}
],
"versions": [
@@@ -2958,7 -2950,7 +2971,8 @@@
184,
185,
186,
- 187
- 189
++ 187,
++ 188
]
},
"normalizer": "migrations-record-v1"