-
Notifications
You must be signed in to change notification settings - Fork 0
Fix resource leak causing CI test hangs in AsyncReplayBuffer #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results244 tests 244 ✅ 1m 49s ⏱️ Results for commit d5bed2d. |
Code Coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 85.20% 87.18% +1.97%
==========================================
Files 152 164 +12
Lines 14002 15331 +1329
Branches 1923 2122 +199
==========================================
+ Hits 11931 13366 +1435
- Misses 1576 1965 +389
+ Partials 495 0 -495
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
CI tests hang indefinitely (1h+ timeouts) due to a waiter leak in
AsyncReplayBuffer<T>.TryGetAsync().Root Cause
When a cancellation token fires, the
TaskCompletionSourcewaiter is cancelled but never removed from_waiters. Orphaned waiters accumulate, breaking the producer logic which expects_waiters.Count == 1. Subsequent calls deadlock asshouldProduceis never set.Changes
src/PatternKit.Core/Behavioral/Iterator/AsyncFlow.cs
Cancellation tests now complete in ~100ms instead of hanging. All 1,762 tests pass.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.