Repository navigation
fix(kilo-pass): prevent duplicate checkout sessions - #5533
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryCheckout reuse now requires matching tier, cadence, and KiloClaw hosting metadata, expires mismatched or URL-less sessions, and bounds Stripe scans with timeouts; no correctness issues found. Files Reviewed (5 files)
Previous Review Summary (commit 13b1857)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 13b1857)Status: No Issues Found | Recommendation: Merge Executive SummaryShared Kilo Pass checkout coordination serializes per-user session creation with an advisory lock, reuses open Stripe sessions, and rejects live subscriptions not yet persisted by webhooks; no correctness issues found. Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 245.6K · Output: 15.9K · Cached: 489.5K Review guidance: REVIEW.md from base branch |
|
Addressed the reported checkout coordination findings in
Kept the advisory-lock design intentionally: moving provider scans outside it would reopen the cross-instance race, while a durable checkout-intent model would add disproportionate schema and lifecycle complexity. |
Summary
Prevent concurrent Kilo Pass purchase requests from creating multiple Stripe Checkout Sessions and subscriptions.
Verification
Visual Changes
N/A
Reviewer Notes
Automated verification completed:
pnpm --filter web typecheckpnpm --filter web lintcreateCheckoutSessionandcreateKiloPassUpsellCheckout(24 passed)The first request to acquire checkout coordination wins. A competing request reuses that open Checkout Session, including its selected tier, cadence, and optional hosting intent.