fix: scrub queued/blockedBy/overlapBlockedBy on in-review transition

A task that picked up status='queued' or overlapBlockedBy while waiting in
todo (file-scope overlap with a higher-priority peer) was carrying those
todo-dispatch markers into in-review, where the merge gate then permanently
refused with "task is marked 'queued'". Ghost-review → todo → scheduler
re-queue → stranded-completed-todo recovery → in-review formed a steady-
state loop that never let the task merge.

moveTaskInternal now treats queued/blockedBy/overlapBlockedBy as todo-only
dispatch state and clears them on every transition into in-review. failed
and awaiting-* statuses are left untouched (already covered by an existing
test, plus a new regression test for the queued case).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-21 11:08:14 -07:00
parent 933cea434a
commit 2d425b1e28
3 changed files with 42 additions and 0 deletions

View File

@@ -4911,6 +4911,15 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
if (toColumn === "in-review") {
task.recoveryRetryCount = undefined;
task.nextRecoveryAt = undefined;
// Clear scheduler-side dispatch state: `queued`, `blockedBy`, and
// `overlapBlockedBy` are stamped while the task waits in `todo`. If
// they survive the transition into `in-review` they permanently block
// the merge gate (see getTaskMergeBlocker's BLOCKING_TASK_STATUSES).
if (task.status === "queued") {
task.status = undefined;
}
task.blockedBy = undefined;
task.overlapBlockedBy = undefined;
}
if (