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

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

docs(phase0): log measured startup bottlenecks and bounded performance task before code

davoodmehraban89 committed Oct 12, 2026 at 12:35 UTC abf8f148d7e4ca58a00cfe8b96655950c880f023
1 file changed +8
PROJECT_STATE.md
+8
@@ -391,3 +391,11 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
391 - 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).
392 - 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.
393 - **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.
394 +
395 +
396 +## 2026-10-12 Owner-reported Finora slow startup / Phase 0 loading performance — IN PROGRESS
397 +- **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.
398 +- **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.
399 +- **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.
400 +- **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.
401 +- **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.