@consiliency/agent-board-schema 1.68.0 → 1.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/fixtures/already-applied.json +28 -4
  2. package/migrations/20261026000100_agent_board_thread_association.sql +1287 -0
  3. package/migrations/20261101000100_agent_board_session_measured_mint.sql +145 -0
  4. package/migrations/20261104065658_agent_board_reply_delivery.sql +659 -0
  5. package/migrations/20261104170000_agent_board_tasking_replay_scope.sql +320 -0
  6. package/migrations/20261104180000_agent_board_delivery_writer_execute.sql +51 -0
  7. package/migrations/20261104190000_agent_board_message_replay_scope.sql +373 -0
  8. package/package.json +1 -1
  9. package/schema-manifest.json +57 -3
  10. package/src/tooling.test.mjs +8 -2
  11. package/tests/agent_board_661_reply_delivery.test.sql +185 -0
  12. package/tests/agent_board_667_boundary.test.sql +162 -0
  13. package/tests/agent_board_667_conversion_branches.test.sql +91 -0
  14. package/tests/agent_board_667_conversion_profile.test.sql +112 -0
  15. package/tests/agent_board_667_history_class.test.sql +785 -0
  16. package/tests/agent_board_667_native_cast_effect.test.sql +88 -0
  17. package/tests/agent_board_667_realtime_apply_behavior.test.sql +117 -0
  18. package/tests/agent_board_667_realtime_apply_controls.test.sql +143 -0
  19. package/tests/agent_board_667_realtime_apply_profile.test.sql +61 -0
  20. package/tests/agent_board_667_retention.test.sql +201 -0
  21. package/tests/agent_board_667_routing.test.sql +294 -0
  22. package/tests/agent_board_667_sender_effects.test.sql +100 -0
  23. package/tests/agent_board_667_sender_profile_controls.test.sql +29 -0
  24. package/tests/agent_board_667_storage_delimiter_behavior.test.sql +84 -0
  25. package/tests/agent_board_667_storage_delimiter_controls.test.sql +23 -0
  26. package/tests/agent_board_667_storage_delimiter_profile.test.sql +61 -0
  27. package/tests/agent_board_667_storage_search_behavior.test.sql +93 -0
  28. package/tests/agent_board_667_storage_search_controls.test.sql +22 -0
  29. package/tests/agent_board_667_storage_search_profile.test.sql +60 -0
  30. package/tests/agent_board_667_storage_timestamp_behavior.test.sql +58 -0
  31. package/tests/agent_board_667_storage_timestamp_controls.test.sql +22 -0
  32. package/tests/agent_board_667_storage_timestamp_profile.test.sql +54 -0
  33. package/tests/agent_board_667_writers.test.sql +281 -0
  34. package/tests/agent_board_717_message_replay_scope.test.sql +828 -0
  35. package/tests/agent_board_717_tasking_replay_scope.test.sql +661 -0
  36. package/tests/agent_board_addressing.test.sql +8 -5
  37. package/tests/agent_board_claim_subject_gate.test.sql +7 -3
  38. package/tests/agent_board_claimpolicy_race.test.sql +39 -11
  39. package/tests/agent_board_delegate_role_class.test.sql +33 -15
  40. package/tests/agent_board_delivery_writer_execute.test.sql +371 -0
  41. package/tests/agent_board_fk_lock_edges.test.sql +3 -0
  42. package/tests/agent_board_hosted_delegates.test.sql +5 -2
  43. package/tests/agent_board_inbox_rpcs.test.sql +5 -3
  44. package/tests/agent_board_obsgate.test.sql +8 -4
  45. package/tests/agent_board_obsgate4.test.sql +2 -2
  46. package/tests/agent_board_outbox_wake_ordering.test.sql +25 -2
  47. package/tests/agent_board_own_post_not_delivered.test.sql +11 -9
  48. package/tests/agent_board_session_identity_behavior_classes.test.sql +2 -2
  49. package/tests/agent_board_session_identity_limits.test.sql +1 -1
  50. package/tests/agent_board_session_identity_measured_mint.test.sql +342 -0
  51. package/tests/agent_board_session_identity_predicate_isolation.test.sql +146 -0
  52. package/tests/agent_board_sidserver_authority.test.sql +69 -0
  53. package/tests/agent_board_sidserver_catalog.test.sql +47 -0
  54. package/tests/agent_board_signed_write_gateway.test.sql +4 -2
  55. package/tests/agent_board_task_thread_lock_order.test.sql +67 -42
  56. package/tests/agent_board_v2_invariants.test.sql +5 -2
  57. package/tests/agent_board_write_enforcement_class.test.sql +3 -3
  58. package/tests/catalog/function_execute_privileges.json +41 -5
  59. package/tests/catalog/p_metadata_parameters.json +16 -0
  60. package/tests/fixtures/agent_board_667_apply_rls_guard.sql +195 -0
  61. package/tests/fixtures/agent_board_667_apply_rls_provenance.md +125 -0
  62. package/tests/fixtures/agent_board_667_apply_rls_reference.sql +1903 -0
  63. package/tests/fixtures/agent_board_667_conversion_guard.sql +162 -0
  64. package/tests/fixtures/agent_board_667_conversion_reference.md +23 -0
  65. package/tests/fixtures/agent_board_667_conversion_reference.sql +5325 -0
  66. package/tests/fixtures/agent_board_667_delimiter_guard.sql +92 -0
  67. package/tests/fixtures/agent_board_667_delimiter_provenance.md +116 -0
  68. package/tests/fixtures/agent_board_667_delimiter_reference.sql +10150 -0
  69. package/tests/fixtures/agent_board_667_search_guard.sql +92 -0
  70. package/tests/fixtures/agent_board_667_search_provenance.md +141 -0
  71. package/tests/fixtures/agent_board_667_search_reference.sql +4779 -0
  72. package/tests/fixtures/agent_board_667_sender_guard.sql +102 -0
  73. package/tests/fixtures/agent_board_667_sender_reference.md +20 -0
  74. package/tests/fixtures/agent_board_667_sender_reference.sql +875 -0
  75. package/tests/fixtures/agent_board_667_timestamp_graph.sql +84 -0
  76. package/tests/fixtures/agent_board_667_timestamp_guard.sql +94 -0
  77. package/tests/fixtures/agent_board_667_timestamp_provenance.md +99 -0
  78. package/tests/fixtures/agent_board_667_timestamp_reference.sql +2938 -0
  79. package/tests/isolation/expected/association_artifact_anchor_order.out +108 -0
  80. package/tests/isolation/expected/association_board_vs_board.out +71 -0
  81. package/tests/isolation/expected/association_post_wait_authority.out +77 -0
  82. package/tests/isolation/expected/association_strong_history_writers.out +203 -0
  83. package/tests/isolation/expected/association_strong_isolation.out +185 -0
  84. package/tests/isolation/expected/association_vs_artifact_claim_escalation.out +199 -0
  85. package/tests/isolation/expected/association_vs_heartbeat.out +78 -0
  86. package/tests/isolation/expected/association_vs_multi_anchor_artifact.out +67 -0
  87. package/tests/isolation/expected/association_vs_private_message.out +67 -0
  88. package/tests/isolation/expected/association_vs_task_and_conflict.out +133 -0
  89. package/tests/isolation/expected/association_vs_taskful_cross_thread.out +133 -0
  90. package/tests/isolation/expected/message_replay_scope.out +209 -0
  91. package/tests/isolation/expected/tasking_replay_scope.out +125 -0
  92. package/tests/isolation/specs/association_artifact_anchor_order.spec +46 -0
  93. package/tests/isolation/specs/association_board_vs_board.spec +37 -0
  94. package/tests/isolation/specs/association_post_wait_authority.spec +48 -0
  95. package/tests/isolation/specs/association_strong_history_writers.spec +61 -0
  96. package/tests/isolation/specs/association_strong_isolation.spec +50 -0
  97. package/tests/isolation/specs/association_vs_artifact_claim_escalation.spec +41 -0
  98. package/tests/isolation/specs/association_vs_heartbeat.spec +47 -0
  99. package/tests/isolation/specs/association_vs_multi_anchor_artifact.spec +38 -0
  100. package/tests/isolation/specs/association_vs_private_message.spec +33 -0
  101. package/tests/isolation/specs/association_vs_task_and_conflict.spec +38 -0
  102. package/tests/isolation/specs/association_vs_taskful_cross_thread.spec +42 -0
  103. package/tests/isolation/specs/message_replay_scope.spec +77 -0
  104. package/tests/isolation/specs/tasking_replay_scope.spec +72 -0
  105. package/tests/mutations/717-f1/M0_prefix_main_acl_and_comments.sql +11 -0
  106. package/tests/mutations/717-f1/M10_wrapper_stops_delegating.sql +7 -0
  107. package/tests/mutations/717-f1/M11_transitive_recipient_content.sql +8 -0
  108. package/tests/mutations/717-f1/M12_transitive_recipient_visibility.sql +8 -0
  109. package/tests/mutations/717-f1/M13_transitive_worker_content.sql +15 -0
  110. package/tests/mutations/717-f1/M1a_regrant_upsert_delivery_recipient.sql +1 -0
  111. package/tests/mutations/717-f1/M1b_regrant_upsert_inbox_item.sql +1 -0
  112. package/tests/mutations/717-f1/M1c_regrant_queue_inbox_callbacks.sql +1 -0
  113. package/tests/mutations/717-f1/M1d_regrant_queue_board_post_callbacks.sql +1 -0
  114. package/tests/mutations/717-f1/M1e_regrant_next_thread_message_sequence.sql +1 -0
  115. package/tests/mutations/717-f1/M2_blanket_schema_grant.sql +1 -0
  116. package/tests/mutations/717-f1/M3_new_overload_of_sink.sql +10 -0
  117. package/tests/mutations/717-f1/M4_new_route_calling_sink.sql +7 -0
  118. package/tests/mutations/717-f1/M5_actor_trusts_supplied_id.sql +5 -0
  119. package/tests/mutations/717-f1/M6_signed_route_granted_to_authenticated.sql +1 -0
  120. package/tests/mutations/717-f1/M7_worker_granted_to_authenticated.sql +1 -0
  121. package/tests/mutations/717-f1/M8_recipient_state_rewrites_visibility.sql +5 -0
  122. package/tests/mutations/717-f1/M9_public_route_revoked_from_service_role.sql +1 -0
  123. package/tests/mutations/717-f1/outbox_wake_ordering/W1_regrant_queue_inbox_callbacks.sql +1 -0
  124. package/tests/mutations/717-f1/outbox_wake_ordering/W2_revoke_worker_from_service_role.sql +1 -0
  125. package/tests/mutations/717-f1/outbox_wake_ordering/W3_invoker_caller_of_sink.sql +1 -0
  126. package/tests/mutations/717-f1/outbox_wake_ordering/W4_public_regrant_board_post_sink.sql +1 -0
  127. package/tests/mutations/717-f1/run.sh +17 -0
  128. package/tests/mutations/717-f2b/C1_new_delivery_route.sql +4 -0
  129. package/tests/mutations/717-f2b/C2_new_replay_lookup.sql +3 -0
  130. package/tests/mutations/717-f2b/C3_internal_regranted.sql +2 -0
  131. package/tests/mutations/717-f2b/C4_wrapper_writes_delivery.sql +9 -0
  132. package/tests/mutations/717-f2b/C5_class_member_dynamic_sql.sql +9 -0
  133. package/tests/mutations/717-f2b/C6_drop_board_scope_constraint.sql +2 -0
  134. package/tests/mutations/717-f2b/C7_state_private_helper_content.sql +14 -0
  135. package/tests/mutations/717-f2b/L1_dm_lock_split_by_recipient.sql +8 -0
  136. package/tests/mutations/717-f2b/L2_dm_lock_removed.sql +12 -0
  137. package/tests/mutations/717-f2b/L3_mc_lock_split_by_recipients.sql +8 -0
  138. package/tests/mutations/717-f2b/L4_mc_lock_removed.sql +12 -0
  139. package/tests/mutations/717-f2b/M0_prefix_definitions.sql +17 -0
  140. package/tests/mutations/717-f2b/M10_mc_lookup_any_author.sql +15 -0
  141. package/tests/mutations/717-f2b/M11_dm_swallow_refusal.sql +8 -0
  142. package/tests/mutations/717-f2b/M12_mc_swallow_refusal.sql +8 -0
  143. package/tests/mutations/717-f2b/M13_signed_dm_swallows_refusal.sql +32 -0
  144. package/tests/mutations/717-f2b/M14_signed_mc_swallows_refusal.sql +20 -0
  145. package/tests/mutations/717-f2b/M15_mc_any_source.sql +7 -0
  146. package/tests/mutations/717-f2b/M1_dm_drop_recipient_proof.sql +16 -0
  147. package/tests/mutations/717-f2b/M2_mc_drop_recipient_proof.sql +16 -0
  148. package/tests/mutations/717-f2b/M3_dm_metadata_as_proof.sql +12 -0
  149. package/tests/mutations/717-f2b/M4_mc_metadata_as_proof.sql +16 -0
  150. package/tests/mutations/717-f2b/M5_dm_any_mode.sql +11 -0
  151. package/tests/mutations/717-f2b/M6_dm_board_delivery_counts.sql +11 -0
  152. package/tests/mutations/717-f2b/M7_mc_any_mode.sql +11 -0
  153. package/tests/mutations/717-f2b/M8_dm_thread_stamp_as_proof.sql +12 -0
  154. package/tests/mutations/717-f2b/M9_dm_lookup_any_author.sql +15 -0
  155. package/tests/mutations/717-f2b/run.sh +82 -0
