KB-3823

GPT Review — B3-A2a Variant Function Equivalence Probe — PASS Accepted — 2026-05-12

4 min read Revision 1
p3dbirth-systemb3a2avariant-functiongpt-reviewpass-accepted2026-05-12

GPT Review — B3-A2a Variant Function Equivalence Probe — PASS Accepted — 2026-05-12

Scope reviewed

Reviewed Agent report:

  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3a2a-variant-function-equivalence-probe-report.md

Related governing artifacts:

  • knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b3a2-blocker-resolution-design.md rev7
  • knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3a2-blocker-resolution-design-report.md rev4
  • knowledge/dev/laws/dieu44-trien-khai/reviews/opus-confirmation-gpt-patches-b3a2-2026-05-12.md

Verdict

Status: PASS_ACCEPTED_WITH_NOTE

fn_birth_registry_auto_id is accepted as a safe contract sibling for the 3 current variant-bound collections, subject to validator/health-check guardrails.

Evidence accepted

Agent captured live pg_get_functiondef() for both functions and verified:

  • fn_birth_registry_auto resolved live as OID 39232.
  • fn_birth_registry_auto_id resolved live as OID 66750.
  • Variant trigger count = 3.
  • Variant-bound collections:
    • governance_relations
    • law_dot_enforcement
    • law_jurisdiction
  • No mutation performed.

Functional comparison

The variant is equivalent for current live conditions except one observable surface difference:

fn_birth_registry_auto    → entity_code = collection_name || '::' || id
fn_birth_registry_auto_id → entity_code = collection_name || ':'  || id

This separator divergence is accepted as a legacy-format difference, not a birth-semantics difference, because:

  • birth_registry has UNIQUE(entity_code) and both functions use ON CONFLICT(entity_code) DO NOTHING.
  • The 3 variant tables already have birth rows with the single-colon format.
  • Swapping to the contract function now would introduce mixed :/:: formats over time for the same collections.

Other divergences are unreachable in current state:

  • _dot_origin column is absent on the 3 variant tables, so both functions produce the same synthetic origin.
  • collection_registry.governance_role='governed' is populated for all 3, so the different fallback default is not used.
  • Dedup scope difference is dominated by UNIQUE(entity_code).

Decision

Choose Option B — whitelist the variant for current B3-A validator/readiness purposes.

Rationale:

  1. Zero trigger/function mutation.
  2. Preserves existing single-colon entity_code convention for the 3 variant tables.
  3. Avoids introducing mixed entity_code separators for future rows.
  4. Source-level probe confirms current semantic safety.

Required guardrails

B3-A3, B3-F, and future health checks must:

  1. Resolve accepted birth functions live by name, not hardcoded OID:
    • fn_birth_registry_auto
    • fn_birth_registry_auto_id
  2. Capture or compare function-definition hashes before accepting the sibling status. If either function body changes after this review, re-run equivalence probe before validator acceptance.
  3. Keep variant acceptance scoped to the 3 current variant-bound collections unless another design/review extends it.
  4. Assert collection_registry.governance_role IS NOT NULL for BIRTH_REQUIRED + IN_SCOPE collections, especially variant-bound collections, so fallback defaults remain unreachable.
  5. Document entity_code separator legacy difference as accepted for these 3 collections.

Not approved

  • No migration from fn_birth_registry_auto_id to fn_birth_registry_auto is approved now.
  • No function patch is approved.
  • No trigger install is approved by this review.

Next action

Proceed to B3-A2b birth_registry exemption policy update prompt/execution review.

b3a2a_review_status=PASS_ACCEPTED_WITH_NOTE
variant_whitelist_decision=APPROVE_OPTION_B_SCOPED_WHITELIST
validator_whitelist_recommended=true_with_guardrails
trigger_install_allowed=false
pg_mutation_allowed=false_until_b3a2b_prompt_review
phase5c2_migration_allowed=false
next_recommended_action=B3A2B_BIRTH_REGISTRY_EXEMPTION_POLICY_UPDATE
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-b3a2a-variant-function-equivalence-probe-pass-2026-05-12.md