- Add Cloudflare Queue for async server provisioning - Producer: callback-handler.ts sends to queue - Consumer: provision-consumer.ts processes orders - DLQ: provision-dlq.ts handles failed orders with refund - Security improvements (from code review): - Store password hash instead of plaintext (SHA-256) - Exclude root_password from logs - Add retryable flag to prevent duplicate instance creation - Atomic balance deduction with db.batch() - Race condition prevention with UPDATE...WHERE status='pending' - Auto-refund on DLQ processing - Validation improvements: - OS image whitelist validation - Session required fields validation - Queue handler refactoring Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.5 KiB
3.5 KiB