@@ -0,0 +1,92 @@
1
+ -- Requires the reviewed conversion/sender/timestamp helpers in this transaction.
2
+ -- This admits one exact search OID; it is not a Storage reader exemption.
3
+ \ir agent_board_667_search_reference.sql
4
+ create function pg_temp.xb_ss_prerequisite_problems() returns table(identity text,problem text)
5
+ language sql volatile set search_path=pg_catalog as $$
6
+ select identity,problem from pg_temp.xb_st_problems()
7
+ union all select r.identity,'search declaration or security drift' from pg_temp.xb_ss_reference r
8
+ where r.kind='wrapper' and r.payload is distinct from pg_temp.xb_cf_meta(to_regprocedure(r.identity))
9
+ union all select pg_temp.xb_cf_fn(p.oid),'unreviewed search overload or shadow' from pg_proc p
10
+ where p.proname in(select payload#>>'{}' from pg_temp.xb_ss_reference where kind='name')
11
+ and not exists(select 1 from pg_temp.xb_ss_reference r where r.kind='resolution' and to_regprocedure(r.identity)=p.oid)
12
+ union all select r.identity,'search resolution declaration drift' from pg_temp.xb_ss_reference r
13
+ where r.kind='resolution' and r.payload is distinct from
14
+ case when (select prokind from pg_proc where oid=to_regprocedure(r.identity))='a'
15
+ then pg_temp.xb_st_aggregate(to_regprocedure(r.identity)) else pg_temp.xb_cf_meta(to_regprocedure(r.identity)) end
16
+ $$;
17
+ create temp table xb_ss_views(rel oid primary key,identity text not null,category text not null) on commit drop;
18
+ do $graph$
19
+ declare q record; nm text;
20
+ begin
21
+ if not exists(select 1 from pg_temp.xb_ss_prerequisite_problems()) then
22
+ for q in select identity,payload from pg_temp.xb_ss_reference where kind='query' order by identity loop
23
+ nm:='xb_ss_'||q.identity;
24
+ execute format('create temp view %I as %s',nm,q.payload->>'sql');
25
+ insert into pg_temp.xb_ss_views values(to_regclass('pg_temp.'||nm),q.identity,q.payload->>'group');
26
+ end loop;
27
+ end if;
28
+ end $graph$;
29
+ create function pg_temp.xb_ss_roots() returns table(fn oid)
30
+ language sql volatile set search_path=pg_catalog as $$
31
+ select d.refobjid from pg_temp.xb_ss_views v join pg_rewrite w on w.ev_class=v.rel
32
+ join pg_depend d on d.classid='pg_rewrite'::regclass and d.objid=w.oid where d.refclassid='pg_proc'::regclass
33
+ union select m[2]::oid from pg_temp.xb_ss_views v join pg_rewrite w on w.ev_class=v.rel
34
+ cross join lateral regexp_matches(w.ev_action::text,':(funcid|aggfnoid|winfnoid|opfuncid|elemfuncid) ([0-9]+)','g') m
35
+ where m[2]::oid<>0
36
+ union select fn from pg_temp.xb_st_roots() where origin like 'target %'
37
+ $$;
38
+ create function pg_temp.xb_ss_reach() returns table(fn oid)
39
+ language sql volatile set search_path=pg_catalog as $$
40
+ with recursive edges(source,target) as (
41
+ select p.oid,p.prosupport::oid from pg_proc p where p.prosupport<>0
42
+ union select d.objid,d.refobjid from pg_depend d where d.classid='pg_proc'::regclass and d.refclassid='pg_proc'::regclass
43
+ union select aggregate,fn from pg_temp.xb_st_aggregate_slots()
44
+ ), reach(fn) as (select fn from pg_temp.xb_ss_roots() union select e.target from reach r join edges e on e.source=r.fn)
45
+ select fn from reach
46
+ $$;
47
+ create function pg_temp.xb_ss_collations() returns table(coll oid)
48
+ language sql volatile set search_path=pg_catalog as $$
49
+ select distinct m[1]::oid from pg_temp.xb_ss_views v join pg_rewrite w on w.ev_class=v.rel
50
+ cross join lateral regexp_matches(w.ev_action::text,':(?:inputcollid|collid|varcollid|constcollid|opcollid|funccollid) ([0-9]+)','g') m
51
+ where m[1]::oid<>0
52
+ union select coll from pg_temp.xb_st_collations()
53
+ $$;
54
+ create function pg_temp.xb_ss_problems() returns table(identity text,problem text)
55
+ language sql volatile set search_path=pg_catalog as $$
56
+ select identity,problem from pg_temp.xb_ss_prerequisite_problems()
57
+ union all select 'search parser inventory','query inventory incomplete'
58
+ where (select count(*) from pg_temp.xb_ss_views)<>(select count(*) from pg_temp.xb_ss_reference where kind='query')
59
+ union all select r.identity,'parsed group incomplete' from pg_temp.xb_ss_reference r where r.kind='group'
60
+ and (select count(*) from pg_temp.xb_ss_views v where v.category=r.identity)<>(r.payload#>>'{}')::integer
61
+ union all select pg_temp.xb_cf_fn(g.fn),'unreviewed search executable or support callback' from pg_temp.xb_ss_reach() g
62
+ where not exists(select 1 from pg_temp.xb_ss_reference r where r.kind in('primitive','helper','aggregate') and to_regprocedure(r.identity)=g.fn)
63
+ union all select r.identity,'search primitive or helper declaration drift' from pg_temp.xb_ss_reference r
64
+ where r.kind in('primitive','helper') and r.payload is distinct from pg_temp.xb_cf_meta(to_regprocedure(r.identity))
65
+ union all select r.identity,'search aggregate dispatch drift' from pg_temp.xb_ss_reference r
66
+ where r.kind='aggregate' and r.payload is distinct from pg_temp.xb_st_aggregate(to_regprocedure(r.identity))
67
+ union all select n.nspname||'.'||c.collname,'unreviewed search collation' from pg_temp.xb_ss_collations() x
68
+ join pg_collation c on c.oid=x.coll join pg_namespace n on n.oid=c.collnamespace
69
+ where not exists(select 1 from pg_temp.xb_ss_reference r where r.kind='collation'
70
+ and r.identity=format('%I.%I',n.nspname,c.collname) and r.payload=pg_temp.xb_st_collation(c.oid))
71
+ union all select d.refobjid::regclass::text,'unexpected search relation' from pg_temp.xb_ss_views v
72
+ join pg_rewrite w on w.ev_class=v.rel join pg_depend d on d.classid='pg_rewrite'::regclass and d.objid=w.oid
73
+ where d.refclassid='pg_class'::regclass and d.refobjid not in(v.rel,to_regclass('storage.objects'))
74
+ -- The normalization parser binds v_current to the reviewed objects row type.
75
+ -- Prove that binding against every actual parsed batch projection and every
76
+ -- field discovered in the source, not an assumed record-column list.
77
+ union all select v.identity||'.'||field,'search record anchor type drift'
78
+ from pg_temp.xb_ss_views v join pg_temp.xb_ss_reference q on q.kind='query' and q.identity=v.identity
79
+ cross join lateral (select jsonb_array_elements_text(payload->'record_fields') as field
80
+ from pg_temp.xb_ss_reference where kind='coverage') f
81
+ left join pg_attribute a on a.attrelid=v.rel and a.attname=f.field and a.attnum>0 and not a.attisdropped
82
+ left join pg_attribute target on target.attrelid=to_regclass('storage.objects') and target.attname=f.field
83
+ and target.attnum>0 and not target.attisdropped
84
+ where q.payload->>'role'='record' and (a.attname is null or target.attname is null
85
+ or row(a.atttypid,a.atttypmod,a.attcollation) is distinct from row(target.atttypid,target.atttypmod,target.attcollation))
86
+ $$;
87
+ create function pg_temp.xb_ss_admitted() returns table(fn oid)
88
+ language sql volatile set search_path=pg_catalog as $$
89
+ select to_regprocedure(identity)::oid from pg_temp.xb_ss_reference where kind='wrapper'
90
+ and identity='storage.search(text,text,integer,integer,integer,text,text,text,text,text)'
91
+ and not exists(select 1 from pg_temp.xb_ss_problems())
92
+ $$;
@@ -0,0 +1,141 @@
1
+ # #667: finite Storage `search` disposition
2
+
3
+ This test-only admission is for exactly
4
+ `storage.search(text,text,integer,integer,integer,text,text,text,text,text)`.
5
+ It adds no application migration or runtime privilege. The delimiter listing and
6
+ `realtime.apply_rls` remain unadmitted, and this is not whole-PR acceptance.
7
+
8
+ ## Bound source and complete constructor inventory
9
+
10
+ The native input is CI run `40573455512`, job `122433487035`, protocol-2 catalog
11
+ SHA256 `9582cf9fce0dd7ec70ad5f16bbca3c906aa5d9312a540348a251306f79241aca`.
12
+ The search definition SHA256 is
13
+ `554f4855e4490792b6c854ba68e622f39f004515d092e7409b0167a44b4acc99`.
14
+ The owned fixture uses cached PostgreSQL 17.11.0.004; CI uses 17.11.0.006.
15
+ The selective seven-routine reconstruction inherits the previously reviewed
16
+ target/helper DDL and adds the captured search definition with native owner and
17
+ ACL. It is not a reconstruction of the entire native platform.
18
+
19
+ The earlier delegate parsed 103 sampled variants and observed an offset mutant.
20
+ That investigation is retained but supplies no complete-constructor claim.
21
+ `scripts/lib/agent-board-667-search-templates.mjs` now lexes the entire captured
22
+ body, excluding comments and quoted strings from the procedural statement census.
23
+ It accepts a bounded statement grammar and rejects unclassified statements.
24
+
25
+ The constructor analysis follows IF/ELSIF/ELSE and CASE branches with separate
26
+ environments and unions their literal domains. Repeated uses of a variable share
27
+ one selected value, rather than independently selecting contradictory format
28
+ directions. It follows every assignment that contributes to executable SQL.
29
+ Only literals, concatenation, CASE-selected domains and `format` are accepted
30
+ constructors. Caller text cannot become executable SQL. SQL-constructor mutation
31
+ inside a loop is refused; in this captured body the constructor domains are
32
+ fixed before the loop. All four `EXECUTE` sites must be visited.
33
+
34
+ The result is a conservative over-approximation, not sampled caller values:
35
+
36
+ | Source site | Non-null query shapes |
37
+ | --- | ---: |
38
+ | non-name format | 8 |
39
+ | initial descending seek | 18 |
40
+ | marker peek | 90 |
41
+ | record batch | 36 |
42
+
43
+ It includes unreachable combinations such as name sorting in the non-name arm.
44
+ Extra combinations increase the refusal surface; they are not runtime coverage.
45
+ The nullable peek alternative supplies no executable SQL; a positive PostgreSQL
46
+ control verifies the `22004` refusal for a null `EXECUTE` argument.
47
+
48
+ All 152 dynamic shapes, all 13 static SELECTs and 176 scalar expressions become
49
+ 341 temporary parser views. The expressions include declarations, assignments,
50
+ conditions, CASE selectors, exit conditions, USING arguments, RAISE arguments
51
+ and the SQL-constructor expressions themselves. Bound data is replaced with
52
+ typed null expressions derived from the native argument catalog and declarations.
53
+ No parser view is queried. Every discovered `v_current` field is checked against
54
+ all 36 parsed batch descriptors and the reviewed object-column types/modifiers/
55
+ collations, so the record type used for overload resolution is proved positively.
56
+
57
+ ## Catalog and effect closure
58
+
59
+ The guard first requires the existing native timestamp/target/dispatch proof,
60
+ the exact search declaration/security, and a resolution census over every
61
+ overload and shadow of the discovered callable names. It then parses the frozen
62
+ inventory. A changed upstream source requires a new reviewed inventory; no CI
63
+ failure automatically refreshes a hash or reference.
64
+
65
+ Executable OIDs come from `pg_depend` and stored parser nodes because pinned
66
+ built-ins are deliberately absent from `pg_depend`. Function support/dependency
67
+ and catalog-derived aggregate callback edges recurse. The current search graph
68
+ has no aggregate; adding one requires an explicit disposition. Every reached
69
+ non-helper executable is a reviewed PostgreSQL C/internal primitive. The only
70
+ SQL helper is the exact prefix helper, whose body/effects are provided by the
71
+ separately reviewed timestamp proof. New callbacks or metadata drift name
72
+ themselves and close exact-OID admission.
73
+
74
+ The finite primitive effect review is separate from the namespace restriction
75
+ used when generating references. The 31 reached primitive identities comprise
76
+ text/array slicing, formatting, normalization and comparison; integer arithmetic/
77
+ comparison/conversion; timestamp comparisons; the ILIKE planner-support callback;
78
+ and the target's `now`/UUID defaults. None is classified as pure merely because it
79
+ is in pg_catalog. The defaults do not execute during SELECT; including their
80
+ dependencies is conservative. Generic formatting/array operations also require
81
+ the registered type/output dispatch proof. A new reached PostgreSQL primitive
82
+ still requires a fresh effect review, not just a regenerated declaration hash.
83
+
84
+ The existing conversion proof supplies registered type/operator/cast/range/
85
+ operator-family/text-search/language/access-method dispatch. The peer target
86
+ proof binds objects columns, defaults, generated expressions, constraints,
87
+ indexes, ownership, ACL and schema security, and refuses policies, rewrite rules
88
+ and inheritance. Collations are also bound. These are dependency checks, not a
89
+ schema/owner/extension/volatility exemption. An omission of the peer check is
90
+ causally tested against a real changed SELECT policy.
91
+
92
+ Source/library/security fields are compared with the native catalog. Additional
93
+ full declarations collected from the owned image remain conditional on equality
94
+ in live native CI. Metadata hashes do not attest C binaries or arbitrary
95
+ privileged SQL.
96
+
97
+ ## Executed witnesses
98
+
99
+ Native behavior has 42 assertions over own rows: name/date ordering, offsets,
100
+ prefixes, search data, versions, delete markers, exact leaf/folder fields and
101
+ service/authenticated role behavior. These are representative native witnesses,
102
+ not a claim that every Storage feature or query combination ran. The native
103
+ profile has 18 assertions; the injected-overload control has four. Absent-native
104
+ branches get real absence/no-admission assertions and zero native-call credit.
105
+
106
+ The counted runtime, guard and extra ledgers contain 66 complete phases and
107
+ 1,504 pgTAP assertions with 25 planned red observations. A separate whole-class
108
+ opaque control has real outer exits 0/1/0 and 59 emitted assertions per phase:
109
+ an unrelated opaque RPC remains named and rejected. Those three phases add 177
110
+ inner assertions; expected red inner failures are not suite passes.
111
+
112
+ The source-inventory compiler has 11 named unit tests. Nineteen baseline/red/
113
+ restored phases execute 209 unit tests and nine named assertion-failure phases.
114
+ Unit-test counts are not pgTAP assertion counts or distinct mutation-family credit.
115
+ The helper glob already includes these unit tests in the after-migration gate
116
+ and CI. No test-list or workflow weakening was added.
117
+
118
+ Mutants cover source offsets, field projection, version/marker filtering, search
119
+ input, sort direction, definer/RLS behavior, DML effects, target/catalog drift,
120
+ support edges, peer dependencies, record types, inventory omissions and overloads.
121
+ Installed definitions/catalogs are retained before assertions; restored runs and
122
+ applicable exact-definition comparisons are retained. The unrelated opaque
123
+ control preserves the exact routine-OID correlation.
124
+
125
+ A live INSERT trigger is invoked by own DML and not by native SELECT. A
126
+ DML-performing reader mutant fails that distinction. A real policy callback
127
+ writes its own marker during the native SELECT and remains unadmitted; removing
128
+ that fixture write fails its causal marker assertion. STABLE alone is not purity.
129
+
130
+ The first marker-filter mutation survived because its marker sorted after a
131
+ folder boundary and was hidden by static peek. That attempt receives zero kill
132
+ credit and is preserved. The final fixture interleaves the marker between leaves;
133
+ the same omission then fails named assertions with all 42 emitted. Earlier
134
+ pre-record-type repetitions and delegate observations remain separate and earn
135
+ no additional distinct-family credit. Backend-local temporary-schema names are
136
+ normalized only in temporary guard-function headers for source readback; bodies
137
+ and attributes are compared in full, with raw definitions retained.
138
+
139
+ All original product/runtime/isolation inputs remain unchanged. Existing core
140
+ isolation evidence is not new native-platform race evidence. Full release and
141
+ whole-PR review remain separate from this finite disposition.