AI Slop Code Risk Monitor

rhaiscript/rhai

SlopCodeMonitor badge for rhaiscript/rhai Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Rhai - An embedded scripting language for Rust.

8.0 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for rhaiscript/rhai, a Rust project with 5,771 GitHub stars. SynthScan examined 113,914 lines of code across 357 source files, recording 1041 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 8.0 (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.

8.0
Adjusted Signal
8.0
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
5.8K
Stars
Rust
Language
113.9K
Lines of Code
357
Files
1.0K
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 32.9/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

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

Agent Over-Engineering Ratio 0.0/100 · LOW

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

PR Review Velocity Impact 37.2/100 · MEDIUM

Which changes need focused human review? 1041 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 9LOW 1032

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 1041 distinct pattern matches across 4 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 Block1022 hits · 870 pts
SeverityFileLineSnippetContext
LOWtools/reserved.txt1// This file holds a list of reserved symbols for the Rhai language.COMMENT
LOWtools/keywords.txt1// This file holds a list of keywords/symbols for the Rhai language, with mapping toCOMMENT
LOWtests/native.rs81COMMENT
LOWtests/arrays.rs361 "COMMENT
LOWtests/mod.rs1mod grain {COMMENT
LOWtests/mod.rs21 #[cfg(feature = "debugging")]COMMENT
LOWtests/grain/format.rs1//! An artifact must mean what the program it came from meant, and nothing aCOMMENT
LOWtests/grain/format.rs121 // rests on into a panic in Rhai, so the case is not run at all there.COMMENT
LOWtests/grain/format.rs141 }COMMENT
LOWtests/grain/format.rs161 let mut scope = Scope::new();COMMENT
LOWtests/grain/format.rs461/// artifact holding jump targets that are not in the code, and so the one theCOMMENT
LOWtests/grain/format.rs521 ("switch-float", "let x = 42; switch x { 1.5 => 1, _ => 0 }", Caps::FLOAT, "floating-point"),COMMENT
LOWtests/grain/format.rs541 #[cfg(not(feature = "no_float"))]COMMENT
LOWtests/grain/format.rs641COMMENT
LOWtests/grain/format.rs681 let _ = Vm::new(&engine).eval_with_scope(&mut Scope::new(), &program);COMMENT
LOWtests/grain/format.rs761/// the sidecar it kept and has a backtrace.COMMENT
LOWtests/grain/format.rs981 //COMMENT
LOWtests/grain/call_fn.rs1//! Calling one compiled function, with the environment and receiver Rhai givesCOMMENT
LOWtests/grain/call_fn.rs21COMMENT
LOWtests/grain/custom_syntax.rs1//! Custom syntax against the walker's own scope and control-flow rules.COMMENT
LOWtests/grain/custom_syntax.rs181}COMMENT
LOWtests/grain/limits.rs1//! Compiled code must still be stoppable.COMMENT
LOWtests/grain/callback.rs161}COMMENT
LOWtests/grain/scope.rs1//! Variables the caller already had, which no slot can name.COMMENT
LOWtests/grain/scope.rs481 agree_with(&engine, r#"fn via_kit() { import "kit" as k; k::double(3) } via_kit()"#, |_| {}, true);COMMENT
LOWtests/grain/scope.rs701 assert_eq!(fresh.len(), 0, "the body never ran, so it declared nothing");COMMENT
LOWtests/grain/differential.rs1//! The VM must mean exactly what Rhai means.COMMENT
LOWtests/grain/differential.rs181COMMENT
LOWtests/grain/differential.rs221/// five bytes and a dispatch and can never do anything, and because it isCOMMENT
LOWtests/grain/fuzz.rs1//! Randomized loading, on the assumption that an artifact is hostile.COMMENT
LOWtests/grain/fuzz.rs221///COMMENT
LOWtests/grain/projection.rs1//! What would a lowering of this script actually weigh?COMMENT
LOWtests/grain/allocation.rs1//! What the AST costs, and what the VM costs instead.COMMENT
LOWtests/grain/debugger.rs1//! A compiled program must be visible to the debugger, and stoppable.COMMENT
LOWtests/grain/debugger.rs381/// What a callback declares must not disturb the program it stopped.COMMENT
LOWtests/grain/corpus/generate.rs1// Random Rhai scripts, for comparing the VM against the walker on programsCOMMENT
LOWtests/grain/corpus/generate.rs21// argument order for captures, pinned in `tests/callback.rs`. Closures areCOMMENT
LOWtests/grain/corpus/generate.rs101COMMENT
LOWtests/grain/corpus/generate.rs121/// which is worth generating rather than worth avoiding.COMMENT
LOWtests/grain/corpus/generate.rs141pub struct Generator {COMMENT
LOWtests/grain/corpus/generate.rs501 9 => self.map(),COMMENT
LOWtests/grain/corpus/generate.rs541 // form is `fn` in disguise, so `no_function` takes it too.COMMENT
LOWtests/grain/corpus/mod.rs1//! Scripts the VM must agree with Rhai on.COMMENT
LOWtests/grain/corpus/mod.rs21 pub name: &'static str,COMMENT
LOWtests/grain/corpus/mod.rs81 // a script can be given one: sharing is otherwise something Rhai does to aCOMMENT
LOWtests/grain/corpus/mod.rs141 Case { name, source }COMMENT
LOWtests/grain/corpus/mod.rs461 // both loop variables have to go with the frame.COMMENT
LOWtests/grain/corpus/mod.rs481 // A case value that matched but whose guard declined must continue to theCOMMENT
LOWtests/grain/corpus/mod.rs501 // A jump out of an arm and out of the switch, which is where the operandCOMMENT
LOWtests/grain/corpus/mod.rs541 // A script method mutating its receiver: `this` is bound by reference, soCOMMENT
LOWtests/grain/corpus/mod.rs561 case("call_style_pure_native", "let a = [1, 2]; len(a)"),COMMENT
LOWtests/grain/corpus/mod.rs581 // argument rather than before it.COMMENT
LOWtests/grain/corpus/mod.rs601 // cannot fold it into a pointer carrying an environment.COMMENT
LOWtests/grain/corpus/mod.rs621 case("error_fn_ptr_from_an_unusable_name", r#"Fn("not an identifier!")"#),COMMENT
LOWtests/grain/corpus/mod.rs661 // visible from outside the expression that invented it.COMMENT
LOWtests/grain/corpus/mod.rs701 // A mutating method on a temporary. The mutation has nowhere to land, andCOMMENT
LOWtests/grain/corpus/mod.rs721 // The op-assign form, which falls back to the plain operator when noCOMMENT
LOWtests/grain/corpus/mod.rs741 case("throw_from_a_catch_drops_the_catch_var", "let a = 1; try { throw 2; } catch (e) { throw e; }"),COMMENT
LOWtests/grain/corpus/mod.rs781 // has already been left — so the second failure here must not be caught.COMMENT
LOWcodegen/src/lib.rs1//! This crate contains procedural macros to make creating Rhai plugin modules much easier.COMMENT
962 more matches not shown…
AI Slop Vocabulary9 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMsrc/types/dynamic.rs1375 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1501 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1877 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/types/dynamic.rs1980 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/module/mod.rs1656 /// Essentially, this method is a shortcut for:COMMENT
MEDIUMsrc/api/custom_syntax.rs230 // Coded this way in order to maximally leverage potentials for dead-code removal.COMMENT
MEDIUMsrc/api/events.rs24 /// the current [`Scope`][crate::Scope]. Essentially the correct variable is at positionCOMMENT
MEDIUMsrc/func/call.rs703 // convert to method-call style in order to leverage potential &mut first argumentCOMMENT
MEDIUMsrc/func/call.rs794 // If so, convert to method-call style in order to leverage potentialCOMMENT
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/api/custom_syntax.rs562 /// ## Return valueCOMMENT
LOWsrc/api/custom_syntax.rs615 /// ## Return valueCOMMENT
LOWsrc/api/events.rs29 /// ## Return valueCOMMENT
LOWsrc/api/events.rs85 /// ## Return valueCOMMENT
LOWsrc/api/events.rs205 /// ## Return valueCOMMENT
LOWsrc/api/events.rs347 /// ## Return valueCOMMENT
LOWsrc/api/events.rs426 /// ## Return valueCOMMENT
LOWsrc/api/events.rs502 /// ## Return valueCOMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/parse_json.rs32 assert_eq!(map["name"].clone().into_immutable_string().expect("name should exist"), "John Doe");CODE
LOWtests/parse_json.rs156 assert_eq!(map["name"].clone().into_immutable_string().expect("name should exist"), "John Doe");CODE