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

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

Synced Dec 4, 04:15 UTC

C0 remediation: populate discrepancies.json (الف‌7) + record review findings

- الف‌7 met: golden.compare_year(1404) re-run -> 28/9 matched/19 diffs; docs/discrepancies.json populated one-by-one with cause + reproducible evidence + source/official SHA-256 (16 caused: 8 exact-magnitude sign flips ADR-013, CF note reuse, absent/underived notes; 3 under_investigation: IS 6/8/9 = bugs until proven D1); EQ official parsing gap recorded - ADR-028: owner's explicit experiment/browser-edition instruction recorded; Arena single-branch block reported; preservation guaranteed via tag v1.0.0 -> 46253c9 - PROJECT_STATUS: review deviations tracked (forgeable actor auth C8, 4/15 controls C3, desktop create_all bypasses Alembic C9, PR #96 discipline violation historical, booklet-1 extraction artifacts disclosed); الف‌7 marked MET - Fresh evidence: backend 319 tests exit 0; D-04/D-05 normalization 17 passed - docs-only; data/ + samples/ trees unchanged; no second PR (owner directive) Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>

davoodmehraban89 committed Dec 3, 2026 at 20:46 UTC 1e247083d36ef76a67432880db2a1f5984fa575c
4 files changed +348 -15
PROJECT_STATUS.md
+7 -4
@@ -73,7 +73,7 @@ Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/
73 - **الف‌3 (phase 0/1 + golden 1404):** VERIFIED merged at `46253c9` — D-01..D-12, `test_golden.py`/`test_domain_controls.py`/`test_approval_gate.py`; real-1404 UAT evidence below.
74 - **الف‌4/الف‌5 (PR honesty/size):** rules added to `AGENTS.md`; this PR body matches the diff.
75 - **الف‌6 (PR triage):** DONE — `docs/PR_TRIAGE.md` (ADOPT #81/#89/#92; CLOSE NO-GO #82/#88; SUPERSEDED #90/#91 + #22–#80 backlog).
76 -- **الف‌7 (exit criteria):** CI green at accepted head; `PROJECT_STATUS.md` consistent with head; golden 1404 core notes reconcile rial-for-rial, remaining diffs to be recorded one-by-one in `docs/discrepancies.json` (C1/C3). See residual risks.
76 +- **الف‌7 (exit criteria):** MET — CI green at accepted head; `PROJECT_STATUS.md` consistent with head; golden 1404 freshly re-run (`golden.compare_year`): **28 comparisons, 9 matched, 19 differences** (BS 9/16, IS 0/6, EQ 0/0, CF 0/6), **all 19 recorded one-by-one in [`docs/discrepancies.json`](docs/discrepancies.json) with cause + reproducible evidence** (16 caused: 8 presentation-sign flips with exact magnitude, note-number reuse, absent/undderived CF notes; 3 under investigation = IS notes 6/8/9, treated as bugs until proven, D1). EQ official sheet yields 0 extractable note rows (C3 parsing gap, recorded). Real-1404 approval remains blocked by C-01/C-03/C-04 (fail-loud, correct).
77 - **Appendix revision (owner, 2026-12-03 second message):** Databan catalog studied by owner (marketing, unverified; agent has no site access); positioning + Host Integration API recorded (ADR-029); **OD-09 revised to pyodbc-first** (python-tds fallback); accepted elements mapped to C4–C9/C11; C11 added (optional AI assistant, OFF by default, never generates numbers); rejected scope binding; booklet 2 markdown re-anchored (revision history in `MANIFEST.json`).
78
79 ## Phase 9 UAT evidence (real source_1404.xlsx, read-only)
@@ -89,9 +89,10 @@ Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/
89
90 ## Known gaps feeding the C-phases (honest residual risks)
91
92 -- `pilot_api.py` exposes 17 unauthenticated routes; legacy in-memory pilot still mounted (C8 security, then retire) (الف‌2).
92 +- **Authorization is forgeable (independent review, 2026-12-03):** roles derive from a client-supplied `actor` string in the request body, not a token/session; `"actor":"admin"` grants admin to anyone who reaches the API. Most endpoints (company create, ledger upload, mapping, export) are unguarded; with no users seeded, year approval is open to all. Loopback-only binding limits exposure on a single-user machine but this is serious on a server/shared machine and contradicts booklet 1 §13. `pilot_api.py` also exposes 17 unauthenticated routes. → **C8** (token/session auth + role guards + audit on every write; fail-closed).
93 - `frontend/src/lib/format.ts` uses `Number(value)` (float risk) (C7).
94 -- Only controls C-01..C-04 implemented; C-05..C-15 absent (C3).
94 +- **Only 4 of 15 controls implemented** (`domain/controls.py` = C-01..C-04); approval depends only on these, so a year with an unbalanced BS or note/statement mismatch can be approved. C-05..C-15 absent → **C3** (wire all controls into `run_controls` + approval gate; ERROR year unapprovable).
95 +- **Desktop install bypasses Alembic** (`desktop.py:62` `Base.metadata.create_all`); existing user DBs will not migrate on update → **C9** (replace with `alembic upgrade head` + migration round-trip test on an existing DB).
96 - ImportRun/CalculationRun/LineageEdge/Adjustment/UnknownAccountQueue/carried_from_year_id/calculation_run_id refs absent; pilot exception queue not persisted in `domain/` (C1/C4).
97 - `note_engine.acct()` is closing-only; statement_balance-only rows evaluate 0 in notes (C1/C3).
98 - No connector framework / Source Adapter / snapshot reconciliation / packs yet; generality grep test pending (C4/C5/C6).
@@ -99,7 +100,9 @@ Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/
100 - Backup unencrypted; no DPAPI vault / plugin allowlist / SBOM yet (C8/C9).
101 - Browser edition removed (C0); single reference UI = React workbench, developed in C7. Backend `static/pilot` legacy retained until C8.
102 - Windows EXE not built; clean-machine install log + Shadow Run two-company + owner signature pending (C9/C10).
102 -- `docs/discrepancies.json` is a skeleton; real-1404 BS/IS differences not yet recorded one-by-one with cause+evidence (C1/C3).
103 +- `docs/discrepancies.json` now records all 19 golden-1404 differences with cause+evidence (الف‌7 met); 3 IS magnitude mismatches remain under investigation (bugs until proven, D1) and build-vs-official comparison is added in C3.
104 +- **PR-discipline violation recorded (independent review):** merged PR #96 bundled all 10 phases in one PR (154 files, +24,327 lines ≈ 16× the الف‌5 cap), its body cited a stale head (`969f608` vs merged `babe829`), and it merged without independent review under a one-time owner waiver. Historical; cannot be un-merged. Booklet 2 الف‌4/الف‌5 now enforced in `AGENTS.md` for all future PRs.
105 +- Booklet 1 markdown is a token-reversal PDF extraction (ADR-025): RTL/English-code artifacts possible; the original PDF SHA-256 is the authoritative anchor. A faithful re-extraction awaits a docx original or a better bidi method (owner option).
106
107 ## Release procedure (owner)
108
docs/PROJECT_LOG.md
+11
@@ -409,3 +409,14 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
409 - 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)
410 - 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)
411 - Acceptance: IN_PROGRESS; author does not merge or tag. Next: push C0 (both commits), update PR #97 body to match diff (الف‌4), independent review
412 +
413 +### 2026-12-03T21:00:00Z — C0 remediation after independent review of PR #97
414 +
415 +- 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
416 +- 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 را نزن").
417 +- الف‌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).
418 +- 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.
419 +- 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).
420 +- 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).
421 +- Protected data: data/ + samples/ trees unchanged (docs-only remediation). No code changed; backend/frontend suites unaffected.
422 +- Acceptance: IN_PROGRESS; author does not merge or tag. Next: independent re-review of updated PR #97; C1 only after C0 acceptance.
docs/adr/ADR-028-remove-browser-edition.md
+10 -1
@@ -39,7 +39,16 @@ Governance content in `docs/` is kept (`ACCEPTANCE_POLICY.md`, `DECISION_LOG.md`
39 full browser edition remains recoverable from Git history at head `46253c9` and the
40 earlier pilot commits; `git rm` here removes it from the working tree only, not history.
41 Recommended owner command (outside Arena):
42 - `git branch experiment/browser-edition 46253c9 && git push origin experiment/browser-edition`.
42 + `git branch experiment/browser-edition 46253c94405abd065dfc5e8cf080b295cb83cde4 && git push origin experiment/browser-edition`.
43 + **Owner explicitly requested this command on 2026-12-03 review.** The Arena
44 + single-branch session constraint still blocks the agent from creating/pushing any
45 + branch other than `arena/094f314c-aram` (system-level, not overridable by task
46 + instructions), so the agent reports the block and continues independent work
47 + (booklet 2 §14). Preservation is already guaranteed without the named branch: tag
48 + **`v1.0.0` points to `46253c9`**, whose tree contains the full browser edition, so
49 + `git show v1.0.0:webapp/app.js` (etc.) recovers every removed file permanently, even
50 + after #97 merges. The owner can create the named branch via the one-liner above or
51 + GitHub UI (Branches → New branch → source `46253c9`).
52 3. The backend in-memory pilot subsystem (`pilot_engine.py`, `pilot_store.py`,
53 `pilot_api.py`, `pilot_editing.py`, `static/pilot`) is **not** removed here. It is legacy
54 (الف‌2): the persistent core is the main product path. It is secured in **C8** (B1) and
docs/discrepancies.json
+320 -10
@@ -1,13 +1,323 @@
1 {
2 - "purpose": "OD-08 / D1: one-by-one record of every difference between an officially produced statement figure and the booklet's official statement, with a cause and evidence. An uncaused difference is a bug. Numbers are never 'corrected' here — only an Adjustment (B4) or a discrepancy record is permitted (booklet §6.7, §12.60, D1/D2).",
3 - "status": "SKELETON (B0). Populated one-by-one in B8 from golden/UAT 1403+1404, including the current 1404 UAT differences.",
2 + "purpose": "OD-08 / D1 / الف‌7: one-by-one record of every golden-test difference (source-aggregated-by-note vs official statement) with cause and evidence. An uncaused difference is a bug until proven otherwise. Numbers are never 'corrected' here — only an Adjustment (C4) or a discrepancy record is permitted (booklet §6.7/§12.60, D1/D2).",
3 + "status": "POPULATED for 1404 golden (source-vs-official, ADR-021). 28 comparisons, 9 matched, 19 recorded. Resolution of causes tracked in C1/C3; build-vs-official comparison added when the engine builds all four statements (C3).",
4 + "scale_note": "Official statements are in million rial; source is exact rial. Comparison rounds source rial to million (half-up, ADR-012/021). our_amount/official_amount are exact rial strings; *_million fields are the comparison basis.",
5 "record_schema": {
5 - "row": "Statement/note row identifier as it appears in the official statement (e.g. BS note '12-1', IS line label).",
6 - "our_amount": "Amount our engine produced, exact integer rial (string to preserve >2^53).",
7 - "official_amount": "Official statement amount, exact integer rial (string).",
8 - "cause": "Root-cause explanation. Empty/uncaused => treated as a bug, not an accepted discrepancy.",
9 - "evidence": "Pointer to proof: source file + SHA-256 + sheet + row, calculation_run_id, or ADR/Adjustment reference.",
10 - "year": "Fiscal year (Jalali), e.g. 1403 or 1404."
6 + "row": "statement + note identifier",
7 + "statement": "BS/IS/EQ/CF",
8 + "note": "note number as in official sheet",
9 + "our_amount": "source-aggregated exact rial (string)",
10 + "official_amount": "official million rial x 1e6 (string)",
11 + "our_million_rounded": "source rial rounded to million (half-up)",
12 + "official_million": "official million rial",
13 + "delta_million": "our_million_rounded - official_million",
14 + "cause": "root-cause explanation (Persian)",
15 + "cause_status": "caused | under_investigation (under_investigation = bug until proven, D1)",
16 + "evidence": "reproducible proof pointer",
17 + "year": "Jalali fiscal year"
18 },
12 - "records": []
13 -}
19 + "summary": {
20 + "total_comparisons": 28,
21 + "matched": 9,
22 + "recorded": 19,
23 + "by_statement": {
24 + "BS": {
25 + "total": 16,
26 + "matched": 9,
27 + "recorded": 7
28 + },
29 + "IS": {
30 + "total": 6,
31 + "matched": 0,
32 + "recorded": 6
33 + },
34 + "EQ": {
35 + "total": 0,
36 + "matched": 0,
37 + "recorded": 0
38 + },
39 + "CF": {
40 + "total": 6,
41 + "matched": 0,
42 + "recorded": 6
43 + }
44 + },
45 + "by_cause_status": {
46 + "caused": 16,
47 + "under_investigation": 3
48 + }
49 + },
50 + "coverage_notes": [
51 + "EQ: read_official_notes extracted 0 note rows from the official «حقوق مالكانه» sheet for 1404 (layout differs); EQ official parsing is a C3 coverage gap, not a zero discrepancy.",
52 + "This golden test is source-aggregated-vs-official (ADR-021). A build-vs-official comparison (engine output vs official) is added in C3 once BS/IS/EQ/CF are all built.",
53 + "Approval of the real 1404 year is currently BLOCKED by controls C-01/C-03/C-04 (UAT). Separately, ADR-013 records 6 residual C-01 rows in the 252,898-row source (252,892 satisfy debit-positive); these are source-data quirks to reconcile, not statement discrepancies, and are tracked under C-01/ADR-013."
54 + ],
55 + "records": [
56 + {
57 + "row": "BS note 16",
58 + "statement": "BS",
59 + "note": "16",
60 + "our_amount": "-20000000000000",
61 + "official_amount": "20000000000000",
62 + "our_million_rounded": -20000000,
63 + "official_million": 20000000,
64 + "delta_million": -40000000,
65 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
66 + "cause_status": "caused",
67 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 16 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
68 + "year": 1404
69 + },
70 + {
71 + "row": "BS note 18",
72 + "statement": "BS",
73 + "note": "18",
74 + "our_amount": "-1613615852",
75 + "official_amount": "1614000000",
76 + "our_million_rounded": -1614,
77 + "official_million": 1614,
78 + "delta_million": -3228,
79 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
80 + "cause_status": "caused",
81 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 18 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
82 + "year": 1404
83 + },
84 + {
85 + "row": "BS note 19-1",
86 + "statement": "BS",
87 + "note": "19-1",
88 + "our_amount": "-145241976038754",
89 + "official_amount": "145241976000000",
90 + "our_million_rounded": -145241976,
91 + "official_million": 145241976,
92 + "delta_million": -290483952,
93 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
94 + "cause_status": "caused",
95 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 19-1 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
96 + "year": 1404
97 + },
98 + {
99 + "row": "BS note 19-2",
100 + "statement": "BS",
101 + "note": "19-2",
102 + "our_amount": "-630414220070002",
103 + "official_amount": "630414220000000",
104 + "our_million_rounded": -630414220,
105 + "official_million": 630414220,
106 + "delta_million": -1260828440,
107 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
108 + "cause_status": "caused",
109 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 19-2 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
110 + "year": 1404
111 + },
112 + {
113 + "row": "BS note 20",
114 + "statement": "BS",
115 + "note": "20",
116 + "our_amount": "-133078120519345",
117 + "official_amount": "133078121000000",
118 + "our_million_rounded": -133078121,
119 + "official_million": 133078121,
120 + "delta_million": -266156242,
121 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
122 + "cause_status": "caused",
123 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 20 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
124 + "year": 1404
125 + },
126 + {
127 + "row": "BS note 21",
128 + "statement": "BS",
129 + "note": "21",
130 + "our_amount": "-8833412166636",
131 + "official_amount": "8833412000000",
132 + "our_million_rounded": -8833412,
133 + "official_million": 8833412,
134 + "delta_million": -17666824,
135 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
136 + "cause_status": "caused",
137 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 21 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
138 + "year": 1404
139 + },
140 + {
141 + "row": "BS note 22",
142 + "statement": "BS",
143 + "note": "22",
144 + "our_amount": "-61449318680",
145 + "official_amount": "61449000000",
146 + "our_million_rounded": -61449,
147 + "official_million": 61449,
148 + "delta_million": -122898,
149 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
150 + "cause_status": "caused",
151 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 22 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «وضعيت مالي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
152 + "year": 1404
153 + },
154 + {
155 + "row": "IS note 20-3",
156 + "statement": "IS",
157 + "note": "20-3",
158 + "our_amount": "0",
159 + "official_amount": "-4697329000000",
160 + "our_million_rounded": 0,
161 + "official_million": -4697329,
162 + "delta_million": 4697329,
163 + "cause": "یادداشت در ستون statement_balance منبع حضور ندارد (src_rial=0)؛ تعریف/نگاشت یادداشت یا استخراج آن هنوز انجام نشده (C2/C3)؛ مقدار رسمی غیرصفر است.",
164 + "cause_status": "caused",
165 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 20-3 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
166 + "year": 1404
167 + },
168 + {
169 + "row": "IS note 5",
170 + "statement": "IS",
171 + "note": "5",
172 + "our_amount": "-243097685650599",
173 + "official_amount": "243097686000000",
174 + "our_million_rounded": -243097686,
175 + "official_million": 243097686,
176 + "delta_million": -486195372,
177 + "cause": "قرارداد علامت: یادداشت ماهیت بستانکار (بدهی/حقوق مالکانه) دارد؛ جمع منبع با قرارداد بدهکار-مثبت (ADR-013) منفی است ولی صورت رسمی قدرمطلقِ مثبت نشان می‌دهد. قدرمطلق دقیقاً برابر است (|ما| = رسمی)؛ اختلاف فقط علامتِ ارائه است نه مقدار. اصلاح: سیاست علامتِ ارائه به‌تفکیک بخش صورت در C3.",
178 + "cause_status": "caused",
179 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 5 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
180 + "year": 1404
181 + },
182 + {
183 + "row": "IS note 6",
184 + "statement": "IS",
185 + "note": "6",
186 + "our_amount": "308711587703360",
187 + "official_amount": "-245897444000000",
188 + "our_million_rounded": 308711588,
189 + "official_million": -245897444,
190 + "delta_million": 554609032,
191 + "cause": "اختلاف مقداری واقعی (قدرمطلق‌ها برابر نیستند)؛ علت دقیق هنوز تعیین نشده — احتمال تفاوت دامنهٔ حساب‌های تجمیع‌شده در یادداشت نسبت به رسمی. طبق D1 تا اثبات خلاف باگ تلقی می‌شود؛ بررسی در C3.",
192 + "cause_status": "under_investigation",
193 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 6 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
194 + "year": 1404
195 + },
196 + {
197 + "row": "IS note 7",
198 + "statement": "IS",
199 + "note": "7",
200 + "our_amount": "0",
201 + "official_amount": "-62814143000000",
202 + "our_million_rounded": 0,
203 + "official_million": -62814143,
204 + "delta_million": 62814143,
205 + "cause": "یادداشت در ستون statement_balance منبع حضور ندارد (src_rial=0)؛ تعریف/نگاشت یادداشت یا استخراج آن هنوز انجام نشده (C2/C3)؛ مقدار رسمی غیرصفر است.",
206 + "cause_status": "caused",
207 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 7 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
208 + "year": 1404
209 + },
210 + {
211 + "row": "IS note 8",
212 + "statement": "IS",
213 + "note": "8",
214 + "our_amount": "-431960487352",
215 + "official_amount": "1543514000000",
216 + "our_million_rounded": -431960,
217 + "official_million": 1543514,
218 + "delta_million": -1975474,
219 + "cause": "اختلاف مقداری واقعی (قدرمطلق‌ها برابر نیستند)؛ علت دقیق هنوز تعیین نشده — احتمال تفاوت دامنهٔ حساب‌های تجمیع‌شده در یادداشت نسبت به رسمی. طبق D1 تا اثبات خلاف باگ تلقی می‌شود؛ بررسی در C3.",
220 + "cause_status": "under_investigation",
221 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 8 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
222 + "year": 1404
223 + },
224 + {
225 + "row": "IS note 9",
226 + "statement": "IS",
227 + "note": "9",
228 + "our_amount": "9489628188720",
229 + "official_amount": "-10601182000000",
230 + "our_million_rounded": 9489628,
231 + "official_million": -10601182,
232 + "delta_million": 20090810,
233 + "cause": "اختلاف مقداری واقعی (قدرمطلق‌ها برابر نیستند)؛ علت دقیق هنوز تعیین نشده — احتمال تفاوت دامنهٔ حساب‌های تجمیع‌شده در یادداشت نسبت به رسمی. طبق D1 تا اثبات خلاف باگ تلقی می‌شود؛ بررسی در C3.",
234 + "cause_status": "under_investigation",
235 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 9 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «سودوزيان». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
236 + "year": 1404
237 + },
238 + {
239 + "row": "CF note 10",
240 + "statement": "CF",
241 + "note": "10",
242 + "our_amount": "673740636579631",
243 + "official_amount": "0",
244 + "our_million_rounded": 673740637,
245 + "official_million": 0,
246 + "delta_million": 673740637,
247 + "cause": "بازاستفادهٔ شمارهٔ یادداشت میان صورت‌ها: تجمیع منبع بر پایهٔ شمارهٔ یادداشت (نه صورت) است، بنابراین مقدار یادداشت BS به مقایسهٔ CF نشت می‌کند حالی ردیف رسمی CF آن شماره ۰/متفاوت است. اصلاح: تجمیع note scoped به صورت در C3/C4.",
248 + "cause_status": "caused",
249 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 10 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
250 + "year": 1404
251 + },
252 + {
253 + "row": "CF note 15",
254 + "statement": "CF",
255 + "note": "15",
256 + "our_amount": "19951136477703",
257 + "official_amount": "3368287000000",
258 + "our_million_rounded": 19951136,
259 + "official_million": 3368287,
260 + "delta_million": 16582849,
261 + "cause": "بازاستفادهٔ شمارهٔ یادداشت میان صورت‌ها: تجمیع منبع بر پایهٔ شمارهٔ یادداشت (نه صورت) است، بنابراین مقدار یادداشت BS به مقایسهٔ CF نشت می‌کند حالی ردیف رسمی CF آن شماره ۰/متفاوت است. اصلاح: تجمیع note scoped به صورت در C3/C4.",
262 + "cause_status": "caused",
263 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 15 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
264 + "year": 1404
265 + },
266 + {
267 + "row": "CF note 20-1",
268 + "statement": "CF",
269 + "note": "20-1",
270 + "our_amount": "0",
271 + "official_amount": "-149426000000",
272 + "our_million_rounded": 0,
273 + "official_million": -149426,
274 + "delta_million": 149426,
275 + "cause": "یادداشت در ستون statement_balance منبع حضور ندارد (src_rial=0)؛ تعریف/نگاشت یادداشت یا استخراج آن هنوز انجام نشده (C2/C3)؛ مقدار رسمی غیرصفر است.",
276 + "cause_status": "caused",
277 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 20-1 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
278 + "year": 1404
279 + },
280 + {
281 + "row": "CF note 23",
282 + "statement": "CF",
283 + "note": "23",
284 + "our_amount": "0",
285 + "official_amount": "99230533000000",
286 + "our_million_rounded": 0,
287 + "official_million": 99230533,
288 + "delta_million": -99230533,
289 + "cause": "صورت جریان نقد هنوز توسط موتور محاسبه نشده (C3)؛ یادداشت CF نیازمند محاسبه از گردش‌ها است نه صرفاً statement_balance منبع؛ مقدار رسمی غیرصفر ولی منبع ۰.",
290 + "cause_status": "caused",
291 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 23 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
292 + "year": 1404
293 + },
294 + {
295 + "row": "CF note 24",
296 + "statement": "CF",
297 + "note": "24",
298 + "our_amount": "0",
299 + "official_amount": "159859431000000",
300 + "our_million_rounded": 0,
301 + "official_million": 159859431,
302 + "delta_million": -159859431,
303 + "cause": "صورت جریان نقد هنوز توسط موتور محاسبه نشده (C3)؛ یادداشت CF نیازمند محاسبه از گردش‌ها است نه صرفاً statement_balance منبع؛ مقدار رسمی غیرصفر ولی منبع ۰.",
304 + "cause_status": "caused",
305 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 24 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
306 + "year": 1404
307 + },
308 + {
309 + "row": "CF note 46268",
310 + "statement": "CF",
311 + "note": "46268",
312 + "our_amount": "0",
313 + "official_amount": "12556000000",
314 + "our_million_rounded": 0,
315 + "official_million": 12556,
316 + "delta_million": -12556,
317 + "cause": "ردیف رسمی CF با کلید '46268' ظاهراً کد حساب است نه شمارهٔ یادداشت؛ در تجمیع note منبع حضور ندارد. نیازمند طبقه‌بندی ردیف‌های شیت رسمی در C3.",
318 + "cause_status": "caused",
319 + "evidence": "golden.compare_year (ADR-021): data/source_ledgers/source_1404.xlsx (SHA-256 5b4790dce6e9ea169d61c68751bc6fd5dc390012bc14473b0298ba5aac30d044) note 46268 statement_balance aggregation vs data/official_statements/financial_1404.xlsx (SHA-256 f764e3b6a2b6135997248bfad0b5a60edc9be9ed3dfef8631096c50713552bd3) sheet «جريان هاي نقدي». Reproduce: PYTHONPATH=backend/src python -c \"from aram_backend.services.golden import compare_year; [print(c) for c in compare_year('data/source_ledgers/source_1404.xlsx','data/official_statements/financial_1404.xlsx',1404) if not c.match]\"",
320 + "year": 1404
321 + }
322 + ]
323 +}
\ No newline at end of file