fix(misc): upgrade path change for new better-auth version, billing issue for workflow block agent usage#4803
Conversation
…lling for workflow block agent usage
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Fixes execution billing for runs wrapped in synthetic Reviewed by Cursor Bugbot for commit e09b32a. Configure here. |
Greptile SummaryThis PR fixes two independent bugs: a production issue where
Confidence Score: 4/5Safe to merge — both fixes are narrowly scoped, well-commented, and backed by new regression tests. The billing fix in apps/sim/lib/billing/client/upgrade.ts — the new Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[handleUpgrade called] --> B[client.subscription.list]
B --> C{activePersonalSub found?}
C -- Yes --> D[currentSubscriptionRowId = sub.id\ncurrentStripeSubscriptionId = sub.stripeSubscriptionId]
C -- No --> E[both IDs = undefined]
D --> F{currentStripeSubscriptionId set?}
E --> F
F -- Yes --> G[finalParams includes\nsubscriptionId: stripeSubscriptionId]
F -- No --> H[finalParams omits subscriptionId\nnew subscription created]
G --> I[betterAuthSubscription.upgrade]
H --> I
I --> J{targetPlan === team\nAND currentSubscriptionRowId?}
J -- Yes --> K[Transfer subscription\nusing currentSubscriptionRowId]
J -- No --> L[Done]
K --> L
Reviews (1): Last reviewed commit: "fix(misc): upgrade path change for new b..." | Re-trigger Greptile |
Summary
Type of Change
Testing
N/A
Checklist