Skip to content

fix(streaming): keep background checks from starving playback - #1065

Merged
javi11 merged 1 commit into
mainfrom
fix/playback-background-contention
Nov 12, 2026
Merged

javi11 merged 1 commit into
mainfrom
fix/playback-background-contention

Conversation

@javi11

@javi11 javi11 commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Health STAT sweeps and priority-lane import hedges could compete with active playback, producing transient failures even when articles were available. Inconclusive import checks also required manual retries.

This change runs health STATs on the background lane and waits for playback to stop before submitting each new chunk, including immediate post-import checks. Import hedges stay on the normal lane with bounded concurrency. Inconclusive fast-fail checks retry with exponential backoff up to the item's configured retry limit.

Explicit cancellation stops automatic retries and persists the cancelled status without fallback or ARR failure handling. Service shutdown leaves interrupted imports available for recovery on restart.

Regression tests reproduce the previous lane selection and verify health pause/resume, bounded retries, cancellation during backoff, and shutdown recovery. The full Go test suite and focused race-detector tests pass.

Fixes #1062.

@javi11
javi11 marked this pull request as ready for review November 12, 2026 07:57
@javi11
javi11 merged commit 90bc09a into main Nov 12, 2026
2 checks passed
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.

Background work (health sweeps, import probes) starves active playback – streams abort although articles exist

1 participant