@davoodmehraban89 / Factor-easy / commits / 4f39261
Fork 0

سامانه صدور فاکتور و حسابداری

docs: record two-session immutable attachment allocator QA decision and exact-head handoff

davoodmehraban89 committed Nov 22, 2026 at 07:39 UTC 4f392610cb6fdecf95c0df9f9146a01964b8b155
1 file changed +7
PROJECT_STATE.md
+7
@@ -490,3 +490,10 @@ Next action: run and inspect Quality on the latest PR212 head. If any browser te
490
491
492 - **2026-11-22 first same-SHA Stage C server gate:** PR225 original candidate `3f8e8a9cbc22f0fb5e42d3845a6e550a0af544a8`: [WP2 44982073582](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982073582) completed SUCCESS; job log emitted `FINORA_SOURCE_JWT_ATOMIC_PASS` for positive source-to-posted voucher link, different-ID replay, injected late-link rollback of header/lines/counter and simultaneous two-client request. [Security 44982073480](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982073480) SUCCESS (CodeQL + safety; dependency review skipped). Quality `44982073488` and WP1 `44982073524` were still in progress at this checkpoint; no claim of their success. **QA review strengthened acceptance before final SHA:** add checks that source commercial fields remain unchanged, the successful posted journal audit actor equals the actual JWT user, retries do not append duplicate audit, and failed link transaction rolls back audit events as well as data/counter. This is test-only; final SHA requires fresh four-gate check. No production changes or external review acceptance.
493 +
494 +
495 +### 2026-11-22 — FIN-QA-ATF-CONCURRENCY (owner continuation; recorded BEFORE code implementation)
496 +- **Exact-head Stage B/C completion:** Draft PR225 `9122b8b8da0d0a2e4f8976030a6f7c4ef3bcc91a`: [Quality 44982300952](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982300952) SUCCESS (251/251 Chromium + 4/4 auxiliary, all DB jobs), [WP1 44982300977](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982300977) SUCCESS, [WP2 44982300960](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982300960) SUCCESS (tenant negative, manual JWT positive, source-linked posted atomicity/rollback/audit), [Security 44982300947](https://github.com/davoodmehraban89/Factor-easy/actions/runs/44982300947) SUCCESS (CodeQL+invariants; conditional Dependency review SKIPPED). PR225 comment records final evidence, no merge/publish, Codex-main review pending.
497 +- **Source review / reuse decision:** Issue216 and `docs/adr/0216-draft-first-document-identity.md` require globally monotone immutable non-recyclable ATF per org/company, safe concurrent reservation and tombstones. Existing `supabase/candidates/0216_attachment_registry.sql` plus `supabase/tests/0216_attachment_candidate.sql` are **candidate only**, with a transaction-scoped single-session test already running in WP1. No duplicate allocator implementation is permitted. The narrower missing direct evidence is two live PostgreSQL sessions racing on the same and distinct voucher identities, stable retry ID, conflict across companies and rollback, separately from migration acceptance.
498 +- **Approved narrow QA task:** branch `qa/attachment-allocator-two-session-20261122` based on PR225 green HEAD; add only a disposable test runner that loads a **copy of the existing candidate SQL** into a temporary uniquely named schema, drives two real `psql` sessions, asserts exactly-once numbering, company immutability, tombstone and rollback. Wire to existing WP1 local-stack job **after** the pre-existing allocator single-session test, without editing `supabase/migrations`, the candidate allocator, client financial code, RLS, Auth or hosted data. Update existing canonical docs and evaluate CI. Do not claim the isolated candidate is activated in product.
499 +- **Exit condition:** WP1 actual success on exact QA SHA with two-session log marker; Quality/Security as distinct same-SHA runs and Codex-main independent review. WP2 is unchanged and should never be claimed tested on the new SHA unless explicitly run. Before merge Codex main must still design and approve permanent ATF integration with historical high-water marks, source linked draft-first lifecycle and deletion, two-phase numbers and migration/rollback. Retain PR225 green head unmodified.