AI Slop Code RIsk Monitor

happycola233/tchMaterial-parser

国家中小学智慧教育平台 电子课本下载工具,帮助您从智慧教育平台中获取电子课本的 PDF 文件网址并进行下载,让您更方便地获取课本内容。

36.1 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for happycola233/tchMaterial-parser, a Python project with 7,093 GitHub stars. SynthScan examined 6,852 lines of code across 50 source files, recording 188 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 36.1 (High 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.

36.1
Adjusted Signal
36.1
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
7.1K
Stars
Python
Language
6.9K
Lines of Code
50
Files
188
Pattern Hits
2026-10-12
Scan Date
0.12
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 72.8/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 0.7/100 · LOW

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

Agent Over-Engineering Ratio 81.3/100 · CRITICAL

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

PR Review Velocity Impact 79.9/100 · CRITICAL

Which changes need focused human review? 188 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 6MEDIUM 1LOW 181

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

Hyper-Verbose Identifiers129 hits · 162 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_resource_urls.py59 def test_builds_detail_url_for_regular_book(self) -> None:CODE
LOW⚡tests/test_resource_urls.py66 def test_falls_back_to_default_type_and_path_id(self) -> None:CODE
LOW⚡tests/test_resource_urls.py71 def test_builds_sync_classroom_url_for_teaching_materials(self) -> None:CODE
LOW⚡tests/test_resource_urls.py76 def test_prepare_lesson_root_adds_prepare_path(self) -> None:CODE
LOW⚡tests/test_resource_urls.py83 def test_collects_all_leaf_urls_under_subject(self) -> None:CODE
LOW⚡tests/test_resource_urls.py88 def test_single_edition_only_collects_its_own_books(self) -> None:CODE
LOW⚡tests/test_resource_urls.py95 def test_empty_category_collects_nothing(self) -> None:CODE
LOW⚡tests/test_download.py67 def test_reports_server_errors_unrelated_to_the_token(self) -> None:CODE
LOW⚡tests/test_download.py70 def test_appends_a_token_hint_to_authentication_failures(self) -> None:CODE
LOW⚡tests/test_download.py79 def test_asks_for_token_when_anonymous_request_requires_authentication(self) -> None:CODE
LOW⚡tests/test_download.py86 def test_keeps_token_out_of_private_request_url(self) -> None:CODE
LOWtests/test_download.py106 def test_signs_private_download_when_mac_key_is_present(self) -> None:CODE
LOWtests/test_download.py121 def test_retries_private_download_on_the_next_mirror(self) -> None:CODE
LOWtests/test_download.py177 def test_does_not_retry_authentication_failures_or_public_urls(self) -> None:CODE
LOWtests/test_download.py191 def test_explains_private_storage_authentication_errors(self) -> None:CODE
LOWtests/test_download.py207 def test_redacts_token_from_network_exceptions(self) -> None:CODE
LOW⚡tests/test_resource_check.py48 def test_yields_paths_and_data_of_all_leaf_nodes(self) -> None:CODE
LOW⚡tests/test_resource_check.py57 def test_yields_only_leaves_under_given_parent_path(self) -> None:CODE
LOW⚡tests/test_resource_check.py62 def test_treats_empty_children_as_leaf(self) -> None: # 与 count_resource_items 的口径一致:children 为空字典的节点视为末级资源CODE
LOW⚡tests/test_resource_check.py69 def test_locates_node_by_colon_path(self) -> None:CODE
LOW⚡tests/test_resource_check.py74 def test_locates_category_and_root_nodes(self) -> None:CODE
LOW⚡tests/test_resource_check.py78 def test_returns_none_for_unknown_path(self) -> None:CODE
LOW⚡tests/test_resource_check.py86 def test_returns_unchecked_when_no_leaf_is_checked(self) -> None:CODE
LOW⚡tests/test_resource_check.py90 def test_returns_partial_when_some_leaves_are_checked(self) -> None:CODE
LOW⚡tests/test_resource_check.py95 def test_returns_checked_when_all_leaves_are_checked(self) -> None:CODE
LOW⚡tests/test_resource_check.py100 def test_ignores_checked_items_outside_the_category(self) -> None:CODE
LOW⚡tests/test_resource_check.py109 def test_checks_when_not_all_leaves_are_checked(self) -> None:CODE
LOW⚡tests/test_resource_check.py113 def test_unchecks_when_all_leaves_are_already_checked(self) -> None:CODE
LOW⚡tests/test_resource_check.py118 def test_draws_all_states_on_transparent_canvas(self) -> None:CODE
LOWtests/test_resource_check.py131 def test_edges_are_antialiased_in_both_themes_at_common_scales(self) -> None:CODE
LOWtests/test_resource_check.py142 def test_checkmark_has_smooth_color_transitions(self) -> None:CODE
LOW⚡tests/test_resource_search.py53 def test_searches_across_the_full_category_path(self) -> None:CODE
LOW⚡tests/test_resource_search.py59 def test_category_search_keeps_all_matching_resources(self) -> None:CODE
LOW⚡tests/test_resource_search.py64 def test_empty_query_returns_all_resources(self) -> None:CODE
LOW⚡tests/test_resource_search.py68 def test_unknown_keyword_returns_an_empty_tree(self) -> None:CODE
LOW⚡tests/test_resource_search.py73 def test_centers_portrait_cover_on_fixed_canvas(self) -> None:CODE
LOW⚡tests/test_auth.py17 def test_reads_json_credentials(self) -> None:CODE
LOW⚡tests/test_auth.py21 def test_reads_pretty_printed_json(self) -> None:CODE
LOW⚡tests/test_auth.py25 def test_reads_json_string_wrapper(self) -> None:CODE
LOW⚡tests/test_auth.py29 def test_accepts_numeric_string_diff(self) -> None:CODE
LOW⚡tests/test_auth.py33 def test_rejects_raw_access_token(self) -> None:CODE
LOW⚡tests/test_auth.py37 def test_empty_input_clears_credentials(self) -> None:CODE
LOW⚡tests/test_auth.py40 def test_rejects_json_missing_fields(self) -> None:CODE
LOW⚡tests/test_auth.py46 def test_rejects_empty_mac_key(self) -> None:CODE
LOW⚡tests/test_auth.py50 def test_rejects_nested_local_storage_blob(self) -> None:CODE
LOW⚡tests/test_auth.py55 def test_format_token_json_backfills_old_fields(self) -> None:CODE
LOW⚡tests/test_auth.py63 def test_falls_back_to_placeholder_without_mac_key(self) -> None:CODE
LOW⚡tests/test_auth.py73 def test_matches_official_uc_sdk_signature(self) -> None:CODE
LOW⚡tests/test_parse_collection.py13 def test_callback_annotations_can_be_evaluated(self) -> None:CODE
LOW⚡tests/test_parse_collection.py18 def test_flattens_multiple_resources_per_url(self) -> None:CODE
LOW⚡tests/test_parse_collection.py27 def test_deduplicates_by_resource_url_across_urls(self) -> None:CODE
LOW⚡tests/test_parse_collection.py36 def test_collects_urls_that_fail_to_parse(self) -> None:CODE
LOW⚡tests/test_parse_collection.py45 def test_reports_progress_for_each_url(self) -> None:CODE
LOWtests/test_token_script.py11 def test_selects_token_suffix_not_first_auth_key(self) -> None:CODE
LOWtests/test_token_script.py18 def test_readme_script_uses_the_same_token_key_rule(self) -> None:CODE
LOW⚡tests/test_network.py49 def test_defaults_cover_details_mapping_chapters_and_audio(self):CODE
LOW⚡tests/test_network.py58 def test_explicit_timeout_is_preserved(self):CODE
LOW⚡tests/test_network.py62 def test_timeout_does_not_block_remaining_urls_or_completion_callback(self):CODE
LOWtests/test_audio_parse.py95 def test_textbook_without_audio_returns_only_pdf(self) -> None:CODE
LOWtests/test_audio_parse.py151 def test_audio_playback_ignores_source_order_and_falls_back_to_clip(self) -> None:CODE
69 more matches not shown…
Excessive Try-Catch Wrapping32 hits · 35 pts
SeverityFileLineSnippetContext
LOWsrc/tchmaterial_parser/config.py69 except Exception as e:CODE
LOWsrc/tchmaterial_parser/config.py91 except Exception as e:CODE
LOWsrc/tchmaterial_parser/api.py303 except Exception as e:CODE
LOWsrc/tchmaterial_parser/api.py344 except Exception: # 音频资源不是必需的,获取失败时直接跳过CODE
LOWsrc/tchmaterial_parser/api.py349 except Exception as e:CODE
LOWsrc/tchmaterial_parser/platform_utils.py25 except Exception as e:CODE
LOWsrc/tchmaterial_parser/images.py34 except Exception:CODE
LOWsrc/tchmaterial_parser/images.py91 except Exception as e:CODE
LOWsrc/tchmaterial_parser/app.py41 except Exception: # Windows 8 或更老CODE
LOWsrc/tchmaterial_parser/app.py51 except Exception as e:CODE
LOWsrc/tchmaterial_parser/app.py67 except Exception:CODE
LOW⚡src/tchmaterial_parser/app.py121 except Exception: # 进程可能已经结束CODE
LOW⚡src/tchmaterial_parser/app.py126 except Exception:CODE
LOW⚡src/tchmaterial_parser/app.py128 except Exception: # 获取子进程失败,直接退出当前进程CODE
LOW⚡src/tchmaterial_parser/app.py131 except Exception:CODE
LOWsrc/tchmaterial_parser/bookmarks.py47 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/theme.py55 except Exception:CODE
LOWsrc/tchmaterial_parser/ui/theme.py64 except Exception:CODE
LOWsrc/tchmaterial_parser/ui/theme.py103 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/theme.py121 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/theme.py175 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/token_window.py178 except Exception as error:CODE
MEDIUMsrc/tchmaterial_parser/ui/token_window.py174def open_login_page() -> None:CODE
LOWsrc/tchmaterial_parser/ui/runtime.py29 except Exception:CODE
LOWsrc/tchmaterial_parser/ui/widgets.py41 except Exception: # 再尝试使用鼠标指针位置(如果有)CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py334 except Exception as error:CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py394 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py553 except Exception as error:CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py629 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py646 except Exception as error:CODE
LOWsrc/tchmaterial_parser/ui/about_window.py24 except Exception as e:CODE
LOWsrc/tchmaterial_parser/ui/resource_tree.py239 except Exception as e:CODE
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/test_download_manager.py324except OSError:CODE
HIGHsrc/tchmaterial_parser/api.py344except Exception: # 音频资源不是必需的,获取失败时直接跳过CODE
HIGHsrc/tchmaterial_parser/images.py34except Exception:CODE
HIGHsrc/tchmaterial_parser/app.py126except Exception:CODE
HIGHsrc/tchmaterial_parser/app.py121except Exception: # 进程可能已经结束CODE
HIGHsrc/tchmaterial_parser/app.py131except Exception:CODE
Deep Nesting15 hits · 15 pts
SeverityFileLineSnippetContext
LOWtests/test_resource_check.py131CODE
LOWsrc/tchmaterial_parser/catalog.py17CODE
LOWsrc/tchmaterial_parser/catalog.py51CODE
LOWsrc/tchmaterial_parser/catalog.py87CODE
LOWsrc/tchmaterial_parser/config.py51CODE
LOWsrc/tchmaterial_parser/api.py87CODE
LOWsrc/tchmaterial_parser/api.py183CODE
LOWsrc/tchmaterial_parser/images.py11CODE
LOWsrc/tchmaterial_parser/images.py51CODE
LOWsrc/tchmaterial_parser/ui/theme.py80CODE
LOWsrc/tchmaterial_parser/ui/download_manager.py53CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py75CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py412CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py566CODE
LOWsrc/tchmaterial_parser/ui/download_panel.py436CODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/tchmaterial_parser/app.py163 def update_theme_button() -> None: # 更新按钮文字与图标,使其表示点击后将切换到的主题CODE
LOWsrc/tchmaterial_parser/ui/resource_tree.py301 def update_checked_count() -> None: # 更新已勾选教材数量提示CODE
LOWsrc/tchmaterial_parser/ui/resource_tree.py318 def set_items_checked(leafs: list[tuple[str, dict]], checked: bool) -> None: # 批量更新末级资源勾选状态,级联刷新图标并同步 URL 输入框CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/tchmaterial_parser/auth.py1# -*- coding: utf-8 -*-COMMENT
LOWsrc/tchmaterial_parser/ui/__init__.py1# -*- coding: utf-8 -*-COMMENT
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/tchmaterial_parser/images.py9CODE