@davoodmehraban89 / Factor-easy / commits / 74c8652
Fork 0

سامانه صدور فاکتور و حسابداری

docs: record financial core audit findings

davoodmehraban89 committed Nov 15, 2026 at 12:41 UTC 74c8652aba81dc39d9927500b73c756204433549
1 file changed +8
PROJECT_STATE.md
+8
@@ -315,3 +315,11 @@ Owner requests layer-by-layer click/functional testing of all controls and compa
315 - Owner explicitly starts the next management task: deeply audit Finora's financial/accounting core, with focus on journal lifecycle, sales/purchase sources, treasury/cheques, ledger, database invariants, tenant isolation and release evidence. Canonical repository remains `davoodmehraban89/Factor-easy`; product name Finora; strategic priority is financial core.
316 - Audit baseline is current remote `main` at `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`, not historical SHA references in older status paragraphs. Review is read-only; no production database, schema, RLS/Auth/role, financial records, or application behavior may be changed by this audit.
317 - Distinguish main-released behavior from staged unmerged work. In particular WP0 PR194 and stacked WP1 draft PR195 are not production/main evidence; compare their exact heads and bases before any integration. Record findings, priorities, test coverage and explicit NOT VERIFIED boundaries in a dated audit report.
318 +
319 +
320 +### 2026-11-15 — Read-only financial-core audit completed (PR #205; not merged)
321 +- Audit report: `docs/audits/FINORA_FINANCIAL_CORE_AUDIT_2026-11-15_FA.md`. Baseline: main `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`. Documentation-only branch `audit/finora-financial-core-20261115`; PR #205 is open. No application code, schema, RLS/Auth/roles, Production data, financial records, secrets or deployments changed.
322 +- Main-source findings: (P0) posting/totals/numbering still rely materially on browser journal engine and generic JSONB sync; current repository migration guard shown for posted journal/children is UPDATE/DELETE, with no equivalent INSERT guard in that migration. (P0) draft-first and permanent-reference/temporary/posted numbering contract are not complete across source modules; `jeAutoPost` creates then immediately posts, and purchase/payment paths still invoke source posting in the save flow. (P0/P1) correction/reversal plus replacement draft is multi-step client work, not one proven server transaction. (P0/P1) cheque save path has no completed journal adapter. Exact source details and boundaries are in the report.
323 +- PR state reconciliation: PR194 WP0 is open, non-mergeable and diverged from current main (2 ahead/18 behind); PR195 WP1 is open/draft and stacked on PR194 (18 ahead/15 behind). PR195 exact head `1e03964aeeb0714130ca561f424916bd06259a2e` has successful Quality #43547542507, Security #43547542508 and WP1 proof #43547542496, but these results apply only to that unmerged candidate. Its own rollout hold lists manual RPC integration, purchase correction transaction, cheque adapter, dimensions, full schema parity/shadow and real service acceptance as outstanding.
324 +- Decision: do not merge PR194/195 blindly. Next candidate should be a controlled port of validated WP1 changes onto a fresh branch from current main, with complete exact-head CI, isolated PostgreSQL17 negative/concurrency/rollback proof and independent SQL/ACL review. Production migration/cutover remains blocked by existing explicit gates. Historical conversion remains disabled/not executed.
325 +- This audit is source/PR-history review only; current live Production catalog, customer data, actual Auth/JWT/PostgREST behavior, real backup/restore, concurrent customer usage and full main workflow were NOT VERIFIED in this task.