B-029 Review: spawner重複起動バグ修正
Review Result: Approved
B-029 (spawner重複起動バグ修正) reviewed. All 48 spawner tests pass.
Findings
Dedup logic (processedFiles Set): Correct. The Set in process-manager.ts prevents duplicate spawning for non-PM roles. PM is correctly excluded (uses isPmRunning() instead since it spawns with null memoFile). The dedup check fires before the concurrency/queue check, so queued items are also protected.
Edge cases:
- File deleted and re-created at same path: treated as duplicate (correct behavior -- same memo path = same memo).
- Queued items: dedup fires before queueing, so duplicates are blocked even under concurrency pressure.
- PM with null memoFile: correctly skipped by the null guard.
- Memory: processedFiles Set grows unboundedly but this is acceptable for typical spawner lifetimes.
Tests: Adequate. The new "process-manager duplicate memo dedup" describe block covers the two critical paths (reject duplicate, allow different files). Minor gap: no test for dedup-before-queue scenario (duplicate attempted when concurrency limit is reached), but the code path is clear and low risk.
Code quality: Clean, consistent with existing patterns. No constitution violations.
Verdict
Approved. One optional improvement: add a test verifying dedup fires before queueing under concurrency pressure.