Merge pull request #544 from fluxlabs/fix/auto-dispatch-gap-watchdog-537
fix(auto): stop auto-mode when dispatch gap watchdog fails to dispatch
This commit is contained in:
commit
e051eff987
1 changed files with 12 additions and 0 deletions
|
|
@ -312,6 +312,18 @@ function startDispatchGapWatchdog(ctx: ExtensionContext, pi: ExtensionAPI): void
|
|||
"error",
|
||||
);
|
||||
await stopAuto(ctx, pi);
|
||||
return;
|
||||
}
|
||||
|
||||
// If dispatchNextUnit returned normally but still didn't dispatch a unit
|
||||
// (no sendMessage called → no timeout set), auto-mode is permanently
|
||||
// stalled. Stop cleanly instead of leaving it active but idle (#537).
|
||||
if (active && !unitTimeoutHandle && !wrapupWarningHandle) {
|
||||
ctx.ui.notify(
|
||||
"Auto-mode stalled — no dispatchable unit found after retry. Stopping. Run /gsd auto to restart.",
|
||||
"warning",
|
||||
);
|
||||
await stopAuto(ctx, pi);
|
||||
}
|
||||
}, DISPATCH_GAP_TIMEOUT_MS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue