KB-7A4F

One-Roof Prod Release Ultra-Macro — 06 Production Rollback Executor (2026-06-03)

3 min read Revision 1
one-roof-governanceproduction-releaserollback2026-06-03

06 — Production Rollback Executor

Production starts greenfield (axis substrate absent), so rollback is a clean teardown to the exact byte-baseline — simpler and more complete than the clone's mid-state restore (which had to re-create pre-finalization view bodies; that complexity does not apply here).

Full rollback — sql/prod_rollback/99_rollback_full.sql

  • DELETE FROM governance_object_ownership WHERE created_by='PROD_OWNERSHIP_SEED_2026-06-03' (undoes Tier 3 → gap 0→210).
  • DROP FUNCTION fn_governance_scan.
  • DROP VIEW the 31 axis/reconcile/drift/UI views (CASCADE, reverse-dependency order).
  • DROP TABLE the 11 substrate/scanner/topic tables (CASCADE).
  • Does NOT touch the 5 pre-existing base seam/ownership views.
  • Ends with a baseline assertion: ownership=0, gap=210, axis tables=0 — else raises. Idempotent (IF EXISTS / tagged DELETE). Single BEGIN..COMMIT. db=directus guard.

Per-tier rollback — sql/prod_rollback/per_tier_rollback.sql

Idempotent, tagged blocks to undo a single tier, applied in reverse order:

  • T6: TRUNCATE governance_drift_state / governance_scan_run / governance_event_log (structure stays).
  • T5: delete topic_label_reconcile_decision / topic_taxonomy_map / topic axis_assignment / topic axis_value / topic axis_registry by tag PROD_topic_2026-06-03.
  • T4: delete containment axis_object_ownership / axis_assignment (tag PROD_containment_2026-06-03) / CR-CONTAIN-ASSIGNED / containment values + registry.
  • T3 (sovereign reversal): DELETE … WHERE created_by='PROD_OWNERSHIP_SEED_2026-06-03' → gap 0→210.
  • T2: delete CR-RESP-ALL / responsibility values + registry.
  • T1: see full teardown.

Safety properties

  • IdempotentIF EXISTS and tag-scoped DELETEs; safe to re-run.
  • Key-scoped — every data DELETE keys on a created_by/tag introduced by this release; no unrelated rows touched. Tag selectivity is verifiable read-only before executing, e.g. SELECT count(*) FROM governance_object_ownership WHERE created_by='PROD_OWNERSHIP_SEED_2026-06-03';.
  • Restores inert seams — the 5 base seam views are untouched and continue to read the (re-emptied) governance_object_ownership → gap returns to 210.
  • Verified — full rollback self-asserts baseline; on partial-tier rollback, re-run prod/90_verify.sql (will fail on the intentionally-reverted invariant — expected) or prod_verify/baseline_probe.sql.

NOT executed on production.

Back to Knowledge Hub knowledge/dev/reports/architecture/one-roof-production-release-engineering-ultra-macro-2026-06-03/06-production-rollback-executor.md