AI Slop Code RIsk Monitor

diesel-rs/diesel

A safe, extensible ORM and Query Builder for Rust

6.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for diesel-rs/diesel, a Rust project with 14,203 GitHub stars. SynthScan examined 194,022 lines of code across 1312 source files, recording 1676 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 6.9 (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.

6.9
Adjusted Signal
6.9
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
14.2K
Stars
Rust
Language
194.0K
Lines of Code
1.3K
Files
1.7K
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 28.6/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 0.4/100 · LOW

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

Agent Over-Engineering Ratio 0.5/100 · LOW

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

PR Review Velocity Impact 35.3/100 · MEDIUM

Which changes need focused human review? 1676 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 0HIGH 0MEDIUM 8LOW 1668

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 1676 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 Block1652 hits · 1292 pts
SeverityFileLineSnippetContext
LOWdiesel_infer_query/src/query_source.rs1// This Source Code Form is subject to the terms of the Mozilla PublicCOMMENT
LOWdiesel_infer_query/src/query_source.rs21/// This information is relevant toCOMMENT
LOWdiesel_infer_query/src/query_source.rs41 /// source lookup mapCOMMENT
LOWdiesel_infer_query/src/error.rs1// This Source Code Form is subject to the terms of the Mozilla PublicCOMMENT
LOWdiesel_infer_query/src/views.rs21 pub fn field_count(&self) -> usize {COMMENT
LOW.config/nextest.toml21# statements straddling a second boundary;COMMENT
LOWguide_drafts/trait_derives.md221}COMMENT
LOWdiesel_compile_tests/tests/trybuild.rs21 // would leak into the blessed `.stderr` files. Map the actual targetCOMMENT
LOW…ests/tests/fail/array_expressions_must_be_same_type.rs21 //~^ ERROR: cannot select `f64` from `diesel::internal::table_macro::NoFromClause`COMMENT
LOW…ests/fail/right_side_of_left_join_requires_nullable.rs41 let join = users::table.left_outer_join(posts::table);COMMENT
LOW…ests/fail/right_side_of_left_join_requires_nullable.rs141 //~^ ERROR: type mismatch resolving `<table as AppearsInFromClause<table>>::Count == Never`COMMENT
LOW…select_for_update_cannot_be_mixed_with_some_clauses.rs21 //~| ERROR: the trait bound `SelectStatement<_, _, _>: QueryRelation` is not satisfiedCOMMENT
LOW…select_for_update_cannot_be_mixed_with_some_clauses.rs41 //~| ERROR: the trait bound `BoxedSelectStatement<'_, _, _, _>: QueryRelation` is not satisfiedCOMMENT
LOW…/cannot_mix_aggregate_and_non_aggregate_in_order_by.rs61 // aggregate ORDER BY without explicit SELECT (default non-aggregate select, no GROUP BY)COMMENT
LOW…indow_functions_expression_requires_window_function.rs21 users::table.select(lower(users::name).over());COMMENT
LOW…indow_functions_expression_requires_window_function.rs41 //~| ERROR: `diesel::sql_types::Text` is neither `diesel::sql_types::Range<_>` nor `diesel::sql_types::Multirange<_>COMMENT
LOW…ggregate_expression_requires_column_from_same_table.rs21 let source = users::table.select(sum(posts::id));COMMENT
LOWdiesel_compile_tests/tests/fail/selectable.rs201 .load(&mut conn)COMMENT
LOW…compile_tests/tests/fail/find_requires_correct_type.rs21 //~^ ERROR: the trait bound `str: Expression` is not satisfiedCOMMENT
LOW…s/fail/derive/belongs_to_missing_foreign_key_column.rs21#[derive(Associations)]COMMENT
LOW…sts/tests/fail/derive/identifiable_missing_pk_field.rs21}COMMENT
LOW…esel_compile_tests/tests/fail/derive/bad_belongs_to.rs61#[diesel(belongs_to(Bar = "bar_id"))]COMMENT
LOWdiesel_compile_tests/tests/fail/derive/empty_struct.rs21//~^ ERROR: this derive can only be used on non-unit structsCOMMENT
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs21#[diesel(postgres_type(name))]COMMENT
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs41#[diesel(postgres_type(name = "foo", array_oid = 3))]COMMENT
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs61#[diesel(postgres_type(schema = "foo"))]COMMENT
LOWdiesel_compile_tests/tests/fail/derive/bad_sql_type.rs1extern crate diesel;COMMENT
LOW…esel_compile_tests/tests/fail/derive/bad_mysql_type.rs21#[diesel(mysql_type(name))]COMMENT
LOWdiesel_compile_tests/tests/fail/derive/has_query.rs41 //~| ERROR: the trait bound `String: FromSqlRow<Integer, Sqlite>` is not satisfiedCOMMENT
LOWdiesel_compile_tests/tests/fail/derive/has_query.rs61//~^ ERROR: the trait bound `SelectStatement<_, _, _, _>: SelectDsl<_>` is not satisfiedCOMMENT
LOW…sel_compile_tests/tests/fail/derive/bad_sqlite_type.rs21#[diesel(sqlite_type(name))]COMMENT
LOW…ts/fail/derive/belongs_to_missing_foreign_key_field.rs1#[macro_use]COMMENT
LOW…sel_compile_tests/tests/fail/derive/bad_column_name.rs21#[derive(Queryable)]COMMENT
LOW…tests/fail/derive_deprecated/deprecated_column_name.rs21#[derive(AsChangeset)]COMMENT
LOW…sts/fail/derive_deprecated/deprecated_postgres_type.rs21#[postgres(type_name)]COMMENT
LOW…sts/fail/derive_deprecated/deprecated_postgres_type.rs41#[postgres(type_name = "foo", array_oid = "3")]COMMENT
LOW…ts/tests/fail/derive_deprecated/deprecated_sql_type.rs1#[macro_use]COMMENT
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs21COMMENT
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs61#[derive(Associations)]COMMENT
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs101#[belongs_to(Bar, what)]COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs1//! This module provides a container that allows to receive a dynamicallyCOMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs21//! #COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs41//! # }COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs61//! #COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs81//! # use diesel::mariadb::{Mariadb, MariadbType};COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs101//!COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs121//! name: "name".into(),COMMENT
LOWdiesel_dynamic_schema/src/dynamic_value.rs141//! }COMMENT
LOWdiesel_dynamic_schema/src/lib.rs1//! # Diesel dynamic schemaCOMMENT
LOWdiesel_dynamic_schema/src/lib.rs21//! for actually exist, or that the types you state are correct.COMMENT
LOWdiesel_dynamic_schema/src/lib.rs41//! #COMMENT
LOWdiesel_dynamic_schema/src/lib.rs61//! #COMMENT
LOWdiesel_dynamic_schema/src/lib.rs101pub use self::dynamic_select::DynamicSelectClause;COMMENT
LOWdiesel_dynamic_schema/src/table.rs61 /// let schema: Schema<&str> = "public".into();COMMENT
LOWdsl_auto_type/src/auto_type/local_variables_map.rs121 LetStatementInferredType {COMMENT
LOWdiesel/src/data_types.rs1//! Structs to represent the primitive equivalent of SQL types whereCOMMENT
LOWdiesel/src/util.rs21 // a dummy map impl that providesCOMMENT
LOWdiesel/src/reexport_ambiguities.rs1// This macro exists to workaroundCOMMENT
LOWdiesel/src/backend.rs21COMMENT
LOWdiesel/src/backend.rs41/// Implementing support for a new backend is a complex topic and depends on theCOMMENT
1592 more matches not shown…
Decorative Section Separators5 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUM.github/dependabot.yml3 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━COMMENT
MEDIUM.github/dependabot.yml5 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━COMMENT
MEDIUM⚡.github/dependabot.yml31 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━COMMENT
MEDIUM⚡.github/dependabot.yml33 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━COMMENT
MEDIUM⚡.github/dependabot.yml41 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━COMMENT
Fake / Example Data10 hits · 14 pts
SeverityFileLineSnippetContext
LOWdiesel/src/sqlite/connection/mod.rs584 /// sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Doe', 'jane.doe@eCOMMENT
LOWdiesel/src/sqlite/connection/mod.rs584 /// sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Doe', 'jane.doe@eCOMMENT
LOW⚡diesel/src/sqlite/connection/mod.rs1121 "John Doe".to_string(),CODE
LOW⚡diesel/src/sqlite/connection/mod.rs1126 "Jane Doe".to_string(),CODE
LOW⚡diesel/src/sqlite/connection/mod.rs1135 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane DoCODE
LOW⚡diesel/src/sqlite/connection/mod.rs1135 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane DoCODE
LOWdiesel/src/sqlite/connection/mod.rs1186 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane DoCODE
LOWdiesel/src/sqlite/connection/mod.rs1186 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane DoCODE
LOWdiesel/src/expression/mod.rs1048/// .select(selection(NameOrConst::Const("Jane Doe".into())))COMMENT
LOWdiesel/src/expression/mod.rs1050/// assert_eq!(String::from("Jane Doe"), with_name);COMMENT
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdiesel/src/connection/statement_cache/mod.rs411/// Essentially a customized version of [`Cow`]COMMENT
MEDIUMdiesel_derives/src/sql_function.rs1507/// Essentially the same as ArgCaptured, but only allowing ident patternsCOMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWdiesel/src/query_source/aliasing/macros.rs5/// Example usageCOMMENT
LOWdiesel/src/expression/operators.rs210/// ## Example usageCOMMENT
LOWdiesel_derives/src/lib.rs1313/// Example usageCOMMENT
LOWdiesel_derives/src/lib.rs1616/// Example usageCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/release.yml287 # Create a GitHub Release while uploading all files to itCOMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdiesel/src/mysql_like/connection/stmt/mod.rs183 // We're about to call `mysql_stmt_fetch` we need to check if our binds are still validCOMMENT
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippetContext
LOWexamples/sqlite/wasm/server.py5class RequestHandler(SimpleHTTPRequestHandler):CODE