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

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

Synced Dec 4, 14:15 UTC

dependabot/pip/backend/pytest-cov-gte-6.0-and-lt-8
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 60.8 KB

Project Log

This is an append-only operational log. Never delete or rewrite accepted entries. Corrections must be added as new entries that reference the original entry.

Required entry fields

Each new entry must record: UTC timestamp, actor, task/phase, base branch and SHA, working branch, PR number/URL, commit SHA, exact changed files, test command, GitHub Actions run URL/result, artifact or release URL, acceptance status, reviewer, remaining risks, and next action. Unknown evidence must be written as NOT_VERIFIED, never guessed.

Historical entries imported from GitHub

2026-08-18T11:08:12Z — Phase 1B-1

  • Actor: Jules / repository owner
  • Base: source-data-cleanup@d18287a74c9453e8071ed03db6b369805b5ccde3
  • Working branch: phase-1b1-audit-report-7365389436990903239
  • PR: #1
  • Head SHA: a3e3f675ca637b5ab719b1d6e5fc37c9fb47f707
  • Merge SHA: cd074095c3d63a4a2da1ab8490ce772f555fc91d
  • Changed files: 3; exact list available in the PR
  • Tests / CI / artifacts: NOT_VERIFIED
  • Acceptance: VERIFIED_AND_MERGED
  • Reviewer: repository owner
  • Remaining risk: historical test evidence not recorded here
  • Next action: Phase 1B-2

2026-08-19T16:29:06Z — Phase 1B-2 corrections

  • Actor: Jules / repository owner
  • Base: source-data-cleanup@cd074095c3d63a4a2da1ab8490ce772f555fc91d
  • Working branch: jules-1168663913887856558-73b8a885
  • PR: #4
  • Head SHA: ce77f7511066ff85845e6d1f383f20a264f4730b
  • Merge SHA: f8084268c1080595d9da672d490834ed677ad77f
  • Changed files: 7; exact list available in the PR
  • Tests / CI / artifacts: NOT_VERIFIED
  • Acceptance: VERIFIED_AND_MERGED
  • Reviewer: repository owner
  • Remaining risk: claims must still be interpreted against the source evidence
  • Next action: Phase 2A

2026-08-20T18:53:39Z — Phase 2A backend foundation

  • Actor: ChatGPT/Codex implementation; repository owner
  • Base: source-data-cleanup@f8084268c1080595d9da672d490834ed677ad77f
  • Working branch: codex/phase-2a-backend-foundation
  • PR: #6
  • Head SHA: 2bcf2b3cbab6d3df1d9340397cec43e363aec8f7
  • Merge SHA: 84b19ef1a6efe3e82291a565829ba3e1fc47d246
  • Changed files: 18; exact list available in the PR
  • Reported test command: cd backend && pytest
  • GitHub Actions: reported successful in PR; direct run URL not recorded here
  • Artifacts: none
  • Acceptance: VERIFIED_AND_MERGED
  • Reviewer: repository owner
  • Remaining risk: preserve data and fiscal-year invariants
  • Next action: focused ingestion work

2026-08-24T00:34:12Z — Model refactor

  • Actor: Jules / repository owner
  • Base: source-data-cleanup@84b19ef1a6efe3e82291a565829ba3e1fc47d246
  • Working branch: refactor/drg-parent-year-id-15088443704684163304
  • PR: #8
  • Head SHA: b602ced45b04ac0876acac2dcca381d72de38c27
  • Merge SHA: 5122fd052ebe0ffe0e07dbb8153a872a4f047355
  • Changed files: backend/src/aram_backend/models.py
  • Reported test command: python -m pytest backend/tests/
  • GitHub Actions URL: NOT_VERIFIED
  • Artifacts: none
  • Acceptance: VERIFIED_AND_MERGED
  • Reviewer: repository owner
  • Remaining risk: none newly recorded
  • Next action: Phase 2B review

2026-08-24T00:34:36Z — Parallel V1 prototype closed

  • Actor: Jules / repository owner
  • Base: source-data-cleanup@84b19ef1a6efe3e82291a565829ba3e1fc47d246
  • Working branch: phase-2a-backend-foundation-10237597358138521261
  • PR: #7
  • Head SHA: a06aab6f2e2c50ec8111316b1a689fb71660c000
  • Merge SHA: none
  • Changed files: 94; exact list available in the PR
  • Tests / GitHub Actions / official release: NOT_VERIFIED
  • Branch artifacts: present in the unmerged PR; not accepted release assets
  • Acceptance: VERIFIED_BUT_UNMERGED; closed, superseded/out of scope
  • Reviewer: repository owner
  • Remaining risk: large parallel implementation; do not merge directly
  • Next action: recover feature-by-feature through focused PRs

2026-08-24T01:34:25Z — Phase 2B ingestion foundation opened

  • Actor: ChatGPT/Codex implementation; repository owner
  • Base: source-data-cleanup@5122fd052ebe0ffe0e07dbb8153a872a4f047355
  • Working branch: codex/phase-2b-source-registration
  • PR: #9
  • Head SHA at import: 8b141d793ad2d534fdf7399bb79d101d53ae29af
  • Changed files: 8; exact list available in the PR
  • Reported test command: pytest
  • Reported GitHub Actions: success; direct run URL must be checked during review
  • Artifacts: none
  • Acceptance: IN_PROGRESS; draft, not merged
  • Reviewer: pending independent review
  • Remaining risk: evidence and diff review incomplete
  • Next action: review before any acceptance

