P3D — Birth B3-A1a Species Mapping Seed Execution Report
P3D — Birth B3-A1a Species Mapping Seed Execution Report
Date: 2026-05-12 Mode: WRITE (INSERT-only into
species_collection_map; no DDL/function/trigger/entity_species change) Source: live PGdirectus@postgreson VPS 38.242.240.89, schemapublicStatus: PASS
Approved set (input)
| collection_name | species_code |
|---|---|
| apr_approvals | approval_request |
| apr_action_types | approval_request |
| apr_request_types | approval_request |
| nrm_approval_rules | governance_infra |
| nrm_doc_type_config | governance_infra |
| binding_registry | governance_infra |
| field_type_equivalences | catalog |
Explicitly excluded: dot_domain_rules. The transaction asserted this exclusion before any other gate.
Gates (all PASSED inside transaction)
| # | Gate | Result |
|---|---|---|
| 0 | Advisory lock p3d_birth_b3a1a_species_seed acquired |
OK |
| Pre | dot_domain_rules not in approved set |
OK |
| 1 | Every target exists in collection_registry |
7/7 |
| 2 | Every target has coverage_status='BIRTH_REQUIRED' |
7/7 |
| 3 | Every target has coverage_scope_status='IN_SCOPE' |
7/7 |
| 4 | Every species exists in entity_species |
7/7 (approval_request, governance_infra, catalog) |
| 5 | No (collection_name, species_code) pair already exists |
7/7 missing → 7 to insert, 0 already exists |
| 6 | Single transaction + advisory lock | OK |
| 7 | INSERT only exact approved pairs (no extras) | OK (7 rows inserted) |
| 8 | Post-insert: all 7 pairs present | OK (verified 7 = 7) |
| 9 | Post-insert: dot_domain_rules has 0 mapping rows |
OK |
Insert outcome
Inserted rows (rollback keys):
| id | collection_name | species_code |
|---|---|---|
| 162 | apr_approvals | approval_request |
| 163 | apr_action_types | approval_request |
| 164 | apr_request_types | approval_request |
| 165 | nrm_approval_rules | governance_infra |
| 166 | nrm_doc_type_config | governance_infra |
| 167 | binding_registry | governance_infra |
| 168 | field_type_equivalences | catalog |
is_primary = true for all 7 (column default).
already_exists_count = 0, blocked_count = 0.
Side-effect note (non-violation)
species_collection_map carries a pre-existing AFTER INSERT trigger birth_trigger_species_collection_map bound to fn_birth_registry_auto. As a consequence of the 7 INSERTs, 7 corresponding birth_registry rows will have been auto-emitted by that existing trigger. This is not a new trigger creation — the trigger pre-existed; B3-A1a did not install or modify any trigger or function. Listed here for transparency.
Rollback SQL (logged)
Exact-id-scoped rollback restricted to the 7 IDs above:
DELETE FROM public.species_collection_map WHERE id IN (162,163,164,165,166,167,168);
rollback_keys_captured = true.
Execution log
RUN_STARTED_AT = 2026-05-12T09:25:34Z
RUN_ENDED_AT = 2026-05-12T09:25:35Z
LOG_FILE = /var/log/incomex/p3d/p3d-birth-b3a1a-species-seed-20260512T092530Z.log
HOST = 38.242.240.89
psql exit_code = 0
COMMIT = success
Final response
b3a1a_species_seed_status=PASS
approved_mapping_count=7
inserted_count=7
already_exists_count=0
blocked_count=0
dot_domain_rules_touched=false
transaction_committed=true
rollback_keys_captured=true
no_entity_species_insert=true
no_trigger_created=true
no_ddl=true
report_path=knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-b3a1a-species-mapping-seed-report.md
next_recommended_action=GPT_REVIEW_THEN_DOT_DOMAIN_RULES_SPECIES_DECISION
B3-A1a Species Mapping Seed | PASS | 2026-05-12