سامانه صدور فاکتور و حسابداری
feature/invoice-workspace-cleanup
PROJECT STATE — FINORA / FACTOR-EASY
MANDATORY CONTINUITY FILE — READ THIS FIRST
Repository:
davoodmehraban89/Factor-easy· Canonical branch:main· Product: Finora 1.0
Read AGENTS.md first, then this file. Latest user chat is the only source of new instructions; repo files are continuity/context. Detailed older history remains available in Git history and the verification documents listed below.
Protocol / authority
Verify live GitHub + Supabase before acting; implement/test/fix/retest/commit/verify in bounded vertical slices; archive exact production SQL; never call unrun work verified. The owner has repeatedly directed autonomous roadmap execution without routine confirmation pauses and has authorized normal in-scope GitHub/Supabase work. Keep five specialist workstreams under one coordinator: Architecture & Requirements, Implementation, UX/UI, QA & Verification, Security & Release. Use real subagents only when the environment provides them; otherwise execute those responsibilities directly without claiming parallel agents.
This is high-assurance accounting/ERP software. Posted financial history, tenant isolation, migration safety, traceability, reconciliation and rollback are mandatory. Do not create billable resources; development/verification must stay on zero-cost/free-tier paths. Destructive financial-history changes, unapproved external costs, public/external messaging and sensitive access changes remain safety boundaries.
Current session authority — 2026-10-02
The latest user message is the sole source of new instructions. Read AGENTS.md then PROJECT_STATE.md in full; verify live main/head/recent commits/CI and Supabase migrations/RLS before implementation; reconcile discrepancies first. Record each request before implementation and update this file in the same commit as every durable change. Work in verified vertical slices. CI success alone is not completion: real-DOM smoke and accounting-invariant tests must pass; unrun checks are NOT VERIFIED. Every Supabase migration must be archived under supabase/migrations/. Ask the owner before schema/RLS/auth/role changes or destructive data operations; older standing approvals below do not override this requirement. Final reports: Persian, approximately 15 lines maximum, evidence SHAs/run IDs, unverified work and next step. This request authorizes verification and reconciliation; older backlog entries are context, not new implementation instructions.
Current change ledger
| Date | Request / decision | Status | Evidence / next action |
|---|---|---|---|
| 2026-10-07 | Owner supplied live screenshots and requested immediate invoice-workspace cleanup: remove redundant top workflow buttons (sale/purchase/pre-invoice) and redundant sale/purchase shortcut buttons beside the document heading; keep Excel import + sample download; keep only the commercial-document type selector with sale, purchase, sales pre-invoice, sales progress statement; replace the separate search-above-select UX with a single in-control searchable product selector that matches product code/name/specification and numeric fragments. | IMPLEMENTED LOCALLY / REAL-DOM CI PENDING | Baseline main = 6dae96fac9bd5c513209932ae777f12bd8bd95a6; live Supabase migration head 20261003033540; RLS public 18/18, private 3/10. Removed redundant workflow toolbar and sale/purchase heading shortcuts; retained Excel import/sample controls and the four-value commercial-document selector. Replaced separate search-above-select UI with one integrated combobox that searches product code/name/specification/identifiers in the same field. Local syntax, quality, commercial, UX-R2, Phase 3 behavior and Golden PASS; git diff --check PASS. Added Real-DOM coverage for integrated search and code/name/spec matching; CI pending. No schema/RLS/auth/role/data mutation. |
| 2026-10-07 | Owner directed autonomous continuation to finish the remaining Finora development backlog, starting with the agreed P0 accounting core: extensible analytical/floating dimensions, journal UX, context-driven posting rules and end-to-end accounting integration, then continue through remaining verified blockers without routine pauses. | PR VERIFIED / MERGE PENDING | P0 adds independent COST_CENTER analytics, role-driven dimension compatibility without rewriting posted history, strict per-fiscal-year journal numbers, voucher type/reference, generic dimension-to-legacy compatibility fields, independent project vs cost-center posting, copy-to-draft, account search, row copy, and live debit/credit/difference totals. Implementation head de2c58a52cb36bfe54eeb3c90985cd6c94cae812; PR #52 Quality 37539607474 SUCCESS including Accounting P0 invariant step and Real DOM smoke, Security 37539607498 SUCCESS. Local quality + phases 2-6 + Golden PASS. No schema/RLS/auth/role/destructive production data change. Next: merge after this evidence-state commit rechecks green, then verify main release/deploy exact SHA. |
| 2026-10-07 | Owner authorized implementation to completion of the researched commerce/accounting redesign: one invoice workspace in Commerce, context-driven reusable floating counterparties, purchase parity (quick supplier + Excel template), and selected-company factory reset that preserves the company. | COMPLETED / MERGED / RELEASE VERIFIED | Merged to main as 5ae9117c776a33a3cc39775c68ad0c10e13b9c44. Push Quality run 37529032595 = success; Security 37529032630 = success; Release gate 37529230156 = success; exact gated Pages deployment 37529272934 = success and deployed the same SHA to http://factoreasy.ir/. Live HTML loads js/commercial-rnd.js?v=20261007-commerce-r1; live bundle contains factory-reset guard, quick supplier, and Excel-template code. PR Real-DOM/accounting gates were green. No production reset and no schema/RLS/auth/role mutation. |
| 2026-10-04 | Continue the recorded chart and taxpayer-reference correction after interrupted sessions. | MERGED / CONTROLLED DOM + ACCOUNTING VERIFIED / GATED PAGES DEPLOYED | 62 additive chart rows across all eight templates, including non-current assets and contra accounts; explicit preview/apply for compatible existing templates preserves old accounts and posted history. Actual supplied tax logo and reference-aligned totals/settlement layout; image-ready printing. Local chart invariants and 3 chart DOM tests passed; 2 print DOM tests plus single-page landscape PDF passed; accounting phases 2–6 and Golden passed. Full local DOM: 52/53 passed, Pages artifact failed on external ERR_CERT_AUTHORITY_INVALID; no gate weakened. PR #47 implementation SHA db9e7f2375e914bfa9e78932e63222af68c4c9d3: Quality 37170173739 and Security 37170173740 passed; inspected static job 111341365938 confirms 53/53 real-DOM tests, chart invariants, phases 2–6 and Golden passed, including Pages artifact. All three disposable DB jobs passed. Production recheck on 2026-10-04: 79 migrations, latest 20261003033540; public RLS 18/18, private 3/10. See docs/CHART_OF_ACCOUNTS_RESEARCH_2026-10-03.md and docs/CHART_TAXPAYER_VERIFICATION_2026-10-03.md. No schema/RLS/auth/role or production record mutation. |
| 2026-10-03 | Owner requested continuation of unfinished work, deep Iranian chart-of-accounts research/completion (especially missing non-current assets), and exact taxpayer invoice layout matching the first supplied reference with the supplied official logo. | REQUEST RECORDED / IMPLEMENTATION NOT VERIFIED | PR #46 merged as 3085dce9d8f457e61aca6676f872737418116e7a; Quality 37094979694, Security 37094979835; inspected job 111122956074: 49 DOM tests and accounting gates passed. Live Supabase has 79 migrations including 20261003033540; public RLS 18/18, private 3/10. Existing print exactness claim is superseded by owner-reported/reference-visible differences. Preserve historical account IDs/codes/postings; no schema/RLS/auth/role changes authorized by this request. |
| 2026-10-03 | Owner directed continuation after Wave 4 deployment; inspect post-merge verification and two-user/concurrency readiness. | SAME-SHA RETRY PASSED / TIMEOUT ROOT CAUSE OPEN / TWO-USER PRODUCTION E2E BLOCKED | Main 62da4cf24b5505d9dfe41b43acafa04af74c06c9; Quality 37094021032 failed with 48/49 DOM passing and 30s timeout in scripts/enterprise-org-ux.spec.js; accounting and all disposable DB jobs passed. Security 37094021045 passed. Live Wave 4 version 20261003033540 remains present, public tables without RLS=0, organizations with two distinct active users=0. No test users or access changes authorized/performed. Same-SHA retry 37094021032 attempt 2 succeeded: job 111122578331 logs confirm 49/49 DOM and accounting phases 2–6 + Golden passed. No assertion, timeout or product-code changes. Timeout did not reproduce on retry; root cause remains NOT VERIFIED. |
| 2026-10-03 | Owner explicitly approved applying archived Wave 4 migration (بله تاییده) and directed continuation after reconnecting GitHub. |
PRODUCTION APPLIED / READ-ONLY CONTRACTS VERIFIED / PRODUCTION E2E NOT VERIFIED | Scope: only 20261002072000_request_wave4_operational_integrity.sql on hcsixhqbyuhpshfwqpjx, including column/index/functions/EXECUTE grants. Baseline main 81bd9bf38e0b02e5baed8a3fa32a89a2b1345572; SQL blob 7e644afd2387d328056356314ebfdeed272963ab. Live preflight: migration absent, idempotency column absent, delegation rows=0, six-argument RPC present and seven-argument RPC absent. Exact SQL applied as 20261003033540 request_wave4_operational_integrity; approval recorded before apply in ed90934f057e85bfd6bd0286bdf309d9c2ded9f7. Other sensitive changes remain approval-gated. |
| 2026-10-02 | Latest owner request: verify live main and Supabase, reconcile state before implementation, enforce explicit approval for sensitive database/auth changes and evidence-based slice acceptance. | RECONCILIATION RECORDED / WAVE 4 PRODUCTION BLOCKER / NO PRODUCT CHANGE | Baseline main d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5; previous branding merge 5d33b6ea4fb173f6b2e6514c756fc1d122fd2773. Quality 36991861922, Security 36991863100, Release 36992001841, gated Pages 36992033310 succeeded. Job 110789670982 logs confirm 49/49 real-DOM tests and accounting phases 2–6 + Golden passed; the seven accounting scripts were also rerun locally at the baseline SHA and passed. DOM tests use controlled fixtures/mocked auth and are not authenticated production E2E. Supabase Finora ACTIVE_HEALTHY, 78 migration history entries, all 18 public tables have RLS; 10 private tables have no client CRUD grants (3 RLS enabled, 7 disabled). 79 repository SQL files versus 78 production migration records; 21 same-name files have different production versions. Wave 4 operational-integrity migration is genuinely absent; details below. Full SQL equivalence of all historical migrations NOT VERIFIED. No schema/RLS/auth/role/data mutation performed. |
| 2026-10-02 | Branding PR first Quality run exposed a Pages-artifact packaging gap: new icon files were present in source but scripts/build-pages.mjs copied only js and vendor, causing a 404 in hardened Pages smoke. |
MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED | Pages builder now copies the versioned assets directory into _site; product/auth logic was not the cause. Merged in 5d33b6ea4fb173f6b2e6514c756fc1d122fd2773; baseline main Quality 36991861922 succeeded; job logs verify 49/49 controlled real-DOM tests and accounting regression gates; production two-user E2E remains NOT VERIFIED. |
| 2026-10-02 | Owner requested product-wide naming change to «نرمافزار ERP سازمانی فینورا», a premium redesign of the login screen based on the supplied reference, and replacement of the generated letter favicon/bookmark icon with the supplied Finora F icon. | MERGED ON MAIN / CONTROLLED DOM + ACCOUNTING VERIFIED | Browser/bookmark title, application metadata, manifest and visible legacy tagline now use «نرمافزار ERP سازمانی فینورا». Added supplied-logo-derived 32px favicon + 180px app/apple icon, real icon in shell branding, and a responsive premium split login with Finora Enterprise visual while preserving every auth contract ID/action. Added static + Real-DOM desktop/mobile regression gates; merged in 5d33b6ea4fb173f6b2e6514c756fc1d122fd2773, baseline CI/release/deploy succeeded as recorded above; runtime checks remain bounded by actual evidence. |
| 2026-10-02 | Owner video confirms the three-scrollbar defect is still visible after PR #35 deployment. | HOTFIX MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED | Main a55933c421eb1ea75a863fadd5d51f3bb29d6b8d duplicates critical desktop ownership CSS in index.html and cache-busts ui.js as 20261002-shell-scroll-ownership-v2. Quality 36985456403 SUCCESS, Security 36985456341 SUCCESS, Release gate 36985769059 SUCCESS and gated Pages 36985796598 SUCCESS. |
| 2026-10-02 | Owner reported three desktop vertical scrollbars are attached to the wrong visual edges and requested strict scroll ownership: module rail scrolls only main modules from its right edge; contextual subsystem panel scrolls only its own links from its right edge; workspace scrolls only the active work surface from its right edge. | MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED | PR #35 merged as 4a8caf7447ddb5361fe56555a8a6bccc7a733602. Desktop document scrolling is suppressed; module rail, subsystem links, and workspace are independent viewport-bound scroll owners with physical-right scrollbars while Persian content remains RTL; workspace navigation resets its own scroller; mobile/print retain normal flow. PR retest corrected one test-only mobile overflow expectation. Main Quality 36984349326 SUCCESS, Security 36984349300 SUCCESS, Release gate 36984494858 SUCCESS, gated Pages 36984556741 SUCCESS. |
| 2026-10-02 | Wave 5c privileged full backup/restore authorization after offboarding hardening. | PRESENT ON MAIN / CI SUCCESS / PRODUCTION E2E NOT VERIFIED | Full organization export/restore now requires both fresh server membership revalidation and existing organization-management authority (owner or core:configure); restore performs the check before reading the selected file. Static + Real-DOM denial-path gates added. This is an application-layer privilege boundary over data already readable under server RLS; no new schema/RLS/auth-role change was introduced. |
| 2026-10-02 | Supabase security-advisor intent review for authenticated-callable SECURITY DEFINER RPCs and three private C8 no-policy tables. | LIVE INTENT REVIEW VERIFIED / NO DDL REQUIRED | Production hcsixhqbyuhpshfwqpjx reviewed read-only. All 20 public advisor-listed SECURITY DEFINER functions use search_path='' and enforce caller/admin/org/capability/read-scope checks appropriate to their RPC contract; warning is retained as an intentional privileged-RPC boundary rather than weakened. The three private C8 tables have RLS enabled, zero policies, and no anon/authenticated CRUD grants, confirming deliberate deny-by-default private storage behind controlled RPCs. Evidence: docs/SECURITY_ADVISOR_INTENT_REVIEW_2026-10-02.md. Leaked-password protection remains an external Auth-setting gap. |
| 2026-10-02 | Wave 5b offboarding/revocation client fail-closed remediation from Round 29. | MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED | PR #32 merged as e9831e4d23fceae3a30359fe2eca8743087bb6b5. Main Quality 36982398280 SUCCESS, Security 36982398238 SUCCESS, Release gate 36982548804 SUCCESS, gated Pages 36982584408 SUCCESS. Added 30s + visibility membership revalidation, known-revocation tenant-memory/cache purge, stale currentUser removal, sensitive-view lock, alternate-org recovery path, no-membership sign-out, and fresh server membership gate before bulk export. Persistent two-real-user production E2E and capability-specific privileged export authorization remain NOT VERIFIED. |
| 2026-10-02 | Permanent project constraint: user operates from Iran and cannot use paid infrastructure, paid APIs, international-card billing, or services that require a later paid upgrade for essential operation. Railway is excluded from Finora runtime/deployment. | ACTIVE ARCHITECTURE CONSTRAINT | Use only genuinely no-cost capabilities for required operation; do not create paid resources or make Finora depend on a service whose essential path later requires billing. GitHub + Supabase remain current sources of truth; any future infrastructure choice must pass this zero-cost/no-billing constraint first. |
| 2026-10-02 | Gmail/GitHub failure review: latest Wave 5a Quality run failed only because the disposable PostgreSQL harness lacked Supabase roles anon/authenticated; Security latest run is green. |
TEST HARNESS VERIFIED | Added the two no-login Supabase compatibility roles to the disposable identity DB bootstrap. Wave 5a identity DB gate passed on PR head and main Quality 36980655736; the earlier failure was harness-only. |
| 2026-10-02 | Second CI retest showed the safety-check regex itself was over-escaped. | REGEX FIX VERIFIED | Normalized regex literals to match the workflow labels/variable gate exactly; main Security 36980655725 passed Release/QA safety + CodeQL. |
| 2026-10-02 | CI retest exposed a literal \\n introduced while editing the release-safety checker. |
TEST SYNTAX FIX VERIFIED | Replaced the escaped text with a real newline; subsequent PR and main security checks passed. |
| 2026-10-02 | Release-safety invariant initially rejected the explicit Dependency Graph availability gate. | TEST CONTRACT VERIFIED | Safety checker requires both properties: Dependency Review is conditional on DEPENDENCY_GRAPH_ENABLED=true, and remains fail-closed whenever enabled; main Security 36980655725 succeeded. |
| 2026-10-02 | Wave 5a identity/signup/invitation bootstrap remediation (WS-01, F-121/F-122 and OTP bootstrap boundary). | MERGED / PRODUCTION + CI VERIFIED | PR #30 merged as cfd15dcf51cf8b9085a5512ded497fe0363ae322. Main Quality 36980655736 SUCCESS including identity disposable-DB + static/Real-DOM gates; Security 36980655725 SUCCESS. Production migration 20261002075156 identity_wave5a_bootstrap applied to hcsixhqbyuhpshfwqpjx; live reconciliation confirms search_path='', organization-bound trial creation, trigger present, licenses_without_org=0, duplicate organization licenses=0 and orphan memberships=0. Persistent two-real-user production E2E and offboarding cache/session purge remain NOT VERIFIED. |
| 2026-10-02 | PR #29 exposed that Dependency Review now fails hard when GitHub Dependency Graph is disabled. | CI BOUNDARY VERIFIED | Security workflow runs Dependency Review only when repository variable DEPENDENCY_GRAPH_ENABLED=true; when enabled the action remains fail-closed. Main Security 36980655725 passed Release/QA safety + CodeQL; Dependency Review was skipped because the graph remains unavailable. |
| 2026-10-02 | Owner granted standing approval to continue in-scope project work without repeated confirmation. | WAVE 4B PRODUCTION APPLIED + VERIFIED | Supabase production hcsixhqbyuhpshfwqpjx recorded request_wave4b_scheduler_outbox_delivery as migration version 20261002072526. Read-only reconciliation confirmed scheduler tables, outbox delivery columns, and all five Wave 4b RPC contracts exist. GitHub main 41aff95d11a66c67e2c64df3eac11a122f94dfd7: Quality 36975968198, Security 36975968108, Release Gate 36976087514, Deploy 36976115600 succeeded. Automatic external scheduling and D4c destination consumers remain NOT VERIFIED. |
| 2026-10-02 | Wave 4b first disposable-DB run exposed an ambiguous PL/pgSQL test variable in the final replay assertion. | TEST FIX APPLIED / RETEST PENDING | Product migration executed through all scheduler/outbox assertions; failure was confined to the final test query where local variable k shadowed temp-table column k. Renamed/qualified the assertion; no production permission or state-machine rollback. |
| 2026-10-02 | Owner said «ادامه بده» after Wave 4 F-420/F-421/F-422 merge. | IMPLEMENTED ON BRANCH / CI PENDING | Added server-clock five-minute scheduler slots, durable run/claim evidence, replay binding, skip-locked overdue claims, stable outbox destination command identity, lease claims, retry/backoff, dead-letter and idempotent authorized replay. D4c destination consumers remain disabled. Production migration is NOT APPLIED pending the schema-change gate. |
| 2026-10-02 | Owner supplied environment/connection handoff and directed it to be enforced while continuing work. | LIVE RECONCILED / ACTIVE OPERATING CONTEXT | Verified GitHub target davoodmehraban89/Factor-easy with admin/read-write access, canonical main, and Supabase target hcsixhqbyuhpshfwqpjx = Finora / ACTIVE_HEALTHY. GitHub + Supabase remain source of truth; Gmail/Notion are optional support only, and Railway/Render are not deployment truth unless a later explicit project decision makes them so. Detected concurrent branch advancement during Wave 4 and refused a non-fast-forward overwrite; re-read the newer head before continuing. |
| 2026-10-02 | Wave 4 remediation F-420/F-421/F-422 from canonical audit register. | IMPLEMENTED ON BRANCH / NOT YET VERIFIED | F-420 rejects duplicate normalized onApproved target/action identities; F-421 binds SLA editor values to logical step keys across reorder/remove/key-edit; F-422 adds actor-scoped delegation idempotency, explicit overlap rejection and revoke retry audit dedupe. Disposable-DB + Real-DOM gates added. CI/merge/production remain NOT VERIFIED at this checkpoint. |
| 2026-10-02 | Owner supplied the current remediation/audit package plus manual GitHub QA workflow and directed continuation of both roadmap execution and defect remediation. | F-412 + WAVE 3 F-415/F-416 VERIFIED / PRODUCTION RECONCILED | PR #23 merged as d13498f3af03f544c05168727b440f053de1d733. Main Quality 36973781026 SUCCESS including disposable D1 DB adversarial tests; Security 36973781055 SUCCESS (Release/QA safety + CodeQL; PR Dependency Review remains externally blocked by disabled Dependency Graph); Release gate 36973927530 SUCCESS; gated Pages 36973959986 SUCCESS. Production migrations 20261002063121 request_wave2_duplicate_code_guard and 20261002063123 request_wave3_decision_idempotency applied. Read-only production reconciliation: duplicate legacy code groups=0; replay actor binding, reauthorization and immutable event-outcome reconstruction are present. Next: Wave 4 F-420/F-421/F-422; D4c consumers remain disabled. |
| 2026-10-02 | Owner directed immediate continuation after observing execution delay. | D4A IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + ACCOUNTING + SECURITY VERIFIED | PR #21 merged as 4583703396a7ddb00bdad76b52c22932d634cbef. Main Quality 36961361891 SUCCESS (38/38 real-DOM, accounting phases 2–6 + Golden, D1/C8 DB); Security 36961361897 SUCCESS; Release gate 36961459328 SUCCESS; gated Pages 36961492170 SUCCESS. Production migration 20261002034311 request_workflow_d4a_work_queue reconciled. Evidence: docs/REQUEST_WORKFLOW_D4A_VERIFICATION.md. |
| 2026-10-02 | Owner switched GitHub Pages source to GitHub Actions after the gated Pages workflow was installed. | WAVE 0 COMPLETED / POSITIVE + NEGATIVE CONTROLS VERIFIED | Negative control: failing SHA 03561a3369130a7aaba689474d92aa3e93137404 on PR #15 failed required static-quality, could not merge, and produced no Release gate / gated Pages deployment. Positive control: protected-main SHA 150ff54d938a45b9a9b476f3a4a8fdabbb45d065 passed Quality 36932956964, Security 36932956877, exact-SHA Release gate 36933115365, then gated Pages deploy 36933151878; no legacy dynamic branch Pages deployment appeared. F-402/F-403/F-406/F-407/F-423/F-424 are closed at the verified GitHub/repository boundary. |
| 2026-10-02 | Wave 2 request integrity remediation F-411/F-413/F-414/F-417/F-418. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + ACCOUNTING + SECURITY VERIFIED | Squash merge 7346910638b6ef9555d4adb5952dd62c8f4c130d from PR #19. PR Quality 36937247798: DB jobs SUCCESS and 37/37 real-DOM tests passed; accounting phases + Golden journey passed. PR Security 36937247803: required Release/QA invariants + CodeQL SUCCESS (Dependency review remains the documented external graph boundary). Main Quality 36937448157 SUCCESS; Security 36937448101 SUCCESS; exact-SHA Release gate 36937598497 SUCCESS; gated Pages 36937616201 SUCCESS. Production migration recorded as 20261001225044 request_wave2_integrity_hardening; live validator negative controls and function-contract checks passed. |
| 2026-10-02 | Live Supabase target hcsixhqbyuhpshfwqpjx became available to the connector; owner directed immediate continuation. |
WAVE 1 PRODUCTION RECONCILED / WAVE 2 STARTED | Production migration history and live request_transition_instance definitions were inspected read-only. F-409/F-410 guard is present in production; next slice is F-411/F-413/F-414/F-417/F-418 with server validation, form-runtime fidelity, idempotency binding, active/latest-version enforcement and schema-bound conditions. |
| 2026-10-02 | Owner completed the GitHub Protect main ruleset and directed autonomous continuation to fully remediate the audited defects. |
ACTIVE — REMEDIATION CONTINUATION | Ruleset 24334764 verified ACTIVE on default branch with deletion + non-fast-forward protection, PR-only updates, strict required checks static-quality, Release and QA safety invariants, and CodeQL JavaScript; bypass list empty. Continue Wave 1/2 request integrity work. |
| 2026-10-01 | Owner authorized starting the canonical remediation pack after external full-system audit. | WAVE 0 CLOSED | Release/QA fail-open paths, exact-SHA promotion and Pages deployment ordering are now verified by positive and negative controls above. |
| 2026-10-01 | Owner said «ادامه بده» after D3a handoff. | D3B + D3C VERIFIED | D3b visual editor/conditions/timeline and D3c SLA/delegation/outbox are production + disposable-DB + real-DOM verified. Remediation audit supersedes roadmap ordering. |
| 2026-10-01 | Slice D3c — SLA/escalation, delegation/substitution, transactional outbox. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED | js/request-workflow-d3c.js; migrations 20261001235500, 20261002000500, 20261002001000; Quality run 36917772952 all three jobs SUCCESS. Evidence: docs/REQUEST_WORKFLOW_D3C_VERIFICATION.md. |
| 2026-10-01 | Slice D3b — visual workflow editor + conditions + timeline. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED | js/request-workflow-d3b.js; migration 20261001233000; bounded predicate DSL, skipped-step evidence and authorized timeline RPC. Quality run 36915696611 all three jobs SUCCESS. Evidence: docs/REQUEST_WORKFLOW_D3B_VERIFICATION.md. |
| 2026-10-01 | Slice D3a — sequential/parallel request workflow runtime. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + CI VERIFIED | Migrations 20261001230000, 20261001230500; private step/vote runtime, quorum semantics, capability checks, idempotent decisions and immutable evidence. Quality run 36913565943 all three jobs SUCCESS. |
| 2026-10-01 | Slice D2 — request UI/read-model + legacy cutover. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + REAL-DOM + CI VERIFIED | js/request-workflow-d2.js; migrations 20261001223500, 20261001224500; Quality run 36912668369 all three jobs SUCCESS. Legacy source records remain preserved and imported rows traceable. |
| 2026-10-01 | Slice D1 — requests/BPMS-lite server foundation. | IMPLEMENTED / PRODUCTION + DISPOSABLE-DB + CI VERIFIED | Migrations 20261001204500, 20261001205500, 20261001210500, 20261001211500; Quality run 36910187257 all three jobs SUCCESS. |
| 2026-10-01 | Office Slice C8 workflow policy/runtime. | IMPLEMENTED / PRODUCTION + ADVERSARIAL + CONCURRENCY + REAL-DOM + SECURITY VERIFIED | Immutable workflow evidence, pinned policy versions, capability-gated transitions, optimistic revision checks, idempotency, private runtime tables and SECURITY INVOKER public wrappers. |
| 2026-10-01 | Owner reconfirmed autonomous GitHub + Supabase execution and free-tier-only development. | ACTIVE OPERATING DIRECTIVE | No repeated routine approval requests; no paid development resource. Preserve safety/cost boundaries. |
| 2026-10-01 | Live QA: commerce/tax IDs/request builder/personnel/license/floating-detail coding. | PARTIALLY IMPLEMENTED / FOLLOW-UPS OPEN | Kardex/tax-ID/request/profile/license/floating-code work landed. Exact Taxpayer-System print layout owner reference is now available and has regression coverage. |
| 2026-09-30—2026-10-01 | Office C1–C7, ELI-1–ELI-4, Slice A/B and accounting phases 1–6. | VERIFIED WITH DOCUMENTED BOUNDARIES | See required evidence; do not redo completed phases without verified regression evidence. |
| 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. |
Wave 0 checkpoint — CLOSED 2026-10-02
- Manual QA no longer uses
continue-on-error; live/all require credentials; live credential-bearing runs reject non-allowlisted origins before secrets are injected into the test step; authenticated browser origin is rechecked before/after login/navigation; menu click errors are no longer swallowed and each navigated item must change observable UI state. - QA evidence retention reduced to 3 days and screenshots changed to failure-only.
- Security dependency review no longer uses
continue-on-error. Security runsscripts/release-safety-check.mjsto prevent regression of Wave 0 code contracts. - Exact-SHA
Release gaterequires successful Quality + Security for the same SHA and explicitly checksstatic-quality,c8-policy-database, andd1-request-databasebefore promotion. - Historical reproduction: Pages run
36922017645for SHA6b529647...completed before Quality/Security, proving the old branch-deploy path was unsafe. - Negative control after
Protect main+ Pages source change: failing SHA03561a33...on PR #15 failedstatic-quality; merge was rejected; no Release gate or gated Pages deployment existed for that SHA. - Positive control on protected main SHA
150ff54d938a45b9a9b476f3a4a8fdabbb45d065: Quality36932956964SUCCESS; Security36932956877SUCCESS; Release gate36933115365SUCCESS;Deploy gated Pages36933151878SUCCESS. The earlier Pages trigger36933134567was skipped, as designed, and no legacy dynamic branch deployment ran. - Wave 0 findings F-402/F-403/F-406/F-407/F-423/F-424 are closed at the verified GitHub/repository boundary.
Implemented foundations
- Accounting phases 1–6: accepted high-assurance accounting foundation; posted history remains immutable and balanced.
- Slice A/B + ELI-1–4: modular entitlements, tenant/RBAC, seats, delegated admin, reusable roles, secure invitations and organization UX.
- Office C1–C8: registration/read evidence, referrals, archive/classification, numbering/templates, approvals/SLA, OCR provenance boundary and versioned correspondence workflow runtime.
- Requests D1/D2: independent versioned request definitions/forms/workflows, pinned versions, idempotent create/transition, immutable evidence, server authorization, server-backed UI/read model and non-destructive legacy cutover.
- Requests D3a: ordered sequential/parallel approval steps, quorum voting, per-step capability authorization and private runtime state.
- Requests D3b: visual ordered-step editor, bounded server condition predicates, skipped-step evidence and authorized runtime timeline.
- Requests D3c: step SLA/deadline/escalation evidence, explicit time-bounded delegation with provenance, and transactional approved-request outbox intents.
Invariants
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/seat-safe; raw invitation tokens are never persisted or audited; organization-unit parents cannot cross tenants or form cycles. Request type/workflow versions are immutable snapshots; request instances pin both versions; runtime mutation is server-authorized, idempotency/revision guarded and append-only evidence is retained. D2 legacy import is non-destructive/idempotent/traceable. D3a votes require distinct actors for parallel quorum. D3b conditions are bounded server-validated predicates and skipped results remain evidence. D3c delegation never impersonates the source actor, source capability is revalidated, SLA escalation appends evidence, and approved cross-module effects are queued transactionally rather than directly executed. Request workflow state never replaces C1 registration or C5 correspondence approval evidence.
Required evidence
docs/PHASE_1_REDESIGN_VERIFICATION.md through 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/ELI_1_ENTERPRISE_LICENSE_VERIFICATION.md through docs/ELI_4_ENTERPRISE_ORGANIZATION_UX_VERIFICATION.md · docs/OFFICE_SLICE_C1_VERIFICATION.md through docs/OFFICE_SLICE_C8_RUNTIME_UI_VERIFICATION.md · docs/REQUEST_WORKFLOW_D2_CUTOVER_VERIFICATION.md · docs/REQUEST_WORKFLOW_D3A_VERIFICATION.md · docs/REQUEST_WORKFLOW_D3B_VERIFICATION.md · docs/REQUEST_WORKFLOW_D3C_VERIFICATION.md · docs/REQUEST_WORKFLOW_D4A_VERIFICATION.md · docs/PRODUCTION_RUNBOOK.md · supabase/migrations/ · supabase/tests/request_d1_behavior.sql · supabase/tests/request_d2_legacy_behavior.sql · supabase/tests/request_d3a_workflow_behavior.sql · supabase/tests/request_d3b_condition_timeline.sql · supabase/tests/request_d3c_operations.sql.
NOT VERIFIED / external boundary
Automatic background scheduling for SLA scans; delivery/dispatch consumers for D3c outbox intents; 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 accuracy/provider; qualified digital signature; physical printer; live external adapters; GitHub Dependency graph/enforceable dependency review; leaked-password protection; PostgreSQL upgrade; CodeQL v4 migration; external BPM/provider integration remain outside verified scope.
The connected Supabase production target is hcsixhqbyuhpshfwqpjx (Finora). Live migration history includes C8, D1–D4a and request security Waves 1–3; the 2026-10-02 reconciliation found Wave 4 operational integrity missing despite later Wave 4b being present; that drift was resolved on 2026-10-03 by approved migration 20261003033540. History includes request_wave4b_scheduler_outbox_delivery version 20261002072526, and identity_wave5a_bootstrap version 20261002075156. Read-only production reconciliation after Wave 4b confirmed both scheduler evidence tables, stable destination-command/dead-letter outbox columns, and scheduler/claim/complete/fail/replay RPC contracts exist. Security advisor still reports 3 private C8 tables with RLS but no policies and 20 authenticated-callable SECURITY DEFINER functions; live intent review on 2026-10-02 verified these as deliberate deny-by-default private storage and guarded privileged RPC boundaries, respectively. Leaked-password protection remains disabled.
Wave 4 production verification — 2026-10-03
- Owner explicitly approved the archived SQL including schema/function/EXECUTE-grant changes. Applied successfully to
hcsixhqbyuhpshfwqpjxas20261003033540 request_wave4_operational_integrityafter recording approval in commited90934f057e85bfd6bd0286bdf309d9c2ded9f7. - Exact source:
supabase/migrations/20261002072000_request_wave4_operational_integrity.sql, Git blob7e644afd2387d328056356314ebfdeed272963ab. No SQL modification or duplicate migration file introduced. Production version differs because the migration service assigns the application timestamp. - Live schema checks PASS: text idempotency column exists; key-length CHECK validated; actor-scoped unique index valid. Seven-argument public/private create RPCs exist; authenticated can execute new signatures and cannot execute old six-argument signatures; anon cannot execute either. Public wrapper is SECURITY INVOKER, private implementation remains guarded SECURITY DEFINER; empty search_path verified. Duplicate-intent and revoke audit-deduplication guards present.
- Live BEGIN READ ONLY tests PASS: valid workflow accepted; normalized duplicate target/action rejected with expected error; unauthenticated delegation rejected with SQLSTATE 28000. Transaction rolled back. Delegation row count remained zero. No financial data mutation or user provisioning occurred. Public tables without RLS=0.
- Security advisor unchanged: 3 private C8 no-policy INFO, 20 authenticated SECURITY DEFINER WARN, 1 disabled leaked-password-protection WARN. Existing remediation references remain below; no unrelated grants or Auth settings changed.
- Baseline main
81bd9bf38e0b02e5baed8a3fa32a89a2b1345572: Quality36994542956, Security36994542874, Release36994665315, Pages36994730651succeeded. Static job110798133201logs inspected: 49/49 controlled real-DOM tests and accounting phases 2–6 + Golden passed. Disposable D1 job110798133021logs inspected: exact Wave 4 migration andsupabase/tests/request_wave4_operational_integrity.sqlexecuted successfully with ON_ERROR_STOP. These are controlled/disposable tests, not authenticated production browser E2E. - VERIFIED boundary: missing migration deployed; structural, permission and read-only negative-control contracts pass. NOT VERIFIED: persistent two-real-user production browser E2E, real-user production delegation creation/replay/revocation, concurrent production overlap, and full historical SQL equivalence. No blanket product COMPLETED claim.
Historical reconciliation evidence — 2026-10-02 (Wave 4 absence resolved above)
- Request recorded before implementation in commit
cb7f4f0606207077151f5c82801842670a35d90aonaudit/reconcile-state-20261002. This slice changes documentation only. No feature, schema, RLS, auth, role or production data mutation was performed. - Baseline main
d70e7d02ecebe5aa75f05b71c0d9a18ad316e7e5follows branding merge5d33b6ea4fb173f6b2e6514c756fc1d122fd2773. The heartbeat commit changed AGENTS.md without a same-commit PROJECT_STATE.md update; this is a historical continuity-protocol discrepancy, not retroactively corrected history. - Exact-SHA workflow evidence: Quality
36991861922(static job110789670982: 49/49 real-DOM tests; accounting phases 2–6 and Golden passed); Security36991863100; Release gate36992001841; gated Pages36992033310: all SUCCESS. Logs were inspected, not inferred from workflow color. All seven accounting scripts also passed locally on the baseline; local DOM was NOT RUN (browser/test runtime unavailable). CI DOM fixtures mock auth/data and do not prove live tenant isolation. - Supabase
hcsixhqbyuhpshfwqpjx: ACTIVE_HEALTHY, PostgreSQL17.6.1.166; 18/18 public tables RLS enabled. Ten private tables have zero effective SELECT/INSERT/UPDATE/DELETE privileges for anon/authenticated; three have RLS, seven do not. Authenticated has private-schema USAGE, anon does not. This inventory does not prove all policy predicates or RPC authorization behavior. - Advisor recheck: three private C8 no-policy INFO findings, 20 authenticated-callable SECURITY DEFINER WARN findings, leaked-password protection disabled. Previous intent review remains historical evidence; no privileged-function-wide re-audit claimed. References: https://supabase.com/docs/guides/database/database-linter?lint=0008_rls_enabled_no_policy ; https://supabase.com/docs/guides/database/database-linter?lint=0029_authenticated_security_definer_function_executable ; https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection .
- Migration inventory: 79 SQL files / 78 live records; 21 same-name repository files differ in version from production.
20260930222500_iran_enterprise_control_collections.sqlis an intentional no-op placeholder. Duplicate live entries exist for the Wave 1 guard, Wave 2 duplicate-code guard and Wave 3 replay hardening. Do not blindly replay or repair history; full statement equivalence remains NOT VERIFIED. - CONFIRMED PRODUCTION DRIFT / APPROVAL REQUIRED:
supabase/migrations/20261002072000_request_wave4_operational_integrity.sqlhas no production history entry. Live pg_proc inventory and full function-body reads show only the six-argument delegation create RPC, no seven-argument idempotent RPC, no duplicate target/action guard in workflow validation, and revoke retries unconditionally append audit events. The archived SQL adds the delegation idempotency column/check/index, seven-argument guarded RPC, duplicate-intent rejection and revoke audit deduplication, and changes EXECUTE grants on old/new signatures. CI disposable database job110789671195applied this exact file and passed Wave 4 assertions, but that does not establish production deployment. Do not apply until the owner explicitly approves these schema/function/grant changes. - NOT VERIFIED: authenticated production browser E2E; production accounting writes/reconciliation; complete historical SQL equivalence; full RLS policy adversarial tests in production; Wave 4 production behavior. No new product slice is marked COMPLETED.
Continuation checkpoint — 2026-10-03
- Request recorded before retry in
f293b533a557b6af2168220608e1182b1e1a4083. Compared81bd9bf...62da4cf: only PROJECT_STATE.md changed. Main Quality attempt 1 failed solely at enterprise-org-ux DOM test (30s); 48 others passed. No error-context artifact was retained in that run, so exact timeout phase/network cause cannot be established from available evidence. - Failed-job retry on the SAME SHA passed without any code/test/config change: run
37094021032attempt 2, static-quality job111122578331, 49/49 DOM plus accounting invariants and Golden. Database jobs also succeeded. Do not call the intermittent timeout root cause fixed; next recurrence should retain trace/error-context for diagnosis. No blanket retry policy or weakened gate was added. - Read-only production readiness: migration
20261003033540present; public tables without RLS=0; organizations with at least two distinct active member user IDs=0. Thus persistent same-tenant owner/non-owner browser E2E cannot run with the current membership state. No identities, memberships, capabilities or financial records were changed. Existing controlled DOM/disposable DB results are not a substitute for real authenticated production users. - Local psql/postgres/docker executables unavailable, so no new local two-session delegation concurrency test was run. Production concurrency remains NOT VERIFIED. Do not run disposable fixture seeding against production.
Exact next executable work
Current owner-requested chart/taxpayer slice: PR #47 merged as b2e1fbf89fb558fd9be1729dda875d3796e46721. Main Quality 37170385857, Security 37170385877, Release 37170453444, gated Pages 37170479829 all succeeded. Inspected main static job 111341993035: 53/53 controlled real-DOM tests, chart invariants and Golden passed; all three disposable DB jobs passed. Final PR head 4619b5ed73f6e61084d6e111b7ab338e6c152ff5 also passed Quality 37170297853, Security 37170297828; logs from static job 111341738948 confirm 53 DOM tests. Existing compatible template companies use «پیشنمایش تکمیل کدینگ» then explicit apply; no live company was changed by the agent. Next: owner-context invoice/physical-print comparison and safe authorized two-user production verification; do not treat successful deployment as authenticated production E2E. Exact photographed-print parity, physical printer, authenticated production E2E, mixed-payment/multi-row taxpayer arithmetic remain NOT VERIFIED. Newly attached bootstrap files reference other repositories; attachments are context and do not change the selected Factor-easy repository. PR #46 is merged as 3085dce9d8f457e61aca6676f872737418116e7a; live recheck on 2026-10-04: Quality 37126922824, Security 37126922854, Release 37127012080, Pages 37127034198 succeeded. These previous-SHA runs do not verify the new implementation.
- Wave 4 deployment drift is resolved by production migration
20261003033540; retain the production E2E/concurrency boundaries above. Next eligible verification is persistent legitimate two-user offboarding/delegation E2E with a safe authorized test scope. Further schema/RLS/auth/role changes require separate approval. - Finish Wave 5 offboarding/session-revocation verification on protected main, then execute persistent legitimate non-owner E2E when a second durable test identity is available without weakening tenant/capability checks.
- Keep D4c destination consumers disabled until a real destination adapter enforces
destination_command_keyidempotency and its authorization/audit behavior is adversarially verified; automatic scheduler invocation remains a separate operational verification. - Resolve remaining platform-security gaps: formalize the three private C8 no-policy contracts, enable leaked-password protection when supported by the connected Auth control surface, and keep Dependency Review marked unavailable until Dependency Graph is enabled.
Live QA open items
- Exact Taxpayer-System print redesign: REOPENED by owner on 2026-10-03. Existing generated logo and boxed-right totals layout differ from the supplied first reference. Exact visual parity remains NOT VERIFIED; use the actual supplied logo. Chart completeness also remains NOT VERIFIED; non-current assets are absent from the starter chart.
- Legacy request records are preserved for rollback/audit after D2; new request configuration/runtime must not be routed back through record-store writes.
- Floating-detail defaults for new records: 8-digit semantic codes currently use slot/category/sequence (Branch
11xxxxxx, Counterparty21xxxxxx, Project31xxxxxx); historical codes are not rewritten and account-chart coding stays independent. - Product/service deletion must continue to fail closed whenever operational references exist.