Retry transient episode errors during YouTube sync - #24
Merged
Merged
Conversation
meoyawn
force-pushed
the
codex/retry-sync-network-errors
branch
from
September 30, 2026 21:01
6d0ab3c to
97f517c
Compare
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.
Transient DNS, connection, timeout, and interrupted HTTP body errors now retry the individual episode up to four times after its initial attempt. The sync engine owns exactly two episode error categories:
RetryableandSkip. Non-retryable errors and exhausted retries skip the episode for this run, retaining its reason under Not imported while successful siblings continue.Retries reuse the existing upload journal, operation identity, prepared media, completed ranges, and uploaded parts. Stop interrupts the retry wait and leaves unfinished work queued; playlist, inventory, and durable outcome errors still stop the whole run. The embedded JavaScript fetch bridge preserves generic error metadata, while classification stays in sync-engine.
Parent repository pin, fixtures, and integrated coverage: https://github.com/listenbox/listenbox2/pull/105
Validation: the three transport regressions fail on the parent baseline and pass with this change, each under one second. They prove DNS, embedded JavaScript transport, and interrupted completion-body errors enter the retry state; Stop leaves work queued; explicit process restart preserves prepared uploads and reconciles publication without duplicates. Existing integrated tests cover skipped reasons, sibling publication, partial upload resumption, and source-scan deletion safeguards. Client and API Moon lints passed; autoreview reported no blocking findings at its default P0 scope.
Applied test-audit: removed two automatic retry-loop scenarios and the accelerated clock. Tests stop after one failed attempt and explicitly restart, following repository testing policy. Audit changes removed 53 net test lines and changed no production code.
Full verification: root
moon cipassed on the final rebased commits: 49 actions completed (35 cached) in 1m 33s, including API and dashboard integrated suites.