Repository navigation
Fix account.me test broken by Stack billing removal merge race - #7803
austinywang wants to merge 1 commit into
Conversation
PR #7662 removed Stack product billing (and the PRO_PRODUCT_ID export) while PR #7757 added this test against pre-#7662 main; both were green pre-merge but their post-merge CI runs were cancelled by newer pushes, so main web-typecheck broke. Rework the test to the Stripe-backed model: id-less fake users resolve Free without a database, and the Pro path drives resolveProPlanStatus with an injected subscription query, asserting stripe billing management and the cmuxPlan metadata sync.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe account tests simplify user fixtures, add Free-account coverage, and directly test Stripe-backed ChangesPro plan status tests
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ 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 |
Greptile SummaryThis PR updates the account billing tests for the Stripe-backed plan model.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Fix account.me test after Stack billing ..." | Re-trigger Greptile |
Main CI is red:
web-typecheckfails on every completed run since 25b5fd8 with:Root cause: merge race
PRO_PRODUCT_IDexport and the Stack-product path inresolveProPlanStatus.web/tests/account-me-orpc.test.tswritten against pre-Remove legacy Stack billing entirely (checkout + recognition) #7662 main, faking a Stack product list and expectingbillingManagement: "external".Both PRs were green pre-merge against bases that lacked the other; the post-merge CI runs on main were cancelled by newer pushes (concurrency), so the first completed run to surface the break was 25b5fd8. Every CI run on main since then fails
web-typecheck, which cascades into thetests,linux-preflight, andci-statusgates.Fix
Rework the test to the post-#7662 Stripe-backed billing model, keeping the DB-free property:
{userId, email, planId, isPro, billingManagement: "none"}shape.resolveProPlanStatusdirectly with an injectedhasActiveStripeSubscription(the procedure no longer exposes an injection point), assertingbillingManagement: "stripe"and the read-timecmuxPlan: "pro"metadata sync.Verification
bun run typecheckinweb/: clean.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Test-only changes; no production billing or API behavior modified.
Overview
Repairs
web/tests/account-me-orpc.test.tsafter main dropped Stack product billing (PRO_PRODUCT_IDandbillingManagement: "external").The test no longer fakes Stack product lists. Free plan behavior is asserted via
accountMeProcedurewith id-less users that skip Stripe lookups and returnbillingManagement: "none". Pro is covered by callingresolveProPlanStatuswith an injectedhasActiveStripeSubscription, expectingbillingManagement: "stripe"and a Stack metadata synccmuxPlan: "pro". Auth rejection, OpenAPI, and checked-in spec parity tests are unchanged.Reviewed by Cursor Bugbot for commit 3f51fa1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes CI by updating the
account.metest to the Stripe-backed billing model after Stack product billing was removed. Restores green web typecheck and keeps tests DB-free.billingManagement: "none".resolveProPlanStatustest with injectedhasActiveStripeSubscription, assertingbillingManagement: "stripe"andcmuxPlan: "pro"metadata sync.Written for commit 3f51fa1. Summary will update on new commits.
Summary by CodeRabbit