سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 20:45 UTC
Finalize Slice B release state
davoodmehraban89 committed
Sep 30, 2026 at 07:04 UTC
99a23edcaddf542f9080bbe70bb0b450af14913f
1 file changed
+8
-7
PROJECT_STATE.md
+8
-7
@@ -12,15 +12,16 @@ Verify live GitHub+Supabase before acting; record material requests before imple
12
## Current change ledger
13
| Date | Request / decision | Status | Evidence / next action |
14
|---|---|---|---|
15
-| 2026-09-30 | Continue from verified Slice A into Slice B: organization tenant, multi-user memberships, module roles/capabilities, row scopes, confidentiality, shared office access/referral foundation and immutable permission/referral audit. | **IMPLEMENTED IN PRODUCTION DB / PR #7 CI PENDING** | Production migrations `20260930031853`, `20260930031942`, `20260930032615`, `20260930032654` applied+archived. Existing accounts backfilled to isolated organizations; records are organization-keyed while creator `owner_id` remains for own-scope. RLS now intersects organization membership + commercial entitlement + capability + row scope + confidentiality. Organization-aware sync/client, member-permission UI, shared office referral and org-aware attachment paths are on `feat/slice-b-tenant-rbac`. Production transactional tests PASS for own/org scope, confidentiality, read-only capability, expired-license read-only, referral/audit immutability. Performance FK findings fixed; security advisor introduced no new exposed SECURITY DEFINER warning. Final merge requires current PR Quality/Security green, then main Pages green. Evidence: `docs/SLICE_B_TENANT_RBAC_VERIFICATION.md`. |
15
+| 2026-09-30 | Continue from verified Slice A into Slice B: organization tenant, multi-user memberships, module roles/capabilities, row scopes, confidentiality, shared office access/referral foundation and immutable permission/referral audit. | **IMPLEMENTED / MERGED / PRODUCTION DB VERIFIED** | PR #7 merged as `d212c6aeef5b49f33351166771a0899f307a9067` after Quality `36664844247` PASS (all accounting/Phase2–6/Golden/platform/Slice-B invariants + Chromium Real-DOM) and Security `36664844234` CodeQL PASS. Production migrations `20260930031853`, `20260930031942`, `20260930032615`, `20260930032654`, `20260930033010` applied+archived. Production transactional tests PASS for own/org scope, confidentiality, read-only capability, member core read-only context, expired-license read-only, referral/audit immutability and member Storage-path isolation. Dependency-review action is best-effort because GitHub Dependency graph is disabled for this repository; workflow records a warning instead of falsely claiming a dependency review. Evidence: `docs/SLICE_B_TENANT_RBAC_VERIFICATION.md`. |
16
| 2026-09-30 | Modular organization-wide ERP: office automation/scanned correspondence/secretariat, configurable requests, module managers/permissions, module-select entry, module-by-module/full-suite licensing, future transport/operations; research Barid/ParGar, Chargoon/Didgah, Faragostar. | **SLICE A IMPLEMENTED / VERIFIED** | Request `0b622439`; implementation `d3934690`; read-only expiry hardening `906d78d7`; browser integration hardening `df82067ecb1fda9007eb11a30d0a9d7cc1b113cd`. Production migrations `20260930025546`, `20260930025647`, `20260930030314` applied+archived. Final product-head Quality `36662911587` PASS including syntax, accounting/Phase2–6/Golden, modular-office invariants and Chromium Real-DOM tests; Security `36662911572` PASS; Pages `36662911432` PASS. |
17
| 2026-09-30 | Iran-first high-assurance ERP expansion. | IN PROGRESS — broader roadmap | `docs/IRAN_COMPLIANCE_MATRIX_V1.md`; do not claim statutory consolidation/full tax submission/full HR/CRM until complete lifecycle/accounting/permissions/tests exist. |
18
19
## Current production state — 2026-09-30
20
-- Canonical main before Slice B merge: `cba507186ac50f1c2771f720bc651eb8d99d490e`; Slice B PR branch head advances independently until CI green.
21
-- Supabase `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, 28 migrations through `20260930032654`.
22
-- 4 existing licenses remain `full_suite`; each license now belongs to a backfilled organization whose original account is owner.
20
+- Slice B product merge on canonical main: `d212c6aeef5b49f33351166771a0899f307a9067`; this state-only commit follows it.
21
+- Supabase `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, 29 migrations through `20260930033010`.
22
+- 4 existing licenses remain `full_suite`; each license belongs to a backfilled organization whose original account is owner. Production check: 4 organizations, 4 active owners, 0 licenses without organization, 0 records without organization.
23
- `records` primary identity is `(organization_id, collection, id)`; RLS enforces membership/entitlement/capability/scope/confidentiality. Writes require active organization license; expired/cancelled organizations retain authorized historical reads.
24
+- Active non-owner members receive read-only `core` context for workspace initialization; core writes remain owner-only in Slice B.
25
- Organization security metadata: `organizations`, `organization_units`, `organization_members`, `member_module_permissions`, immutable `organization_audit`.
26
- Office registration is organization-aware; referral is server-validated and immutable; new Storage path is organization/uploader/correspondence/file and resolves access through correspondence authorization. Legacy attachment writes are owner-only.
27
- Security advisor: same 7 reviewed public SECURITY DEFINER warnings from existing admin/license helpers plus leaked-password protection disabled; Slice B added no new exposed SECURITY DEFINER warning.
@@ -38,7 +39,7 @@ Verify live GitHub+Supabase before acting; record material requests before imple
39
- Per-member module capabilities: `read/create/edit/delete/approve/register/refer/archive/configure`.
40
- Row scopes: own/unit/branch/company/organization; missing scope key does not broaden access.
41
- Confidentiality clearance independent of generic module read.
41
-- Organization-aware license selection, workspace/module visibility and sync.
42
+- Organization-aware license selection, explicit organization switcher, workspace/module visibility and sync.
43
- Owner/member access-management surface; module configurators can assign permissions for their module. Adding a member currently requires an already-registered Finora account.
44
- Shared office records through server RLS, capability-gated draft/register/configure/refer actions, immutable referrals and permission/referral audit.
45
@@ -49,10 +50,10 @@ Posted accounting history is immutable and balanced; tenant isolation is data-bo
50
`docs/PHASE_1_REDESIGN_VERIFICATION.md` · `docs/PHASE_2_REDESIGN_VERIFICATION.md` · `docs/PHASE_3_REDESIGN_VERIFICATION.md` · `docs/PHASE_4_REDESIGN_VERIFICATION.md` · `docs/PHASE_5_VERIFICATION.md` · `docs/PHASE_6_VERIFICATION.md` · `docs/IRAN_COMPLIANCE_MATRIX_V1.md` · `docs/FINORA_ERP_EXPANSION_ROADMAP_V4.md` · `docs/FINORA_UX_ACCOUNTING_BENCHMARK_V3.md` · `docs/FINORA_MODULAR_ERP_OFFICE_AUTOMATION_V1.md` · `docs/SLICE_B_TENANT_RBAC_VERIFICATION.md` · `docs/PRODUCTION_RUNBOOK.md` · `supabase/migrations/`.
51
52
## NOT VERIFIED / external boundary
52
-Invitation of users without an existing Finora account; authenticated two-real-user production browser E2E; real Persian OCR accuracy; qualified digital signature; physical printer; third-party webhook/ECE/email gateways; Supabase leaked-password setting; PostgreSQL 17.11 platform upgrade.
53
+Invitation of users without an existing Finora account; authenticated two-real-user production browser E2E; real Persian OCR accuracy; qualified digital signature; physical printer; third-party webhook/ECE/email gateways; GitHub Dependency graph/dependency-review availability; Supabase leaked-password setting; PostgreSQL 17.11 platform upgrade.
54
55
## Exact next executable work
55
-1. Finish PR #7 release gate: current Quality/Security green → merge to `main` → verify Pages/main CI and live browser bootstrap.
56
+1. Verify main Quality/Security/Pages for the final state commit; if green, Slice B release gate is closed.
57
2. Slice C: mature office lifecycle — templates/editor, signatures/approval, referral chains/read receipts, SLA/reminders, reply/related-letter graph, archive classification, OCR/full-text and integration adapters.
58
3. Slice D: versioned workflow engine for configurable requests — steps, conditions, parallel/sequential approval, delegation/substitution, SLA/escalation and immutable action history.
59
4. Slice E: transport/procurement/service/CRM/manufacturing/maintenance only as complete tested vertical modules with accounting/permissions/reporting integration.