Repository navigation
Conversation
|
I tested the duplicate-retry risk you flagged (at 8a2c8bc). It's real, in two cases:
When Provider Retry skips a failure, Automations recovers it once, as intended. Suggestion: let Provider Retry own retries, and have Automations skip its own retry when one is already queued or the thread has recovered. Caveat: I tested with the real plugins and database, not a full live server. Case 2's "never cleaned up" part comes from reading the code, not running it.
|
|
We reproduced #4166 on bb 0.45.0 after an Account Pooler 429. A separate change is proposed to let provider clients wait inside the same turn for up to six hours on Pooler 429/502/503; it is not deployed. PR #4332 still needs to recover an automation after that wait expires or another terminal provider failure occurs. Its current head can duplicate dispatches when Provider Retry also acts, as documented in the existing PR comment. Before merge, please add a finite retry ceiling and regression tests for exhausted client wait, concurrent native retry, an explicit user pause, and a new automation run ID that stays bound through |
|
Human comments
What was wrong
The automations plugin treated a reused target thread in
erroras permanently unavailable even though core can start a new turn there. It disabled every automation targeting that thread. The generic three-failure pause also retired recurring automations after transient provider failures. A failed manual run was subsequently found to be mislabeled as a scheduled retry.What changed
A scheduled retry creates a fresh automation run and can dispatch into the same non-deleted, non-archived error thread. Structured transient provider failures and transport/5xx dispatch errors retain exponential retry with a 30-minute cap; permanent and unclassified failures keep the existing pause rule. Missing, deleted, and archived targets remain terminal with an accurate reason. The plugin stores
retryAtseparately fromnextRunAt, so UI and CLI label the next run as a retry only when one is actually scheduled. Manual run failures retain their error and normal schedule. The automation skill reference documents the policy. The plugin database migration addsretry_atand automation JSON responses include nullableretryAt; no server/daemon wire fields changed.How you verified
pnpm exec turbo run typecheck test lint --filter=bb-plugin-automations: 142 tests, typecheck, and lint pass; lint reports five existing React warnings.pnpm start:worktree --dryrunand persistentpnpm start:worktreeat PR head8a2c8bc285848afdc93b70cb5a75d5b6146326a9: 48 build tasks passed; server and host daemon started.error. The next real scheduled dispatch created a distinct runarun_hwmxfvxr8jiin the samethr_5m6aqhxs7tand succeeded. UI and CLI/API showed the failure reason and next retry.arun_bp-p05scbcufailed. UI and CLI/API showedNext runandLast run failed, withretryAt: nulland the original schedule intact.Open review concern
Provider Retry can retry a failed provider turn while Automations schedules a separate fresh run. Its faster overload retry can succeed before the automation retry, which still runs later; a subscription-window retry can remain queued while Automations continues. Retry ownership needs resolution before merge.
Fixes #4166