سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 17:00 UTC
docs: authorize independent positive-JWT journal QA experiment before code
davoodmehraban89 committed
Nov 22, 2026 at 06:48 UTC
59fcdab44714d5316ac479a6897a3040ba7ddd2f
1 file changed
+7
PROJECT_STATE.md
+7
@@ -473,3 +473,10 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
473
- **Current verified CI:** on PR221 docs-only head `44b697b4`, [Quality 44978932775](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44978932775) SUCCESS (four jobs including three disposable DB), [Security 44978932790](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44978932790) SUCCESS; [WP1 44978932846](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44978932846) in progress at this checkpoint (local-stack job SUCCESS; ledger-negative job running); **WP2 not run on PR221 head** because workflow path filters exclude the changed invoice/product paths.
474
- **Decision/ownership before implementation:** isolate a narrow QA workflow path-filter repair to `.github/workflows/free-supabase-local-e2e.yml`, plus canonical evidence/register updates; leave PR221's JavaScript and all security/financial SQL unchanged. WP2 is an existing disposable local Supabase Auth+PostgREST and journal adapter check, **not** a substitute for positive authorized financial posting/finalization or Issue216 acceptance.
475
- **Expected acceptance:** GitHub Actions WP2 actually runs to completion on the **final QA branch SHA** with inspectable jobs/steps; Quality, WP1, Security are separately checked on that same SHA. A cancelled/skipped/non-triggered run is not acceptance. Main Codex must independently review before integration. No version/tenant/financial data is modified.
476
+
477
+
478
+### 2026-11-22 — FIN-QA-POSITIVE-RPC follow-on (owner continuation request; pre-implementation)
479
+- After the WP2 trigger fix PR222 and confirmed [WP2 run 44979544526](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44979544526) SUCCESS on `8bcd5f923da8ecf9627b450345e44e2727ca7089`, identify the remaining accepted gap: existing `scripts/wp3-financial-tenant-e2e.mjs` proves **negative** cross-tenant journal RPC denial but does **not** prove authorized positive manual financial create/post through a real Auth JWT and PostgREST service.
480
+- This QA-only follow-on branch is based exactly on PR222 `8bcd5f923da8ecf9627b450345e44e2727ca7089`. It must not touch Codex-main-owned `sync.js`, `organization-rbac.js`, `journal-ui.js`, source/invoice financial code, SQL migrations, production Auth/DB, or posted financial history. PR218 remains financial integration base; PR220/221/222 preserve prior artifacts.
481
+- **Scoped implementation decision:** add a disposable Supabase test script that provisions only ephemeral Auth user/organization/company/fiscal year/accounts, calls `finora_journal_create_draft` and `finora_journal_post` using the user's real JWT through PostgREST, reads back the posted voucher and balanced lines, verifies idempotent create replay and failed unbalanced request rollback, and add the test to existing WP2 local workflow and path triggers. No service-role token may be used for the tested RPC itself; service-role/local psql is fixture setup only.
482
+- **Acceptance:** first CI run on exact branch SHA must show genuinely completed positive RPC job and Quality/WP1/Security. If it fails, record actual rejection and hand to owner of server-side accounting rather than falsifying fixtures or disabling guards. This test cannot prove source-document atomicity, whole Issue216, irreversible attachment numbering or production readiness.