Promote test → main: free-tier card gate + instant backfill drain (chat#1796)#672
Conversation
…ckfill drain (#671) Two chat#1796 refinements on the historical (Songstats) path: 1. Free-tier card-on-file link. The gate was issuing the paid subscription checkout ($99/mo after a 30-day trial). New createCardOnFileSession uses Stripe Checkout `mode: "setup"` — collects a card for $0, no subscription, no Stripe product. The account then pays only for metered usage via credits. 2. Instant drain. After enqueuing a historical job, fire-and-forget start(songstatsBackfillWorkflow) so the backfill begins immediately instead of waiting up to 24h for the cron. Safe by reuse: the workflow's budget gate (limit − reserve − rolling-30d ledger) caps it to the Songstats quota and SKIP LOCKED prevents double-claiming with the daily cron, which stays as the backstop. Only kicks when something was actually enqueued. 26 new/updated unit tests; research+stripe+workflows suite 453 green; tsc/lint/format clean.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a new ChangesSongstats Measurement Job Improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Promote #671 from
testtomain(prod).mode:"setup"($0, no subscription) checkout instead of the $99/mo subscription.historicaljob kickssongstatsBackfillWorkflowimmediately (budget-gated, SKIP LOCKED; cron stays backstop). Verified on preview: enqueue →donein ~10s.After this lands, a fresh prod agent key on a
historicaljob returns the new$0setup checkout link.Summary by cubic
Switches the Songstats gate to a free-tier card-on-file checkout and starts historical backfill immediately after enqueue to reduce wait time.
createCardOnFileSessionusing Stripe Checkoutmode: "setup"($0, no subscription). Used when no customer or no default payment method.historicaljob, callstartfromworkflow/apito runsongstatsBackfillWorkflowright away. Budget-gated andSKIP LOCKED; only triggers when items were enqueued.Written for commit f99277e. Summary will update on new commits.
Summary by CodeRabbit
Release Notes