سامانه صدور فاکتور و حسابداری
docs: record PR232 linked-draft browser QA and remaining P0 approval blocker
davoodmehraban89 committed
Nov 22, 2026 at 17:08 UTC
18973d44e00d52995762caa7797cad51f073e131
1 file changed
+9
PROJECT_STATE.md
+9
@@ -621,3 +621,12 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
621
- **Bounded mitigation:** in the same isolated PR232 add **client-side defensive read-only guards** for source-linked draft record in invoice edit guard and purchase edit form + Save, and suppress purchase Edit/Finalize/Delete actions for a linked draft until Codex-main implements proper transactional RPCs. Keep visible accurate "draft" status and an explicit pending-lifecycle explanation. These are UI affordance safeguards, **NOT security boundaries** or backend authorization, and must not replace source-linked atomic edits/finalization.
622
- **Test:** extend existing Issue229 linked-draft Playwright normal-PASS contract to assert linked invoice cannot be directly edited and that purchase actions for linked draft are not falsely offered. Also include effective partially-reversed source status display as posted while immutable posted history is retained. Preserve first purchase Save `test.fail` and both real-JWT product expected-RED markers.
623
- **Pre-change SHA:** `9259160087d03982355dd2e4b844932d7c6408b1`, Draft PR232; exact-head CI was running, not acceptance. After this note apply minimal UI/test patch and retest full Quality/WP1/WP2/Security on final code SHA. No merge/main/SQL/RLS/Auth/real financial data changes.
624
+
625
+
626
+### 2026-11-22 — ISSUE229-UI-STATE: exact-code browser acceptance, safety handoff (verified result)
627
+- **Verified CODE SHA** `1fb81b66d96d6b540ff5dffa74231eb2c40129d2` on stacked [Draft PR232](https://github.com/davoodmehraban89/Factor-easy/pull/232). `js/invoices.js` and `js/purchases.js` now correctly project linked journal **draft** (rather than posted/legacy), show contradictory or unresolved links as review, and maintain effective partially-reversed posted display. Direct source-only sale edit and purchase Edit/Finalize/Delete affordances on linked drafts are disabled until a single server-atomic source+journal update is implemented. Client guards are UI safety only, NOT server authorization.
628
+- **Full browser evidence:** exact-code [Quality 45028047488](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45028047488) **SUCCESS**, actual log `254 passed (3.8m)` including **new browser DOM assertion** `P0 #229 linked journal drafts do not advertise unsupported source-only edit or finalize buttons` and existing linked-draft state regression now normal (not `test.fail`); `4 passed` Pages. Exactly ONE remaining purchase-Save `test.fail(true)` is the known **product** RED, counted as an expected-failure test; green CI does NOT resolve it. Earlier check on the source implementation returned 18/18 focused status/edit cases.
629
+- **Other exact-code gates:** [WP2 45028047485](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45028047485) **SUCCESS**; [Security 45028047482](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45028047482) **SUCCESS** (conditional Dependency Review SKIPPED); [WP1 45028047442](https://github.com/davoodmehraban89/Factor-easy/actions/runs/45028047442) **IN PROGRESS** at this verification checkpoint. WP2 retains real JWT expected-product-RED bypass for both sale and credit purchase, and positive JWT source graph/rollback/immutability tests. `main` still `dab1a45fcfc4f12e675cfe055e477138cd3e99fa`; PR232 Draft/unmerged, Issue216 and Issue229 OPEN.
630
+- **Review and fix:** predecessor `6842011998e5d9c480a130ccfcc9aab02c091fb6` failed the existing static `!inv.accountingPostingPending` invariant; that guard was restored explicitly in `js/invoices.js` at `58debcf703371771d862fc9c20838c3c447e64a1` without reopening linked source edits. The subsequent single-file Playwright test at `1fb81b66...` verifies actual sale/purchase table actions, not merely internal selectors.
631
+- **Owner A–F end-of-session estimate (new six-phase 0–5 mapped to A–F):** A (audit/architecture) 90%; B (server accounting core) 50%; C (draft-first source/journal lifecycle) 20%; D (ledger health) 55%; E (operational UX) 52%; F (release readiness) 10%. These are **approximate evidence-based estimates**, not computed earned-value metrics. Only E moves marginally due real browser UI acceptance; C and F remain blocked. Do not infer server readiness from UI success.
632
+- **Unresolved owner boundary / next work:** Codex-main must implement approved ADR216 **atomic source+linked journal draft** Save/Edit/Delete and **separate accounting:approve-authorized Finalize** under controlled migration/test permission; restrict legacy `finora_journal_autopost` to prevent commerce:create-only bypass; convert last browser expected-RED and both JWT expected-product-RED checks into real denied-seller/allowed-approver acceptance and re-run full gates, historical rollback/number invariants and independent review. The task requires separate explicit owner approval before schema/RBAC/RLS/grants or financial history work under the existing project charter. No Prod/hosted DB operations, branch merge or publication were made. The documentation-only successor commit after this entry will start its own CI; do not transfer code SHA results to its new SHA.