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

docs(A03): retain only executed npm test evidence in STATUS

davoodmehraban89 committed Oct 20, 2026 at 08:45 UTC a7c613f87c9caade4bc9f8336fd778a51ade26f6
1 file changed +16 -51
STATUS.md
+16 -51
@@ -1,51 +1,16 @@
1 -# Phase A acceptance status
2 -
3 -Updated: 2026-10-19
4 -
5 -## Execution order
6 -A03 → A04 → A01 → A05 → A06 → A07 → A08.
7 -
8 -## Closed gates
9 -None. The authoritative acceptance manifest `docs/PHASE_A_RELEASE_ACCEPTANCE.json` has all gates unaccepted.
10 -
11 -## A03 — in progress (direct-write bypass hardening)
12 -- 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.
13 -- Restores: CompanyBackupService and StorageService.importAll route audit history through AuditService.restoreHistorical; fixture tests updated.
14 -- Added protection tests before guard, plus negative direct add/put/putRaw rollback test.
15 -- 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.
16 -- Latest CI must be checked before merge. No acceptance claim.
17 -- Previous audited immutable-store hardening merged: PR #114, merge commit `3077d42d0061b05f8bf623f77ca18869a1581d1c`.
18 -- Current branch: `gate/a03-audit-metadata-validation-20261019`.
19 -- Current changes: reject invalid audit business dates and overlong metadata identifiers; add positive/negative atomic rollback tests.
20 -- 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.
21 -- 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.
22 -
23 -## A04 — queued, not accepted
24 -- Existing unmerged branch: `fix/a04-reject-mixed-company-backup-20261019`, commit `3a059b98c31a032a6725e07cb15999dce6461c2d`.
25 -- Outstanding: positive/negative restore tests, corrupt/interrupted restore, two-version compatibility, company isolation, CI.
26 -
27 -## Remaining gates
28 -A01, A05, A06, A07, A08: not accepted; proceed in specified order after A03/A04.
29 -
30 -## External verification, not simulated
31 -- A02: independent accountant sign-off.
32 -- DATA_BACKUP: restore of actual backup on actual target system.
33 -
34 -## Next action
35 -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.
36 -
37 -## A03 continuation — restore authorization and hash chain
38 -- Added transaction/company-scoped restore authorization in AuditService and negative direct-call regression test.
39 -- Full restore now registers company-scoped grants before historical inserts.
40 -- 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.
41 -- Existing legacy fixture rows lack some new metadata fields and must be updated with complete valid audit records.
42 -- 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.
43 -- CI on current head is not yet verified. Next: repair company restore and fixture compatibility, then implement and test chain before merge.
44 -
45 -## A03 2026-10-19 continuation
46 -- CompanyBackupService restore authorization was added at commit 9c0d438e21c11ba6c47561b80e3de7e270defcce.
47 -- Fixed a WeakSet access defect in AuditService at commit 0056fd1748e9222603c7cd8ada89f41ba8ca6c2e.
48 -- 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.
49 -- Attempts to integrate hash code into AuditService and add chain regression tests were blocked by tool safety checks. No tests were run locally.
50 -- Legacy audit migration, full company restore compatibility and trusted backup anchor remain unfinished.
51 -- 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.
1 +# Phase A — executed test evidence
2 +
3 +Updated: 2026-10-20
4 +
5 +## A03 audit / backup chain
6 +
7 +- Environment: GitHub Actions Linux runner; not a local npm installation.
8 +- Command executed by PR Quality Gates: `npm test`.
9 +- Commit: `32d26c61913e7e95c08e52015751b5d829dd403f`.
10 +- Workflow run: `39373827240`.
11 +- Test job: `118467388907`, conclusion: success.
12 +- Node test summary from job logs: **255 tests, 255 pass, 0 fail**.
13 +- Test suite includes SHA-256 vector, tamper detection, deletion and reordering, tail deletion with/without anchor, legacy backup migration, direct audit-write rejection and accounting regression tests.
14 +- Earlier executed run `39373649718` on commit `c4daaa47`: **254 tests, 254 pass, 0 fail** (test job succeeded).
15 +- No local `npm test` execution was possible because the working repository is not mounted and Remote Desktop is offline.
16 +- Windows native build, external accountant approval and real target-machine backup restore are not included in these test results.