AI Slop Code RIsk Monitor

tokio-rs/tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

12.1 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for tokio-rs/tokio, a Rust project with 33,411 GitHub stars. SynthScan examined 198,182 lines of code across 867 source files, recording 2761 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 12.1 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

12.1
Adjusted Signal
12.1
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
33.4K
Stars
Rust
Language
198.2K
Lines of Code
867
Files
2.8K
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 43.8/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 2734 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.5/100 · LOW

Are imports declared and package/API names verified? 2 finding(s).

Agent Over-Engineering Ratio 2.3/100 · LOW

Are wrappers, guards, and repeated structures necessary? 25 finding(s).

PR Review Velocity Impact 51.4/100 · HIGH

Which changes need focused human review? 2761 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 1MEDIUM 37LOW 2721

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 2761 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block2690 hits · 2196 pts
SeverityFileLineSnippetContext
LOWtokio-stream/src/pending.rs21/// immediately empty but returns no values.COMMENT
LOWtokio-stream/src/empty.rs21/// to obtain a stream that is never ready.COMMENT
LOWtokio-stream/src/lib.rs21//! an asynchronous version of the standard library's `Iterator` trait.COMMENT
LOWtokio-stream/src/lib.rs41//! while let Some(value) = stream.next().await {COMMENT
LOWtokio-stream/src/lib.rs61//! The opposite conversion from an [`AsyncRead`] into a `Stream` is alsoCOMMENT
LOWtokio-stream/src/iter.rs21/// `Poll::Pending` to cooperate with the executor.COMMENT
LOWtokio-stream/src/stream_close.rs1use crate::Stream;COMMENT
LOWtokio-stream/src/stream_close.rs21 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs81///COMMENT
LOWtokio-stream/src/stream_ext.rs101/// ```COMMENT
LOWtokio-stream/src/stream_ext.rs121 /// crate.COMMENT
LOWtokio-stream/src/stream_ext.rs141 /// assert_eq!(stream.next().await, None);COMMENT
LOWtokio-stream/src/stream_ext.rs161 /// but returns a [`Result<Option<T>, E>`](Result) rather thanCOMMENT
LOWtokio-stream/src/stream_ext.rs181 /// assert_eq!(stream.try_next().await, Ok(Some(1)));COMMENT
LOWtokio-stream/src/stream_ext.rs201 /// wrapped version of it, similar to the existing `map` methods in theCOMMENT
LOWtokio-stream/src/stream_ext.rs221 F: FnMut(Self::Item) -> T,COMMENT
LOWtokio-stream/src/stream_ext.rs241 ///COMMENT
LOWtokio-stream/src/stream_ext.rs261 fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>COMMENT
LOWtokio-stream/src/stream_ext.rs281 /// returned by this method. To handle this, you can use `tokio::pin!` as inCOMMENT
LOWtokio-stream/src/stream_ext.rs301 /// assert_eq!(stream.next().await, Some(5));COMMENT
LOWtokio-stream/src/stream_ext.rs321 /// will break the fairness of the merging.COMMENT
LOWtokio-stream/src/stream_ext.rs341 /// # /*COMMENT
LOWtokio-stream/src/stream_ext.rs361 /// }) as Pin<Box<dyn Stream<Item = usize> + Send>>;COMMENT
LOWtokio-stream/src/stream_ext.rs381 ///COMMENT
LOWtokio-stream/src/stream_ext.rs401 Self: Sized,COMMENT
LOWtokio-stream/src/stream_ext.rs421 /// ```COMMENT
LOWtokio-stream/src/stream_ext.rs441 Filter::new(self, f)COMMENT
LOWtokio-stream/src/stream_ext.rs461 ///COMMENT
LOWtokio-stream/src/stream_ext.rs481COMMENT
LOWtokio-stream/src/stream_ext.rs501 ///COMMENT
LOWtokio-stream/src/stream_ext.rs521 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs541 /// }COMMENT
LOWtokio-stream/src/stream_ext.rs561 ///COMMENT
LOWtokio-stream/src/stream_ext.rs581 /// stream until the predicate `f` resolves to `false`. Once one elementCOMMENT
LOWtokio-stream/src/stream_ext.rs601 F: FnMut(&Self::Item) -> bool,COMMENT
LOWtokio-stream/src/stream_ext.rs621 /// assert_eq!(Some(10), stream.next().await);COMMENT
LOWtokio-stream/src/stream_ext.rs641 /// # ExamplesCOMMENT
LOWtokio-stream/src/stream_ext.rs661 }COMMENT
LOWtokio-stream/src/stream_ext.rs681 ///COMMENT
LOWtokio-stream/src/stream_ext.rs701 /// ```COMMENT
LOWtokio-stream/src/stream_ext.rs721 AllFuture::new(self, f)COMMENT
LOWtokio-stream/src/stream_ext.rs741 /// An empty stream returns `false`.COMMENT
LOWtokio-stream/src/stream_ext.rs761 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs781 }COMMENT
LOWtokio-stream/src/stream_ext.rs801 /// assert_eq!(stream.next().await, Some(1));COMMENT
LOWtokio-stream/src/stream_ext.rs821 /// Equivalent to:COMMENT
LOWtokio-stream/src/stream_ext.rs841 whereCOMMENT
LOWtokio-stream/src/stream_ext.rs861 ///COMMENT
LOWtokio-stream/src/stream_ext.rs881 /// # #[tokio::main(flavor = "current_thread")]COMMENT
LOWtokio-stream/src/stream_ext.rs901 /// let values: Result<Vec<i32>, &str> =COMMENT
LOWtokio-stream/src/stream_ext.rs921 T: FromStream<Self::Item>,COMMENT
LOWtokio-stream/src/stream_ext.rs941 /// This function consumes the stream passed into it and returns aCOMMENT
LOWtokio-stream/src/stream_ext.rs961 /// // When no items time out, we get the 3 elements in succession:COMMENT
LOWtokio-stream/src/stream_ext.rs981 /// assert_eq!(int_stream.try_next().await, Ok(None));COMMENT
LOWtokio-stream/src/stream_ext.rs1001 /// # }COMMENT
LOWtokio-stream/src/stream_ext.rs1021 /// becomes available before the deadline is reached, additional errors areCOMMENT
LOWtokio-stream/src/stream_ext.rs1041 /// use std::time::Duration;COMMENT
LOWtokio-stream/src/stream_ext.rs1061 /// // If we want to stop consuming the source stream the first time anCOMMENT
LOWtokio-stream/src/stream_ext.rs1081 /// tokio::pin!(timeout_stream);COMMENT
LOWtokio-stream/src/stream_ext.rs1101 ///COMMENT
2630 more matches not shown…
Decorative Section Separators25 hits · 93 pts
SeverityFileLineSnippetContext
MEDIUMtokio-stream/tests/stream_fused.rs51// ── map ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs67// ── filter ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs83// ── filter_map ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs99// ── skip ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs115// ── skip_while ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs131// ── take ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs156// ── take_while ───────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs174// ── map_while ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs194// ── then ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs213// ── chain ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs231// ── merge ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs272// ── timeout ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtokio-stream/tests/stream_fused.rs301// ── throttle ─────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs144 // ┌────────────────────────────────────────────────────────┐COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs147 // ┌─────┐ │ `decode_eof` returns After returning │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs148 // Read 0 bytes ├─────▼──┴┐ `Ok(None)` ┌────────┐ ◄───┐ `None` ┌───▼─────┐COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs149 // ┌────────────────►│ Pausing ├───────────────────────►│ Paused ├─┐ └───────────┤ Errored │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs150 // │ └─────────┘ └─┬──▲───┘ │ └───▲───▲─┘COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs152 // ┌──────┐ │ `decode` returns `Some` │ └─────┘ │ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs153 // │ │ │ ┌──────┐ │ Pending │ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs154 // │ ┌────▼──┴─┐ Read n>0 bytes ┌┴──────▼─┐ read n>0 bytes │ read │ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs155 // └─┤ Reading ├───────────────►│ Framing │◄────────────────────────┘ │ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs156 // └──┬─▲────┘ └─────┬──┬┘ │ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs158 // │ └───decode` returns `None`──┘ └───────────────────────────────────────────────────────┘ │COMMENT
MEDIUM⚡tokio-util/src/codec/framed_impl.rs160 // └────────────────────────────────────────────────────────────────────────────────────────────┘COMMENT
Redundant / Tautological Comments28 hits · 42 pts
SeverityFileLineSnippetContext
LOWtokio/src/net/udp.rs511 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs587 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs736 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs807 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1203 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1341 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1601 /// # Return valueCOMMENT
LOWtokio/src/net/udp.rs1746 /// # Return valueCOMMENT
LOWtokio/src/net/unix/stream.rs282 /// # Return valueCOMMENT
LOWtokio/src/net/unix/stream.rs598 /// # Return valueCOMMENT
LOWtokio/src/net/unix/pipe.rs585 /// # Return valueCOMMENT
LOWtokio/src/net/unix/pipe.rs1137 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs260 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs356 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1172 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1212 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1247 /// # Return valueCOMMENT
LOWtokio/src/net/unix/datagram/socket.rs1276 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs350 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs558 /// # Return valueCOMMENT
LOWtokio/src/net/tcp/stream.rs870 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs379 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs686 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs1175 /// # Return valueCOMMENT
LOWtokio/src/net/windows/named_pipe.rs1479 /// # Return valueCOMMENT
LOWtokio/src/io/async_write.rs95 /// # Return valueCOMMENT
LOWtokio/src/io/util/copy_bidirectional.rs72/// # Return valueCOMMENT
LOWtokio/src/sync/oneshot.rs793 /// # Return valueCOMMENT
AI Slop Vocabulary11 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMtokio-util/src/io/sync_bridge.rs16/// might not fully leverage the async capabilities of the system.COMMENT
MEDIUMtokio-util/src/io/sync_bridge.rs121/// blocking and inefficient code. Instead, you can utilize an async compression libraryCOMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs81/// An ZST to allow [`super::registration_queue`] to utilize the [`Entry::extra_pointers`]COMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs112/// An ZST to allow [`super::cancellation_queue`] to utilize the [`Entry::cancel_pointers`]COMMENT
MEDIUMtokio/src/runtime/time_alt/entry.rs143/// An ZST to allow [`super::WakeQueue`] to utilize the [`Entry::extra_pointers`]COMMENT
MEDIUMtokio/src/runtime/task/trace/tree.rs14 /// There should only be one root, but the code is robust to multiple roots.COMMENT
MEDIUMtokio/src/sync/semaphore.rs229/// work, but it doesn't matter which test runs first. We can leverage aCOMMENT
MEDIUMtokio/src/sync/mod.rs129//! given time. Properly setting this value is key in implementing robustCOMMENT
MEDIUMtokio/src/process/mod.rs662 /// a [`Child`] handle where possible, and instead utilize `child.wait().await`COMMENT
MEDIUMexamples/print_each_packet.rs89 // Essentially here we're executing a new task to run concurrently,COMMENT
MEDIUMexamples/echo-tcp.rs57 // Essentially here we're executing a new task to run concurrently,COMMENT
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALtokio/src/runtime/scheduler/multi_thread/worker.rs648 let task = self.worker.handle.shared.owned.assert_owner(task);CODE
CRITICALtokio/src/runtime/scheduler/multi_thread/worker.rs768 let task = self.worker.handle.shared.owned.assert_owner(task);CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHtokio/src/runtime/metrics/histogram/h2_histogram.rs251 // this by one to ensure we are at least as granular as requested.COMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMtokio-util/src/codec/length_delimited.rs366//! Here is a simple example, given a `FramedWrite` with the followingCOMMENT
LOWexamples/udp-client.rs24//! Don't forget to pass `EOF` to the standard input of the client!COMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtokio/src/runtime/dump.rs239 /// Example usage:COMMENT
LOWtokio/src/macros/cfg.rs8/// ## Example usage:COMMENT