Repository navigation
fix(api): a refresh cut off during a retry backoff no longer pauses automatic refresh (#5561) - #5745
Merged
Merged
Conversation
…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
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
on_task_wall_timeoutstill records the failure in the page's history, but skips the pause when the stage ends in.backoff.Tests
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_failednow passes a running-call stage and still expects a pause.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.