Skip to content

fix(api): recover initialization after prolonged network failures - #958

Merged
swolfand merged 1 commit into
mainfrom
sam/issue-853-initialization-recovery
Sep 18, 2026
Merged

swolfand merged 1 commit into
mainfrom
sam/issue-853-initialization-recovery

Conversation

@swolfand

@swolfand swolfand commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Keep initialization retrying with backoff capped at one minute so offline cold starts can recover without a connectivity callback. Retry refresh timeouts and cancel superseded retries.

Fixes #853.

What to focus on

Retry cancellation after recovery, reset, and configuration changes.

Screenshots / video

Not applicable (API-only change).

Summary by CodeRabbit

  • Bug Fixes
    • Initialization now retries automatically during extended connectivity issues, using exponential backoff capped at one minute.
    • Restored connectivity triggers an immediate retry.
    • Manual reinitialization starts an immediate retry and can replace pending retry attempts.
    • Retry operations are cancelled appropriately when resetting or switching configurations.

Keep API initialization retries running with capped exponential backoff so offline cold starts can recover without a connectivity callback. Cancel superseded retries and retry SDK refresh timeouts.
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 5bf59496-ad3a-4a0c-99d1-d9b2a25b2a01

📥 Commits

Reviewing files that changed from the base of the PR and between f9f13f1 and 8fbc0f1.

📒 Files selected for processing (3)
  • source/api/src/main/kotlin/com/clerk/api/Clerk.kt
  • source/api/src/main/kotlin/com/clerk/api/configuration/ConfigurationManager.kt
  • source/api/src/test/java/com/clerk/api/configuration/ConfigurationManagerInitializationRetryTest.kt
 _________________________________________________________________________________________________________
< A good programmer is someone who always looks both ways before crossing a one-way street. - Doug Linder >
 ---------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@swolfand
swolfand merged commit ba631fb into main Sep 18, 2026
8 of 9 checks passed
@swolfand
swolfand deleted the sam/issue-853-initialization-recovery branch September 18, 2026 19:16
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.

Android: initialization permanently abandoned after 3 network failures, with no recovery when connectivity returns

1 participant