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

docs(qa): scope expected-red formal sale linked-draft Save acceptance before code

davoodmehraban89 committed Nov 22, 2026 at 17:41 UTC f0f2d9021a5eabdbf0e76f7e1226311999621588
1 file changed +8
PROJECT_STATE.md
+8
@@ -606,3 +606,11 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
606 - **QA facts:** immutable code SHA `bd244962915824d0ad825e99b5cda4d530f18402` had exact-SHA Quality/WP1/WP2/Security SUCCESS; the preceding docs-head `3e10e8c24892b36cc52dbaf4ad2e484793cc077e` had exact-SHA Quality/WP2/Security SUCCESS while WP1 still running at later check. New docs HEAD `299893e1e0e8f6b5232ea8d98306f0449caf1c55` triggered new GitHub CI (Quality 45021776472, WP1 45021776508, WP2 45021776497, Security 45021776444), **in progress** at this checkpoint. Do not infer pass for successor documentation commits until individually completed.
607 - **Owner reporting instruction:** after each verified milestone, report A–F as short single-row percentages, mapping six-phase 0–5 without presenting them as measured facts: currently A audit/architecture 90%, B server financial core 50%, C draft-first lifecycle 20%, D ledger health 55%, E UX 50%, F release readiness 10%. These estimates **did not rise** because only QA/documentation was delivered; update only with accepted product evidence.
608 - **No release action:** PR231 remains Draft/unmerged, main `dab1a45fcfc4f12e675cfe055e477138cd3e99fa` unmodified, no hosted DB/production access, SQL schema/RLS/Auth/grants, financial app code, migrations or posted history changed. Next: verify exact HEAD CI and independent Codex-main adoption; avoid parallel accounting engine.
609 +
610 +
611 +### 2026-11-22 — FIN-P0-229-SALE-SAVE-RED: contract decision BEFORE QA implementation
612 +- **Owner says continue** and wants A–F percentages only in the **end-of-session** summary, plus direct links for all four GitHub Actions gates and explicit next working phase/blocker.
613 +- **Scope:** New isolated QA branch `qa/issue229-sale-save-linked-draft-red-20261122` from PR231's fixed QA head `a244a0cf88a98f9a7940537a3f494ee98a5238a6`; separate draft PR stacked on PR231. Existing browser expected-RED covers only **purchase** Save autoPOST; sale Save currently writes a business-only draft, with **no journalVoucherId, no server-committed linked draft**. Existing pre-ADR browser happy-path tests currently assert zero vouchers until explicit post. This is **not compliant** with accepted ADR216 source+journal linked draft-first Save contract and needs an explicit expected-RED acceptance before financial core is modified.
614 +- **Allowed QA work:** Add one truthful Playwright `test.fail(true)` for a *formal sale invoice Save* through the real browser form that asserts server-persisted business draft AND linked journal **draft** (no final number, no posted voucher, zero autoPOST RPC), with an atomic source-to-journal reference. Validate fixture and source record before declaring the known P0 expected-RED. Cover this as an executable acceptance requirement, not a product repair. Do not remove/alter the existing sale happy-path tests, purchase Save expected-RED, or linked-draft selector expected-RED on this independently stacked branch.
615 +- **Safety:** no finance SQL/migrations, grants/RLS/Auth, server RPC, transaction semantics, paid/prod DB, posted history, merge or release. Codex-main remains sole owner for the financial server lifecycle fix, pending explicit authorization. UI PR232 already has exact-code four-gate success for E; this independent QA test concerns C only.
616 +- **Verification:** run Quality/Chromium, WP1, WP2, Security on exact new QA code SHA; expected-failure must be clearly reported and must not mask fixture errors. Audit CI logs and retain both real-JWT sale/purchase approval bypass P0 repro markers. Do not increase C because an expected-red test is only added.