سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 19:30 UTC
claude-code-plugins-setup
audit-remediation-wave3-4-20261002
audit-remediation-wave3-verify-20261002
audit-remediation-wave4-20261002
audit-remediation-wave4b-20261002
audit-remediation-wave5a-identity-20261002
audit-remediation-wave5b-offboarding-20261002
audit-remediation-wave5c-authorization-20261002
audit-security-intent-review-20261002
audit/finora-financial-core-20261115
audit/finora-master-prompt-phase0-20261016
audit/finora-stage3-legacy-source-readonly-20261023
audit/full-controls-20261030
audit/owner-live-state-reconcile-20261012
audit/owner-review-20261007
audit/phase1-live-permissions-readonly-20261013
audit/reconcile-live-state-20261006
audit/reconcile-state-20261002
audit/wp0-hardening-baseline-20261102
branding-login-favicon-20261002
c8-workflow-task1
c8-workflow-task2
c8-workflow-task3
chore/wave0-pages-gate-closeout
claude-code-plugins-setup
design/finora-c01-authoritative-source-draft-20261124
docs-wave4b-verified-20261002
docs/active-company-invoice-release-evidence-20261014
docs/agent-operating-model-20261114
docs/chart-taxpayer-release-evidence-20261004
docs/cloud-only-agent-orchestration-20261115
docs/confirm-finora-product-charter-20261115
docs/continuation-20261030
docs/d4a-verified
docs/external-work-review-20261121
docs/finora-audit-continuity-20261014
docs/finora-backup-merge-evidence-20261014
docs/finora-ci-reconciliation-20261122
docs/finora-codex-master-prompt
docs/finora-eight-phase-plan-20261011
docs/finora-f002-live-buyer-filter-verified-20261015
docs/finora-license-race-release-evidence-20261014
docs/finora-license-rollout-acceptance-20261015
docs/finora-phase0-repeat-and-pages-nav-verified-20261015
docs/finora-phase0-repeat-evidence-20261015
docs/finora-selectors-release-and-fixture-qa-20261015
docs/finora-stagea-pr240-ci-triage-20261123
docs/finora-test-license-live-pass-20261015
docs/finora-v2-m01-coverage-20261124
docs/handoff-charter-v2-20261124
docs/invoice-product-search-release-20261011
docs/invoice-workspace-release-20261007
docs/phase-status-20261031
docs/phase0-acceptance-release-evidence-20261012
docs/phase0-admin-provision-release-evidence-20261012
docs/phase0-core-bundle-owner-login-open-20261013
docs/phase0-duplicate-js-release-20261016
docs/phase0-f001-auth-rest-shared-timeout-20261013
docs/phase0-f001-owner-login-observed-20261013
docs/phase0-f001-second-device-fail-40s-20261013
docs/phase0-f003-release-verification-20261011
docs/phase0-f004-print-release-evidence-20261012
docs/phase0-f004-watermark-release-evidence-20261012
docs/phase0-f005-large-selector-release-20261012
docs/phase0-f005-release-evidence-20261012
docs/phase0-f006-dark-release-evidence-20261012
docs/phase0-f008-final-pr-closure-evidence-20261012
docs/phase0-f008-reconcile-stale-prs-20261012
docs/phase0-f107-production-evidence-20261012
docs/phase0-kavenegar-otp-preflight-release-20261012
docs/phase0-login-release-evidence-20261012
docs/phase0-login-rest-bootstrap-stage-release-20261012
docs/phase0-owner-app-assets-bundle-release-20261013
docs/phase0-owner-login-csp-release-20261012
docs/phase0-reconcile-postmerge-evidence-20261012
docs/phase0-site-probe-release-evidence-20261012
docs/phase0-startup-release-evidence-20261012
docs/phase3-treasury-release-evidence-20261014
docs/pilot-posted-correction-release-evidence-20261014
docs/pilot-purchase-correction-release-evidence-20261014
docs/print-persian-release-verification-20261011
docs/qa-ci-triage-218-20261122
docs/real-account-qa-20261030
docs/release-state-20261007
docs/seamless-amendment-release-20261014
docs/seamless-document-correction-release-20261014
docs/settings-login-release-20261025
docs/stripe-qa-deployment-evidence-20261011
docs/ux-f2-release-evidence-20261011
docs/ux-f2-release-verification-20261011
docs/wave0-closeout
docs/wave2-closeout
exec-phase1-architecture
exec-phase1-implementation
exec-phase1-qa
exec-phase1-security-release
exec-phase1-ux
feat/accounting-document-draft-approval-20261011
feat/accounting-document-release-candidate-20261011
feat/active-company-strict-isolation-20261014
feat/admin-provisioning-reconciled-20261011
feat/admin-secure-user-provisioning-20261011
feat/admin-user-provisioning-merged-20261011
feat/d4a-request-work-queue
feat/document-lifecycle-atf-20261118
feat/document-lifecycle-temp-permanent-atef
feat/draft-first-attachment-lifecycle-216
feat/finora-offline-encrypted-backup-20261014
feat/finora-phase-a-navigation-20261023
feat/finora-stripe-sandbox-edge-gate
feat/immutable-attachment-temporary-vouchers
feat/iran-accounting-design-audit
feat/journal-document-lifecycle-20261118
feat/journal-rpc-repository-adapter-20261117
feat/office-c7-fulltext-ocr-provenance
feat/password-recovery-admin-reset-20261025
feat/pilot-expense-income-inplace-amendment-20261014
feat/pilot-journal-invoice-correction-20261014
feat/pilot-purchase-correction-20261014
feat/pilot-treasury-unallocated-correction-20261014
feat/retain-document-editor-after-save-20261014
feat/seamless-financial-document-correction-20261014
feat/slice-b-tenant-rbac
feat/stripe-sandbox-invoice-probe
feature/accounting-core-p0
feature/accounting-product-guidance
feature/admin-identity-phone-auth
feature/commercial-rnd
feature/finora-phase1a-supabase-cli-20261016
feature/finora-stage2-manual-canary-20261017
feature/finora-stage3-commercial-payload-20261023
feature/finora-stage3-enforce-invoice-rpc-20261023
feature/finora-stage3-enforce-purchase-red-20261023
feature/invoice-workspace-cleanup
feature/phase0-kavenegar-otp-preflight-20261012
feature/ux-commerce-settings-r2
fix-shell-scroll-live-cache-20261002
fix-shell-scrollbar-explicit-ownership-20261002
fix-shell-scrollbar-ownership-20261002
fix-shell-scrollbar-right-edge-20261002
fix/about-bug-report-20261114
fix/active-company-invoice-scope-20261014
fix/active-company-isolation-reconcile-20261014
fix/admin-central-password-reset-20261028
fix/auth-network-diagnostics
fix/chart-taxpayer-reference-20261003
fix/combobox-enter-reliability
fix/combobox-live-search
fix/combobox-production-cache
fix/combobox-release-asset-v2
fix/company-edit-action-20261028
fix/company-edit-pilot-delete-20261014
fix/company-form-action-state-20261014
fix/company-form-action-state-rebased-20261014
fix/contact-operational-balance-20261111
fix/dark-theme-contrast
fix/financial-lifecycle-recovery-20261124
fix/finora-accounting-test-organization-readiness-20261015
fix/finora-b01-safe-org-switch-20261124
fix/finora-b02-sync-recovery-20261124
fix/finora-b03-conflict-review-20261124
fix/finora-org-license-bootstrap-race-20261014
fix/finora-stage3-posted-source-immutable-20261023
fix/finora-v2-b03-r2-qa-20261124
fix/finora-v2-b03-r3-readonly-20261124
fix/g01-asof-financial-position-20261128
fix/invoice-product-search-rehydrate-20261011
fix/invoice-search-cache-bust
fix/issue229-linked-draft-status-20261122
fix/login-assets-retry-20261014
fix/login-inert-startup-20261110
fix/login-member-access-20261101
fix/login-resilience-20261017
fix/login-short-viewport-20261028
fix/login-startup-readiness-20261024
fix/navigation-utilities-placement-20261105
fix/office-c7-source-ref-binding
fix/office-c7-source-ref-binding-v2
fix/owner-login-network-20261026
fix/password-recovery-invalid-cancel-20261026
fix/payment-amount-format-20261111
fix/phase0-admin-provision-seat-bootstrap-20261012
fix/phase0-auth-bundled-assets-for-unstable-isp-20261013
fix/phase0-auth-handler-binding-stalled-session-20261012
fix/phase0-login-context-stage-visibility-20261012
fix/phase0-login-single-local-bundle-20261013
fix/phase0-login-site-probe-clarity-20261012
fix/phase0-login-ui-ready-20261012
fix/phase0-modal-dashboard-drill-20261011
fix/phase0-pages-blocking-core-bundles-20261013
fix/phase0-print-no-draft-watermark-20261012
fix/phase0-startup-parallel-asset-load-20261012
fix/phase3-behavioral-verification
fix/preserve-pending-edits-20261121
fix/print-persian-digit-consistency-20261011
fix/recovery-login-startup-20261027
fix/report-opening-balance-release-20261130
fix/settings-checkbox-persistence-20261024
fix/taxpayer-arithmetic-20261004
fix/ux-keyboard-search-f2-20261011
fix/wave2-request-input-integrity
hardening/c01-source-draft-20261129
hardening/global-draft-conversion-20261113
hardening/wp1-ledger-integrity-20261102
integration/finora-execution-20261124
integration/issue229-ui-qa-20261122
integration/wp1-ledger-core-20261115
integration/wp2-manual-journal-rpc-20261116
main
ops-heartbeat-v2-20261002
ops-progress-heartbeat-rule-20261002
ops/wave4-production-20261003
plan/financial-core-phase1-approval-20261016
qa/attachment-allocator-two-session-20261122
qa/draft-first-save-red-evidence-20261122
qa/finora-autopost-retry-identity-red-20261122
qa/finora-identity-rpc-security-tripwire-20261122
qa/finora-issue223-manual-kardex-browser-red-20261123
qa/finora-issue223-stock-real-jwt-20261123
qa/finora-issue238-inventory-count-browser-red-20261123
qa/finora-issue238-save-browser-red-20261122
qa/finora-login-cors-header-preflight-20261025
qa/finora-phase0-saved-session-repeat-20261015
qa/finora-phase5-posted-insert-jwt-red-20261123
qa/finora-stage3-ui-jwt-autopost-20261023
qa/finora-v2-g01-report-reconciliation-20261125
qa/free-supabase-local-wp2-20261116
qa/issue229-approval-boundary-jwt-20261122
qa/issue229-sale-save-linked-draft-red-20261122
qa/phase0-acceptance-start-20261012
qa/phase0-f005-account-project-contract-stress-20261012
qa/phase0-f005-selector-stress-20261012
qa/phase0-f006-dark-contrast-20261012
qa/post-wave4-verification-20261003
qa/posted-source-immutable-jwt-20261122
qa/pr219-wp1-disposable-dburl-proof-20261123
qa/purchase-source-jwt-20261122
qa/real-settings-acceptance-20261025
qa/recovery-mail-acceptance-20261026
qa/source-autopost-jwt-atomicity-20261122
qa/wave0-negative-gate-proof
qa/wp2-auth-tenant-e2e-20261117
qa/wp2-authorized-journal-write-20261122
qa/wp2-financial-paths-reconciliation-20261122
qa/wp3-financial-tenant-isolation-20261117
remediation/wave0-liveqa-wave1
remediation/wave2-request-integrity
staging/finora-stage22-free-20261022
state-scroll-verified-20261002
state-wave4b-production-20261002
state-wave5a-production-20261002
test/finora-accounting-boot-readiness-20261015
test/finora-f0-02-production-selectors-20261015
test/finora-pages-commerce-event-wiring-20261015
test/finora-pages-invoice-selectors-readonly-20261015
test/finora-stage3-jwt-source-post-20261023
test/phase0-invoice-fixture-bootstrap-20261016
test/phase0-invoice-persistence-20261011
test/phase0-pages-delayed-dispatcher-20261016
ux-scroll-ownership-20261002
work/finora-stage3-enforce-purchase-green-20261023
work/finora-stage3-enforce-sale-green-20261023
work/finora-stage3-payload-green-20261023
| 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. Separate read-only HTTP GETs returned **200** for `js/login-connectivity.js`, `js/ux-hardening-r2.js` and `js/print.js` on the same device. This checks asset reachability only; it does **not** verify cache-version identity, authenticated operations or actual print output. |
| 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 | 2026-10-13 owner result: first Chrome computer sign-in **PASS ~20s** after hard refresh; second computer **FAIL ~40s**. Follow-up photo of the **credential-free built-in connectivity diagnostic** shows **`SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT`**. Source `js/login-connectivity.js`: two same-origin files reachable; Auth/REST cross-origin probes did not finish before a **shared 12s AbortController** timeout. No login-time `BOOT_*` code supplied; second-network ISP and actual password API response not proved. Protected main `167fbcb1...`, Quality `38348991795`, Security `38348991712`, Release `38349249193`, Pages `38349291823` SUCCESS; Supabase project `ACTIVE_HEALTHY`, 82 migrations. | **CROSS-DEVICE INCONSISTENT; CROSS-ORIGIN NETWORK PATH SUSPECTED, ROOT CAUSE NOT PROVEN; P0 OWNER ACCEPTANCE OPEN** | On second device keep browser/computer fixed; switch only to mobile hotspot and repeat **credential-free** built-in check, share four codes and optionally login yes/no + seconds. Avoid credentials/HAR. Compare same device / two networks before code changes. Keep Issue #106 and Phase 0 OPEN. | |
| 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 | Owner hardcopy/photo reproduced pale diagonal `پیشنویس — غیرقطعی` overlay on existing goods/services invoice; narrowly removed in PR #90; draft and pro-forma Chromium checks added, accounting state unchanged | **FIX RELEASED + CONTROLLED QA PASS; OWNER REPRINT UNVERIFIED** / P0 open | On the deployed PR #90 code, owner still checks a saved draft/ordinary sale invoice and purchase/pro-forma print: watermark absent, all rows/totals/dates visible; real printer/PDF and taxpayer-specific semantics are separate. Print QA. | |
| 26 | | **F0-05** · Large selectors | Synthetic product **1,208** and people **1,206** Chromium tests previously PASS. [PR #98](https://github.com/davoodmehraban89/Factor-easy/pull/98) additionally validates **1,206** tenant-scoped synthetic options for each of account rule, invoice project and generic contract selects: code/metadata/Persian label, keyboard Enter/End/Escape, no-match, no foreign-tenant fixture entries and **zero writes/postings**. PR head Quality `38225392045` **87/87 Chromium PASS** plus three disposable DB and accounting invariants, Security `38225392014` SUCCESS. CI measured filter time **108.5 ms account / 107.6 ms project / 113.4 ms contract** with 5000ms safety ceiling, **not an SLA**. | **CONTROLLED QA PASS for five 1200+ selector types; owner-large-tenant and journal-specific selector UNVERIFIED** / P1 owner gate open | Owner checks real company catalog, multiple projects/contracts/accounts and scroll/performance on own workstation; independent accounting journal `.je-account` handling is not covered by generic combo test and requires separate journey. No real RLS isolation proven. UX/Perf. | |
| 27 | | **F0-06** · Modal, keyboard, RTL, themes | Targeted dark contrast PR **#92** released to protected main `745bdc847a3c2db22048d1d545da0fad0ae5cc67`; exact SHA Quality **38218505600** (**85/85 Chromium**, including two dark/light contrast tests, 3 disposable DB), Security **38218505535**, Release **38218679192**, Pages **38218725537** all SUCCESS. Remote read-only HTTP confirms updated live JS theme bundle. | **DARK/LIGHT CONTRAST RELEASED + CONTROLLED QA PASS; broader UI and owner visual acceptance UNVERIFIED** / P1 open | Owner dark/light screen review in authenticated session, keyboard/modal/RTL scroll ownership and critical save/delete/import/export negative-path tests. UI/QA. | |
| 28 | | **F0-07** · Access and release safety | Security checks remain green. **Owner-reported central admin user creation HTTP 400** traced to real Auth HTTP 500 `organization license not found` (23503): live signup trigger inserted owner membership before required trial license. Controlled fix **PR #94** deployed: protected `main` `e664e8fdbc77b660dfc1fedff580b206279899f3`, Quality **38220163720** (**86/86 Chromium**, 3 disposable DB), Security **38220163569**, Release **38220396895**, Pages **38220451051** all SUCCESS. Supabase `fix_identity_bootstrap_license_before_membership` migration **20261012075507** applied successfully (total 82); independent read-only verification confirmed `profiles → organizations → licenses → membership`, original seat trigger retained, ordinary role and email/phone support preserved. Live admin JS version `20261012-provision-error-v1` reachable. | **ADMIN PROVISIONING ROOT-CAUSE FIX RELEASED + CONTROLLED QA PASS; actual owner retry and dual-user isolation E2E UNVERIFIED** / P0 still open | Owner rechecks central Users list (avoid duplicate account), refreshes and attempts authorized creation once without sharing credentials; verify created account has ordinary role and expected trial, then license assignment separately. Formal RLS/cross-tenant two-account negative E2E, Auth-advisor security audit and full F0-07 signoff remain pending. Security/QA. | |
| 29 | | **F0-08** · Stale PR reconciliation | Audit in `docs/FINORA_PHASE0_F008_PR_RECONCILIATION_2026-10-12.md`; #96 merged to main `2a4d637d0145f333412fbce0e299ab6962f0b262`, PR-head Quality **38223670528** (**86/86 Chromium**, 3 disposable DB and Golden accounting) and Security **38223670565** successful. Recorded live Supabase Wave4b migration and corrected prior stale statement. **Five superseded PRs #28/#43/#49/#57/#80 closed without merge with review comments; GitHub verifies four remaining open: #6/#39/#40/#58.** | **F0-08 RECONCILED / CLOSURE VERIFIED; four high-risk PRs retained for separate specialty review** | No stale PR integrated; investigate #6 accounting, #39/#40 physical RTL scroll and #58 identity/phone migration source drift under their separate safeguards. Phase 0 P0 authenticated acceptance still pending. Coordination/QA. | |
| 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. |
| 69 | |
| 70 | |
| 71 | ## 2026-10-12 F0-04 owner's photographed watermark defect — controlled fix evidence |
| 72 | |
| 73 | - Photograph provided by owner shows pale, diagonal `پیشنویس — غیرقطعی` rectangle over the title of an existing ordinary sales/goods-services invoice. This is **user-visible reproduction evidence**, not synthetic data. Source root: `renderAndPrintDirect` appended `draftMark` to `containerHtml` in `js/print.js` whenever `invoiceDocumentStatus(inv)==='draft'`. |
| 74 | - **Merged PR #90:** shared ordinary invoice builder now prints complete `containerHtml` directly, with a new cache version in `index.html`. Independent purchase popup already had no draft watermark. The code does **not** alter `invoiceDocumentStatus`, journal posting/finalization, stored documents, tax-authority electronic print restrictions, money/date display, print pagination or signatures. |
| 75 | - **Verified on PR head before acceptance note:** GitHub Quality `38212287209` SUCCESS, including 83/83 real Chromium (54.8s), three disposable DB jobs and Golden accounting; Security `38212287223` SUCCESS (CodeQL and release safety). Browser regression tests cover a formal accounting draft and a pro-forma invoice: complete printed totals/number, watermark absent from both preview and isolated iframe, formal draft remains unposted. The financial static guard in `scripts/posting-idempotency-check.mjs` now rejects accidental reintroduction of the watermark while retaining posted/draft constraints. |
| 76 | - **Acceptance boundary:** This is a controlled correction, **not** proof that the owner's physical printer or saved live document is now correct. Do not close F0-04 or Phase 0 until owner-authenticated preview/real print check. Other F0-01/02/03/06/07/08 checks are not automatically satisfied. |
| 77 | |
| 78 | - **Exact protected-main promotion:** PR #90 (validated head `72a69b372ef59ffbb7dddebf81d64304b3559b04`) merged to `main` as **`8a0023c53f0c14b0063ab771fdb3669a05997387`**. Same-SHA [Quality 38212519911](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212519911), [Security 38212519908](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212519908), [Release gate 38212644579](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212644579) and [Deploy gated Pages 38212680498](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212680498) **all SUCCESS**. Canceled/skipped duplicate workflow runs were not counted. |
| 79 | - **Real-domain read-only proof:** From authorized remote Windows device, HTTP reads of `https://factoreasy.ir/?cleanPrint=20261012` and `https://factoreasy.ir/js/print.js?v=20261012-clean-invoice-print-v1` confirmed the live HTML references new print bundle (`True`), the bundle includes `stageInvoicePrint(containerHtml,spec)` (`True`), and the old `draftMark` string is absent (`False`). This verifies published code/asset, **not** physical hardcopy success. |
| 80 | |
| 81 | ## 2026-10-13 addendum — owner-browser first successful login |
| 82 | |
| 83 | - The owner reports a successful sign-in to the main Finora workspace on the affected Windows Chrome after `Ctrl+Shift+R`; approximate total wait **20 seconds**. This replaces the older 'never successfully signed in' state for **one owner-observed attempt only**, not F0-01 full acceptance. It does not validate second-login stability, ordinary reload, browser restart, or a performance target. |
| 84 | - Same-SHA gated deploy and production backend health rechecked as above; no product/DB/auth/finance modifications. Issue #106 remains OPEN for one repeat login/reload and measured responsiveness. Other Phase 0 user-context gates are independent and remain OPEN. |
| 85 | |
| 86 | ## 2026-10-13 addendum — second-computer failure after initial successful sign-in |
| 87 | |
| 88 | - Owner reports **one failed real login on a second computer** after approximately **40 seconds** and supplied a screenshot. The exact screenshot code is not independently verified, and the new computer's browser and ISP are unknown. Do not describe it as a proven `BOOT_APP_ASSETS` recurrence without identifying evidence. |
| 89 | - Paired outcomes: first device Chrome hard-refresh sign-in **success (~20s)**; second device **failure (~40s)**. Update F0-01 to **CROSS_DEVICE_INCONSISTENT / OPEN**. Neither a fast/stable owner deployment nor Phase 0 acceptance is established. Existing code/build deployment CI and live Supabase healthy status do not diagnose the owner's browser error. |
| 90 | - Next no-write owner-side evidence: exact nonprivate error code plus built-in connectivity `SITE_JS | MANIFEST | AUTH | REST` statuses (12s bounded, unauthenticated probes only). Do not collect credentials, PII, session cookies, token headers, full HAR or tenant/customer data. No product or production mutations made in this evidence-only PR. |
| 91 | |
| 92 | ## 2026-10-13 addendum — second-computer network diagnostic codes transcribed |
| 93 | |
| 94 | - Owner photo shows **`SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT`** from «بررسی اتصال به سرور ورود». This updates the immediately preceding second-device addendum that said the diagnostic code was not verified. No `BOOT_*` code is shown in this photograph. The new owner test is credential-free, not successful/unsuccessful account Auth verification. |
| 95 | - `js/login-connectivity.js` applies a **shared 12s abort deadline** to four parallel checks; two Supabase timeouts mean the cross-origin health/root requests had no successful response in that window. The site JS and manifest both responded. Treat this as a **network-path hypothesis**, not proof of credentials defect or production Supabase outage. |
| 96 | - Next isolated comparison: same second computer and Chrome, different Internet path (phone hotspot); repeat only built-in connectivity code check. Owner acceptance F0-01 and Phase 0 remain OPEN. No application code, Auth/RLS/schema/financial/customer data changed. |