@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 74ac612
Fork 0

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

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

Synced Dec 3, 18:15 UTC

Close Office Slice C8 in gap register

davoodmehraban89 committed Oct 1, 2026 at 22:08 UTC 74ac6129a34bb1dc8dc9c0727c5bcd6b7e21aae5
1 file changed +25 -22
docs/CURRENT_STAGE_GAP_REGISTER_2026-09-30.md
+25 -22
@@ -1,6 +1,7 @@
1 # Finora — Current-stage completion gap register
2
3 -Date: 2026-09-30
3 +Date: 2026-09-30
4 +Updated: 2026-10-01 after Office C8 closure
5 Scope: what remains before the current Finora stage can be called high-assurance and operationally complete. This is deliberately narrower than the full long-term ERP roadmap.
6
7 ## Severity model
@@ -13,34 +14,36 @@ Scope: what remains before the current Finora stage can be called high-assurance
14
15 | # | Severity | Gap | Type | Current evidence / completion condition |
16 |---|---|---|---|---|
16 -| 1 | **P0 Critical** | Two-real-user authenticated production E2E for organization isolation/RBAC/confidentiality/Storage | QA + Security | Transactional DB tests pass, but the canonical state explicitly marks authenticated two-real-user production browser E2E as not verified. Complete only after two real non-admin accounts exercise allowed and denied cross-user/cross-organization paths in the deployed app. |
17 -| 2 | **P0 Critical** | Controlled accounting cutover for existing production invoices | Financial correctness + Migration | Production currently has 7 invoice records but no account-master/journal collections. Phase 6 intentionally did not auto-post legacy history. Complete only after chart initialization, owner-reviewed source mapping, preview, controlled source-linked posting, reconciliation and rollback evidence. |
17 +| 1 | **P0 Critical** | Two-real-user authenticated production E2E for organization isolation/RBAC/confidentiality/Storage | QA + Security | Transactional DB tests pass, but authenticated two-real-user production browser E2E remains unverified because production has no legitimate persistent non-owner fixture. Complete only after real non-admin principals exercise allowed and denied cross-user/cross-organization paths in the deployed app. |
18 +| 2 | **P0 Critical** | Controlled accounting cutover for existing production invoices | Financial correctness + Migration | Production history was intentionally not auto-posted. Complete only after chart initialization, owner-reviewed source mapping, preview, controlled source-linked posting, reconciliation and rollback evidence. |
19 | 3 | **P0 Critical if marketed as legally complete; otherwise scope boundary** | Statutory/compliance workflows not yet end-to-end | Compliance + Accounting | Do not claim full Taxpayer System submission, statutory consolidation, full payroll/HR or complete standards compliance merely because menus/calculations exist. Completion requires effective-dated sourced rules, lifecycle validation, posting/reversal, RLS, reconciliation, negative tests and acknowledged external submission where applicable. |
19 -| 4 | **P1 High** | Mature office lifecycle (Slice C) | Product + Office automation | **C1-C7 complete for their bounded scope:** immutable correspondence/read evidence, referrals/SLA, related-letter/archive graph, versioned templates, content-bound internal approval, reminder/escalation evidence, and tenant-safe full-text archive search with attachment-bound OCR provenance/human correction are production/CI/adversarial verified (`docs/OFFICE_SLICE_C1_VERIFICATION.md` through `docs/OFFICE_SLICE_C7_VERIFICATION.md`). C7 does not perform OCR or validate real Persian OCR accuracy. Remaining external scope: qualified-signature provider integration, real OCR provider/accuracy validation, and external delivery adapters. |
20 -| 5 | **P1 High** | Versioned configurable workflow engine (Slice D) | Product + Workflow | Requests have a form/type foundation, but sequential/parallel steps, conditions, delegation/substitution, SLA/escalation and immutable action history are not yet a complete workflow engine. |
20 +| 4 | **CLOSED for bounded internal office scope; external adapters remain P2 boundaries** | Mature office lifecycle (Slice C) | Product + Office automation | **C1-C8 complete for their bounded scope:** immutable correspondence/read evidence, referrals/SLA, related-letter/archive graph, versioned templates, content-bound internal approval, reminder/escalation evidence, tenant-safe full-text archive/OCR provenance, and versioned correspondence workflow policy/runtime with immutable transition evidence, idempotency, optimistic concurrency and safe UI. C8 final main `398e044`; Quality `36907314330`, Security `36907314457`, Pages `36907313039` PASS. Remaining external scope: qualified-signature provider, real OCR provider/accuracy validation, external delivery/BPM adapters and legitimate live two-user browser E2E. |
21 +| 5 | **P1 High — NEXT PRODUCT SLICE** | Versioned configurable workflow engine (Slice D) | Product + Workflow | Requests have a form/type/draft foundation, but versioned request schemas, sequential/parallel steps, conditions, delegation/substitution, SLA/escalation, immutable action history and cross-module actions are not yet a complete workflow engine. Must be designed as a separate request-workflow subsystem while reusing proven C8 patterns rather than coupling request state to correspondence workflow state. |
22 | 6 | **CLOSED** | Member invitation/onboarding without pre-existing Finora account | Identity + UX | Closed by ELI-3: hash-only email-bound invitations, expiry/revocation, authenticated acceptance, role assignment, seat enforcement, duplicate handling, audit and UI are production/Real-DOM/security verified. Automatic external invitation email delivery remains a separate adapter boundary. |
23 | 7 | **P1 High** | Supabase leaked-password protection | Security | Live Supabase advisor reports leaked-password protection disabled. Enable and verify authentication behavior before broad rollout. |
23 -| 8 | **P1 High** | SECURITY DEFINER RPC hardening / warning closure | Security + Database | Live advisor currently reports 20 authenticated-callable SECURITY DEFINER functions after enterprise and Office C1/C2/C3 RPCs. Current definitions include internal authorization checks, so this is not evidence of an exploit by itself; nevertheless each RPC needs an explicit exposure decision, least-privilege grants/search_path review, negative tests and warning disposition. |
24 -| 9 | **P1 High** | GitHub dependency graph / enforceable dependency review | Supply-chain security + CI | Historical `Run failed` security emails were caused by dependency review running while Dependency graph was disabled. Workflow now records this as unavailable instead of failing falsely, but actual dependency review remains absent until the repository setting is enabled and a PR run proves the check works. |
24 +| 8 | **P1 High** | SECURITY DEFINER RPC hardening / warning closure | Security + Database | Live advisor reports 20 authenticated-callable public SECURITY DEFINER functions. Current definitions include internal authorization checks, so this is not evidence of an exploit by itself; nevertheless each RPC needs an explicit exposure decision, least-privilege grants/search_path review, negative tests and warning disposition. C8 public wrappers are SECURITY INVOKER and did not add to this warning count. |
25 +| 9 | **P1 High** | GitHub dependency graph / enforceable dependency review | Supply-chain security + CI | Dependency Review is skipped/unavailable while Dependency graph is disabled. A green Security workflow is not equivalent to dependency review being active. Complete only when the repository setting is enabled and a PR run proves the check works. |
26 | 10 | **P1 High** | Accountant daily-control workbench gaps | Accounting operations | Bank statement import/reconciliation, formal period-close checklist/locks/evidence, sensitive journal/payment approval and segregation-of-duties, and a usable critical audit-log viewer remain required accountant-first controls unless separately verified in a later slice. |
26 -| 11 | **P2 Medium** | Real Persian OCR accuracy | Office + QA | C7 now provides server full-text archive search, append-only OCR provenance, attachment binding and human correction. What remains unverified is the OCR engine itself: complete only with a real provider, representative Persian scans, measured extraction/search quality and failure handling. |
27 -| 12 | **P2 Medium** | Qualified digital-signature integration | Office + Security/Legal integration | Approval/signature UX is not equivalent to a qualified digital signature. Complete only with a real provider/certificate trust flow, signed payload verification, timestamp/evidence retention and revocation/error handling. |
28 -| 13 | **P2 Medium** | Live external adapters (email/ECE/webhook/etc.) | Integration + Operations | Third-party delivery/acknowledgement remains unverified. Complete per adapter with secrets isolation, retry/idempotency, delivery receipts, failure queue and audit evidence. |
27 +| 11 | **P2 Medium** | Real Persian OCR accuracy | Office + QA | C7 provides server full-text archive search, append-only OCR provenance, attachment binding and human correction. What remains unverified is the OCR engine itself: complete only with a real provider, representative Persian scans, measured extraction/search quality and failure handling. |
28 +| 12 | **P2 Medium** | Qualified digital-signature integration | Office + Security/Legal integration | Internal approval/signature UX is not equivalent to a qualified digital signature. Complete only with a real provider/certificate trust flow, signed payload verification, timestamp/evidence retention and revocation/error handling. |
29 +| 13 | **P2 Medium** | Live external adapters (email/ECE/webhook/BPM/etc.) | Integration + Operations | Third-party delivery/acknowledgement remains unverified. Complete per adapter with secrets isolation, retry/idempotency, delivery receipts, failure queue and audit evidence. |
30 | 14 | **P2 Medium** | Physical printer / real document output validation | QA + Operations | Chromium/PDF tests pass, but physical printer output remains unverified. Complete with A4/A5 Persian samples, margins/page breaks, common printer drivers and archived acceptance evidence. |
30 -| 15 | **P2 Medium** | PostgreSQL platform upgrade | Platform + Security | Project state records PostgreSQL 17.6.1.166 while 17.11 platform upgrade remains pending. Upgrade only with backup/rollback window and post-upgrade accounting/RLS regression verification. |
31 -| 16 | **P2 Medium** | Finish GitHub Actions runtime modernization without weakening invariants | CI maintenance | `checkout` and `setup-node` were moved to v7. A direct CodeQL v4 switch exposed that `scripts/quality-check.mjs` still intentionally asserts CodeQL v3; rather than weaken the gate, CodeQL was restored to supported v3. Complete by updating the invariant and CodeQL action together in one tested change before v3 deprecation. |
32 -| 17 | **P3 Low** | Newly-created unused indexes | Performance | Supabase performance advisor currently reports 12 unused indexes. They are new and may not have accumulated production usage yet; do not delete prematurely. Reassess after representative workload/query statistics. |
31 +| 15 | **P2 Medium** | PostgreSQL platform upgrade | Platform + Security | PostgreSQL 17.11 platform upgrade remains pending. Upgrade only with backup/rollback window and post-upgrade accounting/RLS regression verification. |
32 +| 16 | **P2 Medium** | Finish GitHub Actions runtime modernization without weakening invariants | CI maintenance | `checkout` and `setup-node` are on v7. CodeQL remains on supported v3 because the repository invariant still asserts v3. Complete by updating the invariant and CodeQL action together in one tested change before v3 deprecation. |
33 +| 17 | **P3 Low** | Newly-created unused indexes | Performance | Supabase performance advisor currently reports unused-index informational notices. Do not delete prematurely; reassess after representative workload/query statistics. |
34 +
35 +## C8 closure evidence
36 +- Production migrations: `20261001173917 office_slice_c8_workflow_policy`, `20261001180610 office_slice_c8_workflow_runtime`, `20261001180949 office_c8_policy_publisher_fk_index`.
37 +- Runtime/server evidence: `docs/OFFICE_SLICE_C8_WORKFLOW_RUNTIME_VERIFICATION.md`.
38 +- Runtime UI evidence: `docs/OFFICE_SLICE_C8_RUNTIME_UI_VERIFICATION.md`.
39 +- Final main: `398e044eb6570345bff1b34c858d0e6089ab770a`.
40 +- Quality `36907314330`: PASS including accounting/Golden/C1-C8, disposable PostgreSQL C8 policy/runtime/security/concurrency gate and real-DOM.
41 +- Security `36907314457`: CodeQL PASS; dependency review skipped remains item #9.
42 +- Pages `36907313039`: PASS.
43 +- Production post-check: workflow instances/events/policy versions remained zero in the checked persistent state; no C8 test residue.
44
45 ## Historical Run-failed audit
35 -Gmail contained multiple GitHub `Run failed` notifications. The newest relevant failures were historical, not evidence that the previously verified `main` was still broken:
36 -
37 -- Quality on `906d78d`: Real-DOM tests failed because the module launcher intercepted the panel-handle click and the request-field test expected one input while two rendered. Later browser integration hardening fixed these paths; subsequent Real-DOM gates passed.
38 -- Quality on Slice-B `fdfdd86`: the Slice-B invariant test expected two archived migrations but only one was present at that intermediate commit. Later Slice-B migrations and the updated invariant set closed this failure; subsequent Slice-B quality gates passed.
39 -- Security on Slice-B `211d072` / `9d3702a`: CodeQL passed; Dependency Review failed because GitHub Dependency graph was disabled. The workflow was changed to avoid a false red build while retaining an explicit warning. This is **not equivalent to dependency review being active**; item #9 remains open.
40 -
41 -## CI maintenance applied during this audit
42 -- `.github/workflows/quality.yml`: `actions/checkout@v7`, `actions/setup-node@v7`, Node 22 test runtime, automatic package-manager cache explicitly disabled.
43 -- `.github/workflows/security.yml`: `actions/checkout@v7`; CodeQL remains on supported v3 until its repository invariant is migrated in the same tested change. Dependency-review remains `actions/dependency-review-action@v4` and still requires Dependency graph.
46 +Earlier GitHub failure notifications were intermediate failures, not evidence that the verified final heads remained broken. Relevant examples include Real-DOM fixture interception, an intermediate Slice-B migration-count assertion, Dependency Review failing while Dependency graph was disabled, and the product Kardex nullish/OR syntax defect. Later commits repaired the code/test paths and subsequent canonical Quality/Security runs passed. Dependency Review itself remains unavailable and is still tracked above.
47
48 ## Current-stage completion rule
49 The current stage can be called complete only when P0 items are closed, P1 items that belong to the marketed current scope are closed (or explicitly removed/disabled from that scope), release gates are green, and every remaining P2/P3 item is documented as a non-blocking external/operational boundary rather than silently presented as implemented.