Do not keep active live locations in the channel cache - #6769
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughChannel caching now clears ChangesChannel cache live-location handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Cached channels omit active live locations, and the tests cover the cache-backed selection paths. No actionable merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change removes a source of stale live-location state without changing sharing permissions or mutating the original channel data. The inspected update paths preserve live locations separately from the cache. No introduced or worsened security issue was identified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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. A rabbit checks the channel cache, Comment |
|



Goal
The in-memory channel cache kept a channel's active live locations. Loading a channel again in the same session reads the cache first, so after the sharer stopped, the stopped location came back and stayed until its original end time. #6750 already stopped restoring them from the database; this covers the cache.
Part of AND-1576
Implementation
Active live locations are still exposed as before:
ChannelState, the channel list andGlobalStateread them from the in-memory global state, which the server responses and events keep up to date. Only the local copy goes away.Testing
DatabaseChannelRepositoryCacheTestchecks cached channels come back without live locations and that an unchanged channel with live locations is not written again.🤖 Generated with Claude Code