fix: harden continuation resume guard - #215
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughContinuationResumeGuard's resume and resumeWithException methods are rewritten to use kotlinx.coroutines internal APIs (tryResume/tryResumeWithException with completeResume) instead of compareAndSet-guarded direct resume calls. A new unit test validates late/duplicate resume attempts after the continuation has already completed. ChangesContinuationResumeGuard resume rewrite
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors ContinuationResumeGuard to use Kotlin's InternalCoroutinesApi for resuming continuations, specifically utilizing tryResume and tryResumeWithException to safely handle atomic completion. Additionally, a new unit test file ContinuationResumeGuardTest.kt has been added to verify that late completions are ignored after a continuation is already resumed. No review comments were provided, and there is no further feedback.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
hyochan
left a comment
There was a problem hiding this comment.
Reviewed the Android continuation guard change. No blocking findings: using tryResume/completeResume makes late external completions a no-op, and the new regression test covers the already-completed continuation path. Remote Android CI is green.
Summary
Verification
Summary by CodeRabbit