Skip to content

fix(llc): stop sending deprecated SendStats fields - #1420

Merged
renefloor merged 2 commits into
mainfrom
fix/remove-legacy-sfu-stats
Oct 8, 2026
Merged

renefloor merged 2 commits into
mainfrom
fix/remove-legacy-sfu-stats

Conversation

@renefloor

@renefloor renefloor commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Goal

Sunset the legacy (raw) stats in SendStats. Follow-up to GetStream/protocol#2116, which reserved the deprecated SendStatsRequest fields; mirrors GetStream/stream-video-js#2488.

🛠 Implementation details

  • Regenerated signal.pb.dart / signal.pbjson.dart from protocol main with the new melos run generate:protobuf script (packages/stream_video/generate-protobuf.sh), which builds the locked protoc_plugin version and needs protoc installed. The only diff is SendStatsRequest: subscriber_stats, publisher_stats, audio_devices, video_devices, subscriber_rtc_stats and publisher_rtc_stats are gone and their numbers reserved. models and events regenerate identically.
  • SfuStatsReporter no longer sends the raw publisher/subscriber stats or the input device lists, and drops the device-change subscription and stateManager dependency that only existed to fill them.
  • Raw stats are still collected: they feed the delta-compressed rtc_stats trace and the call diagnostics screen.

🧪 Testing

  • flutter test test/src/call/stats passes.
  • dart analyze clean on stream_video and stream_video_flutter.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • SFU statistics reports no longer include deprecated raw WebRTC statistics or audio and video device lists. Other reported statistics remain unchanged.
  • Chores

    • Added a command to regenerate SFU protocol models, with support for selecting a protocol version.

Regenerates signal.proto after GetStream/protocol#2116 and drops the raw
publisher/subscriber stats and input device lists from SendStatsRequest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@renefloor
renefloor requested a review from a team as a code owner October 6, 2026 15:07
@github-actions github-actions Bot added the v1 label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6aa89ddc-11d5-4147-903f-91e66005603a
📥 Commits

Reviewing files that changed from the base of the PR and between dfcaffb and 1af866b.

📒 Files selected for processing (8)
  • packages/stream_video/CHANGELOG.md
  • packages/stream_video/generate-protobuf.sh
  • packages/stream_video/lib/protobuf/video/sfu/signal_rpc/signal.pb.dart
  • packages/stream_video/lib/protobuf/video/sfu/signal_rpc/signal.pbjson.dart
  • packages/stream_video/lib/src/call/call.dart
  • packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart
  • packages/stream_video/test/src/call/stats/sfu_stats_reporter_test.dart
  • pubspec.yaml
💤 Files with no reviewable changes (3)
  • packages/stream_video/lib/src/call/call.dart
  • packages/stream_video/test/src/call/stats/sfu_stats_reporter_test.dart
  • packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The SFU stats request and reporter no longer include raw WebRTC stats or input-device details. The pull request also adds a script and Melos command to regenerate the checked-in protobuf models.

Changes

SFU stats payload

Layer / File(s) Summary
Update SFU stats request contract
packages/stream_video/lib/protobuf/video/sfu/signal_rpc/signal.pb.dart, packages/stream_video/lib/protobuf/video/sfu/signal_rpc/signal.pbjson.dart, packages/stream_video/generate-protobuf.sh, pubspec.yaml
SendStatsRequest removes the selected stats and device fields, and reserves their protobuf field numbers. The new script and Melos command regenerate protobuf models from a selected protocol ref.
Remove payload collection from reporter
packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart, packages/stream_video/lib/src/call/call.dart, packages/stream_video/test/src/call/stats/sfu_stats_reporter_test.dart, packages/stream_video/CHANGELOG.md
SfuStatsReporter no longer collects input-device details or sends raw publisher and subscriber stats. Its constructor and test setup no longer pass a state manager. The changelog records the payload removals.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: brazol

Merge Risk: ⚪ Minimal · up to 1af86

The stats payload change appears ready to merge after normal checks; no actionable issue remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: stopping deprecated fields from being sent in SendStats.
Description check ✅ Passed The description covers the goal, implementation details, and testing. The UI section and contributor and reviewer checklists are omitted, but they are not critical for this non-UI change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 13.79310% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.77%. Comparing base (dfcaffb) to head (1af866b).

Files with missing lines Patch % Lines
...o/lib/protobuf/video/sfu/signal_rpc/signal.pb.dart 13.79% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1420      +/-   ##
==========================================
- Coverage   15.83%   15.77%   -0.06%     
==========================================
  Files         690      690              
  Lines       51446    51357      -89     
==========================================
- Hits         8146     8103      -43     
+ Misses      43300    43254      -46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

SDK Size

