Repository Analysis

webrtc-rs/webrtc

Async-friendly WebRTC implementation in Rust

14.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of webrtc-rs/webrtc, a Rust project with 5,131 GitHub stars. SynthScan v2.0 examined 45,613 lines of code across 171 source files, recording 321 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 14.2 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

14.2
Adjusted Score
14.2
Raw Score
100%
Time Factor
2026-08-29
Last Push
5.1K
Stars
Rust
Language
45.6K
Lines of Code
171
Files
321
Pattern Hits
2026-08-29
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 161LOW 160

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 321 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators159 hits · 483 pts
SeverityFileLineSnippetContext
MEDIUMtests/dedicated_reactor_data_channel.rs113 // ── Offerer on a dedicated reactor thread ──────────────────────────────────COMMENT
MEDIUMtests/dedicated_reactor_data_channel.rs158 // ── Answerer on a dedicated reactor thread ─────────────────────────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs180 // ──────────── Phase 1: wait for initial connection ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs293 // ──────────── Phase 2: exchange messages before ICE restart ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs430 // ──────────── Phase 3: ICE restart (initiated by WebRTC) ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs464 // ──────────── Phase 4: wait for reconnection ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs548 // ──────────── Phase 5: exchange messages after ICE restart ────────────COMMENT
MEDIUMtests/data_channel_send_blocking.rs123 // ── Sender (with an explicit small send-buffer limit ⇒ blocking send) ───────COMMENT
MEDIUMtests/data_channel_send_blocking.rs165 // ── Receiver ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/turn_credential_rotation.rs202 // ── 1. Initial allocation on credential A ─────────────────────────────COMMENT
MEDIUMtests/turn_credential_rotation.rs230 // ── 2. Rotate credentials and restart ICE ─────────────────────────────COMMENT
MEDIUMtests/turn_credential_rotation.rs297 // ── What actually happened on the wire ────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs21// ── Offerer handler ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs44// ── Answerer handler ───────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs96// ── Test entry point ───────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs115 // ── Channels ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs124 // ── Build offerer peer connection ──────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs178 // ── Build answerer peer connection ─────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs213 // ── Wait for both peers to connect ─────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs224 // ── Wait for offerer DC to open, then send test message ───────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs232 // ── Wait for answerer to receive and echo ─────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs239 // ── Wait for offerer to receive echo ─────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs246 // ── Assertions ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs23// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs65// ── Helper functions ──────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs95// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_send_backpressure.rs141 // ── Sender (with an explicit small send-buffer limit) ───────────────────────COMMENT
MEDIUMtests/data_channel_send_backpressure.rs189 // ── Receiver ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_send_backpressure.rs222 // ── Naive flood: push TOTAL_BYTES with NO bufferedAmount flow control ───────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs179 // ──────────── Phase 1: wait for initial connection + DC open ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs286 // ──────────── Phase 2: exchange messages before ICE restart ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs360 // ──────────── Phase 3: ICE restart (initiated by RTC) ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs452 // ──────────── Phase 4: wait for reconnection ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs536 // ──────────── Phase 5: exchange message after ICE restart ────────────COMMENT
MEDIUMtests/statistics.rs22// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/statistics.rs69// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_survives_send_failure.rs46// ── A runtime whose UDP sends can be made to fail on demand ────────────────────COMMENT
MEDIUMtests/data_channel_survives_send_failure.rs155// ── Handlers ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_survives_send_failure.rs202 // ── Sender, on the runtime whose sends we can break ───────────────────────COMMENT
MEDIUMtests/data_channel_survives_send_failure.rs249 // ── Receiver, on the unmodified runtime ───────────────────────────────────COMMENT
MEDIUMtests/data_channel_survives_send_failure.rs286 // ── Break every outgoing datagram, then send ──────────────────────────────COMMENT
MEDIUMtests/data_channel_send_unbounded.rs115 // ── Sender ────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_send_unbounded.rs159 // ── Receiver ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_send_unbounded.rs192 // ── Naive flood with the gate DISABLED (limit=0 ⇒ usize::MAX) ───────────────COMMENT
MEDIUMtests/play_save_disk.rs35// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/play_save_disk.rs105// ── Streaming Helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMtests/play_save_disk.rs185// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/media_rejection.rs23// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/media_rejection.rs65// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/flexfec03_encoder_decoder.rs83// ── Interceptors ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/flexfec03_encoder_decoder.rs255// ── Handlers ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/flexfec03_encoder_decoder.rs277// ── Fixtures ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/flexfec03_encoder_decoder.rs316// ── Test ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_close_wakes_send.rs162 // ── Receiver ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/data_channel_close_wakes_send.rs195 // ── Flood forever with the BLOCKING send() until it errors ──────────────────COMMENT
MEDIUMtests/crypto_provider_integration.rs50// ── Provider selection ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/crypto_provider_integration.rs114// ── Handlers ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/crypto_provider_integration.rs175// ── Helpers ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/crypto_provider_integration.rs268 // ── Offer / answer ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/crypto_provider_integration.rs296 // ── Media across the link (SRTP) ──────────────────────────────────────────COMMENT
99 more matches not shown…
Over-Commented Block158 hits · 158 pts
SeverityFileLineSnippetContext
LOWtests/data_channel_send_after_close.rs1//! Regression test for the send-cap **terminal-error-on-close** property across every sendCOMMENT
LOWtests/media_only_negotiation_no_sctp.rs1//! Integration test for media-only async WebRTC negotiation without SCTP.COMMENT
LOWtests/rtcp_processing_webrtc2webrtc.rs1//! Async webrtc integration test for RTCP processing.COMMENT
LOWtests/rtcp_processing_webrtc2webrtc.rs81///COMMENT
LOWtests/data_channel_slow_consumer.rs1//! A reliable, ordered data channel must deliver **every** message even when theCOMMENT
LOWtests/data_channel_slow_consumer.rs401COMMENT
LOWtests/data_channels_create_interop.rs1/// Integration test for data channels create interop between rtc and webrtcCOMMENT
LOWtests/simulcast_rtc_to_webrtc_interop.rs1/// Integration test for TRUE simulcast with RID (rtc → webrtc)COMMENT
LOWtests/remote_certificate_fingerprint.rs1//! Worked example: reading the peers' DTLS certificate fingerprints out of `get_stats`.COMMENT
LOWtests/data_channel_send_blocking.rs1//! Integration test for the **blocking** send back-pressure path: `DataChannel::send` with aCOMMENT
LOWtests/turn_credential_rotation.rs1//! Reproduction for issue #835 — ICE restart after TURN credential rotation must not 437.COMMENT
LOWtests/data_channel_send_backpressure.rs1//! Integration test for data-channel send back-pressure via the **non-blocking**COMMENT
LOWtests/data_channel_send_backpressure.rs21//! tiny limit vs a large flood this is deterministic, and it is the strongest teeth:COMMENT
LOWtests/bind_failures_skip_addresses.rs1//! An address that cannot be bound is skipped, not fatal — unless nothing binds at allCOMMENT
LOWtests/data_channel_stall_does_not_block_media.rs1//! A stalled data-channel consumer must not stop media on the same peer connection.COMMENT
LOWtests/data_channel_survives_send_failure.rs1//! Regression test for issue #776 — an unreliable data channel must survive failed sends.COMMENT
LOWtests/data_channel_send_unbounded.rs1//! Integration test for the send back-pressure **escape hatch**: building a connection withCOMMENT
LOWtests/transport_objects.rs1//! The W3C transport objects are reachable from the async API, and their identities behave.COMMENT
LOWtests/ice_restart_rebinds_sockets.rs1//! An ICE restart replaces the UDP transport when the application asks for it (webrtc#868).COMMENT
LOWtests/ice_restart_rebinds_sockets.rs501COMMENT
LOWtests/ice_restart_rebinds_sockets.rs661 );COMMENT
LOWtests/dedicated_reactor_drop.rs1//! Regression tests for the bounded shared reactor pool (issue #101).COMMENT
LOWtests/flexfec03_encoder_decoder.rs1//! FlexFEC-03 end to end: the encoder protects, the path loses, the decoder rebuilds.COMMENT
LOWtests/flexfec03_encoder_decoder.rs61const NUM_MEDIA_PACKETS: u32 = 10;COMMENT
LOWtests/wildcard_bind_expands_interfaces.rs1//! A wildcard bind address means "every local interface", not the wildcard socket (webrtc#874).COMMENT
LOWtests/data_channel_close_wakes_send.rs1//! Regression test for the blocking send back-pressure close/drop liveness hang.COMMENT
LOWtests/on_data_channel_only_for_remote.rs1//! `on_data_channel` must fire only for channels the **peer** opened.COMMENT
LOWtests/crypto_provider_integration.rs1//! End-to-end validation of crypto-provider selection through the public async API.COMMENT
LOWtests/custom_runtime_interop.rs1//! Two peer connections, two different runtimes, one process.COMMENT
LOWtests/common/mod.rs1//! Shared helpers for the integration tests.COMMENT
LOWtests/common/mod.rs21/// The one runtime instance shared by every helper in this module.COMMENT
LOW.devcontainer/devcontainer.json21COMMENT
LOWexamples/save-to-disk-h26x/save-to-disk-h26x.rs41#[command(version = "0.1.0")]COMMENT
LOWexamples/custom-runtime/my_runtime.rs1//! A third-party async runtime for `webrtc`, over `async-executor` + `async-io`.COMMENT
LOWexamples/custom-runtime/custom-runtime.rs1//! A third-party async runtime plugged into `webrtc`.COMMENT
LOWexamples/data-channels/data-channels.rs21#[derive(Parser)]COMMENT
LOWexamples/insertable-streams/insertable-streams.rs41const CIPHER_KEY: u8 = 0xAA;COMMENT
LOW…estimation-from-disk/bandwidth-estimation-from-disk.rs1//! bandwidth-estimation-from-disk: switch between three pre-encoded renditions as the estimate moves.COMMENT
LOW…estimation-from-disk/bandwidth-estimation-from-disk.rs101 debug: bool,COMMENT
LOW…estimation-from-disk/bandwidth-estimation-from-disk.rs421///COMMENT
LOWexamples/save-to-disk-vpx/save-to-disk-vpx.rs41#[command(author = "Rain Liu <yliu@webrtc.rs>")]COMMENT
LOWexamples/save-to-disk-fec/save-to-disk-fec.rs1//! save-to-disk-fec: receive a FlexFEC-03 protected stream, rebuild what the path lost, save it.COMMENT
LOWexamples/save-to-disk-fec/save-to-disk-fec.rs61use common::{block_on, runtime};COMMENT
LOWexamples/save-to-disk-fec/save-to-disk-fec.rs81struct Cli {COMMENT
LOWexamples/common/mod.rs1//! Shared runtime helpers for the examples.COMMENT
LOWexamples/common/mod.rs21COMMENT
LOWexamples/data-channels-create/data-channels-create.rs21#[derive(Parser)]COMMENT
LOWexamples/play-from-disk-fec/play-from-disk-fec.rs1//! play-from-disk-fec: send video with FlexFEC-03 repair, over a path that drops packets on purpose.COMMENT
LOWexamples/play-from-disk-fec/play-from-disk-fec.rs81/// The example drops more than that by default, so the browser will still see gaps. That is theCOMMENT
LOWexamples/play-from-disk-fec/play-from-disk-fec.rs101#[command(about = "An example of play-from-disk with FlexFEC-03 over a lossy path.")]COMMENT
LOW…ta-channels-stress-bench/data-channels-stress-bench.rs1//! Multi-pair data-channel stress bench — the reproducible A/B harness forCOMMENT
LOW…ta-channels-stress-bench/data-channels-stress-bench.rs21//! `outstanding_bytes()` and print it, verifying the send counter drains to ~0COMMENT
LOWexamples/rtcp-processing/rtcp-processing.rs61COMMENT
LOWexamples/rtcp-processing/rtcp-processing.rs141 fn unbind_remote_stream(&mut self, _info: &StreamInfo) {}COMMENT
LOWexamples/ice-restart/ice-restart.rs1//! ICE restart example.COMMENT
LOWexamples/data-channels-close/data-channels-close.rs21#[derive(Parser)]COMMENT
LOW…flow-control-multi/data-channels-flow-control-multi.rs1//! Multi-pair data-channel flow-control bench for a single-`poop` N-connection run.COMMENT
LOW.github/workflows/cargo.yml101 submodules: recursiveCOMMENT
LOWsrc/lib.rs1#![doc(COMMENT
LOWsrc/lib.rs21//! * **`Runtime`**: A trait abstracting async operations (timers, spawning, sockets). This allows the crate toCOMMENT
98 more matches not shown…
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtests/data_channel_send_unbounded.rs218 // byte. This is the robust delivery proof — unlike the app-level `received` counter below, itCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/peer_connection/mod.rs17//! ## Creating a Peer ConnectionCOMMENT
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/check-channel-overflow-policy.py31CODE
LOWscripts/check-crypto-boundary.py16CODE