فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix/a02-disable-destructive-excel-replace-20261031
Phase A acceptance status
Updated: 2026-10-19
Execution order
A03 → A04 → A01 → A05 → A06 → A07 → A08.
Closed gates
None. The authoritative acceptance manifest docs/PHASE_A_RELEASE_ACCEPTANCE.json has all gates unaccepted.
A03 — in progress (direct-write bypass hardening)
- Current implementation: AuditService brands authorized audit records; StorageService.transaction rejects unbranded audit rows through add/put/putRaw; raw helpers _exec/_tx and bulkPut reject direct audit writes.
- Restores: CompanyBackupService and StorageService.importAll route audit history through AuditService.restoreHistorical; fixture tests updated.
- Added protection tests before guard, plus negative direct add/put/putRaw rollback test.
- Security limitation: AuditService.restoreHistorical is exported for validated restore flows and is not yet restricted to a restore-only capability; direct IndexedDB access via StorageService.init() or browser developer tools remains outside service-layer protection.
- Latest CI must be checked before merge. No acceptance claim.
- Previous audited immutable-store hardening merged: PR #114, merge commit
3077d42d0061b05f8bf623f77ca18869a1581d1c. - Current branch:
gate/a03-audit-metadata-validation-20261019. - Current changes: reject invalid audit business dates and overlong metadata identifiers; add positive/negative atomic rollback tests.
- Acceptance criteria outstanding: full audit metadata and company/actor integrity; service-layer mutation bypass assessment; atomic failure cases; complete passing CI with evidence; independent gate review.
- CI status: original PR checks ran; a subsequent attempted history-only restriction was reverted because it would break legitimate transactional test/seed paths. Latest head requires fresh CI; do not mark accepted before successful checks.
A04 — queued, not accepted
- Existing unmerged branch:
fix/a04-reject-mixed-company-backup-20261019, commit3a059b98c31a032a6725e07cb15999dce6461c2d. - Outstanding: positive/negative restore tests, corrupt/interrupted restore, two-version compatibility, company isolation, CI.
Remaining gates
A01, A05, A06, A07, A08: not accepted; proceed in specified order after A03/A04.
External verification, not simulated
- A02: independent accountant sign-off.
- DATA_BACKUP: restore of actual backup on actual target system.
Next action
Review CI on latest A03 PR head, fix failing fixtures and ensure restore authorization cannot be invoked outside validated restore. Do not merge red CI. Once all A03 acceptance criteria have evidence, update manifest and this file, then proceed to A04.
A03 continuation — restore authorization and hash chain
- Added transaction/company-scoped restore authorization in AuditService and negative direct-call regression test.
- Full restore now registers company-scoped grants before historical inserts.
- BLOCKER: CompanyBackupService has not yet been updated to register grants; company restore currently risks rejection. Attempts to update the file were blocked by tool safety checks. Do not merge or mark gate accepted.
- Existing legacy fixture rows lack some new metadata fields and must be updated with complete valid audit records.
- Hash chain (prevHash, eventHash, verifyChain) has NOT been implemented. Tamper, deletion and reordering tests are outstanding. A local unanchored hash chain cannot prove deletion of the final event; trusted head checkpoint required.
- CI on current head is not yet verified. Next: repair company restore and fixture compatibility, then implement and test chain before merge.
A03 2026-10-19 continuation
- CompanyBackupService restore authorization was added at commit 9c0d438e21c11ba6c47561b80e3de7e270defcce.
- Fixed a WeakSet access defect in AuditService at commit 0056fd1748e9222603c7cd8ada89f41ba8ca6c2e.
- Added src/core/AuditChain.js at commit 567b9af1759df9448e01b9982bfe6208bcff545f (SHA-256 and a standalone chain verifier). This is NOT yet integrated into audit event writes or backup metadata; no end-to-end chain claims.
- Attempts to integrate hash code into AuditService and add chain regression tests were blocked by tool safety checks. No tests were run locally.
- Legacy audit migration, full company restore compatibility and trusted backup anchor remain unfinished.
- Client-side security boundary: the StorageService/AuditService checks defend normal application code paths, not a malicious user with IndexedDB/devtools or local file access. A backup-contained hash anchor is not independently trusted: an attacker who can rewrite the backup can rewrite its anchor. Signed or externally anchored checkpoints are needed for adversarial tamper evidence. A bare hash chain cannot detect tail deletion without an independently retained head.
Independent A03 validation branch (2026-10-20)
- Branch: fix/a03-chain-validation-20261020; draft PR #116; not accepted or merged.
- Actual GitHub Actions npm test run 39373562237, commit 1d986c1b23f01eff562c2819a7f34153e7fc1fe6: 253 tests, 248 passed, 5 failed, exit code 1. Failures: A02 audit rollback, A03 company scope, A03 append-only protection (2), accounting backup round trip. This run predates current branch and does not verify current changes.
- No local npm test was executed: local repository absent in this runtime, GitHub DNS unavailable, remote desktop offline/quota exhausted. Later PR runs have been cancelled by subsequent pushes or are pending.
- Fixed missing Auth import in tests/a03-company-scope-immutable-stores.test.mjs on this branch; no passing run verified yet.
- No independent reviewer agents were launched; no three-agent approval claimed.
A03 CI request 2026-10-20
- Implementation commit 293239951b6c15df766e891fd386b54c6f99ec51 adds anchored full backups, strict company backup order verification, deterministic v6 replay compatibility, and end-to-end tampering tests. No pass claim before CI.
- PR #116 temporarily targets main to activate the existing pull_request quality workflow; remains draft and unmerged. Remote Desktop excluded.
A03 CI evidence: 2026-10-20, run 39374384074
- SHA 46f5dd613b543778e27c498a54c664f9edf01845; completed failure, npm test: 257 tests, 251 passed, 6 failed, exit 1.
- Failures: A02 audit rollback; A03 full restore rejects modified event (error message mismatch, integrity rejection correctly occurs); A03 v6 migration; A03 company scope; A03 append-only direct protection; A03 clear rollback.
- Root cause of five fixture failures: restoreHistorical validated legacy actorId/sourceId/commandKey before deterministic migration defaults were applied. Fix permits missing legacy metadata but rejects present invalid values. Sixth test now accepts earlier chain integrity rejection rather than requiring a later immutable-overwrite error. The rejection and rollback assertion remain mandatory.
A03 completed CI evidence 2026-10-20 (pre-STATUS commit)
- PR quality workflow run 39374506277, SHA 9563296884b7131a97a265a296d99977d7522fce: completed SUCCESS. Linux npm test 257 passed / 0 failed; Windows npm test 257 passed / 0 failed. Frontend build, production npm audit, and Windows Tauri installer build all succeeded.
- This evidence verifies the application code at the stated SHA. A STATUS-only documentation commit will require its own final-head CI run before completion.
- Independent three-agent review remains NOT VERIFIED: this execution environment does not expose a multi-agent reviewer launch capability. No approval or merge is claimed.
- Local clone/npm test remains unavailable because container DNS cannot resolve github.com; GitHub Actions is the actual test runner.
A03 three-pass review initiated (2026-10-20)
- Three sequential code-review passes were performed against PR #116 because no callable subagent/Task tool is exposed. These are NOT independent agents.
- Functional pass: previous completed CI run 39374969382, SHA 95f6c976a04a72e2ddaf27f20773994e871e0250, Linux 257/257, Windows 257/257. Edge coverage gaps found; new tests added, pending new CI.
- Security/quality pass: found malformed non-array input could throw from verifyChain; addressed with invalid result. Public authorizeRestore remains a client trust-boundary limitation, not a cryptographic authorization mechanism. O(n) audit-history read per append remains a scalability concern; no unverified performance claim.
- Edge-case pass: missing explicit tests for empty/single chains, mixed legacy+hashed history, corrupted JSON, wrong anchors and concurrent writes. Added regression tests; results pending CI.
Final approval and merge remain withheld until CI and repeat review.
GitHub Actions run 39376283188 on SHA 894e1f54409a7f12455ee27b6e3d8b80f4899a55: completed FAILURE, npm test 262 total / 260 passed / 2 failed. Failures A02 rollback and A03 direct append-only protection; root cause: eager genesis-based normalization of a legacy-only snapshot intended to append after existing audit history. Changed legacy-only imports to defer chain index/hash to the active restore transaction. Mixed legacy+hashed chains remain prevalidated. Await rerun.
Security review found public AuditService.authorizeRestore permission mint. Replaced with scoped restoreFromBackup workflow, removed public mint and added negative regression test. CI pending; no pass claim for new code.
Completed PR quality CI 39376822354, SHA f83b8e6c9dd55cd62ecf4a2441463af0e6048956: SUCCESS, Linux npm test 263/263, Windows npm test 263/263, frontend and Windows installer succeeded.
Native installed-WebView2 lab 39376822375 on same SHA: FAILED, smoke fixture tests/windows-vm-installed-tauri-cdp.cjs:276 used prohibited tx.put('audit_events'). Root cause is outdated test fixture, not product restore. Updated fixture to seed through version-6 backup import, preserving the immutable restore rollback assertion; rerun pending.
A03 final three-pass sequential review and green CI (2026-10-20)
- Tool limitation: no callable independent subagent/Task launcher. Three distinct sequential re-reads were completed and documented in reviews/A03-agent1.md, A03-agent2.md, A03-agent3.md. They are NOT independent agents; each approves the defined A03 scope with zero remaining findings after fixes.
- PR quality CI 39377639299, commit 59dbc4beba2172cafdfd6c380adfa6c0aba6b445: completed SUCCESS. Linux npm test 263 passed / 0 failed; Windows npm test 263 passed / 0 failed; frontend build, dependency audit and Windows installer build succeeded.
- Installed native Windows VM lab 39377639277, same SHA: completed SUCCESS after replacing a test-only direct audit tx.put fixture with the validated legacy backup import. A08 baseline CI 39377639263: completed SUCCESS on same SHA.
- Client security boundary: audit chain checks detect accidental or untrusted backup modifications only when the head anchor is retained and trusted. The same-file anchor is not independent authentication; malicious local IndexedDB modification is outside service-layer guarantees. Hash comparison is not secret-bearing. Large-history append read complexity remains for A08 performance work.
- A03 code and tests are accepted on the evidence above. PR #116 remains draft until a completed quality run on the final documentation commit, then may be marked ready and merged. Main CI must be checked after merge.
CURRENT VERIFIED SNAPSHOT — 2026-10-20 (supersedes stale historical headings above)
- Canonical branch:
main, verified head at recovery:784f0205b5f98b834e2f96c881767a1f1888e528. - A03 PR #116 is merged, not draft or pending: merge time
2026-10-20T06:14:01Z, merge commit784f0205b5f98b834e2f96c881767a1f1888e528; final PR headc59cf2a85686be016ce0526afc48227eecf79736. - Authoritative manifest
docs/PHASE_A_RELEASE_ACCEPTANCE.jsonon main currently says A03 accepted: true, all other A01/A02/A04/A05/A06/A07/A08/INDEPENDENT_QA/DATA_BACKUP are false. Older references above saying no gates closed or PR #116 awaiting merge are historical and must not be interpreted as present status. - Final-head PR quality run 39378563767: completed SUCCESS, Linux
npm test263/263, Windowsnpm test263/263, frontend build, production dependency audit and Tauri Windows installer build successful; SHAc59cf2a85686be016ce0526afc48227eecf79736. Counts extracted from the respective job logs. - Native installed Windows VM lab 39378563787: completed SUCCESS on the same PR SHA; NSIS-installed Tauri/WebView2, v6→v7 and upgrade/reinstall checks. Synthetic-data VM evidence does not constitute a physical customer-device restoration.
- A08 baseline run 39378563726: completed SUCCESS on the PR SHA, but A08 not accepted.
- Post-merge main-SHA CI is not verified: the available PR quality workflow is configured for
pull_requestandworkflow_dispatch, notpushto main. GitHub Actions list for branch main and commit-associated PR runs did not show a run on merge commit784f0205.... Do not treat green PR CI as a distinct run on the merge SHA. CI must be verified if policy or workflow is changed to test main. - Reviews
reviews/A03-agent1.md,reviews/A03-agent2.md,reviews/A03-agent3.mdend inFinal sequential re-review — APPROVED. They were three sequential assistant passes, not independent review agents. Independent financial signoff remains open. - Threat model: hash-chain + backup-contained audit anchor does not authenticate a fully compromised client, local IndexedDB, or self-rewritten backup anchor. Appends can entail O(n) history scanning; measure under A08.
- Next gate A04: main-manifest accepted=false. Historical branch
fix/a04-reject-mixed-company-backup-20261019remains at3a059b98c31a032a6725e07cb15999dce6461c2d, diverged from main (1 ahead / 59 behind as of this check). Compare and port only justified changes with tests; do not merge that stale branch directly. - External acceptance
INDEPENDENT_QAandDATA_BACKUPremains unaccepted until actual human/device evidence. Remote Desktop is out of scope.
A04 software gate verification — 2026-10-20 (current status; earlier A04 entries are historical)
- A04 accepted: true in the updated Phase A manifest (software gate only). Current implementation is merged into
main: PR #118 (223c0a526b7d9b61b6536e1bcf6580fa5c9dabf2) adds source-company preflight and negative tests; PR #119 (120523bb053a81fe892a8af1879c94ba8bfd1d7a) enforces source ownership at theCompanyBackupServiceboundary with direct-call regression. Previous stale A04 branch was compared (1 ahead/59 behind), not merged. PR #120 (2c88c4b35017a2cd0ff1d6181bba0311fbd299d4) adds post-mergemainCI for quality and native Windows workflows. - Verified green post-merge main CI on SHA
2c88c4b35017a2cd0ff1d6181bba0311fbd299d4: quality run 39383484055 completed SUCCESS, Linux 266/266 and Windows 266/266 npm tests, frontend build, production dependency audit and installer build; native VM 39383483978 completed SUCCESS, real NSIS-installed Windows Tauri/WebView2 and synthetic backup/restore, v6→v7 migration, UI checksum/encrypted restore, wrong password, corrupted ciphertext, late-validation transaction rollback and mid-import process termination/reopen tests. - Same-sha earlier green PR evidence: PR #118 quality 39380965617 (265/265 each Linux/Windows) and native 39380965551; PR #119 quality 39381883748 (266/266 each) and native 39381883781.
- Formal review record:
reviews/A04-sequential-review-20261020.md(three sequential assistant review passes, not independent agents). No artificial client data were used and no public installer release was created. - Acceptance boundary: A04 verification uses synthetic data through an actually installed Windows application. It does not approve genuine customer backup recovery on the target device, physical power-loss testing, or independent financial/accountant approval.
DATA_BACKUPandINDEPENDENT_QAremain false in the manifest; A01/A02/A05/A06/A07/A08 remain false. SHA-256/backup-internal anchors cannot authenticate an attacker-controlled whole backup; AES-GCM integrity is conditional on password secrecy. - Next ordered gate: A01 commercial corrections/reversals/refunds. Extract criteria from
docs/PHASE_A_BACKLOG_FA.mdanddocs/PHASE_A_EXIT_RUNBOOK_FA.md, inspect existingRetailPostingServiceand tests, create a separate tested PR. Do not release publicly or claim Phase A complete.
A01 2026-10-20 continuation — scope incomplete / NOT ACCEPTED
- PR #122 (https://github.com/davoodmehraban89/Factor-easyPro/pull/122) merged in main at caa5995d5b71f1a8c89b07941bcd7f8870a723d8. The RetailPostingService.recordCash transaction now requires Auth.isAdmin() before paying a customer refund linked to an already posted sale_return. The restriction is enforced in the service layer, not only UI.
- A new regression in tests/retail-phase2.test.mjs checks that a clerk refund attempt leaves treasury, invoice paidAmount, journal and audit unchanged, while the manager-authorized refund succeeds and keeps the trial balance balanced.
- Final PR SHA 90558e5247b41c7adf40aeac65b6bdd3470db165: quality run 39385076660 successful with 267/267 Linux and 267/267 Windows tests, frontend/npm audit/Windows build; native installed Windows lab 39385076705 successful.
- Post-merge main SHA caa5995d5b71f1a8c89b07941bcd7f8870a723d8: quality run 39385956523 successful with 267/267 Linux and 267/267 Windows tests, frontend/audit/installer; native Windows VM run 39385956551 successful.
- Three sequential assistant review passes are recorded in reviews/A01-refund-auth-sequential-20261020.md; they are NOT independent agents and do not approve the entire gate.
- A01 remains accepted=false. Open acceptance scope includes representative sales/purchases/corrections, cheque reversals, explicit refund reasons/approval, fiscal-period edge cases, idempotency, reconciliation and independent financial signoff. Client-side IndexedDB controls do not authenticate hostile local storage. INDEPENDENT_QA and DATA_BACKUP remain false. No public release.
- Next actionable work: select and implement the next unverified A01 scenario from docs/PHASE_A_BACKLOG_FA.md and docs/PHASE_A_EXIT_RUNBOOK_FA.md in a separate tested PR.
A01 return-linked refund correction trace — 2026-10-20 (MERGED / NOT FULLY ACCEPTED)
- PR #124 (https://github.com/davoodmehraban89/Factor-easyPro/pull/124) merged into
mainatb7ee529a84e28ba25acda8e486441f8a198b3bc4. A01 now records an append-onlydocument_correctionsentry per cash settlement associated with a postedsale_return(customer credit payout) orpurchase_return(supplier cash recovery), linking the returnsourceId, treasuryresultId, correlated journal/audit and a derived structuredreasonCode. Existing company/period/amount/account checks and manager-only customer payout restriction remain enforced; original source invoices and earlier receipts are not rewritten by this trace entry. - Node regressions in
tests/retail-phase2.test.mjscover successful customer and supplier traces, payout/recovery limits, duplicate transaction ID, ledger balance and late unique-key insertion failure with complete rollback of treasury, invoice settlement, GL journal and audit. - Installed Windows native WebView2 E2E in
tests/windows-vm-native-functional-matrix.cjsposts a second return and authorized payout through real invoice and treasury UI forms, then verifies related treasury, correction, audit and paidAmount values. It does not constitute customer-device execution or external human approval. - Verified final PR SHA
71f78d233c5a8a0ca4ff650cc2505ae20d3c01b2: quality 39435418939 completed SUCCESS, 270/270 Linux and 270/270 Windows tests plus frontend build, production audit and installer; native installed VM 39435418629 completed SUCCESS, native report explicitly statesauthorizedRefundTracedInInstalledWebView2:true. - Verified exact post-merge main SHA
b7ee529a84e28ba25acda8e486441f8a198b3bc4: quality 39436721979 completed SUCCESS with 270/270 Linux and 270/270 Windows tests, build/audit/installer; native installed VM 39436722070 completed SUCCESS. - Review on PR #124 records three sequential inspections by one assistant, not independent reviewers; no independent accountant signoff.
reasonCodeis derived from operation type, not an explicitly user-selected commercial explanation or separate approval. The product still lacks the full A01 correction/cheque reversal/closed-period/fiscal and independent QA matrix. - Canonical manifest A01 remains accepted=false. A02, A05, A06, A07, A08, INDEPENDENT_QA and DATA_BACKUP remain false; A03 and A04 remain accepted true. No public release, genuine customer data processing or authorization to change live accounts.
A01 structured reason and explicit in-app confirmation — 2026-10-21 (MERGED; A01 OPEN)
- PR #126 (https://github.com/davoodmehraban89/Factor-easyPro/pull/126) merged into main at
abd2d9116eae9c00b5ac421b393e1c55df257fd6. For linkedsale_returnpayouts andpurchase_returnsupplier recoveries,RetailPostingService.recordCashnow rejects transactions without a valid user-selectedreasonCode(goods_return,quality_issue,pricing_dispute) orexplicitlyApproved===true; existing manager-only customer payout policy and credit limits remain in force. - Treasury UI only displays the reason selector for a linked return and opens a separate confirmation dialog before submission. The controller forwards both values; the atomic
document_correctionsrecord now retains the selectedreasonCode, derivedactionCode,approvalMethod,approvedByandapprovedAtUtcand remains linked to the treasury transaction, journal and audit. - Negative Node regressions validate missing/invalid reasons, false/string confirmation flags and zero treasury/journal/audit/correction/settlement writes; existing rollback, concurrent refund cap, manager permission and balanced ledger tests remain. The native installed WebView2 test asserts the approval dialog produces zero writes until confirmed and verifies the reason/approver trace after approval.
- Verified final PR head SHA
d7a0320df0bbd459f0b53b0b6ec495c16ef8c368: quality 39548537574 completed SUCCESS, Linux 271/271 and Windows 271/271 plus frontend, dependency audit and Windows installer; installed native VM 39548537520 completed SUCCESS,authorizedRefundTracedInInstalledWebView2:true. - Verified post-merge main SHA
abd2d9116eae9c00b5ac421b393e1c55df257fd6: quality 39549036850 completed SUCCESS, Linux 271/271 and Windows 271/271 plus build/audit/installer; installed native VM 39549036820 completed SUCCESS, same real installed UI return/refund evidence on synthetic company data. - Scope: The form confirmation flag is not a cryptographic signature, does not enforce a separate second approver and may be supplied by a privileged direct caller. The three sequential inspection notes on PR #126 are one assistant's review, not independent agents or financial QA. Reason code choices are not yet a policy approved by an external accountant.
A01.accepted=false;INDEPENDENT_QA=false;DATA_BACKUP=false. No public release, real customer backup, hardware print or power-loss test. - Remaining A01: robust cheque reassignment/reversal lifecycle, original source corrections, edge-case fiscal period/reconciliation matrix and independent financial acceptance.
A01 cheque financial event date / closed-period carryover — 2026-10-21 (MERGED; A01 STILL OPEN)
- PR #128 (https://github.com/davoodmehraban89/Factor-easyPro/pull/128) merged to
maincommitdbab4e5857aacc062f423c1d84c165541e9d429b. The cheque-status UI now collects an accounting event date for finance-posted cheques and passes it throughChequeController.changeStatus(..., options)toRetailPostingService.changeChequeStatus. The actual posting date must be in an open period and not precede the cheque issue date; an explicitly empty value fails closed instead of falling back to the due date. It is stored asstatusBusinessDate; the original issue and due dates are not rewritten. Ledger, cash settlement and audit carry the same event date atomically. - Added two
tests/retail-phase2.test.mjsregressions: invalid/empty or closed-period posting rejects without writing, a cheque from a closed prior period clears once in the next open period with matching GL/treasury/audit dates, and an outbound cheque bounces in a later open period without phantom cash. Ledger remains balanced. - Installed Tauri/WebView2 UI test in
tests/windows-vm-native-functional-matrix.cjssupplies1405/07/20for a cheque due1405/07/18, first exercises failed cash-account routing, then verifies a single posted clearance with preserved due date, matchingstatusBusinessDate, journal and treasury transaction.chequeEventDateDifferentFromDueDate:trueis recorded in native run logs. - Final PR head SHA
2bbb6cc83e60e4bba43ce5c42f2bf91579b5a1a6: quality 39551284922 completed SUCCESS, 273/273 Linux and 273/273 Windows tests, Vite/audit/installer; installed native Windows 39551284889 completed SUCCESS including the cheque-date E2E. - Exact post-merge main SHA
dbab4e5857aacc062f423c1d84c165541e9d429b: quality 39552039952 completed SUCCESS, 273/273 Linux and 273/273 Windows tests plus build/audit/installer; native Windows 39552039783 completed SUCCESS, samechequeEventDateDifferentFromDueDate:trueevidence on actual installed candidate. - Three review perspectives documented on PR #128 are sequential checks by one assistant, not independent agents. Scope is event-date correctness only, not a full cheque endorsement/reversal or post-clearance correction state machine. Customer-device data, accountant signoff, real printer and physical power-loss tests are absent.
A01.accepted=false;INDEPENDENT_QA=false;DATA_BACKUP=false; A03/A04 software gates remain true. No public release. - Next A01 actions: cheque reassignment / return / reversal and financial reconciliation with approved policy and negative E2E, then unresolved commercial corrections; full independent financial signoff is still required for release acceptance.
A01 third-party cheque endorsement — 2026-10-22 (MERGED; A01 STILL OPEN)
- PR #130 (https://github.com/davoodmehraban89/Factor-easyPro/pull/130) merged in main at
fb8f1482fdb85ca87e7a93cbcb64b7ed1b2bc51a. PreviouslychangeChequeStatus(...,'spent')debited account 201 for the original cheque drawer, despite describing a transfer to a different person. The finance service now requires a real same-company third-party endorsee distinct from the original drawer and strictexplicitlyApproved===true. Debit 201 has the endorsee reference and credit 105 retains the original drawer reference; no cash transaction is fabricated. This remains limited to an initial inbound cheque transition frompending. - The cheque UI now provides an endorsee selector and explicit second confirmation dialog; the controller already forwards the options. The status row retains endorsee, approver and business date; an immutable, uniquely-keyed
document_correctionsendorsementreceipt with original drawer and endorsee identities, correlation journal ID and actor is appended atomically alongside cheque update, balanced journal and A03 audit. - Two added Node regressions assert no writes on missing/nonexistent/cross-company/same-drawer payee or missing/string confirmation; a successful endorsement posts two GL lines against different contact IDs, with a single immutable correction and no treasury receipt; duplicate endorsement is rejected. An intentionally conflicting correction idempotency key verifies rollback of provisional cheque, journal, audit, treasury and correction writes.
- An installed Windows NSIS/Tauri WebView2 UI flow creates a synthetic inbound cheque, selects the third party, rejects missing payee, asserts zero writes before confirmation, and confirms account/contact dimensions, linked immutable correction and no phantom cash after confirmation.
- Exact final PR-head SHA
affa4d38cb50ecc9e9a26c45ae4a04d8bc8fed88: quality 39843781285 completed SUCCESS, 275/275 Linux and 275/275 Windows tests plus build/audit/Windows installer; installed native VM 39843781284 completed SUCCESS, includingmissingEndorseeRejected:true,confirmationRequiredBeforeWrite:true,endorseeLedgerDimensionCorrect:true,drawerChequeAssetPreserved:true,appendOnlyEndorsementCorrelated:true,noPhantomCash:true. - Exact postmerge main SHA
fb8f1482fdb85ca87e7a93cbcb64b7ed1b2bc51a: quality 39845074404 completed SUCCESS, 275/275 Linux and 275/275 Windows plus packaging; installed native VM 39845074702 completed SUCCESS with same endorsement scenario and all six native assertions true. - Review recorded in PR #130 is sequential work by one assistant, not independent QA. Operator confirmation is not a cryptographic signature or independent second signer. Further endorsement/reversal after
spentorcleared, bounced-after-clearing treatment, actual payable balance allocation and all commercial document correction variants still need business policy, negative tests and accountant signoff. A01 remains accepted=false; A03 and A04 remain true; A02/A05/A06/A07/A08, INDEPENDENT_QA and DATA_BACKUP remain false. No customer database was accessed, no public release issued. - Next A01: design and verify post-clearing cheque reversal / dishonour and subsequent endorsed-cheque return without directly mutating posted status or journal history. Accounting entries with material judgment require an approved policy before enabling customer use.
Phase A incremental safety gates — 2026-10-23 (A01/A02/A05 REMAIN OPEN)
A01/A05 posted cheque clearance: bank selection and approval
- PR #132 (https://github.com/davoodmehraban89/Factor-easyPro/pull/132), merged as main SHA
4f7136a0f9624efadb8b45183eaa31818ecb577c: stopped implicit default-bank settlement.RetailPostingService.changeChequeStatus(...,'cleared')now requires a nonblank explicit same-company active bank/cash account andexplicitlyApproved===true; an invalid/missing account/approval fails without journal, audit, cheque or treasury writes. The posting uses the mapped subsidiary cash ledger and records clearing account ID, approver and UTC approval time; original issue and due dates do not change. - Cheque UI presents active mapped accounts and requires a separate confirmation before a funds-moving status change, while hiding transitions of already finalized integrated cheques. Regression proves a nondefault destination, exactly one treasury transaction, replay protection and balanced GL. Native installed Windows WebView2 checks selection, no writes before confirmation and the chosen account's cash journal line.
- Final PR-head
d389f79b274145c19bf156cc0d21946dbdf0e93c: quality 39868716749 SUCCESS, 276/276 Linux and 276/276 Windows, installer, build/audit; installed native 39868716746 SUCCESS:explicitNondefaultClearingAccount:true,confirmationRequiredBeforeCash:true. - Exact postmerge main
4f7136a0f9624efadb8b45183eaa31818ecb577c: quality 39869748176 SUCCESS and native 39869748169 SUCCESS; 276/276 Linux and Windows; native independently exercised the nondefault clearing bank and confirmation on disposable synthetic data.
A05 read-only reconciliation: posted cheque cash and endorsee GL
- PR #133 (https://github.com/davoodmehraban89/Factor-easyPro/pull/133), merged as main SHA
182efda1cf5bcb7f47ed7c5f3c4804efd8ef6bda: strictly read-onlyReconciliationCorenow detects a missing selected cheque bank, cash transaction account different from the approved clearing account, mapped cash-ledger line mismatch, missing/invalid third-party endorsee and endorsement GL against the wrong drawer/payee. Legacy cleared cheques without aclearingAccountIdremain unproven, not backfilled with assumed values. - Two deterministic fixture regressions exercise good entries and tampered cash/account and endorsee ledger dimensions without mutating input. Final PR-head
0b4c397614eb427071b42eab1662fd2f6fbfb02a: quality 39869638895 SUCCESS, 277/277 Linux and 277/277 Windows; installed native 39869638926 SUCCESS including read-only cheque reconciliation. - Exact postmerge main
182efda1cf5bcb7f47ed7c5f3c4804efd8ef6bda: quality 39870636847 SUCCESS with 278/278 Linux and 278/278 Windows; installed native 39870636785 SUCCESS, read-only reconciliation and real cheque cash tests.
A02 mapped historical-data extract preflight: fail closed
- PR #134 (https://github.com/davoodmehraban89/Factor-easyPro/pull/134) merged as main SHA
25518f2aa2a056c3d423fe2e835aaf284d2bf63c. The non-importing, format-independent Holoo mapped-table preview now rejects invoice headers with no invoice-line extract, orphan optional cheque-to-contact references, numeric master-data names and zero-value cheques. Diagnostic output contains discrepancy codes, dataset names and row numbers only; no customer values or identifiers;importPerformed:false,canCommit:false. - Three new pure synthetic regressions check zero writes/unchanged source and no PII in diagnostics. Final PR-head
556f6c5ca972085e4fa55b7819d6f979b8fc69e4: quality 39870151668 SUCCESS, 279/279 Linux and Windows plus installer/audit; native installed VM 39870151544 SUCCESS including blocked opening dry-run without writes. - Exact postmerge main
25518f2aa2a056c3d423fe2e835aaf284d2bf63c: quality 39871569809 completed SUCCESS, 281/281 Linux and 281/281 Windows plus frontend, audit and Windows preview installer; installed native 39871569680 completed SUCCESS, 281/281 tests and actual WebView2 opening-preview negative pathpriorActivityBlocked:true,commitActionDisabled:true,zeroWrites:true.
Acceptance / unresolved dependencies
A03.accepted=true,A04.accepted=true(A04 software-only).A01=false,A02=false,A05=false,A06=false,A07=false,A08=false,INDEPENDENT_QA=false,DATA_BACKUP=false. This work does not complete Phase A.- PR reviewers are sequential inspections by one assistant, not independent agents or a qualified financial signer. Outstanding A01: post-clearing cheque dishonour/reversal policy and complete posted-commercial corrections. A02: authorized verified historical migration of cash, counterparties and inventory plus independent reconciliation. A05: complete fiscal/treasury signoff. A06: production issuer public key and approved offline signing/renewal lifecycle. A07: physical printer/representative Windows/offline hardware. A08: real-system sustained/power-loss/recovery evidence. Independent financial QA and genuine customer backup/restore walkthrough are mandatory and still not performed.
- No public release was issued. Only synthetic disposable CI data was used; no real customer database, license private key or installed customer device was accessed.