سامانه صدور فاکتور و حسابداری
docs(phase0): open evidence-based acceptance register and audit stale PRs
davoodmehraban89 committed
Oct 12, 2026 at 09:37 UTC
77c932c61666cca95e5e91bd1a2f6795c065ed35
1 file changed
+68
docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md
new
+68
@@ -0,0 +1,68 @@
1
+# Finora Phase 0 — Acceptance register and first verified checkpoint
2
+
3
+**Date:** 2026-10-12 · **Accountable lead:** QA / Validation · **Authority:** Owner: «تایید فاز رو استارت بزن»
4
+**Approval state:** **ACCEPTANCE STARTED / PHASE 0 OPEN / NOT OWNER-ACCEPTED**.
5
+**Scope:** approved eight-phase roadmap, Phase 0 F0-01–F0-08. This document does **not** accept Phase 0 or authorize security/finance writes.
6
+
7
+## 1. Live pinned baseline
8
+
9
+- Canonical repository: `davoodmehraban89/Factor-easy`; protected pre-checkpoint `main` = `601a5b7b066ce4cf7e68fad2abe642c3e846cdd3`.
10
+- Same-SHA GitHub Quality [38203575835](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38203575835), Security [38203575840](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38203575840), Release gate [38203689209](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38203689209), gated Pages [38203706432](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38203706432): all **SUCCESS**; cancelled/skipped duplicate runs excluded.
11
+- Re-read real Quality static job `114662032710`: 55 JS/52 MJS syntax passed; financial/Golden invariants passed; **83/83 Playwright Chromium passed (55.7s)**, including F0-03 invoice mock-server persistence, F0-05 1,208-product and 1,206-contact synthetic fixture. Three disposable DB jobs succeeded. These are not customer production E2E evidence.
12
+- Remote authorized device `DESKTOP-71SJ63M`: read-only PowerShell `Invoke-WebRequest` to `https://factoreasy.ir/?phase0_acceptance=20261012` returned **HTTP 200**. No session, login, tenant data, JS version identity, save, or printing was verified by this HTTP-only check.
13
+- Live Supabase project `hcsixhqbyuhpshfwqpjx` **ACTIVE_HEALTHY**; **81** migrations; newest `20261011174445 posted_source_idempotency_index`. Read-only advisor counts: [21 authenticated SECURITY DEFINER function warnings](https://supabase.com/docs/guides/database/database-linter?lint=0029_authenticated_security_definer_function_executable), [3 private-table RLS-no-policy informational findings](https://supabase.com/docs/guides/database/database-linter?lint=0008_rls_enabled_no_policy), [1 leaked-password-protection warning](https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection). These are **review inputs**, not 25 proven vulnerabilities.
14
+- Reconciliation risk: live migration `20261007165208 phone_identity_profile` is present on production but its archive file `supabase/migrations/20261007163500_phone_identity_profile.sql` is **absent from current main**, and exists in stale open PR #58. Treat as migration/source drift for supervised analysis in Phase 1; **do not rerun or cherry-pick** that migration automatically.
15
+
16
+## 2. Acceptance gate matrix
17
+
18
+Status definitions: **CONTROLLED QA PASS** = actual Chromium or isolated tests with synthetic/mock data; **VERIFIED READ-ONLY** = live read-only metadata/HTTP observation; **UNVERIFIED** = required authentication/real tenant/printer scope not tested. No check becomes **OWNER-ACCEPTED** without direct evidence and explicit owner decision.
19
+
20
+| ID | Priority | Current evidence | Acceptance status | Required next proof / owner |
21
+|---|---|---|---|---|
22
+| **F0-01** · Login/affected ISP | Production HTTP 200, historical synthetic Auth probes | **UNVERIFIED real user** / P0 open | Existing authorized login and refresh from affected ISP; browser/time/error screenshot with secrets redacted. QA/Auth. |
23
+| **F0-02** · Real product & person selection | PR #83 merged; keyboard/F2 and synthetic matching in Chromium | **CONTROLLED QA PASS; live tenant UNVERIFIED** / P0 open | Select existing `هارد` or `بلوک` and person in authorized tenant; correct unit/price/company boundary; no cross-tenant leak. UX/Data. |
24
+| **F0-03** · Invoice lifecycle | `scripts/phase0-invoice-persistence.spec.js` passes **2/2** on mock RPC: save→reload→edit→print, retry without duplication; no ledger posting | **CONTROLLED QA PASS; real persistence UNVERIFIED** / P0 open | Only separately approved isolated account/test scope: actual server save/reload/edit/print and reconcile duplicate count; never post fake accounting in production. Commerce/QA. |
25
+| **F0-04** · Print | PR #71 Persian print and controlled browser evidence | **CONTROLLED QA PASS; real printer/invoice UNVERIFIED** / P0 open | Authorized pre-existing saved invoice, formal/non-formal/purchase/taxpayer PDF/print; line totals/dates/pagination and physical-printer differences. Print QA. |
26
+| **F0-05** · Large selectors | `scripts/phase0-selector-stress.spec.js`, **1,208 synthetic products + 1,206 persons** passed 2/2; keyboard/Persian/metadata covered | **CONTROLLED QA PASS for products/persons; real catalog and other high-volume selectors UNVERIFIED** / P1 open | Owner tenant/real workstation test plus assess account/project/contract selectors where applicable; measure interactive latency. UX/Perf. |
27
+| **F0-06** · Modal, keyboard, RTL, themes | Controlled modal/dashboard regression and keyboard/F2, Quality suite green | **CONTROLLED QA PARTIAL; full visual/flow acceptance UNVERIFIED** / P1 open | Owner screenshots, all critical save/delete/import/export and RTL scrolling/dark-light. UI/QA. |
28
+| **F0-07** · Access and release safety | GitHub Security PASS; Supabase 21+3+1 advisor results | **VERIFIED READ-ONLY metadata; dual-user tenant/RLS proof UNVERIFIED** / P0 open | Independent role/tenant negative E2E with authorized second identity, strict no-write safe plan; formal Phase 1 security audit. Security. |
29
+| **F0-08** · Stale PR reconciliation | **9** live open PRs audited against current main; all `diverged` from main | **Read-only preliminary disposition RECORDED; no PR integrated** / P1 open | Review below and safely disposition PRs with owner/context; never merge stale sensitive code automatically. Coordination. |
30
+
31
+### Exit decision
32
+
33
+**PHASE 0 = OPEN.** P0 authenticated gates F0-01/02/03/04/07 have not met acceptance conditions. Passing CI, successful public HTTP and the existence of functional modules are insufficient for final Phase 0 signoff. Retain open items; no false `AUTHENTICATED_E2E_PASSED` or `OWNER_ACCEPTED` labels.
34
+
35
+## 3. Read-only audit of nine historical open PRs (F0-08)
36
+
37
+All nine PR heads **diverge** from current main (observed GitHub compare); therefore do **not** batch-merge or assume their old CI validates current code. Classification is a preliminary disposition, not permission to close or overwrite them.
38
+
39
+| PR | Classification | Evidence / safe next action |
40
+|---|---|---|
41
+| [#6](https://github.com/davoodmehraban89/Factor-easy/pull/6) — accounting recovery | **Sensitive finance — manual audit** | 26 files, 872 additions, 851 main commits behind; journal, reversal and posted history. Reproduce missing behavior in isolated fixtures and compare to current invariant tests; no automatic merge. |
42
+| [#28](https://github.com/davoodmehraban89/Factor-easy/pull/28) — Wave 4b QA docs | **Likely superseded documentation — confirm** | Old PR-only ledger/evidence, 173 behind; current PROJECT_STATE already holds newer acceptance records. Confirm any unique evidence before archive/close. |
43
+| [#39](https://github.com/davoodmehraban89/Factor-easy/pull/39) — scrollbar-side change | **UI issue needs fresh browser evidence** | 164 behind; shares files with #40 and current `js/ui.js`. Compare physical scroll ownership against owner screenshot before selective fix. |
44
+| [#40](https://github.com/davoodmehraban89/Factor-easy/pull/40) — structural scrollports | **UI issue needs fresh browser evidence** | 164 behind; overlapping alternative to #39; do not merge both. Verify actual RTL behavior first. |
45
+| [#43](https://github.com/davoodmehraban89/Factor-easy/pull/43) — execution heartbeat | **Likely superseded documentation — confirm** | 162 behind; current AGENTS.md already defines checkpoint heartbeat. Check distinct wording before archive/close. |
46
+| [#49](https://github.com/davoodmehraban89/Factor-easy/pull/49) — old state reconciliation | **Likely superseded documentation — confirm** | 157 behind; PROJECT_STATE now records October 12 protected-main checks. Historical note may be retained in Git history, not auto-merged. |
47
+| [#57](https://github.com/davoodmehraban89/Factor-easy/pull/57) — dark contrast | **UX regression — fresh visual audit** | 150 behind; old hardening script overlaps recent changes. Check dark mode live screenshots and relevant selectors, port only proven missing fix if needed. |
48
+| [#58](https://github.com/davoodmehraban89/Factor-easy/pull/58) — phone Auth / user mgmt | **High-risk identity + schema drift — manual security audit** | 142 behind, 14 files including Edge and SQL; prod has phone migration but main lacks archive. Never reapply migration, re-enable function or elevate auth on this evidence. |
49
+| [#80](https://github.com/davoodmehraban89/Factor-easy/pull/80) — admin provisioning | **High-risk identity — explicit gate** | 64 behind, 8 files and server auth function. Contract demands JWT/role negative tests and authorized test identity; no account creation or publish without separate approval. |
50
+
51
+**F0-08 preliminary finding:** 3 probable superseded docs (#28/#43/#49); 3 UI candidates needing fresh visual proof (#39/#40/#57); 3 sensitive finance/identity candidates (#6/#58/#80). Do not equate this classification with tested equivalence or final PR closure.
52
+
53
+## 4. First owner-authenticated acceptance script (safe)
54
+
55
+1. In the user's **existing** browser/ISP, sign in normally to `https://factoreasy.ir/`; record **PASS/FAIL**, local clock, browser and whether refresh works. **Do not send passwords, access tokens, cookies or recovery codes.**
56
+2. On the existing company, open sale/purchase invoice and type a known existing product such as `هارد` or `بلوک`; verify suggestions, keyboard Enter, product price/unit, person selection. **Do not save/post** a production test invoice.
57
+3. Choose an already saved document, inspect print preview/PDF, Persian digits, date and totals; share only a redacted observation or screenshot. **No financial modification.**
58
+4. Creating/editing a disposable invoice against real Supabase requires an explicitly isolated authorized test company and signoff to write test records. Testing permission boundaries requires a separately authorized second account and safe test plan. Neither has been implicitly approved.
59
+
60
+## 5. Next independent execution
61
+
62
+- QA: capture owner-context PASS/FAIL for F0-01, then F0-02 and F0-04; investigate reproducible defect before patch.
63
+- Coordination: resolve #39/#40/#57 UI visual differences under F0-06 without unreviewed old merges.
64
+- Security: audit #58/#80 and source/migration drift read-only; no auth/schema/RLS/role changes until separately approved.
65
+- Commerce: prepare F0-03 isolated real-server evidence only after scope and permission are confirmed.
66
+- Phase acceptance requires full evidence and explicit owner approval. **No phase promotion now.**
67
+
68
+**Rollback:** revert this documentation PR; no runtime, customer data, migrations, credentials, roles, accounting entries or production workflow modified.