Repository Analysis

webrtc-rs/webrtc

Async-friendly WebRTC implementation in Rust

12.4 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,082 GitHub stars. SynthScan v2.0 examined 29,459 lines of code across 126 source files, recording 148 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 12.4 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).

12.4
Adjusted Score
12.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.1K
Stars
Rust
Language
29.5K
Lines of Code
126
Files
148
Pattern Hits
2026-07-14
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 105LOW 43

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 148 distinct pattern matches across 3 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 Separators104 hits · 318 pts
SeverityFileLineSnippetContext
MEDIUMtests/dedicated_reactor_data_channel.rs111 // ── Offerer on a dedicated reactor thread ──────────────────────────────────COMMENT
MEDIUMtests/dedicated_reactor_data_channel.rs156 // ── Answerer on a dedicated reactor thread ─────────────────────────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs176 // ──────────── Phase 1: wait for initial connection ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs289 // ──────────── Phase 2: exchange messages before ICE restart ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs426 // ──────────── Phase 3: ICE restart (initiated by WebRTC) ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs460 // ──────────── Phase 4: wait for reconnection ────────────COMMENT
MEDIUMtests/ice_restart_by_webrtc_interop.rs544 // ──────────── Phase 5: exchange messages after ICE restart ────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs18// ── Offerer handler ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs41// ── Answerer handler ───────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs93// ── Test entry point ───────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs113 // ── Channels ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs122 // ── Build offerer peer connection ──────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs176 // ── Build answerer peer connection ─────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs211 // ── Wait for both peers to connect ─────────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs222 // ── Wait for offerer DC to open, then send test message ───────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs230 // ── Wait for answerer to receive and echo ─────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs237 // ── Wait for offerer to receive echo ─────────────────────────────────────COMMENT
MEDIUMtests/offer_answer_webrtc2webrtc.rs244 // ── Assertions ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs20// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs62// ── Helper functions ──────────────────────────────────────────────────────────COMMENT
MEDIUMtests/renegotiation.rs92// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs175 // ──────────── Phase 1: wait for initial connection + DC open ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs282 // ──────────── Phase 2: exchange messages before ICE restart ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs356 // ──────────── Phase 3: ICE restart (initiated by RTC) ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs448 // ──────────── Phase 4: wait for reconnection ────────────COMMENT
MEDIUMtests/ice_restart_by_rtc_interop.rs532 // ──────────── Phase 5: exchange message after ICE restart ────────────COMMENT
MEDIUMtests/statistics.rs19// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/statistics.rs66// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/play_save_disk.rs32// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/play_save_disk.rs102// ── Streaming Helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMtests/play_save_disk.rs182// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/media_rejection.rs20// ── Event Handlers ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/media_rejection.rs62// ── Test Case ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/data-channels-simple/data-channels-simple.rs27// ── Shared state for HTTP handlers ─────────────────────────────────────────────COMMENT
MEDIUMexamples/data-channels-simple/data-channels-simple.rs38// ── WebRTC event handler ───────────────────────────────────────────────────────COMMENT
MEDIUMexamples/data-channels-simple/data-channels-simple.rs85// ── Entry point ────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/data-channels-simple/data-channels-simple.rs208// ── HTTP request handler ───────────────────────────────────────────────────────COMMENT
MEDIUMexamples/save-to-disk-h26x/save-to-disk-h26x.rs32// ── CLI ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/save-to-disk-h26x/save-to-disk-h26x.rs59// ── Event handler ─────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/save-to-disk-h26x/save-to-disk-h26x.rs187// ── Entry point ───────────────────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs32// ── CLI ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs50// ── Event handler ─────────────────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs152// ── Entry point ───────────────────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs190 // ── Media engine setup ───────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs220 // ── Output tracks (one per simulcast layer) ──────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs224 // ── Peer connection ──────────────────────────────────────────────────────COMMENT
MEDIUM…eiver_from_kind/simulcast_add_transceiver_from_kind.rs317 // ── Signalling ───────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs41// ── Shared state ──────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs54// ── Event handler ─────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs194// ── CLI ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs212// ── Entry point ───────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs253 // ── Media engine: VP8 only ────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs279 // ── Output track ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs297 // ── Shared state ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs315 // ── Peer connection ───────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs340 // ── Signaling ─────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs366 // ── Track swap timer ──────────────────────────────────────────────────────COMMENT
MEDIUMexamples/swap-tracks/swap-tracks.rs404 // ── Wait for ctrl-c or peer connection failure ────────────────────────────COMMENT
MEDIUMexamples/play-from-disk-h26x/play-from-disk-h26x.rs45// ── CLI ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/play-from-disk-h26x/play-from-disk-h26x.rs72// ── Event handler ─────────────────────────────────────────────────────────────COMMENT
44 more matches not shown…
Over-Commented Block43 hits · 43 pts
SeverityFileLineSnippetContext
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/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/dedicated_reactor_drop.rs1//! Regression test: dropping a dedicated-reactor peer connection *without*COMMENT
LOW.devcontainer/devcontainer.json21COMMENT
LOWexamples/play-from-disk-vpx/play-from-disk-vpx.rs41COMMENT
LOW…rom-disk-renegotiation/play-from-disk-renegotiation.rs261}COMMENT
LOWexamples/insertable-streams/insertable-streams.rs41#[derive(Parser)]COMMENT
LOWexamples/save-to-disk-vpx/save-to-disk-vpx.rs41 #[arg(short, long)]COMMENT
LOWexamples/ice-restart/ice-restart.rs1//! ICE restart example.COMMENT
LOWexamples/broadcast/broadcast.rs121// ── CLI ───────────────────────────────────────────────────────────────────────COMMENT
LOWsrc/lib.rs1#![doc(COMMENT
LOWsrc/lib.rs21//! * **`Runtime`**: A trait abstracting async operations (timers, spawning, sockets). This allows the crate toCOMMENT
LOWsrc/lib.rs41//! use std::sync::Arc;COMMENT
LOWsrc/lib.rs61//! ..Default::default()COMMENT
LOWsrc/rtp_transceiver/mod.rs1//! RTP Transceiver, Sender, and Receiver APICOMMENT
LOWsrc/rtp_transceiver/mod.rs21//!COMMENT
LOWsrc/media_stream/mod.rs1//! Media Stream TracksCOMMENT
LOWsrc/media_stream/track_local/mod.rs1//! Local Media Stream TracksCOMMENT
LOWsrc/media_stream/track_local/mod.rs21//! # async fn example() -> webrtc::error::Result<()> {COMMENT
LOWsrc/media_stream/track_local/mod.rs81/// pipeline and sent over the peer connection.COMMENT
LOWsrc/media_stream/track_remote/mod.rs1//! Remote Media Stream TracksCOMMENT
LOWsrc/media_stream/track_remote/mod.rs21//! while let Some(event) = track.poll().await {COMMENT
LOWsrc/runtime/mod.rs1//! Async Runtime AbstractionCOMMENT
LOWsrc/runtime/mod.rs81 JoinHandle {COMMENT
LOWsrc/runtime/mod.rs101 ///COMMENT
LOWsrc/runtime/mod.rs341pub use tokio::{COMMENT
LOWsrc/runtime/mod.rs381#[cfg(all(not(feature = "runtime-tokio"), feature = "runtime-smol"))]COMMENT
LOWsrc/data_channel/mod.rs1//! DataChannel APICOMMENT
LOWsrc/data_channel/mod.rs21//! # use std::sync::Arc;COMMENT
LOWsrc/data_channel/mod.rs61/// be generic over the interceptor type `I`.COMMENT
LOWsrc/data_channel/mod.rs101 /// Data channel has opened and is ready to send/receive data.COMMENT
LOWsrc/data_channel/mod.rs121 /// This event is fired when the channel is fully closed and no longer usable.COMMENT
LOWsrc/data_channel/mod.rs321 .data_channel(self.id)COMMENT
LOWsrc/data_channel/mod.rs361 /// # ExampleCOMMENT
LOWsrc/peer_connection/mod.rs1//! PeerConnection APICOMMENT
LOWsrc/peer_connection/mod.rs21//! PeerConnectionBuilder, PeerConnectionEventHandler,COMMENT
LOWsrc/peer_connection/mod.rs121/// use webrtc::peer_connection::{PeerConnectionEventHandler, RTCPeerConnectionIceEvent};COMMENT
LOWsrc/peer_connection/mod.rs261COMMENT
LOWsrc/peer_connection/mod.rs321/// # ExampleCOMMENT
LOWsrc/peer_connection/mod.rs441 /// Unified channel for all outgoing driver eventsCOMMENT
LOWsrc/peer_connection/mod.rs481{COMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/peer_connection/mod.rs17//! ## Creating a Peer ConnectionCOMMENT