Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 19:30 UTC
docs(mapping): append inert draft storage evidence and real approval blockers
davoodmehraban89 committed
Oct 30, 2026 at 19:38 UTC
5089bd61b09f8dbfc15935f9becdd8bffc818813
1 file changed
+12
docs/PROJECT_LOG.md
+12
@@ -327,3 +327,15 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
327
- Files allowed: batch review module, change preview module, batch tests, new focused spec/plan, append-only log/handoff. No accounting source XLSX/PDF, `data/`, production DB, schema migration, dependencies, GitHub workflow, secrets or release.
328
- **Not approval:** no real authenticated approver, persisted audit log, transactionally isolated CAS/apply, Excel importer retrofit or actual financial reconciliation. Review does not write. Genuine distinct C1/C2/C3 and upstream merges blocked by Issues #39/#49/#43.
329
- Rollback while Draft: close without merging. Any authorized merged change requires a reviewed revert plan.
330
+
331
+### 2026-10-30 — Gate 3 persistent Unreviewed proposal evidence, Draft PR #53
332
+
333
+- [Draft PR #53](https://github.com/davoodmehraban89/Aram/pull/53) stacked on unmerged Draft PR #52 exact SHA `1063431b08a9e03e022aa9b8e6c5ed90bfb05395`, inherited #51/#50/#26 unmerged. Accepted `source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914` unchanged.
334
+- The backend has no trusted authenticated actor or approver boundary. To avoid fabricated authority, introduced **only inactive, durable `Unreviewed` proposals**; no review/approve/apply endpoint, no user identity or MappingRule mutation. DB CHECK `state = 'Unreviewed'` denies even direct `Approved` state writes in the tested schema.
335
+- New SQLAlchemy Core table `mapping_review_drafts` has independent `MetaData` to avoid being created prematurely by the legacy `20260820_01` migration's `Base.metadata.create_all`. Explicit additive `20261030_02` Alembic upgrade and downgrade creates/drops it in isolation. Required FK to year, unique request key/year, payload JSON, SHA-256 hash, timestamp.
336
+- Service stages only **current, review-ready** batch snapshots, rejects conflicting idempotency key reuse and pending ORM edits, reads only the explicitly scoped year, verifies stored hash and refuses old mapping/note/year snapshots. Caller controls commit/rollback; no rule application.
337
+- Tests-only `3ee1a4c44e9580ecc21a38ea26ea155841ebcaba`: [RED CI 41086027866](https://github.com/davoodmehraban89/Aram/actions/runs/41086027866) missing module collection failure. Initial implementation [CI 41086255707](https://github.com/davoodmehraban89/Aram/actions/runs/41086255707) **FAILED** due to teardown FK order of independent test table and pending-session error message; corrected fixture and early clean-session guard.
338
+- [GREEN CI 41086542121](https://github.com/davoodmehraban89/Aram/actions/runs/41086542121) **179 passed, 1 warning**, both migration upgrades/downgrades and compile success. Extra DB tamper/hash, unique-index and metadata/FK tests added on `fe167c7b480517cecf302e92427d75afe51f2bc4`: [CI 41086774270](https://github.com/davoodmehraban89/Aram/actions/runs/41086774270) **182 passed, 1 warning**, full migration and compile success. Docs-head CI still required.
339
+- No canonical accounting XLSX/PDF, `data/`, real production/customer DB, existing migration, dependency, workflow, secrets or binaries modified. The new migration is **not run on any user database**.
340
+- **NOT ACCEPTED:** proposal hash is unsigned/not tamper-proof against malicious DB access; no immutable accounting audit, authenticated decision workflow, transactional compare-and-set apply, dual-reviewer identities, legacy import gate, financial-source reconciliation or provider-specific concurrency test. All remain Issues #49/#39/#43, plus PR #25 migration reconciliation. Zero real C1/C2/C3 approvals, no merge.
341
+- Rollback while Draft: close without merge. A later accepted migration downgrade deletes unreviewed drafts and would require separately reviewed backup/recovery.