forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Task Description
When Pulse restarts, resurrectionScan iterates over in-progress tasks and handles:
stage: developing→ advances toreviewing(preserve worktree)- All other stages → reset to idle (destroy worktree)
But adversarial-running tasks are NOT handled correctly. They fall into the "other stages" branch, which destroys the worktree and resets to idle — losing the developer's work. The correct behavior is to reset stage to reviewing (preserving worktree) so Pulse re-spawns the adversarial agent on the next tick.
Root Cause
Line 122 only checks for stage === 'developing'. The adversarial-running case should also preserve the worktree and reset to reviewing.
Fix
Add adversarial-running handling in resurrectionScan:
- Clear
assignee/assignee_pid - Reset
stagetoreviewing(so adversarial re-spawns) - Preserve worktree and branch (developer's work is there)
- Add comment: 'Resurrected: adversarial session ended before restart. Returned to reviewing.'
Quality Gates (Non-Negotiable)
- TDD: Write tests before implementation
- Coverage: 80%+ test coverage for new code
- Linting: All code passes project linting rules
- Local Verification: All tests pass locally before completion
Acceptance Criteria
resurrectionScanresetsadversarial-runningtasks toreviewingstage (not idle)- Worktree and branch are preserved
- Unit test covers the new branch in pulse.test.ts or a new fixture
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels