Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

chore(trust): classify trust_allow_rules in the deletion and graduation inventories; regenerate migration and catalog goldens (#5575 L1a-owner)

garrytanbb0c690f5699
diff --git a/src/core/deletion-inventory.ts b/src/core/deletion-inventory.ts
index be89ff7c22..c09bafe5bd 100644
--- a/src/core/deletion-inventory.ts
+++ b/src/core/deletion-inventory.ts
@@ -156,6 +156,7 @@ const ROWS: readonly Row[] = [
['takes', 'swept', 'take', 'claim kind holder since_date until_date source resolved_unit resolved_source resolved_by embedding resolved_quality embedding_model embedded_text_hash write_principal_kind write_principal_id last_write_principal_kind last_write_principal_id trust_tier write_origin'],
['think_ab_results', 'out_of_scope', 'probed_reported', 'source_id wave_version question baseline_answer with_calibration_answer preferred model_id notes', 'question baseline_answer with_calibration_answer'],
['timeline_entries', 'out_of_scope', 'probed_reported', 'source summary detail write_principal_kind write_principal_id last_write_principal_kind last_write_principal_id trust_tier write_origin', 'summary detail'],
+ ['trust_allow_rules', 'out_of_scope', 'no_memory_text', 'source_id uri_prefix reason_family created_by removed_by reason'],
['trust_proposals', 'swept', 'review_rows', 'action source_id target_table related_table before_state after_state proposer proposer_principal_kind proposer_principal_id status decided_principal_kind decided_principal_id'],
['wanted_links', 'out_of_scope', 'probed_reported', 'source_id producer ref_kind target_source_id target_ref link_type context', 'context'],
];
diff --git a/src/core/persistence/graduation-inventory.ts b/src/core/persistence/graduation-inventory.ts
index caf9d87d29..93c7e6cb8d 100644
--- a/src/core/persistence/graduation-inventory.ts
+++ b/src/core/persistence/graduation-inventory.ts
@@ -155,6 +155,7 @@ export const GRADUATION_INVENTORY: Inventory = {
carry('takes', 'user_data', 'Takes with attribution and supersession.'),
carry('think_ab_results', 'operational', 'Think A/B eval results.'),
carry('timeline_entries', 'user_data', 'Timeline entries with attribution.'),
+ carry('trust_allow_rules', 'user_data', 'The owner\'s receipted write-gate allow rules (gbrain trust allow); dropping them would re-quarantine sources the owner allowed.'),
carry('wanted_links', 'user_data', 'Unresolved authored links (wanted pages); the edge appears when the target page is written, so they are not re-derived without a full re-extraction.'),
entry('persistence_brain', 'rebind', 'user_data', 'Brain identity and flags carry (brain_id keeps every identity file valid); enabled is set on the target only at cutover.', {
diff --git a/test/fixtures/goldens/catalog/pglite-engine-init-default.json b/test/fixtures/goldens/catalog/pglite-engine-init-default.json
index ebe0c6890a..5ae74562d9 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-default.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-default.json
@@ -374,6 +374,11 @@
"timeline_entries.timeline_entries_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"timeline_entries.timeline_entries_pkey": "p PRIMARY KEY (id)",
"timeline_entries.timeline_entries_trust_tier_check": "c CHECK ((trust_tier = ANY (ARRAY['user_confirmed'::text, 'operator_curated'::text, 'tool_observed'::text, 'agent_written'::text, 'unknown'::text, 'external_untrusted'::text])))",
+ "trust_allow_rules.trust_allow_rules_pkey": "p PRIMARY KEY (id)",
+ "trust_allow_rules.trust_allow_rules_reason_check": "c CHECK (((reason IS NULL) OR (length(reason) <= 500)))",
+ "trust_allow_rules.trust_allow_rules_reason_family_check": "c CHECK (((reason_family IS NULL) OR (reason_family = ANY (ARRAY['override'::text, 'standing_instruction'::text, 'exfiltration'::text, 'credential'::text]))))",
+ "trust_allow_rules.trust_allow_rules_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "trust_allow_rules.trust_allow_rules_uri_prefix_check": "c CHECK (((uri_prefix IS NULL) OR ((length(uri_prefix) >= 1) AND (length(uri_prefix) <= 2048))))",
"trust_proposals.trust_proposals_action_check": "c CHECK ((action = ANY (ARRAY['supersede_fact'::text, 'supersede_take'::text, 'forget'::text, 'lower_page'::text, 'confirm'::text])))",
"trust_proposals.trust_proposals_check": "c CHECK (((related_table IS NULL) = (related_id IS NULL)))",
"trust_proposals.trust_proposals_pkey": "p PRIMARY KEY (id)",
@@ -419,7 +424,7 @@
"gbrain_require_persistence_protocol(required integer)": "RETURNS void kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=af07b7fac60dec0a4fe568217931ac449d32f73b3a53a047b3b02a5f59cb5058",
"gbrain_snapshot_version_trust()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=7452350236ed4c68a6cd1f4d78a1381a4ef44cc70e8a032141f01bba4a704702",
"gbrain_stamp_revision_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=d446ed1145d8bb9c93cb0ca4aa076a5dc7a5fe07b3e79518adaf1b17b0a51216",
- "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=c3dbe0330bcdd42294891167e4d9cbec0902e8304ce26e934f0b124bd451bb94",
+ "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e37916d28aa1c5e936f3991aef485e67aaadc38de084204b86ec3caf7928cca7",
"gbrain_stamp_version_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=1b28a0e5769198d86490dc20b2aee80b7e6595670428a63ac9c6825cd2a35b10",
"gbrain_stamp_write_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=50e9b0e5bf37eeae6555dd16c8104cb0807be6c05a79e0c82237d45162c21dc2",
"update_chunk_search_vector()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e12c37d5489202aaf708560db42e6c0c7c8886d198d412e1c5d915c3ae782559",
@@ -804,6 +809,9 @@
"timeline_entries": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "trust_allow_rules": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"trust_proposals": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1184,6 +1192,9 @@
"think_ab_results_pkey": "CREATE UNIQUE INDEX think_ab_results_pkey ON public.think_ab_results USING btree (id)",
"think_ab_results_recent_idx": "CREATE INDEX think_ab_results_recent_idx ON public.think_ab_results USING btree (source_id, ran_at DESC)",
"timeline_entries_pkey": "CREATE UNIQUE INDEX timeline_entries_pkey ON public.timeline_entries USING btree (id)",
+ "trust_allow_rules_active_idx": "CREATE INDEX trust_allow_rules_active_idx ON public.trust_allow_rules USING btree (source_id) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_active_unique": "CREATE UNIQUE INDEX trust_allow_rules_active_unique ON public.trust_allow_rules USING btree (source_id, COALESCE(uri_prefix, ''::text), COALESCE(reason_family, ''::text)) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_pkey": "CREATE UNIQUE INDEX trust_allow_rules_pkey ON public.trust_allow_rules USING btree (id)",
"trust_proposals_pending_idx": "CREATE INDEX trust_proposals_pending_idx ON public.trust_proposals USING btree (source_id, created_at) WHERE (status = 'pending'::text)",
"trust_proposals_pending_unique": "CREATE UNIQUE INDEX trust_proposals_pending_unique ON public.trust_proposals USING btree (action, target_table, target_id, COALESCE(related_table, ''::text), COALESCE(related_id, (0)::bigint)) WHERE (status = 'pending'::text)",
"trust_proposals_pkey": "CREATE UNIQUE INDEX trust_proposals_pkey ON public.trust_proposals USING btree (id)",
@@ -1253,6 +1264,7 @@
"takes_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=takes.id",
"think_ab_results_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=think_ab_results.id",
"timeline_entries_id_seq": "integer start=1 min=1 max=2147483647 increment=1 cycle=false cache=1 owned_by=timeline_entries.id",
+ "trust_allow_rules_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_allow_rules.id",
"trust_proposals_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_proposals.id",
"wanted_links_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=wanted_links.id"
},
@@ -3295,6 +3307,20 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "trust_allow_rules": {
+ "columns": [
+ "1 id bigint/int8 NOT NULL DEFAULT nextval('trust_allow_rules_id_seq'::regclass)",
+ "2 source_id text/text NOT NULL",
+ "3 uri_prefix text/text NULL",
+ "4 reason_family text/text NULL",
+ "5 created_by text/text NOT NULL",
+ "6 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 removed_at timestamp with time zone/timestamptz NULL",
+ "8 removed_by text/text NULL",
+ "9 reason text/text NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"trust_proposals": {
"columns": [
"1 id bigint/int8 NOT NULL DEFAULT nextval('trust_proposals_id_seq'::regclass)",
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 29281c3811..c8be810846 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-fts-portuguese.json
@@ -374,6 +374,11 @@
"timeline_entries.timeline_entries_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"timeline_entries.timeline_entries_pkey": "p PRIMARY KEY (id)",
"timeline_entries.timeline_entries_trust_tier_check": "c CHECK ((trust_tier = ANY (ARRAY['user_confirmed'::text, 'operator_curated'::text, 'tool_observed'::text, 'agent_written'::text, 'unknown'::text, 'external_untrusted'::text])))",
+ "trust_allow_rules.trust_allow_rules_pkey": "p PRIMARY KEY (id)",
+ "trust_allow_rules.trust_allow_rules_reason_check": "c CHECK (((reason IS NULL) OR (length(reason) <= 500)))",
+ "trust_allow_rules.trust_allow_rules_reason_family_check": "c CHECK (((reason_family IS NULL) OR (reason_family = ANY (ARRAY['override'::text, 'standing_instruction'::text, 'exfiltration'::text, 'credential'::text]))))",
+ "trust_allow_rules.trust_allow_rules_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "trust_allow_rules.trust_allow_rules_uri_prefix_check": "c CHECK (((uri_prefix IS NULL) OR ((length(uri_prefix) >= 1) AND (length(uri_prefix) <= 2048))))",
"trust_proposals.trust_proposals_action_check": "c CHECK ((action = ANY (ARRAY['supersede_fact'::text, 'supersede_take'::text, 'forget'::text, 'lower_page'::text, 'confirm'::text])))",
"trust_proposals.trust_proposals_check": "c CHECK (((related_table IS NULL) = (related_id IS NULL)))",
"trust_proposals.trust_proposals_pkey": "p PRIMARY KEY (id)",
@@ -419,7 +424,7 @@
"gbrain_require_persistence_protocol(required integer)": "RETURNS void kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=af07b7fac60dec0a4fe568217931ac449d32f73b3a53a047b3b02a5f59cb5058",
"gbrain_snapshot_version_trust()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=7452350236ed4c68a6cd1f4d78a1381a4ef44cc70e8a032141f01bba4a704702",
"gbrain_stamp_revision_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=d446ed1145d8bb9c93cb0ca4aa076a5dc7a5fe07b3e79518adaf1b17b0a51216",
- "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=c3dbe0330bcdd42294891167e4d9cbec0902e8304ce26e934f0b124bd451bb94",
+ "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e37916d28aa1c5e936f3991aef485e67aaadc38de084204b86ec3caf7928cca7",
"gbrain_stamp_version_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=1b28a0e5769198d86490dc20b2aee80b7e6595670428a63ac9c6825cd2a35b10",
"gbrain_stamp_write_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=50e9b0e5bf37eeae6555dd16c8104cb0807be6c05a79e0c82237d45162c21dc2",
"update_chunk_search_vector()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e099e8a1d30bd74b7632b6055d3edffe753c00c00183e3bdac34d28d23347555",
@@ -804,6 +809,9 @@
"timeline_entries": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "trust_allow_rules": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"trust_proposals": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1184,6 +1192,9 @@
"think_ab_results_pkey": "CREATE UNIQUE INDEX think_ab_results_pkey ON public.think_ab_results USING btree (id)",
"think_ab_results_recent_idx": "CREATE INDEX think_ab_results_recent_idx ON public.think_ab_results USING btree (source_id, ran_at DESC)",
"timeline_entries_pkey": "CREATE UNIQUE INDEX timeline_entries_pkey ON public.timeline_entries USING btree (id)",
+ "trust_allow_rules_active_idx": "CREATE INDEX trust_allow_rules_active_idx ON public.trust_allow_rules USING btree (source_id) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_active_unique": "CREATE UNIQUE INDEX trust_allow_rules_active_unique ON public.trust_allow_rules USING btree (source_id, COALESCE(uri_prefix, ''::text), COALESCE(reason_family, ''::text)) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_pkey": "CREATE UNIQUE INDEX trust_allow_rules_pkey ON public.trust_allow_rules USING btree (id)",
"trust_proposals_pending_idx": "CREATE INDEX trust_proposals_pending_idx ON public.trust_proposals USING btree (source_id, created_at) WHERE (status = 'pending'::text)",
"trust_proposals_pending_unique": "CREATE UNIQUE INDEX trust_proposals_pending_unique ON public.trust_proposals USING btree (action, target_table, target_id, COALESCE(related_table, ''::text), COALESCE(related_id, (0)::bigint)) WHERE (status = 'pending'::text)",
"trust_proposals_pkey": "CREATE UNIQUE INDEX trust_proposals_pkey ON public.trust_proposals USING btree (id)",
@@ -1253,6 +1264,7 @@
"takes_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=takes.id",
"think_ab_results_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=think_ab_results.id",
"timeline_entries_id_seq": "integer start=1 min=1 max=2147483647 increment=1 cycle=false cache=1 owned_by=timeline_entries.id",
+ "trust_allow_rules_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_allow_rules.id",
"trust_proposals_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_proposals.id",
"wanted_links_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=wanted_links.id"
},
@@ -3295,6 +3307,20 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "trust_allow_rules": {
+ "columns": [
+ "1 id bigint/int8 NOT NULL DEFAULT nextval('trust_allow_rules_id_seq'::regclass)",
+ "2 source_id text/text NOT NULL",
+ "3 uri_prefix text/text NULL",
+ "4 reason_family text/text NULL",
+ "5 created_by text/text NOT NULL",
+ "6 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 removed_at timestamp with time zone/timestamptz NULL",
+ "8 removed_by text/text NULL",
+ "9 reason text/text NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"trust_proposals": {
"columns": [
"1 id bigint/int8 NOT NULL DEFAULT nextval('trust_proposals_id_seq'::regclass)",
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 870d06ed56..cd92b55c03 100644
--- a/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json
+++ b/test/fixtures/goldens/catalog/pglite-engine-init-high-dims.json
@@ -374,6 +374,11 @@
"timeline_entries.timeline_entries_page_id_fkey": "f FOREIGN KEY (page_id) REFERENCES pages(id) ON DELETE CASCADE",
"timeline_entries.timeline_entries_pkey": "p PRIMARY KEY (id)",
"timeline_entries.timeline_entries_trust_tier_check": "c CHECK ((trust_tier = ANY (ARRAY['user_confirmed'::text, 'operator_curated'::text, 'tool_observed'::text, 'agent_written'::text, 'unknown'::text, 'external_untrusted'::text])))",
+ "trust_allow_rules.trust_allow_rules_pkey": "p PRIMARY KEY (id)",
+ "trust_allow_rules.trust_allow_rules_reason_check": "c CHECK (((reason IS NULL) OR (length(reason) <= 500)))",
+ "trust_allow_rules.trust_allow_rules_reason_family_check": "c CHECK (((reason_family IS NULL) OR (reason_family = ANY (ARRAY['override'::text, 'standing_instruction'::text, 'exfiltration'::text, 'credential'::text]))))",
+ "trust_allow_rules.trust_allow_rules_source_id_fkey": "f FOREIGN KEY (source_id) REFERENCES sources(id) ON DELETE CASCADE",
+ "trust_allow_rules.trust_allow_rules_uri_prefix_check": "c CHECK (((uri_prefix IS NULL) OR ((length(uri_prefix) >= 1) AND (length(uri_prefix) <= 2048))))",
"trust_proposals.trust_proposals_action_check": "c CHECK ((action = ANY (ARRAY['supersede_fact'::text, 'supersede_take'::text, 'forget'::text, 'lower_page'::text, 'confirm'::text])))",
"trust_proposals.trust_proposals_check": "c CHECK (((related_table IS NULL) = (related_id IS NULL)))",
"trust_proposals.trust_proposals_pkey": "p PRIMARY KEY (id)",
@@ -419,7 +424,7 @@
"gbrain_require_persistence_protocol(required integer)": "RETURNS void kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=af07b7fac60dec0a4fe568217931ac449d32f73b3a53a047b3b02a5f59cb5058",
"gbrain_snapshot_version_trust()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=7452350236ed4c68a6cd1f4d78a1381a4ef44cc70e8a032141f01bba4a704702",
"gbrain_stamp_revision_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=d446ed1145d8bb9c93cb0ca4aa076a5dc7a5fe07b3e79518adaf1b17b0a51216",
- "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=c3dbe0330bcdd42294891167e4d9cbec0902e8304ce26e934f0b124bd451bb94",
+ "gbrain_stamp_trust_tier()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e37916d28aa1c5e936f3991aef485e67aaadc38de084204b86ec3caf7928cca7",
"gbrain_stamp_version_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=1b28a0e5769198d86490dc20b2aee80b7e6595670428a63ac9c6825cd2a35b10",
"gbrain_stamp_write_attribution()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=50e9b0e5bf37eeae6555dd16c8104cb0807be6c05a79e0c82237d45162c21dc2",
"update_chunk_search_vector()": "RETURNS trigger kind=f lang=plpgsql volatility=v secdef=false config=[search_path=pg_catalog, public] body_sha256=e12c37d5489202aaf708560db42e6c0c7c8886d198d412e1c5d915c3ae782559",
@@ -804,6 +809,9 @@
"timeline_entries": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
+ "trust_allow_rules": [
+ "<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
+ ],
"trust_proposals": [
"<current_role> -> <current_role> WITH GRANT OPTION: DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE"
],
@@ -1180,6 +1188,9 @@
"think_ab_results_pkey": "CREATE UNIQUE INDEX think_ab_results_pkey ON public.think_ab_results USING btree (id)",
"think_ab_results_recent_idx": "CREATE INDEX think_ab_results_recent_idx ON public.think_ab_results USING btree (source_id, ran_at DESC)",
"timeline_entries_pkey": "CREATE UNIQUE INDEX timeline_entries_pkey ON public.timeline_entries USING btree (id)",
+ "trust_allow_rules_active_idx": "CREATE INDEX trust_allow_rules_active_idx ON public.trust_allow_rules USING btree (source_id) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_active_unique": "CREATE UNIQUE INDEX trust_allow_rules_active_unique ON public.trust_allow_rules USING btree (source_id, COALESCE(uri_prefix, ''::text), COALESCE(reason_family, ''::text)) WHERE (removed_at IS NULL)",
+ "trust_allow_rules_pkey": "CREATE UNIQUE INDEX trust_allow_rules_pkey ON public.trust_allow_rules USING btree (id)",
"trust_proposals_pending_idx": "CREATE INDEX trust_proposals_pending_idx ON public.trust_proposals USING btree (source_id, created_at) WHERE (status = 'pending'::text)",
"trust_proposals_pending_unique": "CREATE UNIQUE INDEX trust_proposals_pending_unique ON public.trust_proposals USING btree (action, target_table, target_id, COALESCE(related_table, ''::text), COALESCE(related_id, (0)::bigint)) WHERE (status = 'pending'::text)",
"trust_proposals_pkey": "CREATE UNIQUE INDEX trust_proposals_pkey ON public.trust_proposals USING btree (id)",
@@ -1249,6 +1260,7 @@
"takes_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=takes.id",
"think_ab_results_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=think_ab_results.id",
"timeline_entries_id_seq": "integer start=1 min=1 max=2147483647 increment=1 cycle=false cache=1 owned_by=timeline_entries.id",
+ "trust_allow_rules_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_allow_rules.id",
"trust_proposals_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=trust_proposals.id",
"wanted_links_id_seq": "bigint start=1 min=1 max=9223372036854775807 increment=1 cycle=false cache=1 owned_by=wanted_links.id"
},
@@ -3291,6 +3303,20 @@
],
"flags": "relkind=r rls=false force_rls=false"
},
+ "trust_allow_rules": {
+ "columns": [
+ "1 id bigint/int8 NOT NULL DEFAULT nextval('trust_allow_rules_id_seq'::regclass)",
+ "2 source_id text/text NOT NULL",
+ "3 uri_prefix text/text NULL",
+ "4 reason_family text/text NULL",
+ "5 created_by text/text NOT NULL",
+ "6 created_at timestamp with time zone/timestamptz NOT NULL DEFAULT now()",
+ "7 removed_at timestamp with time zone/timestamptz NULL",
+ "8 removed_by text/text NULL",
+ "9 reason text/text NULL"
+ ],
+ "flags": "relkind=r rls=false force_rls=false"
+ },
"trust_proposals": {
"columns": [
"1 id bigint/int8 NOT NULL DEFAULT nextval('trust_proposals_id_seq'::regclass)",
diff --git a/test/fixtures/goldens/migrations/records.json b/test/fixtures/goldens/migrations/records.json
index d6c1d4c36e..690870fb07 100644
--- a/test/fixtures/goldens/migrations/records.json
+++ b/test/fixtures/goldens/migrations/records.json
@@ -1,6 +1,6 @@
{
"golden": {
- "count": 215,
+ "count": 217,
"gaps": [
17,
18,
@@ -16,7 +16,6 @@
227,
228,
229,
- 230,
231
],
"helpers": {
@@ -48,7 +47,7 @@
"sqlQueryForEngine": "71fb1ccec1b22cdc1662876dbd8c17ed81e9ab83485c6965cdf5caa4fc4a4ab5",
"verifyProjectionStatistics": "59d9ccfea1c53384d8607874a51209a9c2dfd51b2b85a2cb6269fa4120faf1f3"
},
- "latest": 232,
+ "latest": 233,
"records": [
{
"handler": {
@@ -2242,8 +2241,8 @@
"idempotent": true,
"name": "durable_concurrent_persistence",
"sql": {
- "length": 10185,
- "sha256": "5c29e2ba0eed52dbab814e8bb2e99eda48c9ccd26f4d97f2274adc5c1712a8b7"
+ "length": 10481,
+ "sha256": "b8b1d396e74ec20db357eec5d2937d28d22530f3b47ad261e1ae1681b81a7d1e"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2307,8 +2306,8 @@
"idempotent": true,
"name": "managed_alias_and_source_checkpoint_guards",
"sql": {
- "length": 5336,
- "sha256": "0791cfc72706a9fad3c32e54842d1aa1238a57172425e552134517421223c675"
+ "length": 5632,
+ "sha256": "7cdd67f6734a0f3963b243420d4c0097700d756339e86b36dd8a19a39a20b0b2"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2466,8 +2465,8 @@
"idempotent": true,
"name": "fact_embedding_identity",
"sql": {
- "length": 5481,
- "sha256": "a9418ca9a8c10990b77eddc16e2e38eee1ba77d53e802936247c94eccadacff7"
+ "length": 5777,
+ "sha256": "9b2ba4919832da41e48e8688bb31c24ea2d27197b9143cde1077b7701621ea40"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2865,8 +2864,8 @@
"idempotent": true,
"name": "take_embedding_identity",
"sql": {
- "length": 5481,
- "sha256": "98409b6776bdc98d65db3bff2afce7adb9ecb34bab5ddf8bd364e528ee4f4eea"
+ "length": 5777,
+ "sha256": "f859485119a29379245109e95303a7de53584c023633f38d0287804138b00282"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2878,8 +2877,8 @@
"idempotent": true,
"name": "f1_write_attribution",
"sql": {
- "length": 14327,
- "sha256": "b33d4cab4dd9f1bed8e7847e800b632c7c6b1ac800c19ddf12d176f83b8b0cd0"
+ "length": 14623,
+ "sha256": "ad09591c350cddb3d863c3d36c8b6784b41dafc526cf9eb3023504eec7f8e1c6"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2936,8 +2935,8 @@
"idempotent": true,
"name": "managed_guard_null_source_fallback",
"sql": {
- "length": 4838,
- "sha256": "d42aecea4f34cc10bdc8201268a284c353d71e389d423c4891a4953a26eaf3c0"
+ "length": 5134,
+ "sha256": "6d014f2104fe4f938d470329a75320f13a1a0153f21076f315ba6c85e6f84d04"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -2949,8 +2948,8 @@
"idempotent": true,
"name": "publication_failure_detail",
"sql": {
- "length": 4929,
- "sha256": "7eed76362cdf4a94019b53229c4fa56c88be9aea371db497d6614ea5eba3cd7a"
+ "length": 5225,
+ "sha256": "8e6bd0354bd0334b1dd3fb443c1a92d3e1397ffbf3162c4eea6dbd03fbf12da3"
},
"sqlFor": "absent",
"transaction": "absent",
@@ -3267,6 +3266,19 @@
"verify": "absent",
"version": 219
},
+ {
+ "handler": "absent",
+ "idempotent": true,
+ "name": "trust_tiers",
+ "sql": {
+ "length": 20566,
+ "sha256": "115fa2a9d77328902790fa9bd7a0c611f904cdb542b7ee19481d0954dc6d8bad"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
+ "version": 230
+ },
{
"handler": "absent",
"idempotent": true,
@@ -3279,6 +3291,19 @@
"transaction": "absent",
"verify": "absent",
"version": 232
+ },
+ {
+ "handler": "absent",
+ "idempotent": true,
+ "name": "trust_allow_rules",
+ "sql": {
+ "length": 889,
+ "sha256": "6c71ed5e5a86cb2b06ecf4430d6568fa32dcf89c2fa5fffa9a40dc694304ae5c"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
+ "version": 233
}
],
"versions": [
@@ -3496,7 +3521,9 @@
217,
218,
219,
- 232
+ 230,
+ 232,
+ 233
]
},
"normalizer": "migrations-record-v1"
diff --git a/test/graduation-inventory.test.ts b/test/graduation-inventory.test.ts
index 576a114dc3..39efdf2713 100644
--- a/test/graduation-inventory.test.ts
+++ b/test/graduation-inventory.test.ts
@@ -60,7 +60,7 @@ describe('graduation inventory', () => {
expect(new Set(names).size).toBe(names.length);
const counts: Record<string, number> = {};
for (const e of GRADUATION_INVENTORY.entries) counts[e.class] = (counts[e.class] ?? 0) + 1;
- expect(counts).toEqual({ carry: 110, rebind: 2, rebuild: 2, discard: 6, schema_owned: 3 });
+ expect(counts).toEqual({ carry: 111, rebind: 2, rebuild: 2, discard: 6, schema_owned: 3 });
for (const e of GRADUATION_INVENTORY.entries) {
expect({ relation: e.relation, reason: e.reason.length > 5, present: e.engines.pglite || e.engines.postgres })
.toEqual({ relation: e.relation, reason: true, present: true });