Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(w9-lane-p): canonical-writer census and catalog goldens for the full gate
time-attackb9b97e618fb5
diff --git a/docs/wave9/lane-p.md b/docs/wave9/lane-p.mdindex 2091ea1a38..90d09e98af 100644--- a/docs/wave9/lane-p.md+++ b/docs/wave9/lane-p.md@@ -6,8 +6,8 @@ migration numbering; the lines below go under the wave's CHANGELOG entry.## CHANGELOG lines- **Fences synced in by a standalone `gbrain sync` now reach the facts index.** On a brain without managed persistence, a `## Facts` fence imported by `gbrain sync` used to stay out of the facts index for good: the dream cycle's own sync saw nothing new, so `extract_facts` reconciled nothing. Each cycle now also reconciles pages whose facts are behind the page (up to 250 per run, within 60 seconds), so new fences, edited fences and removed fences all land. `gbrain doctor` (`extract_health`) names fence pages that are not reconciled yet and fences it cannot read; `gbrain dream --phase extract_facts` reconciles every page at once. (#5151)-- **Email threads extract conversation facts.** Gmail thread pages (one `## Sender · date time` heading per message) now parse into one turn per message, with the sender's name and the message time, and a thread is treated as one conversation. Before, they parsed to nothing and were retried on every run. (#5025)-- **Meeting-note labels are never speakers.** `**Attendees:**`, `**Date:**`, `**Location:**`, `**Summary:**` and similar labels no longer parse as speaker turns, so facts from meeting notes are not attributed to "Date" and dated 1970-01-01. A meeting or email page with no speaker turns that looks like meeting notes or a calendar event is recorded as not extractable and leaves the conversation-facts backlog until the page changes; a page with time-only turns and no date is recorded the same way instead of producing epoch-dated facts (add `date:` to its frontmatter to extract it). (#5025, D-N2)+- **Email threads extract conversation facts.** Gmail thread pages (one `## Sender · date time` heading per message) now parse into one turn per message, with the sender's name and the message time, and a thread is treated as one conversation. Before, they parsed to nothing and were retried on every run. A one-message thread is an email, not a conversation, and is recorded as not extractable. (#5025)+- **Meeting-note labels are never speakers.** `**Attendees:**`, `**Date:**`, `**Location:**`, `**Summary:**` and similar labels no longer parse as speaker turns, so facts from meeting notes are not attributed to "Date" and dated 1970-01-01. On brains without managed persistence, a meeting or email page with no speaker turns that looks like meeting notes or a calendar event is recorded as not extractable and leaves the conversation-facts backlog until the page changes (managed brains keep retrying those pages, as before); a page with time-only turns and no date is recorded the same way instead of producing epoch-dated facts (add `date:` to its frontmatter to extract it). (#5025, D-N2)- **Adding a fact or take to an atom no longer re-buys its concept.** The `synthesize_concepts` change check and prompt ignore `## Facts` / `## Takes` sections, and concept pages hashed the old way are updated without a model call while their atoms are unchanged. On brains without managed persistence, re-synthesizing a concept keeps the page's fences, timeline, tags and frontmatter, and a concept whose narrative changed during synthesis is left as is and retried next run. (D-N3)- **Opt-in files for generated atoms and concepts.** `gbrain config set cycle.extract_atoms.write_through true` and `gbrain config set cycle.synthesize_concepts.write_through true` write generated atoms and concepts as markdown files in the source checkout on brains without managed persistence; the next run also writes the ones generated before. Targets your `.gitignore` or `storage.db_only` covers stay database-only. A concept page that already has a file is now always rewritten in place, so an old file can no longer be synced back over the new narrative. (#5041)@@ -18,10 +18,12 @@ migration numbering; the lines below go under the wave's CHANGELOG entry.| Migration `w9_p_facts_reconcile` (placeholder v209) adds `page_facts_reconcile` | every brain | empty side table; no page row is rewritten | none || First cycles after upgrade drain the facts watermark | unmanaged brains | each cycle reconciles up to 250 fence pages (pages without a fence are settled in one bounded statement); new fact rows embed under the existing embedding setup, keyless brains make no calls | none; `gbrain dream --phase extract_facts` drains at once || Concept member hash formula | brains with concept pages | unchanged concepts are rehashed without a model call on the next `synthesize_concepts` run | none |-| Prose meeting/email and undated pages become terminal | brains running conversation-facts backfill | those pages leave the backlog once scanned | none |+| Prose meeting/email, one-message email and undated pages become terminal | unmanaged brains running conversation-facts backfill (undated pages on every brain) | those pages leave the backlog once scanned | none |## Notes for the integrator- Migration file `src/core/schema-migrations/v209-w9-p-facts-reconcile.ts` (`name: 'w9_p_facts_reconcile'`) is a placeholder number; renumbering also updates `registry.generated.ts`, `test/fixtures/goldens/migrations/records.json` and the doctor JSON goldens (schema version, Postgres RLS table count 116).- `test/graduation-inventory.test.ts` reviewed carry count moved 105 → 106 for the new table.-- Size ratchet raises (each justified in its TSV row): `src/core/cycle.ts` +1, `src/core/cycle/extract-atoms.ts` +5, `processPage` +11, `runPhaseSynthesizeConcepts` +14, `runPhaseExtractAtoms` +2.+- Size ratchet raises (each justified in its TSV row): `src/core/cycle.ts` +1, `src/core/cycle/extract-atoms.ts` +5, `processPage` +12, `runPhaseSynthesizeConcepts` +16, `runPhaseExtractAtoms` +2.+- Catalog goldens regenerated for the new table (`test/fixtures/goldens/catalog/*`, `pglite-upgrade-replay/catalog-after-boot.json`); renumbering the migration does not change them.+- Finding for the managed-persistence owners: on a managed brain, `extract-conversation-facts` publishes its fact and audit rows through `replaceDerivedFactsForPage` (a `withCoordinatedWrite` transaction with no persistence request), which `test/helpers/managed-connector-job-contract.ts` reports as "change without a coordinator publication receipt". Master never reached it for connector pages because they did not parse; this lane keeps it unreached for the new terminal outcomes (managed brains skip them without writing), but a multi-message Gmail thread on a managed brain now extracts through that same path.diff --git a/scripts/function-size-baseline.tsv b/scripts/function-size-baseline.tsvindex 808fa8d640..50e83308b9 100644--- a/scripts/function-size-baseline.tsv+++ b/scripts/function-size-baseline.tsv@@ -16,7 +16,7 @@ src/commands/dream-retriage.ts runDreamRetriage 524 seed: W5 baseline, refactorsrc/commands/embed.ts embedAllStale 566 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +9 #5804: a null projection snapshot is a counted failure (archived sources left to reportArchived) with one end-of-run batch summary; +4 wave 8 lane D1 #5527: subtract current-model chunks from the mixed-space warning; +2 Foundations 1 F4d: a time-budget stop with stale chunks left records reason, remaining count and resume command (src/core/embed-budget-stop.ts)src/commands/embed.ts runEmbedCore 381 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +5 wave 8 lane D1 #5885: stale-drain takes pass call and its watchdog progress countersrc/commands/eval-longmemeval.ts runEvalLongMemEval 740 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)-src/commands/extract-conversation-facts.ts processPage 319 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +1 #5918: one read of the page's conversation_segment_gap_minutes shared by both splitIntoSegments calls (validation lives in pageSegmentGapMinutes); +11 fix wave 9 lane P (#5025, D-N2): terminal not-extractable skip call (decision in facts/conversation-skip.ts) and the email-thread segment gap+src/commands/extract-conversation-facts.ts processPage 320 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +1 #5918: one read of the page's conversation_segment_gap_minutes shared by both splitIntoSegments calls (validation lives in pageSegmentGapMinutes); +12 fix wave 9 lane P (#5025, D-N2): not-extractable skip call (decision in facts/conversation-skip.ts) and the email-thread segment gapsrc/commands/extract-conversation-facts.ts runExtractConversationFactsCore 378 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +1 #5757: managed flag threaded into ExtractCoreState; +4 #5823: shared default-cap wiring and structured budget reason/model; decision logic is in facts/conversation-budget.ts; +2 #5330: strict-eligibility read and the enumeration filter through the shared predicate (rule lives in facts/conversation-types.ts)src/commands/extract.ts runExtract 398 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)src/commands/import.ts runImport 972 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +4 GBRA-40 F4b: planner-stats refresh every import.analyze_every_pages files (logic in planner-stats.ts); +6 #5988: onFileResult hook so full sync holds content refusals (logic in commands/sync/holds.ts); +3 #5988: heldPaths skip so a full sync never imports a rename destination it held this run (logic in commands/sync/holds.ts)@@ -38,7 +38,7 @@ src/core/cycle/extract-facts.ts runExtractFacts 505 seed: W5 baseline, refactorsrc/core/cycle/grade-takes.ts GradeTakesPhase.process 402 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)src/core/cycle/patterns.ts runPhasePatterns 303 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)src/core/cycle/propose-takes.ts ProposeTakesPhase.process 427 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)-src/core/cycle/synthesize-concepts.ts runPhaseSynthesizeConcepts 465 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +4 #5490 review: a narrative a chat_fallback_chain model wrote is hashed under that model so the next cycle re-synthesizes it; +13 fix wave 9 lane P (D-N3): fence-stripped member hash with legacy-hash grandfathering, and the classic write moved to publishClassicConcept (concept-publication.ts); +1 (#5041): opt-in concept write-through hook+src/core/cycle/synthesize-concepts.ts runPhaseSynthesizeConcepts 467 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +4 #5490 review: a narrative a chat_fallback_chain model wrote is hashed under that model so the next cycle re-synthesizes it; +13 fix wave 9 lane P (D-N3): fence-stripped member hash with legacy-hash grandfathering, and the classic write moved to publishClassicConcept (concept-publication.ts); +3 (#5041): opt-in concept write-through hook and the import callback publishClassicConcept runs under the page locksrc/core/cycle/synthesize.ts runPhaseSynthesizeInner 1046 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +3 #5854: publish_pending from postprocess, a pending summary publish deferred instead of failing the phasesrc/core/facts/backstop.ts runPipelineBodyInner 358 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)src/core/import-file.ts importFromContent 808 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +2 wave 8 lane D1 #5158: key-order fallback equality and legacy-hash ordering; lowered to 807 (#5988: screen and sanity config peeled to core/import-screen.ts); +1 #6007: the prepared apply reports its written page and seal (PreparedImportApplied) so put_page skips a re-read and a second sealdiff --git a/src/core/cycle/concept-publication.ts b/src/core/cycle/concept-publication.tsindex 6f6f47552d..8e0cabec69 100644--- a/src/core/cycle/concept-publication.ts+++ b/src/core/cycle/concept-publication.ts@@ -17,7 +17,6 @@ import { withCoordinatedWrite } from '../persistence/context.ts';import { maintenanceAttribution } from '../persistence/attribution.ts';import { existsSync, readFileSync } from 'node:fs';import { acquirePageLock } from '../page-lock.ts';-import { importFromContent } from '../import-file.ts';import { isWriteThroughDisabled, resolvePageWriteTarget } from '../write-through.ts';import { writeDerivedPageThrough } from './derived-write-through.ts';@@ -173,11 +172,13 @@ async function conceptFile(engine: BrainEngine, slug: string, sourceId: string):* frontmatter, so a take or fact appended during synthesis survives. The* page's file is rewritten when it already has one (a stale file would* otherwise be synced back over the new narrative) or when- * `cycle.synthesize_concepts.write_through` is on (#5041). Returns the- * narrative now on the page (the next call's baseline).+ * `cycle.synthesize_concepts.write_through` is on (#5041). `importPage`+ * writes the composed markdown to the database. Returns the narrative now on+ * the page (the next call's baseline).*/export async function publishClassicConcept(engine: BrainEngine, slug: string, sourceId: string,- synthesized: Record<string, unknown>, narrative: string, baseline: string, opts: { noEmbed: boolean; writeThrough: boolean }): Promise<string> {+ synthesized: Record<string, unknown>, narrative: string, baseline: string,+ opts: { writeThrough: boolean; importPage: (markdown: string) => Promise<unknown> }): Promise<string> {const lock = await acquirePageLock(slug, { timeoutMs: 5_000 });if (!lock) throw Object.assign(new Error('The concept page is locked by another writer.'), { code: 'revision_conflict' });try {@@ -192,7 +193,7 @@ export async function publishClassicConcept(engine: BrainEngine, slug: string, sconst markdown = page? composeConceptRepublication({ ...page, ...file }, snapshot!.tags, synthesized, narrative): serializeMarkdown(synthesized, narrative, '', { type: 'concept', title, tags: [] });- await importFromContent(engine, slug, markdown, { noEmbed: opts.noEmbed, sourceId });+ await opts.importPage(markdown);if (file || opts.writeThrough) await writeDerivedPageThrough(engine, slug, sourceId);return narrative;} finally {diff --git a/src/core/cycle/synthesize-concepts.ts b/src/core/cycle/synthesize-concepts.tsindex f4ace1d42d..17d9d47802 100644--- a/src/core/cycle/synthesize-concepts.ts+++ b/src/core/cycle/synthesize-concepts.ts@@ -28,6 +28,11 @@ import { writeReceipt } from '../extract/receipt-writer.ts';import { upsertExtractRollup } from '../extract/rollup-writer.ts';import { chat as gatewayChat, isAvailable, isThinkingModel, THINKING_MODEL_MAX_OUTPUT_TOKENS } from '../ai/gateway.ts';import { createGlobalLlmHaltTracker, haltedClassOf, type GlobalLlmErrorClass } from '../ai/errors.ts';+// #2163: concept pages route through importFromContent (the same+// parse→chunk→embed pipeline put_page uses) instead of a bare engine.putPage,+// so they land in the retrieval surface (content_chunks + embeddings) where+// source-boost's 1.3× 'concepts/' weighting can actually reach them.+import { importFromContent } from '../import-file.ts';import { canonicalLookup, type ModelPricing } from '../model-pricing.ts';import { createHash } from 'node:crypto';import { slugifySegment } from '../sync.ts';@@ -452,7 +457,9 @@ export async function runPhaseSynthesizeConcepts(}// #4416: target the cycle's resolved source, not the 'default' literal.baseline = await publishClassicConcept(engine, conceptSlug, opts.sourceId ?? 'default', synthesized(pageVisibility), narrative,- baseline, { noEmbed: !isAvailable('embedding'), writeThrough: conceptFiles !== null });+ baseline, { writeThrough: conceptFiles !== null, importPage: (markdown) => importFromContent(engine, conceptSlug, markdown, {+ noEmbed: !isAvailable('embedding'), sourceId: opts.sourceId,+ }) });};// A publication that lost a revision race or would lose canonical// material is recorded and skipped; any other error stops the phase.diff --git a/src/core/facts/reconcile-watermark.ts b/src/core/facts/reconcile-watermark.tsindex f4944eb86f..483fcc034a 100644--- a/src/core/facts/reconcile-watermark.ts+++ b/src/core/facts/reconcile-watermark.ts@@ -3,7 +3,7 @@** `page_facts_reconcile` records, per page, the `knowledge_revision` the* extract_facts phase last reconciled completely, plus the outcome of the- * latest attempt. It is a side table on purpose: any `UPDATE pages` fires the+ * latest attempt. It is a side table on purpose: any update to `pages` fires the* statement-level generation-clock trigger and the page row triggers, so* stamping a watermark on `pages` would churn every reconcile.*diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-default.json b/test/fixtures/goldens/catalog/pglite-engine-init-default.jsonindex 7d807b48ac..4d95b4ec9c 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-default.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-default.json@@ -180,6 +180,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -570,6 +573,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -973,6 +979,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2216,6 +2223,17 @@],"flags": "relkind=r rls=false force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.jsonindex cdc1320166..2f3231798c 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json@@ -180,6 +180,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -570,6 +573,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -973,6 +979,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2216,6 +2223,17 @@],"flags": "relkind=r rls=false force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.jsonindex 4f88afa57e..92a067f9ec 100644--- a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json@@ -180,6 +180,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -570,6 +573,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -969,6 +975,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2212,6 +2219,17 @@],"flags": "relkind=r rls=false force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-default.json b/test/fixtures/goldens/catalog/postgres-engine-init-default.jsonindex 82c79e14db..d1b7346ecf 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-default.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-default.json@@ -184,6 +184,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -577,6 +580,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -977,6 +983,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2228,6 +2235,17 @@],"flags": "relkind=r rls=true force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.jsonindex dc86dec44e..1a76ba0102 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json@@ -184,6 +184,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -577,6 +580,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -977,6 +983,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2228,6 +2235,17 @@],"flags": "relkind=r rls=true force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.jsonindex 630b3f847c..9cad33ccbd 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json@@ -184,6 +184,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -577,6 +580,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -973,6 +979,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2224,6 +2231,17 @@],"flags": "relkind=r rls=true force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",diff --git a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.jsonindex 8b03ba0f94..c811f0e36a 100644--- a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json+++ b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json@@ -180,6 +180,9 @@"page_aliases.page_aliases_origin_uniq": "u UNIQUE (source_id, alias_norm, slug, origin)","page_aliases.page_aliases_pkey": "p PRIMARY KEY (id)","page_aliases.page_aliases_source_fk": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_outcome_check": "c CHECK ((outcome = ANY (ARRAY['complete'::text, 'deferred'::text, 'invalid'::text, 'cancelled'::text])))",+ "page_facts_reconcile.page_facts_reconcile_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",+ "page_facts_reconcile.page_facts_reconcile_pkey": "p PRIMARY KEY (page_id)","page_generation_clock.page_generation_clock_id_check": "c CHECK ((id = 1))","page_generation_clock.page_generation_clock_pkey": "p PRIMARY KEY (id)","page_mention_state.page_mention_state_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",@@ -570,6 +573,9 @@"page_aliases": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],+ "page_facts_reconcile": [+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"+ ],"page_generation_clock": ["<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"],@@ -973,6 +979,7 @@"page_aliases_origin_uniq": "CREATE UNIQUE INDEX page_aliases_origin_uniq ON public.page_aliases USING btree (source_id, alias_norm, slug, origin)","page_aliases_pkey": "CREATE UNIQUE INDEX page_aliases_pkey ON public.page_aliases USING btree (id)","page_aliases_slug_idx": "CREATE INDEX page_aliases_slug_idx ON public.page_aliases USING btree (source_id, slug)",+ "page_facts_reconcile_pkey": "CREATE UNIQUE INDEX page_facts_reconcile_pkey ON public.page_facts_reconcile USING btree (page_id)","page_generation_clock_pkey": "CREATE UNIQUE INDEX page_generation_clock_pkey ON public.page_generation_clock USING btree (id)","page_mention_state_pkey": "CREATE UNIQUE INDEX page_mention_state_pkey ON public.page_mention_state USING btree (page_id)","page_mention_state_source_idx": "CREATE INDEX page_mention_state_source_idx ON public.page_mention_state USING btree (source_id, mention_version)",@@ -2216,6 +2223,17 @@],"flags": "relkind=r rls=false force_rls=false"},+ "page_facts_reconcile": {+ "columns": [+ "1 page_id integer/int4 NOT NULL",+ "2 reconciled_revision uuid/uuid NULL",+ "3 reconciled_at timestamp with time zone/timestamptz NULL",+ "4 outcome text/text NOT NULL",+ "5 attempted_revision uuid/uuid NULL",+ "6 attempted_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"+ ],+ "flags": "relkind=r rls=true force_rls=false"+ },"page_generation_clock": {"columns": ["1 id integer/int4 NOT NULL",