Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: regenerate schema-catalog, migrations, upgrade-replay and doctor goldens for the v261 tables and the commit_notifier check

garrytan90bfc926159b
diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-default.json b/test/fixtures/goldens/catalog/pglite-engine-init-default.json
index 8e016644cb..4d88a7ff8f 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-default.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-default.json
@@ -413,6 +413,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_pkey": "p PRIMARY KEY (synthesis_page_id, take_page_id, take_row_num)",
"synthesis_evidence.synthesis_evidence_synthesis_page_id_fkey": "f FOREIGN KEY (synthesis_page_id) REFERENCES pages(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_take_page_id_take_row_num_fkey": "f FOREIGN KEY (take_page_id, take_row_num) REFERENCES takes(page_id, row_num) ON DELETE CASCADE",
@@ -923,6 +931,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"synthesis_evidence": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1384,6 +1401,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"synthesis_evidence_pkey": "CREATE UNIQUE INDEX synthesis_evidence_pkey ON public.synthesis_evidence USING btree (synthesis_page_id, take_page_id, take_row_num)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
@@ -3693,6 +3713,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"synthesis_evidence": {
"columns": [
"1 synthesis_page_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.json
index 23bd78979c..f2cfd7ab27 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json
@@ -413,6 +413,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_pkey": "p PRIMARY KEY (synthesis_page_id, take_page_id, take_row_num)",
"synthesis_evidence.synthesis_evidence_synthesis_page_id_fkey": "f FOREIGN KEY (synthesis_page_id) REFERENCES pages(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_take_page_id_take_row_num_fkey": "f FOREIGN KEY (take_page_id, take_row_num) REFERENCES takes(page_id, row_num) ON DELETE CASCADE",
@@ -923,6 +931,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"synthesis_evidence": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1384,6 +1401,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"synthesis_evidence_pkey": "CREATE UNIQUE INDEX synthesis_evidence_pkey ON public.synthesis_evidence USING btree (synthesis_page_id, take_page_id, take_row_num)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
@@ -3693,6 +3713,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"synthesis_evidence": {
"columns": [
"1 synthesis_page_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.json
index 04590e23d9..62c5ca465e 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json
@@ -413,6 +413,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_pkey": "p PRIMARY KEY (synthesis_page_id, take_page_id, take_row_num)",
"synthesis_evidence.synthesis_evidence_synthesis_page_id_fkey": "f FOREIGN KEY (synthesis_page_id) REFERENCES pages(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_take_page_id_take_row_num_fkey": "f FOREIGN KEY (take_page_id, take_row_num) REFERENCES takes(page_id, row_num) ON DELETE CASCADE",
@@ -923,6 +931,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"synthesis_evidence": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1380,6 +1397,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"synthesis_evidence_pkey": "CREATE UNIQUE INDEX synthesis_evidence_pkey ON public.synthesis_evidence USING btree (synthesis_page_id, take_page_id, take_row_num)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
@@ -3689,6 +3709,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"synthesis_evidence": {
"columns": [
"1 synthesis_page_id integer/int4 NOT NULL",
diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json b/test/fixtures/goldens/catalog/pglite-schema-blob-default.json
index 95ddae23d3..50098fc050 100644
--- a/test/fixtures/goldens/catalog/pglite-schema-blob-default.json
+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-default.json
@@ -321,6 +321,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"tags.tags_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"tags.tags_page_id_tag_key": "u UNIQUE (page_id, tag)",
"tags.tags_pkey": "p PRIMARY KEY (id)",
@@ -702,6 +710,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"tags": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1023,6 +1040,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
"take_grade_cache_applied_idx": "CREATE INDEX take_grade_cache_applied_idx ON public.take_grade_cache USING btree (take_id, applied)",
@@ -2815,6 +2835,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"tags": {
"columns": [
"1 id integer/int4 NOT NULL DEFAULT nextval('tags_id_seq'::regclass)",
diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json
index 99c83c3b41..36e254cd6c 100644
--- a/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json
+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-fts-portuguese.json
@@ -321,6 +321,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"tags.tags_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"tags.tags_page_id_tag_key": "u UNIQUE (page_id, tag)",
"tags.tags_pkey": "p PRIMARY KEY (id)",
@@ -702,6 +710,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"tags": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1023,6 +1040,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
"take_grade_cache_applied_idx": "CREATE INDEX take_grade_cache_applied_idx ON public.take_grade_cache USING btree (take_id, applied)",
@@ -2815,6 +2835,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"tags": {
"columns": [
"1 id integer/int4 NOT NULL DEFAULT nextval('tags_id_seq'::regclass)",
diff --git a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json
index 225cba15b3..c5e6c1b1e0 100644
--- a/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json
+++ b/test/fixtures/goldens/catalog/pglite-schema-blob-high-dims.json
@@ -321,6 +321,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"tags.tags_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"tags.tags_page_id_tag_key": "u UNIQUE (page_id, tag)",
"tags.tags_pkey": "p PRIMARY KEY (id)",
@@ -702,6 +710,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"tags": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1022,6 +1039,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
"take_grade_cache_applied_idx": "CREATE INDEX take_grade_cache_applied_idx ON public.take_grade_cache USING btree (take_id, applied)",
@@ -2814,6 +2834,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"tags": {
"columns": [
"1 id integer/int4 NOT NULL DEFAULT nextval('tags_id_seq'::regclass)",
diff --git a/test/fixtures/goldens/doctor/content-pglite-human.json b/test/fixtures/goldens/doctor/content-pglite-human.json
index 31330df789..d625ff9ef3 100644
--- a/test/fixtures/goldens/doctor/content-pglite-human.json
+++ b/test/fixtures/goldens/doctor/content-pglite-human.json
@@ -76,8 +76,8 @@
" [OK] pglite_scale: PGLite at 5 pages — comfortable below the 1000-page threshold",
" [OK] rls: Skipped (PGLite — no PostgREST exposure, RLS not applicable)",
" [OK] schema_version: Version <latest> (latest: <latest>)",
- " [OK] schema_columns: 1258 column(s) verified against live schema",
- " [OK] schema_missing_tables: All 149 table(s) the applied migrations create exist.",
+ " [OK] schema_columns: 1296 column(s) verified against live schema",
+ " [OK] schema_missing_tables: All 152 table(s) the applied migrations create exist.",
" [OK] rls_event_trigger: Skipped (PGLite — no event trigger support)",
" [INFO] embeddings: Not applicable: embeddings are disabled on this brain (keyword search keeps working).",
" [INFO] embedding_provider: Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",
@@ -182,6 +182,7 @@
" [OK] undeclared_db_only_pages: Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/).",
" [OK] db_only_collector_collision: No configured collectors declare output paths",
" [OK] managed_sync_latency: No commit→searchable samples in the last 24 h (no managed sync imported a new commit).",
+ " [INFO] commit_notifier: sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle.",
" [OK] tracked_ownership_marker: 1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).",
" [OK] decide_health: System One is off (every decide slot is off; nothing is sent).",
" [OK] unlinked_facts: No active facts yet; nothing to link.",
diff --git a/test/fixtures/goldens/doctor/content-pglite-json.json b/test/fixtures/goldens/doctor/content-pglite-json.json
index feadf74f97..e4b0dd3b96 100644
--- a/test/fixtures/goldens/doctor/content-pglite-json.json
+++ b/test/fixtures/goldens/doctor/content-pglite-json.json
@@ -975,14 +975,14 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "1258 column(s) verified against live schema",
+ "message": "1296 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 149 table(s) the applied migrations create exist.",
+ "message": "All 152 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
@@ -2425,6 +2425,36 @@
"name": "managed_sync_latency",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "docs": "docs/guides/on-commit-sync.md",
+ "sources": [
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "default",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "notes",
+ "stalled": false,
+ "state": null
+ }
+ ],
+ "sync_on_commit": false
+ },
+ "elapsed_ms": "<volatile>",
+ "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle.",
+ "name": "commit_notifier",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
index 81544bfe11..a59dbc7d38 100644
--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
@@ -1035,14 +1035,14 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "1258 column(s) verified against live schema",
+ "message": "1296 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 149 table(s) the applied migrations create exist.",
+ "message": "All 152 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
@@ -2603,6 +2603,44 @@
"name": "managed_sync_latency",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "docs": "docs/guides/on-commit-sync.md",
+ "sources": [
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "default",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "notes",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "plain",
+ "stalled": false,
+ "state": null
+ }
+ ],
+ "sync_on_commit": false
+ },
+ "elapsed_ms": "<volatile>",
+ "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
+ "name": "commit_notifier",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
@@ -5333,14 +5371,14 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "1258 column(s) verified against live schema",
+ "message": "1296 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 149 table(s) the applied migrations create exist.",
+ "message": "All 152 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
@@ -6901,6 +6939,44 @@
"name": "managed_sync_latency",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "docs": "docs/guides/on-commit-sync.md",
+ "sources": [
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "default",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "notes",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "plain",
+ "stalled": false,
+ "state": null
+ }
+ ],
+ "sync_on_commit": false
+ },
+ "elapsed_ms": "<volatile>",
+ "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
+ "name": "commit_notifier",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
index 70edd0f165..42a705ec11 100644
--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
@@ -1017,7 +1017,7 @@
{
"category": "ops",
"elapsed_ms": "<volatile>",
- "message": "RLS enabled on 148/148 public tables",
+ "message": "RLS enabled on 151/151 public tables",
"name": "rls",
"status": "ok"
},
@@ -1031,14 +1031,14 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "1264 column(s) verified against live schema",
+ "message": "1302 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 148 table(s) the applied migrations create exist.",
+ "message": "All 151 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
@@ -2607,6 +2607,44 @@
"name": "managed_sync_latency",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "docs": "docs/guides/on-commit-sync.md",
+ "sources": [
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "default",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "notes",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "plain",
+ "stalled": false,
+ "state": null
+ }
+ ],
+ "sync_on_commit": false
+ },
+ "elapsed_ms": "<volatile>",
+ "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
+ "name": "commit_notifier",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
@@ -5316,7 +5354,7 @@
{
"category": "ops",
"elapsed_ms": "<volatile>",
- "message": "RLS enabled on 148/148 public tables",
+ "message": "RLS enabled on 151/151 public tables",
"name": "rls",
"status": "ok"
},
@@ -5330,14 +5368,14 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "1264 column(s) verified against live schema",
+ "message": "1302 column(s) verified against live schema",
"name": "schema_columns",
"status": "ok"
},
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 148 table(s) the applied migrations create exist.",
+ "message": "All 151 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
@@ -6906,6 +6944,44 @@
"name": "managed_sync_latency",
"status": "ok"
},
+ {
+ "category": "brain",
+ "details": {
+ "docs": "docs/guides/on-commit-sync.md",
+ "sources": [
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "default",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "notes",
+ "stalled": false,
+ "state": null
+ },
+ {
+ "pending_markers": 0,
+ "reason": null,
+ "resident": null,
+ "source_id": "plain",
+ "stalled": false,
+ "state": null
+ }
+ ],
+ "sync_on_commit": false
+ },
+ "elapsed_ms": "<volatile>",
+ "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
+ "name": "commit_notifier",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index a2d018c868..c0b893cb02 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -949,7 +949,7 @@
{
"category": "meta",
"elapsed_ms": "<volatile>",
- "message": "All 148 table(s) the applied migrations create exist.",
+ "message": "All 151 table(s) the applied migrations create exist.",
"name": "schema_missing_tables",
"status": "ok"
},
diff --git a/test/fixtures/goldens/migrations/records.json b/test/fixtures/goldens/migrations/records.json
index 61f6de57d0..1103a25cef 100644
--- a/test/fixtures/goldens/migrations/records.json
+++ b/test/fixtures/goldens/migrations/records.json
@@ -1,6 +1,6 @@
{
"golden": {
- "count": 255,
+ "count": 256,
"gaps": [
17,
18,
@@ -69,7 +69,7 @@
"tableRows": "906d2413b13d76a06d5910885e47ed5c544be4ff3a2266e83146715721b24270",
"verifyProjectionStatistics": "0d231b04ecfbc5a4109d6fca9567bf4e8c9e9db6c3fbbb35212e026579ed6f67"
},
- "latest": 260,
+ "latest": 261,
"records": [
{
"handler": {
@@ -4095,6 +4095,19 @@
"transaction": false,
"verify": "absent",
"version": 260
+ },
+ {
+ "handler": "absent",
+ "idempotent": true,
+ "name": "commit_notifier",
+ "sql": {
+ "length": 1716,
+ "sha256": "92b10ec00767e181fc76c3e945a9085e37c16f06ba6235512ae6b55c409ba695"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
+ "version": 261
}
],
"versions": [
@@ -4352,7 +4365,8 @@
257,
258,
259,
- 260
+ 260,
+ 261
]
},
"normalizer": "migrations-record-v1"
diff --git a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
index b75fe54596..d57fedea2a 100644
--- a/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
+++ b/test/fixtures/goldens/pglite-upgrade-replay/catalog-after-boot.json
@@ -413,6 +413,14 @@
"subagent_tool_executions.subagent_tool_executions_job_id_fkey": "f FOREIGN KEY (job_id) REFERENCES minion_jobs(id) ON DELETE CASCADE",
"subagent_tool_executions.subagent_tool_executions_pkey": "p PRIMARY KEY (id)",
"subagent_tool_executions.subagent_tool_executions_stable_id": "u UNIQUE (job_id, message_idx, ordinal)",
+ "sync_notifier_leases.sync_notifier_leases_pkey": "p PRIMARY KEY (host_id)",
+ "sync_notifier_sources.sync_notifier_sources_detection_mode_check": "c CHECK ((detection_mode = ANY (ARRAY['watch'::text, 'poll'::text])))",
+ "sync_notifier_sources.sync_notifier_sources_pkey": "p PRIMARY KEY (source_id)",
+ "sync_notifier_sources.sync_notifier_sources_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "sync_notifier_sources.sync_notifier_sources_state_check": "c CHECK ((state = ANY (ARRAY['idle'::text, 'due'::text, 'running'::text, 'retry'::text, 'operator_blocked'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_intent_check": "c CHECK ((intent = ANY (ARRAY['freshness'::text, 'pull'::text, 'full'::text])))",
+ "sync_wanted_markers.sync_wanted_markers_pkey": "p PRIMARY KEY (source_id, intent)",
+ "sync_wanted_markers.sync_wanted_markers_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_pkey": "p PRIMARY KEY (synthesis_page_id, take_page_id, take_row_num)",
"synthesis_evidence.synthesis_evidence_synthesis_page_id_fkey": "f FOREIGN KEY (synthesis_page_id) REFERENCES pages(id) ON DELETE CASCADE",
"synthesis_evidence.synthesis_evidence_take_page_id_take_row_num_fkey": "f FOREIGN KEY (take_page_id, take_row_num) REFERENCES takes(page_id, row_num) ON DELETE CASCADE",
@@ -923,6 +931,15 @@
"subagent_tool_executions": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "sync_notifier_leases": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_notifier_sources": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
+ "sync_wanted_markers": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"synthesis_evidence": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1384,6 +1401,9 @@
"subagent_rate_leases_pkey": "CREATE UNIQUE INDEX subagent_rate_leases_pkey ON public.subagent_rate_leases USING btree (id)",
"subagent_tool_executions_pkey": "CREATE UNIQUE INDEX subagent_tool_executions_pkey ON public.subagent_tool_executions USING btree (id)",
"subagent_tool_executions_stable_id": "CREATE UNIQUE INDEX subagent_tool_executions_stable_id ON public.subagent_tool_executions USING btree (job_id, message_idx, ordinal)",
+ "sync_notifier_leases_pkey": "CREATE UNIQUE INDEX sync_notifier_leases_pkey ON public.sync_notifier_leases USING btree (host_id)",
+ "sync_notifier_sources_pkey": "CREATE UNIQUE INDEX sync_notifier_sources_pkey ON public.sync_notifier_sources USING btree (source_id)",
+ "sync_wanted_markers_pkey": "CREATE UNIQUE INDEX sync_wanted_markers_pkey ON public.sync_wanted_markers USING btree (source_id, intent)",
"synthesis_evidence_pkey": "CREATE UNIQUE INDEX synthesis_evidence_pkey ON public.synthesis_evidence USING btree (synthesis_page_id, take_page_id, take_row_num)",
"tags_page_id_tag_key": "CREATE UNIQUE INDEX tags_page_id_tag_key ON public.tags USING btree (page_id, tag)",
"tags_pkey": "CREATE UNIQUE INDEX tags_pkey ON public.tags USING btree (id)",
@@ -3693,6 +3713,59 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "sync_notifier_leases": {
+ "columns": [
+ "1 host_id text/text NOT NULL",
+ "2 owner_id text/text NOT NULL",
+ "3 fence bigint/int8 NOT NULL DEFAULT 1",
+ "4 resident_kind text/text NOT NULL",
+ "5 pid integer/int4 NULL",
+ "6 renewed_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 expires_at timestamp with time zone/timestamptz NOT NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_notifier_sources": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 source_incarnation text/text NULL",
+ "3 syncer_host_id text/text NULL",
+ "4 syncer_recorded_at timestamp with time zone/timestamptz NULL",
+ "5 state text/text NOT NULL DEFAULT 'idle'::text",
+ "6 reason text/text NULL",
+ "7 first_due_at timestamp with time zone/timestamptz NULL",
+ "8 attempts integer/int4 NOT NULL DEFAULT 0",
+ "9 next_retry_at timestamp with time zone/timestamptz NULL",
+ "10 last_progress_at timestamp with time zone/timestamptz NULL",
+ "11 last_error_code text/text NULL",
+ "12 last_error text/text NULL",
+ "13 last_error_at timestamp with time zone/timestamptz NULL",
+ "14 trace_path text/text NULL",
+ "15 observed_head text/text NULL",
+ "16 observed_at timestamp with time zone/timestamptz NULL",
+ "17 detection_mode text/text NULL",
+ "18 owner_host_id text/text NULL",
+ "19 owner_kind text/text NULL",
+ "20 owner_pid integer/int4 NULL",
+ "21 owner_seen_at timestamp with time zone/timestamptz NULL",
+ "22 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
+ "sync_wanted_markers": {
+ "columns": [
+ "1 source_id text/text NOT NULL",
+ "2 intent text/text NOT NULL",
+ "3 source_incarnation text/text NULL",
+ "4 wanted_head text/text NULL",
+ "5 generation bigint/int8 NOT NULL DEFAULT 1",
+ "6 first_due_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 updated_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "8 requested_by text/text NOT NULL",
+ "9 job_id bigint/int8 NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"synthesis_evidence": {
"columns": [
"1 synthesis_page_id integer/int4 NOT NULL",