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

docs: pin exact-SHA duplicate JS removal release and owner acceptance gate

davoodmehraban89 committed Oct 16, 2026 at 01:52 UTC 2afb96cff8547ec337ce9446279d58937a956b57
1 file changed +6
PROJECT_STATE.md
+6
@@ -806,3 +806,9 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
806 - **First independent CI result on PR #158 head `926a44321daf56f989a595b74048145e155451cc`:** Security `38813224607` SUCCESS; Quality `38813224500` FAIL, **122/123 Chromium PASS**. The one new synthetic hardened-Pages test confirmed early login remains available during deliberately delayed bottom dynamic dispatcher, but detected a standalone `enterprise-iran.js` network request, contrary to expected bundling. Three disposable DB jobs, Golden and other financial invariants passed. Do not merge or deploy this test-only PR while failing. Next: capture request resource type + Chromium Network initiator on this isolated fixture to distinguish duplicate executed script, speculative preload, or diagnostic fetch. This is an actual test failure, not yet proven runtime financial corruption or a confirmed owner-ISP fix.
807 - **CDP root cause evidence / bounded implementation decision, before code edit:** PR #158 head `6dc91cddf403a2d482c30795f2b32e20cd6b82d2`, Quality `38814011317` 122/123 Chromium with same intentional test FAIL, Security `38814011321` PASS. Chromium `Network.requestWillBeSent` identifies a real **Script** request to `/_site/js/enterprise-iran.js`, initiator `finora-pages-foundation.js` line 565. Source mapping through ordered foundation bundle reveals `js/ui.js` line 218: a `DOMContentLoaded` listener injects a second `<script src=js/enterprise-iran.js>`. This duplicates the same ERP module already in the required accounting Pages bundle; raw development `index.html` also separately includes it statically at line 941. **Authorized narrow fix:** delete ONLY this dynamic redundant script insertion from `js/ui.js`, retain enterprise module in original static index and Pages accounting bundle and preserve module rail rendering; keep strict fail-closed gating and test full Chromium/Golden/DB/Security. Do not combine unrelated CSP handler files in this fix. Rollback by reverting ui.js one-line change.
808 - **One-line repair controlled CI VERIFIED on PR #158 code HEAD `6dfdf41b7694ef6397c19bce8613f68cd6b724d4`:** [Quality `38814776887`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38814776887) SUCCESS; static job logs **123/123 Chromium PASS**, including the delayed CSP handler + no redundant source-script fetch regression; Golden sale→receipt→purchase→payment→reversal→trial balance→statements and accounting P0 invariants PASS; **three disposable DB jobs SUCCESS**. [Security `38814776751`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38814776751) SUCCESS. Production source change is only removal of redundant DOMContentLoaded dynamic load in `js/ui.js` (enterprise module remains in built accounting group). **PENDING:** after this evidence-only documentation append, recheck exact final PR head CI before merge; protected-main Release/Pages and actual owner-ISP cold login are NOT VERIFIED at this checkpoint. Phase 0/Issue #106 remain OPEN.
809 +
810 +### 2026-10-16 F0-01 duplicate standalone enterprise script — PR #158 RELEASED / OWNER ISP OPEN
811 +- **Evidence-backed root cause:** Owner Chrome had pending standalone `enterprise-iran.js`; new generated Pages Chromium/CDP regression reproduced extra script request initiated at `finora-pages-foundation.js:565` / `js/ui.js:218`, although static accounting Pages bundle already contains the same ERP source. This was a duplicate network request and potential duplicate execution, not an inferred Supabase service fault. PR #158 removes only `js/ui.js`'s redundant DOMContentLoaded script injection; module rail, static development script, original Pages accounting bundle, CSP and fail-closed financial workspace behavior are retained. Regression deliberately delays CSP dynamic dispatcher while checking early usable login, subsequent extension readiness and no legacy standalone script fetch.
812 +- **Exact merged runtime:** [PR #158](https://github.com/davoodmehraban89/Factor-easy/pull/158) merged to protected `main` **`612998edb51274ac1e6136a31265cd17b9abd265`**. Exact main [Quality `38815971255`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38815971255) SUCCESS, static job **123/123 Chromium PASS**, Golden accounting + P0 invariant PASS and **three disposable DB SUCCESS**; [Security `38815971233`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38815971233) SUCCESS; [Release Gate `38816410495`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38816410495) SUCCESS; [gated Pages `38816440543`](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38816440543) SUCCESS. Duplicate earlier cancelled/skipped runs are not successful evidence. Original PR test FAIL on 122/123 is recorded above, then fixed and rerun 123/123.
813 +- **Security & remaining gates:** No Supabase Auth/RLS/role/schema, license, tenant, production finance records, migration, paid API or external message changes. Direct public-domain HTTP readback was unavailable via current tool; **the owner affected-Chrome/ISP cold login, reliability, and post-auth data hydration after this release are NOT VERIFIED**. Source/Chromium proves the unnecessary request was removed, not that all ISP latency is solved. Keep [Issue #106](https://github.com/davoodmehraban89/Factor-easy/issues/106), **F0-01 P0**, and overall **Phase 0 OPEN**. Issue comment 6203484232 records sanitized diagnostics and release.
814 +- **Next safest acceptance:** owner hard-refreshes `https://factoreasy.ir` once on same affected Windows Chrome, attempts one legitimate login, reports only whether main workspace opens, elapsed seconds and non-secret `BOOT_*` code if any; no passwords, HAR, cookies, Authorization, PII or client ledger data. If failure persists, compare new redacted resource waterfall and Auth path before further optimization. F0-03 real save/edit/print, production backup and isolated restore remain separately UNVERIFIED. Rollback targeted revert of PR #158 and gated redeployment; no data rollback.