@davoodmehraban89 / Factor-easy-2 Mirror · read-only
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 23:15 UTC

fix/phase0-auth-handler-binding-stalled-session-20261012
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
md 457 lines 152 KB
Rendered Raw
1 # PROJECT STATE — FINORA / FACTOR-EASY
2
3 > **MANDATORY CONTINUITY FILE — READ THIS FIRST**
4 >
5 > Repository: `davoodmehraban89/Factor-easy` · Canonical branch: `main` · Product: **Finora 1.0**
6
7 Read `AGENTS.md` first, then this file. Latest user chat is the only source of new instructions; repo files are continuity/context. Detailed older history remains available in Git history and the verification documents listed below.
8
9 ## Protocol / authority
10 Verify live GitHub + Supabase before acting; implement/test/fix/retest/commit/verify in bounded vertical slices; archive exact production SQL; never call unrun work verified. The owner has repeatedly directed autonomous roadmap execution without routine confirmation pauses and has authorized normal in-scope GitHub/Supabase work. Keep five specialist workstreams under one coordinator: Architecture & Requirements, Implementation, UX/UI, QA & Verification, Security & Release. Use real subagents only when the environment provides them; otherwise execute those responsibilities directly without claiming parallel agents.
11
12 This is high-assurance accounting/ERP software. Posted financial history, tenant isolation, migration safety, traceability, reconciliation and rollback are mandatory. Do not create billable resources; development/verification must stay on zero-cost/free-tier paths. Destructive financial-history changes, unapproved external costs, public/external messaging and sensitive access changes remain safety boundaries.
13
14 ## Current session authority — 2026-10-02
15 The latest user message is the sole source of new instructions. Read AGENTS.md then PROJECT_STATE.md in full; verify live main/head/recent commits/CI and Supabase migrations/RLS before implementation; reconcile discrepancies first. Record each request before implementation and update this file in the same commit as every durable change. Work in verified vertical slices. CI success alone is not completion: real-DOM smoke and accounting-invariant tests must pass; unrun checks are NOT VERIFIED. Every Supabase migration must be archived under supabase/migrations/. Ask the owner before schema/RLS/auth/role changes or destructive data operations; older standing approvals below do not override this requirement. Final reports: Persian, approximately 15 lines maximum, evidence SHAs/run IDs, unverified work and next step. This request authorizes verification and reconciliation; older backlog entries are context, not new implementation instructions.
16
17 ## 2026-10-12 owner live-repository/Supabase operating request — VERIFIED READ-ONLY RECONCILIATION / PHASE 0 OPEN
18 - **Latest chat instruction (sole new authority):** open `davoodmehraban89/Factor-easy` on `main`; read `AGENTS.md` then all of `PROJECT_STATE.md`; verify head, recent commits, CI, live Supabase migrations and RLS before implementation; correct state discrepancies first, record request before functional changes and maintain same-commit continuity for each durable change; require actual real-DOM and accounting-invariant evidence before any COMPLETED claim; list unexecuted gates as NOT VERIFIED. Every future Supabase migration must be archived under `supabase/migrations/`. **Prior approval does not waive explicit owner confirmation for any schema/RLS/Auth/role or destructive-data change.** No separate product feature was requested in this chat; scope is bounded read-only reconciliation and this documentation-only change.
19 - **GitHub readback:** authenticated repository metadata confirms default branch `main` (push access), with latest returned commit `cc1c2cfddcff3a1f27302c027b9467fafa8b29f8` (documentation-only `PROJECT_STATE.md` change); preceding runtime merge `a67c07a717bffc2a8ee90c7e3cc9db55c2d05881` (startup optimization), before that `61cbcf3113c598022d6877e447bf8c97b4788a19`. Do not confuse the current documentation HEAD with the previous deployed runtime SHA.
20 - **Independently fetched previous exact-runtime-SHA GitHub jobs:** Quality run `38230349289` (static job `114748008377`, database jobs `114748008669`, `114748008801`, `114748008884`) all SUCCESS; job log explicitly records **89/89 Chromium Playwright**, Golden sale/receipt/purchase/payment/expense/reversal/trial balance/financial statements, phases 2–6, financial draft/posted safety, and accounting P0 PASS. Security run `38230349290` CodeQL `114748007614` and release safety `114748008097` SUCCESS; dependency review `114748009940` SKIPPED, not passed. Exact-SHA release gate `38230688599` and Pages `38230726054` jobs SUCCESS. **Current documentation-only HEAD `cc1c2cf...` individual Actions/check-run result was not obtainable from the available commit-check endpoint (empty statuses and PR-only run lookup): NOT VERIFIED; earlier a67 runs do not certify cc1.**
21 - **Independently read live Supabase `hcsixhqbyuhpshfwqpjx`:** `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, **82 recorded migrations**, latest `20261012075507 fix_identity_bootstrap_license_before_membership`; `20261007165208 phone_identity_profile`, `20261011174445 posted_source_idempotency_index`, and Wave 4/4b are present. Live records are not proof of exact SQL text parity with repository migration archives. The historical missing phone-identity archive/PR #58 issue remains unresolved; sampled `supabase/migrations/20261007165208_phone_identity_profile.sql` is 404 on `main`, while current bootstrap correction `supabase/migrations/20261012080000_fix_identity_bootstrap_license_before_membership.sql` exists. **Complete 82-to-repo migration SQL parity: NOT VERIFIED**; do not invent/reapply or replace historical migration SQL.
22 - **Direct PostgreSQL permission audit, read-only:** **18/18 `public` tables have RLS enabled**. In `private`, **3/10 RLS enabled**, **7/10 disabled**. Despite generic Supabase RLS-warning wording alleging client exposure, actual `has_table_privilege` checks show **zero direct SELECT/INSERT/UPDATE/DELETE grants for both `anon` and `authenticated` on all ten private tables**; anon also lacks private-schema USAGE. Treat seven disabled-RLS tables as a recorded defense-in-depth/security review item **not verified as publicly accessible**, not a reason to enable RLS or modify grants without approval. This does **not** prove every SECURITY DEFINER RPC authorization path safe. Security Advisor: three private RLS-no-policy INFO, 21 authenticated-callable SECURITY DEFINER WARN and one leaked-password-protection-disabled WARN; performance advisor identified two unindexed private scheduler FKs (review only). Public RLS predicate adversarial tests, authenticated production two-user isolation, and end-user browser tests remain NOT VERIFIED.
23 - **Reconciliation outcome:** updated the dated 2026-10-02 continuity snapshot with verified October 12 evidence while preserving historical entries, and distinguished current doc HEAD from released runtime. **Phase 0 remains OPEN, not owner accepted.** No product feature, finance data, accounts, Auth/RLS/role/schema, Supabase migration or deployment changed in this slice. Documentation branch only, rollback by reverting this entry. **Next safe step:** review/merge this documentation-only PR after exact-PR-head Quality/Security evidence; separately audit PR #58 archive parity read-only and obtain owner-session F0 acceptance evidence without credentials or financial writes.
24
25 ### 2026-10-12 live-state reconciliation — PR #102 merged, source and tests read back
26 - The immediately preceding entry's `documentation branch only / pending merge` was the pre-merge checkpoint. Documentation-only PR [#102](https://github.com/davoodmehraban89/Factor-easy/pull/102), head `a053d2e3627105566c09d82475ff916fcd5e804e`, has now **MERGED** to protected `main` as `4be48f74a4add63d3f1dc8791ade6ce7c1e4c651`. Independent GitHub commit inspection confirms **only `PROJECT_STATE.md` changed**; main-branch content and new live-Supabase reconciliation entry read back intact.
27 - **Exact PR-head verification:** Quality `38263379525` SUCCESS, static job `114859322898` logs **89/89 actual Chromium DOM PASS**, Accounting P0, double-entry, Golden and posted-history invariant PASS; disposable DB jobs `114859322415`, `114859323040`, `114859323233` SUCCESS. Security `38263379761` SUCCESS, CodeQL job `114859321621` and release safety job `114859321310` SUCCESS; Dependency Review `114859324783` SKIPPED. The post-merge main exact-SHA workflows for `4be48f74...` remain **NOT VERIFIED**, as do any owner-authenticated production F0-01/F0-02/F0-03/F0-04/F0-07, complete migration SQL parity and true adversarial RLS checks; these must not be inferred from CI or documented as COMPLETED.
28 - **Outcome and rollback:** state reconciliation recorded and merged, **PHASE 0 STILL OPEN**; no application runtime, production ledger, Supabase schema/RLS/Auth/roles/migrations, or destructive data changed. Documentation-only rollback is a targeted revert; next independent safe task is read-only PR #58 archive-parity assessment, then owner-authorized browser acceptance against legitimate existing data with no confidential credentials in chat.
29
30 ## 2026-10-12 Phase 0 owner escalation — login screen looks ready but ignores interaction (PLANNED / NOT FIXED)
31 - **User symptom and P0 priority:** the email/password form becomes visible while login resources/session initialization are still loading; entering credentials and clicking login can appear to do nothing, sometimes never reaching the application. This is distinct from the previously shipped 14-extension download optimization PR #100 and must not be declared resolved by its CI.
32 - **Baseline:** protected main `3445a87592341512dea56745e291c10e5225d8b4`; no Auth/DB/account changes authorized. Source investigation found 40+ synchronous parser-blocking local JS tags, auth init delayed until the 14 extension scripts settle, and `handleLogin()` silently returns when `authBusy` while `enterApp()` awaits full account-record download with no visible per-step status.
33 - **Narrow intended correction:** preserve ordered script dependencies while fetching parser-blocking app JS in parallel; initialize the login form before non-auth extensions finish; keep authenticated app transition gated on complete scripts and tenant-scoped data loading; make login-in-progress/busy/error state visible rather than leaving an apparently inert form. Add Chromium network-throttled before/after regression and preserve all accounting/Golden/Security/DB gates. No mutation of real accounts, RLS, schema, roles, financial data or Auth server settings.
34 - **Acceptance:** fresh login form becomes actionable before intentionally delayed optional app module, mocked/unauthenticated negative tests show no credential disclosure or duplicate sign-in, restored session never renders partial app, app status never silently ignores a second click. Gate release on same-SHA Quality/Security/Release/Deploy; owner affected-network authenticated acceptance remains separately OPEN. Rollback: revert single scoped PR and gated redeploy.
35
36 ### 2026-10-12 Phase 0 login interactivity repair — PR #104 CONTROLLED QA PASS / MERGE PENDING
37 - **Verified baseline and root cause:** pre-fix email/password controls painted before the application finished downloading numerous parser-blocking scripts. Core login initialization also previously waited for all 14 extension scripts to settle. Once clicked, `authBusy` silently ignored repeat clicks while authenticated `enterApp()` awaited account + `pullAll()` with no inline stage status. This matches a plausible mechanism for the owner's reported unresponsive/spinning login; **affected ISP production session not reproduced**.
38 - **Patch in [PR #104](https://github.com/davoodmehraban89/Factor-easy/pull/104):** priority preload of versioned `js/core.js` and `js/login-connectivity.js` in HTML; explicit disabled-until-handler-ready auth controls; immediate `initAuthSystem()` after core runs and the auth DOM exists, without waiting for 14 optional ordered extension requests. Restored and newly authenticated sessions wait `FinoraAppAssetsReady` before tenant-scoped hydration; the original 41 classic ERP script execution order remains unchanged (trial `defer` was rolled back after browser regressions). Login now reports ready / authenticating / waiting for modules / loading company records / slow network / error, and duplicate clicks never trigger duplicate Auth calls. Auth HTTP requests have a bounded 12s abort using the Supabase client fetch adapter; record/ledger writes and reads are unchanged.
39 - **Actual Chromium regressions added:** optional extension held 3.5 seconds while password form was enabled at **379ms** in one controlled runner sample; mocked incomplete hydration retains progress and suppresses duplicate sign-in; synthetic hung Auth transport aborts without modifying records endpoint behavior; optional CDN outage and ordered extensions still covered. Synthetic times are **not** owner workstation benchmarks.
40 - **Exact tested feature-head SHA `872d26e144aab81dc6c04a5eae536f02e15ec1b3`:** [Quality `38277314941`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277314941) SUCCESS; static quality job **92/92 actual Chromium Playwright PASS (53.7s)**, 55 JS / 52 MJS syntax PASS, Golden accounting + immutable posted-history PASS; disposable PostgreSQL C8/D1/identity jobs all SUCCESS. [Security `38277315134`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277315134) SUCCESS. Earlier full-defer attempt failed regression (16/92), rolled back; next failure 91/92 arose from duplicate role=status and was corrected without weakening the test. **This documentation follow-up commit has not yet received same-head CI.**
41 - **Acceptance boundaries:** coded fix and controlled QA verified; protected-main merge, exact-SHA Release/Deploy and live domain readback are **PENDING**. Owner-authenticated sign-in on affected ISP, latency after tenant `pullAll()`, real user/password and device-specific stability remain **NOT VERIFIED / F0-01 OPEN**. Phase 0 remains OPEN. No accounts, Auth server config, schema, RLS, permissions, production data or financial history modified. Rollback: revert #104 and gated Pages redeploy.
42
43 ### 2026-10-12 Owner-critical login responsiveness #104 — RELEASED / CONTROLLED QA PASS / REAL OWNER ISP OPEN
44 - [PR #104](https://github.com/davoodmehraban89/Factor-easy/pull/104) reviewed and squash-merged to protected `main` as exact runtime SHA **`8217f7ebb3cb66f4be471cadd62e70a9991524cf`**. The earlier PR checkpoint above is historical, not an outstanding merge.
45 - **Final PR tested head `b8e2529bdbda00a1c2825e892854f0aa5977eb75`:** Quality [`38277769229`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277769229) SUCCESS, actual Chromium **92/92 PASS**, three disposable Postgres jobs PASS, Golden accounting, syntax and posting safety PASS; Security [`38277769217`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38277769217) SUCCESS.
46 - **Exact protected-main runtime verification:** Quality [`38278039076`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38278039076) SUCCESS, Security [`38278039045`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38278039045) SUCCESS, Release Gate [`38278232706`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38278232706) SUCCESS, and gated Pages Deploy [`38278322395`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38278322395) SUCCESS. Duplicate Release `38278217834` CANCELLED / earlier Pages `38278301298` SKIPPED are not counted as success.
47 - **Live deployed asset readback on authorized remote Windows device:** unauthenticated read-only GET of `https://factoreasy.ir/?phase0_login_release=20261012` returned HTML containing `js/core.js?v=20261012-login-ready-v2`, `js/bootstrap.js?v=20261012-login-ready-v2`, and `auth-login-status`. Independent GET of live versioned `js/core.js` contained `finoraBoundedAuthFetch` and `FinoraAppAssetsReady` strings. No password, local cookie, login session, customer records or financial writes accessed.
48 - **Acceptance:** FIX_RELEASED + CI_CONTROLLED_QA_PASSED. Owner's affected ISP/device real sign-in/response timing, two-user RLS, full post-login `pullAll()` latency, live company/accounting and physical printer are **NOT VERIFIED**. F0-01 and Phase 0 remain **OPEN**. No Auth server/RLS/role/schema or stored finance data mutated. Next safest step is authenticated owner-device F0-01 test (without sharing any credential) and targeted read-only timings for login to workspace; only if latency persists consider a separately tested data-hydration change. Rollback: revert merged #104 and gated redeploy, no DB rollback.
49
50 ### 2026-10-12 P0 owner photo: inert login connectivity button / lingering session hydration (OPEN FIX)
51 - **User evidence:** Owner's photographed latest production login shows `در حال آماده‌سازی محیط کار...` although no fresh credentials are visible, and clicking `بررسی اتصال به سرور ورود` reportedly has no visible response. This is **owner-reported real UI failure**, not evidence of an actual failed Auth HTTP request. Related [issue #106](https://github.com/davoodmehraban89/Factor-easy/issues/106).
52 - **Confirmed source-level root cause for inert buttons under production CSP:** the Pages builder externalizes static `onclick` handlers into `js/generated-event-handlers.js` and appends that script only at the bottom of the HTML **after dozens of parser-blocking ERP scripts**, whereas `js/core.js` enables all login buttons and declares them ready early. Thus the user can click apparently enabled controls before their production event listeners are installed. Local (unbuilt) Chromium tests retain raw inline handlers, so existing coverage did not detect the gap.
53 - **Separate suspected hang:** restored Supabase session calls `enterApp()` before a manual login and awaits `FinoraAppAssetsReady`, profile and sequential `pullAll()` without a bounded read timeout. The screenshot matches a pending restore but does not identify the precise stalled request.
54 - **Implementation authority and safety:** change only Pages event-binding ordering and bounded READ-ONLY hydration with visible retry/error; ensure diagnostic handler is loaded before buttons enable; add realistic built Pages Chromium test with artificially stalled unrelated JS and a synthetic restored-session read. Preserve the legacy ERP script execution order and tenant-safe, atomic datastore replacement; no modification to Supabase Auth/RLS/roles/schema, stored financial records or real customer users.
55 - **Acceptance:** demonstrate diagnostic click starts changing UI before intentionally delayed ERP script completes in built CSP artifact; synthetic stuck read must time out and return operable login without prematurely entering app; complete Golden/92+ Chromium/3 DB/Security checks and gated release; actual affected owner ISP acceptance still OPEN. Rollback narrow PR; no DB rollback.
56
57 ## Current change ledger
58 | 2026-10-07 | Owner requested accounting/product usability refinement from live screenshots: automatic non-user-entered floating-detail codes, contextual in-product guides (especially accounting/chart/dimensions), remove duplicate product internal tax ID and use product code as internal item ID, strengthen in-control product/person search, introduce hierarchical product group/subgroup coding with deterministic 6-digit product codes, and keep sale/purchase commercial-document workspace layout stable while only semantic fields change. | **IMPLEMENTED / LOCAL VERIFICATION PASSED / CI PENDING** | Baseline main = `7e58c75f7d754f378d94ca3f356c1ae580aa7ee3`. Automatic dimension type/value codes, contextual guides, product-code-as-internal-ID, normalized multi-token search, and additive six-digit product coding implemented. Existing historical codes preserved. Commercial sale/purchase workspaces now share a stable `صدور سند تجاری` header/actions layout; duplicate purchase sidebar injection removed; the public selector is the single document-type selector and the legacy internal invoice-kind control is hidden. Local syntax/static/commerce/UX/accounting phases 2–6/Golden checks passed; protected-branch CI remains pending. |
59
60 | Date | Request / decision | Status | Evidence / next action |
61 | 2026-10-11 | Owner supplied live invoice screenshots: contact/seller combobox correctly shows choices, but invoice product/service combobox shows no known products and typed `ها` does not find existing `هارد`. Requested remote-desktop verified repair and screenshot with `بلوک`/`سیمان` suggestions. | **MERGED / GATED PAGES DEPLOYED / REMOTE DOM VERIFIED / OWNER-AUTHENTICATED SESSION PENDING** | Baseline `b1a35fdc1df71c46c287bec47be54fa6e8641428`. Scope `js/ux-hardening-r2.js`, `index.html` cache version, regression browser tests; investigate stale initial invoice row product options created before Supabase sync, preserve selected invoice product/quantity/price/history, ensure complete suggestions and Persian normalization. Negative tests for absent data, no cross-tenant exposure, selection and price/unit update; remote Playwright screenshot; gated CI. No Supabase schema/auth/RLS/roles, no financial data edits. Rollback: revert product-search PR. |
62 |---|---|---|---|
63 | 2026-10-07 | Owner requested an audit of all changes since the last shared verified baseline, assessment of the supplied accounting/product/search/invoice-layout issues, and a remediation plan before implementation. Owner offered a remote PC if useful; use the current environment for repository/database review because no direct remote-desktop control is exposed. | **AUDIT IN PROGRESS / NO PRODUCT OR DATABASE MUTATION** | Pinned main `7e58c75f7d754f378d94ca3f356c1ae580aa7ee3`, seven commits after `dfaa4d65918ea3bca14be2c4737af734c9328083`. Quality `37646679015` static job `112879152160` logs show 60/60 controlled real-DOM tests and accounting/Golden PASS; Security `37646679026`, Release `37646878995`, exact-SHA Pages `37646973160` succeeded. Live Supabase: 80 migrations, newest `20261007165208 phone_identity_profile`; public RLS 18/18, private RLS 3/10 with zero anon/authenticated CRUD on all ten private tables. Production identity SQL is archived on open PR #58, absent from main; do not reapply it. PR #59 contains unmerged accounting/product/guidance work and must be reviewed separately from deployed behavior. Audit findings and test boundaries follow in the audit report; no old unfinished arithmetic patch is being published. |
64 | 2026-10-07 | Owner supplied live screenshots and requested immediate invoice-workspace cleanup: remove redundant top workflow buttons (sale/purchase/pre-invoice) and redundant sale/purchase shortcut buttons beside the document heading; keep Excel import + sample download; keep only the commercial-document type selector with sale, purchase, sales pre-invoice, sales progress statement; replace the separate search-above-select UX with a single in-control searchable product selector that matches product code/name/specification and numeric fragments. | **COMPLETED / MERGED / RELEASE VERIFIED** | Merged to `main` as `6e7fa6e861ebdd89e5712ed7d64bb5fe3128f307`. PR #54 Quality `37644940991` and Security `37644940960` SUCCESS; inspected static logs confirm commercial + UX-R2 + Golden PASS and **60/60 Real-DOM tests**. Main Quality `37645195629`, Security `37645195698`, Release gate `37645411897`, exact gated Pages `37645464262` all SUCCESS. Live `factoreasy.ir` no longer contains the sale/purchase heading shortcuts; live UX bundle contains `finora-combobox-input` and no `finora-select-search`. Four-value document selector and Excel import/sample controls retained. No schema/RLS/auth/role/data mutation. |
65 | 2026-10-07 | Owner requested the next integrated UX/commerce/settings hardening slice: reuse global projects from counterparty screens instead of per-contact duplicate project records; searchable large selectors across product/contact/project/account lists; refresh sale/purchase default prices after master-data edits and latest transactions; purchase-invoice UI parity with sales while preserving purchase semantics; modal/close/Escape/Enter/button real behavior QA; active-company factory reset for authorized company admin with multi-step destructive warnings; richer settings (hotkeys, quick-zero shortcuts, light/dark/auto theme, data statistics, backup/restore); configurable Excel sample/import/export field selection; and consistent Persian-digit rendering in invoice UI/print. | **MERGED / CONTROLLED DOM + ACCOUNTING VERIFIED** | Baseline `main` = `b88f0f35902cc99ebd09c9fffcd5700ce759ac69`. Implemented global project reuse/attach from counterparties, large-list search, product price-default refresh from latest posted sale/purchase, purchase project/accounting separation and commerce-switch parity, Escape/modal + configurable Ctrl+S, Ctrl+Enter, Enter-save and quick-zero hotkeys, light/dark/auto theme, active-company stats, configurable Excel templates/exports, authorized-manager active-company factory reset that skips ambiguous multi-company legacy rows, and Persian-digit normalization in isolated invoice print. Local syntax, quality, commercial, UX-R2, accounting phases 2-6 and Golden PASS; `git diff --check` PASS. Merged as `6dae96fac9bd5c513209932ae777f12bd8bd95a6`. Current descendant main Quality `37646679015`, inspected job `112879152160`, passes 60/60 controlled DOM and accounting/Golden. These tests do not establish production reset safety; production reset not executed. Settings reference image still not supplied, so exact visual parity to that future image is NOT VERIFIED. |
66 | 2026-10-07 | Owner directed autonomous continuation to finish the remaining Finora development backlog, starting with the agreed P0 accounting core: extensible analytical/floating dimensions, journal UX, context-driven posting rules and end-to-end accounting integration, then continue through remaining verified blockers without routine pauses. | **MERGED / CONTROLLED DOM + ACCOUNTING VERIFIED** | P0 adds independent COST_CENTER analytics, role-driven dimension compatibility without rewriting posted history, strict per-fiscal-year journal numbers, voucher type/reference, generic dimension-to-legacy compatibility fields, independent project vs cost-center posting, copy-to-draft, account search, row copy, and live debit/credit/difference totals. Implementation head `de2c58a52cb36bfe54eeb3c90985cd6c94cae812`; PR #52 Quality `37539607474` SUCCESS including Accounting P0 invariant step and Real DOM smoke, Security `37539607498` SUCCESS. Local quality + phases 2-6 + Golden PASS. No schema/RLS/auth/role/destructive production data change. Merged as `b88f0f35902cc99ebd09c9fffcd5700ce759ac69`; descendant main `7e58c75` passed inspected 60-test DOM + accounting/Golden and exact-SHA release/deploy. This supersedes the old merge-pending checkpoint. |
67 | 2026-10-07 | Owner authorized implementation to completion of the researched commerce/accounting redesign: one invoice workspace in Commerce, context-driven reusable floating counterparties, purchase parity (quick supplier + Excel template), and selected-company factory reset that preserves the company. | **COMPLETED / MERGED / RELEASE VERIFIED** | Merged to `main` as `5ae9117c776a33a3cc39775c68ad0c10e13b9c44`. Push Quality run `37529032595` = success; Security `37529032630` = success; Release gate `37529230156` = success; exact gated Pages deployment `37529272934` = success and deployed the same SHA to `http://factoreasy.ir/`. Live HTML loads `js/commercial-rnd.js?v=20261007-commerce-r1`; live bundle contains factory-reset guard, quick supplier, and Excel-template code. PR Real-DOM/accounting gates were green. No production reset and no schema/RLS/auth/role mutation. |
68 | 2026-10-04 | Continue the recorded chart and taxpayer-reference correction after interrupted sessions. | **MERGED / CONTROLLED DOM + ACCOUNTING VERIFIED / GATED PAGES DEPLOYED** | 62 additive chart rows across all eight templates, including non-current assets and contra accounts; explicit preview/apply for compatible existing templates preserves old accounts and posted history. Actual supplied tax logo and reference-aligned totals/settlement layout; image-ready printing. Local chart invariants and 3 chart DOM tests passed; 2 print DOM tests plus single-page landscape PDF passed; accounting phases 2–6 and Golden passed. Full local DOM: 52/53 passed, Pages artifact failed on external ERR_CERT_AUTHORITY_INVALID; no gate weakened. PR #47 implementation SHA `db9e7f2375e914bfa9e78932e63222af68c4c9d3`: Quality `37170173739` and Security `37170173740` passed; inspected static job `111341365938` confirms 53/53 real-DOM tests, chart invariants, phases 2–6 and Golden passed, including Pages artifact. All three disposable DB jobs passed. Production recheck on 2026-10-04: 79 migrations, latest `20261003033540`; public RLS 18/18, private 3/10. See docs/CHART_OF_ACCOUNTS_RESEARCH_2026-10-03.md and docs/CHART_TAXPAYER_VERIFICATION_2026-10-03.md. No schema/RLS/auth/role or production record mutation. |
69 | 2026-10-03 | Owner requested continuation of unfinished work, deep Iranian chart-of-accounts research/completion (especially missing non-current assets), and exact taxpayer invoice layout matching the first supplied reference with the supplied official logo. | **REQUEST RECORDED / IMPLEMENTATION NOT VERIFIED** | PR #46 merged as `3085dce9d8f457e61aca6676f872737418116e7a`; Quality `37094979694`, Security `37094979835`; inspected job `111122956074`: 49 DOM tests and accounting gates passed. Live Supabase has 79 migrations including `20261003033540`; public RLS 18/18, private 3/10. Existing print exactness claim is superseded by owner-reported/reference-visible differences. Preserve historical account IDs/codes/postings; no schema/RLS/auth/role changes authorized by this request. |
70 | 2026-10-03 | Owner directed continuation after Wave 4 deployment; inspect post-merge verification and two-user/concurrency readiness. | **SAME-SHA RETRY PASSED / TIMEOUT ROOT CAUSE OPEN / TWO-USER PRODUCTION E2E BLOCKED** | Main `62da4cf24b5505d9dfe41b43acafa04af74c06c9`; Quality `37094021032` failed with 48/49 DOM passing and 30s timeout in `scripts/enterprise-org-ux.spec.js`; accounting and all disposable DB jobs passed. Security `37094021045` passed. Live Wave 4 version `20261003033540` remains present, public tables without RLS=0, organizations with two distinct active users=0. No test users or access changes authorized/performed. Same-SHA retry `37094021032` attempt 2 succeeded: job `111122578331` logs confirm 49/49 DOM and accounting phases 2–6 + Golden passed. No assertion, timeout or product-code changes. Timeout did not reproduce on retry; root cause remains NOT VERIFIED. |
71 | 2026-10-03 | Owner explicitly approved applying archived Wave 4 migration (`بله تاییده`) and directed continuation after reconnecting GitHub. | **PRODUCTION APPLIED / READ-ONLY CONTRACTS VERIFIED / PRODUCTION E2E NOT VERIFIED** | Scope: only `20261002072000_request_wave4_operational_integrity.sql` on `hcsixhqbyuhpshfwqpjx`, including column/index/functions/EXECUTE grants. Baseline main `81bd9bf38e0b02e5baed8a3fa32a89a2b1345572`; SQL blob `7e644afd2387d328056356314ebfdeed272963ab`. Live preflight: migration absent, idempotency column absent, delegation rows=0, six-argument RPC present and seven-argument RPC absent. Exact SQL applied as `20261003033540 request_wave4_operational_integrity`; approval recorded before apply in `ed90934f057e85bfd6bd0286bdf309d9c2ded9f7`. Other sensitive changes remain approval-gated. |
72 | 2026-10-02 | Latest owner request: verify live main and Supabase, reconcile state before implementation, enforce explicit approval for sensitive database/auth changes and evidence-based slice acceptance. | **RECONCILIATION RECORDED / WAVE 4 PRODUCTION BLOCKER / NO PRODUCT CHANGE** | Baseline main `d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5`; previous branding merge `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`. Quality `36991861922`, Security `36991863100`, Release `36992001841`, gated Pages `36992033310` succeeded. Job `110789670982` logs confirm 49/49 real-DOM tests and accounting phases 2–6 + Golden passed; the seven accounting scripts were also rerun locally at the baseline SHA and passed. DOM tests use controlled fixtures/mocked auth and are not authenticated production E2E. Supabase Finora ACTIVE_HEALTHY, 78 migration history entries, all 18 public tables have RLS; 10 private tables have no client CRUD grants (3 RLS enabled, 7 disabled). 79 repository SQL files versus 78 production migration records; 21 same-name files have different production versions. Wave 4 operational-integrity migration is genuinely absent; details below. Full SQL equivalence of all historical migrations NOT VERIFIED. No schema/RLS/auth/role/data mutation performed. |
73 | 2026-10-02 | Branding PR first Quality run exposed a Pages-artifact packaging gap: new icon files were present in source but `scripts/build-pages.mjs` copied only `js` and `vendor`, causing a 404 in hardened Pages smoke. | **MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED** | Pages builder now copies the versioned `assets` directory into `_site`; product/auth logic was not the cause. Merged in `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`; baseline main Quality `36991861922` succeeded; job logs verify 49/49 controlled real-DOM tests and accounting regression gates; production two-user E2E remains NOT VERIFIED. |
74 | 2026-10-02 | Owner requested product-wide naming change to «نرم‌افزار ERP سازمانی فینورا», a premium redesign of the login screen based on the supplied reference, and replacement of the generated letter favicon/bookmark icon with the supplied Finora F icon. | **MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED** | Browser/bookmark title, application metadata, manifest and visible legacy tagline now use «نرم‌افزار ERP سازمانی فینورا». Added supplied-logo-derived 32px favicon + 180px app/apple icon, real icon in shell branding, and a responsive premium split login with Finora Enterprise visual while preserving every auth contract ID/action. Added static + Real-DOM desktop/mobile regression gates; merged in `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`, baseline CI/release/deploy succeeded as recorded above; runtime checks remain bounded by actual evidence. |
75 | 2026-10-02 | Owner video confirms the three-scrollbar defect is still visible after PR #35 deployment. | **HOTFIX MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | Main `a55933c421eb1ea75a863fadd5d51f3bb29d6b8d` duplicates critical desktop ownership CSS in `index.html` and cache-busts `ui.js` as `20261002-shell-scroll-ownership-v2`. Quality `36985456403` SUCCESS, Security `36985456341` SUCCESS, Release gate `36985769059` SUCCESS and gated Pages `36985796598` SUCCESS. |
76 | 2026-10-02 | Owner reported three desktop vertical scrollbars are attached to the wrong visual edges and requested strict scroll ownership: module rail scrolls only main modules from its right edge; contextual subsystem panel scrolls only its own links from its right edge; workspace scrolls only the active work surface from its right edge. | **MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | PR #35 merged as `4a8caf7447ddb5361fe56555a8a6bccc7a733602`. Desktop document scrolling is suppressed; module rail, subsystem links, and workspace are independent viewport-bound scroll owners with physical-right scrollbars while Persian content remains RTL; workspace navigation resets its own scroller; mobile/print retain normal flow. PR retest corrected one test-only mobile overflow expectation. Main Quality `36984349326` SUCCESS, Security `36984349300` SUCCESS, Release gate `36984494858` SUCCESS, gated Pages `36984556741` SUCCESS. |
77 | 2026-10-02 | Wave 5c privileged full backup/restore authorization after offboarding hardening. | **PRESENT ON MAIN / CI SUCCESS / PRODUCTION E2E NOT VERIFIED** | Full organization export/restore now requires both fresh server membership revalidation and existing organization-management authority (owner or `core:configure`); restore performs the check before reading the selected file. Static + Real-DOM denial-path gates added. This is an application-layer privilege boundary over data already readable under server RLS; no new schema/RLS/auth-role change was introduced. |
78 | 2026-10-02 | Supabase security-advisor intent review for authenticated-callable SECURITY DEFINER RPCs and three private C8 no-policy tables. | **LIVE INTENT REVIEW VERIFIED / NO DDL REQUIRED** | Production `hcsixhqbyuhpshfwqpjx` reviewed read-only. All 20 public advisor-listed SECURITY DEFINER functions use `search_path=''` and enforce caller/admin/org/capability/read-scope checks appropriate to their RPC contract; warning is retained as an intentional privileged-RPC boundary rather than weakened. The three private C8 tables have RLS enabled, zero policies, and no anon/authenticated CRUD grants, confirming deliberate deny-by-default private storage behind controlled RPCs. Evidence: `docs/SECURITY_ADVISOR_INTENT_REVIEW_2026-10-02.md`. Leaked-password protection remains an external Auth-setting gap. |
79 | 2026-10-02 | Wave 5b offboarding/revocation client fail-closed remediation from Round 29. | **MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | PR #32 merged as `e9831e4d23fceae3a30359fe2eca8743087bb6b5`. Main Quality `36982398280` SUCCESS, Security `36982398238` SUCCESS, Release gate `36982548804` SUCCESS, gated Pages `36982584408` SUCCESS. Added 30s + visibility membership revalidation, known-revocation tenant-memory/cache purge, stale `currentUser` removal, sensitive-view lock, alternate-org recovery path, no-membership sign-out, and fresh server membership gate before bulk export. Persistent two-real-user production E2E and capability-specific privileged export authorization remain NOT VERIFIED. |
80 | 2026-10-02 | Permanent project constraint: user operates from Iran and cannot use paid infrastructure, paid APIs, international-card billing, or services that require a later paid upgrade for essential operation. Railway is excluded from Finora runtime/deployment. | **ACTIVE ARCHITECTURE CONSTRAINT** | Use only genuinely no-cost capabilities for required operation; do not create paid resources or make Finora depend on a service whose essential path later requires billing. GitHub + Supabase remain current sources of truth; any future infrastructure choice must pass this zero-cost/no-billing constraint first. |
81 | 2026-10-02 | Gmail/GitHub failure review: latest Wave 5a Quality run failed only because the disposable PostgreSQL harness lacked Supabase roles `anon`/`authenticated`; Security latest run is green. | **TEST HARNESS VERIFIED** | Added the two no-login Supabase compatibility roles to the disposable identity DB bootstrap. Wave 5a identity DB gate passed on PR head and main Quality `36980655736`; the earlier failure was harness-only. |
82 | 2026-10-02 | Second CI retest showed the safety-check regex itself was over-escaped. | **REGEX FIX VERIFIED** | Normalized regex literals to match the workflow labels/variable gate exactly; main Security `36980655725` passed Release/QA safety + CodeQL. |
83 | 2026-10-02 | CI retest exposed a literal `\\n` introduced while editing the release-safety checker. | **TEST SYNTAX FIX VERIFIED** | Replaced the escaped text with a real newline; subsequent PR and main security checks passed. |
84 | 2026-10-02 | Release-safety invariant initially rejected the explicit Dependency Graph availability gate. | **TEST CONTRACT VERIFIED** | Safety checker requires both properties: Dependency Review is conditional on `DEPENDENCY_GRAPH_ENABLED=true`, and remains fail-closed whenever enabled; main Security `36980655725` succeeded. |
85 | 2026-10-02 | Wave 5a identity/signup/invitation bootstrap remediation (WS-01, F-121/F-122 and OTP bootstrap boundary). | **MERGED / PRODUCTION + CI VERIFIED** | PR #30 merged as `cfd15dcf51cf8b9085a5512ded497fe0363ae322`. Main Quality `36980655736` SUCCESS including identity disposable-DB + static/Real-DOM gates; Security `36980655725` SUCCESS. Production migration `20261002075156 identity_wave5a_bootstrap` applied to `hcsixhqbyuhpshfwqpjx`; live reconciliation confirms `search_path=''`, organization-bound trial creation, trigger present, `licenses_without_org=0`, duplicate organization licenses=0 and orphan memberships=0. Persistent two-real-user production E2E and offboarding cache/session purge remain NOT VERIFIED. |
86 | 2026-10-02 | PR #29 exposed that Dependency Review now fails hard when GitHub Dependency Graph is disabled. | **CI BOUNDARY VERIFIED** | Security workflow runs Dependency Review only when repository variable `DEPENDENCY_GRAPH_ENABLED=true`; when enabled the action remains fail-closed. Main Security `36980655725` passed Release/QA safety + CodeQL; Dependency Review was skipped because the graph remains unavailable. |
87 | 2026-10-02 | Owner granted standing approval to continue in-scope project work without repeated confirmation. | **WAVE 4B PRODUCTION APPLIED + VERIFIED** | Supabase production `hcsixhqbyuhpshfwqpjx` recorded `request_wave4b_scheduler_outbox_delivery` as migration version `20261002072526`. Read-only reconciliation confirmed scheduler tables, outbox delivery columns, and all five Wave 4b RPC contracts exist. GitHub main `41aff95d11a66c67e2c64df3eac11a122f94dfd7`: Quality `36975968198`, Security `36975968108`, Release Gate `36976087514`, Deploy `36976115600` succeeded. Automatic external scheduling and D4c destination consumers remain NOT VERIFIED. |
88 | 2026-10-02 | Wave 4b first disposable-DB run exposed an ambiguous PL/pgSQL test variable in the final replay assertion. | **TEST FIX APPLIED / RETEST PENDING** | Product migration executed through all scheduler/outbox assertions; failure was confined to the final test query where local variable `k` shadowed temp-table column `k`. Renamed/qualified the assertion; no production permission or state-machine rollback. |
89 | 2026-10-02 | Owner said «ادامه بده» after Wave 4 F-420/F-421/F-422 merge. | **IMPLEMENTED ON BRANCH / CI PENDING** | Added server-clock five-minute scheduler slots, durable run/claim evidence, replay binding, skip-locked overdue claims, stable outbox destination command identity, lease claims, retry/backoff, dead-letter and idempotent authorized replay. D4c destination consumers remain disabled. Production migration is NOT APPLIED pending the schema-change gate. |
90 | 2026-10-02 | Owner supplied environment/connection handoff and directed it to be enforced while continuing work. | **LIVE RECONCILED / ACTIVE OPERATING CONTEXT** | Verified GitHub target `davoodmehraban89/Factor-easy` with admin/read-write access, canonical `main`, and Supabase target `hcsixhqbyuhpshfwqpjx` = Finora / `ACTIVE_HEALTHY`. GitHub + Supabase remain source of truth; Gmail/Notion are optional support only, and Railway/Render are not deployment truth unless a later explicit project decision makes them so. Detected concurrent branch advancement during Wave 4 and refused a non-fast-forward overwrite; re-read the newer head before continuing. |
91 | 2026-10-02 | Wave 4 remediation F-420/F-421/F-422 from canonical audit register. | **IMPLEMENTED ON BRANCH / NOT YET VERIFIED** | F-420 rejects duplicate normalized `onApproved` target/action identities; F-421 binds SLA editor values to logical step keys across reorder/remove/key-edit; F-422 adds actor-scoped delegation idempotency, explicit overlap rejection and revoke retry audit dedupe. Disposable-DB + Real-DOM gates added. CI/merge/production remain NOT VERIFIED at this checkpoint. |
92 | 2026-10-02 | Owner supplied the current remediation/audit package plus manual GitHub QA workflow and directed continuation of both roadmap execution and defect remediation. | **F-412 + WAVE 3 F-415/F-416 VERIFIED / PRODUCTION RECONCILED** | PR #23 merged as `d13498f3af03f544c05168727b440f053de1d733`. Main Quality `36973781026` SUCCESS including disposable D1 DB adversarial tests; Security `36973781055` SUCCESS (Release/QA safety + CodeQL; PR Dependency Review remains externally blocked by disabled Dependency Graph); Release gate `36973927530` SUCCESS; gated Pages `36973959986` SUCCESS. Production migrations `20261002063121 request_wave2_duplicate_code_guard` and `20261002063123 request_wave3_decision_idempotency` applied. Read-only production reconciliation: duplicate legacy code groups=0; replay actor binding, reauthorization and immutable event-outcome reconstruction are present. Next: Wave 4 F-420/F-421/F-422; D4c consumers remain disabled. |
93 | 2026-10-02 | Owner directed immediate continuation after observing execution delay. | **D4A IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + ACCOUNTING + SECURITY VERIFIED** | PR #21 merged as `4583703396a7ddb00bdad76b52c22932d634cbef`. Main Quality `36961361891` SUCCESS (38/38 real-DOM, accounting phases 2–6 + Golden, D1/C8 DB); Security `36961361897` SUCCESS; Release gate `36961459328` SUCCESS; gated Pages `36961492170` SUCCESS. Production migration `20261002034311 request_workflow_d4a_work_queue` reconciled. Evidence: `docs/REQUEST_WORKFLOW_D4A_VERIFICATION.md`. |
94 | 2026-10-02 | Owner switched GitHub Pages source to **GitHub Actions** after the gated Pages workflow was installed. | **WAVE 0 COMPLETED / POSITIVE + NEGATIVE CONTROLS VERIFIED** | Negative control: failing SHA `03561a3369130a7aaba689474d92aa3e93137404` on PR #15 failed required `static-quality`, could not merge, and produced no Release gate / gated Pages deployment. Positive control: protected-main SHA `150ff54d938a45b9a9b476f3a4a8fdabbb45d065` passed Quality `36932956964`, Security `36932956877`, exact-SHA Release gate `36933115365`, then gated Pages deploy `36933151878`; no legacy dynamic branch Pages deployment appeared. F-402/F-403/F-406/F-407/F-423/F-424 are closed at the verified GitHub/repository boundary. |
95 | 2026-10-02 | Wave 2 request integrity remediation F-411/F-413/F-414/F-417/F-418. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + ACCOUNTING + SECURITY VERIFIED** | Squash merge `7346910638b6ef9555d4adb5952dd62c8f4c130d` from PR #19. PR Quality `36937247798`: DB jobs SUCCESS and 37/37 real-DOM tests passed; accounting phases + Golden journey passed. PR Security `36937247803`: required Release/QA invariants + CodeQL SUCCESS (Dependency review remains the documented external graph boundary). Main Quality `36937448157` SUCCESS; Security `36937448101` SUCCESS; exact-SHA Release gate `36937598497` SUCCESS; gated Pages `36937616201` SUCCESS. Production migration recorded as `20261001225044 request_wave2_integrity_hardening`; live validator negative controls and function-contract checks passed. |
96 | 2026-10-02 | Live Supabase target `hcsixhqbyuhpshfwqpjx` became available to the connector; owner directed immediate continuation. | **WAVE 1 PRODUCTION RECONCILED / WAVE 2 STARTED** | Production migration history and live `request_transition_instance` definitions were inspected read-only. F-409/F-410 guard is present in production; next slice is F-411/F-413/F-414/F-417/F-418 with server validation, form-runtime fidelity, idempotency binding, active/latest-version enforcement and schema-bound conditions. |
97 | 2026-10-02 | Owner completed the GitHub `Protect main` ruleset and directed autonomous continuation to fully remediate the audited defects. | **ACTIVE — REMEDIATION CONTINUATION** | Ruleset `24334764` verified ACTIVE on default branch with deletion + non-fast-forward protection, PR-only updates, strict required checks `static-quality`, `Release and QA safety invariants`, and `CodeQL JavaScript`; bypass list empty. Continue Wave 1/2 request integrity work. |
98 | 2026-10-01 | Owner authorized starting the canonical remediation pack after external full-system audit. | **WAVE 0 CLOSED** | Release/QA fail-open paths, exact-SHA promotion and Pages deployment ordering are now verified by positive and negative controls above. |
99 | 2026-10-01 | Owner said «ادامه بده» after D3a handoff. | **D3B + D3C VERIFIED** | D3b visual editor/conditions/timeline and D3c SLA/delegation/outbox are production + disposable-DB + real-DOM verified. Remediation audit supersedes roadmap ordering. |
100 | 2026-10-01 | Slice D3c — SLA/escalation, delegation/substitution, transactional outbox. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED** | `js/request-workflow-d3c.js`; migrations `20261001235500`, `20261002000500`, `20261002001000`; Quality run `36917772952` all three jobs SUCCESS. Evidence: `docs/REQUEST_WORKFLOW_D3C_VERIFICATION.md`. |
101 | 2026-10-01 | Slice D3b — visual workflow editor + conditions + timeline. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED** | `js/request-workflow-d3b.js`; migration `20261001233000`; bounded predicate DSL, skipped-step evidence and authorized timeline RPC. Quality run `36915696611` all three jobs SUCCESS. Evidence: `docs/REQUEST_WORKFLOW_D3B_VERIFICATION.md`. |
102 | 2026-10-01 | Slice D3a — sequential/parallel request workflow runtime. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + CI VERIFIED** | Migrations `20261001230000`, `20261001230500`; private step/vote runtime, quorum semantics, capability checks, idempotent decisions and immutable evidence. Quality run `36913565943` all three jobs SUCCESS. |
103 | 2026-10-01 | Slice D2 — request UI/read-model + legacy cutover. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED** | `js/request-workflow-d2.js`; migrations `20261001223500`, `20261001224500`; Quality run `36912668369` all three jobs SUCCESS. Legacy source records remain preserved and imported rows traceable. |
104 | 2026-10-01 | Slice D1 — requests/BPMS-lite server foundation. | **IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + CI VERIFIED** | Migrations `20261001204500`, `20261001205500`, `20261001210500`, `20261001211500`; Quality run `36910187257` all three jobs SUCCESS. |
105 | 2026-10-01 | Office Slice C8 workflow policy/runtime. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + CONCURRENCY + REAL-DOM + SECURITY VERIFIED** | Immutable workflow evidence, pinned policy versions, capability-gated transitions, optimistic revision checks, idempotency, private runtime tables and SECURITY INVOKER public wrappers. |
106 | 2026-10-01 | Owner reconfirmed autonomous GitHub + Supabase execution and free-tier-only development. | **ACTIVE OPERATING DIRECTIVE** | No repeated routine approval requests; no paid development resource. Preserve safety/cost boundaries. |
107 | 2026-10-01 | Live QA: commerce/tax IDs/request builder/personnel/license/floating-detail coding. | **PARTIALLY IMPLEMENTED / FOLLOW-UPS OPEN** | Kardex/tax-ID/request/profile/license/floating-code work landed. Exact Taxpayer-System print layout owner reference is now available and has regression coverage. |
108 | 2026-09-30—2026-10-01 | Office C1–C7, ELI-1–ELI-4, Slice A/B and accounting phases 1–6. | **VERIFIED WITH DOCUMENTED BOUNDARIES** | See required evidence; do not redo completed phases without verified regression evidence. |
109 | 2026-09-30 | Iran-first high-assurance ERP expansion. | **IN PROGRESS — BROADER ROADMAP** | `docs/IRAN_COMPLIANCE_MATRIX_V1.md`; do not claim statutory consolidation/full tax submission/full HR/CRM until lifecycle/accounting/permissions/tests exist. |
110
111 ## Wave 0 checkpoint — CLOSED 2026-10-02
112 - Manual QA no longer uses `continue-on-error`; live/all require credentials; live credential-bearing runs reject non-allowlisted origins before secrets are injected into the test step; authenticated browser origin is rechecked before/after login/navigation; menu click errors are no longer swallowed and each navigated item must change observable UI state.
113 - QA evidence retention reduced to 3 days and screenshots changed to failure-only.
114 - Security dependency review no longer uses `continue-on-error`. Security runs `scripts/release-safety-check.mjs` to prevent regression of Wave 0 code contracts.
115 - Exact-SHA `Release gate` requires successful Quality + Security for the same SHA and explicitly checks `static-quality`, `c8-policy-database`, and `d1-request-database` before promotion.
116 - Historical reproduction: Pages run `36922017645` for SHA `6b529647...` completed before Quality/Security, proving the old branch-deploy path was unsafe.
117 - Negative control after `Protect main` + Pages source change: failing SHA `03561a33...` on PR #15 failed `static-quality`; merge was rejected; no Release gate or gated Pages deployment existed for that SHA.
118 - Positive control on protected main SHA `150ff54d938a45b9a9b476f3a4a8fdabbb45d065`: Quality `36932956964` SUCCESS; Security `36932956877` SUCCESS; Release gate `36933115365` SUCCESS; `Deploy gated Pages` `36933151878` SUCCESS. The earlier Pages trigger `36933134567` was skipped, as designed, and no legacy dynamic branch deployment ran.
119 - Wave 0 findings F-402/F-403/F-406/F-407/F-423/F-424 are closed at the verified GitHub/repository boundary.
120
121 ## Implemented foundations
122 - Accounting phases 1–6: accepted high-assurance accounting foundation; posted history remains immutable and balanced.
123 - Slice A/B + ELI-1–4: modular entitlements, tenant/RBAC, seats, delegated admin, reusable roles, secure invitations and organization UX.
124 - Office C1–C8: registration/read evidence, referrals, archive/classification, numbering/templates, approvals/SLA, OCR provenance boundary and versioned correspondence workflow runtime.
125 - Requests D1/D2: independent versioned request definitions/forms/workflows, pinned versions, idempotent create/transition, immutable evidence, server authorization, server-backed UI/read model and non-destructive legacy cutover.
126 - Requests D3a: ordered sequential/parallel approval steps, quorum voting, per-step capability authorization and private runtime state.
127 - Requests D3b: visual ordered-step editor, bounded server condition predicates, skipped-step evidence and authorized runtime timeline.
128 - Requests D3c: step SLA/deadline/escalation evidence, explicit time-bounded delegation with provenance, and transactional approved-request outbox intents.
129
130 ## Invariants
131 Posted accounting history is immutable and balanced; tenant isolation is enforced at the data boundary; commercial entitlement and member authorization are independent; UI hiding is never security; expired licenses are read-only; office numbering is server-atomic; private scans remain private; seat/company limits are server-enforced; delegated customer admins cannot mutate commercial license entitlements; invitation acceptance is authenticated/email-bound/seat-safe; raw invitation tokens are never persisted or audited; organization-unit parents cannot cross tenants or form cycles. Request type/workflow versions are immutable snapshots; request instances pin both versions; runtime mutation is server-authorized, idempotency/revision guarded and append-only evidence is retained. D2 legacy import is non-destructive/idempotent/traceable. D3a votes require distinct actors for parallel quorum. D3b conditions are bounded server-validated predicates and skipped results remain evidence. D3c delegation never impersonates the source actor, source capability is revalidated, SLA escalation appends evidence, and approved cross-module effects are queued transactionally rather than directly executed. Request workflow state never replaces C1 registration or C5 correspondence approval evidence.
132
133 ## Required evidence
134 `docs/PHASE_1_REDESIGN_VERIFICATION.md` through `docs/PHASE_6_VERIFICATION.md` · `docs/PHASE_6_CUTOVER_MANIFEST.md` · `docs/PRODUCTION_ACCOUNTING_CUTOVER_READINESS_2026-09-30.md` · `docs/IRAN_COMPLIANCE_MATRIX_V1.md` · `docs/FINORA_ERP_EXPANSION_ROADMAP_V4.md` · `docs/FINORA_UX_ACCOUNTING_BENCHMARK_V3.md` · `docs/FINORA_MODULAR_ERP_OFFICE_AUTOMATION_V1.md` · `docs/SLICE_B_TENANT_RBAC_VERIFICATION.md` · `docs/SECURITY_DEFINER_HARDENING_2026-09-30.md` · `docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md` · `docs/ELI_1_ENTERPRISE_LICENSE_VERIFICATION.md` through `docs/ELI_4_ENTERPRISE_ORGANIZATION_UX_VERIFICATION.md` · `docs/OFFICE_SLICE_C1_VERIFICATION.md` through `docs/OFFICE_SLICE_C8_RUNTIME_UI_VERIFICATION.md` · `docs/REQUEST_WORKFLOW_D2_CUTOVER_VERIFICATION.md` · `docs/REQUEST_WORKFLOW_D3A_VERIFICATION.md` · `docs/REQUEST_WORKFLOW_D3B_VERIFICATION.md` · `docs/REQUEST_WORKFLOW_D3C_VERIFICATION.md` · `docs/REQUEST_WORKFLOW_D4A_VERIFICATION.md` · `docs/PRODUCTION_RUNBOOK.md` · `supabase/migrations/` · `supabase/tests/request_d1_behavior.sql` · `supabase/tests/request_d2_legacy_behavior.sql` · `supabase/tests/request_d3a_workflow_behavior.sql` · `supabase/tests/request_d3b_condition_timeline.sql` · `supabase/tests/request_d3c_operations.sql`.
135
136 ## NOT VERIFIED / external boundary
137 Automatic background scheduling for SLA scans; delivery/dispatch consumers for D3c outbox intents; authenticated two-real-user production browser E2E with a persistent legitimate non-owner member; automatic external invitation email delivery; owner-approved accounting cutover; real Persian OCR accuracy/provider; qualified digital signature; physical printer; live external adapters; GitHub Dependency graph/enforceable dependency review; leaked-password protection; PostgreSQL upgrade; CodeQL v4 migration; external BPM/provider integration remain outside verified scope.
138
139 The connected Supabase production target is `hcsixhqbyuhpshfwqpjx` (`Finora`). Live migration history includes C8, D1–D4a and request security Waves 1–3; the 2026-10-02 reconciliation found Wave 4 operational integrity missing despite later Wave 4b being present; that drift was resolved on 2026-10-03 by approved migration `20261003033540`. History includes `request_wave4b_scheduler_outbox_delivery` version `20261002072526`, and `identity_wave5a_bootstrap` version `20261002075156`. Read-only production reconciliation after Wave 4b confirmed both scheduler evidence tables, stable destination-command/dead-letter outbox columns, and scheduler/claim/complete/fail/replay RPC contracts exist. Security advisor still reports 3 private C8 tables with RLS but no policies and 20 authenticated-callable SECURITY DEFINER functions; live intent review on 2026-10-02 verified these as deliberate deny-by-default private storage and guarded privileged RPC boundaries, respectively. Leaked-password protection remains disabled.
140
141 ## Wave 4 production verification — 2026-10-03
142 - Owner explicitly approved the archived SQL including schema/function/EXECUTE-grant changes. Applied successfully to `hcsixhqbyuhpshfwqpjx` as `20261003033540 request_wave4_operational_integrity` after recording approval in commit `ed90934f057e85bfd6bd0286bdf309d9c2ded9f7`.
143 - Exact source: `supabase/migrations/20261002072000_request_wave4_operational_integrity.sql`, Git blob `7e644afd2387d328056356314ebfdeed272963ab`. No SQL modification or duplicate migration file introduced. Production version differs because the migration service assigns the application timestamp.
144 - Live schema checks PASS: text idempotency column exists; key-length CHECK validated; actor-scoped unique index valid. Seven-argument public/private create RPCs exist; authenticated can execute new signatures and cannot execute old six-argument signatures; anon cannot execute either. Public wrapper is SECURITY INVOKER, private implementation remains guarded SECURITY DEFINER; empty search_path verified. Duplicate-intent and revoke audit-deduplication guards present.
145 - Live BEGIN READ ONLY tests PASS: valid workflow accepted; normalized duplicate target/action rejected with expected error; unauthenticated delegation rejected with SQLSTATE 28000. Transaction rolled back. Delegation row count remained zero. No financial data mutation or user provisioning occurred. Public tables without RLS=0.
146 - Security advisor unchanged: 3 private C8 no-policy INFO, 20 authenticated SECURITY DEFINER WARN, 1 disabled leaked-password-protection WARN. Existing remediation references remain below; no unrelated grants or Auth settings changed.
147 - Baseline main `81bd9bf38e0b02e5baed8a3fa32a89a2b1345572`: Quality `36994542956`, Security `36994542874`, Release `36994665315`, Pages `36994730651` succeeded. Static job `110798133201` logs inspected: 49/49 controlled real-DOM tests and accounting phases 2–6 + Golden passed. Disposable D1 job `110798133021` logs inspected: exact Wave 4 migration and `supabase/tests/request_wave4_operational_integrity.sql` executed successfully with ON_ERROR_STOP. These are controlled/disposable tests, not authenticated production browser E2E.
148 - VERIFIED boundary: missing migration deployed; structural, permission and read-only negative-control contracts pass. NOT VERIFIED: persistent two-real-user production browser E2E, real-user production delegation creation/replay/revocation, concurrent production overlap, and full historical SQL equivalence. No blanket product COMPLETED claim.
149
150 ## Historical reconciliation evidence — 2026-10-02 (Wave 4 absence resolved above)
151 - Request recorded before implementation in commit `cb7f4f0606207077151f5c82801842670a35d90a` on `audit/reconcile-state-20261002`. This slice changes documentation only. No feature, schema, RLS, auth, role or production data mutation was performed.
152 - Baseline main `d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5` follows branding merge `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`. The heartbeat commit changed AGENTS.md without a same-commit PROJECT_STATE.md update; this is a historical continuity-protocol discrepancy, not retroactively corrected history.
153 - Exact-SHA workflow evidence: Quality `36991861922` (static job `110789670982`: 49/49 real-DOM tests; accounting phases 2–6 and Golden passed); Security `36991863100`; Release gate `36992001841`; gated Pages `36992033310`: all SUCCESS. Logs were inspected, not inferred from workflow color. All seven accounting scripts also passed locally on the baseline; local DOM was NOT RUN (browser/test runtime unavailable). CI DOM fixtures mock auth/data and do not prove live tenant isolation.
154 - Supabase `hcsixhqbyuhpshfwqpjx`: ACTIVE_HEALTHY, PostgreSQL `17.6.1.166`; 18/18 public tables RLS enabled. Ten private tables have zero effective SELECT/INSERT/UPDATE/DELETE privileges for anon/authenticated; three have RLS, seven do not. Authenticated has private-schema USAGE, anon does not. This inventory does not prove all policy predicates or RPC authorization behavior.
155 - Advisor recheck: three private C8 no-policy INFO findings, 20 authenticated-callable SECURITY DEFINER WARN findings, leaked-password protection disabled. Previous intent review remains historical evidence; no privileged-function-wide re-audit claimed. References: https://supabase.com/docs/guides/database/database-linter?lint=0008_rls_enabled_no_policy ; https://supabase.com/docs/guides/database/database-linter?lint=0029_authenticated_security_definer_function_executable ; https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection .
156 - Migration inventory: 79 SQL files / 78 live records; 21 same-name repository files differ in version from production. `20260930222500_iran_enterprise_control_collections.sql` is an intentional no-op placeholder. Duplicate live entries exist for the Wave 1 guard, Wave 2 duplicate-code guard and Wave 3 replay hardening. Do not blindly replay or repair history; full statement equivalence remains NOT VERIFIED.
157 - **CONFIRMED PRODUCTION DRIFT / APPROVAL REQUIRED:** `supabase/migrations/20261002072000_request_wave4_operational_integrity.sql` has no production history entry. Live pg_proc inventory and full function-body reads show only the six-argument delegation create RPC, no seven-argument idempotent RPC, no duplicate target/action guard in workflow validation, and revoke retries unconditionally append audit events. The archived SQL adds the delegation idempotency column/check/index, seven-argument guarded RPC, duplicate-intent rejection and revoke audit deduplication, and changes EXECUTE grants on old/new signatures. CI disposable database job `110789671195` applied this exact file and passed Wave 4 assertions, but that does not establish production deployment. **Do not apply until the owner explicitly approves these schema/function/grant changes.**
158 - NOT VERIFIED: authenticated production browser E2E; production accounting writes/reconciliation; complete historical SQL equivalence; full RLS policy adversarial tests in production; Wave 4 production behavior. No new product slice is marked COMPLETED.
159
160 ## Continuation checkpoint — 2026-10-03
161 - Request recorded before retry in `f293b533a557b6af2168220608e1182b1e1a4083`. Compared `81bd9bf...62da4cf`: only PROJECT_STATE.md changed. Main Quality attempt 1 failed solely at enterprise-org-ux DOM test (30s); 48 others passed. No error-context artifact was retained in that run, so exact timeout phase/network cause cannot be established from available evidence.
162 - Failed-job retry on the SAME SHA passed without any code/test/config change: run `37094021032` attempt 2, static-quality job `111122578331`, 49/49 DOM plus accounting invariants and Golden. Database jobs also succeeded. Do not call the intermittent timeout root cause fixed; next recurrence should retain trace/error-context for diagnosis. No blanket retry policy or weakened gate was added.
163 - Read-only production readiness: migration `20261003033540` present; public tables without RLS=0; organizations with at least two distinct active member user IDs=0. Thus persistent same-tenant owner/non-owner browser E2E cannot run with the current membership state. No identities, memberships, capabilities or financial records were changed. Existing controlled DOM/disposable DB results are not a substitute for real authenticated production users.
164 - Local psql/postgres/docker executables unavailable, so no new local two-session delegation concurrency test was run. Production concurrency remains NOT VERIFIED. Do not run disposable fixture seeding against production.
165
166 ## Exact next executable work
167 Current priority (2026-10-07): finish the owner-requested audit and remediation plan before product implementation. The following Oct 4 checkpoint is historical; do not treat it as the current main head or as authorization to publish old unfinished work. Main and production diverge for the phone-identity change: production version `20261007165208` exists, while its SQL archive is on open PR #58. Assess open PR #59 against the new owner checklist before duplicating or integrating that work.
168
169 Current owner-requested chart/taxpayer slice: PR #47 merged as `b2e1fbf89fb558fd9be1729dda875d3796e46721`. Main Quality `37170385857`, Security `37170385877`, Release `37170453444`, gated Pages `37170479829` all succeeded. Inspected main static job `111341993035`: 53/53 controlled real-DOM tests, chart invariants and Golden passed; all three disposable DB jobs passed. Final PR head `4619b5ed73f6e61084d6e111b7ab338e6c152ff5` also passed Quality `37170297853`, Security `37170297828`; logs from static job `111341738948` confirm 53 DOM tests. Existing compatible template companies use «پیش‌نمایش تکمیل کدینگ» then explicit apply; no live company was changed by the agent. Next: owner-context invoice/physical-print comparison and safe authorized two-user production verification; do not treat successful deployment as authenticated production E2E. Exact photographed-print parity, physical printer, authenticated production E2E, mixed-payment/multi-row taxpayer arithmetic remain NOT VERIFIED. Newly attached bootstrap files reference other repositories; attachments are context and do not change the selected Factor-easy repository. PR #46 is merged as `3085dce9d8f457e61aca6676f872737418116e7a`; live recheck on 2026-10-04: Quality `37126922824`, Security `37126922854`, Release `37127012080`, Pages `37127034198` succeeded. These previous-SHA runs do not verify the new implementation.
170
171 0. Wave 4 deployment drift is resolved by production migration `20261003033540`; retain the production E2E/concurrency boundaries above. Next eligible verification is persistent legitimate two-user offboarding/delegation E2E with a safe authorized test scope. Further schema/RLS/auth/role changes require separate approval.
172 1. Finish Wave 5 offboarding/session-revocation verification on protected main, then execute persistent legitimate non-owner E2E when a second durable test identity is available without weakening tenant/capability checks.
173 2. Keep D4c destination consumers disabled until a real destination adapter enforces `destination_command_key` idempotency and its authorization/audit behavior is adversarially verified; automatic scheduler invocation remains a separate operational verification.
174 3. Resolve remaining platform-security gaps: formalize the three private C8 no-policy contracts, enable leaked-password protection when supported by the connected Auth control surface, and keep Dependency Review marked unavailable until Dependency Graph is enabled.
175
176 ## Live QA open items
177 - Chart/taxpayer Oct 3 defects were partially resolved by merged PR #47: 62 additive chart rows include non-current assets, and the actual supplied logo replaces the generated logo. Compatible existing companies require explicit preview/apply. Universal chart suitability, exact photographed-print parity, physical printing, and mixed-payment/multi-row taxpayer arithmetic remain NOT VERIFIED; do not repeat the obsolete claim that non-current assets are absent from every current starter template.
178 - Legacy request records are preserved for rollback/audit after D2; new request configuration/runtime must not be routed back through record-store writes.
179 - Floating-detail defaults for new records: 8-digit semantic codes currently use slot/category/sequence (Branch `11xxxxxx`, Counterparty `21xxxxxx`, Project `31xxxxxx`); historical codes are not rewritten and account-chart coding stays independent.
180 - Product/service deletion must continue to fail closed whenever operational references exist.
181
182 - 2026-10-10 P0 owner request: universal inline searchable combobox for product, contact, seller/buyer, project, chart and contracts; full list on focus, instant narrowing over 1000 records, no separate search input; exactly one initial editable invoice line; require real-browser repeated regression before done. Branch fix/combobox-live-search, PR #60. NOT VERIFIED until browser and release checks pass.
183
184
185 - 2026-10-10 local isolated QA evidence: 42 static/behavior check scripts PASS; 59/60 Playwright tests PASS against correct repo served on 4174, with the only initial Pages artifact test misrouted to an unrelated process on 4173; Pages artifact test rerun against correct _site/index.html on 4174 PASS (thus 60/60 separately). Five UX search/settings browser tests PASS. Scope caveat: exhaustive click-by-click all controls, 1000-option stress, production authenticated multi-user E2E and live deployment NOT VERIFIED. No production mutation.
186
187
188 - 2026-10-10 production issue: index.html referenced unchanged old script query versions despite PR #60 changes; browser/CDN cache could keep stale JS. Cache-bust invoices.js and ux-hardening-r2.js for next gated Pages deployment. Verify exact deployed artifact and refresh user browser before claiming live success.
189
190
191 ## 2026-10-11 Iran-first accounting design and verification
192 Owner approved Iranian accounting standards as primary, with future international extensibility. Design: docs/IRAN_FIRST_ACCOUNTING_DESIGN_2026-10-11.md. Added read-only finance integrity auditor and deterministic fixture test. Verified: golden accounting core, phase3 and phase6 behavior, auditor valid/invalid fixtures. Not verified: live invoice save/reload, production data, actual ERPNext/Odoo/Beancount integration, compliance certification. No schema or production data changes. Next: isolated invoice lifecycle tests, posting atomicity and RLS verification, expert review of Iranian standards.
193
194
195 2026-10-11 follow-up: GitHub PR #64 Quality and Security workflows succeeded. New accounting audit fixture added to quality workflow. Isolated public invoice-save debug blocked by null currentUser fixture, so save/reload remains unverified (not a confirmed application defect).
196
197
198 ## 2026-10-11 Stripe sandbox integration probe (requested)
199 Owner confirmed connected Stripe plugin and requested completion of sandbox invoice create/read and safe Finora integration probe. Scope: Stripe test/sandbox only, read-only production boundaries, no payments, no actual customer contact, no exposed API keys, no Supabase schema/auth/data mutations. Decision: implement and verify bounded standalone integration/tests; record actual API results and connection blockers before claiming completion.
200
201
202 2026-10-11 verification checkpoint: Stripe connected plugin test account 'Finora ERP sandbox' (livemode=false): synthetic customer cus_VQ5jO0GvKcuiQd created without email/payment method; draft in_1UPFYbGnbcoujdbeXnuN3Jf0 created (auto_advance=false), invoice item amount 1250 USD minor units added; GET by ID and list both returned draft, total/subtotal/amount_due=1250, exactly one line. Initial send_invoice attempt without email was rejected, so no email was sent; successful draft uses charge_automatically without finalization. New scripts/stripe-sandbox-readonly.mjs is a server-only read-only sandbox guard with synthetic fixture and adversarial test integrated into Quality CI. Local tests PASS: new sandbox adapter, syntax 53 JS + 48 MJS, finance audit, golden accounting journey, git diff check. NO direct Finora backend Stripe API credentials available; no Finora UI/prod DB/schema/auth integration, no charges/ledger writes. Only ChatGPT plugin API access is live-verified. Next: PR Quality/Security CI, then owner-provided private restricted sandbox API key on trusted server and tenant/auth mapping approval for server deployment if desired.
203
204
205 ## 2026-10-11 Stripe actual Finora server connection preparation
206 Owner requested implementation to continue autonomously and precise owner-only setup instructions if blocked. Verified live Supabase project hcsixhqbyuhpshfwqpjx is ACTIVE_HEALTHY and existing admin-user-management Edge Function requires JWT. Stripe plugin verified a sandbox synthetic draft invoice; it does not supply a Finora backend API key. Design decision: implement a disabled-by-default, server-side-only, fixed sandbox invoice preview Edge Function guarded by verify_jwt, live verified Supabase user identity, exact user allowlist and restricted rk_test_ key; no financial postings/production data writes or RLS/schema/auth changes. Deployment will be independently checked; missing secret/identity remain explicit blockers. User must set the restricted Stripe sandbox key in Supabase Functions secrets privately, never share it in chat or commit it.
207
208
209 2026-10-11 implementation checkpoint: Added JWT-required (Supabase platform verify_jwt intended), server-side-only finora-stripe-qa-read Edge Function with locked one-invoice QA scope, Auth /auth/v1/user revalidation, exact allowed user UUID, Stripe restricted rk_test_ only, origin/method restrictions, no customer PII in output, no ledger/production data writes. Added .gitignore for .env secrets, documented Dashboard-only two-secret onboarding. Local PASS: 26 auth/amount/origin adversarial cases, Stripe fixture read, finance integrity, golden accounting journey, syntax 53 JS/49 MJS, git diff check. PENDING: GitHub PR CI, actual Edge deployment verify_jwt=true, unauthorized live 401 probe, owner private sandbox secrets and authenticated read test. Never mark direct Finora-to-Stripe API as verified before private key is configured.
210
211
212
213 2026-10-11 verified deployment checkpoint: PR #66 head 67081d8c26253c0413bf014213589066b8ad6728 passed GitHub Quality run 38117668618 (including Stripe Edge 26-case authorization test, Golden accounting, Real DOM) and Security run 38117668637. Merged on main as 70addfe731524341f70115d85451b9dacfb1aaf9. Deployed only the fail-closed Supabase Edge Function finora-stripe-qa-read to verified ACTIVE_HEALTHY Finora project hcsixhqbyuhpshfwqpjx; deployment function ID 1ba946df-11ee-42d1-b86a-3e4b27331b10, version=1, ACTIVE, verify_jwt=true, inspected deployed index.ts + handler.mjs. No schema/RLS/auth/role, payment, user/financial-record or UI mutation. An independent unauthenticated HTTP 401 probe was ATTEMPTED but could not be completed due DNS/network fetch failures from remote PC/container; do not claim 401 live verified. IMPORTANT: no restricted Stripe sandbox key or user allowlist has been provisioned through these tools, so function intentionally returns no sandbox data; direct Finora backend-to-Stripe request and authenticated real user session remain NOT VERIFIED. The owner must privately set STRIPE_SANDBOX_RESTRICTED_KEY (rk_test_, Invoices:Read, all other permissions None) and FINORA_STRIPE_QA_ALLOWED_USER_ID (tester's Auth User UID) in Supabase Edge Function Secrets, without ever sharing values in chat/repo. Next: authenticated end-to-end invoke from approved test user, verify retrieved synthetic Stripe sandbox invoice amount=1250 USD minor units, detect 401/403 for unauthorized actor, confirm no production accounting effect.
214
215 ## 2026-10-11 urgent login outage triage
216 Owner reports login blocked with generic 'check internet/VPN' network error on live Finora. Priority supersedes Stripe rollout. Read-only baseline: origin/main 459d8cfc368fbebf1a5a26f7e7abe1c5e01c4bba; Supabase project ACTIVE_HEALTHY and public key current/enabled; two Chromium live-site synthetic invalid-user password token requests returned expected HTTP 400 invalid_credentials (factoreasy.ir and GitHub Pages), no JS page errors. Windows PC GET site HTTP 200 and DNS resolves Supabase; unauthenticated health without public key 401 as expected. User-side regional/ISP reachability NOT VERIFIED. Do not alter passwords, accounts, schema, auth settings, token policy, or live financial data. First deliver honest diagnostic UI and explain that platform-side working does not verify user's ISP route; public proxy or new Cloudflare Worker/DNS/auth transport is separately security-and-cost approved work.
217
218
219 2026-10-11 login diagnostic implementation: added explicit '????? ????? ?? ???? ????' action on login screen, credential-free parallel same-origin manifest + GoTrue /auth/v1/health (publishable key) probe with bounded 12s timeout, stable AUTH_OK/AUTH_UNREACHABLE/AUTH_TIMEOUT/AUTH_HTTP_NNN/SITE_UNREACHABLE statuses and automatic probe when password login rejects due network. Preserved existing sign-in policy, passwords, and Supabase endpoint. Bumped core.js cache key; added login-connectivity.js. Verified on local source AND Pages artifact: Playwright 3/3 diagnostics PASS each; syntax check 54 JS+50 MJS PASS; static diagnostic check PASS; branding/login PASS; golden accounting journey PASS; site build PASS. Live browser fake invalid account got real GoTrue HTTP 400 invalid_credentials from both site origins (client-to-Supabase working from remote Windows); user network route NOT VERIFIED and restored login NOT CLAIMED. Cloudflare DNS for factoreasy.ir is DNS-only; routing a new public proxy would add a security boundary, require approvals/cost checks and must NOT be silently enabled. Next: PR CI and gated Pages exact SHA publication; user to click new button on affected network and share status, then decide whether DNS/ISP or auth route change is justified.
220
221
222 ## 2026-10-11 invoice product lookup repair — PR #69
223 - Owner screenshot evidence: populated products master; invoice row initially empty, seller searchable selector works. Source root cause: `finoraEnsureInitialInvoiceRow` creates row before `pullAll()` completes, while initial row `<select>` options are captured only at creation; additional product dropdown is clipped by scrollable invoice table.
224 - Fix on `fix/invoice-product-search-rehydrate-20261011`: rehydrate live scoped products when selected row is initialized/focused/refreshed (sales and purchases), preserve selected archived/historical product and existing quantities/prices, robust Unicode Persian text filtering by name/code/spec, render product popup in document body to escape table clipping; version `js/ux-hardening-r2.js?v=20261011-product-refresh-v3`.
225 - Independent Windows remote Desktop Commander `DESKTOP-71SJ63M`: `node scripts/syntax-check.mjs` PASS (54 JS/50 MJS); `node scripts/ux-hardening-r2-check.mjs` PASS; `npx playwright test scripts/ux-hardening-r2.spec.js --reporter=line --workers=1` PASS 6/6 (real Chromium). Screenshot fixtures `qa-product-search_block.png` and `qa-product-search_cement.png` demonstrate visible two-result dropdowns, real purchase/search selection event and price/unit population, scoped user visibility. Screenshots contain synthetic test data, **not real production customer items**.
226 - PR #69 exact head `9281d7a078144302df4dbf23a066dc11e49a4a97`: GitHub Quality `38134885163` SUCCESS, Security `38134885100` SUCCESS. Initial red run `38134614070` was due to an incorrect test expectation that `سیمان` must match only cement; `بلوک سیمانی` legitimately matches too. Regression corrected with precise product selection; subsequent CI green.
227 - No schema, RLS, Auth, roles, tenant membership, Supabase records, invoices, posting, or production data changed. Caveat: user's actual authenticated product master and post-merge site cache/live refresh NOT YET VERIFIED at this checkpoint. Verified after merge: PR #69 merged as `7a3f1f7703ff128bcbbf0906e44889b2833e3dd7`; exact SHA main Quality `38135114282` SUCCESS, Security `38135114272` SUCCESS, Release gate `38135220443` SUCCESS, gated Pages deployment `38135239645` SUCCESS; `CNAME` maps Pages to `factoreasy.ir`. Remote Windows Desktop Commander remains connected and Chromium controlled 6/6 PASS, but attempted Windows interactive desktop capture returned `CopyFromScreen: The handle is invalid`, and direct DNS resolution of `factoreasy.ir` failed from remote and sandbox environments. Thus **a real authenticated user-session product-list lookup and domain HTTP inspection are NOT VERIFIED**; do not claim them. Screenshot artifacts were created only on the authorized remote QA machine, with synthetic inputs, and visually returned to the user in chat. No user finance data was changed. Exactly one safest next action: owner hard-refreshes the deployed site and searches a known real product such as `هارد` in invoice item box; if it still fails, capture screenshot plus browser Console error without sharing credentials.
228
229 ## 2026-10-11 invoice print Persian-digit consistency — owner request
230 - Owner reports mixed Persian/Latin glyph digits on printed invoices, including invoice number and trailing digits of date. Requested consistent Persian numerals everywhere in invoice print. **MERGED / MAIN QUALITY+SECURITY+RELEASE+PAGES VERIFIED / LIVE READ-ONLY CHROMIUM QA PASS**.
231 - Baseline main `7eccf2757c99ea19ede3bac98847be0d2b0782b3`. Scope: all human-readable digit text in regular formal/non-formal/pre-invoice and official taxpayer invoice print/preview (including page counters, monetary amounts, numbers, IDs embedded as visible labels) while retaining original ASCII serial/ID/date values in storage, attributes, URLs, machine integrations and journal calculations. No financial/database/RLS/auth/write changes.
232 - Required checks: verify exact live browser print and PDF DOM, synthetic values with mixed Latin, Eastern Arabic and Persian digits; ensure no Latin/Eastern-Arabic decimal glyphs remain in printable text, numeric totals intact, sensitive URL/attributes unchanged, preview and isolated iframe consistent, multi-page invoices intact. Final CI and gated Pages deployment only if tests pass. Rollback: revert specific PR.
233 - Verified implementation on branch: `js/print.js` normalizes only rendered text nodes in preview, iframe/PDF, taxpayer and ordinary invoices; `js/purchases.js` applies same safe shared formatter to popup output. `index.html` cache-busts both bundles. Underlying values `PINV-31` and mixed `۱۴۰5/٠۷/19` remain unchanged in datastore; displayed `PINV-۳۱`, `۱۴۰۵/۰۷/۱۹`. HTML attribute/code remains literal `TAX12A340`; visible human-readable digits become Persian. No data/permission mutations.
234 - On Windows remote `DESKTOP-71SJ63M`, isolated test server explicitly verified new asset (port 51867, avoiding occupied 4173/4175). `node scripts/syntax-check.mjs` passed 54 JS + 50 MJS, `node scripts/ux-hardening-r2-check.mjs` PASS, `npx playwright test scripts/taxpayer-print.spec.js` PASS **4/4 real Chromium** (official taxpayer landscape, image readiness, formal/nonformal/taxpayer digits, purchase popup) including PDF one-page assertions. Separate formal invoice screenshot `print-persian-formal-qa.png` captured via remote browser, text-node scan reports **0 Latin/Arabic-Indic decimal glyphs**. Screenshot uses only synthetic information, not real customer invoice.
235 - PR #71 initial head `f9129f5dc6fc52a78e76aa5e9bfe21b383926efd`: Quality `38142219556` **SUCCESS**, Security `38142219616` **SUCCESS**. Pending merge, main gated CI/Pages deployment, and owner-authenticated print check with actual production invoice. No change to tax ID submission, serial storage, numeric math, RLS, schemas or real accounting entries.
236
237 ### Persian print digits — final release verification 2026-10-11
238 - PR #71 merged into protected `main` at exact commit `991c61f70980518e1b9570984108b0fbab025fd2`. Same-SHA main GitHub Quality `38142480225` **SUCCESS**, Security `38142480264` **SUCCESS**, Release gate `38142569490` **SUCCESS**, Pages deployment `38142585021` **SUCCESS**.
239 - Independent remote desktop `DESKTOP-71SJ63M` GET `https://factoreasy.ir/?printDigitsQa=20261011` returned **HTTP 200**, exact deployed assets `js/print.js?v=20261011-persian-print-v1`, `js/purchases.js?v=20261011-persian-print-v1`, and fetched print bundle contains `localizePrintHtmlDigits`. Headless Chromium loaded the **real production domain's code**, generated a synthetic formal invoice without logging in, and inspected actual isolated printable text: **PASS, zero remaining ASCII/Eastern Arabic decimal digit glyphs**; original serial `PINV-31` and date `۱۴۰5/٠۷/19` remained untouched while human-visible print uses `PINV-۳۱`, `۱۴۰۵/۰۷/۱۹`. Remote screenshot `print-persian-formal-qa.png` was returned inline to owner; image is local QA artifact, not saved in repository.
240 - Scope caveat: production user-authenticated real customer printer test, printer-driver headers and actual hardcopy **NOT VERIFIED**. No real invoice save/edit or financial data change, no schema/auth/RLS/permission change. Owner can hard-refresh then print-preview any existing saved invoice as a safe final visual check. Rollback: revert PR #71, redeploy gated Pages, and clear browser cache.
241
242 ## 2026-10-11 owner-approved eight-phase roadmap — initiation
243 - Owner explicitly approved the proposed eight-phase Finora roadmap: Phase 0 stabilization/bug triage; Phase 1 security, identity and data integrity; Phase 2 ledger and accounting; Phase 3 commerce/inventory/treasury integration; Phase 4 Iran tax/reporting; Phase 5 integrated acceptance/V1 release; Phase 6 advanced business modules; Phase 7 group/industrial/international extension. **APPROVED PLAN / PHASE 0 BASELINE RECONCILIATION STARTED — NOT V1 ACCEPTED**.
244 - Baseline protected `main` = `4071072bc457fede62097eb2300ca35b8f516939` (PR #72 final Persian-print evidence). Last exact-head GitHub Quality `38142829987`, Security `38142829957`, Release gate `38142911889`, gated Pages `38142924226`: all SUCCESS. Supabase Finora `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY, 80 migrations (last `20261007165208 phone_identity_profile`), advisor signals: 21 privileged-function execution WARN, 3 RLS no-policy INFO, one leaked-password protection WARN. Open PRs #6, #28, #39, #40, #43, #49, #57, #58 remain open; do not merge stale/sensitive code by default.
245 - Deliverables generated and independently read back: `docs/FINORA_EIGHT_PHASE_APPROVED_ROADMAP_2026-10-11.md` (exactly eight stages 0–7, owners/dependencies/acceptance, sensitivity boundaries) and `docs/FINORA_PHASE0_BASELINE_2026-10-11.md` (8 evidence-ranked F0 tests, current verified baseline, remaining blockers). Phase 0 **ACTIVE, NOT ACCEPTED**. Remote Desktop Commander `DESKTOP-71SJ63M` read-only production GET: `factoreasy.ir` **HTTP 200**; exact UX combobox, Persian print and login diagnostic versioned assets found; GET both product and print JS **200**, helper functions present. No authenticated real-user production tests performed in this checkpoint. No schema, RLS, authentication, roles, credentials, posted records, payments or production data writes. Approval of roadmap does not authorize sensitive actions. **Next bounded execution:** `F0-03` isolated invoice persistence test, owner-context `F0-01/F0-02/F0-04` as safe authenticated smoke, then close repro defects with PR/QA evidence.
246
247 ## 2026-10-11 Phase 0 F0-03 execution restart — invoice persistence QA
248 - User explicitly asked why work stopped and then whether execution stopped; resume active authorized Phase 0 work without requiring further approval for isolated tests. Phase 0 roadmap PR #73 merged at `836991e895e56b8b7e76a4976d0f9c0f5f43c294`, Quality `38146926629`, Security `38146926660`, Release gate `38147024208`, Pages `38147052590` all SUCCESS on same SHA. Connected Desktop Commander `DESKTOP-71SJ63M` online.
249 - **CURRENT STAGE: F0-03 CONTROLLED CHROMIUM QA PASSED 2/2 — AUTHENTICATED PRODUCTION STILL UNVERIFIED.** Test real invoice form save → asynchronous sync via fake in-memory server RPC → page reload/pull → edit → reload → print, plus rejected RPC/visible retry. Run against locally-served repository; never post invoices to real Supabase, alter finance data, or collect login secrets. Owner-authenticated production result remains NOT VERIFIED. Next: create test, execute on remote Windows, fix, rerun, CI gate; update ledger with exact evidence and unresolved issues.
250
251 - F0-03 regression added: `scripts/phase0-invoice-persistence.spec.js`. Windows Desktop Commander `DESKTOP-71SJ63M` served isolated repository on local port 51867; `npx playwright test scripts/phase0-invoice-persistence.spec.js --reporter=line --workers=1 --timeout=25000` **PASS 2/2 in real Chromium**. Scenario 1 uses `pre_invoice` so the test does not post financial ledgers: save→mock server RPC→reload→edit→reload→print, totals 3,000→4,500, unchanged ID and exactly one server invoice, zero journal vouchers. Scenario 2 returns a transient error from fake `finora_sync_records`, verifies retry and no duplicate. `node scripts/syntax-check.mjs` **PASS 54 JS + 50 MJS**. Early test harness failures arose from intentionally hidden native selectors replaced by commercial combobox (not evidence of app save failure); fixed fixture to dispatch form change handlers. No actual Supabase/RLS/auth/real invoice write performed. **Next gate:** GitHub PR full Quality+Security and release, then owner-authenticated isolated invoice lifecycle and real affected ISP login remain pending.
252
253 ### 2026-10-11 F0-03 final protected-main CI and deployment verification
254 - Owner asked whether execution stopped; resumed F0-03 rather than closing after roadmap planning. PR **#74** merged to `main` at exact SHA `5f05ea340b37569c78cdfe7ec54c212f22ae3e29`. The changes are **regression test + CI test-list + phase ledger only**; invoice application source code and production Supabase records unchanged.
255 - Same-SHA GitHub workflows: Quality `38154361473` **SUCCESS**, Security `38154361524` **SUCCESS**, Release gate `38154485595` **SUCCESS**, gated Pages `38154503667` **SUCCESS**. An earlier duplicate release gate was canceled and earlier Pages job skipped due to workflow concurrency; only these successful runs certify release.
256 - Remote Desktop Commander `DESKTOP-71SJ63M` real Chromium: `npx playwright test scripts/phase0-invoice-persistence.spec.js --reporter=line --workers=1 --timeout=25000` **PASS 2/2 (25.31 s)**. Control sample pre-invoice QA-PINV-0001 saved to disposable fake server, reloaded and edited (3000→4500), persisted once; second sample survived one injected RPC network failure and retry without duplication. No real finance history, live Auth/RLS, Stripe, production data or schema changed.
257 - **Phase 0 remains OPEN / F0-03 controlled QA passed, production-authenticated verification OPEN.** Next: test owner-authenticated sign-in network fault `F0-01`, live tenant product selection `F0-02` and existing invoice print `F0-04` on authorized user session, plus safe-scope actual server persistence for F0-03 if separately authorized. No claim of real live invoice save success.
258
259 ## 2026-10-11 owner screenshots — UI close, admin direct user, dashboard drilldowns and controlled posting
260 - Owner supplied current production screenshots: `finora-org-access-modal` «بستن» fails and similar modal close buttons across modules; central admin licenses lacks owner-provisioned new user; dashboard financial KPI and recent journal cells lack account→journal drilldown; standard sale invoice save currently auto-posts directly via `jePostSourceRecord`, preventing ordinary pre-finalization edit.
261 - Work ownership and dependency: **QA/UX** first fixes modal close with real-browser regression; **reporting/UX** implements read-only rollups and traceable recent journal drilldown, with accounting balance invariants; **security/auth** assesses stale PR #58 and designs server-side administrator provision with no client service key; **finance architecture** defines draft/review/posted lifecycle and migration/reversal gate before touching live invoice posting semantics. Implementation of the last two is not implied complete by UI-only release.
262 - User has requested these features, but **no permission to create a real third-party account right now, assign admin permissions, rewrite posted financial records, change production RLS/schema without a separately reviewed gated procedure, or send any credentials**. Existing historical posted source records remain immutable. A rollback-able UI PR and independent browser QA precede deployment.
263
264 ### 2026-10-11 controlled UX acceptance — modal + dashboard (Phase 0)
265 - Implemented delegated click capture for dynamically rendered `.modal-backdrop.active` closing buttons «بستن»، «✕ بستن» and «انصراف» plus backdrop clicking. This prevents broken inline handlers from trapping the user and never changes stored state. Implemented keyboard-operable cards for assets, cash/bank, receivables and payables; journal-derived asset/cash account drilldown, source voucher/line navigation and the five newest journal rows. Uses scoped getters + existing P6Reports; **read-only**. Dashboard cash KPI currently uses one primary cash account; the expanded ledger explicitly distinguishes related bank/cash/petty accounts rather than silently changing the amount.
266 - Remote `DESKTOP-71SJ63M` live Chromium against locally served repo: `npx playwright test scripts/phase0-modal-dashboard.spec.js --reporter=line --workers=1 --timeout=20000` **PASS 2/2 (9.9 s)**. `node scripts/syntax-check.mjs` PASS (54 JS/50 MJS). Tests cover close/dynamic/overlay and dashboard asset→account→voucher, cash Enter, recent voucher navigation. Added suite to GitHub Quality; PR CI and production release pending at time of writing.
267 - Real owner desktop visual recheck is still required. Outstanding admin direct provisioning and draft/post/final document manager remain separately gated; no permissions, credentials, auth, schema or posted financial data changed.
268
269 ## 2026-10-11 owner-approved searchable selectors + F2 keyboard workflow (Phase 0)
270 - User explicitly directs full implementation in production of unified live search for products/services, persons and all applicable large selection controls; ArrowDown/ArrowUp list navigation with visible selected highlight, mouse-wheel scrolling and Enter selecting the **active** choice (not hard-coded first match); keyboard F2 across supported entry forms must validate/save or approve the active form as appropriate, show *specific reason* when blocked, avoid trapping focus or global Enter accidentally saving, and close successful entry dialogs. Baseline `59c904623d0e8e067ee1c02e3169167bcc04841b`.
271 - **In progress / not yet deployed**. Keep existing `Ctrl+S`, `Ctrl+Enter`, optional Enter-save, purchase/sale behaviors, tenant filtering, print formatting, and product rehydration. F2 in sales invoice must save a draft and **must not post/finalize** financial journal; posting requires explicit user permission and separate confirmation under Accounting→Document Management. F2 must never blindly click a destructive or financial-finalization action.
272 - Validation: isolated Chromium dynamic product/person picker, Persian normalization, ArrowUp/Down/PageUp/PageDown and Enter, wheel scrolling, Escape, unrelated Enter, F2 supported forms success/failure incl correct messages and no action in unsupported dialog; exact GitHub Quality+Security gates and Pages deployment; owner-authenticated live finance data remain untouched.
273
274 ### 2026-10-11 keyboard navigation/F2 controlled verification checkpoint
275 - Implementation: `js/ux-hardening-r2.js` now tracks highlighted item in each integrated combobox with ARIA listbox active-descendant, filtered search, ArrowUp/ArrowDown, PageUp/PageDown, Home/End, mouse-wheel scrolling and pointer hover; Enter chooses the highlighted exact item rather than first result. Product dropdown remains safely portaled out of clipped invoice table; underlying filtered tenant catalog, price/unit change handlers and Persian normalization preserved.
276 - F2 routes the active entry view through existing dedicated validation/save handlers (sales invoice, purchases, goods/services, contacts, cheques, expenses, accounting draft journal, default settings, company form when focused). Missing rows, missing product/contact names, invalid native controls and unsupported views explain the block. An active modal is not silently approved via keyboard; modal-specific confirmation must use its own safe action. **Sales F2 creates a draft only; it never finalizes the accounting posting.** Purchases currently auto-post when saved in existing code, so F2 **requires explicit user confirmation** before invoking purchase Save; refusal performs no operation. Ctrl+S and Ctrl+Enter remain available.
277 - Independent Remote Desktop Commander `DESKTOP-71SJ63M`, cloned exact branch commit `cd5e04408d81eacaf66be97ee9d2b89d85e22915`, `node scripts/ux-hardening-r2-check.mjs` PASS, `node scripts/syntax-check.mjs` PASS (55 JS/52 MJS), Chromium `npx playwright test scripts/ux-keyboard-f2.spec.js scripts/ux-hardening-r2.spec.js scripts/accounting-document-workflow.spec.js --reporter=line --workers=1` **14/14 PASS (19.7 s)**. Real app invoice fixture verifies F2 rejects empty line and saves one formal **draft** with zero journal vouchers. Other tests cover product/person matching, Arrow+Enter selected not first, 48-product wheel/PageDown/Home/End, Escape, F2 form/unsupported modal/company/default settings/purchase explicit confirmation. Synthetic QA data only; no owner accounts or financial writes.
278 - **IMPLEMENTED / MERGED / PROTECTED-MAIN CI & RELEASE / DEPLOYED / READ-ONLY LIVE ASSET VERIFIED.** PR #83 merged to `main` SHA `641b68669057ef429ae158744a86cba9a00dca31`; exact-SHA main Quality `38173607090` SUCCESS, Security `38173607091` SUCCESS, Release gate `38173716820` SUCCESS, gated Pages `38173732898` SUCCESS (skipped/cancelled duplicate workflow runs were not used as evidence). Independent Desktop Commander `DESKTOP-71SJ63M` real Chromium after checkout of **exact main merge commit**: `scripts/ux-keyboard-f2.spec.js` + `scripts/ux-hardening-r2.spec.js` **PASS 12/12 (6.0s)**; `node scripts/ux-hardening-r2-check.mjs` PASS; `node scripts/syntax-check.mjs` PASS (55 JS + 52 MJS). Remote GET `https://factoreasy.ir/?keyboardQa=20261011` HTTP 200 and exact referenced deployed `js/ux-hardening-r2.js?v=20261011-combo-keyboard-f2-v5` HTTP 200; JS body verified `finoraConfirmActiveFormF2`, active-option ARIA, wheel, PageDown and F2 listener all present. **User-authenticated actual existing-goods list and physical keyboard on owner's browser remain UNVERIFIED**, and not every optional module has an unambiguous save action: when F2 cannot safely determine one, it explains the reason instead of triggering posting/destructive actions. No schema/RLS/auth/roles/posts/customer financial data changed. Rollback: revert PR #83 and redeploy previous UX bundle `v=20261011-modal-close-v4`.
279
280
281 ## 2026-10-12 Phase 0 F0-05 independent 1000+ selector stress — PLANNED
282 - **Owner request:** Continue approved Phase 0 without repeating PR #83 or changing production data. Baseline `main` SHA `27170e0291496997a6118b0e72978f852e015a86`; historical PR #83 keyboard/F2 is already deployed. Phase 0 remains OPEN.
283 - **Accountable owner:** QA/Validation. Scope: disposable Chromium fixture with 1,200+ tenant-scoped product and contact choices; Persian/Arabic normalization; code/spec lookup; Arrow/Enter/Home/End/wheel/Escape; selection persistence; absent and cross-tenant negative cases; measured browser interaction responsiveness. Chapters: 14, 251, 259, 260 (with 252/253 security/event contracts).
284 - **In scope:** `scripts/phase0-selector-stress.spec.js` and Quality workflow gate; minimum source UX correction only if the test reproduces a defect. **Out of scope:** Supabase writes/migrations, Auth/RLS/roles, secrets, actual user or financial data, postings, invoice finalization and live user-session claims.
285 - **Acceptance/evidence:** Run new Chromium test, syntax/static/regression checks, GitHub PR Quality + Security; report observed time budgets, exact SHA/run and any failures. Controlled browser PASS does not close F0-05 owner-authenticated acceptance. Rollback: revert isolated QA PR; no operational/DB rollback required.
286 - **Status:** SPECIFIED / implementation and CI pending. Next action: add bounded independent stress regression, execute and triage failures.
287
288
289 ### 2026-10-12 F0-05 initial Chromium/CI verification — CONTROLLED_QA_PASSED; OWNER E2E OPEN
290 - Baseline protected `main`: `27170e0291496997a6118b0e72978f852e015a86`. GitHub official connector verified current repo and approved Phase 0; master 260-chapter DOCX SHA-256 `f445ec30b395319aece8bd7eb7d98e80bd4655eff6cc81b0253688b551bbc29b` matched handoff. Chapters 251/259/260 and related scope consulted. Previous PR #81, #82, #83 and #84 independently confirmed merged; no feature recreated.
291 - Live read-only Supabase project `hcsixhqbyuhpshfwqpjx`: ACTIVE_HEALTHY, **81** migration history rows, newest `20261011174445 posted_source_idempotency_index`; security advisors 21 authenticated SECURITY DEFINER WARN, 3 private C8 RLS/no-policy INFO, 1 Auth leaked-password WARN. Warnings not treated as exploitable without detailed review.
292 - PR #86 `qa/phase0-f005-selector-stress-20261012`: adds synthetic 1,208-product and 1,206-contact negative/positive browser regression + required CI gate; no product runtime, Supabase, credentials or financial mutation. Initial head `193b03ddcef33aa06f5dfc936d14626d875be7f7`: GitHub Quality run `38202818187`, static job `114659716442`, **83/83 real Chromium tests PASS (55.8s)** including both F0-05 cases; three disposable database jobs SUCCESS. Security run `38202818169`: CodeQL + release safety PASS; dependency review skipped due disabled graph. Measured interaction latencies now logged by revised test for next run.
293 - Acceptance boundary: F0-05 **CONTROLLED_QA_PASSED**, not AUTHENTICATED_E2E_PASSED / RELEASED / OWNER_ACCEPTED. Actual owner network, tenant catalog, real printer, dual-role access and safe server invoice persistence remain independent Phase 0/1 gates. No claim that 260 chapters are implemented. Rollback: revert QA-only PR. Next: confirm revised-head CI; merge reviewed QA-only test if green; keep Phase 0 OPEN.
294
295
296 ### 2026-10-12 F0-05 final protected-main promotion — RELEASED QA GATE / PHASE 0 OPEN
297 - Approved Phase 0 independent test-only PR **#86** merged by squash to protected `main` exact SHA `a3c7dac165d1c451c635546eecff47e0aaaf562e`; GitHub connector re-fetched `main` after merge and verified the SHA. Files: `scripts/phase0-selector-stress.spec.js`, `.github/workflows/quality.yml`, `docs/FINORA_PHASE0_BASELINE_2026-10-11.md`, `PROJECT_STATE.md`. No production UX/accounting code, schema, RLS, roles, auth or financial data changed. Existing PR #83 searchable/keyboard/F2 stays intact.
298 - Revised PR head `31d577843440d712db14d1a41658dd2ed2c9a23f`: Quality `38203000078` SUCCESS including static `114660293763` **83/83 Playwright Chromium tests in 57.6 s**, product and person stress both PASS, all three disposable DB jobs SUCCESS; Security `38203000075` SUCCESS (CodeQL and release safety; Dependency Review skipped because Dependency Graph is not enabled). Browser-side synchronous input-to-filter times in the GitHub QA runner: **9.6 ms** (1,208 scoped products), **72.7 ms** (1,206 synthetic contacts via metadata search). These are samples on CI hardware, not an SLA or production-user measurement.
299 - Same-SHA protected `main` `a3c7dac165d1c451c635546eecff47e0aaaf562e`: Quality **`38203171552` SUCCESS**, Security **`38203171658` SUCCESS**, Release gate **`38203282658` SUCCESS**, gated Pages **`38203309936` SUCCESS**. Duplicated Release `38203264704` cancelled and Pages `38203301879` skipped; neither counted as successful evidence. Deployment is verified at the GitHub Actions boundary, not owner-authenticated browser/runtime/ISP.
300 - Classification: F0-05 **IMPLEMENTED / CONTROLLED_QA_PASSED / RELEASED regression coverage**. **AUTHENTICATED_E2E_PASSED and OWNER_ACCEPTED remain UNVERIFIED** for real account catalog, desktop performance and live tenant RLS; Phase 0 remains **OPEN** due to F0-01/F0-02/F0-03/F0-04 and the remaining cross-role/print/UI gates. Security advisor findings 21 SECURITY DEFINER, 3 C8 no-policy and disabled leaked-password protection remain review-only/open (no changes made).
301 - This is a documentation-only closing note, no change to release assets or database behavior. Next safest action: continue remaining independent read-only Phase 0 checks, then perform legitimate owner-authenticated login/catalog/print smoke without credentials in chat; avoid production financial postings. Rollback of the regression/test slice is PR #86 revert if needed.
302
303
304 ## 2026-10-12 Phase 0 acceptance execution kickoff — OWNER REQUESTED / IN PROGRESS
305 - **Instruction:** Owner explicitly requests beginning phase acceptance now ("تایید فاز رو استارت بزن"). This starts acceptance verification of approved **Phase 0**, **not** automatic acceptance or promotion of any later phase. Accountable owner: QA/Validation; coordinating manager handles integration.
306 - **Verified baseline at initiation:** protected `main` SHA `601a5b7b066ce4cf7e68fad2abe642c3e846cdd3`; same-SHA GitHub Quality `38203575835`, Security `38203575840`, Release `38203689209`, gated Pages `38203706432` all SUCCESS. Supabase `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY. No claim of owner-authenticated production proof from these CI gates.
307 - **Authorized bounded first slice:** inspect existing Phase 0 acceptance evidence; audit open historical PRs against current main **read-only** to prevent stale fixes; create a test/evidence-based acceptance register and categorize each F0-01..F0-08 as controlled-QA-only, awaiting real user session, or blocked. Read-only live HTTP/JS smoke if accessible; document and run any zero-mutation test suitable for available tools. Use reviewable documentation-only branch/PR, verify CI and update this ledger with final evidence.
308 - **Not authorized / out of scope:** creating users, entering owner credentials, changing Auth/RLS/schema/roles, posting/reversing production ledger, destructive test data or financial history, merging stale PRs, paid services or declaring Phase 0/V1 accepted without authenticated owner checks and explicit acceptance.
309 - **Currently known open gates:** `F0-01` affected-ISP sign-in, `F0-02` existing tenant product/contact lookup, `F0-03` real safe-scoped server persistence, `F0-04` actual saved-invoice PDF/print; `F0-05` synthetic 1,208/1,206 Chromium regression green and deployed, but owner-authenticated test unverified; `F0-06` full UI review, `F0-07` tenant/roles security, `F0-08` PR audit pending. **Phase 0 = OPEN / ACCEPTANCE CHECKS STARTED**.
310 - **Exit:** concrete `docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md`, verified open-PR disposition, linked CI/risks/blockers and explicit next safe action. Rollback: revert docs-only PR; no runtime or database rollback needed.
311
312
313 ### 2026-10-12 Phase 0 acceptance evidence + F0-08 first read-only audit — DOCUMENTED / NOT PHASE ACCEPTED
314 - Branch `qa/phase0-acceptance-start-20261012` created from protected main `601a5b7b066ce4cf7e68fad2abe642c3e846cdd3`; after the owner request was recorded above, created `docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md` containing the F0-01..F0-08 gate matrix and owner-safe smoke protocol. This is documentation and review evidence only.
315 - Exact baseline GitHub Quality `38203575835` SUCCESS (static job `114662032710`: syntax 55 JS / 52 MJS, Golden accounting, **83/83 Chromium PASS** and 3 disposable DB jobs); Security `38203575840`, Release `38203689209`, Pages `38203706432` all SUCCESS. Remote Desktop Commander online; authorized device read-only PowerShell GET `factoreasy.ir` returned HTTP **200**, no authenticated business verification.
316 - Supabase project `hcsixhqbyuhpshfwqpjx` healthy with 81 migrations (latest `20261011174445 posted_source_idempotency_index`); advisors 21 SECURITY DEFINER WARN / 3 private RLS-no-policy INFO / 1 leaked-password WARN, not proven vulnerabilities. Live phone-identity migration `20261007165208` has no corresponding archive file on current main; proposed migration file remains in stale PR #58. No database changes performed.
317 - F0-08 first independent scan: **9** open GitHub PRs, all diverged from main. Preliminary buckets: old documentation probably superseded #28/#43/#49; UI inspection required #39/#40/#57; sensitive financial/identity manual review #6/#58/#80. None merged or closed; no user/security/finance changes. Owner-authenticated sign-in F0-01, real tenant search F0-02, real safe-scope invoice save F0-03, real printing F0-04, true access F0-07 remain NOT VERIFIED. F0-05 controlled product/person 1,200+ stress PASS but full real context open.
318 - **Status:** acceptance started and register independently read back; PHASE 0 OPEN, NOT OWNER-ACCEPTED. Next: review acceptance documentation PR with exact-head CI; then collect approved existing-user login/catalog/print test evidence, addressing actual reproducible bugs before phase signoff. Rollback: docs-only PR revert.
319
320 - **Additional Phase 0 live asset check:** On authorized remote PC, separate read-only HTTP GETs returned 200 for deployed `js/login-connectivity.js`, `js/ux-hardening-r2.js`, and `js/print.js`; this does not establish exact cache-version parity, real sign-in, tenant catalog, invoice data or printer acceptance. The acceptance register records this evidence. PR #88 initial head Quality `38211055354` and Security `38211055404` **SUCCESS**; later head must rerun gates after this documentation update. No runtime/DB/auth/financial changes.
321
322
323 ### 2026-10-12 Phase 0 acceptance register — protected-main promotion verified / PHASE 0 OPEN
324 - Owner acceptance kickoff documented and reviewed in PR **#88** (`docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md` plus append-only `PROJECT_STATE.md`); PR Quality `38211223226` SUCCESS and Security `38211223103` SUCCESS, including three disposable DB jobs and real Chromium regression suite. Squash merged to protected `main` at SHA **`5c2a5bf263f7a3bfe5a6b2e99cba5c8e5443db04`**. Neither the product runtime nor production Supabase was modified in this docs-only change.
325 - **All protected-main gates on this exact SHA:** Quality `38211377516` SUCCESS, Security `38211377395` SUCCESS, Release gate `38211501537` SUCCESS, gated Pages `38211523493` SUCCESS. Duplicate Release `38211497461` cancelled and Pages `38211511555` skipped; these duplicates were **not** counted as passing.
326 - Confirmed persistent `main` acceptance register read back, with F0-01..F0-08 status matrix, nine old PR dispositions, Supabase migration/security-advisor read-only evidence and no unauthorized mutation. Remote read-only HTTP smoke confirmed `factoreasy.ir` plus `js/login-connectivity.js`, `js/ux-hardening-r2.js`, `js/print.js` HTTP 200 from authorized device. No user-authenticated login, real tenant query, true server invoice save, actual printer, dual-account RLS or precise served asset-version parity is claimed.
327 - **Current decision:** PHASE 0 ACCEPTANCE STARTED / **NOT OWNER-ACCEPTED**. Continue F0-01 owner-ISP login first, F0-02 live catalog/person search, F0-04 print-existing-invoice visual check, then separately authorized isolated safe F0-03 write/read and F0-07 second-account permission proof. F0-05 stress controlled test passed but live tenant acceptance open; F0-06 UI visual review and F0-08 old PR final disposition remain. No code, schema, role, auth, finance or account changes allowed by this docs-only checkpoint. Rollback: revert PR #88 (or the acceptance documentation slice only).
328
329
330 ## 2026-10-12 Phase 0 F0-04 owner screenshot: remove draft watermark from printed invoices — FIX REQUESTED / IN PROGRESS
331 - **Owner direction:** The attached photograph of an actual printed sale-goods/services invoice shows a pale diagonal header overlay `پیش‌نویس — غیرقطعی`. Remove that overlay from all ordinary invoice printouts (formal, informal, pro-forma, purchase where applicable), without interrupting ongoing Phase 0 acceptance. The owner requests a clean full invoice layout independent of document draft status.
332 - **Baseline:** protected `main` `5c2a5bf263f7a3bfe5a6b2e99cba5c8e5443db04`; Phase 0 acceptance register from merged PR #88 is present. Investigation isolated overlay to `js/print.js` `renderAndPrintDirect` lines building `draftMark` and prepending it to `stageInvoicePrint`. Print-preview isolated frame and printable container both use that string. Taxpayer/electronic document printing has a separate explicit post/finalization check and remains unchanged.
333 - **Accountable:** implementation/print with independent QA. **Narrow authorized scope:** remove display watermark only; add browser regression asserting clean formal draft and a pro-forma/non-formal printed page still contains all invoice content, amounts, and unchanged financial draft status. Preserve `invoiceDocumentStatus` / posting gate, electronic taxpayer safeguards, numeric formatting, pagination, dimensions, signature areas, invoice saving/editing and report status. Change `index.html` print asset cache key to force deployment refresh. Add regression to existing Quality suite, PR gates and gated deployment verification.
334 - **Forbidden:** changing stored draft/posted status, auto-posting, RLS/Auth/schema/roles, financial data, Supabase, legal/tax declarations, closing Phase 0 by inference. Recheck with owner's real printed invoice remains separate F0-04 authenticated acceptance gate. Revert the targeted PR for rollback if necessary.
335 - **State:** REPRODUCED IN SOURCE / IMPLEMENTATION STARTING. Phase 0 acceptance stays OPEN.
336
337
338 ### 2026-10-12 F0-04 owner photo → fixed print → gated live release — PHASE 0 STILL OPEN
339 - Owner supplied real photograph of an ordinary sales/goods-services invoice stamped by a pale `پیش‌نویس — غیرقطعی` header watermark; requested its removal across ordinary invoice variants **before continuing Phase 0 acceptance**. Confirmed `js/print.js` `renderAndPrintDirect` injected `draftMark`, irrespective of invoice content; the purchase-specific popup already had no watermark.
340 - **Fix delivered:** PR [#90](https://github.com/davoodmehraban89/Factor-easy/pull/90), squash merged to protected `main` exact SHA **`8a0023c53f0c14b0063ab771fdb3669a05997387`**. Ordinary invoice print now uses clean complete `stageInvoicePrint(containerHtml,spec)`. Cache-busted `js/print.js?v=20261012-clean-invoice-print-v1`. No changes to draft/posted state, financial postings, taxpayer explicit finalization rule, data, Auth, RLS, schema, roles or money formatting. Revert PR #90 and redeploy for rollback if needed.
341 - **Independent controlled regression:** corrected PR head `72a69b372ef59ffbb7dddebf81d64304b3559b04` Quality `38212287209` SUCCESS (83/83 real Chromium, includes *formal draft* preview+isolated iframe without watermark, subtotal/number retained, draft state and zero vouchers, pro-forma print; Golden financial invariants and 3 disposable DB jobs PASS); Security `38212287223` SUCCESS. Initial static CI failed because its historic assertion **required** the old watermark; intentionally inverted to disallow watermark without relaxing posting safeguards, then retested green.
342 - **Same merged-main SHA production gate:** Quality **`38212519911`**, Security **`38212519908`**, Release **`38212644579`**, gated Pages **`38212680498`** all SUCCESS. Skipped/cancelled concurrent duplicates not counted. On connected authorized remote Windows device, real domain HTML references exact `20261012-clean-invoice-print-v1` bundle; fetched live JavaScript has `stageInvoicePrint(containerHtml,spec)` and **no `draftMark`**. No owner login, actual tenant invoice or physical printer test made.
343 - **Acceptance status:** F0-04 **FIX RELEASED / CONTROLLED QA PASS / LIVE BUNDLE VERIFIED**, but **OWNER-AUTHENTICATED REPRINT STILL OPEN**. Phase 0 as a whole remains OPEN; F0-01 affected-ISP login, F0-02 real tenant lookup, F0-03 safe-scoped actual Supabase persistence, F0-06 broader UI, F0-07 role isolation and F0-08 old PR final disposal retain their previous gates. Next: owner reprints same existing invoice with browser hard refresh and confirms no watermark/unchanged totals; continue remaining Phase 0 read-only checks without waiting to build new modules.
344
345
346 ## 2026-10-12 Phase 0 F0-06 follow-up — owner-directed continuation / DARK-MODE READABILITY SLICE STARTED
347 - **Latest instruction:** Continue completing the approved Finora phases. Do not promote Phase 0 until real-owner authentication/catalog/save/print and permission acceptance are actually passed. Source canonical protected main at kickoff `9e9e35cd96d294e6f6ad875a45de94a1f968e5d8`, after print fix #90 and its docs evidence #91. GitHub exact-head Quality `38213083866`, Security `38213083815`, Release `38213219253`, Pages `38213261477` all SUCCESS. Supabase `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY, 81 migrations (latest `20261011174445 posted_source_idempotency_index`).
348 - **Independent safe work chosen:** `F0-06` — verify and correct dark-mode readability (buttons/panels, inputs, typography and organizational shell surfaces) based on current runtime and stale unmerged contrast PR #57 as reference, **without merging old PR** or altering shell scroll geometry, invoice business rules, underlying data, or database. `js/ux-hardening-r2.js` currently sets dark root colors yet leaves `.accordion-item` white and `.btn-secondary` pale background inheriting light foreground; potential contrast mismatch to be independently tested with Chromium computed colors. UX owns targeted visual contract, QA owns browser contrast assertions.
349 - **Bounded implementation:** add controlled Playwright dark-mode contrast/restore regression to required Quality suite, verify before/after computed color contrast (WCAG normal-text 4.5:1 where appropriate); change theme styles only if failure reproduced; bump `index.html` bundle version; run static/GitHub Quality+Security, merge reviewed PR and verify exact protected-main release. Protect ordinary light theme and previously published printable invoice. No real tenant/browser, physical device screenshot, or owner visual acceptance is implied by controlled tests.
350 - **Restrictions:** no Auth/RLS/roles/schema, production financial data/postings, migration, financial cutoff, account creation, external costs, or unreviewed #57/#39/#40 merges. Rollback: targeted PR revert and Pages gated redeploy. **Phase 0 remains OPEN** for F0-01/02/03/04/07 and owner F0-06 UI review.
351 - **Status:** SPECIFIED / REGRESSION AND SOURCE REVIEW IN PROGRESS.
352
353
354 ### 2026-10-12 F0-06 dark-mode contrast targeted fix — PR QA PASSED / REAL OWNER VISUAL OPEN
355 - **Reproduced from source:** `js/ux-hardening-r2.js` original dark class set light `--text` but left `.accordion-item` white, `.btn-secondary` pale, and `.module-panel` white, risking unreadable text and non-dark shell; old unmerged PR #57 was reviewed as design reference but **not merged**. No structural sidebar/nav/scroll changes made.
356 - **Implemented in independent branch `qa/phase0-f006-dark-contrast-20261012`:** dark CSS overrides for card/accordion, secondary controls, form input/placeholder and disabled controls, table, combobox and module shell surfaces; retained light mode. `index.html` references `js/ux-hardening-r2.js?v=20261012-phase0-dark-contrast-v1`. Mandatory Quality includes `scripts/phase0-dark-theme-contrast.spec.js` with two real Chromium assertions (4.5:1 normal text contrast for dark accordion/button/input/shell and healthy return to light theme). `scripts/ux-hardening-r2-check.mjs` version and invariants updated; no finance, account, Auth, RLS, roles, schema, SQL or runtime navigation geometry change.
357 - **Verification:** Initial PR static-quality attempt `38217822837` failed because an existing static contract still expected `20261011-combo-keyboard-f2-v5` bundle; fixed that contract without bypassing a test, then retested branch head `176b5e42f4a26266b61c7dcd75df2803b315f695`. Final tested head Quality **`38217926742` SUCCESS** (static job `114706936848`, **85/85 Playwright Chromium PASS, 52.2s**, both F0-06 tests passing; JS syntax 55 modules/52 MJS, Golden accounting, draft/posted invariants and three disposable database jobs PASS). Security **`38217926669` SUCCESS**, CodeQL and release safety; dependency review skipped (graph disabled).
358 - **Acceptance classification:** Targeted theme contrast = **IMPLEMENTED + CONTROLLED_QA_PASSED** on branch. Owner-authenticated visual/browser acceptance of full F0-06 (RTL wheel/scroll, dark/light screens, all save/delete/import/export) is **NOT VERIFIED**; Phase 0 remains **OPEN**, all F0-01/02/03/04/07 gates unchanged. Next: finalize documentation-only branch updates, retest exact PR head, merge if gated, verify exact protected-main Quality/Security/Release/Pages + actual published JS version; do **not** call F0-06 or Phase 0 fully owner-accepted. Rollback targeted PR and gated redeploy.
359
360
361 ### 2026-10-12 F0-06 dark-mode contrast — PROTECTED MAIN GATES & DEPLOYED / PHASE 0 OPEN
362 - Owner's ongoing approved Phase 0 development continued as F0-06 isolated dark-theme usability slice. Legacy PR #57 was reviewed but **not merged**. Targeted PR **#92** implemented dark text/surface contrast for accounting panels, inputs, buttons, dropdowns and existing organizational shell, preserving light mode, shell geometry and underlying financial/data semantics. Source: `js/ux-hardening-r2.js` with cache key `20261012-phase0-dark-contrast-v1`, `scripts/phase0-dark-theme-contrast.spec.js`, static asset identity check and Quality workflow. Controlled browser checks use 4.5:1 normal-text contrast and confirm return to light mode.
363 - Branch QA final head `59e396a17ec3bfd2a2baca50384248f741a981c2`: Quality `38218215989` **SUCCESS** (85/85 Chromium including two F0-06 tests, 3 disposable DB jobs, Golden accounting), Security `38218215992` **SUCCESS**. First version check `38217822837` failed because the old static contract hardcoded the previous asset key; that control was updated and clean tests repeated, not bypassed.
364 - PR #92 merged by squash to protected `main` exact SHA **`745bdc847a3c2db22048d1d545da0fad0ae5cc67`**. On that SAME SHA: Quality **`38218505600` SUCCESS**, static job `114708817767` Chromium **85/85 PASS (51.1s)** + Golden/draft-posted safety and three disposable DB jobs; Security **`38218505535` SUCCESS**, Release gate **`38218679192` SUCCESS**, gated Pages **`38218725537` SUCCESS**. Concurrent duplicate Release `38218648536` CANCELLED and Pages `38218713325` SKIPPED, neither counted as success.
365 - Independent read-only remote proof: authorized Windows desktop `DESKTOP-71SJ63M` GET to `https://factoreasy.ir/?phase0dark=20261012` includes `20261012-phase0-dark-contrast-v1` (**True**); fetched live `js/ux-hardening-r2.js?v=20261012-phase0-dark-contrast-v1` contains dark shell and secondary-button selectors (**True / True**). This proves deployed asset parity, **not** customer-authenticated visual experience.
366 - **Acceptance:** F0-06 targeted contrast **RELEASED / CONTROLLED-QA-PASSED**; broader modal/RTL keyboard/import/export/dark-light owner UI and physical-device acceptance remains **UNVERIFIED**. F0-01/02/03/04/07 and F0-08 outstanding gates remain; **PHASE 0 OPEN / NOT OWNER ACCEPTED**. No customer data, ledger, Auth, RLS, roles, schema, Supabase migration, financial posting or paid-service changes. Rollback: revert PR #92, run gated Pages deploy, refresh cached bundle.
367
368
369 ## 2026-10-12 F0-01/F0-07 admin provisioning 400 — OWNER REPORTED / ROOT CAUSE VERIFIED / FIX STARTED
370 - **Owner request:** Screenshot of real Central Admin > New User form reporting `Edge Function returned a non-2xx status code` despite fields entered; fix the issue *before* resuming Phase 0 work. Do **not** record name, email, password, tokens, IP or request metadata from owner screenshot in project logs. Do not create a live user or change an existing password during diagnosis.
371 - **Verified live source evidence:** protected `main` `487471fe9154ff7b94fab56335ffeb000494c72a`; live Supabase project `hcsixhqbyuhpshfwqpjx`, Edge `admin-user-management` ACTIVE v3 with `verify_jwt=true`. Request log on 2026-10-12 07:13:44Z: authenticated POST to Edge returned HTTP 400; corresponding Auth Admin `/auth/v1/admin/users` returned HTTP 500, with Auth error `ERROR: organization license not found (SQLSTATE 23503)` / `unexpected_failure`. These are exact live logs, **not** guessed password, email, network or unauthorized-role failure.
372 - **Root cause:** live `public.handle_new_user()` inserts `public.organization_members` active owner BEFORE `public.licenses`; `private.enforce_organization_member_seat()` BEFORE INSERT requires license row and raises SQLSTATE 23503 if absent. Existing migrations lack the function's post-phone-identity live definition in main. Transaction fails during Auth user creation and rolls back. Actual constraints reviewed: licenses FK to profile/organization only, no membership FK; license-first ordering is valid and satisfies unmodified seat trigger.
373 - **Bounded intended correction:** add reviewed, idempotent one-function migration to reorder fresh-user bootstrap as `profiles → organizations → licenses → owner membership`, preserving all current live email/phone signup support, default `role='user'`, trial entitlements, security-definer fixed search_path and seat enforcement. Reproduce 23503 in disposable PostgreSQL fixture, then verify successful bootstrap and existing seat-limit rejection. Add safe UI parsing of Edge structured error codes and regression test so admin form no longer displays opaque non-2xx errors. Run static/Chromium, disposable DB, Security; gate on exact SHA. Production migration only after independent tests and confirmed source/version equivalence; no changes to existing user/license rows, RLS, Auth JWT verification, or financial data. Rollback: approved previous function definition (do not mutate accounts/data). No live account creation without separately approved isolated identity.
374 - **Dependent continuation:** PR #92 dark-mode work already merged into latest main; verify its exact protected-main gates before further F0-06 work. Phase 0 remains OPEN; do not claim owner E2E pass from synthetic tests or read-only diagnostics.
375 - **Current status:** ROOT_CAUSE_VERIFIED / REPRODUCE_AND_FIX_IN_PROGRESS.
376
377
378 ### 2026-10-12 F0-07 admin new-user provisioning — ROOT CAUSE FIXED IN PRODUCTION / PHASE 0 OPEN
379 - **Verified incident:** Owner's central administrator create-user request at 2026-10-12 07:13:44 UTC reached live Edge `admin-user-management` v3 (JWT verification enabled) and returned HTTP 400. Supabase Auth logs show underlying admin-user POST HTTP 500 `unexpected_failure` caused by PostgreSQL `organization license not found` (SQLSTATE 23503). No evidence this was bad internet or an invalid user-input password. Avoid reproducing the owner's personal details in logs.
380 - **Root cause independently confirmed:** Live `public.handle_new_user()` inserted owner into `organization_members` before creating trial `licenses`; existing BEFORE INSERT `private.enforce_organization_member_seat()` correctly rejected membership lacking a license. No existing account or license required repair. The guard remains enabled and unchanged.
381 - **Fix implemented in PR [#94](https://github.com/davoodmehraban89/Factor-easy/pull/94), merged to protected main SHA `e664e8fdbc77b660dfc1fedff580b206279899f3`:** new `supabase/migrations/20261012080000_fix_identity_bootstrap_license_before_membership.sql` preserves actual email/phone support and ordinary role, reorders new-user bootstrap to `profiles → organizations → trial license → owner membership`. No existing rows/permissions/role/RLS/Auth JWT behavior changed. `js/admin.js` safely renders localized structured server error rather than opaque `Edge Function returned a non-2xx status code`; cache-busted `admin.js?v=20261012-provision-error-v1`, password cleared after submit. No sensitive request/response bodies leaked.
382 - **Independent disposable verification:** identity PostgreSQL job `114713267003` first **reproduced original 23503**, then applied proposed fix and confirmed owner trial + ordinary role, **second active user blocked** by unmodified seat-limit trigger, phone-only identity support preserved; three disposable DB jobs PASS. PR Quality `38219871219` **86/86 Chromium PASS** (includes real browser Persian failure display) and Golden accounting/security invariants; PR Security `38219871204` PASS.
383 - **Same-main-SHA verification:** Quality `38220163720` SUCCESS, Security `38220163569` SUCCESS, Release `38220396895` SUCCESS, gated Pages `38220451051` SUCCESS; duplicate release canceled/skipped not counted. Migration applied through Supabase as **`20261012075507 fix_identity_bootstrap_license_before_membership`**; 82 migrations. Read-only function catalog verifies new 4-step order, original seat trigger count 1, ordinary `'user'` profile, phone support, function ACL `postgres,service_role` execute only. Deployed domain HTML references new versioned admin JS and served bundle contains safe error mapper (remote PC read-only HTTP). No test or real user was created in production; no existing financial postings or Auth account credentials were touched.
384 - **Parallel Phase 0 continuity:** previously delivered F0-06 dark/light contrast #92, exact-main Quality `38218505600` 85/85, Security `38218505535`, Release `38218679192`, Pages `38218725537` SUCCESS; actual deployed `20261012-phase0-dark-contrast-v1` version confirmed on real domain. F0-06 **targeted controlled QA/release PASS** but owner full visual acceptance OPEN. Also F0-04 watermark print #90 released but owner reprint unverified.
385 - **Current acceptance:** admin provision blocking defect **FIX_RELEASED / SOURCE+CI+MIGRATION VERIFIED**, actual authenticated admin create/retry **NOT OWNER-VERIFIED**. Owner should first check central users list to avoid duplicate, refresh and retry once with authorized personal identity, then verify ordinary role and trial; NEVER send passwords/tokens in chat. F0-01 affected ISP login, F0-02 tenant catalog, F0-03 safe real server invoice, F0-04 owner physical print, F0-05 real 1200+ catalog, F0-06 all visual controls, F0-07 dual-account RLS, F0-08 final stale PR disposition remain pending. **PHASE 0 IS STILL OPEN.**
386 - **Rollback:** restore reviewed prior `handle_new_user()` definition in a new controlled migration (but this reintroduces recorded incident; do not undo automatically). Frontend rollback via PR #94 revert/gated Pages. No data rollback necessary. Next independent safe slice: F0-08 stale PR read-only evidence or F0-06 additional visual QA; actual owner E2E tests require an authorized session and controlled scope.
387
388
389 - **F0-06 QA suite follow-up (no runtime change):** Documentation PR #95 initial Quality run `38220841194` failed **1/86** in the existing F0-06 light-mode contrast test at `button.contrast=1.56`; Security `38220841248` PASS and all three disposable DB jobs PASS. The isolated test toggled the body class and sampled immediately while the actual `.btn` CSS has a 200ms background-color transition; delayed `finoraApplyTheme` boot can also override the manually toggled class. Patched the fixture to hold the requested theme stable using a test-only `getMySettings` wrapper, use the actual `finoraApplyTheme()` transition, and poll for steady-state light-button contrast >=4.5 before asserting other surfaces. This does **not** waive the contrast threshold or alter live application CSS. Retest entire workflow on final PR head; do not merge on a red CI.
390
391
392 ## 2026-10-12 Phase 0 F0-08 stale PR disposition — OWNER CONTINUATION / IN PROGRESS
393 - **Instruction:** Owner requested to advance the approved Phase 0. Accountable: Coordination + QA. Baseline protected main `4595dafcb98185984894faacb97244cec2aa55e4`, last release PR #95 accepted and published. Owner-authenticated F0-01/02/03/04/07 and broad F0-06 remain open; we must not claim phase closure.
394 - **Selected independent safe scope:** complete `F0-08` disposition of 9 stale open PRs, preserving finance/identity/scroll issues pending separate verification. Re-read current main, inspect each historical diff, pin Supabase migration evidence read-only, correct obsolete historical status documents, then document rationale before any reversible PR closure. Do not merge stale changes, mutate live DB/Auth/RLS/roles, create accounts, change accounting, disclose secrets or reinterpret production migrations as live end-to-end acceptance.
395 - **Initial finding:** Old PR #28 proposed correcting `docs/REQUEST_WORKFLOW_WAVE4B_VERIFICATION.md` to 'merged CI green / production migration NOT APPLIED'. However **live Supabase currently records** `20261002072526 request_wave4b_scheduler_outbox_delivery`, so blindly cherry-picking #28 would preserve a false production-not-applied claim. Current main document still says 'IMPLEMENTED ON BRANCH / CI PENDING' and requires reconciliation distinguishing *migration recorded* from *full D4c delivery consumers verified*. Audit rest of document and archive precise sources.
396 - **Candidate superseded PRs to independently confirm:** #28 (Wave4b documentation), #43 (heartbeat already in AGENTS), #49 (outdated live status), #57 (dark contrast delivered by #92), #80 (admin provisioning delivered by #84/#94). Retain #6 (financial), #39/#40 (RTL scroll physical behavior), #58 (multi-change identity/migration archive drift) pending evidence. No partial/automated merging. Classification may change on inspection.
397 - **Done criteria:** reconciliation doc and PROJECT_STATE change pass Quality/Security PR gates, merge to main, optionally close only fully superseded historical PRs with reference to surviving content and audit decision, verify post-merge CI. Exit F0-08 = disposition recorded, not blanket functional acceptance. Rollback: revert docs-only changes or reopen closed PRs, no DB or finance rollback.
398
399
400 ### 2026-10-12 F0-08 nine historical PR source audit — VERIFIED READ-ONLY / DOC PR GATES NEXT
401 - Reconciled PR #6/#28/#39/#40/#43/#49/#57/#58/#80 against protected main `4595dafcb98185984894faacb97244cec2aa55e4`. Read changed filenames, relevant patches and current main. Detailed disposition and explicit risk boundaries in `docs/FINORA_PHASE0_F008_PR_RECONCILIATION_2026-10-12.md`.
402 - **Important stale-fact correction:** current main `docs/REQUEST_WORKFLOW_WAVE4B_VERIFICATION.md` said `IMPLEMENTED ON BRANCH / CI PENDING`. Historical PR #28 described CI/merged PR #27 but said production migration NOT APPLIED. Independently read 82 Supabase migration rows and confirmed `20261002072526 request_wave4b_scheduler_outbox_delivery` **present**, and read-only pg_proc catalog confirms scheduler/outbox public/private RPCs; the original SQL explicitly says **D4c destination consumers remain disabled**. Corrected current main doc with merged historical CI, live migration presence and unverified real destination delivery, not blindly cherry-picking stale PR #28.
403 - **Superseded candidates:** #28 historical QA docs (useful evidence now ported with current correction), #43 heartbeat already represented by AGENTS, #49 stale operating snapshot, #57 dark UX delivered better by #92/#95, #80 admin creation already delivered by #84/#94 with production identity bootstrap fix. Close only after this documentation PR is merged and read back; closures retain history and can be reopened. **Retain OPEN** #6 financial posted history; #39/#40 physical RTL wheel/scroll geometry; #58 phone-identity migration archive drift and privileged Auth/SMS issues.
404 - F0-08 = **PRELIMINARY SOURCE RECONCILED**, final disposition depends on exact-head Quality/Security, merged doc and individually verified closure outcomes. Main runtime code unchanged by this slice; no customer data, ledger, DB, schema/RLS/Auth/roles, edge deployments or production scheduler dispatch mutated. **PHASE 0 OPEN** regardless of F0-08.
405
406
407 ### 2026-10-12 F0-08 historical PR dispositions — VERIFIED / FIVE CLOSED / FOUR AUDIT BLOCKERS OPEN
408 - Follow-through on owner's instruction to advance Phase 0: PR [#96](https://github.com/davoodmehraban89/Factor-easy/pull/96) reconciled current source and nine historical open PRs, corrected `docs/REQUEST_WORKFLOW_WAVE4B_VERIFICATION.md` from obsolete "CI pending" to *historical merged CI / current production migration recorded / D4c external consumers NOT VERIFIED*. Read-only Supabase has 82 migrations, including `20261002072526 request_wave4b_scheduler_outbox_delivery`, and live scheduler/outbox RPCs exist. This does **not** certify real scheduler runs/deliveries.
409 - PR #96 head `08afd9f69ca7af4408b0c5e6ba5c8a31a40adcd2` Quality `38223670528` SUCCESS (static job `114725807951`, **86/86 Playwright PASS**, 3 isolated DB tests + Golden/draft-posted PASS), Security `38223670565` SUCCESS. Docs merged as protected main `2a4d637d0145f333412fbce0e299ab6962f0b262`.
410 - **PR closure verified in live GitHub:** old #28 (comment 6120641718), #43 (6120644468), #49 (6120646995), #57 (6120649594), #80 (6120652469) all **CLOSED / UNMERGED**, with evidence comment and reversible history. **Exactly four old PRs remain OPEN: #6 finance core, #39/#40 competing physical RTL scroll, #58 privileged identity/phone migration archive drift**. These are deliberate specialist hold items, no authorization to merge old code. Detailed evidence in `docs/FINORA_PHASE0_F008_PR_RECONCILIATION_2026-10-12.md`.
411 - **F0-08 acceptance:** historical PR register and safe dispositions **COMPLETE/READ-ONLY-RECONCILED**. This is distinct from **PHASE 0 OWNER ACCEPTANCE (STILL OPEN)**: affected ISP login F0-01, real tenant catalog F0-02, isolated real server save F0-03, owner saved-invoice print F0-04, live 1,200+ selector F0-05, full modal/RTL UI F0-06, actual admin retry / two-user RLS F0-07 are not all verified.
412 - **Changes and rollback:** F0-08 docs and nonmerged PR closure only; no runtime changes, customer accounts, production Supabase schema/data, migrations, invoices/posted ledger, roles/RLS/Auth, secret handling or fee. Docs revert and old PR reopen if later evidence requires. Next authorized task: plan owner-real F0-01/02/04 acceptance from existing browser; separately review #58 migration archive parity read-only without schema writes.
413
414
415 ## 2026-10-12 Owner Phase 0 continuation — F0-05 account/project/contract selector large-list QA
416 - **User instruction:** «ادامه بده» — continue verified Phase 0 execution. Baseline latest protected main `c45d849a138370b89e9f251757f229f6b8fa55d8` after PR #97, with Phase 0 OPEN and F0-08 nine-PR audit completed; #6/#39/#40/#58 remain specialist holds. F0-05 currently checks **1,208 products and 1,206 contacts** in synthetic Chromium only; account, project and contract high-volume selectors have no 1,200+ browser coverage. Account journal select `.je-account` is intentionally excluded from general combobox and is NOT a target of this test.
417 - **Selected independent safe slice (QA/Implementation):** extend `scripts/phase0-selector-stress.spec.js` with controlled tenant-scoped **1,200+** account rules selector (`#af-rule-account`), project selector (`#invoice-project-id`) and generic contract selector using real `finoraRefreshSearchableSelect` from `js/ux-hardening-r2.js`. Include keyboard Enter/Escape/End, Persian label/code/metadata filtering, no-match, no cross-tenant fixture option and explicit no `saveDatastore` / `jePostSourceRecord` / side-effect. Measure synchronous filter cost and use existing **5000ms safety ceiling**, NOT a production hardware SLA. Assert each selected value and no implicit writes.
418 - **Safeguards:** This is a synthetic DOM fixture with tenant-scoped option construction, NOT a production RLS/security isolation test; do not change runtime UI, auth, accounts, RLS, schema, Supabase, financial posting, user data or invoicing. Keep F0-01..04/07 and physical owner acceptance open. Add only the independent tests to the existing Quality Playwright suite, verify Chromium/Golden/3 disposable DB/Security then gate PR merge and protected-main deployment. Rollback: revert QA-only PR; no data or permissions rollback needed.
419 - **Accountable:** QA/Verification. **Status:** SCOPE RECORDED / CODE PENDING.
420
421
422 ### 2026-10-12 F0-05 account/project/contract high-volume selector — CONTROLLED QA PASS / OWNER GATE OPEN
423 - Branch `qa/phase0-f005-account-project-contract-stress-20261012` extends existing F0-05 synthetic Playwright with **1,206** tenant-scoped entries each for accounting-rule `#af-rule-account`, invoice `#invoice-project-id` and representative generic contract select; using existing `finoraRefreshSearchableSelect` (no runtime changes), metadata/code search, Persian labels, Enter/End/Escape, no-results, excludes foreign-tenant fixture options, checks selected IDs, zero `saveDatastore` and zero accounting post. The journal-special `.je-account` path is excluded by runtime design and **not** tested by this generic selector fixture.
424 - Exact first-tested PR #98 head `99be1b33ea6b8792f1be85e82a08367352bae223`: Quality **`38225392045` SUCCESS**, static job `114731529004`: **87/87 Chromium PASS (59.7s)** (prior 86 + new F0-05), Golden accounting and draft/posted safety PASS, three disposable PostgreSQL jobs PASS. Security **`38225392014` SUCCESS** (CodeQL/release safety; dependency review skipped when graph disabled). Synchronous filter samples in Chromium CI: **account 108.5ms; project 107.6ms; contract 113.4ms**, under existing 5000ms *safety ceiling*, **not** a performance SLA. No network/client production data in test.
425 - Acceptance register F0-05 updated to **CONTROLLED-QA-PASSED for products, people, account rule, project and generic contract 1200+ lists**, while authorized tenant/real workstation performance, account-journal `.je-account` and true backend RLS remain **UNVERIFIED**. Full **PHASE 0 OPEN / NOT OWNER ACCEPTED**; no finance, Supabase, Auth/RLS/roles/schema or production data changes.
426 - Next: check final PR head Quality/Security, merge only if green, verify protected-main Quality/Security/Release/Pages, append final exact-SHA release evidence if available. Rollback QA-only PR; no data rollback.
427
428
429 ### 2026-10-12 F0-05 account/project/contract selector extension — RELEASED QA GATE / PHASE 0 OPEN
430 - Owner directed Phase 0 continuation. QA-only [PR #98](https://github.com/davoodmehraban89/Factor-easy/pull/98) extends controlled F0-05 regression to **1,206** tenant-scoped synthetic options each for account-rule, invoice project and generic contract selector, alongside prior 1,208 product and 1,206 contact tests. Tests cover Persian/name/code/floating-code, keyboard Enter/End/Escape, absence/no-match and zero invoice save/ledger posting. This tests the actual existing combobox implementation with synthetic options, **not real Supabase RLS, real company catalogs or accounting journal .je-account selector**.
431 - Final PR head `dfc4b21d4e7392d188acfc86b6bc2d7cf8394e3c`: Quality **`38225738789` SUCCESS**, static job `114733039452` **87/87 Chromium PASS (59.2s)**; Golden sale/receipt/purchase/payment/expense/reversal/trial/financial reports PASS; draft/posted safety PASS; three disposable DB jobs SUCCESS. Security `38225738773` SUCCESS. Real Chromium CI observed **107.4ms account, 106.3ms project, 112.5ms contract** synthetic filter latency (sample only, 5-second safety cap, NOT a contractual SLA).
432 - PR #98 squash merged to protected `main` exact SHA **`20cca7e4cf5a411022a30929a513b7cdf2d53779`**. Independent exact-main Quality **`38226518516` SUCCESS**, Security **`38226518662` SUCCESS**, Release Gate **`38226697531` SUCCESS**, gated Pages **`38226717496` SUCCESS**. Duplicate Release `38226696979` cancelled / Pages `38226704861` skipped, correctly not counted.
433 - **Acceptance state:** F0-05 enlarged **CONTROLLED_QA_PASSED / RELEASED QA GATE**; owner actual-workstation/catalog and journal-account-specific high-volume test **NOT OWNER_VERIFIED**, whole **PHASE 0 OPEN**. F0-01/02/03/04/07 real authorization and live data gates remain open; F0-08 historic PR audit complete and four specialist PRs held. Zero runtime application files changed in PR #98; no Auth/RLS/schema/migrations/production financial or identity data altered. Rollback test-only PR; no customer data rollback required. Next: owner browser/safe-invoice acceptance or separately bounded read-only #58 migration-drift audit; do not begin Phase 1 signoff prematurely.
434
435
436 ## 2026-10-12 Owner-reported Finora slow startup / Phase 0 loading performance — IN PROGRESS
437 - **Owner request:** Live Finora takes unacceptably long to open and become usable. Diagnose real startup critical path, implement bounded performance fix, independently QA/ship; continue approved Phase 0 without declaring unfinished user-authenticated gates accepted.
438 - **Baseline:** protected main `61cbcf3113c598022d6877e447bf8c97b4788a19`. Read AGENTS and complete PROJECT_STATE, `index.html`, `js/bootstrap.js`, `js/core.js` and `js/sync.js`. Current index declares approximately 40 non-deferred app script tags and an **external parser-blocking SheetJS CDN bundle** and external Vazirmatn CSS; `js/bootstrap.js` on DOMContentLoaded **awaits 14 script insertions sequentially** before calling `initAuthSystem()`, so network round trips delay both login panel and session restoration. For logged-in users `enterApp()` additionally awaits `fetchCurrentUser()` and **sequential paginated `pullAll()` of every collection** before rendering; not authorized to change that financial data/consistency path without separate tests.
439 - **Bounded fix:** preserve exact extension order and Auth timing dependency, use ordered **parallel download** for dynamic extension scripts through `script.async=false` before append, await all settled only after ordered execution, and make optional Excel CDN non-parser-blocking (without breaking export/import or replacing it). Capture read-only site/CDN response timings where available. Add deterministic real Chromium startup network test simulating high-latency extension downloads, proving serial-vs-parallel critical path, exact dependency order, once-only Auth after all scripts and graceful error under blocked CDN. Ensure no actual account/tenant data is read, no altered Auth/RLS/roles, schema/ledger, no test account creation, no unapproved data migration.
440 - **QA and release:** preserve fallback if an extension asset fails, maintain existing Quality/Golden/Playwright and Security gates, merge reviewed PR only with verified checks, confirm protected-main CI and published assets. Capture cold-start comparative behavior with synthetic throttled requests; no claim of owner ISP metric without actual owner-machine browser timings.
441 - **Owner-visible progress:** Phase 0 OPEN. F0-01 affected-ISP sign-in, F0-02 real tenant catalog, F0-03 safe persistence, F0-04 physical print, F0-07 two-user access checks remain unverified; do not mark them passed. Rollback: revert this narrowly scoped PR and gated Pages redeploy, no data rollback.
442
443
444 ### 2026-10-12 Phase 0 startup speed correction — PR controlled browser QA PASS / PRODUCTION RELEASE PENDING
445 - Investigated owner-reported cold-start delay from actual protected-main sources and authorized remote read-only Windows HTTP probes: `https://factoreasy.ir/` **HTTP 200 ~1.616s**, representative extension **HTTP 200 ~0.477s**, optional CDN SheetJS **HTTP 200 ~2.663s** (one measurement each; not full user-browser timings). Source `js/bootstrap.js` previously waited for **14 individual network-loaded extension modules serially** *before* calling `initAuthSystem`; `index.html` contained parser-blocking third-party XLSX script and CSS. Assets across `js/` total ~0.75 MiB (55 scripts); network round-trip waterfall is a demonstrated structural issue. Authenticated `pullAll()` still uses sequential pages for full tenant data, and its latency on the owner's ISP is **not measured**.
446 - Fixed in [PR #100](https://github.com/davoodmehraban89/Factor-easy/pull/100): classic extension scripts now append concurrently with `async=false` set before injection (preserves execution/dependencies), wait `Promise.allSettled` before session check; credential-free `window.FinoraStartupStatus` records only extension count/failure count/load time and `authChecked`. Optional Excel CDN loads `async`; external font CSS loads nonblocking with CSP-compatible local listener and Tahoma fallback. `scripts/build-pages.mjs` continues to replace SheetJS with the pre-existing **pinned SRI** cdnjs equivalent and strict CSP, now carrying `async`; no security gate relaxation. Existing admin fake-user browser test now waits for `authChecked` before its fixture, eliminating race from faster real initialization; no user-auth data accessed.
447 - New `scripts/phase0-startup-performance.spec.js` has two real Chromium cases: artificial **170ms per extension** latency checks all **14 requested in parallel** and ordered bootstrap still shows login; unavailable third-party Excel/font does not prevent auth screen and Excel guard remains. Exact tested PR head `278bda0836aa650d5cf1d96611e4001097433131`: **Quality `38229232737` SUCCESS**, static job **89/89 Playwright Chromium PASS (48.6s)**, extension dispatch spread **5ms** in synthetic slowed network, all 3 disposable DB jobs PASS, Golden accounting and draft/posted safety PASS, 55 JS/52 MJS syntax PASS; **Security `38229232632` SUCCESS**, SRI/CSP release-safety and CodeQL. The earlier initial PR head Security `38228347152` failed on SRI release-builder detection; corrected builder preserved SRI. Initial browser run `38228617932` had exactly one test fixture auth-initialization race (88/89; not published); corrected and rerun fully green.
448 - **Current classification:** IMPLEMENTED / PR-HEAD_CONTROLLED_QA_PASSED; protected-main merge/Quality/Security/Release/Pages/published-asset verification **PENDING**. F0-01 affected ISP login and owner-specific post-login latency still **UNVERIFIED**, Phase 0 remains OPEN. No Supabase/Auth/RLS/roles/schema, production user, financial ledger, stored records, login permissions or external accounts modified. Rollback PR and gated Pages.
449
450
451 ### 2026-10-12 Phase 0 startup waterfall optimization — RELEASED VIA GATED PAGES / OWNER LATENCY OPEN
452 - Owner observed very slow startup. Investigated real main: **14 ordered extension scripts loaded one-by-one** *before* starting login/session restoration; optional third-party XLSX was parser-blocking, remote font CSS also contributed blocking. Read-only authorized Windows probe (one sample each): homepage HTTP 200 ~**1.616s**, extension ~**0.477s**, optional Excel CDN ~**2.663s**. `js/` contains 55 files ~0.75 MiB. Live Supabase `public.records` `pg_stat_user_tables.n_live_tup` **estimated ~441 rows / ~600 kB**, no per-user lookup; this does **not** prove user session/pullAll fast, which remains separately unmeasured.
453 - **Fix shipped:** [PR #100](https://github.com/davoodmehraban89/Factor-easy/pull/100) merged to protected `main` exact SHA **`a67c07a717bffc2a8ee90c7e3cc9db55c2d05881`**. Startup `js/bootstrap.js` now downloads all 14 extension scripts concurrently with `script.async=false` (execute in original dependency order), awaits all loaded/failed before running real Auth and exposes only credential-free timing/asset count and `authChecked`. `index.html` moves optional XLSX script to async, font stylesheet to nonblocking media with safe local-JS activation, cache-busts bootstrap; build-pages retains pre-approved **pinned SRI** for cdnjs Excel under strict production CSP. Existing fake-admin Playwright test waits `authChecked` to avoid test-only race. No client user data or financial write modified.
454 - **Exact final PR-head evidence** `c45807d949c36c32b6e00aaef3e8f47fa9f1e833`: Quality **`38230103321` SUCCESS** (static 55 JS / 52 MJS syntax PASS, Golden accounting and draft/posted PASS, 3 disposable PostgreSQL jobs PASS, **89/89 Chromium Playwright PASS**; synthetic network **170ms/extension** and extension request spread **3ms**; third-party CDN abort still shows login); Security **`38230103301` SUCCESS** including CSP/SRI release safety and CodeQL. First dry run exposed SRI build guard and then a mock-admin timing race; both were fixed and fully rerun. Never waived release security.
455 - **Exact protected-main SHA gate verified:** Quality **`38230349289` SUCCESS**, Security **`38230349290` SUCCESS**, Release Gate **`38230688599` SUCCESS**, gated Pages deployment **`38230726054` SUCCESS**. Earlier duplicate Release `38230517388` was CANCELLED, duplicate Pages `38230704316` SKIPPED; excluded from successes.
456 - **Honest external check:** The authorized remote Windows machine `DESKTOP-71SJ63M` was **offline** when post-publish HTTP parity check was attempted; alternate public fetch was inaccessible. Therefore GitHub proves SHA-gated Pages deploy but **direct domain HTTP parity and owner's actual observed latency not independently verified in this last check**. Owner should hard-refresh once at `factoreasy.ir`, record approximate time to see login and time after sign-in; no password/session/network token disclosure. A remaining possible factor is `enterApp()` awaiting `fetchCurrentUser()` and serial tenant `pullAll()` after authentication, not changed without data-consistency tests.
457 - **Acceptance:** Focused Phase-0 startup/performance **FIX_IMPLEMENTED / CONTROLLED_QA_PASSED / PAGES_DEPLOYED**; **OWNER_REAL_ISP_BENCHMARK_OPEN**. F0-01/02/03/04/07 remain unaccepted; Phase 0 **OPEN**. No Auth/RLS/roles, server schema, Supabase data, financial posting or account credentials changed. Rollback: revert PR #100 and rerun guarded Pages; no data rollback.