@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 253b03a
Fork 0

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

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

Synced Dec 3, 18:15 UTC

Close Office C7 and hand off to C8

davoodmehraban89 committed Oct 1, 2026 at 00:30 UTC 253b03a003d7851d263cf797ce31677530c26a61
1 file changed +5 -3
PROJECT_STATE.md
+5 -3
@@ -16,6 +16,7 @@ Verify live GitHub + Supabase before acting; implement/test/fix/retest/commit/ve
16 | 2026-09-30 | Office Slice C4: tenant-safe registration repair + versioned correspondence templates + controlled draft application. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migrations `20260930202526_office_registration_tenant_repair`, `20260930202701_office_slice_c4_versioned_templates`; verified runtime/test head `481f9fed434f127eaa32ccf8d69c649e783b5cad`; Quality `36773156535` PASS including C4 + Real-DOM; Security `36773156559` CodeQL PASS; Pages `36773155535` PASS. Removed ambiguous legacy registration overload, bound registration to organization, added private append-only template versions, server provenance validation and template UI. Evidence: `docs/OFFICE_SLICE_C4_VERIFICATION.md`. |
17 | 2026-10-01 | Office Slice C5: internal approval/attestation lifecycle. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migrations `20260930203456`, `20260930203620`, `20260930203709`; content-bound SHA-256 approval evidence, explicit approver authorization, reject/rework/new-request semantics, stale-content rejection and AAL metadata. Runtime head `02f76f18c7685a4da88de68972113d32b30a21fb`; Quality `36774255459` PASS; Security `36774255463` CodeQL PASS; Pages `36774253349` PASS. Evidence: `docs/OFFICE_SLICE_C5_VERIFICATION.md`. Not a qualified digital signature. |
18 | 2026-10-01 | Office Slice C6: server-derived SLA reminder/escalation evidence. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migration `20260930204536_office_slice_c6_sla_reminder_escalation`; daily reminder dedup, 24h escalation threshold, immutable internal-only evidence, requester/admin authorization, stale/terminal work rejection and cross-tenant denial. Runtime head `ba06af2bcaf5b63e37f5421fb49c4246d85ba762`; Quality `36775081078` PASS including C6 + Real-DOM; Security `36775081089` CodeQL PASS; Pages `36775080542` PASS. Evidence: `docs/OFFICE_SLICE_C6_VERIFICATION.md`. No external delivery claim. |
19 +| 2026-10-01 | Office Slice C7: searchable archive + OCR provenance/correction. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migrations `20260930205325`, `20260930205347`; server full-text search across metadata/body/latest OCR, append-only raw OCR provenance and human correction, match-source reporting, bounded query/result size and cross-tenant denial. Runtime head `c307422eae508b57e448a3c9b4b3e3506836f3e2`; Quality `36776208848` PASS including C7 + Real-DOM; Security `36776208767` CodeQL PASS; Pages `36776208873` PASS. Evidence: `docs/OFFICE_SLICE_C7_VERIFICATION.md`. C7 does not perform OCR and real Persian OCR accuracy remains unverified. |
20 | 2026-09-30 | Office Slice C3: related-letter graph + structured archive classification/search. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migrations `20260930154625_office_slice_c3_related_archive`, `20260930154720_office_c3_event_time_ordering`; Quality `36740544828` PASS including C3 + Real-DOM; Security `36740544795` CodeQL PASS; Pages `36740543917` PASS. Transactional tests covered scope/confidentiality isolation, unreadable relation target denial, self/duplicate/cycle denial, latest classification, related graph search and cross-tenant denial; rollback residue zero. Evidence: `docs/OFFICE_SLICE_C3_VERIFICATION.md`. |
21 | 2026-09-30 | Office Slice C2: actionable referrals, target authorization, append-only actions and SLA work queue. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migrations `20260930152500_office_slice_c2_actionable_referrals_sla` and `20260930153000_office_evidence_insert_hardening`; Quality `36737229597` PASS including all accounting/Golden/ELI/C1/C2 + Real-DOM; Security `36737229678` CodeQL PASS; Pages `36737229045` PASS. Transactional tests rejected unreadable targets, sender impersonation, completion-before-ack, duplicate ack, cross-tenant queue access and direct referral/audit forgery; rollback restored temporary seat limit/member/fixtures with zero residue. Evidence: `docs/OFFICE_SLICE_C2_VERIFICATION.md`. |
22 | 2026-09-30 | Office Slice C1: immutable registered correspondence history + server-authoritative read evidence. | **IMPLEMENTED / PRODUCTION + ADVERSARIAL + REAL-DOM + SECURITY VERIFIED** | Production migration `20260930054352_office_registered_history_read_evidence`; runtime head `15b32367ff9a8154729da27cd581930871b5fb5b`; Quality `36674993838` PASS including C1 + Real-DOM; Security `36674993881` CodeQL PASS; Pages `36674993095` PASS. Transactional production verification rejected identity rewrite, backward status, delete, audit mutation/delete and cross-tenant read evidence; rollback residue zero. Evidence: `docs/OFFICE_SLICE_C1_VERIFICATION.md`. |
@@ -29,7 +30,7 @@ Verify live GitHub + Supabase before acting; implement/test/fix/retest/commit/ve
30 | 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 lifecycle/accounting/permissions/tests exist. |
31
32 ## Current production state — 2026-09-30
32 -- Supabase project `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, **48 migrations through `20260930204536 office_slice_c6_sla_reminder_escalation`**.
33 +- Supabase project `hcsixhqbyuhpshfwqpjx`: `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, **51 migrations through `20260930205347 office_c7_search_input_guard`**.
34 - Continuity repair: live migration `20260930203839 office_c5_content_digest_hardening` was found live but absent from Git; its exact SQL was recovered from Supabase migration history and archived before C6.
35 - Four organization-linked licenses with server-enforced `max_companies`, `max_users`, modules and future-safe `limits`; no license is below current active seat/company usage.
36 - Persistent production membership remains four active owners and zero non-owner members. All ELI adversarial multi-user tests used existing legitimate principals inside transactions and rolled back.
@@ -54,19 +55,20 @@ Verify live GitHub + Supabase before acting; implement/test/fix/retest/commit/ve
55 - Office C4: tenant-safe atomic registration, private append-only versioned correspondence templates, server-validated template provenance and controlled new-letter template application.
56 - Office C5: content-bound internal approval/rejection with explicit approver authorization, append-only evidence, AAL metadata, stale-content detection and a strict non-qualified-signature boundary.
57 - Office C6: server-derived SLA queue, daily reminder deduplication, 24-hour escalation threshold, internal-only immutable evidence, stale/terminal-work rejection and requester/admin authorization.
58 +- Office C7: tenant-safe server full-text archive search across metadata/body/latest OCR, append-only OCR provenance/correction evidence, bounded search inputs and explicit no-real-OCR claim.
59 - Existing accounting Phases 1–6 and Iran enterprise foundation remain accepted; ELI work must not rewrite posted accounting history.
60
61 ## Invariants
62 Posted accounting history is immutable and balanced; tenant isolation is enforced at the data boundary; commercial entitlement and member authorization are independent; UI hiding is never security; expired licenses are read-only; office numbering is server-atomic; private scans remain private; seat/company limits are server-enforced; delegated customer admins cannot mutate commercial license entitlements; invitation acceptance is authenticated, email-bound and seat-safe; raw invitation tokens are never persisted or audited; organization-unit parents cannot cross tenants or form cycles; referral targets must already be authorized to read the source correspondence; only the bound target may acknowledge/complete a referral; referral/audit evidence can only be inserted by authorized server operations.
63
64 ## Required evidence
63 -`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/PHASE_6_CUTOVER_MANIFEST.md` · `docs/PRODUCTION_ACCOUNTING_CUTOVER_READINESS_2026-09-30.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/SECURITY_DEFINER_HARDENING_2026-09-30.md` · `docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md` · `docs/superpowers/specs/2026-09-30-enterprise-licensing-organization-identity-design.md` · `docs/ELI_1_ENTERPRISE_LICENSE_VERIFICATION.md` · `docs/ELI_2_REUSABLE_ROLES_VERIFICATION.md` · `docs/ELI_3_INVITATIONS_VERIFICATION.md` · `docs/ELI_4_ENTERPRISE_ORGANIZATION_UX_VERIFICATION.md` · `docs/OFFICE_SLICE_C1_VERIFICATION.md` · `docs/OFFICE_SLICE_C2_VERIFICATION.md` · `docs/OFFICE_SLICE_C3_VERIFICATION.md` · `docs/OFFICE_SLICE_C4_VERIFICATION.md` · `docs/OFFICE_SLICE_C5_VERIFICATION.md` · `docs/OFFICE_SLICE_C6_VERIFICATION.md` · `docs/PRODUCTION_RUNBOOK.md` · `supabase/migrations/`.
65 +`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/PHASE_6_CUTOVER_MANIFEST.md` · `docs/PRODUCTION_ACCOUNTING_CUTOVER_READINESS_2026-09-30.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/SECURITY_DEFINER_HARDENING_2026-09-30.md` · `docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md` · `docs/superpowers/specs/2026-09-30-enterprise-licensing-organization-identity-design.md` · `docs/ELI_1_ENTERPRISE_LICENSE_VERIFICATION.md` · `docs/ELI_2_REUSABLE_ROLES_VERIFICATION.md` · `docs/ELI_3_INVITATIONS_VERIFICATION.md` · `docs/ELI_4_ENTERPRISE_ORGANIZATION_UX_VERIFICATION.md` · `docs/OFFICE_SLICE_C1_VERIFICATION.md` · `docs/OFFICE_SLICE_C2_VERIFICATION.md` · `docs/OFFICE_SLICE_C3_VERIFICATION.md` · `docs/OFFICE_SLICE_C4_VERIFICATION.md` · `docs/OFFICE_SLICE_C5_VERIFICATION.md` · `docs/OFFICE_SLICE_C6_VERIFICATION.md` · `docs/OFFICE_SLICE_C7_VERIFICATION.md` · `docs/PRODUCTION_RUNBOOK.md` · `supabase/migrations/`.
66
67 ## NOT VERIFIED / external boundary
68 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; qualified digital signature; physical printer; live external adapters; GitHub Dependency graph; leaked-password protection; PostgreSQL 17.11 upgrade; CodeQL v4 migration.
69
70 ## Exact next executable work
69 -1. Start Office Slice C7 as a bounded searchable-archive vertical slice: server-side full-text search over correspondence metadata/body plus OCR-text provenance/correction fields, while explicitly not claiming real Persian OCR accuracy until representative scans/provider output are tested; preserve all C1-C6/accounting/Golden/ELI gates.
71 +1. Start Office Slice C8 as the next bounded internal-office vertical slice: mature correspondence workflow policy (configurable workflow stages, authorized transition rules and immutable transition evidence) without claiming external BPM/provider integration; preserve all C1-C7/accounting/Golden/ELI gates.
72 2. Keep qualified digital signature and external delivery adapters explicitly outside verified scope until real providers are connected and tested.
73 3. Authenticated two-real-user production browser verification remains blocked until a legitimate persistent non-owner principal is intentionally available; do not fabricate or permanently cross-add one.
74 4. External invitation email delivery remains an adapter boundary; do not claim it until a real provider is connected and tested.