Repository Analysis

calibrain/shelfmark

23.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of calibrain/shelfmark, a Python project with 3,620 GitHub stars. SynthScan v2.0 examined 158,451 lines of code across 533 source files, recording 3008 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 23.3 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).

23.3
Adjusted Score
23.3
Raw Score
100%
Time Factor
2026-07-31
Last Push
3.6K
Stars
Python
Language
158.5K
Lines of Code
533
Files
3.0K
Pattern Hits
2026-08-02
Scan Date
0.10
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 1HIGH 51MEDIUM 210LOW 2746

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 3008 distinct pattern matches across 16 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 Identifiers2252 hits · 2160 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py33def _clear_torrent_fetch_cache():CODE
LOWtests/audiobookbay/test_scraper_contract.py58def test_info_hash_is_normalized_to_canonical_btih() -> None:STRING
LOWtests/audiobookbay/test_scraper_contract.py71def test_magnet_fallback_when_info_hash_cell_is_junk() -> None:CODE
LOWtests/audiobookbay/test_scraper_contract.py80def test_missing_info_hash_returns_none_not_crash() -> None:CODE
LOWtests/audiobookbay/test_scraper_contract.py89def test_search_layout_drift_degrades_to_empty() -> None:CODE
LOWtests/audiobookbay/test_handler.py87 def test_download_uses_source_url_for_hashed_task_id(CODE
LOWtests/audiobookbay/test_handler.py126 def test_download_rejects_source_url_host_mismatch(CODE
LOWtests/audiobookbay/test_handler.py161 def test_download_allows_configured_source_url_host(CODE
LOWtests/audiobookbay/test_handler.py202 def test_download_existing_complete(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py248 def test_download_existing_in_progress(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py293 def test_download_cancellation(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py319 def test_download_no_magnet_link(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py352 def test_download_no_client_configured(CODE
LOWtests/audiobookbay/test_handler.py383 def test_download_client_add_failure(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py415 def test_download_existing_no_path(self, mock_get_client, mock_extract_magnet):CODE
LOWtests/audiobookbay/test_handler.py462 def test_category_selection_qbittorrent_audiobook(CODE
LOWtests/audiobookbay/test_handler.py506 def test_category_selection_transmission_general(CODE
LOWtests/audiobookbay/test_handler.py550 def test_category_selection_non_audiobook(CODE
LOWtests/audiobookbay/test_handler.py590 def test_cancel_returns_false(self):CODE
LOWtests/audiobookbay/test_utils.py17 def test_parse_size_kilobytes(self):CODE
LOWtests/audiobookbay/test_utils.py24 def test_parse_size_megabytes(self):CODE
LOWtests/audiobookbay/test_utils.py31 def test_parse_size_gigabytes(self):CODE
LOWtests/audiobookbay/test_utils.py37 def test_parse_size_terabytes(self):CODE
LOWtests/audiobookbay/test_utils.py42 def test_parse_size_case_insensitive(self):CODE
LOWtests/audiobookbay/test_utils.py53 def test_parse_size_empty_string(self):CODE
LOWtests/audiobookbay/test_utils.py57 def test_parse_size_invalid_format(self):CODE
LOWtests/audiobookbay/test_utils.py63 def test_parse_size_with_whitespace(self):CODE
LOWtests/audiobookbay/test_scraper.py99 def test_search_audiobookbay_success(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py126 def test_search_audiobookbay_pagination(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py145 def test_search_audiobookbay_page_one_uses_root_search_endpoint(CODE
LOWtests/audiobookbay/test_scraper.py165 def test_search_audiobookbay_bootstraps_and_reuses_session(CODE
LOWtests/audiobookbay/test_scraper.py188 def test_search_audiobookbay_empty(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py216 def test_search_audiobookbay_redirect_to_homepage(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py230 def test_search_audiobookbay_request_exception(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py244 def test_search_audiobookbay_relative_link(self, mock_config_get, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py270 def test_search_audiobookbay_protocol_relative_links(self, mock_config_get, mock_html_get):STRING
LOWtests/audiobookbay/test_scraper.py300 def test_search_audiobookbay_exact_phrase_query(self, mock_config_get, mock_html_get):STRING
LOWtests/audiobookbay/test_scraper.py322 def test_search_audiobookbay_always_uses_legacy_category_query(CODE
LOWtests/audiobookbay/test_scraper.py350 def test_extract_magnet_link_success(self, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py369 def test_extract_magnet_link_reuses_bootstrap_session(self, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py388 def test_extract_magnet_link_fallback(self, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py403 def test_extract_magnet_link_no_info_hash(self, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py425 def test_extract_magnet_link_request_exception(self, mock_html_get):CODE
LOWtests/audiobookbay/test_scraper.py436 def test_extract_magnet_link_cleans_info_hash(self, mock_html_get):CODE
LOWtests/audiobookbay/test_source.py44 def test_map_language_unknown(self):CODE
LOWtests/audiobookbay/test_source.py54 def test_map_language_with_whitespace(self):CODE
LOWtests/audiobookbay/test_source.py63 def test_parse_bitrate_to_kbps(self):CODE
LOWtests/audiobookbay/test_source.py68 def test_parse_bitrate_to_kbps_invalid(self):CODE
LOWtests/audiobookbay/test_source.py78 def test_generate_source_id_consistent(self):CODE
LOWtests/audiobookbay/test_source.py86 def test_generate_source_id_different_urls(self):CODE
LOWtests/audiobookbay/test_source.py23 def test_map_language_english(self):CODE
LOWtests/audiobookbay/test_source.py29 def test_map_language_spanish(self):CODE
LOWtests/audiobookbay/test_source.py112 def test_is_available_enabled(self, monkeypatch):CODE
LOWtests/audiobookbay/test_source.py129 def test_is_available_disabled(self, monkeypatch):CODE
LOWtests/audiobookbay/test_source.py144 def test_search_non_audiobook_content_type(self):CODE
LOWtests/audiobookbay/test_source.py165 def test_search_query_generation_manual(self, mock_search):CODE
LOWtests/audiobookbay/test_source.py192 def test_search_query_generation_from_variants(self, mock_search):CODE
LOWtests/audiobookbay/test_source.py220 def test_search_query_generation_from_title_only(self, mock_search):CODE
LOWtests/audiobookbay/test_source.py269 def test_search_relevance_filtering(self, mock_search):CODE
LOWtests/audiobookbay/test_source.py310 def test_search_result_mapping(self, mock_search):CODE
2192 more matches not shown…
Decorative Section Separators196 hits · 742 pts
SeverityFileLineSnippetContext
MEDIUMwireguard.sh250# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh252# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh525# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh528# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh638# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh640# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh848# ---------------------------------------------------------------------------COMMENT
MEDIUMwireguard.sh850# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py31# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py33# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py78# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py80# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py123# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py125# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py152# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py154# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py206# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py208# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py271# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py273# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py313# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py315# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py349# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py351# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py387# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py389# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py470# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_integration_failures.py472# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py172# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py174# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py411# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py413# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py500# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py502# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py574# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py576# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py677# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py679# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py760# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py762# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py895# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py897# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py26# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py28# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py304# =============================================================================COMMENT
MEDIUMtests/prowlarr/test_failure_scenarios.py306# =============================================================================COMMENT
MEDIUMtests/core/test_requests_service.py803# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py805# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py859# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py861# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py908# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py910# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1080# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1082# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1160# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1162# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1533# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1535# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1588# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/core/test_requests_service.py1590# ---------------------------------------------------------------------------COMMENT
136 more matches not shown…
Cross-File Repetition38 hits · 190 pts
SeverityFileLineSnippetContext
HIGHtests/audiobookbay/test_handler.py0records progress and status updates during download.STRING
HIGHtests/prowlarr/test_handler.py0records progress and status updates during download.STRING
HIGHtests/prowlarr/test_failure_scenarios.py0records progress and status updates during download.STRING
HIGHtests/prowlarr/test_integration_handler.py0records progress and status updates during download.STRING
HIGHtests/prowlarr/test_deluge_client.py0create a config.get function that returns values from a dict.STRING
HIGHtests/prowlarr/test_rtorrent_client.py0create a config.get function that returns values from a dict.STRING
HIGHtests/prowlarr/test_transmission_client.py0create a config.get function that returns values from a dict.STRING
HIGHtests/prowlarr/test_client_settings_ssl_verify.py0create a config.get function that returns values from a dict.STRING
HIGHtests/prowlarr/test_qbittorrent_settings.py0create a config.get function that returns values from a dict.STRING
HIGHtests/prowlarr/test_rtorrent_client.py0test is_configured returns true when properly configured.STRING
HIGHtests/prowlarr/test_transmission_client.py0test is_configured returns true when properly configured.STRING
HIGHtests/prowlarr/test_sabnzbd_client.py0test is_configured returns true when properly configured.STRING
HIGHtests/prowlarr/test_qbittorrent_client.py0test is_configured returns true when properly configured.STRING
HIGHtests/prowlarr/test_nzbget_client.py0test is_configured returns true when properly configured.STRING
HIGHtests/prowlarr/test_rtorrent_client.py0test is_configured returns false when different client selected.STRING
HIGHtests/prowlarr/test_transmission_client.py0test is_configured returns false when different client selected.STRING
HIGHtests/prowlarr/test_sabnzbd_client.py0test is_configured returns false when different client selected.STRING
HIGHtests/prowlarr/test_qbittorrent_client.py0test is_configured returns false when different client selected.STRING
HIGHtests/prowlarr/test_nzbget_client.py0test is_configured returns false when different client selected.STRING
HIGHtests/core/test_download_api_guardrails.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_request_routes_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_config_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_activity_terminal_snapshots.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_auth_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_cover_proxy_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_activity_routes_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_notifications_settings_api.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/core/test_releases_api_direct_provider.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHtests/e2e/test_auth_endpoints.py0import `shelfmark.main` with background thread startup disabled.STRING
HIGHshelfmark/download/clients/rtorrent.py0add torrent by url (magnet or .torrent). args: url: magnet link or .torrent url name: display name for the torrent categSTRING
HIGHshelfmark/download/clients/transmission.py0add torrent by url (magnet or .torrent). args: url: magnet link or .torrent url name: display name for the torrent categSTRING
HIGHshelfmark/download/clients/qbittorrent.py0add torrent by url (magnet or .torrent). args: url: magnet link or .torrent url name: display name for the torrent categSTRING
HIGHshelfmark/download/clients/rtorrent.py0get torrent status by hash. args: download_id: torrent info_hash returns: current download status.STRING
HIGHshelfmark/download/clients/transmission.py0get torrent status by hash. args: download_id: torrent info_hash returns: current download status.STRING
HIGHshelfmark/download/clients/qbittorrent.py0get torrent status by hash. args: download_id: torrent info_hash returns: current download status.STRING
HIGHshelfmark/download/clients/rtorrent.py0remove a torrent from qbittorrent. args: download_id: torrent info_hash delete_files: whether to also delete files returSTRING
HIGHshelfmark/download/clients/transmission.py0remove a torrent from qbittorrent. args: download_id: torrent info_hash delete_files: whether to also delete files returSTRING
HIGHshelfmark/download/clients/qbittorrent.py0remove a torrent from qbittorrent. args: download_id: torrent info_hash delete_files: whether to also delete files returSTRING
Unused Imports158 hits · 144 pts
SeverityFileLineSnippetContext
LOWtests/audiobookbay/test_scraper_contract.py15CODE
LOWtests/core/test_download_api_guardrails.py3CODE
LOWtests/core/test_request_routes_api.py3CODE
LOWtests/core/test_config_api.py3CODE
LOWtests/core/test_activity_terminal_snapshots.py3CODE
LOWtests/core/test_auth_api.py3CODE
LOWtests/core/test_config_user_overrides.py3CODE
LOWtests/core/test_config_user_overrides.py12CODE
LOWtests/core/test_config_user_overrides.py87CODE
LOWtests/core/test_onboarding.py1CODE
LOWtests/core/test_download_history_service.py3CODE
LOWtests/core/test_builtin_admin_sync.py3CODE
LOWtests/core/test_cover_proxy_api.py3CODE
LOWtests/core/test_activity_routes_api.py3CODE
LOWtests/core/test_notifications_settings_api.py3CODE
LOWtests/core/test_activity_view_state_service.py3CODE
LOWtests/core/test_releases_api_direct_provider.py3CODE
LOWtests/config/test_mirror_settings_migration.py5CODE
LOWtests/config/test_mirror_settings_migration.py117CODE
LOWtests/config/test_tor_script_rules.py1CODE
LOWtests/config/test_dns_settings_live_apply.py2CODE
LOWtests/config/test_users_settings.py3CODE
LOWtests/config/test_docker_volumes.py3CODE
LOWtests/config/test_mirror_settings_live_apply.py3CODE
LOWtests/config/test_mirror_settings_live_apply.py32CODE
LOWtests/config/test_download_settings.py160CODE
LOWtests/config/test_download_settings.py320CODE
LOWtests/config/test_entrypoint_permissions.py1CODE
LOWtests/config/test_environment.py363CODE
LOWtests/config/test_environment.py379CODE
LOWtests/config/test_environment.py395CODE
LOWtests/download/test_ssl_verify.py315CODE
LOWtests/download/test_ssl_verify.py341CODE
LOWtests/download/test_ssl_verify.py276CODE
LOWtests/download/test_orchestrator_lifecycle.py1CODE
LOWtests/download/test_orchestrator_retry.py1CODE
LOWtests/download/test_archive_extraction.py1CODE
LOWtests/download/test_postprocess_scan_blocking_io.py1CODE
LOWtests/download/test_doh_resolver_mock.py11CODE
LOWtests/download/test_fs_run_blocking_io.py1CODE
LOWtests/download/test_webseed_torrent_generator.py10CODE
LOWtests/e2e/test_proxy_auth_middleware.py3CODE
LOWtests/e2e/test_auth_endpoints.py7CODE
LOWtests/e2e/platform/suite/test_cluster_clients.py14CODE
LOWtests/e2e/platform/suite/conftest.py15CODE
LOWtests/e2e/platform/suite/test_cluster_full_pipeline.py19CODE
LOWtests/e2e/platform/suite/test_cluster_bypasser_tor.py10CODE
LOWtests/e2e/platform/suite/test_cluster_bypasser.py20CODE
LOWtests/e2e/platform/suite/test_config_matrix.py13CODE
LOWtests/e2e/platform/suite/test_cluster_search_aa.py13CODE
LOW…s/e2e/platform/suite/test_cluster_health_entrypoint.py15CODE
LOW…2e/platform/suite/test_cluster_download_permissions.py16CODE
LOWscripts/generate_env_docs.py351CODE
LOWscripts/generate_env_docs.py352CODE
LOWscripts/generate_env_docs.py353CODE
LOWscripts/generate_env_docs.py354CODE
LOWscripts/generate_env_docs.py355CODE
LOWscripts/generate_env_docs.py356CODE
LOWscripts/generate_env_docs.py357CODE
LOWshelfmark/core/request_validation.py3CODE
98 more matches not shown…
Excessive Try-Catch Wrapping107 hits · 108 pts
SeverityFileLineSnippetContext
LOWtests/prowlarr/test_integration_failures.py91 except Exception:CODE
LOWtests/prowlarr/test_integration_failures.py104 except Exception:CODE
LOWtests/prowlarr/test_integration_failures.py118 except Exception:CODE
LOWtests/prowlarr/test_integration_failures.py264 except Exception:CODE
LOWtests/prowlarr/test_integration_failures.py240 except Exception as e:CODE
LOWtests/prowlarr/test_integration_clients.py190 except Exception:CODE
LOWtests/prowlarr/test_integration_clients.py207 except Exception:CODE
LOWtests/prowlarr/test_integration_clients.py221 except Exception:CODE
LOWtests/prowlarr/test_integration_clients.py236 except Exception:CODE
LOWtests/prowlarr/test_integration_clients.py252 except Exception:CODE
LOWtests/prowlarr/test_integration_clients.py267 except Exception:CODE
LOWtests/prowlarr/test_integration_handler.py49 except Exception:CODE
LOWtests/prowlarr/test_cache.py112 except Exception as e:CODE
MEDIUMtests/prowlarr/test_cache.py105def cache_operations():CODE
MEDIUMdocs/dev/release-sources-plugin-guide.md304def download(self, task, cancel_flag, progress_callback, status_callback):CODE
MEDIUMdocs/dev/release-sources-plugin-guide.md847def download(self, task, cancel_flag, progress_callback, status_callback):CODE
LOWdocs/dev/release-sources-plugin-guide.md1032 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md226 except Exception:CODE
LOWdocs/dev/release-sources-plugin-guide.md345 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md604 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md837 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md852 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md1079 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md1264 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md1268 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md1342 except Exception:CODE
LOWdocs/dev/release-sources-plugin-guide.md1349 except Exception as e:CODE
LOWdocs/dev/release-sources-plugin-guide.md1402except Exception:CODE
LOWdocs/dev/plugin-settings.md175 except Exception as e:CODE
LOWdocs/dev/plugin-settings.md368 except Exception as e:CODE
LOWdocs/dev/plugin-settings.md477 except Exception as e:CODE
LOWscripts/bypasser_permission_lab.sh102 except Exception as e:CODE
LOWscripts/bypasser_permission_lab.sh113 except Exception as e:CODE
LOWscripts/generate_env_docs.py100 except Exception:CODE
LOWscripts/test_clients.py137 except Exception as e:CODE
LOWscripts/test_clients.py164 except Exception as e:CODE
LOWscripts/test_clients.py202 except Exception as e:CODE
LOWscripts/test_clients.py266 except Exception as e:CODE
LOWscripts/test_clients.py324 except Exception as e:CODE
LOWscripts/test_clients.py426 except Exception as e:CODE
LOWscripts/test_clients.py518 except Exception as e:CODE
LOWshelfmark/core/admin_routes.py420 except Exception:CODE
LOWshelfmark/core/onboarding.py64 except Exception:CODE
LOWshelfmark/core/onboarding.py739 except Exception as e:CODE
LOWshelfmark/core/oidc_routes.py247 except Exception:CODE
LOWshelfmark/core/oidc_routes.py313 except Exception:CODE
LOWshelfmark/core/oidc_routes.py367 except Exception:CODE
LOWshelfmark/core/requests_service.py593 except Exception:CODE
LOWshelfmark/core/settings_registry.py1179 except Exception as e:CODE
LOWshelfmark/core/settings_registry.py450 except Exception:CODE
LOWshelfmark/core/settings_registry.py509 except Exception:CODE
LOWshelfmark/core/settings_registry.py515 except Exception:CODE
LOWshelfmark/core/settings_registry.py818 except Exception:CODE
LOWshelfmark/core/settings_registry.py1312 except Exception as e:CODE
LOWshelfmark/config/security_handlers.py145 except Exception as exc:CODE
LOWshelfmark/config/migrations.py130 except Exception:CODE
LOWshelfmark/config/migrations.py148 except Exception:CODE
LOWshelfmark/config/settings.py345 except Exception as e:CODE
LOWshelfmark/config/settings.py371 except Exception as e:CODE
LOWshelfmark/config/booklore_settings.py136 except Exception:CODE
47 more matches not shown…
Deep Nesting113 hits · 87 pts
SeverityFileLineSnippetContext
LOWtests/prowlarr/test_integration_clients.py174CODE
LOWtests/core/test_download_api_guardrails.py662CODE
LOWtests/core/test_request_routes_api.py70CODE
LOWtests/core/test_request_routes_api.py101CODE
LOWtests/core/test_request_routes_api.py132CODE
LOWtests/core/test_request_routes_api.py162CODE
LOWtests/core/test_request_routes_api.py218CODE
LOWtests/core/test_request_routes_api.py290CODE
LOWtests/core/test_request_routes_api.py357CODE
LOWtests/core/test_request_routes_api.py404CODE
LOWtests/core/test_request_routes_api.py449CODE
LOWtests/core/test_request_routes_api.py517CODE
LOWtests/core/test_request_routes_api.py746CODE
LOWtests/core/test_request_routes_api.py790CODE
LOWtests/core/test_request_routes_api.py835CODE
LOWtests/core/test_request_routes_api.py878CODE
LOWtests/core/test_request_routes_api.py1231CODE
LOWtests/core/test_request_routes_api.py1286CODE
LOWtests/core/test_request_routes_api.py1342CODE
LOWtests/core/test_request_routes_api.py1405CODE
LOWtests/core/test_request_routes_api.py1468CODE
LOWtests/core/test_request_routes_api.py1573CODE
LOWtests/core/test_request_routes_api.py1624CODE
LOWtests/core/test_request_routes_api.py1692CODE
LOWtests/core/test_request_routes_api.py1930CODE
LOWtests/core/test_request_routes_api.py2525CODE
LOWtests/core/test_request_routes_api.py2577CODE
LOWtests/core/test_request_routes_api.py2720CODE
LOWtests/core/test_request_routes_api.py2776CODE
LOWtests/core/test_request_routes_api.py2931CODE
LOWtests/core/test_request_routes_api.py2962CODE
LOWtests/core/test_request_routes_api.py2990CODE
LOWtests/core/test_request_routes_api.py3018CODE
LOWtests/core/test_request_routes_api.py3049CODE
LOWtests/core/test_request_routes_api.py3077CODE
LOWtests/core/test_request_routes_api.py3125CODE
LOWtests/core/test_processing_integration.py925CODE
LOWtests/config/test_security.py43CODE
LOWtests/config/test_security.py83CODE
LOWtests/config/test_security.py121CODE
LOWtests/config/test_security.py142CODE
LOWtests/config/test_security.py176CODE
LOWtests/config/test_security.py210CODE
LOWtests/config/test_security.py234CODE
LOWtests/config/test_security.py282CODE
LOWtests/e2e/test_download_flow.py103CODE
LOWtests/e2e/test_auth_flow.py88CODE
LOWtests/e2e/test_prowlarr_flow.py170CODE
LOWtests/e2e/platform/suite/conftest.py92CODE
LOWscripts/test_clients.py142CODE
LOWscripts/test_clients.py329CODE
LOWshelfmark/core/queue.py95CODE
LOWshelfmark/core/queue.py192CODE
LOWshelfmark/core/queue.py263CODE
LOWshelfmark/core/queue.py334CODE
LOWshelfmark/core/admin_settings_routes.py36CODE
LOWshelfmark/core/admin_settings_routes.py155CODE
LOWshelfmark/core/admin_settings_routes.py281CODE
LOWshelfmark/core/naming.py141CODE
LOWshelfmark/core/onboarding.py571CODE
53 more matches not shown…
Docstring Block Structure13 hits · 65 pts
SeverityFileLineSnippetContext
HIGHshelfmark/download/fs.py181Write data to a file with atomic collision detection. If the destination already exists, retries with counter suffiSTRING
HIGHshelfmark/download/fs.py401Move a file with collision detection. Uses os.rename() for same-filesystem moves (atomic, triggers inotify events),STRING
HIGHshelfmark/download/fs.py554Create a hardlink with atomic collision detection. Args: source_path: Source file to link from destSTRING
HIGHshelfmark/download/fs.py606Copy a file with atomic collision detection. Uses a temp file in the destination directory and publishes it via renSTRING
HIGHshelfmark/download/clients/nzbget.py74Make a JSON-RPC call to NZBGet. Args: method: RPC method name params: Method parametersSTRING
HIGHshelfmark/download/clients/nzbget.py137Add NZB by URL. Fetches the NZB content from the URL (e.g., Prowlarr proxy) and sends it base64-encodedSTRING
HIGHshelfmark/download/clients/__init__.py286Add a download to the client. Args: url: Download URL (magnet link, .torrent URL, or NZB URL) STRING
HIGHshelfmark/download/clients/rtorrent.py151Add torrent by URL (magnet or .torrent). Args: url: Magnet link or .torrent URL name: DSTRING
HIGHshelfmark/download/clients/sabnzbd.py160Make an API call to SABnzbd. Args: mode: API mode (e.g., "version", "addurl", "queue", "history") STRING
HIGHshelfmark/download/clients/sabnzbd.py338Add NZB by URL. Args: url: NZB URL (can be Prowlarr proxy URL) name: Display name for tSTRING
HIGHshelfmark/download/clients/transmission.py217Add torrent by URL (magnet or .torrent). Args: url: Magnet link or .torrent URL name: DSTRING
HIGHshelfmark/download/clients/qbittorrent.py443Add torrent by URL (magnet or .torrent). Args: url: Magnet link or .torrent URL name: DSTRING
HIGHshelfmark/release_sources/direct_download.py543Search for books matching the query. Args: query: Search term (ISBN, title, author, etc.) filters: STRING
Fake / Example Data43 hits · 47 pts
SeverityFileLineSnippetContext
LOWtests/core/test_requests_service.py1628 "author": "Jane Doe",CODE
LOWtests/core/test_requests_service.py43 "author": "Jane Doe",CODE
LOWtests/core/test_requests_service.py198 "author": "Jane Doe",CODE
LOWtests/core/test_requests_service.py842 "author": "Jane Doe",CODE
LOWtests/core/test_oidc_auth.py76 id_token = {"email": "user@example.com"}CODE
LOWtests/core/test_oidc_auth.py128 "name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py134 assert info["display_name"] == "John Doe"CODE
LOWtests/core/test_oidc_auth.py143 "name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py177 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py192 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py204 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py217 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py235 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py251 "display_name": "John Doe",CODE
LOWtests/core/test_oidc_auth.py272 "display_name": "John Doe",CODE
LOWtests/core/test_user_db.py507 display_name="John Doe",CODE
LOWtests/core/test_user_db.py512 assert user["display_name"] == "John Doe"CODE
LOWtests/core/test_cwa_user_sync.py23 email="admin@example.com",CODE
LOWtests/core/test_cwa_user_sync.py31 cwa_email="admin@example.com",CODE
LOWtests/core/test_oidc_routes.py203 "name": "John Doe",CODE
LOWtests/core/test_oidc_routes.py228 "name": "John Doe",CODE
LOWtests/core/test_oidc_routes.py253 "name": "John Doe",CODE
LOWtests/core/test_oidc_routes.py282 "email": "admin@example.com",CODE
LOWtests/config/test_download_settings.py191 assert bound_fields[0]["placeholder"] == "{Author}/{Series/}{Title} ({Year})"CODE
LOWshelfmark/core/settings_registry.py1033 result["placeholder"] = field.placeholderCODE
LOWshelfmark/core/settings_registry.py1037 result["placeholder"] = field.placeholderCODE
LOWshelfmark/core/settings_registry.py1056 result["placeholder"] = field.placeholderCODE
LOWshelfmark/config/notifications_settings.py291 "placeholder": "Select events...",CODE
LOWshelfmark/config/notifications_settings.py297 "placeholder": "e.g. ntfys://ntfy.sh/shelfmark",CODE
LOWshelfmark/config/notifications_settings.py326 "placeholder": "Select events...",CODE
LOWshelfmark/config/notifications_settings.py332 "placeholder": "e.g. ntfys://ntfy.sh/username-topic",CODE
LOWshelfmark/config/security.py201 "placeholder": "https://auth.example.com/.well-known/openid-configuration",CODE
LOWshelfmark/config/security.py211 "placeholder": "shelfmark",CODE
LOWshelfmark/config/security.py239 "placeholder": "groups",CODE
LOWshelfmark/config/security.py249 "placeholder": "shelfmark-admins",CODE
LOWshelfmark/config/security.py277 "placeholder": "Sign in with OIDC",CODE
LOWshelfmark/config/users_settings.py159 "placeholder": "Select source...",CODE
LOWshelfmark/config/users_settings.py167 "placeholder": "Select content type...",CODE
LOWshelfmark/config/users_settings.py176 "placeholder": "Select mode...",CODE
LOWshelfmark/config/settings.py1194 placeholder="user@example.com",CODE
LOWshelfmark/metadata_providers/__init__.py141 "placeholder": getattr(search_field, "placeholder", ""),CODE
LOWsrc/frontend/src/components/settings/users/UserCard.tsx369 const emailField = createTextField('email', 'Email', form.email, 'user@example.com');CODE
LOWsrc/frontend/src/components/settings/users/UserCard.tsx482 const emailField = createTextField('email', 'Email', user.email || '', 'user@example.com');CODE
Redundant / Tautological Comments30 hits · 46 pts
SeverityFileLineSnippetContext
LOWtor.sh31# Check if EXT_BYPASSER_URL is definedCOMMENT
LOWtor.sh279# Check if outgoing IP is using TorCOMMENT
LOWgenDebug.sh65# Check if IPv6 is enabledCOMMENT
LOWgenDebug.sh126# Check if running in DockerCOMMENT
LOWtests/e2e/test_download_flow.py346 # Check if it erroredCOMMENT
LOWshelfmark/main.py820 # Check if user has a valid sessionCOMMENT
LOWshelfmark/main.py1653 # Check if caching is enabledCOMMENT
LOWshelfmark/main.py2074 # Check if account is locked due to failed login attemptsCOMMENT
LOWshelfmark/main.py2163 # Check if user exists and password is correctCOMMENT
LOWshelfmark/main.py2167 # Check if user has admin role (ROLE_ADMIN = 1, bit flag)COMMENT
LOWshelfmark/main.py2264 # Check if user has a valid sessionCOMMENT
LOWshelfmark/core/queue.py104 # Check if task was cancelled while in queueCOMMENT
LOWshelfmark/core/admin_routes.py221 # Check if username already existsCOMMENT
LOWshelfmark/core/cache.py148 # Check if metadata caching is enabledCOMMENT
LOWshelfmark/core/utils.py248 # Check if content-type routing is enabled (new or legacy setting)COMMENT
LOWshelfmark/core/utils.py301 # Check if cover caching is enabledCOMMENT
LOWshelfmark/core/settings_registry.py1174 # Check if callback accepts current_values parameterCOMMENT
LOWshelfmark/core/settings_registry.py472 # Check if config directory exists and is writableCOMMENT
LOWshelfmark/download/network.py507 # Check if hostname is already an IP address, no need to resolveCOMMENT
LOWshelfmark/download/network.py512 # Check if hostname is a private IP address, and skip DoH if it isCOMMENT
LOWshelfmark/download/network.py1166 # Check if it looks like IP addressesCOMMENT
LOWshelfmark/download/clients/torrent_utils.py226 # Check if response is actually a magnet link (text response)COMMENT
LOWshelfmark/download/clients/base_handler.py788 # Check if this download already exists in the clientCOMMENT
LOWshelfmark/metadata_providers/__init__.py554 # Check if the provider is enabledCOMMENT
LOWshelfmark/release_sources/direct_download.py1372 # Check if we've hit the failure thresholdCOMMENT
LOWshelfmark/release_sources/audiobookbay/scraper.py218 # Check if we were redirected to the homepage (search was rejected/blocked)COMMENT
LOWshelfmark/release_sources/irc/client.py297 # Check if user has an elevated prefixCOMMENT
LOWshelfmark/release_sources/irc/client.py325 # Check if we have a complete line in bufferCOMMENT
LOWshelfmark/release_sources/irc/connection_manager.py133 # Check if we need to join a different channelCOMMENT
LOWshelfmark/release_sources/irc/connection_manager.py142 # Check if another thread is already connectingCOMMENT
Self-Referential Comments10 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMgenDebug.sh190# Create the zip file directly from LOG_DIRCOMMENT
MEDIUMtests/conftest.py20# Create the directories that will be usedCOMMENT
MEDIUMtests/conftest.py90 # Create a mock config moduleCOMMENT
MEDIUMtests/prowlarr/test_handler.py830 # Create a test fileCOMMENT
MEDIUMtests/prowlarr/test_bencode.py166 # Create a minimal valid v1 torrent structure (has 'pieces' key)COMMENT
MEDIUMtests/prowlarr/test_remote_path_mappings.py401 # Create a local file that represents the mounted pathCOMMENT
MEDIUMtests/prowlarr/test_remote_path_mappings.py481 # Create a local file that represents the mounted pathCOMMENT
MEDIUMtests/core/test_oidc_auth.py265 # Create a local user with the same usernameCOMMENT
MEDIUMtests/core/test_naming.py570 # Create the directory structureCOMMENT
MEDIUMshelfmark/download/orchestrator.py274 # Create a source-agnostic download task from release dataCOMMENT
Modern Structural Boilerplate26 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/core/test_request_routes_api.py29def _set_session(client, *, user_id: str, db_user_id: int | None, is_admin: bool) -> None:CODE
LOWtests/core/test_config_api.py27def _set_session(client, *, user_id: str, db_user_id: int, is_admin: bool) -> None:CODE
LOWtests/core/test_activity_routes_api.py29def _set_session(client, *, user_id: str, db_user_id: int | None, is_admin: bool) -> None:CODE
LOWtests/core/test_notifications_settings_api.py32def _set_session(client, *, user_id: str, db_user_id: int, is_admin: bool) -> None:CODE
LOWtests/config/test_security.py18def _set_config_dir(monkeypatch, config_dir: Path) -> None:CODE
LOWshelfmark/core/queue.py127 def _update_status(self, book_id: str, status: QueueStatus) -> None:CODE
LOWshelfmark/core/queue.py148 def update_status(self, book_id: str, status: QueueStatus) -> None:CODE
LOWshelfmark/core/queue.py174 def update_download_path(self, task_id: str, download_path: str) -> None:CODE
LOWshelfmark/core/queue.py180 def update_progress(self, task_id: str, progress: float) -> None:CODE
LOWshelfmark/core/queue.py186 def update_status_message(self, task_id: str, message: str) -> None:CODE
LOWshelfmark/core/admin_routes.py52__all__ = [CODE
LOWshelfmark/core/__init__.py7__all__ = [CODE
LOWshelfmark/core/user_db.py364 def update_user(self, user_id: int, **kwargs: object) -> None:CODE
LOWshelfmark/core/user_db.py451 def set_user_settings(self, user_id: int, settings: dict[str, Any]) -> None:CODE
LOWshelfmark/download/orchestrator.py748def update_download_progress(book_id: str, progress: float) -> None:CODE
LOWshelfmark/download/orchestrator.py791def update_download_status(book_id: str, status: str, message: str | None = None) -> None:CODE
LOWshelfmark/download/network.py249def _set_runtime_dns_state(servers: list[str], doh_server: str) -> None:CODE
LOWshelfmark/download/network.py491 def _set_cached(self, hostname: str, record_type: str, ips: list[str]) -> None:CODE
LOWshelfmark/download/clients/transmission.py85def _set_transmission_protocol_if_supported(client: object, protocol: str) -> None:CODE
LOWshelfmark/download/clients/settings.py95def _set_transmission_protocol_if_supported(client: object, protocol: str) -> None:CODE
LOWshelfmark/download/postprocess/__init__.py13__all__ = ["post_process_download"]CODE
LOWshelfmark/download/postprocess/pipeline.py57__all__ = [CODE
LOWshelfmark/api/websocket.py16logger = logging.getLogger(__name__)CODE
LOWshelfmark/api/websocket.py64 def set_queue_status_fn(self, fn: Callable) -> None:CODE
LOWshelfmark/api/websocket.py78 def _set_sid_room_locked(self, sid: str, room: str | None) -> None:CODE
LOWshelfmark/release_sources/prowlarr/handler.py59__all__ = [CODE
Over-Commented Block17 hits · 16 pts
SeverityFileLineSnippetContext
LOWdocker-compose.test-clients.yml1# Test stack for download client developmentCOMMENT
LOWwireguard.sh1#!/bin/bashCOMMENT
LOWwireguard.sh21# lookups use a defined resolver instead of the container'sCOMMENT
LOWwireguard.sh41# loopback, the tunnel device and the LAN allowlist. Set trueCOMMENT
LOWwireguard.sh221 PATH="${SYSCTL_SHIM_DIR}:${PATH}" wg-quick "$@"COMMENT
LOWwireguard.sh241COMMENT
LOWwireguard.sh261# the config file: after wg-quick is up these are always concrete resolvedCOMMENT
LOWwireguard.sh301 fiCOMMENT
LOWwireguard.sh321# re-runnable after a bounce.COMMENT
LOWwireguard.sh421# closed at all times: during the (app-traffic-free) build window, and if anyCOMMENT
LOWwireguard.sh521 ip6tables -A OUTPUT -j DROPCOMMENT
LOWwireguard.sh541 DNS_TO_USE="$(echo "$DNS_TO_USE" | tr ',' ' ' | xargs || true)"COMMENT
LOWwireguard.sh581 echo "[*] Enforcing resolver(s): $DNS_TO_USE"COMMENT
LOWwireguard.sh701COMMENT
LOWwireguard.sh721#COMMENT
LOWcompose/docker-compose.wireguard.yml1# Routes all traffic through a WireGuard tunnel - requires root startup.COMMENT
LOWtests/e2e/platform/docker-compose.e2e.yml1# Shelfmark e2e Docker testing platformCOMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALtests/prowlarr/test_rtorrent_client.py38 client._rpc.d.custom1.set.assert_called_once_with("ABC123", "imported")CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMshelfmark/release_sources/irc/parser.py22# This comprehensive list is used to identify file extensions in results.COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdocker-compose.test-clients.yml4# Usage:COMMENT
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/core/test_activity_routes_api.py44CODE
LOWshelfmark/core/external_user_linking.py188CODE