[2026-08-24] Phase 2B Replacement Candidate (PR #12)

  • Recorded PR #10 governance merge in PROJECT_STATUS.md.
  • Created and recorded PR #12 as the replacement candidate for Phase 2B, superseding PR #9.
  • Current active branch: codex/phase-2b-source-registration-12955190277775369594
  • Base SHA: a41b07d7a7dd192c3ae4a277eb4903327883456f
  • Verified CI evidence: GitHub Backend CI run #16 successful on PR #12.
  • Updated docs to ensure Phase 2B metadata-registration conflict rejection is thoroughly tested and verified.

2026-08-24T08:00:00Z — PR #12 corrective evidence and documentation finalization

  • Actor: Jules implementation; ChatGPT/Codex independent remote verification and documentation correction
  • Task/phase: Phase 2B ingestion foundation replacement candidate
  • Base: source-data-cleanup@a41b07d7a7dd192c3ae4a277eb4903327883456f
  • Working branch: codex/phase-2b-source-registration-12955190277775369594
  • PR: #12
  • Independently reviewed implementation head: 9e90533658e400a51402db673efae9cbd0aa37d1
  • Changed files at reviewed head: PROJECT_STATUS.md, backend/README.md, backend/pyproject.toml, backend/src/aram_backend/ingestion.py, backend/src/aram_backend/ledger_parser.py, backend/src/aram_backend/workbook_inspection.py, backend/tests/test_ingestion.py, backend/tests/test_ledger_parser.py, backend/tests/test_workbook_inspection.py, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md
  • Regression evidence: exact duplicate remains idempotent; same-year/same-hash conflicts in document type, filename, or both raise SourceRegistrationError; each rejection leaves one unchanged original SourceDocument
  • Reported local verification by Jules: full backend pytest suite, compileall, Alembic upgrade/downgrade round-trip, and git diff --check passed; exact pytest count was not independently captured and remains NOT_VERIFIED
  • GitHub Actions: Backend CI run #17, success
  • Artifacts/releases: none
  • Protected data: the complete PR filename list contains no canonical XLSX/PDF, data/, database, ZIP, EXE, or financial-source file
  • Acceptance: IN_PROGRESS; Draft and unmerged
  • Reviewer: ChatGPT/Codex candidate-requirements review; final acceptance pending
  • Remaining risks: final documentation commits require their own CI result; independent acceptance decision is not yet recorded
  • Recovery: close PR #12 without merging to leave the accepted branch unchanged
  • Next action: independently review the final remote head and record an explicit decision

2026-08-24T08:35:40Z — Phase 2B accepted; superseded candidate closed

  • Actor: ChatGPT/Codex independent reviewer; repository owner authorization
  • Task/phase: Phase 2B ingestion foundation acceptance and post-merge control reconciliation
  • Accepted base before merge: source-data-cleanup@a41b07d7a7dd192c3ae4a277eb4903327883456f
  • Accepted branch after merge: source-data-cleanup@7b5bd79b760d534dad34b3162f770e838616ebe9
  • Accepted PR: #12
  • Reviewed PR #12 head: f7cb6abb7caf3f1c0c28d402ae41b0e3c005a280
  • Merge method and SHA: squash; 7b5bd79b760d534dad34b3162f770e838616ebe9
  • Final PR #12 GitHub Actions: Backend CI run #21, success
  • Test evidence: 42 passed, 1 warning; Alembic upgrade/downgrade and compileall succeeded
  • Superseded PR: #9, closed without merge
  • Post-merge control branch: codex/phase-2b-post-merge-record
  • Post-merge control PR: #13
  • PR #13 base: source-data-cleanup@7b5bd79b760d534dad34b3162f770e838616ebe9
  • PR #13 changed files: PROJECT_STATUS.md, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md
  • PR #13 tests / CI / artifacts: documentation-only; no backend workflow triggered; artifacts NONE
  • Protected data: no application code, tests, workflows, canonical XLSX/PDF, data/, database, binary, ZIP, EXE, or financial-source file changed
  • Acceptance: PR #12 VERIFIED_AND_MERGED; PR #9 closed unmerged; PR #13 IN_PROGRESS
  • Reviewer: PR #12 independently accepted by ChatGPT/Codex with explicit repository-owner merge authorization; PR #13 review pending
  • Recovery: revert merge commit 7b5bd79b760d534dad34b3162f770e838616ebe9 through a separately reviewed rollback PR if Phase 2B must be withdrawn
  • Remaining risk: PR #13 must be independently reviewed before its documentation becomes accepted
  • Next action: review PR #13, then select the next focused Issue #11 roadmap task

2026-08-24T09:29:00Z — Gate 2A implementation candidate prepared

  • Actor: ChatGPT/Codex implementation
  • Task/phase: Issue #14, Pilot workbook contract and read-only preflight
  • Base: source-data-cleanup@7c7533ee87146dc8fc78b46ebf423be55532c7eb
  • Working branch: codex/gate-2a-pilot-workbook
  • Scope: typed in-memory preflight, reproducible blank workbook generator, approved blank template, contract, regression tests, and control records
  • Local focused verification: 9 targeted preflight scenarios passed through a direct Python harness; compileall succeeded
  • Full pytest/Alembic: pending GitHub Backend CI because the automation runtime could not install the repository test dependencies from the external package index
  • Template SHA-256: e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f
  • Protected data: no canonical XLSX/PDF, data/, database, financial-source, migration, workflow, ZIP, EXE, desktop, or release file changed
  • Acceptance: IN_PROGRESS; Draft and unmerged
  • Remaining risks: full Backend CI and independent diff review are required
  • Recovery: close the Draft PR without merge; accepted branch remains unchanged

2026-08-24T09:40:00Z — Gate 2A Draft PR and CI verified

  • Draft PR: #15
  • Published head: 8b0431b54392e3c19ae995e2b38bdf08a56a0473
  • Changed files: 9, all within the Issue #14 allowlist
  • GitHub Actions: Backend CI run #23, success
  • Test evidence: 52 passed, 1 warning; Alembic upgrade/downgrade and compileall succeeded
  • PR state: Draft, open, mergeable, and unmerged
  • Acceptance: IN_PROGRESS; independent diff review and explicit merge decision remain required

2026-08-25T06:30:00Z — Post-Gate-2A control reconciliation and stale-work cleanup

  • Actor: Codex successor project manager / independent GitHub reviewer; cleanup authorized by repository owner
  • Task/phase: reconcile accepted Gate 2A evidence, close its duplicate candidate, and block stale-base Gate 2B work before continuation
  • Accepted base: source-data-cleanup@4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4
  • Working branch: codex/post-gate2a-control-reconciliation
  • PR: #18, Draft and unmerged
  • Initial publication commit: c6eefc26955c694c388371bcfaa96452b1b5f469
  • Exact changed files planned/finalized: PROJECT_STATUS.md, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md, docs/handoff/MASTER_RECOVERY_PROMPT.md
  • Accepted Gate 2A evidence: PR #15, reviewed head 74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06, squash merge 4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4
  • Final Gate 2A GitHub Actions: Backend CI run #24, success; 52 passed, 1 warning; Alembic upgrade/downgrade and compileall succeeded
  • Pilot template SHA-256 independently recomputed from the accepted GitHub file: e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f
  • Superseded duplicate: PR #16 closed without merge on 2026-08-25 after an evidence comment; it duplicated accepted Gate 2A, was dirty, and recorded incorrect merge SHA 35d45c3f200672a6ef97f13a84cf7c823ecf1bb8
  • Closed reference candidate: PR #17, base 7c7533ee87146dc8fc78b46ebf423be55532c7eb, head 4f8648add0e2ed60f01753e979fa3fbe9ccf0f18; closed without merge on 2026-08-25 after an evidence comment; its green stale-head CI does not prove compatibility and no content is accepted
  • Tests for PR #18: documentation-only; backend pytest and migration execution are not applicable; final remote diff and changed-file review remain mandatory
  • GitHub Actions for PR #18: NOT_VERIFIED at entry creation; documentation-only paths may not trigger Backend CI
  • Artifacts/releases: NONE
  • Protected data: no application code, workflow, migration, XLSX/PDF, data/, database, financial-source, binary, ZIP, EXE, or release file changed
  • Acceptance: IN_PROGRESS; PR #18 is not merged and requires independent final-head review plus explicit repository-owner authorization
  • Reviewer: final PR #18 reviewer pending
  • Issue metadata: Issue #14 closed as completed with verified PR #15 evidence; Issue #11 updated to mark Gate 2 accepted and Gate 3 blocked pending PR #18
  • Recovery: close PR #18 without merge; accepted branch remains at 4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4
  • Remaining risks: branch protection is disabled; PR #17 reference work remains unaccepted; Mapping/UI/release work is incomplete
  • Next action: independently review Draft PR #18; do not start or merge Gate 2B work before the control decision

2026-08-25T06:46:16Z — PR #18 accepted; time-bound candidate record reconciled

  • Actor: ChatGPT/Codex independent reviewer; repository owner explicit authorization
  • Task/phase: accept the post-Gate-2A control reconciliation and correct the preceding time-bound candidate snapshot
  • Accepted base before merge: source-data-cleanup@4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4
  • Working branch: codex/post-gate2a-control-reconciliation
  • PR: #18
  • Reviewed PR head: fcbeb7387218e9ab294318ae462ed59de717fc95
  • Merge method and SHA: squash; f213d321ff4cd7d3d6fa65ba78dc48f090ee846b
  • Exact changed files: PROJECT_STATUS.md, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md, docs/handoff/MASTER_RECOVERY_PROMPT.md
  • Tests: documentation-only; backend pytest, migration execution, and compileall were not applicable
  • GitHub Actions: no workflow run was associated with reviewed head fcbeb7387218e9ab294318ae462ed59de717fc95; documentation-only paths did not trigger Backend CI
  • Artifacts/releases: NONE
  • Protected data: no application code, tests, workflow, migration, dependency, XLSX/PDF, data/, database, financial-source, binary, ZIP, EXE, artifact, or release file changed
  • Acceptance: VERIFIED_AND_MERGED
  • Reviewer: ChatGPT/Codex after full remote four-file diff review and Davood's explicit merge authorization
  • Correction note: the preceding 2026-08-25T06:30:00Z entry is preserved as an accurate historical candidate snapshot; its Draft/unmerged and pending-review statements are no longer current
  • Issue metadata: Issue #11 was reconciled after the merge; Gate 3 is ready for a new focused task definition, while closed PR #17 remains reference-only
  • Recovery: revert merge commit f213d321ff4cd7d3d6fa65ba78dc48f090ee846b through a separately reviewed rollback PR if the accepted control reconciliation must be withdrawn
  • Remaining risks: the accepted branch is unprotected; Mapping, note/sub-note workflow/UI, reproducible Windows packaging, and end-to-end Pilot acceptance remain incomplete
  • Next action: fetch the live accepted head and define one new focused Gate 3 / Gate 2B Mapping task; do not revive or merge PR #17

2026-08-25T07:37:08Z — Role-based operating model prepared

  • Actor: project manager / repository maintainer; requested by Davood
  • Task/phase: record the complete Aram responsibility model in the permanent recovery prompt
  • Base: source-data-cleanup@77f9f595ccfe67a87b11024ff0f6143629dba438
  • Working branch: governance/role-based-operating-model
  • PR: #20
  • Published implementation head before required control-record update: 92f6e096d3471bb5de1fe876066eedee5ab8bcf9
  • Intended final changed files: PROJECT_STATUS.md, docs/DECISION_LOG.md, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md, docs/handoff/MASTER_RECOVERY_PROMPT.md
  • Governance change: define Davood as Project Owner, ChatGPT chat as Operational Coordinator, Jules as primary Implementation Agent, Codex Work as Senior Technical Supervisor / Independent Reviewer / Authorized Maintainer, and GitHub as the evidence source of truth
  • Authority change: record standing delegation for routine technical review and merge actions after evidence gates, while retaining Davood escalation for accounting ambiguity, material scope, protected-data, release, destructive, credential, and external-authority decisions
  • Clarification: a repository mismatch pauses only the affected task without edits and does not halt the project
  • Tests: documentation-only; backend pytest, migrations, and compileall are not applicable; final remote content, diff, whitespace, link, and consistency checks are required
  • GitHub Actions at entry creation: NOT_VERIFIED; documentation-only paths may not trigger Backend CI
  • Artifacts/releases: NONE
  • Protected data: no application code, test, workflow, migration, dependency, XLSX/PDF, data/, database, financial-source, binary, ZIP, EXE, artifact, or release file is in scope
  • Acceptance at entry creation: IN_PROGRESS; this is a historical preparation record and the live PR state remains authoritative
  • Reviewer at entry creation: pending final-head independent remote review
  • Recovery: close PR #20 without merge; the accepted branch remains at 77f9f595ccfe67a87b11024ff0f6143629dba438
  • Remaining risks: the accepted branch is unprotected; role assignments do not replace evidence gates; Gate 3 Mapping and all later V1 gates remain incomplete
  • Next action: finish the five-file remote candidate, independently review PR #20, and record one acceptance decision

2026-08-26T15:36:29Z — V1-01 safety-gate hardening prepared

  • Actor: Codex Work authorized maintainer / implementation agent for the critical fix
  • Task/phase: V1-01 safety-gate hardening before Gate 3 Mapping
  • Base: source-data-cleanup@b1ddee87d31ee73b3a5aeac8f9953d0a604c206a
  • Working branch: codex/v1-01-safety-gate-hardening
  • PR: Draft #21
  • Initial implementation commit SHA: 6d774e5dd7afb00b04e523ba255aeee4f13bfccc; final reviewed head remains remote-state dependent
  • Exact planned changed files: index.html, PROJECT_STATUS.md, backend/src/aram_backend/models.py, backend/src/aram_backend/pilot_workbook.py, backend/tests/test_models.py, backend/tests/test_pilot_workbook.py, docs/PROJECT_LOG.md, docs/handoff/LATEST_HANDOFF.md
  • Implementation: prevent approved/locked fiscal-year identity mutation and deletion; prevent parent-company mutation/deletion when protected years exist; reject targetless, hierarchy-invalid, formula-code, review-evidence-deficient, and closing-delta-mismatched Pilot rows; replace the disconnected hard-coded root UI with an explicit quarantine page
  • Local tests: cd backend && .venv/bin/pytest -q -> 67 passed, 1 third-party deprecation warning
  • Focused static checks: .venv/bin/ruff check src/aram_backend/models.py src/aram_backend/pilot_workbook.py -> passed; .venv/bin/mypy src/aram_backend/models.py src/aram_backend/pilot_workbook.py -> passed
  • Migration / compile: isolated SQLite alembic upgrade head and alembic downgrade base passed; python -m compileall -q src tests scripts passed
  • Adversarial verification: the previously accepted targetless/account_level=99/closing_delta=999 workbook is rejected; locked-year identity mutation and deletion are blocked
  • GitHub Actions: pending for Draft PR #21
  • Artifacts/releases: NONE
  • Protected data: no canonical XLSX/PDF, data/, database, financial-source value, ZIP, EXE, tag, or release is changed
  • Acceptance: IN_PROGRESS; implementation author must not merge this PR
  • Reviewer: independent reviewer pending
  • Recovery: close the candidate PR without merge; accepted branch remains at the recorded base
  • Remaining risks: comprehensive Mapping, note/sub-note workflow, real Pilot UI/output, Windows packaging, and user acceptance remain incomplete
  • Next action: publish the focused PR and obtain independent remote review after CI

2026-12-03T09:30:00Z — Booklet v1.0 Phase 0 debts executed

  • Actor: Arena agent (implementation), per booklet §17 autonomous default+proof+ADR
  • Task/phase: Phase 0 — clear debts D-01..D-12 before Phase 1 vertical slice
  • Base: source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914
  • Working branch: arena/094f314c-aram
  • Commits: ac565e9 (domain + D-04/D-05/D-10/D-11 + ADR-012/013/014), a3c330b (D-01/D-03 LedgerBalance + Rial), a661423 (D-06 source store + CSV), 00ca58e (D-07 immutability triggers + hash-chained audit + reopen + ADR-016), 8f2f902 (D-02 controls preflight), 8412c56 (D-12 CI gates + ADR-017)
  • Implementation: pure financial domain (normalization/money/hierarchy/controls); LedgerBalance model with exact integer-rial BIGINT; content-addressed source-byte store + full CSV (UTF-8/BOM/Windows-1256, delimiter sniff); DB triggers block raw-SQL mutation of locked years; append-only hash-chained audit log + controlled reopen; C-01..C-04 ingestion preflight; CI quality gates (ruff, mypy strict domain, coverage total>=80%/domain>=90%, pip-audit, SQLite+PostgreSQL migration matrix)
  • Local tests: cd backend && pytest -> 201 passed
  • Gates: ruff check clean; ruff format (domain/services/migrations) clean; mypy domain strict clean; coverage total 92.23% / domain 97%; pip-audit no known vulnerabilities; SQLite alembic up/down/up clean; compileall clean; git diff --check clean
  • Real-data evidence (read-only): 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, ADR-014 hierarchy adopted (general=kol, subsidiary=حساب, canonical=kol+حساب)
  • GitHub Actions: pending push of branch; CI matrix will exercise PostgreSQL
  • Artifacts/releases: NONE
  • Protected data: no canonical data/, samples/, XLSX/PDF, database, financial-source value, ZIP, EXE, tag, or release changed
  • D-09 (git-history rewrite): BLOCKED — owner-only, requires explicit approval (§19); not performed
  • Acceptance: IN_PROGRESS; implementation author must not merge
  • Reviewer: independent reviewer pending
  • Remaining risks: PostgreSQL path validated only in CI (no local PG); Phase 1+ vertical slice, mapping, notes, statements, UI, packaging, UAT remain
  • Next action: push branch, open focused Phase-0 PR, obtain independent remote review after CI; then Phase 1 vertical slice (1404)

2026-12-03T10:45:00Z — Booklet v1.0 Phases 1–4 + owner priority fixes

  • Actor: Arena agent (implementation), per booklet §17 autonomous default+proof+ADR
  • Task/phase: Phases 1–4 vertical slice, then owner's 4 high-priority architecture fixes before new phases
  • Base: source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914
  • Working branch: arena/094f314c-aram
  • PR: #96 (draft -> source-data-cleanup)
  • Commits: 9c33586 (Phase 1 statements+drill-down), cfbd879 (Phase 2 mapping io), 9fba3c6 (Phase 3 note formula engine), b79d68e (Phase 4 WIP), a00b0dc (Fix 1 money/P-02), f7c3b4a (Fix 2 raw ledger rows), 1844a62 (Fix 3 approval gate), 225a38c (Fix 4 services mypy+golden+negative tests), be08192 (Fix 4 frontend CI gates), accf1cc (ruff cleanup)
  • Implementation: build_statements (BS/IS/CF/EQ) with source drill-down; mapping Excel import/export (fail-closed, idempotent); AST note-formula engine (no eval) with cycle detection; golden comparison resolving columns BY HEADER NAME (1403/1404 layouts differ); raw-row LedgerBalance storage + ledger_aggregate compute service + migration 20261203_05; explicit approval evaluate_controls with hard ERROR gate (C-03 double-mapping enforced); type-clean services; frontend Vite+React+TS RTL scaffold with eslint/tsc/vitest/Playwright gates
  • Local tests: cd backend && pytest -> 281 passed; mypy src/aram_backend/services src/aram_backend/domain -> clean; ruff check/format clean; frontend npm run lint/typecheck/test/build pass; npx playwright test --list -> 2 specs
  • Fix 1 real-data evidence: both ledgers, 6 money columns, 457,074 rows -> 0 fractional rial; ADR-012 documents scale-0 storage guarantee; 7 no-silent-rounding guard tests
  • Fix 4 audit note: owner item #3 was partly inaccurate — approval.py already passed mappings to run_controls; refactor makes C-03 enforcement explicit and adds proof tests rather than claiming a wiring bug
  • GitHub Actions: Backend CI + Frontend CI triggered on push (run IDs recorded after completion)
  • Artifacts/releases: NONE
  • Protected data: no canonical data/, samples/, XLSX/PDF, database, financial-source value, ZIP, EXE, tag, or release changed
  • Acceptance: IN_PROGRESS; implementation author must not merge
  • Reviewer: independent reviewer pending
  • Remaining risks: Phase 5 full UI screens, Phase 6 outputs, Phase 7 users/audit/reopen/backup, Phase 8 installer, Phase 9 UAT+tag remain; PostgreSQL path validated only in CI
  • Next action: continue §15 phase order — Phase 5 UI + Playwright, then 6→9; finish §18 report

2026-12-03T11:40:00Z — Booklet v1.0 Phases 5–9 (UI, outputs, admin, desktop, UAT)

  • Actor: Arena agent (implementation), per booklet §17 autonomous default+proof+ADR
  • Task/phase: Phases 5–9 in §15 order after the 4 owner priority fixes
  • Base: source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914
  • Working branch: arena/094f314c-aram
  • PR: #96 (draft -> source-data-cleanup)
  • Commits: eb9024a (tolerant import + statement_balance), fa64baf (Phase 5 workbench), c4c37c0 (Phase 6 outputs + ADR-022), e20572d (Phase 7 users/reopen/backup + ADR-023), 77fbe70 (admin UI), ffc9888 (Phase 8 desktop + ADR-024), dafb559 (e2e smoke fix)
  • Implementation: tolerant real-ledger import (reclassified rows kept, anomalies reported) + statement_balance capture (migration 20261203_06); RTL React workbench (setup/import/mapping/statements/drill-down/approval/admin) with eslint/tsc/vitest/Playwright gates; reviewable XLSX+JSON statement outputs with exact rial + full lineage; local users/roles (PBKDF2), controlled reopen/lock, verifiable backup (migration 20261203_07); offline desktop entrypoint on 127.0.0.1 + reproducible PyInstaller recipe (no binary committed)
  • Local tests: cd backend && pytest -> 308 passed; mypy domain strict + services clean; ruff clean; frontend lint/tsc/vitest/build pass; Playwright specs valid
  • Phase 9 UAT (real source_1404.xlsx, read-only, fresh local DB): 131,280 raw rows imported (4 skipped+reported); 22 notes/244 mappings auto-created; BS/IS/CF/EQ built; core BS notes reconcile rial-for-rial with official (10/11/12-1/12-2/13/14/15); remaining differences surfaced as discrepancies (OD-08); approval gate blocks on C-01/C-03/C-04 (fail-loud); export 158,050 lineage rows; backup created+verified; audit chain valid
  • GitHub Actions: Backend CI green on recent heads; Frontend CI e2e smoke fixed in dafb559 (run pending)
  • Artifacts/releases: NONE committed (Windows package is a build artifact, §19); UAT report at /tmp/aram-uat-1404/uat_report.json (evidence, not committed)
  • Protected data: no canonical data/, samples/, XLSX/PDF, database, financial-source value, ZIP, EXE, tag, or release changed
  • Acceptance: IN_PROGRESS; implementation author must not merge or tag
  • Reviewer: independent reviewer pending
  • Remaining risks: real-data BS/IS discrepancies (OD-08) require owner accounting review; Windows package built+verified on a clean Windows machine by the owner; tag v1.0.0 is the owner's post-acceptance action
  • Next action: independent GitHub review of PR #96; owner acceptance, merge, tag v1.0.0, build Windows package

2026-12-03T12:20:00Z — 5-pass deep compliance review + fixes (PR #96 ready)

  • Actor: Arena agent (implementation), owner-requested 5-perspective deep review
  • Task: verify booklet compliance across 5 reviewer roles; PR #96 marked ready for review (not merged)
  • Base: source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914; branch arena/094f314c-aram
  • Commits: 4726f5e (approve role gate + editable notes/mappings/rows + ADR-018 dep note), 87b1929 (UI NotesManager)
  • Review report: docs/reviews/BOOKLET_COMPLIANCE_REVIEW.md (5 agents, checks, findings, verdicts)
  • Findings fixed: F2-1 (editable notes/mappings/rows: PUT/DELETE + list endpoints, Draft-guarded, D-07->409, 9 tests + UI), F3-1 (API /approve role-gated when users exist, 2 tests), F5-1 (python-multipart documented in ADR-018)
  • Observation O5-1: pilot vendored wheels (commit 2fce09d) noted for owner; left intact (accepted pilot deliverable)
  • Verified: domain/services layering clean; no eval; no runtime network; no hardcoded secrets; source data unchanged; no new root analytical doc; ADRs 012-024 present
  • Local tests: cd backend && pytest -> 319 passed; mypy domain strict + services clean; ruff clean; frontend eslint/tsc/vitest/build pass
  • GitHub Actions: re-triggered on new head (pending)
  • Artifacts/releases: NONE committed
  • Acceptance: IN_PROGRESS; author does not merge or tag
  • Reviewer: independent reviewer pending
  • Next action: independent GitHub review of PR #96; owner acceptance, merge, tag v1.0.0, build Windows package

2026-12-03T15:22:02Z — PR #96 merged + tag v1.0.0 (owner acceptance)

  • Actor: owner (final acceptance via one-time waiver of independent review); Arena agent executed merge+tag under that authorization only
  • PR #96 MERGED (squash) into source-data-cleanup -> head 46253c94405abd065dfc5e8cf080b295cb83cde4
  • Tag v1.0.0 created on 46253c9 (remote tag object a17da671ce1fef2415ce56ebec87b69da6ebb603)
  • Post-merge CI: Backend #47137691800 ✅, Frontend #47137691857 ✅ (both on 46253c9)
  • Transfer verified: git diff --exit-code working tree vs origin/source-data-cleanup = 0 (199 files identical)
  • New mission B0…B12 reinstates no-merge/no-tag for the implementation author

2026-12-03T15:45:00Z — B0: booklet reference + lightweight-process reconciliation

  • Actor: Arena agent (implementation); independent reviewer separate
  • Mission: booklet-compliance remediation B0…B12, one focused PR per category, sequential
  • Base: live source-data-cleanup@46253c94405abd065dfc5e8cf080b295cb83cde4 (BASE MATCH verified, §0.2); working branch arena/094f314c-aram aligned to accepted base via merge (no force-push)
  • B0.1 booklet: docs/booklet/BOOKLET_v1.0.md (pymupdf extraction, visual-RTL -> logical reorder) + docs/booklet/MANIFEST.json (original PDF SHA-256 7dd508274babd604f74d10b692464ce42f26a88c4a7116cfd861188abd4a2baf, 745,088 bytes, 14 pages). Original is PDF not docx; binary not committed (§19); ADR-025
  • B0.2 status: PROJECT_STATUS.md rewritten to GitHub reality (Phases 0–9 VERIFIED_AND_MERGED at 46253c9, 319 backend tests, post-merge CI links, stale V1-01 IN_PROGRESS / VERIFIED_BUT_UNMERGED rows removed, D-08 closed)
  • B0.3 archive: 14 root analytical docs git mv -> docs/archive/ (+ index README); root retains only AGENTS.md + PROJECT_STATUS.md; no new root analytical doc (§0.5)
  • B0.4 process: AGENTS.md ↔ §0.5 conflict reported + resolved; handoff cadence changed to per-category (not per-step); lightweight-process bullets added; ADR-026
  • B0.5 registry: docs/discrepancies.json skeleton {row, our_amount, official_amount, cause, evidence, year} (OD-08; populated in B8)
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f, samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e — unchanged before/after (B0 touches docs only)
  • Tests: B0 is documentation/process only; no code changed; backend/frontend suites unaffected (319 backend / 11 frontend at accepted head)
  • Artifacts/releases: NONE committed
  • Acceptance: IN_PROGRESS; author does not merge or tag
  • Next action: independent GitHub review of B0 PR; B1 starts only after B0 acceptance

2026-12-03T16:10:00Z — C0: booklet 2 course correction (بخش الف)

  • Actor: Arena agent (implementation); independent reviewer separate
  • Trigger: owner delivered booklet 2 v2.0 (course correction + general-platform architecture); supersedes conflicting parts of booklet 1 and the B0…B12 framing with roadmap C0…C10 (ADR-027). No owner questions (§14).
  • Base: live source-data-cleanup@46253c94405abd065dfc5e8cf080b295cb83cde4 (BASE MATCH, §0.2). Booklet 2 cited PR #96 head 2fce09d (pilot/browser); actual merged head 46253c9 — browser files present in both, course correction applies (reconciliation recorded in ADR-027, الف‌4 honesty).
  • الف‌1 browser removal: git rm webapp/, docs/{app.js,index.html,bridge.py,styles.css,py,vendor}, scripts/build_webapp.py, .github/workflows/pilot-pages.yml (ADR-028). No backend/frontend code refs (verified). Recoverable from history @46253c9; experiment/browser-edition branch = owner action (Arena single-branch constraint).
  • الف‌2 persistent core: VERIFIED main path = domain/{controls,money,hierarchy,formula,normalization} + statement_api/admin_api on stored LedgerBalance; legacy in-memory pilot retained as logic reference (secure C8, retire later; exception-queue persistence C4).
  • الف‌3 phase 0/1 + golden: VERIFIED merged @46253c9 (D-01..D-12; test_golden/test_domain_controls/test_approval_gate; real-1404 UAT).
  • الف‌4/الف‌5: PR honesty + ≤~1500-line/one-phase rules added to AGENTS.md; generality rule (ب‌1) + no-runtime-network/read-only-source/no-plaintext-secrets (§16) added.
  • الف‌6 triage: docs/PR_TRIAGE.md — ADOPT #81(C6/C4)/#89(C8)/#92(C8); CLOSE NO-GO #82/#88; SUPERSEDED #90/#91 + #22–#80 backlog. Closes recommended, executed after triage acceptance (conservative §14); author merges nothing.
  • Booklet 2 verbatim: docs/booklet/BOOKLET_v2.0.md (SHA-256 9738f8049703ca63ea6eae471538cdadc6328e4f15efaaf87a250315e516e2fc) + MANIFEST.json updated (both booklets).
  • OD-09..OD-14 adopted (ADR-027); databansoft.ir not reachable from sandbox allowlist — no capability claims (OD-14).
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f, samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e — unchanged before/after.
  • Tests: removal touches no backend/frontend code; suites unaffected (319 backend / 11 frontend at accepted head); local re-run recorded in PR.
  • Artifacts/releases: NONE committed. Acceptance: IN_PROGRESS; author does not merge or tag.
  • Next: independent review of C0 (PR #97, re-scoped from B0); C1 starts only after C0 acceptance with evidence in PROJECT_STATUS.

2026-12-03T20:20:00Z — C0 addendum: booklet 2 appendix revision (owner) + ADR-029

  • Actor: Arena agent (implementation); trigger: owner re-sent booklet 2 with a rewritten appendix ("این کتابچه اصلاحی رو پیش ببر")
  • Appendix now records: Databan catalog (fall 1405) studied by owner — marketing claims, unverified, inspiration only; Databan does NOT prepare financial statements (Aram's gap); positioning = independent pluggable product + Host Integration API (REST + permissions); commercial cooperation out of agent scope
  • OD-09 REVISED per owner directive: pyodbc with existing ODBC driver preferred (Windows + SQL Server target); python-tds fallback; 100k-row proof gate unchanged (ADR-027 updated, ADR-029)
  • Accepted elements mapped: multi-layer access control (C8), source-drift nightly detection → «نیازمند بازبینی» (C8/C9), nightly document audit C-16+ (optional post-C6, OD-12), work center (C7), dry-run (C4/C8), signed updates + auto-rollback + in-app backup/restore (C9), letterhead print templates + statutory ledgers + Ctrl+K (C7), AI assistant C11 (optional, OFF by default, never generates numbers, engine+CalculationRun lineage only, read-only, local/anonymized, audited), multi-company group dashboard (C6/C7; consolidation next version)
  • Rejected scope binding: مودیان/IMED/trade system/bank-invoice+document reader/form builder/cartable; messenger bots for financial data prohibited (notifications without figures only)
  • Agent has no access to databansoft.ir (sandbox allowlist); no independent capability claims made; no Databan code/text/design/name/brand copied
  • docs/booklet/BOOKLET_v2.0.md appendix replaced verbatim (list numbering normalized, disclosed in header); new SHA-256 79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a; MANIFEST.json keeps revision history (initial 9738f804…)
  • ADR-029 added (positioning, OD-14 comparison table, element→phase mapping, OD-09 revision, C11 constraints); PROJECT_STATUS roadmap updated (C5/C7/C8/C9 notes + C11 row)
  • Protected data: data/ + samples/ trees unchanged (docs-only addendum). Code state identical to C0 commit 6e3fe70 (backend 319 passed / frontend green run on that tree)
  • Acceptance: IN_PROGRESS; author does not merge or tag. Next: push C0 (both commits), update PR #97 body to match diff (الف‌4), independent review

2026-12-03T21:00:00Z — C0 remediation after independent review of PR #97

  • Actor: Arena agent (implementation); trigger: owner/independent-reviewer verdict on PR #97 (report accurate; repo-vs-booklet-2 gaps mostly from merged PR #96) + explicit instruction to create experiment/browser-edition branch
  • Branch instruction: BLOCKED by Arena single-branch session constraint (system-level; cannot create/push any branch but arena/094f314c-aram). Reported per booklet 2 §14; exact owner command + GitHub-UI alternative recorded in ADR-028. Preservation already guaranteed: tag v1.0.0 -> 46253c9 contains the full browser edition (recoverable after #97 merges). No second PR created (owner: "Create PR را نزن").
  • الف‌7 REMEDIATED (was the real C0 exit gap): re-ran golden.compare_year(1404) fresh -> 28 comparisons / 9 matched / 19 diffs (BS 9/16, IS 0/6, EQ 0/0, CF 0/6). Populated docs/discrepancies.json one-by-one with cause + reproducible evidence + source/official SHA-256: 16 caused (8 exact-magnitude presentation-sign flips per ADR-013; CF note-number reuse 10/15; absent notes IS 20-3/7, CF 20-1; CF not yet derived 23/24; official CF account-code row 46268), 3 under_investigation (IS 6/8/9 magnitude mismatches = bugs until proven, D1). EQ official sheet yields 0 note rows (C3 parsing gap, recorded). Real-1404 approval still blocked by C-01/C-03/C-04 (correct fail-loud).
  • Fresh verification evidence for reviewer's "not verified" items: backend full suite exit 0, collect-only = 319 tests; D-04/D-05 test_domain_normalization.py = 17 passed (numeric-code exactness, leading zeros, Persian/Arabic digit + letter normalization, ZWNJ preserved); golden numbers freshly reproduced above.
  • Reviewer deviations recorded as tracked gaps in PROJECT_STATUS: forgeable actor-string auth + unguarded endpoints + open approval when no users (C8); only 4/15 controls (C3); desktop.py create_all bypasses Alembic (C9); PR #96 discipline violation (154 files/+24,327, stale head 969f608 vs babe829, merged without independent review under one-time waiver) recorded as historical, الف‌4/5 enforced going forward; booklet-1 extraction artifacts disclosed (ADR-025).
  • Screenshot +21065/−242 explained: Arena patchset view diffs vs session base 7dc864f (cumulative with phases 0–9), not PR base 46253c9; actual PR #97 diff = 50 files/+1490/−4892 (reviewer-confirmed).
  • Protected data: data/ + samples/ trees unchanged (docs-only remediation). No code changed; backend/frontend suites unaffected.
  • Acceptance: IN_PROGRESS; author does not merge or tag. Next: independent re-review of updated PR #97; C1 only after C0 acceptance.

2026-12-04T08:10:00Z — R1 real authentication (booklet 2.1)

  • Actor: Arena agent (implementation). Trigger: booklet 2.1 R1 (priority 1). Precondition consumed first: PR #97 preconditions verified (OPEN, head 1e247083d36ef76a67432880db2a1f5984fa575c, mergeable_state=clean) and squash-merged under the owner's one-time waiver → accepted head f2e6da5e7ade3c851584008d590c588894d4c9c3. Working branch aligned to that tree (byte-identical) so this PR's diff is R1-only. experiment/browser-edition not created (Arena single-branch constraint; owner-authorized skip; tag v1.0.0 preserves the files).
  • Backend: actor removed from every request model; new auth.py with the single current_user dependency (router-level on statements/admin/schema/pilot) + optional_user + bootstrap_guard; services/users.py rewritten for 256-bit bearer tokens (SHA-256 stored only), 8-hour absolute TTL, logout revocation, 5-attempt/15-minute lockout, PBKDF2 600,000 rounds with transparent upgrade of legacy 200,000-round hashes, timing-equalised unknown-username path, audit entries for login/logout/lock/rehash. approve lost its "no users → allowed" shortcut and checks role before existence. Backup dest confined to the data folder (confine_dest, symlink/traversal/absolute escapes refused). Desktop launcher arms a one-time 256-bit token passed in the URL fragment and exchanged once for an X-Aram-Launch grant. pilot_api router, /pilot mount and the legacy / HTML removed from main.py; /docs, /redoc, /openapi.json disabled. Migration 20261204_08 adds auth_sessions + password_rounds/failed_login_count/locked_until.
  • Frontend: LoginPanel gates the whole workbench; api/session.ts keeps the token in sessionStorage (read per request) and exchanges the launch fragment; client.ts attaches Authorization/X-Aram-Launch, clears the session on 401, and replaces the bare <a href download> exports with authenticated fetch+blob downloads; actor inputs removed from ApprovalPanel/AdminPanel.
  • Decisions recorded in ADR-030 (N=5, lockout 15 min, TTL 8 h absolute, PBKDF2 600k because Argon2/bcrypt/passlib are absent and no new runtime dependency is allowed, bearer-not-cookie to avoid CSRF, four public routes, pilot files retained but unserved to respect the 1,500-line cap). Booklet 2.1 requirements registered in docs/booklet/BOOKLET_v2.1_REGISTER.md (explicitly a structured transcription, not verbatim; owner text wins) + MANIFEST SHA-256 e051140c0bc8dcebc9340286ee7fed24b4834913ef2898c8aa0cfbea58e32397.
  • Evidence: backend 354 passed (collect-only 354; was 319), including tests/test_auth_r1.py 33 R1 acceptance tests; frontend 15 vitest tests / 5 files, tsc + eslint clean; ruff check src tests, ruff format --check domain services migrations, mypy domain, mypy services clean. Migration 08 verified on a copy of a populated DB: 131,280 ledger rows, 2 users, 28 triggers unchanged; the live preview's legacy root logged in and was rehashed 200,000 → 600,000. CI e2e job now starts uvicorn on a throwaway DB with ARAM_E2E_BACKEND=1 so the real-session e2e actually runs.
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f and samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e unchanged (before = after).
  • Acceptance: R1 MET; author does not merge or tag. Stop after R1 per booklet 2.1 §8. Next: independent GitHub review of the R1 PR; R2 only after acceptance.

2026-12-04T09:56:00Z — Dev tooling: pre-commit guards + secret gate + CI quality gates (owner-requested)

  • Actor: Arena agent (implementation). Trigger: owner asked which tooling would best improve the software and selected the four low-risk items in chat (pre-commit + detect-secrets; prod npm-audit gate; frontend coverage gate; Dependabot). Worked on arena/2d4eda07-aram off verified base 07a8ae0e621e706e4ce1583a611699bc2bc6d38d (= origin/source-data-cleanup at fetch time; Arena single-branch session constraint, same as R1).
  • .pre-commit-config.yaml: pre-commit-hooks v6.0.0 (large-files 1 MB with data/+samples/ excluded, merge-conflict, toml, yaml, detect-private-key, trailing-whitespace) + ruff-pre-commit v0.17.6 (satisfies backend ruff>=0.8,<1; revs verified via GitHub API 2026-12-04; hook scopes mirror Backend CI exactly: check on backend/{src,tests}, format on domain/services/migrations). end-of-file-fixer deliberately NOT enabled: 14 pre-existing files (incl. governance-frozen docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt and docs/archive/) lack the convention; repo-wide normalization is unrelated churn against the focused-diff rule, and the existing git diff --check CI steps keep PR diffs clean. trailing-whitespace enabled — zero pre-existing violations (verified).
  • Secret scanning: .secrets.baseline (9 files / 18 findings — reviewed false positives: backend test-fixture passwords, the CI PostgreSQL dummy password, docs SHA-256 hashes) + scripts/check_secrets_baseline.py, a churn-free gate failing only on NEW (file, plugin type, line-hash) triples; # pragma: allowlist secret is the documented escape hatch. The baseline excludes itself from the scan (--exclude-files '^\.secrets\.baseline$'): its hashed_secret values are secret-shaped by construction, so once the file is tracked a naive scan reports 22 self-referential findings (caught by this PR's first CI run; the gate script and the documented regeneration command carry the same exclusion). detect-secrets is intentionally NOT a pre-commit hook: its baseline mode rewrites line numbers (exit 3) whenever a baselined file is edited — churn incompatible with الف‌4 diff discipline. Gate negative-tested: staged fake secret → exit 1 with file:line; pragma variant → exit 0; cleanup → exit 0.
  • CI: new Repo Hygiene workflow (.github/workflows/repo-hygiene.yml) — pre-commit run --all-files + the secret gate on every PR and accepted-branch push (no path filter). Frontend CI quality job: added npm audit --omit=dev --audit-level=moderate (prod deps must be moderate-clean; install keeps --no-audit for speed) and replaced bare npm test with npm run test:coverage.
  • Frontend coverage gate (frontend/vite.config.ts, @vitest/coverage-v8 2.1.9): scope src/** excluding test files/main.tsx/d.ts; thresholds lines/statements 30, branches 70, functions 40 against the measured 2026-12-04 baseline (33.97/72.97/42.85/33.97, 15 tests); autoUpdate: false. Raising toward the C9 80/90 target is a separate test-growing task.
  • .github/dependabot.yml: weekly updates — github-actions (/), npm (frontend, minor+patch grouped, majors individual), pip (backend). Documented limitation: Dependabot does not manage .pre-commit-config.yaml revs (bump deliberately via pre-commit autoupdate).
  • Dev-dependency debt recorded, NOT fixed here ( الف‌5 — needs a major upgrade, own task): full npm audit reports 6 dev-only advisories — vitest 2.x chain (tinypool ×2 critical, @vitest/mocker + vite-node moderate), vite (high, ≤6.4.3), esbuild (moderate, dev-server only). None ship to users (prod audit: 0 vulnerabilities); npm audit fix --force would jump vitest 2→5 (breaking). Owner-scheduled upgrade task.
  • Evidence: pre-commit run --all-files — all hooks Passed, zero file modifications; secret gate 0 new; frontend eslint + tsc clean; 15 vitest tests pass under the coverage gate; npm run build clean; npm ci reproduces the lockfile (+591 lines = generated @vitest/coverage-v8 dependency tree). Backend code untouched (Backend CI path filter unaffected); no R-task scope touched.
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f and samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e unchanged (before = after).
  • Acceptance: IN_PROGRESS; author does not merge or tag. Next: independent review of the tooling PR; the vitest/vite major upgrade and any coverage-threshold raise are follow-up tasks.

2026-12-04T10:20:00Z — R2 full control set C-01..C-15 (booklet 2.1)

  • Actor: Arena agent (implementation and merge, per the owner's 2026-12-04 directive "خودت کامل انجام بده و دیگه متوقف نشو"). Precondition: PR #98 (R1) squash-merged → accepted head 07a8ae0e621e706e4ce1583a611699bc2bc6d38d; working branch aligned to that tree before starting, so this diff is R2-only.
  • Domain: check_c05…check_c15 added as pure functions (Persian messages, booklet 1 §7 severities). ControlResult.ran distinguishes "failed" from "could not run"; _not_run returns passed=False, ran=False with «اجرا نشد: <دلیل>». run_controls(rows, mappings, context) always returns 15 results in stable order — with no context the eleven context-dependent controls block rather than silently pass.
  • New services/control_context.py gathers inputs from stored data only: prior-year closing per account, BS section totals under the ADR-013 sign policy, note-vs-line totals keyed by (statement, note), IS net result, equity movements, CF net change, cash opening/closing, declared codes and natures. Nothing is inferred from titles.
  • ADR-031 records five decisions: unrun ≠ pass; severities unchanged (C-13 ERROR in CI / INFO in UI, C-14/C-15 WARN); control roles are explicit data (configuration_json.role = retained_earnings | cash, exposed on note create/update and in the notes manager); a refused approval is now audited (approved:false + blocking + unrun codes, committed, year stays Draft) — this reverses the old "blocked approval writes no audit" test, which was updated with a payload-hash assertion, not deleted; and POST /companies/{id}/years was added because requiring C-05 without a way to load a prior year would make approval permanently impossible.
  • Evidence: backend 404 passed / exit 0 (was 354) including tests/test_controls_r2.py (48 tests: positive + negative per control, unrun-blocking, API preflight, complete-year-through-API); frontend 17 vitest / 6 files; ruff check + format (32 files), mypy (23 files), tsc, eslint, npm run build all clean. Live proof on the real 131,280-row preview DB: GET /years/1/preflight → 15 controls in 7.2 s, can_approve:false, C-01 flags the known 6 rows, C-03/C-04 flag 221 unmapped accounts, 8 controls report «اجرا نشد» with their reason.
  • Legacy tests updated to the new contract (four-control expectations in test_domain_controls, test_preflight, test_statement_build; approval-after-mapping-alone in test_mapping_workflow; locked-year setup in test_editing now builds a complete year through the API). No test was deleted or skipped to reach green.
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f and samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e unchanged (before = after).
  • Budget: 968 / 1500 authored lines excl. tests/data. Acceptance: R2 MET (15 controls in preflight, per-control ± tests, approval-rejected test). Next: R3 (build-vs-official comparison, IS 6/8/9 root cause, EQ/CF parsing).

2026-12-04T10:40:55Z — ADR-033: five-role agent orchestration adopted + auto-discovery entry point (owner directive)

  • Actor: Arena agent (M0 implementation). Trigger: owner directive in Arena chat (2026-12-04): place the five-agent orchestration where every future agent reads it automatically — "you pick the best method" — so no prompt-pasting or file-naming is needed in a new session.
  • Landed: docs/agent-orchestration/MASTER_ORCHESTRATION_PROMPT.md + AGENT_PROMPTS.md (design from the earlier chat turns, now committed); docs/adr/ADR-033-agent-orchestration.md; compact pointer section in AGENTS.md (the ecosystem's auto-read agent entry point: read the master prompt before starting or resuming any task); PROJECT_STATUS.md bullet; docs/handoff/LATEST_HANDOFF.md refresh (governance change → ADR-026 cadence: role-model entry, superseded-head note, current single-next-action).
  • Mechanism: a new session checks out the canonical branch → reads AGENTS.md → pointer → master prompt (roles, work-order → PR → tester-verdict → integration loop, serialization, invariants, first actions, "verify live" snapshot). Goes live for new chats only after the merge into source-data-cleanup.
  • الف‌5 disclosure: the Arena single-branch constraint (system-level; precedents ADR-028 / R1) forces co-landing with open tooling PR #99 — the governance commits join the same branch/PR; PR title+body updated (الف‌4); the split recipe is documented in ADR-033; the owner chooses combined acceptance or split.
  • No product/backend/frontend/workflow behavior change; no R-task scope touched. Secret gate re-verified after the additions: .secrets.baseline unchanged (the new docs' 40-char tree hashes do not trigger the plugins — fresh-scan diff = 0 new / 0 gone).
  • Protected data: data/ tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f + samples/ tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e unchanged (before = after).
  • Coordination event (same day, mid-flight): a parallel Arena session (arena/094f314c-aram) implemented R2 and the owner merged it as PR #100 @ a8ba20c (10:40:42Z, owner directive). This branch merged that base (no force-push; ADR-028 precedent); the PROJECT_LOG.md conflict was resolved append-only and chronological (the R2 entry untouched); this ADR renumbered 031→032→033 (R2 holds ADR-031-r2-full-control-set.md; R3 later holds ADR-032-r3-built-vs-official.md).
  • Acceptance: IN_PROGRESS; author does not merge or tag. Next: independent review of the updated PR #99 (tooling + orchestration governance); after acceptance → R3 via the orchestration loop, coordinated against the parallel session (R2 already merged).

2026-12-04T11:30:00Z — R3 built-vs-official comparison (booklet 2.1)

  • Actor: Arena agent (implementation and merge). Precondition: PR #100 (R2) squash-merged → accepted head a8ba20c1bc5595ceaa73ff30be8dd91748a87a6e; working branch aligned before starting.
  • New services/official_parse.py: each official statement gets the parser its layout needs. BS/IS/CF are note lists; EQ is a components × movements matrix (opening/changes/closing/prior-closing) — it went from 0 parsed figures to 24. The year column is anchored on the header row, because the title «به تاریخ 29 اسفند 1404» also contains the year and previously won the search (pointing at column 0). CF's 46268 is flagged account_code, not a note.
  • New services/statement_compare.py: compares the persisted StatementLine rows that build_statements wrote — not a separate source aggregation — keyed by (statement, note), with per-account deltas and the exact official cell for every difference. official_comparisons() feeds C-13; POST /years/{id}/official-comparison parses an uploaded workbook in memory and changes no stored figure.
  • Three real engine defects found by measuring (ADR-032): (1) statement_balance is debit-positive, not pre-signed — applying the section sign reproduces the official BS 16/16 instead of flipping 7 notes; (2) the per-row CLOSING fallback leaked non-statement rows into totals (BS was 6/16 through the engine) — the basis now belongs to the import; (3) the source assigns notes per row (account 718291 posts to notes 6 and 9), so LedgerBalance.source_note was added (migration 20261204_09) with the rule "explicit mapping wins; source note disambiguates multi-note accounts". IS expenses are presented negative, so Revenue and Expenses both take −1 and the net result is the sum of signed IS lines (C-08 input corrected).
  • Measured on real 1404 (131,280 rows): BS 16/16 matched. IS 1/6 exact: note 5 matches; notes 6/7 differ by −2/+1 million rial (the official sums per-category rounded values); notes 8/9 differ by a 1,111,554 reclassification (their combined total −9,057,668 matches exactly, and the official's own adjustment column records ±1,111,554); note 20-3 has no source rows at all. CF 0/6 (still not rendered).
  • Acceptance: R3 PARTIAL — BS 16/16 MET, IS 6/6 NOT MET. The IS blocker is source data, not code: no tolerance was invented and no figure was adjusted to force a match. Root causes for IS 6/7/8/9/20-3 are established with account-by-account evidence.
  • docs/discrepancies.json regenerated (schema v2) from the built output: 11 entries, each with cause, official cell and account deltas; source/official SHA-256 recorded.
  • Protected data: data/ and samples/ trees unchanged. Tag v1.0.0 untouched.

2026-12-04T14:04:53Z — PR #99 acceptance delegated to the author session; self-review PASS; combined acceptance; squash merge

  • Actor: Arena agent (M0/author). Trigger: owner directive in this Arena chat (2026-12-04): «خودت اینکاری که از من خواستی رو انجام بده» — delegating the pending owner step for PR #99 (independent review + combined-vs-split acceptance decision) to the author session.
  • Independence waiver (recorded, الف‌4): the review below was performed by the author session itself, not an independent reviewer, per the owner delegation — the same owner-authorized pattern as the PR #100/#101 self-merges earlier the same day. GitHub remains the evidence source of truth.
  • Base-sync event: source-data-cleanup advanced to R3 (0578ea5, PR #101, owner-merged 11:50:09Z) while this PR was open. The branch merged that base again (no force-push; ADR-028 precedent); the PROJECT_LOG.md conflict was resolved append-only and chronological (R2 10:20 → orchestration 10:40 → R3 11:30, both sides untouched). The orchestration ADR was renumbered 032→033 (R3 holds ADR-032-r3-built-vs-official.md).
  • Review verdict: PASS at the synced head — pre-commit 8/8 hooks; secret gate 0 new (one baseline finding gone: R2 removed the inline "supersecret" test fixture from test_editing.py; the gate fails only on new findings, baseline intentionally not regenerated); git diff --check clean; protected trees unchanged (data 2ef8a512…, samples 00aba54b…); backend on the merged tree: pytest 407 passed exit 0, ruff check src tests clean, ruff format --check (domain/services/migrations) clean, mypy domain-strict + services clean, coverage 89.92% total / 96% domain (floors 80/90); frontend lint/typecheck/test:coverage/build exit 0 and prod audit 0 vulnerabilities; CI on the pushed head: Repo Hygiene + Frontend CI (incl. Playwright e2e, 7 passed) success.
  • Acceptance decision: combined (option a) — tooling gates + ADR-033 governance land in one squash merge. Rationale: a single verified head with green CI on that exact head; the split recipe (cherry-pick 38b1e65/9f915fe/3b16aa1/73889c7 onto a tooling-only branch) stays documented in ADR-033 for future reference; PR #96/#97 precedent covers combined-scope owner waivers.
  • Mechanics: squash merge per repo convention; accepted-head record rides in the merged docs/handoff/LATEST_HANDOFF.md; no tag (author does not tag; v1.0.0 untouched).
  • Secret-gate event (found during pre-merge re-verification on the synced tree): the merged R3 tree carries 2 detect-secrets findings at docs/discrepancies.json:7,9 — the source_sha256/official_sha256 integrity digests (high-entropy hex; reviewed false positives: recomputable from data files already committed to the repo; JSON cannot carry inline pragma comments). R3 merged before the gate existed on the canonical branch (the gate is part of this PR). Resolution: reviewed baseline update via the documented command (detect-secrets scan --exclude-files '^\.secrets\.baseline$') → 19 findings, gate green on the merged tree; the baseline was not regenerated to silence unreviewed content. Future note: regenerating discrepancies.json against new file hashes will require the same reviewed baseline update.
  • Post-sync re-verification (docs-only delta since the 047119f evidence above): pre-commit 8/8 hooks passed; secret gate green (above); git diff --check clean; protected trees unchanged (data 2ef8a512…, samples 00aba54b…). Backend is untouched by this PR's delta — the R3 backend state is CI-verified at 0578ea5 (PR #101: lint/types/coverage pass; migration round-trips pass on sqlite and postgresql), so no local re-run was needed; frontend gates run in CI on the final head.
  • Effect: with this merge, the five-role orchestration mechanism (AGENTS.md pointer → docs/agent-orchestration/MASTER_ORCHESTRATION_PROMPT.md) goes live for all new Arena sessions. Next work per the refreshed snapshots: R4 via the orchestration loop; R3's IS residue (notes 6/7/8/9/20-3) is source-data-blocked → Davood escalation (protected data / accounting ambiguity), not agent code work.