feat(FN-850): add no-progress loop detection and improve stuck-task detector
- Add explicit no-progress loop detection signals to executor agent sessions - Enhance stuck-task detector with configurable strategies (timeout, no-progress, combined) - Add comprehensive test coverage for stuck-task detector (371 lines of tests) - Remove modelFilter test utilities (198 lines of dead test code) - Simplify modelFilter.ts by removing unused filtering logic - Clean up dashboard server startup and minor README fix
This commit is contained in:
@@ -577,9 +577,14 @@ export async function runDashboard(port: number, opts: { paused?: boolean; dev?:
|
||||
const executorRef: { current: TaskExecutor | null } = { current: null };
|
||||
const stuckTaskDetector = new StuckTaskDetector(store, {
|
||||
beforeRequeue: (taskId) => selfHealing.checkStuckBudget(taskId),
|
||||
onStuck: (taskId) => {
|
||||
executorRef.current?.markStuckAborted(taskId);
|
||||
console.log(`[engine] ⚠ ${taskId} stuck — terminated, will retry`);
|
||||
onStuck: (event) => {
|
||||
executorRef.current?.markStuckAborted(event.taskId);
|
||||
console.log(
|
||||
`[engine] ⚠ ${event.taskId} stuck (${event.reason}) — ` +
|
||||
`no progress for ${Math.round(event.noProgressMs / 60_000)}min, ` +
|
||||
`${event.activitySinceProgress} events since last progress — ` +
|
||||
`terminated, will retry`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user