Repository Analysis

lektor/lektor

The lektor static file content management system

9.4 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of lektor/lektor, a Python project with 3,946 GitHub stars. SynthScan v2.0 examined 47,253 lines of code across 369 source files, recording 371 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 9.4 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).

9.4
Adjusted Score
9.4
Raw Score
100%
Time Factor
2026-08-08
Last Push
3.9K
Stars
Python
Language
47.3K
Lines of Code
369
Files
371
Pattern Hits
2026-08-09
Scan Date
0.03
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 10MEDIUM 6LOW 355

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 371 distinct pattern matches across 15 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 Identifiers241 hits · 254 pts
SeverityFileLineSnippetContext
LOWfrontend/js/widgets.tsx119export function getWidgetComponentWithFallback(CODE
LOWfrontend/js/shortcut-keys.ts132export function installShortcutKeyListener(keymap: ShortcutKeyMap) {CODE
LOWfrontend/js/shortcut-keys.ts160export function deserializeShortcutKeyMap(obj: unknown): ShortcutKeyMap {CODE
LOWfrontend/js/widgets/SingleLineTextInputWidget.tsx7export function SingleLineTextInputWidget(CODE
LOWtests/test_videotools.py51def test_get_ffmpeg_quality_bad_range(in_quality):CODE
LOWtests/test_videotools.py64def test_dimensions_aspect_ratio(dim, ar):CODE
LOWtests/test_videotools.py76def test_dimensions_fit_within(source, target, upscale, rescale):CODE
LOWtests/test_videotools.py127def test_dimensions_invalid_resize():CODE
LOWtests/test_reporter.py24def test_describe_build_func_describes_partial():CODE
LOWtests/test_reporter.py37def test_describe_build_func_deals_with_garbage():CODE
LOWtests/test_utils.py220def test_url_builder_dot_handling():CODE
LOWtests/test_utils.py267def test_make_relative_url_relative_source_absolute_target():CODE
LOWtests/test_utils.py285def test_atomic_open_exception(tmp_path):CODE
LOWtests/test_utils.py308def test_atomic_open_respects_umask(tmp_path, umask):CODE
LOWtests/test_utils.py316def test_atomic_open_raises_on_bad_mode(tmp_path, mode):CODE
LOWtests/test_utils.py333def test_create_temp_respects_umask(tmp_path, mode, umask):CODE
LOWtests/test_utils.py406def test_deprecated_classmethod():CODE
LOWtests/test_utils.py423def test_deprecated_raises_type_error():CODE
LOWtests/test_utils.py428def test_deprecated_stacklevel():CODE
LOWtests/test_utils.py456def test_untrusted_to_os_path(db_path, expected):CODE
LOWtests/test_issue_410.py41def test_build_childless_page(scratch_builder):CODE
LOWtests/test_pagination.py46def test_unpaginated_children(pad):CODE
LOWtests/test_pagination.py82def test_pagination_attributes(pad):CODE
LOWtests/test_pagination.py103def test_url_matching_for_pagination(pad):CODE
LOWtests/test_pagination.py125def test_pagination_url_paths(pad):CODE
LOWtests/test_pagination.py141def test_unpaginated_children_other_alt(pad):CODE
LOWtests/test_pagination.py177def test_url_matching_for_alt_pagination(pad):CODE
LOWtests/test_pagination.py190def test_pagination_items_filter(pad):CODE
LOWtests/test_pagination.py211def test_virtual_path_behavior(pad):CODE
LOWtests/conftest.py261def child_sources_test_project_builder(tmp_path, data_path, save_sys_path):CODE
LOWtests/test_unicode.py22def test_unicode_project_folder(pad, builder):CODE
LOWtests/test_unicode.py28def test_unicode_attachment_filename(pad, builder):CODE
LOWtests/test_packages.py153def test_update_cache_installs_requirements(CODE
LOWtests/test_packages.py165def test_update_cache_skips_install_if_up_to_date(CODE
LOWtests/test_packages.py178def test_update_cache_removes_package_cache_if_no_requirements(tmp_path: Path) -> None:CODE
LOWtests/test_packages.py186def test_load_packages_add_package_cache_to_sys_path(env: Environment) -> None:CODE
LOWtests/test_packages.py197def test_load_packages_reinstall_wipes_cache(CODE
LOWtests/test_assets.py60def test_asset_source_filename(asset, pad, asset_path):CODE
LOWtests/test_assets.py87def test_asset_url_content_path(asset, expected):CODE
LOWtests/test_assets.py117def test_asset_children_no_children_if_dir_unreadable(asset):CODE
LOWtests/test_assets.py150def test_asset_get_child_from_url_param_deprecated(asset):CODE
LOWtests/test_assets.py202def test_directory_merges_subdirectories(asset_root, asset_paths):CODE
LOWtests/test_assets.py214def test_directory_file_shadows_directory(asset_root, asset_paths):CODE
LOWtests/test_assets.py228def test_directory_directory_conflicts_with_file(asset_root, asset_paths):CODE
LOWtests/test_tree.py89def test_tree_item_can_be_deleted(tree, path, expect):CODE
LOWtests/test_tree.py103def test_tree_item_is_visible(tree, path, expect):CODE
LOWtests/test_tree.py116def test_tree_item_is_attachment(tree, path, is_attachment, attachment_type):CODE
LOWtests/test_tree.py130def test_tree_item_can_have_children(tree, path, expect):CODE
LOWtests/test_tree.py164def test_tree_implied_child_datamodel(tree, path, expect):CODE
LOWtests/test_tree.py215def test_tree_item_get_children(tree, path, offset, limit, order_by, expect):CODE
LOWtests/test_tree.py264def test_tree_item_iter_subpages(tree, path, order_by, expect):CODE
LOWtests/test_tree.py284def test_tree_item_iter_attachments(tree, path, expect):CODE
LOWtests/test_tree.py297def test_tree_item_get_order_by(tree, path, order_by, expect):CODE
LOWtests/test_tree.py359def test_alt_is_primary_overlay(tree, alt, expect):CODE
LOWtests/test_quickstart.py32def test_default_author_from_pwd(mocker):CODE
LOWtests/test_quickstart.py40def test_default_author_from_username(mocker):CODE
LOWtests/test_quickstart.py48def test_default_author_email(git_config_file):CODE
LOWtests/test_quickstart.py61def test_default_author_email_no_default(monkeypatch):CODE
LOWtests/test_db.py31def test_project_implied_model(pad):CODE
LOWtests/test_db.py37def test_child_query_visibility_setting(pad):CODE
181 more matches not shown…
Cross-Language Confusion9 hits · 50 pts
SeverityFileLineSnippetContext
HIGHtests/conftest.py281 reporter.push()CODE
HIGHtests/test_prev_next_sibling.py55 reporter.push()CODE
HIGHlektor/reporter.py41 _reporter_stack.push(self)CODE
HIGHlektor/reporter.py48 self.push()CODE
HIGHlektor/builder.py960 ctx.push()CODE
HIGHlektor/context.py136 _ctx_stack.push(self)CODE
HIGHlektor/context.py143 self.push()CODE
HIGHlektor/types/base.py10def get_undefined_info(undefined):CODE
HIGHlektor/types/base.py11 if isinstance(undefined, Undefined):CODE
Unused Imports47 hits · 47 pts
SeverityFileLineSnippetContext
LOWtests/test_pluginsystem.py3CODE
LOWtests/test_watcher.py1CODE
LOWtests/imagetools/test_exif.py1CODE
LOWtests/imagetools/test_thumbnail.py1CODE
LOWtests/imagetools/test_image_info.py1CODE
LOWtests/admin/test_serve.py1CODE
LOWlektor/devserver.py1CODE
LOWlektor/db.py2CODE
LOWlektor/cli_utils.py2CODE
LOWlektor/compat.py1CODE
LOWlektor/packages.py1CODE
LOWlektor/pluginsystem.py1CODE
LOWlektor/builder.py1CODE
LOWlektor/utils.py1CODE
LOWlektor/assets.py1CODE
LOWlektor/watcher.py1CODE
LOWlektor/publisher.py1CODE
LOWlektor/sourceobj.py1CODE
LOWlektor/project.py1CODE
LOWlektor/imagetools/image_info.py3CODE
LOWlektor/imagetools/thumbnail.py3CODE
LOWlektor/imagetools/__init__.py1CODE
LOWlektor/imagetools/__init__.py6CODE
LOWlektor/imagetools/__init__.py8CODE
LOWlektor/imagetools/__init__.py9CODE
LOWlektor/imagetools/__init__.py10CODE
LOWlektor/imagetools/__init__.py11CODE
LOWlektor/imagetools/exif.py3CODE
LOWlektor/imagetools/_compat.py3CODE
LOWlektor/types/__init__.py1CODE
LOWlektor/types/__init__.py2CODE
LOWlektor/types/__init__.py3CODE
LOWlektor/types/__init__.py4CODE
LOWlektor/markdown/controller.py23CODE
LOWlektor/markdown/mistune2.py3CODE
LOWlektor/markdown/__init__.py22CODE
LOWlektor/admin/webui.py1CODE
LOWlektor/admin/__init__.py1CODE
LOWlektor/admin/context.py1CODE
LOWlektor/admin/modules/serve.py1CODE
LOWlektor/admin/modules/livereload.py1CODE
LOWlektor/environment/__init__.py1CODE
LOWlektor/environment/__init__.py21CODE
LOWlektor/environment/__init__.py22CODE
LOWlektor/environment/__init__.py23CODE
LOWlektor/environment/__init__.py24CODE
LOWlektor/environment/__init__.py25CODE
Excessive Try-Catch Wrapping21 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/test_buildfailures.py33 except Exception:CODE
LOWtests/test_buildfailures.py56 except Exception:CODE
LOWtests/test_buildfailures.py88 except Exception:CODE
MEDIUMtests/test_buildfailures.py53def test_failure_controller(failure_controller):CODE
LOWtests/admin/test_serve.py274 except Exception:CODE
LOWlektor/devserver.py72 except Exception:CODE
LOWlektor/datamodel.py329 except Exception:CODE
LOWlektor/datamodel.py349 except Exception as exc:CODE
LOWlektor/utils.py631 except Exception:CODE
LOWlektor/publisher.py382 except Exception as e:CODE
LOWlektor/publisher.py395 except Exception as e:CODE
LOWlektor/publisher.py406 except Exception as e:CODE
LOWlektor/publisher.py484 except Exception as e:CODE
LOWlektor/publisher.py488 except Exception as e:CODE
LOWlektor/publisher.py496 except Exception as e:CODE
LOWlektor/publisher.py504 except Exception as e:CODE
MEDIUMlektor/publisher.py477def rename_file(self, src, dst):CODE
LOWlektor/types/primitives.py110 except Exception:CODE
LOWlektor/types/multi.py87 except Exception:CODE
LOWlektor/types/base.py14 except Exception as e:CODE
LOWlektor/environment/__init__.py114 except Exception as exc:CODE
Deep Nesting23 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests/test_tree.py18CODE
LOWlektor/db.py598CODE
LOWlektor/db.py1134CODE
LOWlektor/db.py1302CODE
LOWlektor/db.py1358CODE
LOWlektor/db.py1455CODE
LOWlektor/db.py1493CODE
LOWlektor/reporter.py342CODE
LOWlektor/builder.py546CODE
LOWlektor/builder.py1177CODE
LOWlektor/builder.py1285CODE
LOWlektor/metaformat.py18CODE
LOWlektor/cli.py94CODE
LOWlektor/utils.py239CODE
LOWlektor/utils.py366CODE
LOWlektor/assets.py133CODE
LOWlektor/publisher.py549CODE
LOWlektor/sourceobj.py106CODE
LOWlektor/quickstart.py113CODE
LOWlektor/types/multi.py78CODE
LOWlektor/types/flow.py17CODE
LOWlektor/environment/__init__.py162CODE
LOWlektor/environment/__init__.py196CODE
Self-Referential Comments3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_pluginsystem.py195 # Create a plugin with no associated distribution.COMMENT
MEDIUMtests/test_buildfailures.py76 # Create a directory in the location that FailureController wantsCOMMENT
MEDIUMlektor/builder.py678 """This class represents a build artifact."""STRING
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHfrontend/js/widgets/MultiLineTextInputWidget.tsx51 * @return True if we are on a touch deviceCOMMENT
AI Slop Vocabulary5 hits · 7 pts
SeverityFileLineSnippetContext
LOWlektor/db.py1076 # child_config.order_by, but for now, just return None.COMMENT
LOWlektor/db.py1549 # The alternative system is not configured, just returnCOMMENT
LOWlektor/db.py1743 # not allowed but one was passed, we just return `None`.COMMENT
MEDIUMlektor/publisher.py102 """A wrapper around subprocess.Popen to facilitate streaming output via generator.STRING
LOWlektor/imagetools/thumbnail.py450 # resize anything, we just return it. This is not ideal but it'sCOMMENT
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtox.ini41# WARNING: Skipping page https://pypi.org/simple/coverage/ because the GET requestCOMMENT
LOWtests/test_themes.py101 # only exist in themes-project assets will be loaded from thereCOMMENT
LOWlektor/db.py2061 """COMMENT
LOWlektor/build_programs.py201 child_sources = []COMMENT
LOWlektor/imagetools/thumbnail.py281 # XXX: The old imagemagick code (which ran `convert` with `-strip -colorspace sRGB`)COMMENT
LOWlektor/imagetools/thumbnail.py341 #COMMENT
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOWlektor/compat.py16__all__ = ["werkzeug_urls_URL"]CODE
LOWlektor/publisher.py714 def set_ssh_credentials(self, credentials: Mapping[str, str]) -> None:CODE
LOWlektor/publisher.py725 def set_https_credentials(self, credentials: Mapping[str, str]) -> None:CODE
LOWlektor/imagetools/__init__.py14__all__ = [CODE
LOWlektor/imagetools/_compat.py15__all__ = ["ExifTags", "Transpose", "UnidentifiedImageError"]CODE
LOWlektor/admin/__init__.py4__all__ = ["WebAdmin"]CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWlektor/datamodel.py99 # Check if we have a cached versionCOMMENT
LOWlektor/videotools.py84 # Check if we should rescale at allCOMMENT
LOWlektor/videotools.py120 # Check if we should rescale at allCOMMENT
LOWlektor/videotools.py153 # Check if we should rescale at allCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_devcli.py116 def test_function():STRING
LOWlektor/db.py1516 def process_data(self, data, datamodel, pad):CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWlektor/builder.py358 # If we do have an already existing artifact, we need to check ifCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_devcli.py39 email = "jrh@example.org"CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWlektor/datamodel.py232CODE