Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 4, 14:15 UTC
dependabot/github_actions/actions/checkout-7
Booklet v1.0 — Deep Compliance Review (5 reviewer passes)
- Date: 2026-12-03
- Branch:
arena/094f314c-aram· PR: #96 (ready for review) - Method: five distinct reviewer roles, each with a concrete mandate, executed against the code/tests/CI with real evidence. This is a single author running five structured passes (not five independent models); findings are reproducible from the commands below. The independent GitHub reviewer remains the acceptance authority (§19 — author does not merge).
Agent 1 — Financial integrity & source sanctity
Mandate: P-02 exact money, rial-for-rial reconciliation, sign convention, source sacred, drill-down lineage, discrepancies never invented, codes as text.
Checks & evidence:
- domain/money.py: Rial.process_bind_param rejects float (TypeError),
fractional rial (ValueError), non-finite (ValueError); BIGINT scale-0; rounding
(round_half_up/allocate_remainder) is display-only. test_domain_money.py
includes the P-02 no-silent-rounding guards.
- Exhaustive probe (ADR-012): 457,074 rows across both ledgers, 0 fractional rial.
- git diff --name-only <base> HEAD -- data/ samples/ → empty (source untouched).
- Golden reconciliation (UAT, real source_1404): core BS notes match official
rial-for-rial (10/11/12-1/12-2/13/14/15); other differences surfaced as
discrepancies (OD-08), never silently corrected.
- Drill-down: drill_down returns file/SHA-256/sheet/row per account; UAT exported
158,050 lineage rows.
Verdict: PASS. No defect found.
Agent 2 — Architecture & layering
Mandate: domain←services←api←ui direction, raw rows + compute-layer aggregation (D3/P-01), approval runs all controls (D5/C-03), no eval, generic, editable.
Checks & evidence:
- grep domain imports → no services/api/models/fastapi upward imports.
- grep services imports → no api/fastapi imports.
- ledger_import stores one raw LedgerBalance per source row; aggregation lives
in ledger_aggregate/statement_build (compute layer).
- domain/formula.py + note_engine.py: AST tokenizer (re.compile), no
eval/exec; cycle detection.
- No company-specific logic in domain/services (grep for gas/company names).
- Finding F2-1 (FIXED): notes/mappings/rows had only CREATE endpoints; the
owner requires editable codes/accounts/notes/subnotes. Added PUT/DELETE for
notes, mappings, note rows + GET list endpoints, Draft-guarded, D-07 → HTTP 409,
note-delete refuses while referenced (rows cascade). test_editing.py (9 tests)
incl. locked-year edit refusal; UI NotesManager wired.
Verdict: PASS after F2-1 fix.
Agent 3 — Security, audit & immutability
Mandate: hash-chained append-only audit, locked-year immutability, controlled reopen, users/roles (no plaintext), role gates, backup integrity, zero network.
Checks & evidence:
- db_triggers: locked-year insert/update/delete guards + audit append-only +
fiscal-year transition (SQLite & PostgreSQL); test_immutability.py passes.
- audit.verify_chain recomputes the SHA-256 chain; tamper tests pass.
- Reopen requires an approved ReopenRequest (ORM guard + DB trigger re-check).
- users.py: PBKDF2-HMAC-SHA256 200k rounds + per-user salt, hmac.compare_digest,
no plaintext; grep for hardcoded secrets → none.
- backup.py: online SQLite snapshot + source-store copy + SHA-256 manifest +
chain re-verification; tamper/non-empty-dest/broken-chain refused.
- grep backend src for requests/httpx/urllib/socket → no outbound network;
desktop binds 127.0.0.1 only.
- Finding F3-1 (FIXED): API /approve was not role-gated while /lock and
/reopen were. Now requires reviewer/admin once users exist (bootstrap/dev
open); the C-01..C-04 ERROR gate always applies. +2 tests.
Verdict: PASS after F3-1 fix.
Agent 4 — Testing, CI & quality
Mandate: full suite green, negative tests, mypy/ruff, frontend gates, Playwright, migration round-trips, coverage, no faked green.
Checks & evidence:
- cd backend && pytest → 319 passed (after review fixes).
- mypy domain strict + services → clean; ruff check/format → clean.
- Frontend eslint/tsc/vitest/build → pass; Playwright smoke + workflow specs.
- grep pytest skip/xfail → only skipif conditional on canonical-data presence
(runs in CI where data exists); no unconditional skips faking green. The e2e
workflow spec is backend-gated by design (frontend-only CI stays green).
- Migrations 20261203_05/06/07 up/down/up verified (SQLite); PostgreSQL via CI matrix.
- CI (head 969f608): Backend [47101026519] ✅, Frontend [47101026555] ✅. Review
fixes re-run CI on the new head.
Verdict: PASS.
Agent 5 — Booklet process & deliverables
Mandate: §15 phase order, §17 autonomous defaults+ADR, §19 bans, §0 status/log, ADRs, §18 report, reproducible packaging, no committed binaries.
Checks & evidence:
- Phases 0–9 present in §15 order; PROJECT_STATUS + PROJECT_LOG updated.
- ADRs 012–024 present (015 reserved/unused; not a compliance gap).
- §19: no source edits; no self-merge (PR ready, not merged); no bypassed controls;
no runtime network; no secrets; no NEW root analytical doc (PROJECT_STATUS.md is
the existing canonical status file required by §0).
- Finding F5-1 (FIXED): python-multipart runtime dep (FastAPI uploads) now
documented in ADR-018.
- Observation O5-1 (owner decision): vendored .whl files (~250KB+18KB,
duplicated in docs/vendor and webapp/vendor) were committed in the earlier
pilot commit 2fce09d, not the booklet work. They are small offline
dependencies for the browser edition, not large binaries; a strict §19 reading
flags ZIP-like artifacts. Left intact because they back the accepted pilot
deliverable; the owner may split the pilot browser edition into a separate PR.
- Packaging: packaging/aram.spec + build_desktop.py reproducible; no EXE/ZIP
committed; tag v1.0.0 is the owner's post-acceptance action.
- §18 report delivered (base/branch/head/PR, tests, CI URLs, artifact NONE,
source-unchanged, risks, "Ready for independent GitHub review; not merged.").
Verdict: PASS after F5-1 fix; O5-1 noted for owner.
Findings summary
| ID | Severity | Status | Resolution |
|---|---|---|---|
| F2-1 editable notes/mappings/rows | High | Fixed | PUT/DELETE + list endpoints, Draft-guarded, 9 tests, UI manager |
| F3-1 approve role gate | Medium | Fixed | reviewer/admin gate when users exist, 2 tests |
| F5-1 python-multipart ADR | Low | Fixed | documented in ADR-018 |
| O5-1 pilot vendored wheels | Info | Noted | pre-existing pilot artifact; owner may split PR |
Overall verdict
All five reviewer passes PASS after the fixes above. Backend 319 tests green, mypy/ruff clean, frontend gates green, CI green, source data unchanged. The work is complete and booklet-compliant to the extent verifiable without the owner's accounting judgment on the surfaced real-data discrepancies (OD-08).
Ready for independent GitHub review; not merged.