fix(llc): fix noise cancellation breaking on iOS after rejoin reconnection flow#1234
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)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPreserve the iOS native audio filter across WebRTC pipeline restarts and re-enable Dart-side audio processing after rejoin/migration; add extensive tests for start/stop, auto-on join, re-bind after reconnect, teardown, and bitrate-profile interactions; update changelog. ChangesiOS Audio Noise Cancellation Restoration
Estimated code review effort: Possibly related PRs:
Suggested reviewers:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Actionable comments posted: 0 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1234 +/- ##
========================================
+ Coverage 8.88% 9.01% +0.12%
========================================
Files 676 676
Lines 49577 49585 +8
========================================
+ Hits 4407 4469 +62
+ Misses 45170 45116 -54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/stream_video/test/src/call/call_audio_processing_test.dart`:
- Around line 660-668: The test uses fixed sleeps (Duration.zero,
Duration(milliseconds: 200)) around internetStatusController.add(...) and then
asserts verify(() => mockStreamVideo.setAudioProcessingEnabled(true)), which can
race with the retry backoff/jitter defined in retry_policy.dart; replace the
fixed waits with a polling/wait-until that asserts the mock call within a
generous timeout (e.g., repeatedly check verify(() =>
mockStreamVideo.setAudioProcessingEnabled(true)) or use a test helper that waits
until the condition is true) after triggering the rejoin path via
internetStatusController, so the test waits deterministically for
mockStreamVideo.setAudioProcessingEnabled to be invoked rather than relying on
fragile sleep durations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f15aced0-5a86-4e34-91b1-54b84faa0eaa
📒 Files selected for processing (1)
packages/stream_video/test/src/call/call_audio_processing_test.dart
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/stream_video/test/src/call/call_audio_processing_test.dart (1)
693-722: 💤 Low valueConsider slightly longer waits for negative assertions on slow CI.
Lines 717 and 744 use fixed 100ms waits before
verifyNeverto confirm the rebind does not occur. While acceptable for negative assertions, 100ms may be marginal on busy CI runners where the async reconnect chain could be delayed. A 200–500ms wait would reduce the (low) risk of a false-negative flake if the rebind logic is slow to evaluate the guard conditions.Minor robustness tweak
internetStatusController.add(InternetStatus.disconnected); await Future<void>.delayed(Duration.zero); internetStatusController.add(InternetStatus.connected); -await Future<void>.delayed(const Duration(milliseconds: 100)); +await Future<void>.delayed(const Duration(milliseconds: 200)); // Still no calls — processing was not active so nothing to rebind verifyNever(() => mockStreamVideo.setAudioProcessingEnabled(any()));Apply the same change at line 744.
Also applies to: 724-748
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/stream_video/test/src/call/call_audio_processing_test.dart` around lines 693 - 722, Increase the short fixed waits used before negative assertions to reduce flakiness on slow CI: in the test 'does not rebind when audio processing was not active' update the two delays that currently use const Duration(milliseconds: 100) (after adding InternetStatus.connected and the other occurrence noted in the comment) to a longer value (e.g., 300ms) so the async reconnect chain has more time to run before calling verifyNever(() => mockStreamVideo.setAudioProcessingEnabled(any())); keep the same test flow and targets (internetStatusController events and verifyNever against mockStreamVideo.setAudioProcessingEnabled).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/stream_video/test/src/call/call_audio_processing_test.dart`:
- Around line 46-65: The helper _waitForMockCall currently checks
verify(mockCall).called(greaterThanOrEqualTo(1)), causing false positives for
later expected invocations; change _waitForMockCall to accept an int
expectedCount parameter (default 1) and use
verify(mockCall).called(equals(expectedCount)) (or
greaterThanOrEqualTo(expectedCount) if you want leniency), then update all call
sites that expect multiple invocations (e.g., the rebind/rejoin verification) to
pass the correct expectedCount so the helper waits until the desired number of
calls have occurred.
---
Nitpick comments:
In `@packages/stream_video/test/src/call/call_audio_processing_test.dart`:
- Around line 693-722: Increase the short fixed waits used before negative
assertions to reduce flakiness on slow CI: in the test 'does not rebind when
audio processing was not active' update the two delays that currently use const
Duration(milliseconds: 100) (after adding InternetStatus.connected and the other
occurrence noted in the comment) to a longer value (e.g., 300ms) so the async
reconnect chain has more time to run before calling verifyNever(() =>
mockStreamVideo.setAudioProcessingEnabled(any())); keep the same test flow and
targets (internetStatusController events and verifyNever against
mockStreamVideo.setAudioProcessingEnabled).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: edd5a841-6b5b-4352-a8a0-974feb3a056e
📒 Files selected for processing (1)
packages/stream_video/test/src/call/call_audio_processing_test.dart
Summary by CodeRabbit
Bug Fixes
Tests