سامانه صدور فاکتور و حسابداری
docs(phase0): ground nine-PR disposition and correct Wave4b live migration truth
davoodmehraban89 committed
Oct 12, 2026 at 11:55 UTC
e0e08591893d8ebfd56da3ac703b5ccfe5b62a03
1 file changed
+45
docs/FINORA_PHASE0_F008_PR_RECONCILIATION_2026-10-12.md
new
+45
@@ -0,0 +1,45 @@
1
+# Finora Phase 0 F0-08 — Historical PR reconciliation and disposition (2026-10-12)
2
+
3
+**Source of truth:** protected `main` SHA `4595dafcb98185984894faacb97244cec2aa55e4` at start, `AGENTS.md`, `PROJECT_STATE.md`, the nine OPEN GitHub PRs and read-only live Supabase migration/function metadata.
4
+**Owner's direction:** continue approved Phase 0.
5
+**Responsible:** coordination/QA. **No historical PR code is to be auto-merged.**
6
+
7
+## Decision discipline
8
+
9
+1. A superseded PR may be **closed without merging** only when its historical intent is already present in main or preserved in a verified newer report. Closure is reversible, preserving its commits/discussion; it does not delete history.
10
+2. Old PRs touching financial postings, existing-user credentials, RLS/Auth, schema/migration drift or disputed scrollbar geometry must remain **open for independent specialist verification**.
11
+3. A historic green CI run validates its own commit, not current `main`. Controlled browser/SQL/CI QA is not owner-authenticated acceptance.
12
+4. No production SQL, data, login, API, permissions, real account creation or external messages are altered in this F0-08 reconciliation.
13
+
14
+## Specific nine-PR disposition, anchored to current released implementation
15
+
16
+| PR | Bucket | Verified reason | Action |
17
+|---|---|---|---|
18
+| [#6](https://github.com/davoodmehraban89/Factor-easy/pull/6) | **FINANCE REVIEW — KEEP OPEN** | 26 files including voucher journals, reversal, invoices/purchases, bank and recovery test contracts; legacy Phase 3 patch predates newer immutable-posted/idempotency work. No safe equivalence proof. | Audit each proposed financial invariant in disposable fixtures; **never merge** the stale branch as one unit. |
19
+| [#28](https://github.com/davoodmehraban89/Factor-easy/pull/28) | **SUPERSEDED DOCUMENTATION — CLOSE AFTER PORT** | Its unique Wave4b historical CI/SHA details are now preserved in `docs/REQUEST_WORKFLOW_WAVE4B_VERIFICATION.md`. Its claim that live production Wave4b migration was not applied is **false as of current live state**. | Close without merge **only after** this reconciliation merges; retain PR history. |
20
+| [#39](https://github.com/davoodmehraban89/Factor-easy/pull/39) | **OWNER-VISUAL UI AUDIT — KEEP OPEN** | Competing direction-only RTL scrollbar placement and physical screenshot/video expectations; overlaps #40 and newer scroll ownership test. | Obtain verified physical-RTL scroll ownership evidence; no blind merge. |
21
+| [#40](https://github.com/davoodmehraban89/Factor-easy/pull/40) | **OWNER-VISUAL UI AUDIT — KEEP OPEN** | Alternative structural scrollport geometry to #39; current desktop shell has three scroll owners with direction mapping covered by Playwright, but not owner physical acceptance. | Compare actual owner device screenshot and synthetic bounding/wheel tests; choose one safe targeted solution if needed. |
22
+| [#43](https://github.com/davoodmehraban89/Factor-easy/pull/43) | **SUPERSEDED OPERATIONS DOC — CLOSE** | Current root `AGENTS.md` already instructs liveness updates at verified checkpoints, continued execution without reply and explicitly disallows claiming unverified progress. | Close obsolete alternative wording without merging; current charter retained. |
23
+| [#49](https://github.com/davoodmehraban89/Factor-easy/pull/49) | **SUPERSEDED HISTORICAL STATE — CLOSE** | A historical 2026-10-06 `PROJECT_STATE.md` snapshot that cites 79 migrations and stale head. Actual 2026-10-12 Supabase has **82**; current state includes newer tested deployments, admin-provision repair and explicit open acceptance. | Close without merging stale snapshot; retain chronology in PR history. |
24
+| [#57](https://github.com/davoodmehraban89/Factor-easy/pull/57) | **SUPERSEDED UI FIX — CLOSE** | Dark-mode controls/cards/shell/input/placeholder/disabled fields/combobox shipped in newer PR [#92](https://github.com/davoodmehraban89/Factor-easy/pull/92). Mandatory `scripts/phase0-dark-theme-contrast.spec.js` uses true Chromium contrast threshold 4.5:1; browser transition fixture stabilized in #95. | Close outdated branch without overwriting newer theme asset; owner full visual F0-06 still open. |
25
+| [#58](https://github.com/davoodmehraban89/Factor-easy/pull/58) | **IDENTITY / SOURCE-DRIFT AUDIT — KEEP OPEN** | Old multi-feature patch also contains phone migration `20261007163500_phone_identity_profile.sql` absent from current main despite live migration ledger `20261007165208 phone_identity_profile`. Its Edge/Admin/Dark changes overlap newer fixes. | Audit migration body and source archive/name parity, SMS/Auth policy separately; **do not reapply old SQL or deploy old Edge function**. |
26
+| [#80](https://github.com/davoodmehraban89/Factor-easy/pull/80) | **SUPERSEDED ADMIN FEATURE — CLOSE** | Main has server-only `admin-user-management` with JWT+trusted `profiles.role=admin`, UI, contract + Playwright provisioning tests. Follow-up [#94](https://github.com/davoodmehraban89/Factor-easy/pull/94) fixed real `organization license not found` bug with verified Supabase migration `20261012075507`; #95 archived it. Reintroducing old branch risks resetting auth and the corrected UI. | Close obsolete unmerged branch **without touching the deployed Edge function or account records**; actual admin-owner creation remains acceptance OPEN. |
27
+
28
+## Live Wave 4b correction: migration recorded ≠ destination consumers operational
29
+
30
+- Supabase project `hcsixhqbyuhpshfwqpjx` has **82 recorded migrations**; `20261002072526 request_wave4b_scheduler_outbox_delivery` is present.
31
+- Direct read-only `pg_proc` query confirms `private.request_run_sla_scheduler`, `private.request_claim_outbox`, `private.request_complete_outbox`, `private.request_fail_outbox` plus public counterparts. The source file `supabase/migrations/20261002073500_request_wave4b_scheduler_outbox_delivery.sql` explicitly leaves D4c external destination consumers disabled.
32
+- The original PR #28's "production migration not applied" was true only for its historical checkpoint. Present-tense main documentation has now been corrected. **No new scheduler task was executed, no consumer destination was contacted, and no claim of real delivery is made.**
33
+
34
+## Retained blockers and follow-up
35
+
36
+- **#6:** financial invariants and irreversible posted ledger safety require controlled independent proof.
37
+- **#39/#40:** owner-real scrollbar placement in RTL; do not modify stable shell geometry without symptom/measurement.
38
+- **#58:** source-vs-live phone identity migration drift and admin/Auth security; read-only drift reconciliation precedes any privileged action.
39
+- Other Phase-0 acceptance gates F0-01 real affected-ISP login, F0-02 actual tenant catalogs, F0-03 safe authorized invoice persistence, F0-04 real printed invoice, F0-05 real 1,200+ selector and F0-07 dual-user/RLS remain OPEN.
40
+
41
+## Evidence, limits and rollback
42
+
43
+- Root PR diffs inspected: #6, #28, #39, #40, #43, #49, #57, #58, #80. Current main assets and contract checks inspected; branch-only historical CI is not recast as current source success.
44
+- F0-08 can be marked **HISTORIC PR DISPOSITION RECONCILED** after documentation and closings are verified; **not** equivalent to overall Phase-0 acceptance.
45
+- Rollback documentation by revert. Reopen any PR closed in error; no data, migration or external action requires rollback.