Repository Analysis

rust-lang/miri

An interpreter for Rust's mid-level intermediate representation

8.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of rust-lang/miri, a Rust project with 6,411 GitHub stars. SynthScan v2.0 examined 128,445 lines of code across 1407 source files, recording 506 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 8.9 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).

8.9
Adjusted Score
8.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.4K
Stars
Rust
Language
128.4K
Lines of Code
1.4K
Files
506
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

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 1HIGH 0MEDIUM 181LOW 324

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 506 distinct pattern matches across 10 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 Separators174 hits · 778 pts
SeverityFileLineSnippetContext
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs21 // ┌──────────────┐COMMENT
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs25 // └──────────────┘ │ │COMMENT
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs29 // ┌────────────┐ ┌────────────┐COMMENT
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs33 // └──────┬─────┘ └────────────┘COMMENT
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs37 // ┌────────────┐COMMENT
MEDIUM…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs41 // └────────────┘COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs19 // ┌──────────────┐COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs23 // └──────────────┘ │COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs27 // ┌────────────┐COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs29 // │ reb(Res) ├───────────┐COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs31 // └──────┬─────┘ │COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs35 // ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…rows/wildcard/subtree_internal_relatedness_wildcard.rs39 // └────────────┘ └───────────┘COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_disable.rs15 // ┌────────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_disable.rs17 // │ ptr_base ├───────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_disable.rs19 // └──────┬─────┘ │COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_disable.rs23 // ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_disable.rs27 // └────────────┘ └───────────┘COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs19 // ┌────────────┐COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs23 // └──────┬─────┘COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs27 // ┌────────────┐COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs31 // └──────┬─────┘COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs35 // ┌────────────┐COMMENT
MEDIUM…_borrows/wildcard/multi_exposed_child_unique_writer.rs39 // └────────────┘COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs19 // ┌────────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs21 // │ ptr_base ├──────────────┬───────────────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs23 // └──────┬─────┘ │ │COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs27 // ┌────────────┐ ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs31 // └────────────┘ └────────────┘ └───────────┘COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_disable.rs19 // ┌────────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_disable.rs21 // │ ptr_base ├──────────────┬───────────────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_disable.rs23 // └──────┬─────┘ │ │COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_disable.rs27 // ┌────────────┐ ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…ree_borrows/wildcard/multi_exposed_siblings_disable.rs31 // └────────────┘ └────────────┘ └───────────┘COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs15 // ┌────────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs17 // │ ptr_base ├───────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs19 // └──────┬─────┘ │COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs23 // ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs27 // └────────────┘ └───────────┘COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs18 // ┌──────────────┐COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs22 // └──────────────┘ │COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs26 // ┌────────────┐COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs28 // │ reb(Res) ├───────────┐COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs30 // └──────┬─────┘ │COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs34 // ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…/tree_borrows/wildcard/subtree_internal_relatedness.rs38 // └────────────┘ └───────────┘COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs37 // ┌───────────┐COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs40 // └─────┬─────┘ │COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs44 // ┌───────────┐ ┌───────────┐COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs47 // └─────┬─────┘ └─────┬─────┘COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs51 // ┌───────────┐ ┌───────────┐COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs54 // └─────┬─────┘ └───────────┘COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs58 // ┌───────────┐COMMENT
MEDIUMtests/fail/tree_borrows/wildcard/protector_release.rs61 // └───────────┘COMMENT
MEDIUM…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs30 // ┌──────────────┐COMMENT
MEDIUM…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs32 // │ptr_base(Act) ├───────────┬──────────────────┐ *COMMENT
MEDIUM…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs34 // └──────┬───────┘ │ │ │COMMENT
MEDIUM…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs38 // ┌─────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐COMMENT
MEDIUM…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs42 // └─────────────┘ └────────────┘ └────────────┘ └───────────┘COMMENT
MEDIUM…sts/fail/tree_borrows/wildcard/cross_tree_from_main.rs17 // ┌────────────┐COMMENT
114 more matches not shown…
Over-Commented Block308 hits · 306 pts
SeverityFileLineSnippetContext
LOWtest-cargo-miri/subcrate/src/lib.rs1/// Doc-test testCOMMENT
LOWtest-cargo-miri/issue-rust-86261/src/lib.rs1#![allow(unused_imports, unused_attributes, no_mangle_generic_items)]COMMENT
LOWtest-cargo-miri/src/lib.rs1/// Doc-test testCOMMENT
LOWtest-cargo-miri/src/lib.rs21/// ```rust,compile_failCOMMENT
LOWtests/fail/no_main.rs1//@error-in-other-file: Miri can only run programs that have a main function.COMMENT
LOWtests/fail/tree_borrows/reservedim_spurious_write.rs1// Illustrating a problematic interaction between Reserved, interior mutability,COMMENT
LOWtests/fail/tree_borrows/protector-write-lazy.rs1//@compile-flags: -Zmiri-tree-borrowsCOMMENT
LOWtests/fail/tree_borrows/spurious_read.rs1// We ensure a deterministic execution.COMMENT
LOWtests/fail/tree_borrows/spurious_read.rs41// spurious read x (target only, which we are *not* executing)COMMENT
LOW…tree_borrows/subtree_traversal_skipping_diagnostics.rs1//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0COMMENT
LOW…ee_borrows/wildcard/cross_tree_update_newer_exposed.rs21 // ┌──────────────┐COMMENT
LOW…rows/wildcard/subtree_internal_relatedness_wildcard.rs21 // │ptr_base(Res)*│ *COMMENT
LOW…s/fail/tree_borrows/wildcard/single_exposed_disable.rs21 // │ │COMMENT
LOW…_borrows/wildcard/multi_exposed_child_unique_writer.rs21 // │ ref1(Res)* │COMMENT
LOW…ree_borrows/wildcard/multi_exposed_siblings_foreign.rs21 // │ ptr_base ├──────────────┬───────────────────┐COMMENT
LOW…ree_borrows/wildcard/multi_exposed_siblings_disable.rs21 // │ ptr_base ├──────────────┬───────────────────┐COMMENT
LOW…s/fail/tree_borrows/wildcard/single_exposed_foreign.rs21 // │ │COMMENT
LOW…/tree_borrows/wildcard/subtree_internal_relatedness.rs21 // │ │ │COMMENT
LOWtests/fail/tree_borrows/wildcard/protector_release.rs41 // │ │COMMENT
LOWtests/fail/tree_borrows/wildcard/protector_release.rs61 // └───────────┘COMMENT
LOW…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs21COMMENT
LOW…ws/wildcard/cross_tree_update_main_invalid_exposed2.rs41 // │ │ │ │ │ │ │ │COMMENT
LOW…sts/fail/tree_borrows/wildcard/cross_tree_from_main.rs21 // └──────┬─────┘ │ │COMMENT
LOW…ows/wildcard/cross_tree_update_main_invalid_exposed.rs21COMMENT
LOW…/fail/tree_borrows/wildcard/cross_tree_update_newer.rs21 // │ │COMMENT
LOWtests/fail/tree_borrows/wildcard/protector_release2.rs1//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenanceCOMMENT
LOWtests/fail/tree_borrows/wildcard/protector_release2.rs41 // │ Cel │ Cel │ *COMMENT
LOWtests/fail/tree_borrows/wildcard/protector_release2.rs61 // │ref5*| │COMMENT
LOW…/tree_borrows/wildcard/multi_exposed_siblings_local.rs21 // ┌─────────────┐COMMENT
LOW…s/fail/tree_borrows/wildcard/cross_tree_update_main.rs21 // └──────┬─────┘ │ │COMMENT
LOW…rrows/wildcard/multi_exposed_siblings_unique_writer.rs21 // │ ptr_base ├──────────────┐COMMENT
LOW…/fail/tree_borrows/wildcard/cross_tree_update_older.rs21 // │ │COMMENT
LOWtests/fail/tree_borrows/wildcard/protected_wildcard.rs21 // │ │ │COMMENT
LOW…ws/wildcard/cross_tree_update_older_invalid_exposed.rs21 let _int3 = ref3 as *mut u32 as usize;COMMENT
LOW…ws/wildcard/cross_tree_update_older_invalid_exposed.rs41 // ┌────────────┐ ┌────────────┐COMMENT
LOWtests/fail/tree_borrows/wildcard/multi_exposed_child.rs21 let wild = int1 as *mut u32;COMMENT
LOWtests/fail/tree_borrows/wildcard/multi_exposed_child.rs41 // │ ref3(Act)* │COMMENT
LOW…s/wildcard/cross_tree_update_older_invalid_exposed2.rs21COMMENT
LOW…s/wildcard/cross_tree_update_older_invalid_exposed2.rs41 // │ │COMMENT
LOWtests/fail/match/closures/partial-pattern.rs1// This test serves to document the change in semantics introduced byCOMMENT
LOW…fail/stacked_borrows/retag_data_race_protected_read.rs21COMMENT
LOWtests/fail/unaligned_pointers/dyn_alignment.rs1// should find the bug even without, but gets masked by optimizationsCOMMENT
LOWtests/fail/concurrency/mutex-leak-move-deadlock.rs1//@error-in-other-file: deadlockCOMMENT
LOWtests/fail/data_race/read_write_race_stack.rs21 // the operations need to occur inCOMMENT
LOWtests/fail/data_race/write_write_race_stack.rs21 // the operations need to occur inCOMMENT
LOWtests/fail/both_borrows/drop_in_place_protector.rs1//@revisions: stack treeCOMMENT
LOW…sts/fail/both_borrows/illegal_read_despite_exposed2.rs1//@revisions: stack treeCOMMENT
LOWtests/pass/observed_local_mut.rs1// Stacked Borrows catches this (correctly) as UB.COMMENT
LOWtests/pass/float.rs21#[path = "../utils/mod.rs"]COMMENT
LOWtests/pass/float.rs461COMMENT
LOWtests/pass/float.rs1561 check_nondet(|| a.exp());COMMENT
LOWtests/pass/regions-lifetime-nonfree-late-bound.rs1// This is a regression test for the ICE from issue #10846.COMMENT
LOWtests/pass/too-large-primval-write-problem.rs1// `PrimVal`s in Miri are represented with 8 bytes (u64) and at the time of writing, the `-x`COMMENT
LOWtests/pass/enums.rs141 /// The scaled mantissa.COMMENT
LOWtests/pass/strings.rs21}COMMENT
LOWtests/pass/move-data-across-await-point.rs1use std::future::Future;COMMENT
LOWtests/pass/slices.rs201COMMENT
LOWtests/pass/no_core.rs1//! Test that Miri is able to run no_core programs.COMMENT
LOWtests/pass/tree_borrows/retag_no_race.rs1//@compile-flags: -Zmiri-tree-borrowsCOMMENT
LOWtests/pass/tree_borrows/retag_no_race.rs21// In whichCOMMENT
248 more matches not shown…
Verbosity Indicators7 hits · 14 pts
SeverityFileLineSnippetContext
LOWtests/pass/protector-gc.rs1// When we pop a stack frame with weak protectors, we need to check if the protected pointer'sCOMMENT
LOWsrc/helpers.rs761 // Step 1: determine the length.COMMENT
LOWsrc/helpers.rs775 // Step 2: get the bytes.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs281 // Step 1: Find granting item.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs285 // Step 2: Remove incompatible items above them. Make sure we do not remove protectedCOMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs366 // Step 1: Make a write access.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs370 // Step 2: Pretend we remove the remaining items, checking if any are strongly protected.COMMENT
Structural Annotation Overuse6 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/helpers.rs761 // Step 1: determine the length.COMMENT
LOWsrc/helpers.rs775 // Step 2: get the bytes.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs281 // Step 1: Find granting item.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs285 // Step 2: Remove incompatible items above them. Make sure we do not remove protectedCOMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs366 // Step 1: Make a write access.COMMENT
LOWsrc/borrow_tracker/stacked_borrows/mod.rs370 // Step 2: Pretend we remove the remaining items, checking if any are strongly protected.COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALsrc/shims/unix/env.rs371 let arch = this.machine.tcx.sess.target.arch.desc_symbol();CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMrustfmt.toml13 # This file is copy-pasted from the tracing_chrome crate and should remain like the original.COMMENT
MEDIUM.github/workflows/ci.yml231 # Create a token for the next step so it can create a PR that actually runs CI.COMMENT
MEDIUM.github/workflows/ci.yml265 # Create a PRCOMMENT
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/pass/float.rs35/// Essentially ULP can be seen as a distance metric of floating-point numbers, but withCOMMENT
MEDIUMsrc/machine.rs1160 // Definitely not enough.COMMENT
MEDIUMsrc/borrow_tracker/tree_borrows/tree.rs368 // not yet accessed nodes exist. Essentially, we pretend thereCOMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMsrc/borrow_tracker/tree_borrows/tree_visitor.rs137 // Reverse the stack, as discussed above.COMMENT
LOWsrc/concurrency/sync.rs264 // Don't forget to write the return value.COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOW.github/workflows/ci.yml205 # Check if all jobs that we depend on (in the needs array) were successful.COMMENT
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest-cargo-miri/run-test.py199def test_cargo_miri_multi_target():CODE