KB-612F rev 2

dot-iu-cutter v0.2 — P0-6 + P0-5 Remainder Rollback Draft (r2, A-1 resolved) (2026-05-16)

5 min read Revision 2
dot-iu-cutterdieu44v0.2p0-6p0-5-remainderddl-authoringrollback-draftr2a1-resolvednot-executed

dot-iu-cutter v0.2 — P0-6 + P0-5 Remainder Rollback Draft

document_path: knowledge/dev/laws/dieu44-trien-khai/v0.2-ddl-authoring/dot-iu-cutter-v0.2-p0-6-p0-5-remainder-rollback-draft-2026-05-16.md
revision: r2
supersedes: r1 (2026-05-16)
date: 2026-05-16
author: Agent (Claude Code CLI, Opus 4.7 1M)
phase: v0.2 — P0-6 + P0-5-remainder DDL AUTHORING REVISION (rollback draft r2; NOT executed)
a1_status: RESOLVED (no rollback-body change needed; structural drop only)
rollback_executed: false
dry_run_allowed: false (until GPT r2 review PASS)
production_migration_allowed: false

Rollback DRAFT — NOT executed. Bumped to r2 for package coherence with the r2 DDL draft. The rollback body is unchanged from r1: it is a pure structural DROP TABLE of the 4 empty tables and references no child column names, so the A-1 column-rename fix does not alter it. Must NOT run unless the r2 DDL execution actually occurred under explicit authorization and rollback is explicitly prompted.


§0 — r2 Note (why no body change)

a1_fix_scope: child column renames in the DDL draft (decision_id→entry_id,
  from_decision_id→from_entry_id, to_decision_id→to_entry_id) + FK targets.
rollback_dependency_on_column_names: NONE — rollback only DROPs the 4 tables.
r2_body_change: NONE. Revision bumped to keep the package at a single coherent
  revision and to carry the r1-superseded / dry-run-gated status flags.

§1 — Rollback Model

This migration adds only four empty tables, their 4 PKs, and 7 in-schema FKs. Reversal is a pure structural drop — no data migration, no restore, no decision_backlog_entry / manifest_* / tac_logical_unit / sandbox_tac touch (zero writers in v0.2).

among_the_4_new_tables:
  - NO parent→child FK exists BETWEEN the new tables.
  - All 7 FKs point to LIVE pre-existing tables (manifest_envelope,
    manifest_unit_block, decision_backlog_entry — NOT dropped) or are
    review_decision SELF-references.
  - review_decision self-FKs are removed by its own DROP TABLE (no CASCADE).
chosen_order: reverse creation (sweep_log, dependency, history, review_decision)
  — tidiness only; correctness independent of order.
no_pre_existing_table_dropped: TRUE

§2 — Rollback Draft r2 (NOT executed)

-- =====================================================================
-- dot-iu-cutter v0.2 — P0-6 + P0-5 REMAINDER ROLLBACK DRAFT (r2)
-- ⛔ DO NOT EXECUTE WITHOUT EXPLICIT GPT/USER PROMPT
--    (and only if the r2 DDL execution actually occurred)
-- body unchanged vs r1 (structural drop; no column-name dependency)
-- =====================================================================
BEGIN;

DROP TABLE cutter_governance.decision_backlog_sweep_log;
DROP TABLE cutter_governance.decision_backlog_dependency;
DROP TABLE cutter_governance.decision_backlog_history;
DROP TABLE cutter_governance.review_decision;   -- self-FKs removed with the table

COMMIT;

-- =====================================================================
-- END — NOTHING ABOVE EXECUTED. Plain DROP TABLE (no CASCADE): all 4
-- empty; no FK from any pre-existing object points INTO them.
-- =====================================================================

§3 — Data-Loss Assessment

data_loss_expected: NONE
reason: 4 tables created EMPTY, no INSERT/seed/backfill, zero writers in v0.2.
business_data_touched: NONE
pre_existing_objects: untouched (drop targets the 4 new tables only;
  decision_backlog_entry and its entry_id PK are NOT modified or dropped)

If any of the 4 tables is non-empty at rollback time → STOP / escalate (scope breach); do not silently DROP. DROP TABLE without CASCADE fails fast on any unexpected inbound dependency.

§4 — Rollback Trigger Conditions

rollback_only_if:
  - r2 DDL execution actually occurred under explicit authorization, AND
  - verification returned a hard_stop FAIL post-commit, OR GPT/User prompts it
post_commit_rollback_requires_explicit_prompt: TRUE
pre_commit_failure: single-transaction DDL auto-rolls-back; nothing persisted
agent_self_trigger: PROHIBITED

§5 — Post-Rollback Verification (authored, NOT executed)

Check Expected
all 4 gone (to_regclass ×4) all NULL
cutter_governance count back to 8
LIVE parents intact (5 v0.1 + alias + 2 manifest; decision_backlog_entry PK still entry_id) unchanged

§6 — Hard Boundaries

revision: r2
r1_superseded: TRUE
rollback_executed: FALSE
ddl_executed: FALSE
no_DROP_run: TRUE
no_psql_run: TRUE
no_mutation: TRUE
dry_run_allowed: FALSE (until GPT r2 review PASS)
production_migration_allowed: FALSE
output_form: p0_6_p0_5_remainder_rollback_draft_r2

End of P0-6 + P0-5-remainder rollback draft (r2; body unchanged, status bumped).

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.2-ddl-authoring/dot-iu-cutter-v0.2-p0-6-p0-5-remainder-rollback-draft-2026-05-16.md