سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 17:00 UTC
Docs: close Wave 2 with verified production evidence
Record protected CI, real-DOM/accounting/security evidence, production Supabase migration verification, and successful gated Pages deployment for F-411/F-413/F-414/F-417/F-418.
davoodmehraban89 committed
Oct 2, 2026 at 02:28 UTC
3a55c1ffe7429c41a0265c82e9bb456bfd91f691
2 files changed
+35
-5
PROJECT_STATE.md
+4
-5
@@ -15,7 +15,7 @@ This is high-assurance accounting/ERP software. Posted financial history, tenant
15
| Date | Request / decision | Status | Evidence / next action |
16
|---|---|---|---|
17
| 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. |
18
-| 2026-10-02 | Wave 2 request integrity remediation F-411/F-413/F-414/F-417/F-418. | **IMPLEMENTED ON BRANCH / VERIFICATION PENDING** | Added `20261002023000_request_wave2_integrity_hardening.sql` + `request_wave2_integrity.sql`; server validates pinned form values, binds create idempotency to version+payload, rejects inactive/obsolete versions, schema-binds condition fields/operators, and fails closed when no approval step applies. D2 now authors/preserves/renders date/select fields and serializes numbers canonically; D3b condition editor selects authored form fields. Quality gate updated; PR CI and production application are pending. |
18
+| 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. |
19
| 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. |
20
| 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. |
21
| 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. |
@@ -62,10 +62,9 @@ Automatic background scheduling for SLA scans; delivery/dispatch consumers for D
62
The connected Supabase tool now exposes the owner-specified production target `hcsixhqbyuhpshfwqpjx` (`Finora`, `ACTIVE_HEALTHY`, PostgreSQL 17.6.1). Live migration history includes the C8/D1/D2/D3 and Wave 1 request migrations through two recorded `request_wave1_legacy_transition_guard` applications. Read-only production inspection confirmed the current private legacy transition implementation authorizes tenant/module/capability before replay, rejects D3 step-runtime bypass, binds replay to actor+action, and the public wrapper is `SECURITY INVOKER`. No production DDL was required for this reconciliation.
63
64
## Exact next executable work
65
-1. Implement Wave 2 immutable request input/version/condition hardening (F-411/F-413/F-414/F-417/F-418) with negative disposable-DB tests and real-DOM form-fidelity coverage before any D4 consumer activation.
66
-2. After protected-branch CI passes, reconcile the exact Wave 2 migration against production `hcsixhqbyuhpshfwqpjx` and apply only the archived reviewed migration; then rerun production read-only/adversarial verification and security advisors.
67
-3. Only after request integrity gates, resume D4 approver/delegate work queue and bounded outbox-consumer contracts.
68
-4. Continue compliance/accounting roadmap only with sourced legal/tax/accounting evidence and controlled cutover safeguards.
65
+1. Resume D4 approver/delegate work queue and bounded outbox-consumer contracts now that Wave 2 request-integrity gates are closed.
66
+2. Keep D4c external/destination consumers disabled until their own destination-idempotency, retry/dead-letter and authorization contracts are implemented and adversarially verified.
67
+3. Continue compliance/accounting roadmap only with sourced legal/tax/accounting evidence and controlled cutover safeguards.
68
69
## Live QA open items
70
- Exact Taxpayer-System print redesign: owner reference images were received in chat and implementation was reported complete; retain regression coverage and do not silently redesign away from the approved reference.
docs/REQUEST_WORKFLOW_WAVE2_VERIFICATION.md
new
+31
@@ -0,0 +1,31 @@
1
+# Request Workflow Wave 2 Verification — 2026-10-02
2
+
3
+## Scope
4
+F-411 server-side pinned-form value validation; F-413 date/select authoring and runtime fidelity; F-414 create-idempotency command binding; F-417 active/current version enforcement; F-418 schema-bound conditions and fail-closed no-match behavior.
5
+
6
+## Durable implementation
7
+- Main squash SHA: `7346910638b6ef9555d4adb5952dd62c8f4c130d` (PR #19).
8
+- Archived migration: `supabase/migrations/20261002023000_request_wave2_integrity_hardening.sql`.
9
+- Behavioral assertions: `supabase/tests/request_wave2_integrity.sql`.
10
+- UI: `js/request-workflow-d2.js`, `js/request-workflow-d3b.js`.
11
+- DOM coverage: `scripts/request-workflow-d2.spec.js`, `scripts/request-workflow-d3b.spec.js`.
12
+- Quality workflow applies the Wave 2 migration in disposable PostgreSQL before D3b/D3c downstream assertions.
13
+
14
+## Verification evidence
15
+- PR Quality run `36937247798`: SUCCESS. `d1-request-database` applied the Wave 2 migration and executed all negative assertions successfully. Static-quality passed all accounting behavior checks and the Golden accounting journey, then Playwright completed 37/37 real-DOM tests.
16
+- PR Security run `36937247803`: required `Release and QA safety invariants` and `CodeQL JavaScript` passed. Dependency review still fails on PRs because the GitHub Dependency graph is disabled; this remains an external repository-setting boundary and is not a required protected-main check.
17
+- Main Quality run `36937448157`: SUCCESS.
18
+- Main Security run `36937448101`: SUCCESS.
19
+- Exact-SHA Release gate `36937598497`: SUCCESS for `7346910638...`.
20
+- Gated Pages run `36937616201`: SUCCESS after the exact-SHA Release gate.
21
+
22
+## Production database
23
+Target: Supabase project `hcsixhqbyuhpshfwqpjx` (Finora).
24
+- Applied through the Supabase migration API from the exact archived SQL after protected PR checks passed.
25
+- Live migration history records `20261001225044 request_wave2_integrity_hardening`.
26
+- Read-only/procedural production verification confirmed valid number/date/select payload validation, rejection of string-as-number, rejection of unbound condition fields, and the deployed create function contains command-conflict, latest-version and no-applicable-step fail-closed contracts.
27
+- Existing production request definitions were inspected before deployment: latest `INDENT` and `INVOCE` versions are active schemaVersion 1 definitions with empty fields, so the new validator is compatible with the current production definitions.
28
+- Post-DDL Supabase security advisor showed no new Wave 2-specific finding. Existing private C8 no-policy informational notices, legacy authenticated SECURITY DEFINER warnings, and leaked-password-protection warning remain tracked boundaries.
29
+
30
+## Acceptance result
31
+F-411/F-413/F-414/F-417/F-418 are closed at code, disposable-DB, real-DOM, accounting-regression, security and production-database boundaries. No Wave 2 closeout gate remains pending at the verified repository/database boundary.