fix: stop manual projectId drift during account persistence#520
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Repository UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
WalkthroughThe changes modify the account merge and update logic across three files to prioritize existing disk-stored project identifiers over new incoming values. In persistAccountPool, updateFromAuth, and mergeAccountStorage, the precedence for projectId and managedProjectId is inverted so that existing values are preserved when present, rather than being overwritten by new OAuth-fetched or in-memory values. This affects how accounts with matching emails and rotated tokens reconcile their stored identifiers. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
OverviewThe PR correctly prioritizes existing (disk-loaded) Changes Summary
The code is well-documented with clear comments explaining the intent, and the nullish coalescing operator ( |
Greptile SummaryThis PR corrects the projectId preservation precedence across three merge/update paths. Previously, OAuth-fetched fallback values would overwrite manually configured
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 5ea8d23 |
Summary
projectIdandmanagedProjectIdvalues when merging account updates, so runtime/OAuth fallback values do not overwrite manual IDspersistAccountPoolandupdateFromAuthto keep project IDs stable across login, token refresh, and rotation savesnpm run build,npm test)Why
Manual project IDs in
antigravity-accounts.jsoncould be overwritten by auto-detected fallback values during normal runtime saves, causing permission errors for Gemini/Antigravity requests.