سامانه صدور فاکتور و حسابداری
Record verified modular office automation checkpoint
davoodmehraban89 committed
Sep 30, 2026 at 06:38 UTC
df0eaeaaaae883806f98cd6f29275dd367595317
1 file changed
+7
-9
PROJECT_STATE.md
+7
-9
@@ -12,22 +12,21 @@ 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 | 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 / FINAL CI PENDING** | Request `0b622439`; initial implementation `d3934690`; read-only expiry hardening `906d78d7`. Production migrations `20260930025546`, `20260930025647`, `20260930030314` applied+archived. Quality `36662546643` proved all static/accounting/Phase2–6/Golden/new platform invariants PASS, then exposed 3 browser-harness/integration issues: auto workspace modal intercepted the legacy DOM smoke; delayed extension bootstrap could rerun auth after a manual smoke login; new request-builder test counted the required checkbox as a text input. This checkpoint removes automatic modal interception while retaining explicit workspace launcher/switching, prevents delayed bootstrap from reinitializing auth when a user is already active, and corrects the test selector to `input.form-control`. Product module gating remains unchanged. Fresh Quality/Security/Pages required. Multi-login tenant/RBAC remains Slice B and is not claimed. |
15
+| 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, new modular-office invariants and Chromium Real-DOM tests; Security `36662911572` PASS; Pages `36662911432` PASS. Production DB negative checks: non-admin module-license RPC denied and unlicensed office write denied; positive atomic-registration transaction advanced counter 7→8 then rolled back. Multi-login tenant/RBAC remains Slice B and is not claimed. |
16
| 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. |
17
18
## Current production state — 2026-09-30
19
-- Pre-fix repo head: `906d78d751c7673196044ff55ba5a2224d6ce7ed`; this checkpoint contains only browser/bootstrap/test integration fixes, no new DB mutation.
19
+- Verified product head: `df82067ecb1fda9007eb11a30d0a9d7cc1b113cd`. This state-only commit follows it and does not change product behavior.
20
- Supabase `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, 24 migrations through `20260930030314`.
21
- Existing 4 licenses grandfathered to `full_suite`; `admin_set_license_modules` validates explicit module keys.
22
- 4/4 records policies include module entitlement; writes and atomic sync additionally require active license. Expired/cancelled users retain read-only access to entitled historical data.
23
- Private `office-attachments`: max 20 MB, PDF/JPEG/PNG/TIFF, owner+office-module RLS. Secretariat numbering uses server row lock + unique index.
24
-- DB negative tests PASS: non-admin module RPC denied; unlicensed office write denied. Positive transactional registration test advanced registry counter 7→8 then rolled back.
24
- Performance advisor after migrations: clean. Security advisor: 7 reviewed public SECURITY DEFINER RPC warnings (prior six + `admin_set_license_modules`) plus leaked-password protection disabled; new admin RPC negative-tested 42501 for non-admin.
25
26
## Implemented Slice A
27
- Architecture/research: `docs/FINORA_MODULAR_ERP_OFFICE_AUTOMATION_V1.md`.
28
- Server-enforced commercial module entitlements; full suite or explicit module subset independent of duration/company capacity.
30
-- Module-filtered rail, command routing, explicit workspace launcher and admin license module picker. Roadmap-only CRM/transport/manufacturing/maintenance disabled for sale.
29
+- Module-filtered rail/commands, explicit workspace launcher and admin license module picker. Roadmap-only CRM/transport/manufacturing/maintenance disabled for sale.
30
- Office: secretariat registries, incoming/outgoing/internal metadata, drafts, server-atomic registration number, private scan attachments, archive metadata search, OCR-ready fields.
31
- Requests: admin-defined request type/field schema + request submission foundation.
32
@@ -41,8 +40,7 @@ Posted accounting history is immutable and balanced; tenant isolation is data-bo
40
Multi-login organization membership/module-manager RBAC/shared inbox/referral; real Persian OCR accuracy; authenticated production-user browser E2E; physical printer; third-party webhook/ECE/email gateways; Supabase leaked-password setting; PostgreSQL 17.11 platform upgrade.
41
42
## Exact next executable work
44
-1. Run fresh Quality/Security/Pages on this browser-integration fix; no progress to Slice B until green.
45
-2. Recheck Supabase migrations/RLS/storage/advisors.
46
-3. Slice B: organization tenant + memberships + module roles/capabilities + row scopes + confidentiality + immutable permission/referral audit, with positive/negative RLS tests.
47
-4. Slice C: mature office lifecycle (templates/editor/signature/approval/referral/read receipts/SLA/reply graph/archive/OCR/full-text/integration adapters).
48
-5. Slice D/E: versioned workflow engine then transport/procurement/service/CRM/manufacturing/maintenance as complete tested vertical modules.
43
+1. Do not redo Slice A without a verified regression.
44
+2. Slice B: organization tenant + memberships + module roles/capabilities + row scopes + confidentiality + immutable permission/referral audit, with positive/negative RLS tests.
45
+3. Slice C: mature office lifecycle (templates/editor/signature/approval/referral/read receipts/SLA/reply graph/archive/OCR/full-text/integration adapters).
46
+4. Slice D/E: versioned workflow engine then transport/procurement/service/CRM/manufacturing/maintenance as complete tested vertical modules.