Skip to content

Serialize Apple recovery submissions per subscription - #1445

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-apple503-maple
Nov 4, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-apple503-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Apple transaction recovery submitted distinct transaction IDs in parallel, and only revisions of the same ID were serialized. Renewals of one subscription have different IDs, so they raced. Billing only commits the latest concurrent confirmation of a subscription, so the others came back as retryable 503s. If the latest one also failed, the whole batch failed.

StoreKitRecovery now submits transactions that share an originalTransactionId one at a time. A failed submission doesn't stop the next one, disposal stops anything still queued, and different subscriptions stay independent. Each submission is still bounded by the existing 30-second request timeout, so a stuck request can only delay its own subscription briefly.

Test change

submits newer revisions after an older failure... used an other transaction that inherited the same originalTransactionId, though it meant to be unrelated. It now has its own, matching a pending transaction does not block a different transaction ID.

Validation

  • Added tests for one-at-a-time submission across a failure, and for disposal with queued submissions.
  • The pre-commit Research gates passed: 1,108 tests, plus format, lint and typecheck.
  • just lane research-web, the only lane selected, passed.

Not exercised: the iOS app, a real StoreKit queue, or a linked billing backend. Already installed app versions keep the old behavior until they update.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Recovery submitted distinct transaction IDs in parallel. Billing commits
only the latest concurrent confirmation of a subscription, so renewals
sharing an original transaction could fail each other as retryable 503s.
Submit each subscription's transactions one at a time, while unrelated
subscriptions stay independent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Maple development preview: https://bae0d542.maple-ca8.pages.dev

Commit: 00f5acba29bc21bf5302471e512fa6c660edd057

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

@AnthonyRonning
AnthonyRonning marked this pull request as ready for review November 4, 2026 08:58
@AnthonyRonning
AnthonyRonning merged commit 2eb77c3 into master Nov 4, 2026
22 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-apple503-maple branch November 4, 2026 09:10

This branch was successfully deployed

1 active deployment
pages-pr-1445 — 00f5acba Deployed Nov 4, 2026 by github-actions[bot]
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