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

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

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

Synced Dec 4, 10:30 UTC

docs(state): record approved offline Kavenegar OTP preparation and strict no-activation boundary

davoodmehraban89 committed Oct 12, 2026 at 22:39 UTC 2593f38f99a4d464294174b3a8270dc265e4bda9
1 file changed +6
PROJECT_STATE.md
+6
@@ -63,6 +63,12 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
63 - **Direct live-domain parity, authorized remote Windows read-only GET:** `https://factoreasy.ir/?loginCspProof=20261012` HTML includes `js/generated-event-handlers.js`, `js/core.js?v=20261012-login-wiring-v3` and `js/sync.js?v=20261012-login-read-cancel-v1`; versioned `js/bootstrap.js` points to `organization-rbac.js?v=20261012-login-scoped-read-v1`, and direct retrieved module contains `finoraOrganizationRead`, `FINORA_LOGIN_READ_TIMEOUT` and scoped read references. No owner credentials, session data, backend mutations, accounts or financial history were accessed.
64 - **Acceptance boundary / next step:** CODE_RELEASED / SYNTHETIC_E2E_PASSED / LIVE_ASSET_PARITY_VERIFIED; owner actual affected-ISP behavior remains **NOT VERIFIED**, F0-01 and overall Phase 0 remain **OPEN**. Owner should fully refresh `factoreasy.ir`, click `بررسی اتصال به سرور ورود` with no password and report only code (AUTH_OK/AUTH_TIMEOUT/AUTH_UNREACHABLE/SITE_UNREACHABLE), then test permitted existing account login privately. Distinguish slow restored-session permissions/records from Auth service network. Rollback #107 via guarded Pages, no DB rollback.
65
66 +### 2026-10-12 Kavenegar OTP preparation — OWNER APPROVED OFFLINE PREPARATION ONLY / PENDING
67 +- **Owner intent:** move future Finora primary sign-in from email toward mobile OTP using previously created Kavenegar verification template `FinoraLogin`; correct owner clarification: the owner approved **preparing the technical infrastructure**, not Kavenegar's template. Most recent visible provider status was **UNDER REVIEW**, and provider template approval and SMS delivery are **NOT VERIFIED**. Preserve existing password/email/Google sign-in and all existing Supabase Auth user IDs/organizations. No automatic new accounts or reassignment of an existing identity.
68 +- **Scope/owner:** code preparation on isolated branch only; design server-side Supabase Auth Send SMS Hook -> verified webhook -> Kavenegar `verify/lookup` using template `FinoraLogin`, feature disabled/fail-closed by default, no API key in public GitHub/browser. Add a provider adapter with synthetic offline tests and setup/runbook. No Auth settings, hook, live Edge Function, environment secrets, phone mappings, database or production site modifications under this slice.
69 +- **Verified baseline:** main `833b795b7b0320260b91dcbe621bbce04b23f0c3`; live Supabase `hcsixhqbyuhpshfwqpjx` HEALTHY; `public.profiles.phone` and unique partial index existing, live `phone_identity_profile` migration recorded; no Kavenegar sender Edge Function deployed; historical PR #58 remains open, must not blindly merge/duplicate migration. Windows Desktop Commander `DESKTOP-71SJ63M` ONLINE. Its working copy `C:\Temp\Factor-easy` was observed on stale `main` SHA `b1a35fdc...`, with **0 tracked modifications / 2189 untracked files**, and is read-only for this operation; GitHub branch is canonical source.
70 +- **Acceptance:** offline contract tests cover signed hook body/gate, phone formatting, token/template injection protection, provider status/errors/timeouts and no sensitive logging; source/docs checked on feature-head CI. Activation requires independently verified **approved provider template**, securely configured API/hook secrets, admin owner confirmation before Auth provider setting changes and actual SMS send/test costs, safe linking/verification for existing user phone identities, staged user test without creating duplicate accounts, owner affected-network sign-in acceptance. RLS/tenant isolation and ledger remain unchanged. **Phase 0 F0-01 still OPEN.**
71 +
72 ## Current change ledger
73 | 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. |
74