KB-41D4
17 — Rollback + Migration Plan
2 min read Revision 1
rprollbackmigration2026-06-05
17 — Rollback + Migration Plan
Applied (3 birth-free transactions, all before==after on birth_registry)
01_apply_fix_stack.sql— 8 views (ledger_live_v2, static_mismatch_v2, grouped_children_v2, grouping_surface_v2, current_v2, invariant_v2, proof_computed_v2, dashboard_v3).02_apply_generator_dashboards_regression.sql— 7 views + 1 function (generator_manifest, fn_rp_generate_universal_contract_sql, reduction_plan, autoscale_readiness, synthetic_packet, count_reliability_dashboard_v2, no_hardcode_audit_dashboard_v2, regression_guard).03_apply_alias_repoints.sql— repointed 4_currentaliases (universal contract, proof matrix, acceptance dashboard, count reliability) + added 2 new (invariant_current,static_literal_live_mismatch_current).
Migration path (Phase-18 model)
- Old views retained — reliability contract, v1 invariant, computed v1, ui_acceptance_dashboard_v2, count_reliability_dashboard all untouched.
_currentaliases point to latest safe — done (now v2/v3). Aliases have no DB dependents (verified) → repoint is safe.- UI moves to
_current— UI binds_currentonly (operator step; see 13/14). - Generator replaces v1 later —
fn_rp_generate_universal_contract_sql()preview ready; operator applies the generated view + owner registers synthetic axes (next macro).
No existing consumer broken: universal-contract + proof-matrix repoints are column-supersets (CREATE OR REPLACE); acceptance + count-reliability changed shape → DROP+CREATE (no dependents).
Rollback — 99_rollback.sql (single transaction)
Restores all 4 _current aliases to their original targets, drops the 2 new aliases, and drops the entire v2/v3 stack (15 views + 1 function) in dependency-safe order. Fully reverses the macro; prod v1 surfaces are recovered unchanged.