سامانه صدور فاکتور و حسابداری
docs(finora): record independent retry-id expected RED decision before test change
davoodmehraban89 committed
Nov 22, 2026 at 20:11 UTC
274968b570fcc2aac7cb048f1678584b4771d05b
1 file changed
+7
PROJECT_STATE.md
+7
@@ -669,3 +669,10 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
669
- **Conservative owner final-only A–F estimates (manual, unchanged):** A architecture/audit **90%**; B finance server **50%**; C source-linked draft lifecycle **20%**; D ledger health **55%**; E operational UI **53%**; F release readiness **10%**. Integrated QA does not repair atomic Save or server JWT approval boundary, so no C/F advancement is defensible.
670
- **Next scope and owner dependency:** Any actual additive server RPC/migration/schema/permission enforcement, **even disposable test DB only**, requires explicit separately scoped owner approval. Once given, Codex-main should implement atomic source+linked balanced journal **DRAFT** on sale/purchase/correction Save, independent server `accounting:approve` Finalize and fail-closed legacy autopost, permanent historical numbering, reversal audit and idempotency/rollback. Convert product expected RED and real JWT probes to **genuine PASS** after fix and re-run. No Production access authorized.
671
- **After-verification documentation successor** to this exact code SHA will trigger its own branch CI. Its statuses must be checked separately; do not transfer four-code-sha gate verdicts to docs-only descendant.
672
+
673
+### 2026-11-22 — FIN-QA-RETRY-ID / pre-code decision, owner "start" continuation
674
+- The owner requested starting the next non-overlapping task after [PR235](https://github.com/davoodmehraban89/Factor-easy/pull/235) Stage-A evidence. No explicit authorization for server schema/RPC/RLS/role/grant changes or merge/production mutation was given; no such changes are part of this task.
675
+- **Live baseline:** [Draft PR234](https://github.com/davoodmehraban89/Factor-easy/pull/234) HEAD `bc4f2a8b18b13bea2ab6ffdd333fa883e31dd02a` (a docs-only successor to previously green QA code `c113cba8...`); protected main `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`; PR218 still proposed financial base. Branch `qa/finora-autopost-retry-identity-red-20261122` starts from this exact PR234 HEAD and targets PR234, **not** main or PR218.
676
+- **Confirmed QA contract discrepancy:** `scripts/journal-rpc-adapter.test.mjs` case `ambiguous auto-post retry reuses source identity and accepts server idempotent replay` currently asserts `assert.notEqual(calls[0].args.p_voucher_id,calls[1].args.p_voucher_id)`, while `js/journal-rpc.js::jeRpcAutoPostOnce` generates a fresh `afId('JV')` at every retry. Stable request/voucher identity after an ambiguous response is required by project instructions and ADR216. Existing server source/version replay may avoid a second voucher, but it does **not** establish a stable client retry token. Do not hide this mismatch under a green test name.
677
+- **Narrow QA-only assignment:** preserve the existing successful ambiguous-response replay test as a normal PASS for source scope and linked voucher reconciliation, replace its misleading `notEqual` with extra hard assertions about replay context, and add a *separately executed Node test.todo expected PRODUCT RED* asserting the desired exact stable `p_voucher_id`. Node v22 was verified to execute TODO callbacks and report failing TODOs while keeping unrelated tests enforceable. Add a normal-PASS fixture/sentinel so unexpected states do not hide behind a TODO. Document that TODO is a **known product defect**, not a successful acceptance result. Do not change code in `js/journal-rpc.js`, `js/sync.js`, `js/organization-rbac.js`, `js/journal-ui.js`, SQL, Auth, production, main, or the owned PR234 baseline.
678
+- **Acceptance:** syntax and actual `node --test scripts/journal-rpc-adapter.test.mjs` in exact SHA Quality, assert TODO callback executed at intended stable-ID assertion; WP1/WP2/Security exact-head status when triggered; Codex-main independent review before any integration. This is QA-only **no P0 product fix**, progress percentages unchanged.