@davoodmehraban89 / Aram-2 Mirror · read-only / commits / bd5e483
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 3, 19:30 UTC

docs(mapping): require explicit recovery for pre-audit proposal records

davoodmehraban89 committed Oct 30, 2026 at 19:54 UTC bd5e48376a9308917c5458ef41d155c7cf71efb0
1 file changed +5
docs/superpowers/specs/2026-10-30-draft-staging-audit.md
+5
@@ -26,3 +26,8 @@ There is no authenticated finance approver, identity service, or active Mapping
26 The full authenticated Draft→Reviewed→Approved workflow, separation of author/approver, immutable **financial decision** audit with signed identity, atomic compare-and-set application, provider concurrency, rejected/rework state, recovery, traceable note/subnote source mapping and real fiscal-year financial reconciliation remain in [Issue #49](https://github.com/davoodmehraban89/Aram/issues/49) and [#43](https://github.com/davoodmehraban89/Aram/issues/43). Three real non-author C1/C2/C3 reviewers/branch controls remain [#39](https://github.com/davoodmehraban89/Aram/issues/39). Baseline migration is being separately redesigned under unmerged PR #25; revision reconciliation is mandatory before merge.
27
28 No approval can be recorded by this module; parent Draft PRs and this Draft cannot be merged or released without genuine independent acceptance. A migration downgrade destroys event evidence: use only on disposable CI database until an authorized backup/retention and recovery policy is approved.
29 +
30 +
31 +## Fail-closed upgrade from earlier candidate migration
32 +
33 +Before creating the new audit table or triggers, `20261030_03.upgrade` checks the existing `mapping_review_drafts` table for even one row. If any draft already exists, the upgrade **raises RuntimeError before executing any DDL**. Earlier `20261030_02` drafts lack independently recorded `DraftStaged` events; fabricating them retrospectively would misstate provenance. An owner-approved migration strategy must distinguish legacy unwitnessed drafts from newly witnessed drafts and include retention/backups before any live upgrade. The synthetic adversarial test intentionally adds a draft and confirms migration refuses the upgrade, including a monkeypatched DDL method that must never run. This blocks direct in-place upgrades of nonempty candidate databases by design, not an installation defect to bypass.