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

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

Synced Dec 4, 18:00 UTC

phase-1b1-audit-report-7365389436990903239
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/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/vite-8.4.0 dependabot/npm_and_yarn/frontend/vitest-5.1.2 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 5.37 KB

Source Lineage Analysis

Overview

This document analyzes the structural schema, data quality, and lineage capabilities of the 1403 and 1404 source ledgers.

1. 1402 Lineage Limitations

No canonical source_1402 ledger is currently part of the verified source set. For 1402 the lineage terminates at: Official Statement -> Statement Line -> Note -> Note Row. Source-row lineage cannot be claimed for 1402.

2. 1403 Lineage Limitations

The canonical ledger source_1403.xlsx exists. However, a dedicated mapping_1403.xlsx has not been provided. mapping_1404.xlsx must NOT be applied retroactively to 1403. Any mapping classification currently present in the application for 1403 must be distinctly tagged as RECONSTRUCTED_MAPPING unless directly extracted from SOURCE_PROVIDED_1403_CLASSIFICATION fields in the raw ledger itself.

3. Structural Reconciliation & Quality (1403 vs 1404)

source_1403.xlsx

  • Actual Data Records: 204176
  • Duplicate Physical Rows: 0
  • Key-dimension null profile: AccountId, T1_CODE, T2_CODE, T3_CODE, and T4_CODE were recorded as 0.0% null in the accepted Phase 1B-1 field dictionary.
  • Schema: Contains 29 columns including dimensions, opening/closing balances, and statement mapping outputs.

source_1404.xlsx

  • Actual Data Records: 252898
  • Duplicate Physical Rows: 0
  • Key-dimension null profile: the accepted Phase 1B-1 field dictionary records non-zero null prevalence: AccountId 0.2%, T1_CODE 2.2%, T2_CODE 2.8%, T3_CODE 2.4%, and T4_CODE 2.4%. These nulls must not be described as zero and must be handled explicitly by any deterministic mapping logic.
  • Schema: Contains 26 columns. Identifiable structural differences exist compared to 1403 (e.g., column count).

The presence of a null in an optional dimension does not by itself mean a source row is ineligible for mapping; eligibility depends on the dimensions required by the applicable mapping rule. Coverage metrics below therefore use the full source-row denominator and separately report unmapped/multiple-match outcomes.

4. Specific High-Value Exception Review

A robust search across all account-code and account-name columns (including حساب, kol, KOL_NAME, AccountId, ACCOUNT_NAME, شرح کل, T1_NAME, T2_NAME, T3_NAME, T4_NAME) identified 11 rows related to the closing/offset account 8999 (حساب ترازاختتاميه).

  • Row Count: 11
  • Debit: 0 ریال
  • Credit: 0 ریال
  • OPENING Balance: 0 ریال
  • Gross Exposure (Absolute CLOSING): 2,621,766,893,910,080 ریال
  • CLOSING Balance: 0 ریال
  • FS Balance: 0 ریال
  • Mapping Status: Unmapped (No corresponding mapping rule exists in mapping_1404.xlsx)

Although the net exposure offsets to zero, the gross absolute closing exposure is extremely material (2,621,766,893,910,080 ریال). These offsetting entries must not be dismissed in historical reconciliations.

5. 1404 Mapping Provenance & Coverage

A deterministic mapping engine was executed linking mapping_1404.xlsx to source_1404.xlsx. The engine evaluates the حساب (Account), T1_CODE, T4_CODE, and Current/Capital dimensions. Exposure calculations use the source workbook fields Debit, Credit, and CLOSING exactly as provided in the ledger (units are in ریال).

  • Total Source Ledger Data Rows: 252,898
  • Rows Eligible for Mapping: 252,898
  • Uniquely Mapped Rows: 214,848
  • Unmapped Rows: 143
  • Multiply Matched Rows: 37,907
  • Conflicting Matched Rows: 37,907
  • Excluded Rows: 0
  • Denominator: 252,898
  • PROVEN_MAPPING_COVERAGE: 99.94%

Unmapped Population Analysis

There are 143 rows that failed to map deterministically due to missing mapping logic for specific dimension combinations. - Unmapped Row Count: 143 - Total Debit: 3,961,800,186,318 ریال - Total Credit: 3,881,433,378,410 ریال - Gross / Absolute Exposure (Debit + |Credit|): 7,843,233,564,728 ریال - CLOSING / Signed Net Exposure: 196,907,918,801 ریال - Financial-Statement-Balance Exposure: 196,907,918,801 ریال

Ranked Exception Table (Largest Unmapped Accounts by Gross Exposure)

Account Code T1 T4 Rows Gross Exposure (ریال) Net Exposure (ریال)
8161 117617 4512 9 1,376,000,000,000 0
8161 117401 4512 26 1,319,659,150,206 57,139,085,409
8161 118701 4512 11 1,256,051,927,394 63,510,465,448
8161 117124 4512 10 1,210,721,701,196 0
8161 117313 4512 8 1,090,000,000,000 0
8161 117001 4512 5 518,970,963,494 -5,425,842,707
8161 117088 4512 4 307,741,714,522 11,365,395,802
8161 117777 4512 6 301,400,000,000 0
8161 117488 4502 22 159,965,459,804 48,274,392,545
8161 117865 4512 3 128,833,512,752 17,044,422,304

Proven Lineage Examples

  1. Simple Account Rule: 1101 -> Note 6. Rows with حساب 1101 are matched successfully if they don't have conflicting T1/T4 specific rules.
  2. Composite Rule (8161): حساب 8161 requires T1_CODE and T4_CODE to route to correct notes like 19-1 or 12-1. When these dimensions are present, the engine accurately assigns the note.
  3. Current/Capital Dependent: Specific accounts branch based on the جاری / سرمایه ای string in the ledger matching the mapping condition.