فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

docs(A04): accept verified software backup gate and record three sequential reviews

davoodmehraban89 committed Oct 20, 2026 at 10:37 UTC 8b91158af31f623849b15329f60315e29902cbf1
3 files changed +39 -2
STATUS.md
+9
@@ -106,3 +106,12 @@ Review CI on latest A03 PR head, fix failing fixtures and ensure restore authori
106 - 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.
107 - **Next gate A04**: main-manifest accepted=false. Historical branch `fix/a04-reject-mixed-company-backup-20261019` remains at `3a059b98c31a032a6725e07cb15999dce6461c2d`, 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.
108 - External acceptance `INDEPENDENT_QA` and `DATA_BACKUP` remains unaccepted until actual human/device evidence. Remote Desktop is out of scope.
109 +
110 +## A04 software gate verification — 2026-10-20 (current status; earlier A04 entries are historical)
111 +
112 +- **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 the `CompanyBackupService` boundary with direct-call regression. Previous stale A04 branch was compared (1 ahead/59 behind), not merged. PR #120 (`2c88c4b35017a2cd0ff1d6181bba0311fbd299d4`) adds post-merge `main` CI for quality and native Windows workflows.
113 +- **Verified green post-merge main CI on SHA `2c88c4b35017a2cd0ff1d6181bba0311fbd299d4`**: [quality run 39383484055](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39383484055) completed SUCCESS, Linux 266/266 and Windows 266/266 npm tests, frontend build, production dependency audit and installer build; [native VM 39383483978](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/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.
114 +- Same-sha earlier green PR evidence: PR #118 quality [39380965617](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39380965617) (265/265 each Linux/Windows) and native [39380965551](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39380965551); PR #119 quality [39381883748](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39381883748) (266/266 each) and native [39381883781](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39381883781).
115 +- 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.
116 +- **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_BACKUP` and `INDEPENDENT_QA` remain **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.
117 +- **Next ordered gate: A01** commercial corrections/reversals/refunds. Extract criteria from `docs/PHASE_A_BACKLOG_FA.md` and `docs/PHASE_A_EXIT_RUNBOOK_FA.md`, inspect existing `RetailPostingService` and tests, create a separate tested PR. Do not release publicly or claim Phase A complete.
docs/PHASE_A_RELEASE_ACCEPTANCE.json
+8 -2
@@ -52,7 +52,7 @@
52 },
53 {
54 "id": "A04",
55 - "accepted": false,
55 + "accepted": true,
56 "evidence": [
57 "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38922551919",
58 "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38939141475",
@@ -60,7 +60,13 @@
60 "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38945374347",
61 "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38956382667",
62 "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38957782413",
63 - "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38969463728"
63 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/38969463728",
64 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39380965617",
65 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39380965551",
66 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39381883748",
67 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39381883781",
68 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39383484055",
69 + "https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39383483978"
70 ],
71 "name": "Versioned restore, v6 migration and real backup recovery"
72 },
reviews/A04-sequential-review-20261020.md new
+22
@@ -0,0 +1,22 @@
1 +# A04 three sequential review passes — 2026-10-20
2 +
3 +**Method:** three sequential reads and assessments by the assistant, NOT three independent agents. No independent accountant/device owner signed off. **Scope:** A04 software gate (versioned, recoverable, company-scoped Windows backup/restore). No production customer files.
4 +
5 +## Pass 1 — Functional / compatibility
6 +- Inspected `src/controllers/SettingsController.js`, `src/core/StorageService.js`, `tests/backup-restore-integration.test.mjs`, `tests/backup-version-validation.test.mjs` and `tests/a04-windows-v6-v7-browser-migration.cjs`.
7 +- Covered: admin-only export/import, company-scoped v7 round-trip, matching desktop/app/schema versions, legacy v6 snapshot import, unsupported and future schema rejection, app identity validation, checksum mismatch and malformed JSON rejection. Original v2.0.3 installed in VM generated a real-format synthetic v6 snapshot; it was replayed in the installed v7 candidate.
8 +- Evidence: post-merge quality [39383484055](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39383484055) and Windows native [39383483978](https://github.com/davoodmehraban89/Factor-easyPro/actions/runs/39383483978), both SHA `2c88c4b35017a2cd0ff1d6181bba0311fbd299d4`, success.
9 +
10 +## Pass 2 — Security / isolation / immutable history
11 +- Inspected `CompanyBackupService.js` preflight/sourceCompanyId and transactional restore; `SettingsController.js` source envelope checks; `StorageService.js` immutable posted records; `tests/backup-company-isolation.test.mjs`, `tests/a04-full-restore-finalized-records.test.mjs`, `tests/a04-immutable-posted-restore.test.mjs`, and `tests/a04-company-restore-journal-references.test.mjs`.
12 +- Finding resolved before acceptance: original A04 branch would have validated mixed ownership only at the Settings controller. PR #118 introduced source-envelope record validation, and PR #119 added direct restore service boundary checks. Regression tests reject mixed/ownerless records and prevent false success/audit or partial rows. All changed code is merged into main.
13 +- Full-snapshot restore does not accept imported password credentials or silently overwrite posted financial history. Linked posted journals and source references are checked inside atomic transactions; bad references roll back staged records. Limit: source-company migration remains an explicit administrator-controlled client workflow; not proof of remote identity. Adversary with full IndexedDB/file control lies beyond this local threat boundary.
14 +
15 +## Pass 3 — Windows/native/failure paths
16 +- Inspected `scripts/windows-vm-native-lab.ps1`, `tests/windows-vm-installed-tauri-cdp.cjs`, `tests/windows-vm-encrypted-company-backup-browser.js`, `tests/windows-vm-native-crash-import-browser.js`, and `docs/PHASE_A_EXIT_RUNBOOK_FA.md`.
17 +- Actual installed NSIS/Tauri/WebView2 uses synthetic `.fbackup` AES-GCM/PBKDF2 envelope; incorrect password and one-bit ciphertext damage are rejected with no writes, UI errors are asserted, healthy recovery succeeds with an audit receipt, and intentionally invalid late-stage posted-ledger references trigger rollback without partial contacts/invoices.
18 +- Windows runner also kills the **real app/WebView2 process tree** with taskkill while a genuine 50,000-contact import is underway, reopens the same profile and confirms zero imported partial records. This is process-kill testing, **not** a physical loss-of-power/disk-failure guarantee.
19 +- GitHub Actions main SHA `2c88c4b35017a2cd0ff1d6181bba0311fbd299d4`: `39383484055` Linux 266/266, Windows 266/266, dependency audit/frontend/Tauri package successful; native `39383483978` successful. Relevant preceding PR runs: 39380965617/39380965551 (#118), 39381883748/39381883781 (#119).
20 +
21 +## Review disposition
22 +A04 **software acceptance approved** within the stated local/client and synthetic-installed-Windows coverage. Remaining **external gates**: `DATA_BACKUP` (actual authorized customer-device backup/restore) and `INDEPENDENT_QA` (accountant signoff), neither claimed. No independent reviewer agents were launched. No new public Release or modification of real user data. The separate requested additional installed-UI mixed-company regression was not committed due to a tool write safety block; existing Node/company and native rollback tests are the cited acceptance evidence, not that uncommitted scenario.