سامانه صدور فاکتور و حسابداری
docs: decide bounded purchase JWT parity reproduction before QA work
davoodmehraban89 committed
Nov 22, 2026 at 15:28 UTC
5288f5ac43889ed9ac53f46c8730ba418471f65c
1 file changed
+8
PROJECT_STATE.md
+8
@@ -574,3 +574,11 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
574
- **Fixture corrections, not product defects:** First WP2 failed setting up second synthetic organization member due to one-seat license; corrected fixture `max_users=2` without changing a guard. Second WP2 reached real-JWT POSTED response but failed at SQL JSON extraction precedence during read-back; parentheses corrected. Earlier RED runs were not product acceptance evidence. Third run verified persistent ledger evidence.
575
- **No overlap or release:** no change to financial JS, SQL migrations, RLS/permissions, posted history, Codex-main-owned source files, main or hosted DB. Independent Codex-main review and issue acceptance remain PENDING; PR231 stays Draft. Green WP2 means an authorization **defect was reproduced**, not repaired.
576
- **Precise next task:** check WP1 `45011087895` final state, then inspect `PR231` diff and CI for this docs-only successor SHA; pass the verified proof from `scripts/wp2-source-approval-boundary-jwt-e2e.mjs` to Codex main. Owner must provide one transactional source-linked draft CRUD and distinct approve-authorized finalize, block legacy autopost bypass, then flip this expected-RED proof to a proper deny/allow test on an approved final SHA. No merge/deploy.
577
+
578
+
579
+### 2026-11-22 — FIN-P0-229-PURCHASE-JWT: decision before QA extension
580
+- **Verified entry baseline:** PR231 documented head `822fd87969b66f9f1347dca44a3f9d375c8ec39f`; **all four exact-head GitHub workflows SUCCESS**: Quality 45012112443, WP1 45012112435, WP2 45012112432, Security 45012112430. Its code parent `7d1e580ce04f232fb7bccb9306fe87ed87d33e24` also has all four exact-SHA successful runs. This success proves QA execution and reproducible missing approval, **NOT** a repaired product contract. Latest protected main remains `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`.
581
+- **New user continuation / choice:** Extend ONLY the existing PR231 real-JWT expected-RED test to a *purchase* source, because Issue229 is specifically the purchase Save→autoPOST path; current PR231 proves the same bypass only for sale. Do not create a parallel financial core, change SQL migrations/roles/RLS, touch operational DB, merge/deploy, or change Codex-main-owned files.
582
+- **Bounded QA change:** append a credit-purchase case in `scripts/wp2-source-approval-boundary-jwt-e2e.mjs`, reusing the same non-owner JWT (`commerce:create` true, `accounting:approve` false). Prepare two legitimate purchase ledger accounts plus an immutable approved role snapshot version 2, exactly as the existing `scripts/wp2-source-autopost-jwt-e2e.mjs` fixture already does. Verify real PostgREST `finora_journal_autopost` response and persisted purchased source, unique posted voucher, payable/expense debit-credit entries, actor audit and final-number sequence; mark result `FINORA_ISSUE229_PURCHASE_APPROVAL_EXPECTED_RED` only when both the unauthorized posting and durable journal graph are proven.
583
+- **Owner/source boundaries:** This is *defect reproducibility* (test-accepted RED), not product acceptance. Codex main retains the transactional draft-first source/voucher lifecycle and distinct approval authorization remediation. A legitimate product fix may cause the expected-RED probe to fail; do not weaken permission checks to keep it green. Preserve both Issue216/229 OPEN.
584
+- **Acceptance / next work:** node syntax parse; exact-head WP2, Quality, WP1, Security on a new commit; inspect proof marker in WP2 log; update execution status/roadmap and handoff PR/Issue with verified SHA. No merge/release.