Repository Analysis

marshmallow-code/marshmallow

A lightweight library for converting complex objects to and from simple Python datatypes.

28.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of marshmallow-code/marshmallow, a Python project with 7,240 GitHub stars. SynthScan v2.0 examined 16,154 lines of code across 51 source files, recording 542 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 28.5 places this repository in the Moderate 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).

28.5
Adjusted Score
28.5
Raw Score
100%
Time Factor
2026-08-01
Last Push
7.2K
Stars
Python
Language
16.2K
Lines of Code
51
Files
542
Pattern Hits
2026-08-02
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 0HIGH 0MEDIUM 2LOW 540

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

Hyper-Verbose Identifiers487 hits · 403 pts
SeverityFileLineSnippetContext
LOWtests/test_deserialization.py51 def test_fields_allow_none_deserialize_to_none(self, FieldClass):CODE
LOWtests/test_deserialization.py57 def test_fields_dont_allow_none_by_default(self, FieldClass):CODE
LOWtests/test_deserialization.py62 def test_allow_none_is_true_if_missing_is_true(self):CODE
LOWtests/test_deserialization.py67 def test_list_field_deserialize_none_to_none(self):CODE
LOWtests/test_deserialization.py71 def test_tuple_field_deserialize_none_to_none(self):CODE
LOWtests/test_deserialization.py75 def test_list_of_nested_allow_none_deserialize_none_to_none(self):CODE
LOWtests/test_deserialization.py79 def test_list_of_nested_non_allow_none_deserialize_none_to_validation_error(self):CODE
LOWtests/test_deserialization.py86 def test_float_field_deserialization(self):CODE
LOWtests/test_deserialization.py92 def test_invalid_float_field_deserialization(self, in_val):CODE
LOWtests/test_deserialization.py98 def test_float_field_overflow(self):CODE
LOWtests/test_deserialization.py104 def test_integer_field_deserialization(self):CODE
LOWtests/test_deserialization.py401 def test_boolean_field_deserialization_with_empty_truthy(self):CODE
LOWtests/test_deserialization.py407 def test_boolean_field_deserialization_with_custom_falsy_values(self):CODE
LOWtests/test_deserialization.py412 def test_field_toggle_show_invalid_value_in_error_message(self):CODE
LOWtests/test_deserialization.py595 def test_boolean_timestamp_field_deserialization(self, fmt, in_value):CODE
LOWtests/test_deserialization.py605 def test_invalid_timestamp_field_deserialization(self, fmt, in_value):CODE
LOWtests/test_deserialization.py615 def test_oversized_timestamp_field_deserialization(self, fmt, mock_fromtimestamp):CODE
LOWtests/test_deserialization.py657 def test_naive_datetime_with_timezone(self, fmt, timezone, value, expected):CODE
LOWtests/test_deserialization.py666 def test_aware_datetime_default_timezone(self, fmt, timezone, value):CODE
LOWtests/test_deserialization.py672 def test_time_field_deserialization(self):CODE
LOWtests/test_deserialization.py717 def test_iso_time_field_deserialization(self, fmt, value, expected):CODE
LOWtests/test_deserialization.py724 def test_invalid_timedelta_precision(self):CODE
LOWtests/test_deserialization.py728 def test_timedelta_field_deserialization(self):CODE
LOWtests/test_deserialization.py973 def test_url_field_non_list_validators(self):CODE
LOWtests/test_deserialization.py978 def test_relative_url_field_deserialization(self):CODE
LOWtests/test_deserialization.py982 def test_url_field_schemes_argument(self):CODE
LOWtests/test_deserialization.py990 def test_email_field_deserialization(self):CODE
LOWtests/test_deserialization.py1003 def test_email_field_non_list_validators(self):CODE
LOWtests/test_deserialization.py1008 def test_function_field_deserialization_is_noop_by_default(self):CODE
LOWtests/test_deserialization.py1014 def test_function_field_deserialization_with_callable(self):CODE
LOWtests/test_deserialization.py1018 def test_function_field_deserialization_missing_with_length_validator(self):CODE
LOWtests/test_deserialization.py1025 def test_function_field_passed_deserialize_only_is_load_only(self):CODE
LOWtests/test_deserialization.py1029 def test_function_field_passed_deserialize_and_serialize_is_not_load_only(self):CODE
LOWtests/test_deserialization.py1035 def test_uuid_field_deserialization(self):CODE
LOWtests/test_deserialization.py1198 def test_enum_field_by_symbol_deserialization(self):CODE
LOWtests/test_deserialization.py1202 def test_enum_field_by_symbol_invalid_value(self):CODE
LOWtests/test_deserialization.py1210 def test_enum_field_by_symbol_rejects_non_member_attributes(self, non_member):CODE
LOWtests/test_deserialization.py1217 def test_enum_field_by_symbol_not_string(self):CODE
LOWtests/test_deserialization.py1222 def test_enum_field_by_value_true_deserialization(self):CODE
LOWtests/test_deserialization.py1228 def test_enum_field_by_value_field_deserialization(self):CODE
LOWtests/test_deserialization.py1236 def test_enum_field_by_value_true_invalid_value(self):CODE
LOWtests/test_deserialization.py1285 def test_enum_by_value_allow_none_default(self):CODE
LOWtests/test_deserialization.py1289 def test_deserialization_function_must_be_callable(self):CODE
LOWtests/test_deserialization.py1293 def test_method_field_deserialization_is_noop_by_default(self):CODE
LOWtests/test_deserialization.py1303 def test_deserialization_method(self):CODE
LOWtests/test_deserialization.py1316 def test_deserialization_method_must_be_a_method(self):CODE
LOWtests/test_deserialization.py1323 def test_method_field_deserialize_only(self):CODE
LOWtests/test_deserialization.py1332 def test_datetime_list_field_deserialization(self):CODE
LOWtests/test_deserialization.py1341 def test_list_field_deserialize_invalid_item(self):CODE
LOWtests/test_deserialization.py1413 def test_tuple_field_deserialize_value_that_is_not_a_collection(self, value):CODE
LOWtests/test_deserialization.py1419 def test_tuple_field_deserialize_invalid_length(self):CODE
LOWtests/test_deserialization.py1425 def test_constant_field_deserialization(self):CODE
LOWtests/test_deserialization.py1429 def test_constant_is_always_included_in_deserialized_data(self):CODE
LOWtests/test_deserialization.py1437 def test_constant_none_allows_none_value(self):CODE
LOWtests/test_deserialization.py1446 def test_constant_with_required(self):CODE
LOWtests/test_deserialization.py1454 def test_field_deserialization_with_user_validator_function(self):CODE
LOWtests/test_deserialization.py1462 def test_field_deserialization_with_user_validator_that_raises_error_with_list(CODE
LOWtests/test_deserialization.py1701 def test_nested_none_deserialization(self):CODE
LOWtests/test_deserialization.py1711 def test_deserialize_with_attribute_param(self):CODE
LOWtests/test_deserialization.py1722 def test_deserialize_with_attribute_param_symmetry(self):CODE
427 more matches not shown…
Unused Imports29 hits · 29 pts
SeverityFileLineSnippetContext
LOWtests/test_registry.py192CODE
LOWtests/test_registry.py207CODE
LOWtests/test_registry.py214CODE
LOWtests/test_utils.py1CODE
LOWtests/mypy_test_cases/test_validation_error.py1CODE
LOWexamples/flask_example.py10CODE
LOWsrc/marshmallow/fields.py2CODE
LOWsrc/marshmallow/__init__.py1CODE
LOWsrc/marshmallow/__init__.py1CODE
LOWsrc/marshmallow/__init__.py1CODE
LOWsrc/marshmallow/__init__.py1CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py2CODE
LOWsrc/marshmallow/__init__.py10CODE
LOWsrc/marshmallow/__init__.py11CODE
LOWsrc/marshmallow/__init__.py11CODE
LOWsrc/marshmallow/__init__.py13CODE
LOWsrc/marshmallow/types.py8CODE
LOWsrc/marshmallow/validate.py3CODE
LOWsrc/marshmallow/class_registry.py12CODE
LOWsrc/marshmallow/utils.py3CODE
LOWsrc/marshmallow/exceptions.py3CODE
LOWsrc/marshmallow/schema.py4CODE
LOWsrc/marshmallow/decorators.py68CODE
LOWsrc/marshmallow/experimental/context.py31CODE
Fake / Example Data11 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/test_deserialization.py992 assert field.deserialize("foo@bar.com") == "foo@bar.com"CODE
LOWtests/test_deserialization.py999 field.deserialize("foo@bar.com")CODE
LOWtests/test_deserialization.py1716 data = {"username": "foo@bar.com", "years": "42"}CODE
LOWtests/test_deserialization.py1718 assert result["email"] == "foo@bar.com"CODE
LOWtests/test_deserialization.py1767 data = {"Name": "Mick", "UserName": "foo@bar.com", "years": "42"}CODE
LOWtests/test_deserialization.py1770 assert result["email"] == "foo@bar.com"CODE
LOWtests/test_deserialization.py1855 {"email": "foo@bar.com", "colors": "red", "age": 18},CODE
LOWtests/test_schema.py574 "email": "foo@bar.com",CODE
LOWtests/test_validate.py333 "!#$%&'*+-/=?^_`{}|~@example.org",CODE
LOWtests/test_validate.py356 '" "@example.org',CODE
LOWtests/test_serialization.py42 return User("Foo", email="foo@bar.com", age=42)CODE
Deep Nesting7 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_fields.py313CODE
LOWsrc/marshmallow/fields.py567CODE
LOWsrc/marshmallow/fields.py1686CODE
LOWsrc/marshmallow/error_store.py37CODE
LOWsrc/marshmallow/schema.py597CODE
LOWsrc/marshmallow/schema.py773CODE
LOWsrc/marshmallow/schema.py1124CODE
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMexamples/inflection_example.py24# -----------------------------------------------------------------------------COMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMexamples/flask_example.py144 # Create a new authorCOMMENT
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/base.py104CODE
LOWsrc/marshmallow/fields.py192CODE
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/marshmallow/fields.py44__all__ = [CODE
LOWsrc/marshmallow/__init__.py15__all__ = [CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/marshmallow/orderedset.py1# OrderedSetCOMMENT
LOWsrc/marshmallow/class_registry.py41 register("MyClass", MyClass)COMMENT