@davoodmehraban89 / Factor-easy / commits / cb47da0
Fork 0

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

docs(phase0): classify second-device Auth and REST shared diagnostic timeouts

davoodmehraban89 committed Oct 13, 2026 at 08:33 UTC cb47da0244f00fdf172a1ba0389a2f4703cb98cc
2 files changed +15 -1
PROJECT_STATE.md
+8
@@ -150,6 +150,14 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
150 - **Next evidence:** ask owner for the *exact, privacy-safe* short error/status code shown under the login form (if visible) and the four connectivity codes from clicking `بررسی اتصال به سرور ورود` on that same second computer. Do not request credentials, email addresses, token/cookies, network HAR or private tenant records. Compare one normal retry or independent connection **only after** code classification. If `SITE_JS` or `MANIFEST` timeout, inspect same-origin resource timing; if `BOOT_ACCOUNT_CONTEXT` / `BOOT_TENANT_RECORDS`, inspect latency with safe browser timing, no data exfiltration. A source fix requires reproducible evidence, controlled Chromium/Golden/3DB/Security, isolated PR and exact-SHA release.
151 - **Change boundary:** this is a **documentation + open issue evidence update only**. No runtime/login, Supabase schema/Auth/RLS/roles, identity credentials, ledger, invoices, payments, OTP, production traffic or account settings modified. Rollback: revert this docs-only PR. Issue #106 **OPEN**.
152
153 +### 2026-10-13 F0-01 second-device diagnostic screenshot — SECOND-DEVICE DIAGNOSTIC CONFIRMED: SITE_JS_OK / MANIFEST_OK / AUTH_TIMEOUT / REST_TIMEOUT
154 +- **Actual visible evidence from owner-provided photo (privacy-safe codes only):** after the owner reported second-device login failure at ~40 seconds, they clicked the built-in `بررسی اتصال به سرور ورود` control on that device. The on-screen diagnostic reports **`SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT`** and says the main site file is accessible but the Auth server check was unsuccessful. Unlike the prior screenshot with a generic login alert, this photo *does* resolve the four connectivity codes. It does **not** show a `BOOT_*` code from the login attempt or timing of the actual Auth request, and the second device's ISP/browser/network route are not known. No account identifiers or private content are copied.
155 +- **Verified implementation semantics:** `js/login-connectivity.js` fires four parallel, credential-free `fetch` requests (own-origin `js/login-connectivity.js`, own-origin `manifest.json`, cross-origin Supabase `/auth/v1/health`, cross-origin Supabase `/rest/v1/`) with **one shared `AbortController` and a 12-second deadline**. Hence two `*_TIMEOUT` statuses indicate that both Supabase endpoint requests had no successful fetch completion before the shared abort; they are **not evidence of two sequential 12s delays**, a Supabase outage for everyone, invalid credentials or RLS failure. The two checked same-origin resources were reachable (`*_OK`). `AUTH_TIMEOUT` here is a health-probe code, not the password API response.
156 +- **Independent read-only reconciliation:** protected `main` before this documentation change `167fbcb1e5bb198d1025121a4ce0d97e01929519`; exact SHA Quality `38348991795`, Security `38348991712`, Release `38349249193`, Pages `38349291823` all SUCCESS. Live Supabase `hcsixhqbyuhpshfwqpjx` `ACTIVE_HEALTHY`, 82 migrations (last `20261012075507`). Neither GitHub CI nor Supabase project metadata proves the owner computer's cross-origin connectivity.
157 +- **Assessment:** first computer one login PASS ~20s; second computer login FAIL ~40s, with static website reachable but Supabase Auth/REST credential-free probes timing out at 12s. **F0-01 = P0 / CROSS_DEVICE_INCONSISTENT / NETWORK_PATH_SUSPECTED, NOT ROOT_CAUSE_PROVEN / NOT OWNER_ACCEPTED**. Phase 0 remains OPEN; do not weaken fail-closed financial workspace checks or blame/change passwords.
158 +- **Next discriminator:** owner keeps **same computer and browser** and temporarily changes only Internet access to a phone mobile hotspot; clicks the same built-in connectivity test once more, returns only four status codes and optional login success/time. If Auth and REST respond on hotspot, investigate current ISP/DNS/routing/firewall/proxy. If both still time out, assess local device/browser/proxy or service edge via privacy-safe diagnostics before any code change. Do not request email/password/tokens/cookies/HAR. No Auth/RLS/schema/roles, financial history, invoice or OTP modifications. A bounded runtime fix, if proven necessary, needs independent Chromium/Golden/DB/Security gates and owner retest. Issue #106 OPEN.
159 +- **Change boundary:** evidence-only documentation update and Issue #106 comment; rollback revert docs-only PR. No runtime change or customer production mutation.
160 +
161 ## Current change ledger
162 | 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. |
163
docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md
+7 -1
@@ -19,7 +19,7 @@ Status definitions: **CONTROLLED QA PASS** = actual Chromium or isolated tests w
19
20 | ID | Priority | Current evidence | Acceptance status | Required next proof / owner |
21 |---|---|---|---|---|
22 -| **F0-01** · Login/affected ISP | 2026-10-13 owner real outcomes: **first Windows Chrome** after hard refresh opens main workspace in ~20s; **second computer** login **fails after ~40s**, accompanying screenshot supplied but exact displayed error not independently transcribed; second browser/network not specified. Current protected-main SHA `6ac8d68ae669cbe1e914c71064a3c1fa45d6fe5c`, Quality `38345404409`, Security `38345404529`, Release `38345621057`, Pages `38345647098` SUCCESS; Supabase metadata healthy, 82 migrations. | **CROSS-DEVICE INCONSISTENT: 1 OWNER-REPORTED LOGIN PASS + 1 FAIL; REPEATABILITY/ERROR CLASSIFICATION/PERFORMANCE OWNER ACCEPTANCE OPEN** / P0 | From second computer report only exact safe `BOOT_*`/other code if shown, plus credential-free `SITE_JS | MANIFEST | AUTH | REST` status from built-in «بررسی اتصال به سرور ورود» button. Do not copy private screenshot identifiers. Diagnose actual stage before a bounded change; keep issue #106 and Phase 0 OPEN. QA/Auth. |
22 +| **F0-01** · Login/affected ISP | 2026-10-13 owner result: first Chrome computer sign-in **PASS ~20s** after hard refresh; second computer **FAIL ~40s**. Follow-up photo of the **credential-free built-in connectivity diagnostic** shows **`SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT`**. Source `js/login-connectivity.js`: two same-origin files reachable; Auth/REST cross-origin probes did not finish before a **shared 12s AbortController** timeout. No login-time `BOOT_*` code supplied; second-network ISP and actual password API response not proved. Protected main `167fbcb1...`, Quality `38348991795`, Security `38348991712`, Release `38349249193`, Pages `38349291823` SUCCESS; Supabase project `ACTIVE_HEALTHY`, 82 migrations. | **CROSS-DEVICE INCONSISTENT; CROSS-ORIGIN NETWORK PATH SUSPECTED, ROOT CAUSE NOT PROVEN; P0 OWNER ACCEPTANCE OPEN** | On second device keep browser/computer fixed; switch only to mobile hotspot and repeat **credential-free** built-in check, share four codes and optionally login yes/no + seconds. Avoid credentials/HAR. Compare same device / two networks before code changes. Keep Issue #106 and Phase 0 OPEN. |
23 | **F0-02** · Real product & person selection | PR #83 merged; keyboard/F2 and synthetic matching in Chromium | **CONTROLLED QA PASS; live tenant UNVERIFIED** / P0 open | Select existing `هارد` or `بلوک` and person in authorized tenant; correct unit/price/company boundary; no cross-tenant leak. UX/Data. |
24 | **F0-03** · Invoice lifecycle | `scripts/phase0-invoice-persistence.spec.js` passes **2/2** on mock RPC: save→reload→edit→print, retry without duplication; no ledger posting | **CONTROLLED QA PASS; real persistence UNVERIFIED** / P0 open | Only separately approved isolated account/test scope: actual server save/reload/edit/print and reconcile duplicate count; never post fake accounting in production. Commerce/QA. |
25 | **F0-04** · Print | Owner hardcopy/photo reproduced pale diagonal `پیش‌نویس — غیرقطعی` overlay on existing goods/services invoice; narrowly removed in PR #90; draft and pro-forma Chromium checks added, accounting state unchanged | **FIX RELEASED + CONTROLLED QA PASS; OWNER REPRINT UNVERIFIED** / P0 open | On the deployed PR #90 code, owner still checks a saved draft/ordinary sale invoice and purchase/pro-forma print: watermark absent, all rows/totals/dates visible; real printer/PDF and taxpayer-specific semantics are separate. Print QA. |
@@ -88,3 +88,9 @@ All nine PR heads **diverge** from current main (observed GitHub compare); there
88 - Owner reports **one failed real login on a second computer** after approximately **40 seconds** and supplied a screenshot. The exact screenshot code is not independently verified, and the new computer's browser and ISP are unknown. Do not describe it as a proven `BOOT_APP_ASSETS` recurrence without identifying evidence.
89 - Paired outcomes: first device Chrome hard-refresh sign-in **success (~20s)**; second device **failure (~40s)**. Update F0-01 to **CROSS_DEVICE_INCONSISTENT / OPEN**. Neither a fast/stable owner deployment nor Phase 0 acceptance is established. Existing code/build deployment CI and live Supabase healthy status do not diagnose the owner's browser error.
90 - Next no-write owner-side evidence: exact nonprivate error code plus built-in connectivity `SITE_JS | MANIFEST | AUTH | REST` statuses (12s bounded, unauthenticated probes only). Do not collect credentials, PII, session cookies, token headers, full HAR or tenant/customer data. No product or production mutations made in this evidence-only PR.
91 +
92 +## 2026-10-13 addendum — second-computer network diagnostic codes transcribed
93 +
94 +- Owner photo shows **`SITE_JS_OK | MANIFEST_OK | AUTH_TIMEOUT | REST_TIMEOUT`** from «بررسی اتصال به سرور ورود». This updates the immediately preceding second-device addendum that said the diagnostic code was not verified. No `BOOT_*` code is shown in this photograph. The new owner test is credential-free, not successful/unsuccessful account Auth verification.
95 +- `js/login-connectivity.js` applies a **shared 12s abort deadline** to four parallel checks; two Supabase timeouts mean the cross-origin health/root requests had no successful response in that window. The site JS and manifest both responded. Treat this as a **network-path hypothesis**, not proof of credentials defect or production Supabase outage.
96 +- Next isolated comparison: same second computer and Chrome, different Internet path (phone hotspot); repeat only built-in connectivity code check. Owner acceptance F0-01 and Phase 0 remain OPEN. No application code, Auth/RLS/schema/financial/customer data changed.