Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

fix: complete phase 7 readiness and ci hardening

Davood Mehraban committed Oct 5, 2026 at 20:16 UTC 60d0029543cba587cedbbdf08228d483de647434
3 files changed +27 -1
.github/workflows/ci.yml
+2 -1
@@ -14,7 +14,7 @@ jobs:
14 with:
15 node-version: 22
16 cache: npm
17 - - run: npm ci
17 + - run: npm ci`n - run: npm audit --omit=dev --audit-level=high
18 - run: npm run typecheck
19 - run: npm test -- --reporter=dot
20 - run: npx eslint src --no-cache
@@ -25,3 +25,4 @@ jobs:
25 run: |
26 if git ls-files | grep -E '(^|/)\.env($|\.)' | grep -v '\.env\.production\.example$'; then exit 1; fi
27 - run: npm run build
28 +
docs/PHASE_7_DESIGN_SPEC.md new
+17
@@ -0,0 +1,17 @@
1 +# Phase 7 Design — Production Infrastructure & Bank Go-Live
2 +
3 +## Objective
4 +Complete every repository-controlled production and go-live safeguard while keeping real external systems fail-closed until verified evidence exists.
5 +
6 +## Architecture
7 +Provider-neutral evidence gates surround PostgreSQL, identity/MFA, KMS/secrets, WAF/SIEM/alerts, recovery drills and bank connectivity. Bank activation progresses only DISABLED -> SANDBOX -> CERTIFIED -> LIVE. LIVE requires explicit authorization plus verified production credentials and certificate.
8 +
9 +## Non-negotiable invariants
10 +- Tenant isolation is enforced in application context and PostgreSQL RLS, including write checks and tenant-bound foreign keys.
11 +- Maker/checker separation and UNKNOWN no-auto-retry remain in force.
12 +- Readiness fails closed when production dependencies are absent.
13 +- Secrets/private keys are never committed or emitted in telemetry.
14 +- External evidence is never inferred from repository tests.
15 +
16 +## Completion definition
17 +Repository-controlled code, tests, migrations, CI, deployment contracts and runbooks pass. Any item requiring real external infrastructure, credentials, certification, money movement or access mutation is explicitly BLOCKED_EXTERNAL until actually performed under authorization.
docs/superpowers/plans/2026-10-05-phase-7-production-infrastructure-bank-golive.md new
+8
@@ -0,0 +1,8 @@
1 +# Phase 7 Implementation Plan
2 +1. Full-project baseline review and dependency/security audit.
3 +2. Harden PostgreSQL tenant isolation and schema contracts.
4 +3. Add fail-closed production evidence, identity/MFA, security-operations and recovery policies.
5 +4. Add strict bank activation lifecycle with explicit LIVE authorization.
6 +5. Make production readiness fail closed when required external configuration is missing.
7 +6. Add provider-neutral production environment/evidence and PostgreSQL verification artifacts.
8 +7. Run complete regression/security/build gate, push branch and inspect remote CI status.