سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 23:15 UTC
docs: record exact-head WP1 completion for Issue229 QA
davoodmehraban89 committed
Nov 22, 2026 at 08:55 UTC
7ef06f5bdc31c7b50df00dcc7e388f823eaee69e
1 file changed
+6
PROJECT_STATE.md
+6
@@ -521,3 +521,9 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
521
- **Discovered P0 product mismatch documented in Issue229:** Actual staged `js/purchases.js::purSave` invoked by ordinary visible Save button immediately calls `jeRpcAutoPost('purchase',record.id)` and commits a posted voucher; current `js/invoices.js::invoiceDocumentStatus` mislabels any journalVoucherId as posted even if linked journal status is draft; `js/purchases.js::purchaseDocumentStatus` labels linked drafts as `legacy_review`. These fail ADR0216 source-linked draft-first *before* independent authorized posting. Existing `scripts/accounting-document-workflow.spec.js` has formal SALE Save→draft→explicit post journey but lacks matching PURCHASE Save no-post/linked-draft acceptance. This is not a reason to rewrite engine.
522
- **Bounded QA-only execution:** branch `qa/draft-first-save-red-evidence-20261122` stacked on immutable PR228; append 2 precise **expected failing** Playwright tests to EXISTING `scripts/accounting-document-workflow.spec.js`. One should exercise actual browser purchase Save button against existing isolated mock server and require no posting, source+linked draft, so it exposes current auto-post defect. Other should require both sale and purchase status selectors to recognize a posted-*false* linked journal draft as draft, rather than treating presence of a link as posted/legacy. Label `test.fail` with Issue229/ADR216 and explicit TODO to remove expected-failure annotation when product implementation is delivered. This is a *RED acceptance contract*, NOT proof of working product or a test-suite weakness. Do not change production JS, SQL migrations, RLS/Auth, issue owner-held financial modules, or hosted/production data.
523
- **Exit criteria:** actual Playwright runner reports 2 **expected failures** reaching the intended assertions (not a setup/network error), while Quality and any triggered WP1/WP2/Security workflows remain inspectable on exact SHA. If fixture/setup fails, repair only fixture/test; do not change financial code or weaken conditions. Handoff to Codex main: implement canonical source-linked draft-first transaction and correct both status selectors, then remove `test.fail` and prove actual PASS with real JWT browser/DB tests. No implementation merge/deploy and no Issue216/229 closure from this QA branch.
524
+
525
+
526
+### 2026-11-22 — FIN-QA-ADR216-PURCHASE-SAVE-RED — exact-head CI completed
527
+- **Exact QA SHA:** PR230 `dec68c030189b0d6733443f8f3a6e1715844346f`, stacked on immutable PR228 `ae6a0557d575389853c4545ca99ec57c8015a0e0`. [Quality 44988270042](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44988270042) SUCCESS (253/253 browser tests, 4/4 generated Pages checks, three DB jobs); the two Issue229 cases were invoked and intentionally reported expected failures at their financial assertions through `test.fail`. [WP1 44988270066](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44988270066) SUCCESS (both jobs); [Security 44988270049](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44988270049) SUCCESS (CodeQL + release-safety; conditional Dependency Review SKIPPED). WP2 was not triggered by this spec/docs-only change.
528
+- **WP1 inspectable artifact:** `wp1-disposable-ledger-evidence` (artifact 14741081943). Isolated source-derived PostgreSQL 17 applied 22 staged migrations; all 19/19 WP1 SQL tests and two-session concurrency passed. Seeded property suite created 1,000 events across two organizations, verified balanced originals/reversals, and no cross-org leakage. Correction UP/DOWN/UP, reversal-dimension, manual-guard, NULL-revision, graph-read, two-session graph-snapshot, and conservative full-candidate DOWN/UP checks passed. Full candidate rollback restored baseline functions/ACLs/triggers and retained synthetic rows. Scope caveats: this is **not** a production clone or real Auth/JWT/PostgREST acceptance; correction-only DOWN retains new counters/helpers and is not a pristine schema rollback; the ATF allocator tested in local stack is still a candidate, not proof of production integration.
529
+- **Product decision unchanged:** Issue229 and ADR216 remain OPEN; PR228 and PR230 remain Draft/unmerged; main remains `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`. No product JS, migration, hosted database, production data, merge or deployment changed. The two expected-RED tests are acceptance evidence, not a fix. Codex-main must implement the single atomic source-linked draft CRUD/tombstone + independent authorized finalize contract, then remove `test.fail` and prove normal browser + real-JWT acceptance. Preserve existing manual-only guards and atomic posted-source autopost; do not build a parallel engine.