Skip to content

SDK 0.3.2: redeem requestId for applyCode retries - #6

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/sdk-0-3-2-redeem-request-id-ef35
Oct 10, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/sdk-0-3-2-redeem-request-id-ef35

Conversation

@KennyYe

@KennyYe KennyYe commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Additive 0.3.2 fix: applyCode sends a persistent requestId on /redeemCode so the server can recognise retries after a timeout and avoid double-counting an install.

  • Keep the 0.3.1 applyCode(code) { result: Result<JSONObject> -> } signature unchanged (no new overloads).
  • One UUID requestId per normalised code (uppercase, strip non-alphanumerics, max 24); reuse until a definitive response (2xx or typed unknown/inactive/wrongEnvironment); persist with install-state storage.
  • Network/timeout keeps the pending id; a different code gets a new one.
  • SDK_VERSION / X-TapAppLink-SDK-Version bumped to 0.3.2.
  • CHANGELOG: Fixed: retrying applyCode after a timeout could count an install twice. 0.3.2 sends a request ID so the server recognises the retry. No code changes needed.

Do not merge or tag yet (release hold).

Test plan

  • ./gradlew test ktlintCheck lintRelease
  • CI green on this PR
  • Hold: no merge / no v0.3.2 tag until directed
Open in Web Open in Cursor 

Persist a UUID requestId per normalised code attempt and reuse it on
network/timeout retries (including after restart). Clear it on 2xx or
typed unknown/inactive/wrongEnvironment responses. Additive only;
applyCode Result signature unchanged.

Co-authored-by: Kenny Ye <KennyYe@users.noreply.github.com>
@KennyYe
KennyYe marked this pull request as ready for review October 10, 2026 01:36
@cursor
cursor Bot merged commit da83d00 into main Oct 10, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/sdk-0-3-2-redeem-request-id-ef35 branch October 10, 2026 01:36
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.

2 participants