سامانه صدور فاکتور و حسابداری
docs: record independent Issue229 approval-boundary QA decision before test
davoodmehraban89 committed
Nov 22, 2026 at 13:32 UTC
38dccc25252c597948ae3891696a0a2157bfd59c
1 file changed
+9
PROJECT_STATE.md
+9
@@ -549,3 +549,12 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
549
- **Exact-head gate proof:** [Quality 45006315280](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45006315280) SUCCESS (4/4 jobs; 3/3 new tripwire tests, 253/253 browser including two **expected RED** Issue229 cases, 4/4 Pages); [WP1 45006315251](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45006315251) SUCCESS (both jobs; 19/19 SQL, 1000 seeded multi-org events, two-session concurrency, graph and rollback checks; ATF marker explicitly candidate only; artifact `wp1-disposable-ledger-evidence` ID 14748168854); [Security 45006315249](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45006315249) SUCCESS (CodeQL, release QA safety and new history-downgrade migration guard; Security scanned **0 changed migrations** on this QA-only diff; conditional Dependency Review SKIPPED). WP2 NOT triggered on this SHA; predecessor PR228 genuine JWT posted sale+purchase check remains separately green.
550
- **Actual source inspection (not staged migration execution):** PR217 SQL `20261118100000_document_lifecycle_temp_permanent_atef.sql` matches the conservative guard at lines 123,195; PR219 SQL `20261118100000_journal_document_lifecycle.sql` at lines 204,221,232,394,404,478; PR215 SQL `20261118090000_document_lifecycle_atf_and_atomic_delete.sql` none for this pattern. Later PR219 matches may be draft-CRUD updates, so treat scanner findings as mandatory code review, not automatic proof all matching statements are unsafe. The destructive blanket historical posted→draft statements are in PR217/219. Owner blocking evidence: [Issue216 comment 7077099276](https://github.com/davoodmehraban89/Factor-easy/issues/216#issuecomment-7077099276).
551
- **Limit and next:** This heuristic does not parse all SQL/dynamic SQL or prove history safety; synthetic QA and repository probe do not replace an approved read-only historical reconciliation and disposable original-posted/reversed graph parity/rollback tests. The two Issue229 browser cases remain intentionally `test.fail` and financial source-linked draft-first CRUD plus independent authorized finalize is NOT implemented. PR230/PR228 remain Draft, unmerged. Protected main stays `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`. Do not close Issue216 or Issue229, merge PR217/219, touch hosted data, or claim production readiness. Codex-main owns final integration.
552
+
553
+
554
+### 2026-11-22 — FIN-P0-229-AUTHZ: independent real-JWT approval-boundary reproduction (decision BEFORE code)
555
+- **Owner request:** resume execution from verified Finora state; do not duplicate Codex-main's P0 lifecycle engine or mutate main/Production. Rechecked protected main `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`, PR218 `bcd8d4eebd4f6852ecf8090670741d81dbc27332`, PR230 QA `3cdbfd5a213098f59518fb1b5757c4c16ddeed03`, Issues216/229 still open. PR221/230 exact-head Quality/WP1/Security succeeded; PR230 WP2 was not triggered.
556
+- **Scoped independent task:** FIN-P0-229-AUTHZ (QA; not financial product implementation). Create a real Auth-issued **non-owner** JWT with `commerce:create` but **no** `accounting:approve` in disposable Supabase; verify permission matrix and test whether existing `finora_journal_autopost` incorrectly posts an already persisted sale. Check source+voucher+lines+audit+counter, without silently accepting a fixture/auth failure as product evidence.
557
+- **Expected baseline finding:** effective `20261117110000_wp1_autopost_source_link_atomic.sql` authorizes `create`, and `20261016101500_phase1a_journal_core.sql::finora_phase1a_post_core(...,true)` checks `create` for generated sale/purchase rather than distinct `approve`. This is a *source-proven contract risk*; live-JWT exploit reproduction is not yet claimed.
558
+- **Ownership/files:** one new `scripts/wp2-source-approval-boundary-jwt-e2e.mjs`, the existing `.github/workflows/free-supabase-local-e2e.yml` step/path filter, and append-only updates to `PROJECT_STATE.md`, `docs/EXECUTION_STATUS.md`, `docs/ACCOUNTING_CORE_ROADMAP_V1.md`. Parent PR230 is a QA stack only; Codex-main retains financial JS/SQL, pending-edit modules, integration, independent acceptance and release. No edit to `js/sync.js`, `js/organization-rbac.js`, `js/journal-ui.js`, app financial code, migrations, RLS, roles, or operational data.
559
+- **Acceptance:** exact-HEAD real WP2 log distinguishes fixture permission proof from a genuine unexpected POST; expected-RED checkpoint is proof of existing defect, **not** a PASS of finalization requirements. Quality/WP1/Security on same head, explicit skipped check classifications and Codex-main review. Once owner fixes independently authorized draft-first finalization, update this regression to assert non-owner DENIAL and approver SUCCESS (normal PASS) before accepting Issue229.
560
+- **Baseline SHA:** `3cdbfd5a213098f59518fb1b5757c4c16ddeed03`, new branch `qa/issue229-approval-boundary-jwt-20261122`. Do not merge or deploy.