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

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

Synced Dec 4, 14:15 UTC

dependabot/npm_and_yarn/frontend/vitest-5.1.2
add-index-html-10623938925177053894 arena/094f314c-aram arena/2d4eda07-aram chatgpt-phase1b2-autopilot codex/adr-future-connectors-pi-v1 codex/aram-account-note-source-trace-20261031 codex/aram-actions-node24-maintenance-20261031 codex/aram-analyst-review-workbook-20261031 codex/aram-bs-candidate-statement-20261031 codex/aram-cash-flow-direct-candidate-20261031 codex/aram-clean-reference-year-integrity-20261030 codex/aram-cross-statement-controls-20261031 codex/aram-equity-changes-candidate-20261031 codex/aram-five-statement-cli-20261031 codex/aram-five-statement-integration-20261031 codex/aram-five-statement-orchestrator-20261031 codex/aram-gate3-coverage-target-guard-20261030 codex/aram-gate3-hidden-xlsx-guard-20261030 codex/aram-gate3-integration-validation-20261030 codex/aram-gate3-mapping-change-preview-20261030 codex/aram-gate3-stale-note-guard-20261030 codex/aram-income-statement-candidate-20261031 codex/aram-manifest-referential-integrity-20261031 codex/aram-mapping-source-parser-20261101 codex/aram-multidimensional-mapping-20261101 codex/aram-multistatement-mapping-20261031 codex/aram-pipeline-manifest-schema-20261031 codex/aram-readonly-mapping-coverage-20261031 codex/aram-reconciliation-review-gate-20261031 codex/aram-same-flush-fiscal-lock-20261030 codex/aram-synthetic-windows-demo-20261031 codex/aram-trial-balance-diagnostic-20261031 codex/aram-windows-background-detail-search-20261031 codex/aram-windows-detail-review-20261031 codex/aram-windows-five-statement-pilot-20261031 codex/aram-windows-statement-figures-20261031 codex/gate-2a-pilot-workbook codex/gate-2a-pilot-workbook-6864754244772568979 codex/gate3-authenticated-principal-boundary-20261030 codex/gate3-authored-draft-staging-20261030 codex/gate3-carry-forward-preview-20261023 codex/gate3-draft-staging-audit-20261030 codex/gate3-mapping-batch-freshness-20261030 codex/gate3-mapping-batch-review-20261030 codex/gate3-mapping-core codex/gate3-mapping-coverage-20261023 codex/gate3-mapping-excel-20261023 codex/gate3-note-mapping-review-20261023 codex/gate3-signed-year-scope-20261030 codex/gate3-unapproved-proposal-storage-20261030 codex/payvast-mapping-discovery-20261023 codex/phase-2a-backend-foundation codex/phase-2b-post-merge-record codex/phase-2b-source-registration codex/phase-2b-source-registration-12955190277775369594 codex/post-gate2a-control-reconciliation codex/post-pr18-acceptance-record codex/project-control-foundation codex/t1-repo-hygiene-20261023 codex/t2-ci-hardening-20261023 codex/t3-explicit-migrations-20261023 codex/t6a-readonly-diagnostics-20261023 codex/v1-01-safety-gate-hardening codex/v1-year-isolation-followup-20261023 codex/windows-native-pilot-shell-20261030 dependabot/github_actions/actions/checkout-7 dependabot/github_actions/actions/setup-node-6 dependabot/github_actions/actions/setup-python-7 dependabot/github_actions/actions/upload-artifact-7 dependabot/npm_and_yarn/frontend/eslint-plugin-react-hooks-7.1.1 dependabot/npm_and_yarn/frontend/globals-17.15.0 dependabot/npm_and_yarn/frontend/vite-8.4.0 dependabot/npm_and_yarn/frontend/vitest-5.1.2 dependabot/npm_and_yarn/frontend/vitest/coverage-v8-5.1.2 dependabot/pip/backend/mypy-gte-1.13-and-lt-3 dependabot/pip/backend/pytest-cov-gte-6.0-and-lt-8 dependabot/pip/backend/setuptools-gte-75-and-lt-85 docs/aram-master-control-plan-20261111 docs/aram-roadmap-dashboard-20261030 docs/financial-statement-reconciliation-1402-1404-20261110 feat/gate3-governed-mapping-20261101 feat/gate3-package9-1-security-20261103 feat/gate3-package9-isolated-20261103 fix/password-unicode-validation-20261111 governance/aram-5-1-3-controls-20261030 governance/role-based-operating-model jules-1168663913887856558-73b8a885 jules-gate-2b-mapping-workflow-foundation-4137724387867065330 phase-1b1-audit-report-7365389436990903239 phase-2a-backend-foundation-10237597358138521261 phase1b2-postmerge-metadata-fix refactor/drg-parent-year-id-15088443704684163304 source-data-cleanup
md 6.99 KB

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.