title main branch diff status
android_stream_video 15.66 MB 15.66 MB 0 KB 🟢
android_stream_video_flutter 17.5 MB 17.5 MB 0 KB 🟢
ios_stream_video 16.09 MB 16.08 MB -16 KB 🚀
ios_stream_video_flutter 18.39 MB 18.39 MB 0 KB 🟢
pub_stream_video 0.69 MB 0.69 MB 0 KB 🟢
pub_stream_video_filters 0.02 MB 0.02 MB 0 KB 🟢
pub_stream_video_flutter 0.53 MB 0.53 MB 0 KB 🟢
pub_stream_video_noise_cancellation 0.05 MB 0.05 MB 0 KB 🟢
pub_stream_video_push_notification 0.34 MB 0.34 MB 0 KB 🟢
pub_stream_video_screen_sharing 0.01 MB 0.01 MB 0 KB 🟢

Measured on 1af866b.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Size Breakdown

What each SDK adds to an empty release app, per Dart package and native library. Dart sizes are uncompressed symbol sizes. Open the sdk-size-analysis artifacts of this run in the DevTools App Size tool to drill down further.

Measured on 1af866b.

android · stream_video: 15.55 MB (-4.3 KB)
Component Size Δ vs main
native:libjingle_peerconnection_so.so 11.96 MB 0
package:stream_video 1.8 MB -3.7 KB
dart:@unknown 282.1 KB -0.7 KB
classes.dex 256.5 KB 0
dart:_http 152.7 KB +0.0 KB
package:protobuf 145.6 KB -0.0 KB
native:libdartjni.so 121.7 KB 0
dart:io 99.4 KB +0.0 KB
dart:async 71.8 KB -0.0 KB
package:stream_webrtc_flutter 56.0 KB +0.1 KB
dart:core 50.8 KB +0.0 KB
dart:mixin_deduplication 49.4 KB -0.0 KB
package:rxdart 48.2 KB -0.0 KB
package:source_span 44.1 KB +0.0 KB
dart:typed_data 31.3 KB -0.0 KB
other (66) 423.7 KB +0.1 KB
android · stream_video_flutter: 17.37 MB (-4.7 KB)
Component Size Δ vs main
native:libjingle_peerconnection_so.so 11.96 MB 0
package:stream_video 1.84 MB -4.3 KB
package:flutter 775.2 KB +0.0 KB
classes.dex 446.9 KB 0
dart:@unknown 418.5 KB -0.4 KB
dart:_http 155.5 KB -0.0 KB
dart:mixin_deduplication 151.7 KB -0.0 KB
package:protobuf 146.7 KB -0.0 KB
package:stream_video_flutter 132.1 KB -0.0 KB
native:libdartjni.so 121.7 KB 0
dart:io 119.3 KB -0.0 KB
assets 81.5 KB 0
dart:async 75.4 KB +0.0 KB
dart:collection 63.1 KB +0.0 KB
dart:ui 61.9 KB -0.0 KB
other (88) 913.2 KB -0.1 KB
ios · stream_video: 16.06 MB (-4.5 KB)
Component Size Δ vs main
native:StreamWebRTC.framework 11.82 MB 0
package:stream_video 1.95 MB -3.9 KB
Runner 623.9 KB 0
dart:@unknown 279.5 KB -0.6 KB
dart:_http 164.8 KB +0.0 KB
native:objective_c.framework 164.2 KB 0
package:protobuf 155.8 KB -0.0 KB
dart:io 95.7 KB +0.0 KB
dart:async 78.7 KB -0.0 KB
package:stream_webrtc_flutter 63.4 KB -0.0 KB
package:rxdart 54.6 KB -0.0 KB
dart:mixin_deduplication 54.0 KB +0.0 KB
dart:core 52.2 KB +0.0 KB
package:source_span 46.9 KB 0
dart:@shared 44.2 KB -0.0 KB
other (66) 462.3 KB +0.0 KB
ios · stream_video_flutter: 18.34 MB (-5.3 KB)
Component Size Δ vs main
native:StreamWebRTC.framework 11.82 MB 0
package:stream_video 1.99 MB -4.5 KB
Runner 1.16 MB 0
package:flutter 886.9 KB -0.1 KB
dart:@unknown 420.6 KB -0.7 KB
dart:_http 167.7 KB -0.0 KB
native:objective_c.framework 164.2 KB 0
dart:mixin_deduplication 160.5 KB +0.0 KB
package:protobuf 157.0 KB -0.0 KB
package:stream_video_flutter 138.7 KB +0.0 KB
dart:io 117.1 KB +0.0 KB
Frameworks 84.2 KB 0
dart:async 82.9 KB +0.0 KB
dart:@shared 76.2 KB -0.1 KB
dart:ui 71.2 KB -0.0 KB
other (89) 914.7 KB -0.0 KB

@Brazol Brazol added the ready label Oct 7, 2026
@github-actions github-actions Bot added approved Approved by a reviewer and removed ready labels Oct 7, 2026
@renefloor
renefloor merged commit afa23f4 into main Oct 8, 2026
25 of 29 checks passed
@renefloor
renefloor deleted the fix/remove-legacy-sfu-stats branch October 8, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Approved by a reviewer v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants