fix(worker): queue dispatches skip the StartRunning re-claim
The picker claims Queued->Running atomically before dispatch; the new StartRunningAsync guard then rejected every queue-dispatched run. Add alreadyClaimed to RunAsync/ContinueAsync (queue passes true, override slot keeps the guard) and align the routing tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
0cba9f9640
commit
74ca2e0dcd
@@ -191,14 +191,14 @@ public sealed class QueueService : BackgroundService
|
||||
|
||||
if (sessionId is not null)
|
||||
{
|
||||
await _runner.ContinueAsync(taskId, feedback, "queue", ct);
|
||||
await _runner.ContinueAsync(taskId, feedback, "queue", ct, alreadyClaimed: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
task.Description = string.IsNullOrWhiteSpace(task.Description)
|
||||
? $"Reviewer feedback: {feedback}"
|
||||
: $"{task.Description}\n\nReviewer feedback: {feedback}";
|
||||
await _runner.RunAsync(task, "queue", ct);
|
||||
await _runner.RunAsync(task, "queue", ct, alreadyClaimed: true);
|
||||
}
|
||||
|
||||
// Clear the consumed feedback only once the run reached a successful
|
||||
@@ -212,7 +212,7 @@ public sealed class QueueService : BackgroundService
|
||||
return;
|
||||
}
|
||||
|
||||
await _runner.RunAsync(task, "queue", ct);
|
||||
await _runner.RunAsync(task, "queue", ct, alreadyClaimed: true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user