سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 18:15 UTC
docs(phase0): record live release evidence for F0-04 clean invoice print (#91)
* docs(phase0): record F0-04 released clean print and owner print verification gate * docs(phase0): persist F0-04 exact main release proof and next acceptance gates
davoodmehraban89 committed
Oct 12, 2026 at 10:03 UTC
9e9e35cd96d294e6f6ad875a45de94a1f968e5d8
2 files changed
+20
-1
PROJECT_STATE.md
+8
@@ -293,3 +293,11 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
293
- **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.
294
- **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.
295
- **State:** REPRODUCED IN SOURCE / IMPLEMENTATION STARTING. Phase 0 acceptance stays OPEN.
296
+
297
+
298
+### 2026-10-12 F0-04 owner photo → fixed print → gated live release — PHASE 0 STILL OPEN
299
+- 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.
300
+- **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.
301
+- **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.
302
+- **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.
303
+- **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.
docs/FINORA_PHASE0_ACCEPTANCE_REGISTER_2026-10-12.md
+12
-1
@@ -22,7 +22,7 @@ Status definitions: **CONTROLLED QA PASS** = actual Chromium or isolated tests w
22
| **F0-01** · Login/affected ISP | Production HTTP 200, historical synthetic Auth probes | **UNVERIFIED real user** / P0 open | Existing authorized login and refresh from affected ISP; browser/time/error screenshot with secrets redacted. QA/Auth. |
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 | PR #71 Persian print and controlled browser evidence | **CONTROLLED QA PASS; real printer/invoice UNVERIFIED** / P0 open | Authorized pre-existing saved invoice, formal/non-formal/purchase/taxpayer PDF/print; line totals/dates/pagination and physical-printer differences. Print 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. |
26
| **F0-05** · Large selectors | `scripts/phase0-selector-stress.spec.js`, **1,208 synthetic products + 1,206 persons** passed 2/2; keyboard/Persian/metadata covered | **CONTROLLED QA PASS for products/persons; real catalog and other high-volume selectors UNVERIFIED** / P1 open | Owner tenant/real workstation test plus assess account/project/contract selectors where applicable; measure interactive latency. UX/Perf. |
27
| **F0-06** · Modal, keyboard, RTL, themes | Controlled modal/dashboard regression and keyboard/F2, Quality suite green | **CONTROLLED QA PARTIAL; full visual/flow acceptance UNVERIFIED** / P1 open | Owner screenshots, all critical save/delete/import/export and RTL scrolling/dark-light. UI/QA. |
28
| **F0-07** · Access and release safety | GitHub Security PASS; Supabase 21+3+1 advisor results | **VERIFIED READ-ONLY metadata; dual-user tenant/RLS proof UNVERIFIED** / P0 open | Independent role/tenant negative E2E with authorized second identity, strict no-write safe plan; formal Phase 1 security audit. Security. |
@@ -66,3 +66,14 @@ All nine PR heads **diverge** from current main (observed GitHub compare); there
66
- Phase acceptance requires full evidence and explicit owner approval. **No phase promotion now.**
67
68
**Rollback:** revert this documentation PR; no runtime, customer data, migrations, credentials, roles, accounting entries or production workflow modified.
69
+
70
+
71
+## 2026-10-12 F0-04 owner's photographed watermark defect — controlled fix evidence
72
+
73
+- Photograph provided by owner shows pale, diagonal `پیشنویس — غیرقطعی` rectangle over the title of an existing ordinary sales/goods-services invoice. This is **user-visible reproduction evidence**, not synthetic data. Source root: `renderAndPrintDirect` appended `draftMark` to `containerHtml` in `js/print.js` whenever `invoiceDocumentStatus(inv)==='draft'`.
74
+- **Merged PR #90:** shared ordinary invoice builder now prints complete `containerHtml` directly, with a new cache version in `index.html`. Independent purchase popup already had no draft watermark. The code does **not** alter `invoiceDocumentStatus`, journal posting/finalization, stored documents, tax-authority electronic print restrictions, money/date display, print pagination or signatures.
75
+- **Verified on PR head before acceptance note:** GitHub Quality `38212287209` SUCCESS, including 83/83 real Chromium (54.8s), three disposable DB jobs and Golden accounting; Security `38212287223` SUCCESS (CodeQL and release safety). Browser regression tests cover a formal accounting draft and a pro-forma invoice: complete printed totals/number, watermark absent from both preview and isolated iframe, formal draft remains unposted. The financial static guard in `scripts/posting-idempotency-check.mjs` now rejects accidental reintroduction of the watermark while retaining posted/draft constraints.
76
+- **Acceptance boundary:** This is a controlled correction, **not** proof that the owner's physical printer or saved live document is now correct. Do not close F0-04 or Phase 0 until owner-authenticated preview/real print check. Other F0-01/02/03/06/07/08 checks are not automatically satisfied.
77
+
78
+- **Exact protected-main promotion:** PR #90 (validated head `72a69b372ef59ffbb7dddebf81d64304b3559b04`) merged to `main` as **`8a0023c53f0c14b0063ab771fdb3669a05997387`**. Same-SHA [Quality 38212519911](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212519911), [Security 38212519908](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212519908), [Release gate 38212644579](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212644579) and [Deploy gated Pages 38212680498](https://github.com/davoodmehraban89/Factor-easy/actions/runs/38212680498) **all SUCCESS**. Canceled/skipped duplicate workflow runs were not counted.
79
+- **Real-domain read-only proof:** From authorized remote Windows device, HTTP reads of `https://factoreasy.ir/?cleanPrint=20261012` and `https://factoreasy.ir/js/print.js?v=20261012-clean-invoice-print-v1` confirmed the live HTML references new print bundle (`True`), the bundle includes `stageInvoicePrint(containerHtml,spec)` (`True`), and the old `draftMark` string is absent (`False`). This verifies published code/asset, **not** physical hardcopy success.