Skip to content

fix(android): v0.1.1 verification-pass polish (CancellationException + backoff clamp) - #362

Merged
badbread merged 1 commit into
mainfrom
fix/android-verify-polish
Jul 20, 2026
Merged

fix(android): v0.1.1 verification-pass polish (CancellationException + backoff clamp)#362
badbread merged 1 commit into
mainfrom
fix/android-verify-polish

Conversation

@badbread

Copy link
Copy Markdown
Owner

Follow-ups from the v0.1.1 Fable verification of the merged Android fixes.

  • CancellationException — the four scopedUrl() guards used plain runCatching, which swallows the CancellationException thrown when a seek / camera-switch cancels the token fetch mid-flight. So a cancelled seek still ran .onFailure (error flash / torn-down player) and the filmstrip path wrote a cancelled job's frames into the new camera's state. Switched to the repo's runCatchingCancellable (made internal), which re-throws CancellationException so cancelled work propagates cleanly while real failures still degrade gracefully.
  • backoff overflow — the exponential poll backoff 2000L shl (failStreak-1) overflowed to a negative/zero delay after ~54 consecutive failures (a request burst). Clamped the shift exponent at 4 (still reaches the 30 s ceiling). Applied to both the HA-states and motion polls.

🤖 Generated with Claude Code

… HA/motion poll backoff

From the v0.1.1 Fable verification of the Android fixes:
- The four scopedUrl() guards used plain runCatching, which swallows the
  CancellationException thrown when a seek/camera-switch cancels the token
  fetch mid-flight — so a cancelled seek still ran .onFailure (error flash /
  torn-down player) and the filmstrip path wrote a cancelled job's frames into
  the new camera's state. Switch to the repo's runCatchingCancellable (made
  internal) which re-throws CancellationException so cancelled work propagates
  cleanly while real failures still degrade gracefully.
- The exponential poll backoff (2000L shl (failStreak-1)) overflowed to a
  negative/zero delay after ~54 consecutive failures, producing a request burst.
  Clamp the shift exponent at 4 (still reaches the 30s ceiling).

Signed-off-by: badbread <badbread@users.noreply.github.com>
@badbread
badbread merged commit 59a9970 into main Jul 20, 2026
6 checks passed
@badbread
badbread deleted the fix/android-verify-polish branch July 20, 2026 23:07
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.

1 participant