Skip to content

Add redeem requestId for applyCode retries (0.3.2) - #4

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

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

Conversation

@KennyYe

@KennyYe KennyYe commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

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

Changes

  • Generate one requestId per normalised code attempt (uppercase, strip non-alphanumerics, max 24 chars)
  • Reuse it on network/timeout retries and after restart via persisted install state (AsyncStorage, with in-memory fallback)
  • Clear it on definitive responses: any 2xx, or typed unknownCode / inactiveCode / wrongEnvironment
  • A different code gets a new requestId
  • Bump SDK_VERSION / X-TapAppLink-SDK-Version to 0.3.2
  • No public signature changes

Test plan

  • Retry after timeout reuses the same requestId
  • Restart with a pending attempt reuses it
  • New code or definitive response clears it
  • CI green

Do not merge or tag yet — wait until the server side is in prod.

Open in Web Open in Cursor 

Send a UUID requestId on /redeemCode, reuse it across network
timeouts and restarts for the same normalised code, and clear it
on definitive success or typed redeem errors.

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 53f0323 into main Oct 10, 2026
2 checks passed
@cursor
cursor Bot deleted the cursor/sdk-0-3-2-redeem-request-id-e003 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