QT-001 Apply DOT Harden — 07 Rollback Rehearsal
07 — Rollback Rehearsal (Supertrack G)
Two independent rehearsals proved the real writer with zero committed births.
A. Self-rolling-back function rehearsal — fn_qt001_run_rehearsal('REHEARSAL-2026-06-06-01', true)
The function applies all 5 TIER1 targets inside an inner subtransaction, runs a rerun pass, runs a negative false-done test, then forces a subtransaction rollback (sentinel RAISE) so all births vanish; only a birth-neutral audit summary row persists. Result (v_qt001_apply_rehearsal_result):
- per-collection applied == expected, real_delta matching: dot_domain_rules 67/67, apr_approvals 42/42, normative_relations 18/18, apr_action_types 6/6, field_type_equivalences 4/4.
- total_applied = 137 · rerun_delta = 0 · false_done_blocked = true · rollback_clean = true · birth_before = birth_after = 1,210,898.
Guard v_qt001_rerun_delta0_rehearsal_guard — rehearsal_exists, total_applied_137, rerun_delta_0, rollback_clean, false_done_blocked, birth_before_eq_after — all pass.
B. Explicit BEGIN..ROLLBACK rehearsal (psql transaction)
- birth_before = 1,210,898.
- Opened a temp execute permit (v2) for the smallest target
field_type_equivalences(4);fn_dot_birth_qt001_apply(...,p_execute:=true)→result=done, mid-tx births for the collection = 4 (was 0). - Rerun dry-run for the same collection inside the tx →
expected_delta = 0(idempotent). - Divergent collection probe:
fn_dot_birth_qt001_apply('law_dot_enforcement', ... p_dry_run:=true)→no_go_reason = parity_divergence(correctly blocked). ROLLBACK→ birth_after = 1,210,898, field_type_equivalences births back to 0.
Post-rehearsal fail-closed state
open_execute_permits_v2 = 0 · permit_v2 rows = 0 · ledger_v2 rows = 0 · done_ledgers_v2 = 0. The only committed artifact is the qt001_apply_rehearsal_audit summary (birth-neutral).
What this proves
The runtime — not pseudocode — produces exactly the expected delta, is idempotent on rerun, fails-closed on false claims and on parity/collision, and is fully reversible. No real backfill was committed.