EnhancementQueueWorker retry never re-triggers: transient failures stall until app restart #137

Closed
opened 2026-08-14 06:06:05 +00:00 by Mark · 1 comment
Owner

EnhancementQueueWorker.doWork() always returns Result.success() (line 84; early return at line 57 when no pending jobs). A transient failure marks the job row FAILED_RETRYABLE with incremented attemptCount (up to MAX_ATTEMPTS=3), but WorkManager's retry/backoff never engages because the worker never returns Result.retry(). The only schedule() call is App.onCreate(), so a transiently-failed job stays PENDING until the app process is restarted.

Actual:

  1. Run worker, a cloud call fails transiently (network blip, 5xx).
  2. Job row updated to FAILED_RETRYABLE, attemptCount=1, stays PENDING.
  3. Worker returns Result.success() — WorkManager considers the work done; no backoff, no re-run.
  4. Nothing re-schedules the worker until the next app launch.

Expected: transient failures return Result.retry() (or re-enqueue the worker) so WorkManager's EXPONENTIAL backoff (already configured in EnhancementQueueScheduler) re-triggers processing without app restart; job advances to FAILED after MAX_ATTEMPTS.

Reproduction: inspect EnhancementQueueWorker.doWork() — every path returns Result.success(); no Result.retry() anywhere.

Filed from kanban card t_a946c33c (post-deploy probe of Mark/transcriber#133).

EnhancementQueueWorker.doWork() always returns Result.success() (line 84; early return at line 57 when no pending jobs). A transient failure marks the job row FAILED_RETRYABLE with incremented attemptCount (up to MAX_ATTEMPTS=3), but WorkManager's retry/backoff never engages because the worker never returns Result.retry(). The only schedule() call is App.onCreate(), so a transiently-failed job stays PENDING until the app process is restarted. Actual: 1. Run worker, a cloud call fails transiently (network blip, 5xx). 2. Job row updated to FAILED_RETRYABLE, attemptCount=1, stays PENDING. 3. Worker returns Result.success() — WorkManager considers the work done; no backoff, no re-run. 4. Nothing re-schedules the worker until the next app launch. Expected: transient failures return Result.retry() (or re-enqueue the worker) so WorkManager's EXPONENTIAL backoff (already configured in EnhancementQueueScheduler) re-triggers processing without app restart; job advances to FAILED after MAX_ATTEMPTS. Reproduction: inspect EnhancementQueueWorker.doWork() — every path returns Result.success(); no Result.retry() anywhere. Filed from kanban card t_a946c33c (post-deploy probe of Mark/transcriber#133).
Author
Owner

Closed: implementation already shipped on main as 0f9cec1 (see commit message). Verified locally: feature is in main.

Closed: implementation already shipped on `main` as `0f9cec1` (see commit message). Verified locally: feature is in `main`.
Mark closed this issue 2026-08-14 13:37:35 +00:00
Sign in to join this conversation.
No description provided.