سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 09:15 UTC
docs(finora): distinguish real posted-delete denial from overly narrow WP4 test error label
davoodmehraban89 committed
Nov 23, 2026 at 23:00 UTC
5d8fe8c1ab041bec08587b62b131fe9d1bcd29e0
1 file changed
+5
PROJECT_STATE.md
+5
@@ -456,3 +456,8 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
456
### 2026-11-23 — FIN-QA-219-WP4-DELIMITER-CORRECTION / logged before QA fix
457
- **QA follow-on code SHA `3855eb7b3cabd961c174fd16e86b12a5cbdfce2d`** [WP1 #45248550120](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45248550120) reached live disposable PostgreSQL test SQL, but failed `syntax error at or near "$"` at `wp4_journal_document_lifecycle.sql:33`. GitHub log proves the Auth user and seeded company/FY/accounts setup SQL executed (`DO`), then failed on the first subsequent malformed `DO $`. **This syntax defect was accidentally introduced in the QA fixture edit:** JavaScript `String.replace(string, replacementString)` interprets `$$` in replacement as a single literal `$`. The final originally broken `DO $`/`END $;` also remained broken for that reason. This is a **QA patching mistake**, NOT a product engine error or a runtime lifecycle finding.
458
- Correction decision: on Draft PR247 fix **only** the two malformed `DO $` openers and one `END $;` closer in the test fixture to `DO $$` / `END $$;` using replacement callbacks rather than JS replacement strings to preserve literal `$$`. Verify all SQL block delimiters in the GitHub blob before rerunning exact-head WP1. Do not touch migration, app JS, policy, Production, main or source code. Previous RED from missing company/fiscal remains resolved at fixture setup only; no lifecycle PASS claim until actual SQL reaches and passes all assertions. Other inherited PR219 Quality/Security and WP2 remain unsolved. Progress A90/B50/C20/D55/E53/F10 unchanged.
459
+
460
+
461
+### 2026-11-23 — FIN-QA-219-WP4-DENIAL-ASSERTION / observed database test and scoped assertion decision
462
+- **Actual WP1 local stack on test fixture SHA `a61d7393efcdc2ba333a52c14f1e5e61b2fa74c3`**, [#45249182243](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45249182243) reached a real posted journal and the forbidden posted-delete check. It **FAILED** at `supabase/tests/wp4_journal_document_lifecycle.sql:108` with **`FINORA_DRAFT_DELETE_FORBIDDEN`**, a check violation (`23514`), not the fixture's exact expected `FINORA_POSTED_DOCUMENT_NOT_DELETABLE`. The base `public.finora_journal_delete_draft` in `20261016102000_phase1a_journal_rpc_surface.sql` intentionally rejects any non-draft or nonmanual voucher with that exact `FINORA_DRAFT_DELETE_FORBIDDEN` exception. This is a **verified fail-closed denial**, not evidence that posted delete succeeded; SQL fixture's exact error-message expectation is incompatible with the existing authoritative RPC. No change to product code/migration.
463
+- Before changing the QA assertion, require `23514` check_violation *and* recognize only either of the two explicit known posted-delete denial codes, with **independent readbacks verifying the journal voucher remains `posted` and registry remains `posted`**. Unknown messages/SQLSTATE or modified posted state must fail. Keep all other lifecycle tests intact; rerun exact SHA WP1, do not claim lifecycle PASS until all SQL tests complete. Other parent PR219 blockers still open; A90/B50/C20/D55/E53/F10 unchanged.