Skip to content

fix(api): a refresh cut off during a retry backoff no longer pauses automatic refresh (#5561) - #5745

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/5561-wall-timeout-backoff-no-pause
Oct 19, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
fix/5561-wall-timeout-backoff-no-pause

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Closes #5561

Problem

When the worker's wall-clock limit cancels a knowledge-page refresh, the engine records the failure and always pauses automatic refresh. If the limit fired while the LLM call was waiting out a retry backoff (provider down: DNS failure, 5xx), the page stayed paused for days after the provider came back. #5399 already skips the pause for those same temporary errors when they surface inside the limit.

Fix

Tests

  • New test_refresh_cut_off_during_a_retry_backoff_does_not_pause: not paused, one failure in history, the scheduler queues it again. Fails on the old code.
  • test_refresh_cut_off_by_the_wall_timeout_counts_as_failed now passes a running-call stage and still expects a pause.
  • Worker notification test checks the stage is passed through.

No system-test story: the path needs a real wall-clock timeout during an LLM backoff, which the blackbox stubs can't drive in reasonable time; the mechanism is covered at the engine + worker level.

…utomatic refresh (#5561)

The worker's wall-clock ceiling cancels a mental-model refresh before its own
failure handling runs, so on_task_wall_timeout records the failure, and it
always paused automatic refresh. When the ceiling fired while the LLM call was
sleeping out a backoff after a failed attempt (stage ends in ".backoff"), the
time ran out waiting on a provider that was down, not on a prompt that can
never finish. That is the temporary failure #5394/#5399 already declines to
pause on; pages stayed paused for days after the provider came back.

- poller passes the stage current at the timeout to the on_wall_timeout hook
- on_task_wall_timeout records the failure in history without the pause when
  the stage ends in ".backoff"; a timeout during a running call still pauses
- llm_wrapper notes that the ".backoff" suffix is now read by the engine
- regression test for the backoff case; the existing timeout test now passes
  a running-call stage and still expects a pause

Closes #5561
@nicoloboschi
nicoloboschi merged commit 2e2066c into main Oct 19, 2026
233 of 234 checks passed
@nicoloboschi
nicoloboschi deleted the fix/5561-wall-timeout-backoff-no-pause branch October 19, 2026 09:38
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Knowledge pages: a refresh cancelled at the wall-clock limit during a provider backoff still pauses automatic refresh

1 participant