@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 4175ed4
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 06:45 UTC

docs(qa): pre-record strict Issue229 expected-red state guard

davoodmehraban89 committed Nov 22, 2026 at 18:53 UTC 4175ed46e5c1b36cd8bda6a567f94cf4b0b863cc
1 file changed +8
PROJECT_STATE.md
+8
@@ -663,3 +663,11 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
663 - **Independent change-scope audit:** six of six static diff checks passed: PR233 changes only `PROJECT_STATE.md`, `scripts/accounting-document-workflow.spec.js`, and `.github/workflows/free-supabase-local-e2e.yml`; WP2 now fires when `js/purchases.js` or the browser accounting contract changes; no modifications to SQL, financial JS, RPC, grants, RLS, Auth, production, protected main `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`, posted history, deployment or merge. Draft PR233 and Issue229 OPEN; separate UI Draft PR232 still unmerged. Review summary posted to PR233 and [Issue229](https://github.com/davoodmehraban89/Factor-easy/issues/229).
664 - **Conservative A–F progress (only owner END-of-session):** A architecture/audit **90%**, B server accounting core **50%**, C atomic source-linked draft lifecycle **20%**, D ledger health **55%**, E UX **53%**, F release readiness **10%**. No increase: test reproduces another P0, not a functional repair. These are subjective milestones.
665 - **Next:** Codex-main server-atomic create/update for sale/purchase AND corrective purchase draft, linked balanced journal draft; separate real `accounting:approve` Finalize, disable legacy commerce:create-only autopost bypass, preserve immutable posted source/reversal/audit, deterministic idempotency/rollback and permanent numbers. **Explicit owner authorization still needed** for schema/permissions/RPC/migration even on disposable test database; plain "continue" not approval. Existing expected-red tests should be normal green only after correct product implementation. No Production writes.
666 +
667 +
668 +### 2026-11-22 — FIN-P0-229-XFAIL-SENTINEL: owner continuation, decision BEFORE QA edit
669 +- **Owner direction:** continue bounded real implementation on Draft PR233; report A–F percentages only once at end, all applicable exact-commit Quality/WP1/WP2/Security links, next phase/blocker. Plain «ادامه» does **not** permit financial migrations, Auth/RBAC/grants, schema/RLS, production or posted-history changes.
670 +- **Confirmed QA integrity defect:** `scripts/accounting-document-workflow.spec.js` contains four transparent `test.fail(true)` acceptance contracts: purchase Save, sale/purchase linked-draft status, formal sale Save, and posted purchase correction Save. They validate fixtures before the xfail call, but the **post-xfail object comparison can fail for ANY unknown regression** and still be counted as expected RED / green Quality. For financial software, a third state such as bad source status, wrong posting count, or inconsistent ledger linkage must not be silently accepted.
671 +- **Exact scope/plan:** On Draft PR233 head `77e3c5198f4a8f85bbb1b4ac4d90151a43d133d7`, introduce one small `assertKnownRedOrFixed` helper in the SAME Playwright spec. Before each `test.fail(true)`, assert that the observed product state exactly equals (a) the precisely known legacy-broken state or (b) the complete intended ADR216 target, with meaningful unexpected-state diagnostic otherwise. This makes **unexpected third states real CI failures before xfail**, and intended target's expected-failure becomes an **unexpected pass** (prompting removal of the xfail). Add one normal-PASS focused test of the sentinel's allowlist vs rejection. Preserve all four existing product expected-RED assertions and browser fixtures; no change to app JS, CI workflows, SQL/schema/roles/grants, hosted DB, posted history, production, protected main, deployment or merge.
672 +- **Validation:** static syntax + full exact-code Chromium (including four expected-RED tests and new normal-PASS sentinel), WP1 disposable, real JWT WP2 with both P0 bypass expected-red markers, Security. Investigate if precise legacy fingerprints differ; do not weaken the sentinel to make CI green. Keep Issues216 and 229 OPEN, no increased Phase C percentage from tests.
673 +- **Pre-change latest docs HEAD:** PR233 `77e3c5198f4a8f85bbb1b4ac4d90151a43d133d7`. [Quality #45037495502](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45037495502) and [WP1 #45037495369](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45037495369) in progress at start, [WP2 #45037495425](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45037495425) and [Security #45037495411](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45037495411) SUCCESS. Future per-head statuses must be independently verified.