arena/094f314c-aram
Aram Project Status
Canonical status entry point. Update this file in every meaningful pull request. Always fetch the live accepted-branch head before acting; a committed snapshot is not a substitute for GitHub remote evidence.
Repository baseline
- Repository: davoodmehraban89/Aram
- Accepted branch: source-data-cleanup
- Recorded accepted control event: PR #18, reviewed head
fcbeb7387218e9ab294318ae462ed59de717fc95, squash merge f213d321ff4cd7d3d6fa65ba78dc48f090ee846b - Durable post-merge acceptance record: PR #19, reviewed head
b9059592409606a0a4f11a71c30778cff158b6b6, squash merge 77f9f595ccfe67a87b11024ff0f6143629dba438 - Before starting new work, fetch the live
source-data-cleanuphead; this record intentionally avoids a self-referential current-head claim - Product objective: a controlled, auditable accounting and financial-statement workflow that preserves canonical source data.
Status vocabulary
| State | Meaning |
|---|---|
| VERIFIED_AND_MERGED | Present on the accepted branch with Git evidence. |
| VERIFIED_BUT_UNMERGED | Present in a remote commit or PR, but not accepted. |
| PRESENT_BUT_UNVERIFIED | Present, but required tests or evidence are missing. |
| CLAIMED_BUT_NOT_PROVEN | Reported by an actor, with no sufficient GitHub evidence. |
| NOT_IMPLEMENTED | Required capability is absent. |
| IN_PROGRESS | Work is in an open PR and is not accepted. |
| BLOCKED | Work cannot proceed until the recorded blocker is resolved. |
Verified state
| Area | State | Evidence / note |
|---|---|---|
| Phase 1B-1 source inventory | VERIFIED_AND_MERGED | PR #1 |
| Phase 1B-2 audit corrections | VERIFIED_AND_MERGED | PR #4 |
| Phase 2A backend foundation | VERIFIED_AND_MERGED | PR #6 |
| One-file model refactor | VERIFIED_AND_MERGED | PR #8 |
| Project-control foundation | VERIFIED_AND_MERGED | PR #10 |
| Phase 2B ingestion foundation | VERIFIED_AND_MERGED | PR #12, squash merge 7b5bd79b760d534dad34b3162f770e838616ebe9 |
| Phase 2B control reconciliation | VERIFIED_AND_MERGED | PR #13, squash merge 7c7533ee87146dc8fc78b46ebf423be55532c7eb |
| Gate 2A Pilot workbook contract/preflight | VERIFIED_AND_MERGED | PR #15, reviewed head 74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06, squash merge 4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4, Backend CI #24 |
| V1-01 safety-gate hardening | IN_PROGRESS | Draft PR #21 from exact base b1ddee87d31ee73b3a5aeac8f9953d0a604c206a; independently reviewed implementation head 700d800dbd9c657f6bd510faafedcbde4847fafd; CI-verified stabilized candidate b3dc8b3a18934ffe63f615e4f650248be21a5f9c; Backend CI #39 succeeded with 67 tests, migration round-trip, and compile after broadening one reparent-rejection assertion to accept either valid protection message; code, scope, and protected-data boundary remain unchanged; final independent acceptance is pending this durable-document reconciliation |
| Post-Gate-2A control reconciliation | VERIFIED_AND_MERGED | PR #18, reviewed head fcbeb7387218e9ab294318ae462ed59de717fc95, squash merge f213d321ff4cd7d3d6fa65ba78dc48f090ee846b; documentation only |
| Durable post-merge acceptance record | VERIFIED_AND_MERGED | PR #19, reviewed head b9059592409606a0a4f11a71c30778cff158b6b6, squash merge 77f9f595ccfe67a87b11024ff0f6143629dba438; documentation only |
| Role-based project operating model | VERIFIED_AND_MERGED | Permanent responsibilities and current assignments are defined in docs/handoff/MASTER_RECOVERY_PROMPT.md and ADR-011; introduced through PR #20 |
| Parallel V1 prototype | VERIFIED_BUT_UNMERGED | Closed, unmerged PR #7; reference/recovery source only |
| Superseded Phase 2B candidate | VERIFIED_BUT_UNMERGED | Closed, unmerged PR #9 |
| Duplicate Gate 2A candidate | VERIFIED_BUT_UNMERGED | PR #16 closed without merge on 2026-08-25; no content accepted |
| Gate 2B Mapping foundation candidate | VERIFIED_BUT_UNMERGED | PR #17 closed without merge on 2026-08-25; stale-base reference only; no content accepted |
| Official V1 release | NOT_IMPLEMENTED | No accepted tag, release, retained release artifact, ZIP, or EXE |
| Comprehensive Mapping Excel import/export | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
| Unknown-account queue and mapping carry-forward | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
| Note and sub-note mapping workflow/UI | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
| Minimal Pilot application and reviewable output | NOT_IMPLEMENTED | Required before packaging |
| Reproducible Windows package and clean-environment test | NOT_IMPLEMENTED | Required before V1 acceptance |
Accepted product capabilities
- Read-only source inventory and workbook audit evidence.
- Persistent backend/data-model foundation with fiscal-year mutation controls.
- Metadata-only source registration, structural XLSX inspection, and typed in-memory ledger parsing.
- Governed Pilot workbook v0.1 contract, reproducible blank template generator, and deterministic read-only preflight.
- Approved Pilot template path: samples/Aram_Pilot_Input_and_Mapping_Template_v0.1.xlsx.
- Independently verified template SHA-256: e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f.
The accepted branch does not include PR #7 desktop/release work, PR #16 alternate Pilot implementation, or PR #17 Mapping implementation. Green CI on an unmerged stale-base PR is not acceptance evidence.
Current risks and blockers
- The accepted branch is not protected by GitHub branch protection.
- The accepted branch still permits direct identity mutation/deletion of approved or locked fiscal years and parent-company deletion; the V1-01 candidate fixes this but is not accepted yet.
- The accepted Pilot preflight can still accept targetless or structurally invalid mappings and can ignore a declared closing-delta mismatch; the V1-01 candidate fixes this but is not accepted yet.
- The accepted root
index.htmlis still a disconnected hard-coded prototype; the V1-01 candidate replaces it with an explicit quarantine page. - PR #17 was closed without merge; its stale-base 12-file diff is reference material only, and its narrative listed only 9 files.
- PR #17 CI was green on its own stale head, but compatibility with accepted Gate 2A was never proven.
- Binary execution, release provenance, and clean Windows verification do not exist.
- Mapping, notes/sub-notes, Pilot UI, and end-to-end user acceptance remain incomplete.
Next approved action
- Publish this two-file durable-document reconciliation on Draft PR #21; Backend CI #39 succeeded on stabilized candidate
b3dc8b3a18934ffe63f615e4f650248be21a5f9cwith 67 tests, migration round-trip, and compile. - The independent reviewer re-fetches the resulting documentation-only head, confirms that its comparison with
b3dc8b3a18934ffe63f615e4f650248be21a5f9cchanges onlyPROJECT_STATUS.mdanddocs/handoff/LATEST_HANDOFF.md, verifies the final workflow result, then marks the PR ready and squash-merges it. - Only after V1-01 is accepted, start the first focused Gate 3 Mapping import/persistence task from the new accepted head.
Booklet v1.0 — Phase 0 (execution work order)
Authoritative work order: «کتابچهٔ اجرایی تکمیل Aram» v1.0 (base head 7dc864fd032f0c4ae4d650d89304a01286a6d914, PR #21 merge). Branch arena/094f314c-aram. Per §17 the agent resolves ambiguities by default + real-data proof + ADR and never queries the owner; the owner's sole role is Phase-9 final acceptance.
| Debt | State | Evidence |
|---|---|---|
| D-01 LedgerBalance model | VERIFIED_BUT_UNMERGED | commit a3c330b; exact-rial round-trip + aggregation tests |
| D-02 controls in preflight | VERIFIED_BUT_UNMERGED | commit 8f2f902; C-01..C-04 preflight tests |
| D-03 Rial money column | VERIFIED_BUT_UNMERGED | commit a3c330b; BIGINT storage >253 via ORM; ADR-012 |
| D-04 numeric code normalization | VERIFIED_BUT_UNMERGED | commit ac565e9; integral-numeric exact, leading zeros preserved |
| D-05 Persian header matching | VERIFIED_BUT_UNMERGED | commit ac565e9; normalize_fa header matching |
| D-06 source bytes + CSV | VERIFIED_BUT_UNMERGED | commit a661423; content-addressed store + CSV encodings/delimiters |
| D-07 immutability + audit + reopen | VERIFIED_BUT_UNMERGED | commit 00ca58e; raw-SQL locked-year guards, hash chain, ADR-016 |
| D-08 status/log refresh | IN_PROGRESS | this entry |
| D-09 git-history rewrite | BLOCKED | owner-only; requires explicit owner approval (§19) |
| D-10 hierarchy mapping | VERIFIED_BUT_UNMERGED | commit ac565e9; ADR-014 (general=kol, subsidiary=حساب) |
| D-11 inspection guards | VERIFIED_BUT_UNMERGED | commit ac565e9; max_column None guard |
| D-12 CI quality gates | VERIFIED_BUT_UNMERGED | commit 8412c56; ruff/mypy/coverage/pip-audit/PG matrix; ADR-017 |
Phase-0 local evidence: 201 tests passed; ruff clean; mypy domain strict clean; coverage total 92% / domain 97%; pip-audit no known vulnerabilities; SQLite migration up/down/up clean. PostgreSQL migration path is exercised by the CI matrix (no local PG). Real-data evidence (source_1404.xlsx, 252,898 rows): debit-positive C-01 holds 252,892/252,898; Σdebit=Σcredit=10,823,163,409,740,108; OD-01 refuted (T1..T4 concat ≠ حساب), ADR-014 adopted. No canonical data/ or samples/ file changed.
ADRs added: 012 (money scale/rounding), 013 (sign contract), 014 (T1..T4 hierarchy), 016 (reopen/immutability), 017 (CI gates/tooling).
Booklet v1.0 — Phases 1–4 + owner priority fixes (execution work order)
Continuation on branch arena/094f314c-aram (base 7dc864fd). Per §17 the agent resolves by default + real-data proof + ADR and never queries the owner.
| Phase / item | State | Evidence |
|---|---|---|
| Phase 1 statements + drill-down | VERIFIED_BUT_UNMERGED | commit 9c33586; build_statements BS/IS, drill_down source{filename,file_hash,sheet,row} |
| Phase 2 mapping import/export | VERIFIED_BUT_UNMERGED | commit cfbd879; mapping_io Mappings sheet, fail-closed, idempotent |
| Phase 3 note formula engine | VERIFIED_BUT_UNMERGED | commit 9fba3c6; AST formula (no eval), acct/row/note/sum/abs, cycle detection |
| Phase 4 golden comparison | VERIFIED_BUT_UNMERGED | commit 225a38c; golden.py header-name columns; 1403+1404 real-data tests pass |
| Fix 1 money/P-02 (ADR-012) | VERIFIED_BUT_UNMERGED | commit a00b0dc; 457,074 rows, 0 fractional rial; 7 guard tests |
| Fix 2 raw-row drill-down (D3/P-01) | VERIFIED_BUT_UNMERGED | commit f7c3b4a; one LedgerBalance per source row; ledger_aggregate service; migration 20261203_05 round-trip |
| Fix 3 approval gate (D5/C-03) | VERIFIED_BUT_UNMERGED | commit 1844a62; evaluate_controls explicit; hard ERROR gate; 13 tests |
| Fix 4 tests + CI (D-12/§14) | VERIFIED_BUT_UNMERGED | commits 225a38c,be08192; mypy services gate; frontend eslint/tsc/vitest/Playwright |
| Phase 5 UI + Playwright | VERIFIED_BUT_UNMERGED | commits fa64baf,77fbe70; RTL workbench (setup/import/mapping/statements/drill-down/approval/admin); eslint/tsc/vitest/build + Playwright gates |
| Phase 6 reviewable outputs | VERIFIED_BUT_UNMERGED | commit c4c37c0; statement_export XLSX+JSON with exact rial + lineage; ADR-022 |
| Phase 7 users/audit/reopen/backup | VERIFIED_BUT_UNMERGED | commit e20572d; roles+PBKDF2, controlled reopen/lock, verifiable backup; migration 20261203_07; ADR-023 |
| Phase 8 desktop packaging | VERIFIED_BUT_UNMERGED | commit ffc9888; desktop entrypoint (127.0.0.1) + PyInstaller recipe; ADR-024; no binary committed (§19) |
| Phase 9 UAT + release prep | VERIFIED_BUT_UNMERGED | scripts/uat_real_data.py; real-1404 UAT evidence below; tag v1.0.0 is the owner's post-acceptance action |
Local evidence at head dafb559: backend 308 tests passed; ruff clean; mypy domain strict + services clean; frontend lint/tsc/vitest/build pass; Playwright smoke + workflow specs valid. Migrations 20261203_05/06/07 up/down/up verified (SQLite). No canonical data/ or samples/ file changed.
Phase 9 UAT evidence (real source_1404.xlsx, read-only)
python scripts/uat_real_data.py --year 1404 on a fresh local DB:
- Import: 131,280 raw rows preserved (4 anomalous rows skipped + reported).
- Auto-mapping from embedded note numbers: 22 notes, 244 mappings.
- Build: BS/IS/CF/EQ persisted; 1 unmapped ordinary account surfaced.
- Golden reconciliation: core balance-sheet notes match official rial-for-rial
(÷10⁶ half-up): 10→673,740,637 · 11→242,194 · 12-1→13,386,398 · 12-2→8,310,168 ·
13→6,839,535 · 14→11,273,650 · 15→19,951,136 (plus zero notes 17-1/17-2). Remaining
BS/IS differences are surfaced as discrepancies (OD-08), never silently corrected.
- Approval gate: correctly blocks on real-data control failures (C-01/C-03/C-04) —
fail-loud, no bypass.
- Export: XLSX (6.27 MB) + JSON with 158,050 lineage rows (file/SHA-256/sheet/row).
- Backup: created + verified (hashes + audit chain); audit chain valid.
ADRs added in this stretch: 021 (golden scale/columns), 022 (outputs), 023 (users/reopen/backup), 024 (desktop packaging).
Release procedure (owner, after independent review)
The implementation author does not merge or tag (§19). After independent GitHub
review approves PR #96 and it is merged into source-data-cleanup, the owner creates
the release tag v1.0.0 on the accepted head and builds the Windows package from
packaging/build_desktop.py (artifact retained in the release, not committed).