# Parallel Task Structure **Purpose:** Enable maximum automation by removing artificial order-of-operations blockers. **Principle:** Split large tasks into smaller atomic units; mark real vs fake dependencies; group by parallel cohort. **Full remaining work (all TODOs):** For the **complete** list of remaining items ordered for **full maximum parallel mode** (Wave 0 → Wave 1 → Wave 2 → Wave 3), see **[FULL_PARALLEL_EXECUTION_ORDER.md](FULL_PARALLEL_EXECUTION_ORDER.md)**. Run all items in the same wave concurrently. --- ## Parallel Cohorts Tasks in the same cohort have **no dependencies on each other** and can run in parallel. ### Cohort A — Immediate (no blockers) | ID | Task | File/Scope | Automation | |----|------|------------|------------| | A1 | Add env check to e-signature.ts | the-order/services/legal-documents | Edit | | A2 | Add env check to court-efiling.ts | the-order/services/legal-documents | Edit | | A3 | Add ISSUER_DID env to identity | the-order/services/identity | Edit | | A4 | Add env stub to OCR placeholder | the-order/packages/workflows | Edit | | A5 | Add env stub to approval placeholder | the-order/packages/workflows | Edit | | A6 | Add OIDC env vars to shared auth | the-order/packages/shared | Edit | | A7 | Add DID env to auth/did.ts | the-order/packages/auth | Edit | | A8 | Create ISO deploy script (forge) | smom-dbis-138/scripts | New file | | A9 | Add Uniswap env stub | alltra-lifi-settlement | Edit | | A10 | Add Curve env stub | alltra-lifi-settlement | Edit | | A11 | Add payment-intent env stub | alltra-lifi-settlement | Edit | | A12 | Create OMNIS EntityList.test.tsx | OMNIS | New file | | A13 | Create OMNIS TreasuryCharts.test.tsx | OMNIS | New file | | A14 | Add GlobalSearch mock for tests | OMNIS | Edit | | A15 | Fix dbis JsonValue type (one module) | dbis_core | Edit | | A16 | Create Prometheus scrape config | smom-dbis-138/monitoring | Edit | | A17 | Create verify-websocket standalone script | scripts/verify | Edit | | A18 | Add .env vars to IP_CENTRALIZATION | docs | Edit | ### Cohort B — After Cohort A (or parallel if A not needed) | ID | Task | File/Scope | Depends On | |----|------|------------|------------| | B1 | Finance DB persistence (schema) | the-order/packages/database | None | | B2 | Dataroom document metadata save | the-order/services/dataroom | None | | B3 | Identity VC verification logic | the-order/services/identity | A3 | | B4 | Vault test VLT-001 only | smom-dbis-138/test | None | | B5 | ISO test ISO-001 only | smom-dbis-138/test | None | | B6 | Bridge BRG-VLT deposit token | smom-dbis-138/contracts | None | | B7 | Bridge BRG-ISO deposit token | smom-dbis-138/contracts | None | | B8 | OMNIS cash flow chart stub | OMNIS | None | | B9 | OMNIS Gantt stub | OMNIS | None | | B10 | dbis IRU SES env stub | dbis_core | None | | B11 | dbis IRU sanctions env stub | dbis_core | None | | B12 | NPMplus backup cron script | scripts | None | | B13 | Phase 3 CCIP Ops script skeleton | scripts/deployment | None | | B14 | Phase 4 tenant script skeleton | scripts/deployment | None | ### Cohort C — Independent external integrations Each can run in parallel; no cross-deps: | ID | Task | Blocker | |----|------|---------| | C1 | Li.Fi SDK integration | API key | | C2 | LayerZero integration | API/config | | C3 | Uniswap routing (real) | RPC, pool addresses | | C4 | DocuSign e-signature | API key | | C5 | MoonPay fiat on-ramp | API key | | C6 | Ramp Network fiat | API key | ### Cohort D — Infrastructure (SSH-able; can parallelize by host) | ID | Task | Host | Depends On | |----|------|------|------------| | D1 | Verify ml110 containers | ml110 | SSH | | D2 | Verify r630-01 containers | r630-01 | SSH | | D3 | Verify r630-02 containers | r630-02 | SSH | | D4 | Backup NPMplus (if NPM_PASSWORD) | r630-01 | SSH, creds | | D5 | Export Prometheus targets | r630-01 | SSH | --- ## Dependency Rules ### Fake dependencies (ignore for parallelization) - ~~Phase 2 before Phase 3~~ → Observability config can be done alongside CCIP scripts - ~~Vault tests before deployment~~ → Deploy script can exist without tests passing - ~~Auth before frontend charts~~ → Chart stubs need no auth - ~~DB before Finance service~~ → Env stubs work without DB - ~~BRG-VLT before BRG-ISO~~ → Independent contract changes ### Real dependencies (must respect) - CCIP commit nodes → need CCIP Ops/Admin (true infra dep) - NPMplus backup → needs NPM_PASSWORD (creds) - Real API calls → need API keys (creds) - Forge deploy → needs PRIVATE_KEY, RPC_URL (creds) --- ## Task Splitting Guide | Monolithic Task | Split Into | |-----------------|------------| | "Vault tests VLT-001 to VLT-009" | VLT-001, VLT-002, … VLT-009 (9 parallel tasks) | | "ISO tests ISO-001 to ISO-008" | ISO-001, … ISO-008 (8 parallel tasks) | | "Bridge BRG-VLT, BRG-ISO, BRG-EM" | BRG-VLT, BRG-ISO, BRG-EM (3 parallel) | | "CCIP Fleet" | Ops script, Commit script, Execute script, RMN script (4 parallel scripts) | | "dbis TypeScript fixes" | By file: fix `file1.ts`, fix `file2.ts`, … | | "OMNIS unit tests" | Header, EntityList, TreasuryCharts, … (one test file each) | | "the-order Identity" | Env stub, VC issuance, verification, KMS (4 parallel) | | "Documentation consolidation" | By doc folder: 01-, 02-, 03-, … (parallel by section) | --- ## Execution Model 1. **Cohort A** → Run all in parallel (no shared state). 2. **Cohort B** → Run in parallel; some reference A outputs but can use defaults. 3. **Cohort C** → Run when credentials available; independent of each other. 4. **Cohort D** → Run per-host in parallel; SSH to ml110, r630-01, r630-02 concurrently. --- ## Completed (2026-01-31) **Cohort A:** A1-A2 (e-signature, court-efiling already had env checks), A3 (VC_ISSUER_DID exists), A4-A7 (workflows, auth env stubs), A8 (deploy-iso4217w-system.sh), A9-A11 (alltra env stubs), A12-A14 (EntityList, TreasuryCharts, GlobalSearch tests), A16 (scrape-proxmox.yml), A17 (verify-websocket exists), A18 (IP_CENTRALIZATION, .env.example). **Cohort B:** B1-B2 (Finance/Dataroom DB wired), B12 (npmplus-backup-cron.sh), B13-B14 (phase3-ccip-ops.sh, phase4-sovereign-tenants.sh), B6-B7 (register-vault-deposit-tokens.sh, register-iso-deposit-tokens.sh), B8-B9 (TreasuryCharts, ProjectTimeline exist), B10-B11 (SES/sanctions env in dbis). **Cohort D:** D4 (backup-npmplus ran successfully), D5 (export-prometheus-targets.sh, targets-proxmox.yml). PROXMOX_* added to .env. **Completed (2026-02-01):** dbis_core deployment-orchestrator syntax fix; ari-reflex duplicate props; prisma generate. alltra-lifi-settlement: env.example, TypeScript fixes, workspace add, build passing. multi-chain-execution: Express router type annotations (build passing). OMNIS: vitest testTimeout 20s, hookTimeout 15s, MSW onUnhandledRequest bypass. smom: forge:test, forge:test:vault, forge:test:iso scripts. **dbis_core TypeScript Phases 1-4 (2026-01-31):** Phase 1 (imports, route returns), Phase 2 (JsonValue, unknown, reduce types), Phase 3 (Prisma props, express.d.ts, null safety), Phase 4 (schema mismatches, gdsl-settlement, uhem-analytics). ~1186 TS errors remain. See REMAINING_TASKS_MASTER. --- ## Automation Script A runner can: - Parse this file for Cohort A/B task IDs - For each task: `pnpm exec cursor-agent --task "A1"` (or similar) - Collect results; proceed to next cohort - Never block A2 on A1, B2 on B1, etc.