Repository navigation
fix(sync): cap deterministic repeat failures and fix persistence loop - #19421
Merged
Merged
Conversation
…asons Failure-Class: new
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.
Summary
sync_invalid_audio) and persistence data-shape failures with the same boundedpersistence:<exception subtype>fingerprint. Unknown errors, assignment conflicts, contention, provider errors, mixed segment failures, and transient network failures cannot strike; an intervening unclassified failure resets the streak.reason_code=sync_repeat_failure_paused. Shipped mobile treats this as a per-WAL retryable failure and retains the file without starting an account-wide cooldown. No new job status is introduced.Incident evidence and limits
phase=persistence failure_class=OtherExceptionfailure. The current worker catches the exception and emits only the bounded class, with no traceback in Cloud Run logs, so the underlying subtype cannot be confirmed retrospectively. The cap will apply only if a future attempt supplies an approved identical subtype; bounded subtype logging now makes that distinction observable. Assignment conflicts and contention cannot strike.OpusError, then a whole-jobfailedwithreason_code=sync_invalid_audio. The current app retains these bytes and marks an upload-level 400uploadRejected, showing Delete rather than a retry action. A capped attempt therefore returns a failed 202 job; its generic reason keeps the WAL on the per-file retry path. First decode attempts retain their original terminal semantics.origin/main; the cap remains before sequencer registration and dispatch.Verification
BACKEND_UNIT_TEST_FILE_LIST=$PWD/.local/repeat-tests-list backend/test.shflutter test test/unit/sync_job_terminal_policy_test.dartbackend/scripts/typecheck.shOMI_PR_BODY_FILE=.local/pr-body-repeat-failure.md make preflightFailure-Class: new
Line-Count-Exception: backend/routers/sync.py | 2397 -> 2449 | The admission response and terminal cleanup preserve the route and fence boundaries after PR #19362 added the sequencer.
Line-Count-Exception: backend/utils/sync/pipeline.py | 2571 -> 2678 | Segment fingerprinting and terminal result propagation stay in the pipeline coordinator that owns STT and job finalization.