سامانه صدور فاکتور و حسابداری
Record verified DOM and accounting acceptance gates
davoodmehraban89 committed
Sep 29, 2026 at 20:24 UTC
312fe95a36372e6e409e9ceee3334688a17c0e1e
1 file changed
+7
-7
PROJECT_STATE.md
+7
-7
@@ -32,8 +32,8 @@ Before doing any project work:
32
10. If this file conflicts with verified remote code/database evidence, correct this file immediately and record the correction in the change ledger.
33
34
## Current change ledger
35
-| 2026-09-29 | Adopt owner-specified high-assurance execution protocol: verify live GitHub/Supabase before work; latest chat is the only source of new instructions; record requests before implementation; vertical slices; PROJECT_STATE in every durable commit; archive every future Supabase migration SQL; require real-DOM smoke + accounting-invariant tests before COMPLETED; explicitly list NOT VERIFIED items. | IN PROGRESS | Live reconciliation found head `7d054dfa` (post-login/admin-shell fix) was not recorded here; its CI is green but real-DOM smoke was not run. Phase 4 CI workflow also did not actually execute `phase4-behavior-check.mjs` because the command was folded onto the Phase 3 command, and no `supabase/migrations/` SQL archive exists. Phase 4 completion is therefore reopened pending real-DOM + accounting-invariant verification. Verification slice prepared atomically: corrected CI command separation, strengthened Phase 4 posting/reversal accounting test, added Playwright real-DOM post-login/shell smoke, and backfilled exact historical SQL files from `supabase_migrations.schema_migrations`. No database/schema/RLS/auth/role mutation was performed. CI for this slice is pending. |
36
-| 2026-09-29 | Execute master roadmap Phase 4 end-to-end: projects/contracts, amendments/lifecycle, employer/contractor/subcontractor links, deductions, guarantees, contractor statements/accounting, traceability, reporting, permissions/audit/sync/backup/migration/tests/reconciliation. | IN PROGRESS | Phase 4 implementation exists, but completion was reopened under the owner’s stricter acceptance rule: real-DOM smoke and actual Phase 4 accounting-invariant execution are still required. Prior evidence: domain/UI `c2100228`; persistence/navigation/backup through `172aeb59`; referential guards `44154769`; behavioral CI gate `fe29b817`; deduction-specific accounting/template migration `dd3b78ed`; verification doc `e5b814a7`. Supabase migration `20260929091743 phase4_contracting_collections` applied; RLS owner isolation verified; production had zero pre-existing Phase 4 rows requiring backfill; performance advisor clean; known pre-existing security warnings unchanged. Acceptance checkpoint `95e6de99`: Quality 36549015911 success; Security/CodeQL 36549015935 success; Pages 36549015796 success. |
35
+| 2026-09-29 | Adopt owner-specified high-assurance execution protocol: verify live GitHub/Supabase before work; latest chat is the only source of new instructions; record requests before implementation; vertical slices; PROJECT_STATE in every durable commit; archive every future Supabase migration SQL; require real-DOM smoke + accounting-invariant tests before COMPLETED; explicitly list NOT VERIFIED items. | COMPLETED | Live reconciliation found head `7d054dfa` (post-login/admin-shell fix) was not recorded here; its CI is green but real-DOM smoke was not run. Phase 4 CI workflow also did not actually execute `phase4-behavior-check.mjs` because the command was folded onto the Phase 3 command, and no `supabase/migrations/` SQL archive exists. Phase 4 completion is therefore reopened pending real-DOM + accounting-invariant verification. Verification slice prepared atomically: corrected CI command separation, strengthened Phase 4 posting/reversal accounting test, added Playwright real-DOM post-login/shell smoke, and backfilled exact historical SQL files from `supabase_migrations.schema_migrations`. No database/schema/RLS/auth/role mutation was performed. Verification slice commit `55b62db0`: all 14 existing Supabase migration statements were archived exactly from migration history under `supabase/migrations/`; no database mutation occurred. Quality run `36600894426` succeeded, including Phase 3 behavior, actual Phase 4 accounting invariants and Playwright real-DOM smoke; Security/CodeQL `36600894268` succeeded; Pages `36600893196` succeeded. Live head discrepancy `7d054dfa` is now accounted for. Authenticated production-user E2E and physical-printer validation remain NOT VERIFIED. |
36
+| 2026-09-29 | Execute master roadmap Phase 4 end-to-end: projects/contracts, amendments/lifecycle, employer/contractor/subcontractor links, deductions, guarantees, contractor statements/accounting, traceability, reporting, permissions/audit/sync/backup/migration/tests/reconciliation. | COMPLETED | Re-accepted under the stricter verification rule at `55b62db0`: Playwright real-DOM smoke PASS and Phase 4 accounting invariants PASS in Quality `36600894426`; Security `36600894268` PASS; Pages `36600893196` PASS. Prior implementation evidence: domain/UI `c2100228`; persistence/navigation/backup through `172aeb59`; referential guards `44154769`; behavioral CI gate `fe29b817`; deduction-specific accounting/template migration `dd3b78ed`; verification doc `e5b814a7`. Supabase migration `20260929091743 phase4_contracting_collections` applied; RLS owner isolation verified; production had zero pre-existing Phase 4 rows requiring backfill; performance advisor clean; known pre-existing security warnings unchanged. Acceptance checkpoint `95e6de99`: Quality 36549015911 success; Security/CodeQL 36549015935 success; Pages 36549015796 success. |
37
| 2026-09-29 | Consolidate top-level Sales, Purchases, and People navigation into a single `بازرگانی` module while preserving the underlying views and workflows. | COMPLETED | Top-level `sales`, `purchases`, `people` rail entries removed; `commerce`/بازرگانی added with فروش، خرید، اشخاص submenu and canonical view mappings. Quality run 36545021724 success; Pages run 36545024472 success; Security/CodeQL run 36545021744 success. |
38
| 2026-09-29 | Restore invoice print contract: formal sales invoice = A4 landscape, pre-invoice = A4 landscape, non-formal invoice = A5 landscape; preserve standard print margins and page fit. | COMPLETED | `js/print.js` fixed on main: formal/pre-invoice A4 landscape with 5mm print margin; non-formal A5 landscape with 5mm margin; page-fit widths set to printable landscape areas. Regression gates updated in `scripts/quality-check.mjs` and `scripts/phase3-check.mjs`. Implementation commits `a7e14ec1`, `baa46715`, gate correction `4550f239`; Quality run 36544154873 success; Pages run 36544154397 success. Final checkpoint head `75cf79e5` re-verified: Quality run 36544278076 success; Security/CodeQL run 36544278147 success; Pages deployment run 36544277692 success. |\n
39
| Date | Request / decision | Status | Evidence / next action |
@@ -236,8 +236,8 @@ Performance advisor: no findings.
236
## Existing operational capabilities that must not regress
237
Sales invoices, purchase invoices, contacts/counterparties, products/services, receipts/payments with partial settlement, cheques, expenses/income, companies, global projects, reporting, formal/nonformal printing, Excel import, backup/cloud sync, admin/license controls, dashboard/drilldowns.
238
239
-## Phase 4 — IN PROGRESS (VERIFICATION REOPENED)
240
-Phase 4 implementation scope exists, but COMPLETED status is withheld until real-DOM smoke and accounting-invariant tests actually run and pass. Delivered implementation scope:
239
+## Phase 4 — COMPLETED (RE-VERIFIED)
240
+Phase 4 implementation and acceptance were re-verified under the stricter owner rule: real Chromium DOM smoke and actual accounting-invariant tests passed in Quality run `36600894426` on `55b62db0`. Delivered implementation scope:
241
- first-class contracts
242
- contract amendments/status/lifecycle
243
- employer/contractor/subcontractor relationships
@@ -309,8 +309,8 @@ The **current master roadmap is six phases**, regardless of older historical doc
309
- **Phase 1 — COMPLETED:** scalable UX/product shell and information architecture.
310
- **Phase 2 — COMPLETED:** master data + accounting-core foundation.
311
- **Phase 3 — COMPLETED:** double-entry operational accounting and automatic source posting.
312
-- **Phase 4 — IN PROGRESS (REOPENED FOR VERIFICATION):** implementation exists; real-DOM smoke and actual Phase 4 accounting-invariant execution are required before COMPLETED.
313
-- **Phase 5 — BLOCKED ON PHASE 4 VERIFICATION:** complementary ERP/integrations, inventory/costing/assets/multi-currency/settings/permissions/import.
312
+- **Phase 4 — COMPLETED:** re-verified with real-DOM smoke plus accounting-invariant execution at `55b62db0` / Quality `36600894426`.
313
+- **Phase 5 — NEXT:** complementary ERP/integrations, inventory/costing/assets/multi-currency/settings/permissions/import.
314
- **Phase 6 — PENDING:** professional reports, historical reconciliation/cutover, QA/security/performance/audit/backup/rollback/final release.
315
316
Do not confuse the older completed Finora 1.0 four-phase delivery with this current six-phase redesign roadmap.
@@ -346,7 +346,7 @@ If a session is interrupted before the final update, the next worker must first
346
347
## Current next executable phase
348
349
-**Phase 4 verification is the next executable work.** Phase 4 implementation exists, but real-DOM smoke and actual Phase 4 accounting-invariant execution are NOT VERIFIED. After those pass, Phase 5 owns complementary ERP/integrations: inventory/warehouse and costing, fixed assets, multi-currency, cost centers/advanced analytics, import/backup/permissions/settings redesign and integration/API architecture.
349
+**Phase 5 is the next executable phase.** Phases 1–4 are complete under the current acceptance rule. Phase 5 owns complementary ERP/integrations: inventory/warehouse and costing, fixed assets, multi-currency, cost centers/advanced analytics, import/backup/permissions/settings redesign and integration/API architecture.
350
351
## Portable one-line bootstrap
352