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

test(A03): seed native Windows audit fixture via validated v6 recovery

davoodmehraban89 committed Oct 20, 2026 at 09:27 UTC 59dbc4beba2172cafdfd6c380adfa6c0aba6b445
3 files changed +6 -1
STATUS.md
+3
@@ -82,3 +82,6 @@ Review CI on latest A03 PR head, fix failing fixtures and ensure restore authori
82 - 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.
83
84 - 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.
85 +
86 +- Completed PR quality CI 39376822354, SHA f83b8e6c9dd55cd62ecf4a2441463af0e6048956: SUCCESS, Linux npm test 263/263, Windows npm test 263/263, frontend and Windows installer succeeded.
87 +- 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.
reviews/A03-agent3.md
+2
@@ -7,3 +7,5 @@ Findings: no explicit tests for empty/single log, partial hash metadata, mixed l
7 Review method: sequential pass, not an independent subagent.
8
9 Regression finding: import of a legacy-only snapshot into an existing chain failed; covered by pre-existing A02 rollback and A03 append-only tests. Fixed; CI rerun pending.
10 +
11 +Installed Windows VM review finding: workflow 39376822375 on SHA f83b8e6 failed at tests/windows-vm-installed-tauri-cdp.cjs:276, because the native smoke fixture directly wrote to immutable audit_events via tx.put. Production guard correctly rejected it. Replaced only fixture seeding with the validated v6 backup import path; immutable conflict/rollback assertions unchanged. Pending real native VM rerun.
tests/windows-vm-installed-tauri-cdp.cjs
+1 -1
@@ -273,7 +273,7 @@ async function connect(url) {
273 'const audit={id:"vm-audit-immutable",companyId:"company_default",' +
274 'commandKey:"company_default:vm-native-test",eventType:"journal_posted",' +
275 'actorId:"user_admin",sourceId:"vm-upgrade-draft",safeSummary:{lineCount:2}};' +
276 - 'await S.transaction("audit_events",tx=>tx.put("audit_events",audit));' +
276 + 'await S.importAll({app:"Factor-easyPro",version:6,data:{audit_events:[audit]}});' +
277 'const stored=await S.get("audit_events",audit.id);' +
278 'let refused=false;' +
279 'try {await S.importAll({app:"Factor-easyPro",version:7,data:{' +