codex/aram-clean-reference-year-integrity-20261030
add-index-html-10623938925177053894 arena/094f314c-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 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 145 lines 14.7 KB
Rendered Raw
1 # Aram — Latest Handoff Prompt
2
3 > Durable accepted-state record with persistent role assignments and recovery workflow.
4 > GitHub remote evidence remains authoritative. Always fetch the live branch head and open PRs before acting; recorded SHAs are verified events, not perpetual current-head claims.
5
6 ## Current correction and focused candidate — 2026-10-23
7
8 This dated correction supersedes the older PR #21 candidate/single-next-action narrative below; earlier details remain historical evidence.
9
10 - Live accepted base verified: `source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914`.
11 - PR #21 is merged (2026-08-27). Accepted-head [Backend CI](https://github.com/davoodmehraban89/Aram/actions/runs/33063001065) succeeded; 67 tests. The legacy UI is quarantined and the PR #21 validation/identity fixes are accepted.
12 - New branch `codex/v1-year-isolation-followup-20261023` contains a focused, unaccepted follow-up for original-year ownership and relationship/FK reference validation.
13 - Local follow-up evidence: 110 pytest tests passed, one existing third-party warning; migration round-trip, compile and whitespace checks passed. Original-owner regressions first produced 22 expected failures; effective-reference regressions first produced seven expected failures.
14 - Exact application scope: `backend/src/aram_backend/models.py`, `backend/tests/test_models.py`. Control scope: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, this handoff, and `docs/superpowers/{specs/2026-10-23-year-isolation-design.md,plans/2026-10-23-year-isolation.md}`.
15 - Independent local review requested a pending-explicit-ID parent correction; eight regressions were added and all 110 tests passed after the fix. Final remote acceptance remains pending.
16 - Remaining boundaries: graph-wide moves of clean referencing records, expired fiscal-year lifecycle/same-flush behavior, and bulk/raw/concurrent writes require separate focused acceptance before a financial release.
17 - Published Draft [PR #32](https://github.com/davoodmehraban89/Aram/pull/32); initial code head `75f82fcbfa2d9745d4c8e358979fe4fe754a82b6`, [Backend CI](https://github.com/davoodmehraban89/Aram/actions/runs/39959519926) success. This reconciliation changes documentation only. Fetch the resulting final head and CI before acceptance. Independent remote acceptance remains required; author must not self-merge.
18 - Draft PRs #22–31 are active and unaccepted. In particular #26/27 supply mapping foundations, but do not fulfill full account/dimension identity, persisted old/new preview, approval or identical-input duplicate coalescing.
19 - Owner clarified Peyvast is the first database source, alongside Excel. Vendor FAQ identifies default Microsoft SQL Server, supports 2019/2022 and recommends 2022: https://payvast.com/نرم-افزار-حسابداری/ . The customer installation/schema/access have not been inspected; no live extraction is claimed.
20 - Preserve canonical data. No migration, dependency, workflow, source XLSX/PDF, `data/`, financial-source value, ZIP/EXE, tag or release changed.
21 - Next: independent safety review, reconcile dependent drafts, then shared DB/Excel and governed mapping work against documented customer source semantics. A separate design note exists in the task workspace, not as accepted repository functionality.
22
23 ## Accepted repository state
24
25 - Repository: davoodmehraban89/Aram
26 - Canonical branch: source-data-cleanup
27 - Recorded accepted control event: [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b` at `2026-08-25T06:46:16Z`.
28 - Durable post-merge record: [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge `77f9f595ccfe67a87b11024ff0f6143629dba438` at `2026-08-25T06:57:02Z`.
29 - Earlier accepted work includes PR #1, #4, #6, #8, #10, #12, #13, and #15.
30 - PR #7, PR #9, PR #16, and PR #17 are closed without merge and contribute no accepted code.
31 - [Issue #14](https://github.com/davoodmehraban89/Aram/issues/14) is completed. [Issue #11](https://github.com/davoodmehraban89/Aram/issues/11) records Gate 3 as ready for a new focused task definition.
32 - No user-ready V1 release, tag, ZIP, EXE, or retained release artifact is accepted or proven.
33
34 ## Accepted Gate 2A evidence
35
36 - PR: https://github.com/davoodmehraban89/Aram/pull/15
37 - Base: `source-data-cleanup@7c7533ee87146dc8fc78b46ebf423be55532c7eb`
38 - Reviewed PR head: `74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06`
39 - Squash merge: `4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4`
40 - Final GitHub Actions: https://github.com/davoodmehraban89/Aram/actions/runs/32712900800
41 - CI conclusion: success; 52 passed, 1 warning; Alembic upgrade/downgrade and compileall succeeded.
42 - Accepted capabilities: governed Pilot workbook v0.1 contract, approved blank template, reproducible generator, and deterministic read-only in-memory preflight.
43 - Template path: `samples/Aram_Pilot_Input_and_Mapping_Template_v0.1.xlsx`
44 - Independently recomputed SHA-256: `e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f`
45 - Protected boundary: PR #15 changed no canonical XLSX/PDF, `data/`, database, financial-source, workflow, migration, desktop/release, ZIP, or EXE path.
46
47 ## Accepted PR #18 control evidence
48
49 - Base: `source-data-cleanup@4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4`
50 - Reviewed head: `fcbeb7387218e9ab294318ae462ed59de717fc95`
51 - Squash merge: `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`
52 - Exact changed files: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`, `docs/handoff/MASTER_RECOVERY_PROMPT.md`
53 - Verification: complete remote four-file diff and metadata reviewed; append-only project-log behavior and protected-data boundary confirmed.
54 - GitHub Actions: none on the reviewed head; documentation-only paths did not trigger Backend CI.
55 - Artifacts/releases: `NONE`
56 - Protected boundary: no application code, tests, workflow, migration, dependency, workbook content, financial data, binary, ZIP, EXE, artifact, or release file changed.
57 - Acceptance authority: Davood explicitly authorized the merge after independent review.
58
59 ## Accepted PR #19 control evidence
60
61 - Base: `source-data-cleanup@f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`
62 - Reviewed head: `b9059592409606a0a4f11a71c30778cff158b6b6`
63 - Squash merge: `77f9f595ccfe67a87b11024ff0f6143629dba438`
64 - Exact changed files: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`
65 - Verification: complete remote three-file diff, append-only log, whitespace, protected-data boundary, and post-merge accepted-head state passed.
66 - GitHub Actions: none on the reviewed head; documentation-only paths did not trigger Backend CI.
67 - Artifacts/releases: `NONE`
68
69 ## Durable role-based operating model
70
71 - Permanent source: `docs/handoff/MASTER_RECOVERY_PROMPT.md`
72 - Decision record: ADR-011 in `docs/DECISION_LOG.md`
73 - Introduced through: [PR #20](https://github.com/davoodmehraban89/Aram/pull/20)
74 - Davood is Project Owner and the accounting/product authority.
75 - ChatGPT chat is Operational Coordinator: recovery, task scoping, implementation prompts, first-pass review, and copy-ready handoffs.
76 - Jules is the primary Implementation Agent: exact-base focused implementation, tests, Draft PR, and evidence; it never merges its own PR.
77 - Codex Work is Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer: technical sequencing, remote evidence review, conflict resolution, exceptional critical fixes, acceptance decisions, and routine merges under standing delegation.
78 - GitHub is the evidence source of truth.
79 - Accounting ambiguity, material scope, protected-data changes, releases, destructive actions, credentials, and new external authority remain Davood escalation points.
80 - A repository mismatch pauses only the affected task without edits; it does not halt the project.
81
82 ## Closed superseded work
83
84 - PR #16 was closed without merge on 2026-08-25.
85 - It duplicated accepted PR #15, used stale base `7c7533ee87146dc8fc78b46ebf423be55532c7eb`, was dirty, and recorded incorrect merge SHA `35d45c3f200672a6ef97f13a84cf7c823ecf1bb8`.
86 - No file or claim from PR #16 is accepted.
87
88 ## Closed Gate 3 / Gate 2B reference
89
90 - PR: https://github.com/davoodmehraban89/Aram/pull/17
91 - Base: `source-data-cleanup@7c7533ee87146dc8fc78b46ebf423be55532c7eb`
92 - Head: `4f8648add0e2ed60f01753e979fa3fbe9ccf0f18`
93 - Final state: closed without merge on 2026-08-25; its code is not accepted.
94 - GitHub reports 12 changed files although the PR narrative names only 9.
95 - Backend CI run #31 succeeded with 51 tests on the stale branch head; that does not prove compatibility with accepted Gate 2A.
96 - Use PR #17 only as reference. Do not reopen, revive, or merge it.
97 - Comprehensive Mapping Excel import/export, carry-forward, unknown-account queue, note/sub-note mapping, management UI, reproducible Windows packaging, and end-to-end Pilot acceptance remain unimplemented.
98
99 ## Governance and release reality
100
101 - GitHub remote evidence outranks this record and every agent report.
102 - The accepted branch is currently unprotected; explicit review discipline is mandatory.
103 - There are no accepted Git tags or GitHub Releases.
104 - Canonical financial XLSX/PDF and source data remain protected.
105 - Green CI on an unmerged PR is not acceptance evidence.
106 - No Gate 3 implementation candidate is accepted or active.
107
108 ## Active V1-01 safety-gate candidate
109
110 - Verified base: `source-data-cleanup@b1ddee87d31ee73b3a5aeac8f9953d0a604c206a`
111 - Working branch: `codex/v1-01-safety-gate-hardening`
112 - Draft PR: [#21](https://github.com/davoodmehraban89/Aram/pull/21)
113 - Independently reviewed implementation head: `700d800dbd9c657f6bd510faafedcbde4847fafd`.
114 - Earlier exact-head candidate: `aba10b61c770ce319b1b67d960a4f0a1057e25f6`; [Backend CI #36](https://github.com/davoodmehraban89/Aram/actions/runs/32989551021) succeeded.
115 - A later documentation-triggered [Backend CI #38](https://github.com/davoodmehraban89/Aram/actions/runs/33015151139) exposed a flaky message-specific reparent assertion: protection fired correctly, but through the equally valid parent-company invariant.
116 - Stabilized candidate: `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`; the single test assertion now accepts either valid `cannot be mutated` protection message without changing product behavior.
117 - Latest verified CI: [Backend CI #39](https://github.com/davoodmehraban89/Aram/actions/runs/33015277194), success on `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`; 67 tests passed, migration upgrade/downgrade and compile succeeded.
118 - Purpose: close the independently reproduced protected-year deletion/mutation and Pilot-preflight false-negative defects before any Mapping/UI expansion.
119 - 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`.
120 - Local evidence at preparation: 67 pytest tests passed; isolated Alembic upgrade/downgrade and compileall passed; focused Ruff and mypy checks passed.
121 - Protected boundary: no canonical financial data, workbook, PDF, database, financial value, binary, ZIP, EXE, tag, or release is in scope.
122 - Independent-review decision: code, scope, diff, and protected-data boundary passed. CI #38 later revealed only a nondeterministic error-message assertion; CI #39 passed after the one-line assertion stabilization.
123 - Status: `IN_PROGRESS`; this durable-document reconciliation records the complete CI sequence. The resulting documentation-only head must be re-fetched and compared with `b3dc8b3a18934ffe63f615e4f650248be21a5f9c` before Ready/Squash Merge.
124
125 ## Single next action
126
127 Publish this requested two-document reconciliation on PR #21 and route the resulting documentation-only head back to the independent reviewer. The reviewer must confirm that only `PROJECT_STATUS.md` and `docs/handoff/LATEST_HANDOFF.md` changed after the CI-verified stabilized head `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`, verify the final workflow result, then Ready/Squash Merge. Do not begin Gate 3 Mapping until V1-01 is accepted.
128
129 ## 2026-10-30 — Same-flush protected-year candidate, not accepted
130
131 - Stacked Draft [PR #35](https://github.com/davoodmehraban89/Aram/pull/35) from Draft PR #32 SHA `28d1c57882ec20fc17c2c133bbe62ff56e12973f`; base accepted branch remains unchanged at `7dc864fd032f0c4ae4d650d89304a01286a6d914`.
132 - Candidate fixes the pending-approval/same-flush ORM validation gap and tests seven record kinds, new source, Company edit, rollback and valid separate-transaction Draft editing.
133 - Code commit `f5f9257563f382f6663bc7b1eb0433a43482e9fd`; verified [Backend CI 41059384195](https://github.com/davoodmehraban89/Aram/actions/runs/41059384195) passed **120 tests, one warning**, Alembic round-trip and compile.
134 - Independent reviewers C1/C2/C3 not established. Parent PR #32 is not accepted. Graph-wide, raw SQL and concurrent DB writes remain outside this patch.
135 - No canonical financial data, application database, migration, workflow, ZIP, EXE or release was modified. This record is documentation about an unmerged candidate, not evidence of acceptance.
136 - Next action: obtain independent exact-SHA review, then reconcile PR #35 onto an accepted parent only after PR #32 passes its own controls. No merge while blocked.
137
138 ## 2026-10-30 — Cross-year clean-reference regression candidate (unaccepted)
139
140 - Draft [PR #41](https://github.com/davoodmehraban89/Aram/pull/41) depends on unmerged Draft PR #35 `dab37e544e441a6111d7e88a53bae4d193f10de2` and ultimately unmerged PR #32; do not merge a child before its accepted parent is verified.
141 - Reproduction: clean MappingRule and StatementLine references become inconsistent when their NoteDefinition or FinancialStatement parent changes year. RED [CI 41060564954](https://github.com/davoodmehraban89/Aram/actions/runs/41060564954) showed **6 expected failures, 123 passes**.
142 - First corrective CI [41060729930](https://github.com/davoodmehraban89/Aram/actions/runs/41060729930) was green (129 passed); expanded valid-path CI [41060899585](https://github.com/davoodmehraban89/Aram/actions/runs/41060899585) also succeeded on code/test SHA `78ff0dd5a8ee35b621ae901be39f6a11d37ea063`: **132 passed, one warning**; migration and compile succeeded.
143 - Exact final head after documentation updates requires a fresh GitHub verification. No protected data, schema, dependencies, workflows, binaries, production databases or releases changed.
144 - Remaining: raw/bulk SQL, concurrency and provider-specific database safety are not covered. Three genuinely independent reviewer controls remain `BLOCKED`; neither this child nor its parents has been accepted.
145 - Next action: independently review final PR #32, #35 and #41 SHAs, reconcile dependent bases after each acceptance, and address DB-level isolation/performance as separately scoped work.