P3D — B3-A Readiness Rerun after B3-A2a + B3-A2b — Report
P3D — B3-A Readiness Rerun after B3-A2a + B3-A2b — Report
Date: 2026-05-12 Mode: READ-ONLY ONLY Mainline: P3D_BIRTH_SYSTEM_COMPLETION_PACK Status: PASS
Inputs
- B3-A1a species mapping seed: PASS (live)
- B3-A1b
dot_domain_rules → governance_infraseed: PASS (live) - B3-A2a variant function equivalence probe: PASS_ACCEPTED_WITH_NOTE — Option B (scoped sibling)
- B3-A2b
birth_registryexemption policy update: PASS (live row verified below)
Live Catalog Gates (all PASS)
| Gate | Check | Result |
|---|---|---|
| 1 | public.collection_registry exists |
✓ true |
| 2 | All 6 B3-P policy columns present | ✓ 6/6 |
| 3 | public.species_collection_map exists |
✓ true |
| 4 | public.entity_species exists |
✓ true |
| 5 | public.birth_registry exists |
✓ true |
| 6 | public.fn_birth_registry_auto resolved |
✓ oid 39232 |
| 7 | public.fn_birth_registry_auto_id resolved |
✓ oid 66750 |
Gate 10 — birth_registry exemption verified live
| Field | Value |
|---|---|
coverage_status |
BIRTH_EXEMPT_SYSTEM_LOG_OR_AUDIT ✓ |
coverage_scope_status |
IN_SCOPE ✓ |
coverage_exemption_reason |
SYSTEM_MANAGED: self-referential birth system table — recursive trigger risk ✓ |
coverage_review_owner |
GPT_B3A2 |
coverage_decided_at |
2026-05-12 11:04:48.432696+00 |
coverage_decided_by |
GPT_B3A2_REVIEW |
birth_registry_exempt_verified = true.
Policy Distribution (live)
| Metric | Value |
|---|---|
birth_required_total |
72 |
birth_required_in_scope |
72 (all BIRTH_REQUIRED rows are IN_SCOPE) |
exempt_count |
36 |
policy_unknown_count (NULL ∪ UNCLASSIFIED_NEW ∪ BIRTH_DEFERRED_NEEDS_REVIEW) |
58 |
total collection_registry rows |
166 |
Exempt breakdown
| coverage_status | n |
|---|---|
BIRTH_EXEMPT_DERIVED_CACHE |
4 |
BIRTH_EXEMPT_STRUCTURAL_JUNCTION |
20 |
BIRTH_EXEMPT_SYSTEM_LOG_OR_AUDIT |
12 (includes birth_registry) |
Working Set (BIRTH_REQUIRED ∩ IN_SCOPE, excluding birth_registry)
trigger_candidate_count = 72 (the 72 BIRTH_REQUIRED+IN_SCOPE rows minus birth_registry which is now exempt — note: birth_required_total=72 already does not count birth_registry because its status is no longer BIRTH_REQUIRED).
Prerequisite Coverage (live)
| Metric | Value |
|---|---|
missing_species_mapping_count |
0 |
missing_physical_table_count |
0 |
Every candidate has both a public base table and at least one species_collection_map row.
Trigger Validation by Function OID
Accepted function OIDs:
| Function | OID |
|---|---|
public.fn_birth_registry_auto (global) |
39232 |
public.fn_birth_registry_auto_id (scoped: governance_relations, law_dot_enforcement, law_jurisdiction) |
66750 |
Triggers were detected by pg_trigger.tgfoid, not by name.
| Metric | Value |
|---|---|
already_wired_count |
63 |
variant_sibling_accepted_count |
3 (all three scoped collections wired) |
missing_trigger_count |
9 |
Variant sibling triggers (Option B accepted scope — all live)
| collection | trigger | function | validity |
|---|---|---|---|
governance_relations |
trg_birth_governance_relations |
fn_birth_registry_auto_id |
valid_scoped_sibling |
law_dot_enforcement |
trg_birth_law_dot_enforcement |
fn_birth_registry_auto_id |
valid_scoped_sibling |
law_jurisdiction |
trg_birth_law_jurisdiction |
fn_birth_registry_auto_id |
valid_scoped_sibling |
No out-of-scope sibling triggers detected. No fn_birth_registry_auto_id triggers exist outside the 3 approved collections.
Collections still missing a valid birth trigger (= 9)
apr_action_types
apr_approvals
apr_request_types
binding_registry
dot_domain_rules
field_type_equivalences
normative_relations
nrm_approval_rules
nrm_doc_type_config
Gate 15 — Clean Trigger Candidate Set for B3-A3
Filters applied (all live, AND-combined):
coverage_status='BIRTH_REQUIRED'ANDcoverage_scope_status='IN_SCOPE'- Has
publicBASE TABLE - Has at least one
species_collection_maprow - NOT already wired to an accepted birth function (by OID; respecting sibling scope)
- NOT policy-exempt (already excluded by status filter)
- NOT
birth_registry
clean_trigger_candidate_count = 9. Set:
apr_action_types
apr_approvals
apr_request_types
binding_registry
dot_domain_rules
field_type_equivalences
normative_relations
nrm_approval_rules
nrm_doc_type_config
The clean candidate set equals the missing-trigger set, because every missing-trigger candidate already has table + species mapping.
Gate 16 — Duplicate Birth Trigger Pairs (informational; not modified)
18 collections currently have two triggers on the same table both invoking fn_birth_registry_auto. Listed for awareness of B3-A3 / cleanup; this rerun did not modify them:
| collection | n_triggers | trigger names |
|---|---|---|
agents |
2 | birth_trigger_agents, trg_birth_agents |
checkpoint_sets |
2 | birth_trigger_checkpoint_sets, trg_birth_checkpoint_sets |
checkpoint_types |
2 | birth_trigger_checkpoint_types, trg_birth_checkpoint_types |
collection_registry |
2 | birth_trigger_collection_registry, trg_birth_collection_registry |
dot_tools |
2 | birth_trigger_dot_tools, trg_birth_dot_tools |
entity_dependencies |
2 | birth_trigger_entity_dependencies, trg_birth_entity_dependencies |
entity_species |
2 | birth_trigger_entity_species, trg_birth_entity_species |
meta_catalog |
2 | birth_trigger_meta_catalog, trg_birth_meta_catalog |
modules |
2 | birth_trigger_modules, trg_birth_modules |
system_issues |
2 | birth_trigger_system_issues, trg_birth_system_issues |
table_registry |
2 | birth_trigger_table_registry, trg_birth_table_registry |
tasks |
2 | birth_trigger_tasks, trg_birth_tasks |
taxonomy |
2 | birth_trigger_taxonomy, trg_birth_taxonomy |
taxonomy_facets |
2 | birth_trigger_taxonomy_facets, trg_birth_taxonomy_facets |
ui_pages |
2 | birth_trigger_ui_pages, trg_birth_ui_pages |
workflow_change_requests |
2 | birth_trigger_workflow_change_requests, trg_birth_workflow_change_requests |
workflow_steps |
2 | birth_trigger_workflow_steps, trg_birth_workflow_steps |
workflows |
2 | birth_trigger_workflows, trg_birth_workflows |
Note: B3-A3 trigger-install design should pick a single canonical trigger-name convention (birth_trigger_<collection> vs trg_birth_<collection>) and consider whether to dedupe.
Gate 17 — description_policy='unclassified' count (informational; not classified)
description_policy_unclassified_count = 147 of total_rows = 166. Out of B3-A scope; flagged only.
Hard-Boundary Compliance
| Boundary | Status |
|---|---|
| No INSERT | ✓ |
| No UPDATE | ✓ |
| No DELETE | ✓ |
| No DDL | ✓ |
| No trigger create/drop/alter | ✓ |
| No function create/patch | ✓ |
| No policy mutation | ✓ |
| No B3-A3 trigger install | ✓ |
| No Phase 5C2 | ✓ |
| No UI cutover | ✓ |
Whole rerun was psql SELECT-only inside a -v ON_ERROR_STOP=1 session against directus DB on container postgres (VPS 38.242.240.89). No BEGIN/UPDATE/INSERT/DELETE/DDL executed.
Recommendation
B3-A3 trigger install design/prompt can be drafted now. All prerequisites for the 9 remaining collections are satisfied:
- Policy gate: 9 collections in BIRTH_REQUIRED+IN_SCOPE, not exempt, not
birth_registry. - Structural gate: each has a
publicbase table. - Species gate: each has at least one
species_collection_maprow. - Function gate:
fn_birth_registry_autoresolves live; the 3-collection sibling scope offn_birth_registry_auto_idis fully covered and does not need expansion for these 9 (they all take the global function unless GPT extends scope). - Trigger-name collision risk: pick a single canonical name (recommend
trg_birth_<collection>) — the 9 candidates currently have no birth trigger of either name. - Duplicate-pair cleanup is independent of the new install (out of B3-A3 install scope unless the design explicitly bundles cleanup).
Final Response Fields
b3a_readiness_after_b3a2_status=PASS
birth_required_total=72
birth_required_in_scope=72
exempt_count=36
already_wired_count=63
missing_trigger_count=9
missing_species_mapping_count=0
missing_physical_table_count=0
trigger_candidate_count=72
clean_trigger_candidate_count=9
variant_sibling_accepted_count=3
birth_registry_exempt_verified=true
fn_birth_registry_auto_resolved=true
fn_birth_registry_auto_id_resolved=true
trigger_validation_by_function_oid=true
no_mutation_performed=true
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3a-readiness-rerun-after-b3a2-report.md
next_recommended_action=GPT_REVIEW_THEN_OPUS_DRAFT_B3A3_TRIGGER_INSTALL_DESIGN