| … | … | @@ -877,10 +911,41 @@ export const layer = Layer.effect( | |
| 929 | + | ); | |
| 930 | + | const consecutiveFailures = runSucceeded ? 0 : (failureRow?.consecutive_failures ?? 0) + 1; | |
| 931 | + | // A webhook task runs when its sender calls; pausing it would drop later requests. | |
| 932 | + | const failuresExhausted = | |
🟠 High scheduledTasks/ScheduledTaskService.ts:932
A fifth failure from an in-flight dispatch can disable a task that has already been rebound to a healthy destination or converted to a webhook. failuresExhausted uses the stale active snapshot, and markCompleted applies pause without checking the current configuration; revalidate the task’s configuration before pausing it.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/server/src/scheduledTasks/ScheduledTaskService.ts around line 932: |
| 2 | |
| 3 | A fifth failure from an in-flight dispatch can disable a task that has already been rebound to a healthy destination or converted to a webhook. `failuresExhausted` uses the stale `active` snapshot, and `markCompleted` applies `pause` without checking the current configuration; revalidate the task’s configuration before pausing it. |