Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 22:00 UTC
docs(mapping): define safe change-preview contract and evidence
davoodmehraban89 committed
Oct 30, 2026 at 17:53 UTC
9b4564a8c55deb87eafafc9a8700e64a8547c182
1 file changed
+24
docs/superpowers/plans/2026-10-30-gate3-mapping-change-preview.md
new
+24
@@ -0,0 +1,24 @@
1
+# Gate 3 mapping preview — test-first execution record
2
+
3
+**Task:** [Issue #49](https://github.com/davoodmehraban89/Aram/issues/49), first safe slice. **Branch:** `codex/aram-gate3-mapping-change-preview-20261030`, stacked on Draft PR #26 `185e47f031902a8918c93c8dbb420122e7408403`, [Draft PR #50](https://github.com/davoodmehraban89/Aram/pull/50).
4
+
5
+## Checked evidence
6
+
7
+1. [x] Verified accepted `source-data-cleanup` at `7dc864fd032f0c4ae4d650d89304a01286a6d914`, Draft parent #26 exact SHA; created dedicated child branch, no merge.
8
+2. [x] Test-only commit `5190535bf2e735f741bc65b61bb2ae8492cd1c61`: [RED GitHub CI 41070855173](https://github.com/davoodmehraban89/Aram/actions/runs/41070855173), **2 expected behavior failures and 88 passes, 1 warning**; both failures demonstrated acceptance of an obsolete same-year NoteDefinition target on initial save and idempotent replay.
9
+3. [x] Fix commit `0d7f2cbad255b44eccd326c9255b9787c65f4385`: current-note check in MappingRule service before idempotent replay.
10
+4. [x] Add new `mapping_change_preview.py`, read-only old/new snapshot, nonnegative base-version precondition, latest note/account checks, stable unsigned digest and verifier; synthetic tests in `test_mapping_change_preview.py`, including stale/forged/pending cases.
11
+5. [x] Combined code/test head `494af5d0f8442d193591542e1076727f892ebc87`: [GREEN CI 41071138346](https://github.com/davoodmehraban89/Aram/actions/runs/41071138346), **117 passed, 1 warning**. Migration and compile steps need explicit verification in final-head run before reporting success.
12
+6. [ ] Re-fetch exact final head after spec, plan, append-only project log and handoff, compare complete changed path inventory and CI status. Final-head test evidence is authoritative; code-only tests cannot certify later edits.
13
+7. [ ] Separate C1 technical/security, C2 qualified accounting and C3 release/acceptance controls from distinct non-author identities; **BLOCKED by Issue #39**. Parent #26 must be accepted before child; rebase to then-current accepted SHA, rerun CI, and review again.
14
+8. [ ] Deliver the *actual* authenticated review and approval workflow separately: distinct reviewer permissions, Draft→Reviewed→Approved, version CAS inside provider DB transaction, persisted audit and rollback, note/subnote and source ledger reconciliation. Preview SHA alone cannot authorize saving or imply approval.
15
+
16
+## Exact scope
17
+
18
+- `backend/src/aram_backend/mapping_service.py`: current target version guard only.
19
+- `backend/tests/test_mapping_service.py`: negative/valid regression.
20
+- `backend/src/aram_backend/mapping_change_preview.py`: new read-only preparation module.
21
+- `backend/tests/test_mapping_change_preview.py`: synthetic tests.
22
+- This spec and plan, append-only `docs/PROJECT_LOG.md` and `docs/handoff/LATEST_HANDOFF.md`.
23
+
24
+No schema migrations, dependencies, workflows, customer or canonical financial XLSX/PDF, `data/`, production DB, API credentials, binary or Windows release. **Do not merge** until independently accepted.