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:
gsxdsm
2026-04-04 07:48:47 -07:00
parent 158002c6d6
commit f99c065b0f
4 changed files with 521 additions and 33 deletions

View File

@@ -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`,
);
},
});