[PM-39387] fix: Bump AccountRevisionDate when premium status changes#7966
[PM-39387] fix: Bump AccountRevisionDate when premium status changes#7966cyprain-okeke wants to merge 2 commits into
Conversation
Premium enable/disable only bumped RevisionDate, but clients gate their catch-up syncs on GET /accounts/revision-date, which returns AccountRevisionDate. When the one-time PremiumStatusChanged push was missed (e.g. an MV3 service worker suspension), every revision-gated sync concluded nothing had changed and the client kept stale premium state until a manual sync. Bumping AccountRevisionDate alongside RevisionDate lets the clients' existing revision-gated syncs detect the change. No SQL migration needed: User_Update already persists the AccountRevisionDate column.
…on-premium-status-change
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7966 +/- ##
==========================================
+ Coverage 61.49% 61.52% +0.02%
==========================================
Files 2253 2253
Lines 99103 99103
Branches 8960 8960
==========================================
+ Hits 60945 60969 +24
+ Misses 36007 35981 -26
- Partials 2151 2153 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This change bumps Code Review DetailsNo findings. The change is small, focused, and correctly scoped. |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39387
📔 Objective
Premium enable/disable only bumped
RevisionDate, but clients gate their catch-up syncs onGET /accounts/revision-date, which returnsAccountRevisionDate. When the one-timePremiumStatusChangedpush was missed (e.g. an MV3 service worker suspension), every revision-gated sync concluded nothing had changed and the client kept stale premium state until a manual sync.This change bumps
AccountRevisionDatealongsideRevisionDatewhen premium status changes (inUserServicepremium enable/disable paths and the StripeCheckoutSessionCompletedHandler), so the clients' existing revision-gated syncs detect the change.No SQL migration needed:
User_Updatealready persists theAccountRevisionDatecolumn.