Birth Stage 2 QT-001 — 03 Metadata Repair Plan + Status
03 — Metadata Repair Plan + Status (Supertrack C)
Safe metadata repair = identity classification on collection_registry (birth_code_strategy, birth_code_column, birth_identity_source). Reversible, birth-neutral, invisible to the live gateway. APPLIED for 39; action-packed for 4.
Applied (committed, live)
3 set-based UPDATEs inside a self-guarding birth-neutral DO block (01_classify.sql):
- 32 →
synthetic_id, sourceinferred_from_existing_trigger - 6 →
column/code - 1 →
column/action_code
Rehearsed first in BEGIN..ROLLBACK: synth=32 code=6 action=1 ledger_plan=5, birth-neutral (1,210,868==1,210,868), ROLLBACK restored all 43 unclassified + 0 ledger. Then committed. Post-commit live read-back: strategy column=34 / synthetic_id=33 / unclassified=4 / legacy=3; resolver returns ELIGIBLE_SYNTHETIC/ELIGIBLE_COLUMN for classified, BLOCKED_UNCLASSIFIED for the 4.
Safety of the metadata write
- Birth-neutral: the only
collection_registrytrigger firing on an UPDATE ofbirth_code_*columns istrg_count_collection_registry(statement-level count refresh). The birth/desc/label/soft-gate triggers fire only on INSERT or on UPDATE OF other columns (governance_role, coverage_status, description, name, _dot_origin) — none touched. - Invisible to QT-002: live gateway does not read
birth_code_*. - No coverage_status changed (no log reinterpreted as governed; no exempt/deferred touched).
Action-packed (not auto-written)
4 NEEDS_OWNER (apr_request_types, binding_registry, nrm_doc_type_config, nrm_approval_rules). Owner decision: choose identity key AND reconcile the realtime trigger (add the code-field arg) so realtime and backfill agree; nrm_approval_rules also needs a single-key or synthetic-composite decision. These are governed/locked governance-infra tables.
Result
Resolvable identity count increased 31 → 70 (of 74). Remaining blockers are exactly recorded (4 needs-owner + 2 no-table).
Views
v_birth_stage2_metadata_repair_plan, v_birth_stage2_metadata_repair_status (APPLIED 39 / PENDING_OWNER 4), v_birth_stage2_metadata_no_go_guard (5/5: classified_39, unclassified_4, required_74, exempt_untouched_36, no_committed_backfill).