Repository Analysis

facet-rs/facet

Rust reflection, serialization, deserialization, pretty printing, etc. — the last proc macro you should need

5.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of facet-rs/facet, a Rust project with 2,570 GitHub stars. SynthScan v2.0 examined 129,519 lines of code across 533 source files, recording 573 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 5.1 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).

5.1
Adjusted Score
5.1
Raw Score
100%
Time Factor
2026-08-28
Last Push
2.6K
Stars
Rust
Language
129.5K
Lines of Code
533
Files
573
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

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 2HIGH 0MEDIUM 29LOW 542

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 573 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.

Over-Commented Block513 hits · 498 pts
SeverityFileLineSnippetContext
LOW.config/nextest.toml41# Run tests under valgrind with leak checkingCOMMENT
LOWfacet-pretty/src/color.rs1//! Color palettes and terminal theme detection for pretty-printing.COMMENT
LOWfacet-pretty/src/color.rs101 ///COMMENT
LOWfacet-pretty/src/lib.rs1#![warn(missing_docs)]COMMENT
LOWfacet-pretty/src/lib.rs21//! name: String,COMMENT
LOWfacet-pretty/src/printer.rs21use crate::color::ColorGenerator;COMMENT
LOWfacet-pretty/src/printer.rs41 /// Background (#1a1b26)COMMENT
LOWfacet-pretty/src/printer.rs81 // ========================================================================COMMENT
LOWfacet-macros-impl/src/derive.rs1use crate::{ToTokens, *};COMMENT
LOWfacet-macros-impl/src/on_error.rs1use crate::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};COMMENT
LOWfacet-macros-impl/src/lib.rs1// unsynn's Parser API intentionally returns its large Error by value.COMMENT
LOWfacet-macros-impl/src/lib.rs41mod process_struct;COMMENT
LOWfacet-macros-impl/src/extension.rs81 } else {COMMENT
LOWfacet-macros-impl/src/extension.rs121}COMMENT
LOWfacet-macros-impl/src/plugin.rs1//! Plugin system for facet derive macro.COMMENT
LOWfacet-macros-impl/src/plugin.rs201/// This filters out the plugin-system-specific attributes before passingCOMMENT
LOWfacet-macros-impl/src/plugin.rs1321 }COMMENT
LOWfacet-macros-impl/src/process_enum.rs1401 #[automatically_derived]COMMENT
LOWfacet-macros-impl/src/process_enum.rs1421 #attributes_callCOMMENT
LOWfacet-macros-impl/src/process_struct.rs1//! Struct processing and vtable generation for the Facet derive macro.COMMENT
LOWfacet-macros-impl/src/process_struct.rs21//!COMMENT
LOWfacet-macros-impl/src/process_struct.rs41COMMENT
LOWfacet-macros-impl/src/process_struct.rs181 });COMMENT
LOWfacet-macros-impl/src/process_struct.rs481 // Uses prelude aliases for compact output (𝟋VtE, 𝟋VtD)COMMENT
LOWfacet-macros-impl/src/process_struct.rs2581 // Proxy inherent impl (outside the Facet impl so generic params are in scope)COMMENT
LOWfacet-macros-impl/src/attr_grammar/mod.rs1//! Attribute grammar system for declarative extension attribute parsing.COMMENT
LOWfacet-macros-impl/src/attr_grammar/dispatch_attr.rs781 // No value: for Option types, return None; otherwise errorCOMMENT
LOWfacet-macros-impl/src/attr_grammar/dispatch_attr.rs901 return quote_spanned! { span =>COMMENT
LOWfacet-macros-impl/src/attr_grammar/dispatch_attr.rs981 /// A single type in a `list(shape_type)` payload - everything up to the nextCOMMENT
LOWfacet-macros-impl/src/attr_grammar/dispatch_attr.rs1001/// items:COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs61COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs281#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs341 /// If true, generate `<$ty as ::core::default::Default>::default()` when no value provided.COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs361 /// A comma-separated list of types, each converted to a Shape reference.COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs581 }COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs941 // For builtin mode, skip deriving Facet entirely because the derive macroCOMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs1241 @variants { #(#variants_meta),* }COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs1261 // fn is_empty(s: &String) -> bool { ... }COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs1321 }};COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs1341 quote! {COMMENT
LOWfacet-macros-impl/src/attr_grammar/make_parse_attr.rs1401 // import the Attr enum (dependency direction: facet depends on facet-core).COMMENT
LOWfacet-testhelpers/src/lib.rs1#![warn(missing_docs)]COMMENT
LOWfacet-testhelpers/src/lib.rs21//! fn my_test() {COMMENT
LOWfacet-testhelpers/src/lib.rs161///COMMENT
LOWfacet-showcase/src/lib.rs1//! Unified showcase infrastructure for facet format crates.COMMENT
LOWfacet-showcase/src/output.rs1//! Output mode detection and configuration.COMMENT
LOWfacet-macros/src/lib.rs1//! [![Coverage Status](https://coveralls.io/repos/github/facet-rs/facet-macros/badge.svg?branch=main)](https://coverallCOMMENT
LOWfacet-macros/src/lib.rs21#[doc(hidden)]COMMENT
LOWfacet-macros/src/lib.rs41/// Internal proc macro for unified attribute dispatch.COMMENT
LOWfacet-macros/src/lib.rs61/// Internal proc macro for attribute error messages.COMMENT
LOWfacet-macros/src/lib.rs101}COMMENT
LOWfacet-macros/src/lib.rs121/// 3. Call each registered plugin's code generatorCOMMENT
LOWfacet-macros/src/lib.rs141#[doc(hidden)]COMMENT
LOWfacet-macros/src/lib.rs161///COMMENT
LOWfacet-macro-template/src/lib.rs1//! # Facet Macro TemplateCOMMENT
LOWdocs/content/reference/container-attributes.md141COMMENT
LOWfacet-validate/src/lib.rs1//! Validation attributes for facet.COMMENT
LOWfacet-validate/src/lib.rs21//! pub contact_email: String,COMMENT
LOWfacet-validate/src/lib.rs41//! | `min_length` | `validate::min_length = 1` | String, Vec, slices |COMMENT
LOWfacet-validate/src/lib.rs101 ///COMMENT
453 more matches not shown…
Decorative Section Separators24 hits · 72 pts
SeverityFileLineSnippetContext
MEDIUMfacet-reflect/tests/poke/at_path.rs8// ── Test types ──────────────────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs35// ── Success: struct field mutation ───────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs74// ── Success: list element mutation ──────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs95// ── Success: enum variant field mutation ─────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs136// ── Success: empty path returns root ────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs149// ── Error: root shape mismatch ──────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs161// ── Error: field out of bounds ──────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs182// ── Error: list index out of bounds ─────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs208// ── Error: variant mismatch ─────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/poke/at_path.rs229// ── Error: unsupported step kinds ───────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs6// ── Test types ──────────────────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs44// ── Success: struct field ───────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs81// ── Success: list index ─────────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs101// ── Success: enum variant + field ───────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs134// ── Success: Option ─────────────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs150// ── Success: Box (pointer deref) ────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs168// ── Success: map ────────────────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs186// ── Success: empty path returns root ────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs198// ── Error: root shape mismatch ──────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs211// ── Error: wrong step kind ──────────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs243// ── Error: field out of bounds ──────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs264// ── Error: list index out of bounds ─────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs291// ── Error: enum variant mismatch ────────────────────────────────────COMMENT
MEDIUMfacet-reflect/tests/peek/at_path.rs313// ── Error: option is None ───────────────────────────────────────────COMMENT
Structural Annotation Overuse15 hits · 28 pts
SeverityFileLineSnippetContext
LOWfacet-macros-impl/src/process_enum.rs11/// NOTE: This function generates code that uses short aliases from the 𝟋 prelude.COMMENT
LOWfacet-macros-impl/src/process_enum.rs41/// NOTE: This function generates code that uses short aliases from the 𝟋 prelude.COMMENT
LOWdocs/content/reference/field-attributes.md379// Step 1: Create a transparent proxy that wraps StringCOMMENT
LOWdocs/content/reference/field-attributes.md384// Step 2: Implement TryFrom for deserialization (Proxy → Color)COMMENT
LOWdocs/content/reference/field-attributes.md393// Step 3: Implement TryFrom for serialization (Color → Proxy)COMMENT
LOWdocs/content/reference/field-attributes.md402// Step 4: Use the proxy attribute on your fieldCOMMENT
LOWfacet-solver/tests/integration/solver.rs472 // Step 1: Probe to find configurationCOMMENT
LOWfacet-solver/tests/integration/solver.rs481 // Step 2: Deserialize using resolved configCOMMENT
LOWfacet-solver/tests/integration/solver.rs509 // Step 1: Probe to find configurationCOMMENT
LOWfacet-solver/tests/integration/solver.rs518 // Step 2: Deserialize using resolved configCOMMENT
LOWfacet-reflect/docs/partial-ownership-redesign.md280### Step 1: Add `iset.unset(idx)` in `begin_nth_struct_field`COMMENT
LOWfacet-reflect/docs/partial-ownership-redesign.md297### Step 2: Verify `end()` already sets isetCOMMENT
LOWfacet-reflect/docs/partial-ownership-redesign.md307### Step 3: Simplify drop logicCOMMENT
LOWfacet-reflect/docs/partial-ownership-redesign.md339### Step 4: Remove `current_child` from Tracker variantsCOMMENT
LOWfacet-reflect/docs/partial-ownership-redesign.md349### Step 5: Rename `is_init` to `state`COMMENT
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALfacet-reflect/src/peek/set.rs103 let iter_init_with_value_fn = self.def.vtable.iter_vtable.init_with_value.unwrap();CODE
CRITICALfacet-reflect/src/peek/map.rs148 let iter_init_with_value_fn = self.def.vtable.iter_vtable.init_with_value.unwrap();CODE
AI Slop Vocabulary5 hits · 14 pts
SeverityFileLineSnippetContext
LOWfacet-solver/src/lib.rs1395 /// # Why not just use `see_key()` results?COMMENT
MEDIUMfacet-macro-parse/src/generic_params.rs438 // Compare string representations for robust assertionCOMMENT
MEDIUMfacet-macro-parse/src/generic_params.rs449 // Compare string representations for robust assertionCOMMENT
MEDIUMfacet-core/src/types/specialization.rs24/// It wraps a value and is used in conjunction with trait implementations that leverageCOMMENT
MEDIUMfacet-core/src/types/specialization.rs36/// trait implementations that leverage Rust's method resolution rules to select differentCOMMENT
Verbosity Indicators4 hits · 9 pts
SeverityFileLineSnippetContext
LOWfacet-solver/tests/integration/solver.rs472 // Step 1: Probe to find configurationCOMMENT
LOWfacet-solver/tests/integration/solver.rs481 // Step 2: Deserialize using resolved configCOMMENT
LOWfacet-solver/tests/integration/solver.rs509 // Step 1: Probe to find configurationCOMMENT
LOWfacet-solver/tests/integration/solver.rs518 // Step 2: Deserialize using resolved configCOMMENT
Fake / Example Data7 hits · 8 pts
SeverityFileLineSnippetContext
LOWfacet-pretty/tests/integration/pretty_print.rs41 street: "123 Main St".to_string(),CODE
LOWfacet-pretty/examples/pretty_basic.rs20 street: "123 Main St".to_string(),CODE
LOWfacet-pretty/examples/pretty_showcase.rs341 name: "Acme Corp".into(),CODE
LOWfacet-pretty/examples/pretty_showcase.rs343 street: "123 Main St".into(),CODE
LOWfacet-reflect/tests/partial/misc.rs1334 .set("John Doe".to_string())?CODE
LOWfacet-reflect/tests/partial/misc.rs1344 name: "John Doe".to_string(),CODE
LOWfacet-reflect/src/partial/mod.rs32//! partial = partial.set_field("street", "123 Main St")?;COMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMscripts/lldb-wrapper.sh5# Create a temp script that conditionally shows backtraceCOMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/lldb-crash-handler.py34 # Check if stopped due to signal (crash)COMMENT
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/lldb-crash-handler.py10CODE