@davoodmehraban89 / Factor-easy / commits / 62da4cf
Fork 0

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

docs: reconcile approved Wave 4 production deployment

Production migration 20261003033540 applied from archived SQL after explicit owner approval. Live read-only contracts and grants verified; production two-user E2E remains NOT VERIFIED. PR #45 Quality 37093925111 and Security 37093925055 passed; 49 controlled DOM tests and accounting assertions verified in job logs.

davoodmehraban89 committed Oct 3, 2026 at 07:10 UTC 62da4cf24b5505d9dfe41b43acafa04af74c06c9
1 file changed +13 -3
PROJECT_STATE.md
+13 -3
@@ -17,6 +17,7 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
17 ## Current change ledger
18 | Date | Request / decision | Status | Evidence / next action |
19 |---|---|---|---|
20 +| 2026-10-03 | Owner explicitly approved applying archived Wave 4 migration (`بله تاییده`) and directed continuation after reconnecting GitHub. | **PRODUCTION APPLIED / READ-ONLY CONTRACTS VERIFIED / PRODUCTION E2E NOT VERIFIED** | Scope: only `20261002072000_request_wave4_operational_integrity.sql` on `hcsixhqbyuhpshfwqpjx`, including column/index/functions/EXECUTE grants. Baseline main `81bd9bf38e0b02e5baed8a3fa32a89a2b1345572`; SQL blob `7e644afd2387d328056356314ebfdeed272963ab`. Live preflight: migration absent, idempotency column absent, delegation rows=0, six-argument RPC present and seven-argument RPC absent. Exact SQL applied as `20261003033540 request_wave4_operational_integrity`; approval recorded before apply in `ed90934f057e85bfd6bd0286bdf309d9c2ded9f7`. Other sensitive changes remain approval-gated. |
21 | 2026-10-02 | Latest owner request: verify live main and Supabase, reconcile state before implementation, enforce explicit approval for sensitive database/auth changes and evidence-based slice acceptance. | **RECONCILIATION RECORDED / WAVE 4 PRODUCTION BLOCKER / NO PRODUCT CHANGE** | Baseline main `d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5`; previous branding merge `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`. Quality `36991861922`, Security `36991863100`, Release `36992001841`, gated Pages `36992033310` succeeded. Job `110789670982` logs confirm 49/49 real-DOM tests and accounting phases 2–6 + Golden passed; the seven accounting scripts were also rerun locally at the baseline SHA and passed. DOM tests use controlled fixtures/mocked auth and are not authenticated production E2E. Supabase Finora ACTIVE_HEALTHY, 78 migration history entries, all 18 public tables have RLS; 10 private tables have no client CRUD grants (3 RLS enabled, 7 disabled). 79 repository SQL files versus 78 production migration records; 21 same-name files have different production versions. Wave 4 operational-integrity migration is genuinely absent; details below. Full SQL equivalence of all historical migrations NOT VERIFIED. No schema/RLS/auth/role/data mutation performed. |
22 | 2026-10-02 | Branding PR first Quality run exposed a Pages-artifact packaging gap: new icon files were present in source but `scripts/build-pages.mjs` copied only `js` and `vendor`, causing a 404 in hardened Pages smoke. | **MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED** | Pages builder now copies the versioned `assets` directory into `_site`; product/auth logic was not the cause. Merged in `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`; baseline main Quality `36991861922` succeeded; job logs verify 49/49 controlled real-DOM tests and accounting regression gates; production two-user E2E remains NOT VERIFIED. |
23 | 2026-10-02 | Owner requested product-wide naming change to «نرم‌افزار ERP سازمانی فینورا», a premium redesign of the login screen based on the supplied reference, and replacement of the generated letter favicon/bookmark icon with the supplied Finora F icon. | **MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED** | Browser/bookmark title, application metadata, manifest and visible legacy tagline now use «نرم‌افزار ERP سازمانی فینورا». Added supplied-logo-derived 32px favicon + 180px app/apple icon, real icon in shell branding, and a responsive premium split login with Finora Enterprise visual while preserving every auth contract ID/action. Added static + Real-DOM desktop/mobile regression gates; merged in `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`, baseline CI/release/deploy succeeded as recorded above; runtime checks remain bounded by actual evidence. |
@@ -84,9 +85,18 @@ Posted accounting history is immutable and balanced; tenant isolation is enforce
85 ## NOT VERIFIED / external boundary
86 Automatic background scheduling for SLA scans; delivery/dispatch consumers for D3c outbox intents; authenticated two-real-user production browser E2E with a persistent legitimate non-owner member; automatic external invitation email delivery; owner-approved accounting cutover; real Persian OCR accuracy/provider; qualified digital signature; physical printer; live external adapters; GitHub Dependency graph/enforceable dependency review; leaked-password protection; PostgreSQL upgrade; CodeQL v4 migration; external BPM/provider integration remain outside verified scope.
87
87 -The connected Supabase production target is `hcsixhqbyuhpshfwqpjx` (`Finora`). Live migration history includes C8, D1–D4a and request security Waves 1–3; the 2026-10-02 reconciliation found Wave 4 operational integrity missing despite later Wave 4b being present. History includes `request_wave4b_scheduler_outbox_delivery` version `20261002072526`, and `identity_wave5a_bootstrap` version `20261002075156`. Read-only production reconciliation after Wave 4b confirmed both scheduler evidence tables, stable destination-command/dead-letter outbox columns, and scheduler/claim/complete/fail/replay RPC contracts exist. Security advisor still reports 3 private C8 tables with RLS but no policies and 20 authenticated-callable SECURITY DEFINER functions; live intent review on 2026-10-02 verified these as deliberate deny-by-default private storage and guarded privileged RPC boundaries, respectively. Leaked-password protection remains disabled.
88 +The connected Supabase production target is `hcsixhqbyuhpshfwqpjx` (`Finora`). Live migration history includes C8, D1–D4a and request security Waves 1–3; the 2026-10-02 reconciliation found Wave 4 operational integrity missing despite later Wave 4b being present; that drift was resolved on 2026-10-03 by approved migration `20261003033540`. History includes `request_wave4b_scheduler_outbox_delivery` version `20261002072526`, and `identity_wave5a_bootstrap` version `20261002075156`. Read-only production reconciliation after Wave 4b confirmed both scheduler evidence tables, stable destination-command/dead-letter outbox columns, and scheduler/claim/complete/fail/replay RPC contracts exist. Security advisor still reports 3 private C8 tables with RLS but no policies and 20 authenticated-callable SECURITY DEFINER functions; live intent review on 2026-10-02 verified these as deliberate deny-by-default private storage and guarded privileged RPC boundaries, respectively. Leaked-password protection remains disabled.
89
89 -## Reconciliation evidence — 2026-10-02
90 +## Wave 4 production verification — 2026-10-03
91 +- Owner explicitly approved the archived SQL including schema/function/EXECUTE-grant changes. Applied successfully to `hcsixhqbyuhpshfwqpjx` as `20261003033540 request_wave4_operational_integrity` after recording approval in commit `ed90934f057e85bfd6bd0286bdf309d9c2ded9f7`.
92 +- Exact source: `supabase/migrations/20261002072000_request_wave4_operational_integrity.sql`, Git blob `7e644afd2387d328056356314ebfdeed272963ab`. No SQL modification or duplicate migration file introduced. Production version differs because the migration service assigns the application timestamp.
93 +- Live schema checks PASS: text idempotency column exists; key-length CHECK validated; actor-scoped unique index valid. Seven-argument public/private create RPCs exist; authenticated can execute new signatures and cannot execute old six-argument signatures; anon cannot execute either. Public wrapper is SECURITY INVOKER, private implementation remains guarded SECURITY DEFINER; empty search_path verified. Duplicate-intent and revoke audit-deduplication guards present.
94 +- Live BEGIN READ ONLY tests PASS: valid workflow accepted; normalized duplicate target/action rejected with expected error; unauthenticated delegation rejected with SQLSTATE 28000. Transaction rolled back. Delegation row count remained zero. No financial data mutation or user provisioning occurred. Public tables without RLS=0.
95 +- Security advisor unchanged: 3 private C8 no-policy INFO, 20 authenticated SECURITY DEFINER WARN, 1 disabled leaked-password-protection WARN. Existing remediation references remain below; no unrelated grants or Auth settings changed.
96 +- Baseline main `81bd9bf38e0b02e5baed8a3fa32a89a2b1345572`: Quality `36994542956`, Security `36994542874`, Release `36994665315`, Pages `36994730651` succeeded. Static job `110798133201` logs inspected: 49/49 controlled real-DOM tests and accounting phases 2–6 + Golden passed. Disposable D1 job `110798133021` logs inspected: exact Wave 4 migration and `supabase/tests/request_wave4_operational_integrity.sql` executed successfully with ON_ERROR_STOP. These are controlled/disposable tests, not authenticated production browser E2E.
97 +- VERIFIED boundary: missing migration deployed; structural, permission and read-only negative-control contracts pass. NOT VERIFIED: persistent two-real-user production browser E2E, real-user production delegation creation/replay/revocation, concurrent production overlap, and full historical SQL equivalence. No blanket product COMPLETED claim.
98 +
99 +## Historical reconciliation evidence — 2026-10-02 (Wave 4 absence resolved above)
100 - Request recorded before implementation in commit `cb7f4f0606207077151f5c82801842670a35d90a` on `audit/reconcile-state-20261002`. This slice changes documentation only. No feature, schema, RLS, auth, role or production data mutation was performed.
101 - Baseline main `d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5` follows branding merge `5d33b6ea4fb173f6b2e6514c756fc1d122fd2773`. The heartbeat commit changed AGENTS.md without a same-commit PROJECT_STATE.md update; this is a historical continuity-protocol discrepancy, not retroactively corrected history.
102 - Exact-SHA workflow evidence: Quality `36991861922` (static job `110789670982`: 49/49 real-DOM tests; accounting phases 2–6 and Golden passed); Security `36991863100`; Release gate `36992001841`; gated Pages `36992033310`: all SUCCESS. Logs were inspected, not inferred from workflow color. All seven accounting scripts also passed locally on the baseline; local DOM was NOT RUN (browser/test runtime unavailable). CI DOM fixtures mock auth/data and do not prove live tenant isolation.
@@ -97,7 +107,7 @@ The connected Supabase production target is `hcsixhqbyuhpshfwqpjx` (`Finora`). L
107 - NOT VERIFIED: authenticated production browser E2E; production accounting writes/reconciliation; complete historical SQL equivalence; full RLS policy adversarial tests in production; Wave 4 production behavior. No new product slice is marked COMPLETED.
108
109 ## Exact next executable work
100 -0. Obtain explicit owner approval for the archived Wave 4 schema/function/EXECUTE-grant migration above. After approval, recheck live main/migration history/function definitions for concurrent changes, apply the reviewed SQL via migration tooling, record the returned production version and reconcile contracts. Any data-writing production tests need a separately safe authorized scope. Current schema/RLS/auth/role changes remain approval-gated.
110 +0. Wave 4 deployment drift is resolved by production migration `20261003033540`; retain the production E2E/concurrency boundaries above. Next eligible verification is persistent legitimate two-user offboarding/delegation E2E with a safe authorized test scope. Further schema/RLS/auth/role changes require separate approval.
111 1. Finish Wave 5 offboarding/session-revocation verification on protected main, then execute persistent legitimate non-owner E2E when a second durable test identity is available without weakening tenant/capability checks.
112 2. Keep D4c destination consumers disabled until a real destination adapter enforces `destination_command_key` idempotency and its authorization/audit behavior is adversarially verified; automatic scheduler invocation remains a separate operational verification.
113 3. Resolve remaining platform-security gaps: formalize the three private C8 no-policy contracts, enable leaked-password protection when supported by the connected Auth control surface, and keep Dependency Review marked unavailable until Dependency Graph is enabled.