fix(#135): revoke entitlements immediately on plan downgrade#136
Conversation
|
@Nagajyothi-tammisetti is attempting to deploy a commit to the ayushh-sharmaa's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🎉 Welcome, @Nagajyothi-tammisetti! This is your first PR to GSF — amazing! Here's what happens next: 📋 Our 3-Stage Review Pipeline
✅ Checklist before we start
⏱️ Expected Timelines
📖 See CONTRIBUTING.md for full details. We appreciate your contribution! 💙 |
|
❌ PR Validation Failed The following required elements are missing:
Please edit your PR description to include them, then push a new commit or re-save the description. 📝 |
|
|
|
The following commit(s) are missing a
How to fix: # For the last commit:
git commit --amend --signoff
git push --force-with-lease
# For multiple commits (replace N with the count):
git rebase HEAD~1 --signoff
git push --force-with-leaseBy signing off, you certify that you have the right to submit this contribution under the project's license. See DCO. ✍️ |
…grade Signed-off-by: Nagajyothi-tammisetti <nagajyothitammisetti@gmail.com>
f49b4f4 to
856e918
Compare
|
❌ PR Validation Failed The following required elements are missing:
Please edit your PR description to include them, then push a new commit or re-save the description. 📝 |
|
|
|
❌ Program Mismatch — Your PR declares NSOC26 but the Please ensure the correct program label is on your PR, or update your PR description to match. A maintainer can also fix this. 🏷️ |
|
❌ Program Mismatch — Your PR declares NSOC26 but the Please ensure the correct program label is on your PR, or update your PR description to match. A maintainer can also fix this. 🏷️ |
|
ℹ️ No |
Program: NSoC'26
Description
Fixes the entitlement leak where downgraded users retained higher-tier
feature access until the next billing cycle boundary. The entitlement
engine now recalculates immediately on plan downgrade via an event-driven
approach with zero coupling between layers.
Changes
lib/plans.tslib/entitlements.tshasFeature,isDowngrade,getEntitlementsForPlanlib/subscriptions.tssubscription.downgradedwhenevernewTier < oldTierlib/entitlementSync.ts__tests__/entitlementDowngrade.test.tsChecklist
Closes #135