Phase 14: Parallel Phase Execution - 8 plans in 5 waves - 4 parallel in Wave 1, 3, 5 - Adds phase_dependencies schema (mirrors task_dependencies) - PhaseDispatchManager port and adapter - tRPC procedures and CLI commands - Unit tests and E2E tests
3.0 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous
| phase | plan | type | wave | depends_on | files_modified | autonomous | ||
|---|---|---|---|---|---|---|---|---|
| 14-parallel-phase-execution | 08 | execute | 5 |
|
|
true |
Purpose: Verify end-to-end phase dispatch with dependencies works correctly. Output: E2E tests covering parallel execution scenarios.
<execution_context>
@/.claude/get-shit-done/workflows/execute-plan.md
@/.claude/get-shit-done/templates/summary.md
</execution_context>
Reference implementations:
@src/tests/e2e/happy-path.test.ts @src/tests/e2e/parallel-conflict.test.ts
Task 1: Create phase dispatch E2E tests src/__tests__/e2e/phase-dispatch.test.ts Create E2E test file for phase dispatch scenarios:describe('Phase Parallel Execution'):
Test 1: Independent phases dispatch in parallel
- Create initiative with 2 independent phases (no dependencies)
- Queue both phases
- Both should be ready for dispatch immediately
- Dispatch both and verify parallel execution
Test 2: Dependent phase waits for prerequisite
- Create phases: A, B (depends on A)
- Queue both
- Only A should be ready
- Complete A
- B should become ready
Test 3: Diamond dependency pattern
- Create phases: A, B (depends on A), C (depends on A), D (depends on B, C)
- Queue all
- A ready first
- After A completes: B and C ready (parallel)
- After B and C complete: D ready
Test 4: Blocked phase doesn't dispatch
- Create phases: A, B (depends on A)
- Block A
- B should never become ready
Use TestHarness with database fixtures. Follow existing E2E test patterns. npm test -- src/tests/e2e/phase-dispatch.test.ts passes Phase dispatch E2E tests cover parallel execution scenarios
Task 2: Add phase dispatch to TestHarness src/__tests__/harness.ts Extend TestHarness to support phase dispatch testing: - Add phaseDispatchManager property (DefaultPhaseDispatchManager instance) - Wire up with phaseRepository and eventBus - Add helper methods if needed: queuePhase(), dispatchPhase()Follow patterns from existing harness setup. npm test -- src/tests/e2e/phase-dispatch.test.ts passes TestHarness supports phase dispatch scenarios
Before declaring plan complete: - [ ] `npm run build` succeeds without errors - [ ] `npm test` passes all tests - [ ] E2E tests verify actual parallel behavior<success_criteria>
- All tasks completed
- All verification checks pass
- Tests verify dependency ordering is enforced
- Tests verify parallel phases dispatch together </success_criteria>