Repository Analysis

loco-rs/loco

🚂 🦀 The one-person framework for Rust for side-projects and startups

7.4 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of loco-rs/loco, a Rust project with 9,103 GitHub stars. SynthScan v2.0 examined 82,467 lines of code across 509 source files, recording 451 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 7.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).

7.4
Adjusted Score
7.4
Raw Score
100%
Time Factor
2026-08-19
Last Push
9.1K
Stars
Rust
Language
82.5K
Lines of Code
509
Files
451
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

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 2HIGH 0MEDIUM 73LOW 376

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 451 distinct pattern matches across 7 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.

Over-Commented Block374 hits · 368 pts
SeverityFileLineSnippetContext
LOWdeny.toml1# cargo-deny — supply-chain policy for the dependency tree.COMMENT
LOWloco-new/tests/wizard/new.rs21COMMENT
LOWloco-new/tests/wizard/new.rs41// Serialized: every combo builds into one shared CARGO_TARGET_DIR (seeCOMMENT
LOWloco-new/tests/wizard/new.rs81 true,COMMENT
LOWloco-new/tests/wizard/new.rs141 env_map.insert("DB_IDLE_TIMEOUT".into(), "2000".into());COMMENT
LOWloco-new/tests/wizard/new.rs421COMMENT
LOWloco-new/tests/wizard/new.rs561 // .stderr_null()COMMENT
LOWloco-new/tests/templates/config.rs1//! Every generated config file must be usable by the app that receives it.COMMENT
LOWloco-new/base_template/src/models/users.rs281 /// Sets the email verification information for the user andCOMMENT
LOWloco-new/base_template/src/models/users.rs301 /// database.COMMENT
LOWloco-new/base_template/src/models/users.rs321 /// email.COMMENT
LOWloco-new/base_template/src/dtos/common.rs1use loco_rs::model::query::PageResponse;COMMENT
LOWloco-new/base_template/src/controllers/auth.rs161#[debug_handler]COMMENT
LOWloco-new/src/lib.rs21/// published 1.0.x, which renders the YAML-safe `<%= ... %>` config delimitersCOMMENT
LOWloco-new/src/lib.rs61 #[cfg_attr(unix, default)]COMMENT
LOWloco-new/src/wizard.rs81#[derive(COMMENT
LOWloco-new/src/generator/executer/mod.rs41 ///COMMENT
LOWloco-new/src/generator/executer/mod.rs61COMMENT
LOWwebsite/src/env.d.ts1/// <reference types="@astrojs/starlight/virtual" />COMMENT
LOWtests/controller/middlewares.rs81 handle.abort();COMMENT
LOWexamples/demo/config/test.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/demo/config/test.yaml61# Initializers ConfigurationCOMMENT
LOWexamples/demo/config/production.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/demo/config/production.yaml41COMMENT
LOWexamples/demo/config/production.yaml61 secure: trueCOMMENT
LOWexamples/demo/config/development.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/demo/config/development.yaml61 # Override the SMTP hello name (default is the machine's hostname)COMMENT
LOWexamples/demo/src/models/users.rs281 /// generates a unique reset password token, and updates it in theCOMMENT
LOWexamples/demo/src/models/users.rs301 /// This method sets the timestamp when the user successfully verifies theirCOMMENT
LOWexamples/demo/src/controllers/auth.rs161#[debug_handler]COMMENT
LOWexamples/reference_spa/config/test.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/reference_spa/config/test.yaml61 # password:COMMENT
LOWexamples/reference_spa/config/production.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/reference_spa/config/production.yaml61 port: <%= get_env(name="MAILER_PORT", default="587") %>COMMENT
LOWexamples/reference_spa/config/development.yaml1# Loco configuration file documentationCOMMENT
LOWexamples/reference_spa/config/development.yaml61 # user:COMMENT
LOWexamples/reference_spa/tests/models/posts.rs21 // query your model, e.g.:COMMENT
LOWexamples/reference_spa/src/models/users.rs281 /// generates a unique reset password token, and updates it in theCOMMENT
LOWexamples/reference_spa/src/models/users.rs301 /// This method sets the timestamp when the user successfully verifies theirCOMMENT
LOWexamples/reference_spa/src/dtos/common.rs1use loco_rs::model::query::PageResponse;COMMENT
LOWexamples/reference_spa/src/controllers/auth.rs161#[debug_handler]COMMENT
LOW.github/workflows/loco-rs-ci-sanity.yml1# To optimize CI runtime:COMMENT
LOW.github/workflows/docs.yml81 # had 36 errors: `tsconfig.json` listed `.astro` inCOMMENT
LOWxtask/src/docs_syntax.rs1//! Parse every fenced `rust` block in the docs tree and fail on the ones thatCOMMENT
LOWxtask/src/versions.rs21const CRATE_VERSION: (&str, &str) = ("Cargo.toml", r"(?m)^version.*$");COMMENT
LOWloco-gen/tests/db.rs1use duct::cmd;COMMENT
LOWloco-gen/tests/templates/idempotency.rs1//! Running a generator twice must not corrupt the tree.COMMENT
LOWloco-gen/tests/templates/idempotency.rs41}COMMENT
LOWloco-gen/tests/templates/migration.rs241 assert!(COMMENT
LOWloco-gen/tests/templates/scaffold.rs1use super::utils::{guess_file_by_time, APP_ROUTS, MIGRATION_SRC_LIB, ROUTES_TSX_FIXTURE};COMMENT
LOWloco-gen/tests/templates/model.rs181 .expect_err("Expected error when migration src doesn't exist");COMMENT
LOWloco-gen/tests/templates/anchors.rs1//! Every app tree that ships in this repository must stay generatable into.COMMENT
LOWloco-gen/src/lib.rs281#[cfg(feature = "with-db")]COMMENT
LOWloco-gen/src/column.rs1//! A single, compiler-checked source of truth for column type information.COMMENT
LOWloco-gen/src/column.rs121/// Grammar (orthogonal: suffixes are flags, not combinatorial rows):COMMENT
LOWloco-gen/src/column.rs141/// value list, an unsupported `array` inner type, or a unique/nullableCOMMENT
LOWloco-gen/src/column.rs161 } else {COMMENT
LOWloco-gen/src/column.rs341/// `int` maps to a 64-bit `BigInteger`/i64 (same as `big_int`): `SQLite` has noCOMMENT
LOWloco-gen/src/column.rs401 big_int,float,double,bool"COMMENT
LOWloco-gen/src/scaffold.rs141 "0".to_string()COMMENT
314 more matches not shown…
Modern AI Meta-Vocabulary61 hits · 185 pts
SeverityFileLineSnippetContext
MEDIUMloco-new/tests/wizard/new.rs52// full-stack SPA: db + clientside — the flagship `generate scaffold` pathCOMMENT
MEDIUMloco-new/tests/templates/config.rs185 // The development JWT secret is generated into the file at scaffold time.COMMENT
MEDIUMloco-new/base_template/frontend/src/routes.tsx6// scaffold:importsCOMMENT
MEDIUMloco-new/base_template/frontend/src/routes.tsx18 // scaffold:routesCOMMENT
MEDIUM…/src/content/docs/docs/explanation/coming-from-axum.md19| A hand-rolled `ApiContext` struct + `AddExtensionLayer`/`State` | `AppContext` (8 fields: `environment`, `db`, `queue_CODE
MEDIUM…ite/src/content/docs/docs/how-to/override-templates.md36# override every template under a folder (e.g. all the scaffold's frontend pages)COMMENT
MEDIUM…ite/src/content/docs/docs/how-to/override-templates.md61# edit .loco-templates/scaffold/api/controller.tCOMMENT
MEDIUMwebsite/src/content/docs/docs/how-to/paginate.md95## 5. The scaffold's typed envelopeCOMMENT
MEDIUMwebsite/src/content/docs/docs/how-to/build-a-spa.md98| `frontend/src/routes.tsx` | imports and routes, injected at the `// scaffold:imports` and `// scaffold:routes` anchorsCODE
MEDIUMwebsite/src/content/docs/docs/how-to/build-a-spa.md194[`examples/reference_spa`](https://github.com/loco-rs/loco/tree/master/examples/reference_spa) in the Loco repository isCODE
MEDIUMwebsite/src/content/docs/docs/how-to/use-generators.md12`cargo loco generate` (alias `g`) is compiled only in debug builds — `#[cfg(debug_assertions)]` gates the whole subcommaCODE
MEDIUMwebsite/src/content/docs/docs/tutorials/the-tour.md21## Models and controllers: a scaffold, and a plain model with a relationCOMMENT
MEDIUMwebsite/src/content/docs/docs/reference/generators.md8`cargo loco generate <kind>` (alias `cargo loco g <kind>`) scaffolds application code from templates baked into the `locCODE
MEDIUMwebsite/src/content/docs/docs/reference/generators.md30### Model, migration, scaffoldCOMMENT
MEDIUMwebsite/src/content/docs/docs/reference/generators.md47# scaffold (model + DTOs + controller; adds React hooks/pages if the app has a frontend/)COMMENT
MEDIUMwebsite/src/content/docs/docs/reference/cli.md172`enum ComponentArg`, `src/cli.rs:173-382` — only present in debug builds (`#[cfg(debug_assertions)]` on `Commands::GenerCODE
MEDIUMexamples/reference_spa/frontend/src/routes.tsx6// scaffold:importsCOMMENT
MEDIUMexamples/reference_spa/frontend/src/routes.tsx22 // scaffold:routesCOMMENT
MEDIUMexamples/reference_spa/tests/requests/posts.rs66/// scaffold's old hand-rolled arithmetic and the framework's `query::paginate`COMMENT
MEDIUMexamples/reference_spa/tests/requests/posts.rs68/// `total_pages` -- which the scaffold's own envelope did not even carry --COMMENT
MEDIUMloco-gen/tests/templates/controller.rs70/// the scaffold's `--no-auth`, and it has to reach both the handlers and theCOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs7/// Loco 1.0 ships a single scaffold flavor: DTO + controller + React-SPACOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs13// A flat inventory of every artifact one scaffold emits. Splitting it intoCOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs147 // no `tests/requests/<plural>.rs` is generated for the API scaffold: aCOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs153/// Adaptive scaffold, headless path: with `frontend: false` (a non-clientsideCOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs213/// One scaffold could never catch this. Two can.COMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs281/// `{target}_id` regardless produced a scaffold that referenced a column theCOMMENT
MEDIUMloco-gen/tests/templates/scaffold.rs339/// The scaffold is authenticated by default: every handler takes anCOMMENT
MEDIUMloco-gen/tests/templates/utils.rs49/// `// scaffold:imports` / `// scaffold:routes` anchor comments the ApiCOMMENT
MEDIUMloco-gen/tests/templates/utils.rs50/// scaffold's `frontend_list.t` injects into. The once-per-app baseCOMMENT
MEDIUMloco-gen/tests/templates/utils.rs57// scaffold:importsCOMMENT
MEDIUMloco-gen/tests/templates/utils.rs69 // scaffold:routesCOMMENT
MEDIUMloco-gen/tests/templates/anchors.rs4//! `inject-above` in the migrator, `// scaffold:imports` andCOMMENT
MEDIUMloco-gen/tests/templates/anchors.rs5//! `// scaffold:routes` in the SPA route table. An anchor that goes missingCOMMENT
MEDIUMloco-gen/tests/templates/anchors.rs13//! lost both scaffold anchors, so `loco g scaffold` inside the repository's ownCOMMENT
MEDIUMloco-gen/tests/templates/anchors.rs60 for anchor in ["// scaffold:imports", "// scaffold:routes"] {CODE
MEDIUMloco-gen/src/controller.rs12/// the body — so this is opt-in (`--auth`), the mirror of the scaffold'sCOMMENT
MEDIUMloco-gen/src/lib.rs106 /// Whether to include timestamps (`created_at``updated_at`at columns) in the scaffoldCOMMENT
MEDIUMloco-gen/src/lib.rs130 /// Unlike the scaffold, a bare controller is public by default — it hasCOMMENT
MEDIUMloco-gen/src/column.rs11//! migration/model/scaffold generators.COMMENT
MEDIUMloco-gen/src/column.rs76/// (HTML/HTMX) scaffold.COMMENT
MEDIUMloco-gen/src/column.rs303 // JSON column. SQLite would accept all three, but the scaffold keeps oneCOMMENT
MEDIUMloco-gen/src/column.rs345/// `SQLite` fails to compile. 64-bit keeps the scaffold portable acrossCOMMENT
MEDIUMloco-gen/src/column.rs407/// scaffold input: these are automatically generated by Loco (`created_at` /COMMENT
MEDIUMloco-gen/src/column.rs414/// Parse raw `(field_name, spec)` scaffold fields into `Column`s, skippingCOMMENT
MEDIUMloco-gen/src/column.rs1038 // portable scaffold must not emit a 32-bit `int`.COMMENT
MEDIUMloco-gen/src/scaffold.rs13/// Loco 1.0 ships a single scaffold flavor built straight fromCOMMENT
MEDIUMloco-gen/src/scaffold.rs37 // - scaffold is never a link tableCOMMENT
MEDIUMloco-gen/src/scaffold.rs157/// `frontend_*.t` templates (`loco-gen/src/templates/scaffold/api/`).COMMENT
MEDIUMloco-gen/src/scaffold.rs164 // Deriving `{target}_id` unconditionally made the scaffold reference aCOMMENT
MEDIUMloco-gen/src/scaffold.rs249/// Builds the full Tera context for the API scaffold's `dto.t`/`controller.t`COMMENT
MEDIUMloco-gen/src/scaffold.rs320 // `// scaffold:imports` / `// scaffold:routes` anchor comments (a 2cCOMMENT
MEDIUMloco-gen/src/scaffold.rs325 // them bare meant the second `generate scaffold` in an app injected aCOMMENT
MEDIUMloco-gen/src/model.rs200 // entity sea-orm generates → a non-compiling scaffold), so `int` wasCOMMENT
MEDIUMsrc/cli.rs272 /// Generates a CRUD scaffold, model and controllerCOMMENT
MEDIUMsrc/cli.rs283 /// Generate scaffold without timestamps (`created_at`, `updated_at` columns)COMMENT
MEDIUMsrc/cli.rs325 /// controller is public by default — the mirror of scaffold'sCOMMENT
MEDIUMsrc/cli.rs397/// Handle the scaffold/controller "kind" flags that 1.0's adaptive generatorsCOMMENT
MEDIUMsrc/cli.rs1242 // Regression for #1790: the 1.0 adaptive rebuild removed the scaffold/COMMENT
MEDIUMsrc/cli.rs1242 // Regression for #1790: the 1.0 adaptive rebuild removed the scaffold/COMMENT
1 more matches not shown…
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALsrc/cli.rs803 .unwrap_or_else(|| boot_result.app_context.config.server.binding.clone()),CODE
CRITICALsrc/cli.rs979 .unwrap_or_else(|| boot_result.app_context.config.server.binding.clone()),CODE
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMexamples/demo/config/test.yaml11 # Define the logging format. options: compact, pretty or jsonCOMMENT
MEDIUMexamples/demo/config/production.yaml16 # Define the logging format. options: compact, pretty or jsonCOMMENT
MEDIUMexamples/demo/config/development.yaml11 # Define the logging format. options: compact, pretty or jsonCOMMENT
MEDIUMexamples/reference_spa/config/test.yaml11 # Define the logging format. options: compact, pretty or jsonCOMMENT
MEDIUMexamples/reference_spa/config/production.yaml16 # Define the logging format. options: compact, pretty or jsonCOMMENT
MEDIUMexamples/reference_spa/config/development.yaml11 # Define the logging format. options: compact, pretty or jsonCOMMENT
AI Slop Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMloco-new/base_template/src/controllers/auth.rs180/// This flow enhances security by avoiding traditional passwords and providing a seamless login experience.COMMENT
MEDIUMexamples/demo/src/controllers/auth.rs180/// This flow enhances security by avoiding traditional passwords and providing a seamless login experience.COMMENT
MEDIUMexamples/reference_spa/src/controllers/auth.rs180/// This flow enhances security by avoiding traditional passwords and providing a seamless login experience.COMMENT
MEDIUM.github/workflows/loco-rs-ci-sanity.yml6# we run comprehensive tests to validate every generator commandCOMMENT
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/errors.rs53 // ─────────────────────────── Client-facing / API errors ───────────────────────────COMMENT
MEDIUMsrc/errors.rs88 // ─────────────────────────── Internal / infrastructure errors ─────────────────────COMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWwebsite/src/content/docs/docs/how-to/write-task.md102cargo loco task user:create email:user@example.com name:"John Doe" password:secretCODE
LOWsrc/bgworker/redis.rs1249 let args = serde_json::json!({"email": "user@example.com"});CODE