Skip to content

feat: prepare premium subscriptions and casual hosting for coordinated launch - #67

Draft
NicholasBottone wants to merge 28 commits into
mainfrom
nbottone/premium-launch-ready
Draft

NicholasBottone wants to merge 28 commits into
mainfrom
nbottone/premium-launch-ready

Conversation

@NicholasBottone

@NicholasBottone NicholasBottone commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Adds premium casual hosting shared by the Django website and ranked bot. Django validates entitlements and reserves credits before launch, persists one usage entry on stop, and holds credits until Polar's dedicated meter reflects consumption. Lifecycle callbacks preserve terminal states across retries/out-of-order events and avoid SQLite writer races. Signed SDK events use wire aliases, checkout-return credentials are redacted, and positive sub-second ready sessions receive the five-minute minimum while never-ready sessions remain uncharged.

Validation: 47 website tests pass locally and on Linux, including real Django/Fastify contracts, concurrent SQLite regressions, and both sub-second/never-ready billing cases. Real sandbox acceptance covers checkout, usage debit/outage retry, cancellation/revocation, fixed-price upgrade/scheduled downgrade, standalone renewal without rollover, failed renewal/past-due launch denial, actual Discord role removal, and automatic payment/access/role recovery. A real patched 0.637-second session charged five credits once, with provider and website balances both 1,495 after a duplicate stop.

A fresh October 30 production SQLite snapshot migrated successfully on a disposable copy: all modeled columns present, zero foreign-key violations, and existing data preserved exactly across 22 application tables. Production was opened read-only and was not migrated.

Coordinated with xRCRankedBot #85 and xRCServerOrchestrator #18. Keep draft and unmerged: website main pushes deploy automatically. Remaining acceptance requires real-client joins/player-chat-score-OPR checks and a complete ranked queue-to-ELO series with inactivity/restart/resource cleanup and actual-player IP scoping. Production preparation also requires selecting/validating the game host, switching the Namecheap app from Python 3.9 to its available 3.12 runtime at authorized cutover, configuring fixed $5/$12 plans and production Polar IDs/secrets, and installing recurring workers. Polar's observed fifteen-minute recurring-order delay temporarily leaves zero credits before payment/grant processing.

See current acceptance evidence, ordered remaining tests, and the release checklist. No merge or production deployment is authorized.

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