@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 7e8e43e
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 20:45 UTC

Close run-failure audit and record prioritized completion gaps

davoodmehraban89 committed Sep 30, 2026 at 07:24 UTC 7e8e43e5b0852b708e686196601ff5b25ba544db
1 file changed +11 -9
PROJECT_STATE.md
+11 -9
@@ -12,21 +12,22 @@ 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 | Audit Gmail GitHub `Run failed` notifications, verify/fix any still-live CI defects, and produce a severity-ranked list of remaining gaps needed to make the current Finora stage complete. | **AUDIT IN PROGRESS** | Gmail and live GitHub Actions are being cross-checked against current `main`; historical failures must not be confused with current defects. |
15 +| 2026-09-30 | Audit Gmail GitHub `Run failed` notifications, verify/fix any still-live CI defects, and produce a severity-ranked list of remaining gaps needed to make the current Finora stage complete. | **AUDITED / HISTORICAL FAILURES TRIAGED / CI MODERNIZED / GAP REGISTERED** | Gmail failures mapped to intermediate commits: old Real-DOM/request-builder failures were fixed by later browser hardening; Slice-B migration-count invariant was fixed by later archived migrations; Security failures were Dependency Review failing because GitHub Dependency graph is disabled while CodeQL passed. Current workflow keeps dependency-review unclaimed/best-effort until the repository setting is enabled. CI runtime maintenance: quality uses `checkout@v7` + `setup-node@v7`; security uses `checkout@v7` + CodeQL v4. Prior verified main `d9b1cd3` had Quality/CodeQL/Pages green; final post-maintenance main verification must remain green. Prioritized remaining register: `docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md`. |
16 | 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 / VERIFIED** | PR #7 merged as `d212c6aeef5b49f33351166771a0899f307a9067`. PR Quality `36664844247` PASS and Security `36664844234` CodeQL PASS. Final main checkpoint `99a23edcaddf542f9080bbe70bb0b450af14913f` also passed Quality `36664994360`, Security/CodeQL `36664994384`, and Pages `36664994039`. 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. GitHub Dependency graph remains disabled, so dependency review is not claimed. Evidence: `docs/SLICE_B_TENANT_RBAC_VERIFICATION.md`. |
17 | 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. |
18 | 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. |
19
20 ## Current production state — 2026-09-30
21 -- Verified Slice B release checkpoint on canonical main: `99a23edcaddf542f9080bbe70bb0b450af14913f`; this continuity-only closeout commit follows it.
21 +- Verified Slice B release checkpoint on canonical main: `99a23edcaddf542f9080bbe70bb0b450af14913f`; subsequent commits are continuity/CI-maintenance/gap-documentation changes and require their own green main gates before being called release-verified.
22 - Supabase `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, 29 migrations through `20260930033010`.
23 - 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.
24 - `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.
25 - Active non-owner members receive read-only `core` context for workspace initialization; core writes remain owner-only in Slice B.
26 - Organization security metadata: `organizations`, `organization_units`, `organization_members`, `member_module_permissions`, immutable `organization_audit`.
27 - 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.
28 -- 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.
29 -- Performance advisor: no unindexed-FK finding after `20260930032615`; newly-created indexes currently appear only as unused-index informational notices.
28 +- Live security advisor still reports 7 reviewed authenticated-callable public SECURITY DEFINER helpers and leaked-password protection disabled; these are tracked in the gap register and are not silently called resolved.
29 +- Live performance advisor reports 5 newly-created unused-index informational notices; no unindexed-FK finding is present. Do not remove new indexes before representative workload evidence.
30 +- Production currently has 7 invoice records and no account-master/journal collections; controlled accounting cutover remains a P0 completion gap rather than being auto-posted destructively.
31
32 ## Implemented Slice A
33 - Architecture/research: `docs/FINORA_MODULAR_ERP_OFFICE_AUTOMATION_V1.md`.
@@ -48,12 +49,13 @@ Verify live GitHub+Supabase before acting; record material requests before imple
49 Posted accounting history is immutable and balanced; tenant isolation is data-boundary enforced; commercial module entitlement and member authorization are independent; UI hiding is never security; expired licenses are read-only; office numbers are server-atomic; binary scans stay in private Storage; roadmap-only modules are not presented as operational.
50
51 ## Required evidence
51 -`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/`.
52 +`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/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md` · `docs/PRODUCTION_RUNBOOK.md` · `supabase/migrations/`.
53
54 ## NOT VERIFIED / external boundary
54 -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.
55 +Authenticated two-real-user production browser E2E; member invitation without a pre-existing account; controlled posting/reconciliation of existing production invoices into initialized accounting masters; real Persian OCR accuracy; qualified digital signature; physical printer; third-party webhook/ECE/email gateways; GitHub Dependency graph/dependency-review availability; Supabase leaked-password protection; formal closure/hardening disposition for 7 public SECURITY DEFINER advisor warnings; PostgreSQL 17.11 platform upgrade.
56
57 ## Exact next executable work
57 -1. 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 -2. Slice D: versioned workflow engine for configurable requests — steps, conditions, parallel/sequential approval, delegation/substitution, SLA/escalation and immutable action history.
59 -3. Slice E: transport/procurement/service/CRM/manufacturing/maintenance only as complete tested vertical modules with accounting/permissions/reporting integration.
58 +1. Close current-stage P0/P1 register in `docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md`, starting with two-real-user authenticated E2E and a non-destructive controlled accounting cutover plan/evidence.
59 +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.
60 +3. Slice D: versioned workflow engine for configurable requests — steps, conditions, parallel/sequential approval, delegation/substitution, SLA/escalation and immutable action history.
61 +4. Slice E: transport/procurement/service/CRM/manufacturing/maintenance only as complete tested vertical modules with accounting/permissions/reporting integration.