feat(core): fully reset in-review → todo so the task starts over
Previously this transition cleared only transient execution state (status/error/worktree/blockedBy/workflowStepResults), but kept the prior branch, baseBranch, baseCommitSha, summary, and recovery counters. That meant retrying a reviewed task resumed on the old branch with a stale summary instead of starting fresh. Now those fields are also cleared on in-review → todo. Other reopen paths (in-progress/done → todo/triage) keep their existing behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5934,6 +5934,12 @@ Task with acceptance criteria
|
||||
error: "stale error",
|
||||
worktree: "stale-worktree",
|
||||
blockedBy: "FN-456",
|
||||
branch: "fn/stale-branch",
|
||||
baseBranch: "main",
|
||||
baseCommitSha: "abc123",
|
||||
summary: "stale summary from prior attempt",
|
||||
recoveryRetryCount: 2,
|
||||
nextRecoveryAt: new Date().toISOString(),
|
||||
workflowStepResults: [{
|
||||
workflowStepId: "wf-1",
|
||||
workflowStepName: "Workflow step 1",
|
||||
@@ -5949,6 +5955,14 @@ Task with acceptance criteria
|
||||
expect(retried.worktree).toBeUndefined();
|
||||
expect(retried.blockedBy).toBeUndefined();
|
||||
expect(retried.workflowStepResults).toBeUndefined();
|
||||
// Full reset: prior branch/summary/recovery state discarded so the next
|
||||
// run starts from scratch.
|
||||
expect(retried.branch).toBeUndefined();
|
||||
expect(retried.baseBranch).toBeUndefined();
|
||||
expect(retried.baseCommitSha).toBeUndefined();
|
||||
expect(retried.summary).toBeUndefined();
|
||||
expect(retried.recoveryRetryCount).toBeUndefined();
|
||||
expect(retried.nextRecoveryAt).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user