AI Slop Code RIsk Monitor

fastapi/sqlmodel

SQL databases in Python, designed for simplicity, compatibility, and robustness.

4.6 Low pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for fastapi/sqlmodel, a Python project with 18,365 GitHub stars. SynthScan examined 37,976 lines of code across 446 source files, recording 241 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 4.6 (Low 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.

4.6
Adjusted Signal
4.6
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
18.4K
Stars
Python
Language
38.0K
Lines of Code
446
Files
241
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 10.3/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 11.5/100 · LOW

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

Agent Over-Engineering Ratio 8.9/100 · LOW

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

PR Review Velocity Impact 27.2/100 · MEDIUM

Which changes need focused human review? 241 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 0LOW 241

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

Unused Imports150 hits · 92 pts
SeverityFileLineSnippetContext
LOWtests/test_future_annotations.py1CODE
LOW…utorial/code_structure/tutorial002_py310/team_model.py6CODE
LOW…utorial/code_structure/tutorial002_py310/hero_model.py6CODE
LOWsqlmodel/__init__.py4CODE
LOWsqlmodel/__init__.py5CODE
LOWsqlmodel/__init__.py8CODE
LOWsqlmodel/__init__.py9CODE
LOWsqlmodel/__init__.py10CODE
LOWsqlmodel/__init__.py11CODE
LOWsqlmodel/__init__.py12CODE
LOWsqlmodel/__init__.py13CODE
LOWsqlmodel/__init__.py14CODE
LOWsqlmodel/__init__.py15CODE
LOWsqlmodel/__init__.py16CODE
LOWsqlmodel/__init__.py17CODE
LOWsqlmodel/__init__.py18CODE
LOWsqlmodel/__init__.py19CODE
LOWsqlmodel/__init__.py20CODE
LOWsqlmodel/__init__.py21CODE
LOWsqlmodel/__init__.py22CODE
LOWsqlmodel/__init__.py23CODE
LOWsqlmodel/__init__.py24CODE
LOWsqlmodel/__init__.py25CODE
LOWsqlmodel/__init__.py26CODE
LOWsqlmodel/__init__.py27CODE
LOWsqlmodel/__init__.py28CODE
LOWsqlmodel/__init__.py29CODE
LOWsqlmodel/__init__.py30CODE
LOWsqlmodel/__init__.py31CODE
LOWsqlmodel/__init__.py32CODE
LOWsqlmodel/__init__.py33CODE
LOWsqlmodel/__init__.py36CODE
LOWsqlmodel/__init__.py37CODE
LOWsqlmodel/__init__.py40CODE
LOWsqlmodel/__init__.py41CODE
LOWsqlmodel/__init__.py42CODE
LOWsqlmodel/__init__.py43CODE
LOWsqlmodel/__init__.py44CODE
LOWsqlmodel/__init__.py45CODE
LOWsqlmodel/__init__.py46CODE
LOWsqlmodel/__init__.py47CODE
LOWsqlmodel/__init__.py48CODE
LOWsqlmodel/__init__.py49CODE
LOWsqlmodel/__init__.py50CODE
LOWsqlmodel/__init__.py51CODE
LOWsqlmodel/__init__.py52CODE
LOWsqlmodel/__init__.py53CODE
LOWsqlmodel/__init__.py54CODE
LOWsqlmodel/__init__.py55CODE
LOWsqlmodel/__init__.py56CODE
LOWsqlmodel/__init__.py57CODE
LOWsqlmodel/__init__.py58CODE
LOWsqlmodel/__init__.py59CODE
LOWsqlmodel/__init__.py60CODE
LOWsqlmodel/__init__.py61CODE
LOWsqlmodel/__init__.py62CODE
LOWsqlmodel/__init__.py63CODE
LOWsqlmodel/__init__.py64CODE
LOWsqlmodel/__init__.py65CODE
LOWsqlmodel/__init__.py66CODE
90 more matches not shown…
Hyper-Verbose Identifiers70 hits · 64 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py78def get_testing_print_function(CODE
LOWtests/test_future_annotations.py9def test_model_with_future_annotations(database_engine: Engine):CODE
LOWtests/test_future_annotations.py37def test_model_with_string_annotations(database_engine: Engine):CODE
LOWtests/test_prepare_release.py42def test_update_version_file_requires_newer_version() -> None:CODE
LOWtests/test_prepare_release.py49def test_update_release_notes() -> None:CODE
LOWtests/test_prepare_release.py90def test_update_release_notes_rejects_existing_version() -> None:STRING
LOWtests/test_prepare_release.py104def test_get_release_notes_body_with_dated_heading() -> None:STRING
LOWtests/test_prepare_release.py133def test_get_release_notes_body_with_plain_heading() -> None:STRING
LOWtests/test_prepare_release.py171def test_get_release_notes_body_requires_version_section() -> None:STRING
LOWtests/test_prepare_release.py178def test_get_release_notes_body_requires_non_empty_section() -> None:STRING
LOWtests/test_prepare_release.py194def test_cli_updates_configured_files(tmp_path: Path) -> None:STRING
LOWtests/test_prepare_release.py230def test_cli_accepts_env_vars(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:STRING
LOWtests/test_prepare_release.py250def test_cli_prints_current_version(tmp_path: Path) -> None:STRING
LOWtests/test_prepare_release.py268def test_cli_prints_release_notes(tmp_path: Path) -> None:STRING
LOWtests/test_deprecations.py13def test_deprecated_from_orm_inheritance():CODE
LOWtests/test_deprecations.py21def test_deprecated_parse_obj():CODE
LOWtests/test_nullable.py83def test_non_nullable_optional_field_with_no_default_set(database_engine: Engine):CODE
LOWtests/test_nullable.py113def test_sqlite_nullable_primary_key(clear_sqlmodel, caplog):CODE
LOWtests/test_ondelete_raises.py7def test_ondelete_requires_nullable(clear_sqlmodel: Any) -> None:CODE
LOWtests/test_ondelete_raises.py29def test_ondelete_requires_foreign_key(clear_sqlmodel: Any) -> None:CODE
LOWtests/test_field_sa_args_kwargs.py49def test_sa_column_kwargs_type_raises(field_kwargs: dict[str, Any]) -> None:CODE
LOWtests/test_datetime.py75def test_inherited_annotated_datetime() -> None:CODE
LOWtests/test_datetime.py90def test_explicit_datetime_type(CODE
LOWtests/test_datetime.py106def test_explicit_datetime_type_class() -> None:CODE
LOWtests/test_datetime.py114def test_other_temporal_types() -> None:CODE
LOWtests/test_datetime.py139def test_datetime_column_types(dialect: Any, aware_type: str, naive_type: str) -> None:CODE
LOWtests/test_datetime.py200def test_naive_database_parameters(CODE
LOWtests/test_datetime.py228def test_sqlite_explicit_datetime_bypasses_utc_processing(CODE
LOWtests/test_datetime.py247def test_postgresql_datetime_processing() -> None:CODE
LOWtests/test_datetime.py271def test_postgresql_datetime_interval_arithmetic(CODE
LOWtests/test_datetime.py295def test_existing_sqlite_utc_data() -> None:CODE
LOWtests/test_datetime.py319def test_alembic_datetime_rendering() -> None:CODE
LOWtests/test_aliases.py29def test_create_with_field_name(model: type[PydanticUser] | type[SQLModelUser]):CODE
LOWtests/test_aliases.py35def test_create_with_field_name_with_config(CODE
LOWtests/test_aliases.py57def test_create_with_both_prefers_alias(CODE
LOWtests/test_aliases.py65def test_dict_default_uses_field_names(CODE
LOWtests/test_aliases.py76def test_dict_by_alias_uses_aliases(CODE
LOWtests/test_aliases.py105def test_create_with_validation_alias(CODE
LOWtests/test_aliases.py113def test_serialize_with_serialization_alias(CODE
LOWtests/test_field_sa_relationship.py6def test_sa_relationship_no_args() -> None:CODE
LOWtests/test_field_sa_relationship.py30def test_sa_relationship_no_kwargs() -> None:CODE
LOWtests/test_field_sa_column.py8def test_sa_column_takes_precedence() -> None:CODE
LOWtests/test_field_sa_column.py20def test_sa_column_with_annotated_metadata() -> None:CODE
LOWtests/test_field_sa_column.py31def test_sa_column_no_sa_args() -> None:CODE
LOWtests/test_field_sa_column.py42def test_sa_column_no_sa_kargs() -> None:CODE
LOWtests/test_field_sa_column.py64def test_sa_column_no_primary_key() -> None:CODE
LOWtests/test_field_sa_column.py75def test_sa_column_no_nullable() -> None:CODE
LOWtests/test_field_sa_column.py86def test_sa_column_no_foreign_key() -> None:CODE
LOWtests/test_field_sa_column.py124def test_sa_column_no_ondelete() -> None:CODE
LOWtests/test_main.py10def test_should_allow_duplicate_row_if_unique_constraint_is_not_passed(CODE
LOWtests/test_main.py42def test_should_allow_duplicate_row_if_unique_constraint_is_false(CODE
LOWtests/test_main.py74def test_should_raise_exception_when_try_to_duplicate_row_if_unique_constraint_is_true(CODE
LOWtests/test_main.py101def test_sa_relationship_property(database_engine: Engine):CODE
LOWtests/test_main.py135def test_composite_primary_key(database_engine: Engine):CODE
LOWtests/test_main.py161def test_composite_primary_key_and_validator(database_engine: Engine):CODE
LOWtests/test_main.py196def test_foreign_key_ondelete_with_annotated(database_engine: Engine):CODE
LOWtests/test_annotated_uuid.py7def test_annotated_optional_types(database_engine: Engine) -> None:CODE
LOWtests/test_instance_no_args.py7def test_allow_instantiation_without_arguments(database_engine: Engine):CODE
LOWtests/test_instance_no_args.py26def test_not_allow_instantiation_without_arguments_if_not_table():CODE
LOWtests/test_pydantic/test_model_dump.py23def test_polymorphic_serialization(CODE
10 more matches not shown…
Deep Nesting10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py78CODE
LOWtests/conftest.py81CODE
LOWtests/test_datetime.py200CODE
LOWscripts/docs.py144CODE
LOWscripts/docs.py271CODE
LOWsqlmodel/_compat.py123CODE
LOWsqlmodel/_compat.py175CODE
LOWsqlmodel/_compat.py217CODE
LOWsqlmodel/main.py664CODE
LOWsqlmodel/main.py1024CODE
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py75CODE
LOWsqlmodel/main.py242CODE
LOWsqlmodel/main.py291CODE
LOWsqlmodel/main.py349CODE
LOWsqlmodel/main.py388CODE
LOWsqlmodel/main.py929CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_select_typing.py61 assert type(hero_4[2]) is strCOMMENT
LOWsqlmodel/main.py861 # added (e.g. when querying from DB) to the __fields_set__, this already existsCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_fields_set.py9 email: str = "test@test.com"CODE
Modern Structural Boilerplate1 hit · 0 pts
SeverityFileLineSnippetContext
LOWscripts/docs.py247def update_docs_includes_py39_to_py310() -> None:STRING
Redundant / Tautological Comments1 hit · 0 pts
SeverityFileLineSnippetContext
LOWscripts/docs.py308 # Check if the _an counterpart (or non-_an counterpart) is referenced.STRING