AI Slop Code Risk Monitor

YILING0013/AI_NovelGenerator

SlopCodeMonitor badge for YILING0013/AI_NovelGenerator Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

使用ai生成多章节的长篇小说,自动衔接上下文、伏笔

7.6 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for YILING0013/AI_NovelGenerator, a Python project with 6,372 GitHub stars. SynthScan examined 213,221 lines of code across 553 source files, recording 1439 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 7.6 (Moderate 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.

7.6
Adjusted Signal
7.6
Raw Pattern Score
100%
Time Factor
2026-10-16
Last Push
6.4K
Stars
Python
Language
213.2K
Lines of Code
553
Files
1.4K
Pattern Hits
2026-10-31
Scan Date
0.11
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 22.6/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 5.2/100 · LOW

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

Agent Over-Engineering Ratio 20.4/100 · LOW

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

PR Review Velocity Impact 33.5/100 · MEDIUM

Which changes need focused human review? 1439 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 60MEDIUM 1LOW 1378

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 1439 distinct pattern matches across 10 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 Identifiers670 hits · 666 pts
SeverityFileLineSnippetContext
LOWfrontend/src/types/contracts.ts86export function formatStableReferenceLabel(CODE
LOWfrontend/src/types/location.ts522function isVolumeLocationGenerationInput(CODE
LOWfrontend/src/types/location.ts579function isVolumeLocationCandidate(value: unknown, editable = false): value is VolumeLocationCandidateV1 {CODE
LOWfrontend/src/types/volumeEntity.ts156export function volumeCharacterDesignForm(profile: VolumeCharacterProfile): CharacterProfileFields {CODE
LOWfrontend/src/types/volumeEntity.ts169export function editVolumeCharacterDesign(profile: VolumeCharacterProfile, value: CharacterProfileFields): VolumeCharactCODE
LOWfrontend/src/types/novel.ts91export function parseNovelHistoryDeleteImpact(value: unknown, novelId: string): NovelHistoryDeleteImpact | null {CODE
LOWfrontend/src/types/config.ts346export function getProviderAliasesForSelection(CODE
LOWfrontend/src/components/ThemeCustomizationProvider.tsx78function createDefaultThemeCustomizationState(): ThemeCustomizationState {CODE
LOW⚡frontend/src/components/ThemeCustomizationProvider.tsx100function readThemeCustomizationState(): ThemeCustomizationState {CODE
LOW⚡frontend/src/components/ThemeCustomizationProvider.tsx110function getThemeCustomizationSnapshot(): ThemeCustomizationState {CODE
LOW⚡frontend/src/components/ThemeCustomizationProvider.tsx119function getThemeCustomizationServerSnapshot(): ThemeCustomizationState {CODE
LOW⚡frontend/src/components/ThemeCustomizationProvider.tsx123function emitThemeCustomizationChange(nextState?: ThemeCustomizationState) {CODE
LOW⚡frontend/src/components/ThemeCustomizationProvider.tsx133function subscribeThemeCustomization(listener: () => void) {CODE
LOWfrontend/src/components/ThemeCustomizationProvider.tsx163export function ThemeCustomizationProvider({CODE
LOWfrontend/src/components/settings/ProviderCard.tsx74function normalizeBaseUrlForComparison(baseUrl: string): string {CODE
LOWfrontend/src/components/settings/ProviderCard.tsx94function resolveBaseUrlForProviderTypeChange(CODE
LOW…end/src/components/shared/GenerationParamsCollapse.tsx42export function buildGenerationParamsPayload(value: GenerationParamsValue): Partial<GenerationParamsValue> {CODE
LOW…d/src/components/shared/ReplacementCharacterNotice.tsx23export function findReplacementCharacters(value: unknown, path = "$"): ReplacementCharacterLocation[] {CODE
LOW…d/src/components/shared/ReplacementCharacterNotice.tsx52export default function ReplacementCharacterNotice({ value }: { value: unknown }) {CODE
LOW…end/src/components/shared/RelationEditorPrimitives.tsx22export function RelationEditorErrorSummary({CODE
LOW…src/components/writing/hierarchy/chapterPlanBatches.ts14export async function registerSavedChapterBatch(CODE
LOW…nents/writing/hierarchy/chapterRestoreConfirmations.ts8export async function readChapterRestoreConfirmations(scope: string): Promise<WritingDraft<ChapterRestoreCommand>[]> {CODE
LOW…nents/writing/hierarchy/chapterRestoreConfirmations.ts24export async function writeChapterRestoreConfirmation(scope: string, command: ChapterRestoreCommand, remove = false): PrCODE
LOW…mponents/writing/hierarchy/chapterPlanConfirmations.ts13export async function readChapterPlanConfirmations(generationScope: string): Promise<WritingDraft<GenerationDraft>[]> {CODE
LOW…mponents/writing/hierarchy/chapterPlanConfirmations.ts40export async function writeChapterPlanConfirmation(CODE
LOW…s/writing/entity-graph/useRelationshipGraphSnapshot.ts54export function orderBindingsForRelationshipGraph(CODE
LOW…s/writing/entity-graph/useRelationshipGraphSnapshot.ts88export async function loadRelationshipGraphSnapshot(CODE
LOW…s/writing/entity-graph/useRelationshipGraphSnapshot.ts149export function useRelationshipGraphSnapshot(CODE
LOW…tend/src/components/writing/entity-graph/graphModel.ts49export function createDefaultRelationshipGraphFilters(): RelationshipGraphFilters {CODE
LOW…tend/src/components/writing/entity-graph/graphModel.ts111export function createRelationshipGraphSnapshot(CODE
LOW…tend/src/components/writing/entity-graph/graphModel.ts451export function compareRelationshipGraphSnapshots(CODE
LOW…s/writing/world-rules/WorldRulesCandidateWorkspace.tsx253export function parseCoreWorldRulesEnvelope(CODE
LOW…s/writing/world-rules/WorldRulesCandidateWorkspace.tsx276function validateEditableCandidate(CODE
LOW…s/writing/world-rules/WorldRulesCandidateWorkspace.tsx313function normalizeConfirmFieldErrors(CODE
LOW…s/writing/world-rules/WorldRulesCandidateWorkspace.tsx366export default function WorldRulesCandidateWorkspace({CODE
LOW…nents/writing/locations/LocationCandidateWorkspace.tsx93function validateEditableCandidates(CODE
LOW…nents/writing/locations/LocationCandidateWorkspace.tsx142function normalizeConfirmFieldErrors(CODE
LOW…nents/writing/locations/LocationCandidateWorkspace.tsx195export default function LocationCandidateWorkspace({CODE
LOW…nd/src/components/writing/factions/factionFactBatch.ts7export function buildCoreFactionFactBatch(candidate: CoreFactionsResultV2, selected: string[], selectedRelations: stringCODE
LOW…nents/writing/factions/FactionVolumeStateWorkspace.tsx137export default function FactionVolumeStateWorkspace(props: FactionVolumeStateWorkspaceProps) {CODE
LOW…riting/factions/FactionRelationGenerationWorkspace.tsx63export function FactionRelationGenerationPreview({CODE
LOW…riting/factions/FactionRelationGenerationWorkspace.tsx195function FactionRelationCandidateEditor({CODE
LOW…/components/writing/factions/factionFactPreparation.ts97export async function readFactionFactPreparations(novelId: string): Promise<FactionFactPreparationV1[]> {CODE
LOW…/components/writing/factions/factionFactPreparation.ts116export async function writeFactionFactPreparation(value: FactionFactPreparationV1, expected: number | null, promote?: FaCODE
LOW…/components/writing/factions/factionFactPreparation.ts155export async function removeFactionFactPreparation(value: FactionFactPreparationV1): Promise<void> {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx167export function isSymmetricFactionRelation(type: FactionRelationType): boolean {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx262function isFactionRelationsCandidate(value: unknown): value is FactionRelationsResultV1 {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx292export function parseCoreFactionsEnvelope(value: unknown, novelId: string): CoreFactionsCandidateEnvelopeV2 | null {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx297export function parseFactionRelationsEnvelope(value: unknown, novelId: string): FactionRelationsCandidateEnvelopeV1 | nuCODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx354function buildFactionEditableRequest(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx377function buildFactionCreateRequest(draft: CoreFaction): FactionCreateRequestV1 {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx395export function buildFactionUpdateRequest(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx415export function buildFactionSectionRequest(draft: CoreFaction, section: FactionSection, base: CoreFaction): Partial<FactCODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx447export function buildFactionVersionRequest(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx463export function buildFactionVersionedDeletePath(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx491export function findRelationsWithUnselectedFaction(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx575export function getAvailableRelationFactions(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx1927export function createFactionRelationDraft(CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx1959function isCompleteFactionRelation(draft: FactionRelationCreateRequestV1): boolean {CODE
LOW…/components/writing/factions/FactionCardsWorkspace.tsx2019function CoreFactionCandidateReview({CODE
610 more matches not shown…
Docstring Block Structure54 hits · 270 pts
SeverityFileLineSnippetContext
HIGHdesktop_launcher/settings.py37把输入转换为有效的 TCP 端口。 Args: value: 输入框、环境变量或 JSON 中读取的端口值。 label: 用于错误提示的字段名称。 Returns: 位于STRING
HIGHdesktop_launcher/settings.py63校验前后端端口并生成不可变设置对象。 Args: backend_port: 后端监听端口。 frontend_port: 前端监听端口。 Returns: 已完成范围和冲STRING
HIGHdesktop_launcher/settings.py116以原子替换方式保存启动器端口设置。 Args: settings: 已校验的端口设置。 path: 可选的自定义设置路径,主要供测试使用。 Returns: 成功写入的设置STRING
HIGHbackend/runtime.py107读取并校验后端监听端口。 Args: 无。 Returns: 环境变量指定的有效 TCP 端口;未指定时返回项目默认端口。 Raises: ValueError:STRING
HIGHbackend/runtime.py122读取并校验前端监听端口。 Args: 无。 Returns: 环境变量指定的有效 TCP 端口;未指定时返回项目默认端口。 Raises: ValueError:STRING
HIGHbackend/llm/base_client.py268校验 Function Calling 探测返回的工具参数。 Args: actual_arguments: 模型实际生成的工具参数。 expected_arguments:STRING
HIGHbackend/llm/base_client.py285校验 Function Calling 二轮结果是否包含约定文本。 Args: content: 模型第二轮最终回复文本。 expected_final_text: 必须出现STRING
HIGHbackend/llm/factory.py46根据已解析的 Provider 配置创建 LLM 客户端。 Args: config: 已解析的单个 Provider 配置。 provider_name: 用户自定义别名,用于日志与错误定位。 STRING
HIGHbackend/llm/schemas/novel_pydantic.py276校验阵营数量、名称唯一性和关系引用。 Args: 无。 Returns: 校验通过后的当前模型。 Raises: STRING
HIGHbackend/llm/schemas/character_pydantic.py107校验角色扩展 JSON 可安全编码为受限 BSON。 Args: value: 已通过 JsonValue 类型校验的扩展字段。 Returns: 校验通过的原字典。 RaiseSTRING
HIGHbackend/llm/schemas/character_pydantic.py206校验角色数组元素的长度上限。 Args: value: 已完成去空和去重的字符串数组。 Returns: 校验通过的原数组。 RaisesSTRING
HIGHbackend/llm/schemas/character_pydantic.py413校验角色响应数组元素的长度上限。 Args: value: 已规范化的字符串数组。 Returns: 校验通过的原数组。 Raises: STRING
HIGHbackend/llm/schemas/character_pydantic.py531校验候选数组元素长度。 Args: value: 已规范化的字符串数组。 Returns: 校验通过的原数组。 Raises: STRING
HIGHbackend/llm/schemas/character_pydantic.py593校验“无势力”全空条件和非空势力的必填字段。 Args: 无。 Returns: 校验通过后的当前绑定候选。 Raises: STRING
HIGHbackend/llm/schemas/character_pydantic.py646校验候选引用、名称唯一性和绑定一一覆盖。 Args: 无。 Returns: 校验通过后的完整核心角色结果。 Raises: STRING
HIGHbackend/config/config.py434校验 Provider 别名和默认引用。 Args: config_data: 已完成合并与归一化的候选配置。 Returns: 无。 Raises: ValueSTRING
HIGHbackend/db/transaction.py143执行跨集合写入;要求事务的命令不允许降级。 Args: callback: 接收 AsyncClientSession 或 None 的异步写入回调。 operation_name: 用于日志和异常STRING
HIGHbackend/db/created_write_compensation.py21逐文档删除仍停留在创建版本的本批记录。 Args: collection: 保存本批新建文档的 MongoDB 集合。 documents: 带 ``_id``、``novel_id``、业务键和创STRING
HIGHbackend/db/indexes.py521初始化正式世界规则集合索引。 Args: 无。 Returns: 无。 Raises: Exception: MongoDB 索引创建或核对失败。 STRING
HIGHbackend/db/indexes.py650初始化正式地点集合索引。 Args: 无。 Returns: 无。 Raises: Exception: MongoDB 索引创建失败。 STRING
HIGHbackend/db/indexes.py761初始化正式物品集合索引。 Args: 无。 Returns: 无。 Raises: Exception: MongoDB 索引创建失败。 STRING
HIGHbackend/db/write_contracts.py26功能:校验正式可变聚合使用的 expected_version。 Args: value: API 或领域服务传入的版本值。 Returns: 大于等于 1 且排除布尔值的整数版本。 STRING
HIGHbackend/db/write_contracts.py43功能:复制待创建聚合并补齐唯一初始版本 1。 Args: document: 已完成领域预校验、尚未持久化的文档。 Returns: 带 ``version=1`` 的新字典。 STRING
HIGHbackend/db/write_contracts.py103功能:构造每次成功只递增一次版本的 MongoDB 更新文档。 Args: update_fields: 已通过领域白名单过滤的待更新字段。 unset_fields: 需要显式移除的旧字段名称。 STRING
HIGHbackend/db/write_contracts.py169功能:预检批量重排等命令中的稳定 ID 与逐项版本。 Args: items: 每项至少包含稳定业务 ID 和 expected_version 的请求序列。 id_field: 当前领域稳定业务 STRING
HIGHbackend/db/write_contracts.py270功能:校验原始幂等键并为目标文档生成双摘要。 Args: raw_key: HTTP ``Idempotency-Key`` 原文。 request: 包含小说作用域、basis、版本和正式载荷的规STRING
HIGHbackend/db/write_contracts.py298功能:判断目标文档内幂等记录应回放还是返回 409 冲突。 Args: existing: 按小说作用域和幂等键哈希读取的既有正式文档。 request_hash: 当前规范请求摘要。 STRING
HIGHbackend/db/endpoint_guard.py35逐端点推进内部 guard,使并发生命周期写产生 CAS 冲突。 Args: collection: 角色或势力主档集合。 queries: 同时包含身份、版本和当前可用性条件的端点 CAS 查询。STRING
HIGHbackend/db/endpoint_guard.py105在依赖未落库时逐条原子减回本请求自己的 guard 贡献。 Args: collection: 角色或势力主档集合。 touches: touch 成功后返回的一次性贡献记录。 seSTRING
HIGHbackend/api/contracts.py132校验并返回候选局部引用,拒绝正式业务 ID 命名空间。 Args: value: Pydantic DTO 已完成字符串类型校验的候选引用。 Returns: 校验通过的原局部引用。 STRING
HIGHbackend/ops/book_archive.py227只读验证 ZIP 的全部内容,并保留本次实际验证过的文档和封面。 Args: path: 已存在的备份包路径。 Returns: 验证报告、保留 BSON 类型和字段顺序的文档、封面字节和内STRING
HIGHbackend/ops/book_archive.py464只读验证 ZIP 中的完整单书包,不连接数据库或提取文件到磁盘。 Args: path: 已存在的备份包路径。 Returns: 格式版本、集合数量、文件哈希、层级与引用检查摘要及验证范围。STRING
HIGHbackend/ops/book_archive_target.py36验证单书包,并观察目标库是否完全没有集合或视图。 Args: archive_path: 只读验证的单书 ZIP 路径。 target_uri_env: 唯一允许读取的目标 URI 环境变量名。 STRING
HIGHbackend/ops/book_archive_restore.py141向独占全新目标执行一次完整数据库事务,或只读确认相同恢复已完成。 Args: archive_path: 单书 ZIP,验证后只使用持有的内存内容。 target_uri_env: 唯一允许读取的 STRING
HIGHbackend/ops/book_archive_cover.py31确认操作者显式指定了现有普通封面目录。 Args: covers_dir: 操作者必须独占的目录,不使用应用默认路径。 Returns: 目录的绝对路径;此检查不能阻止其它进程随后写入或替换STRING
HIGHbackend/ops/book_archive_cover.py85只读复核已恢复封面,与本次验证后保留的包内字节完整比较。 Args: content: 验证器保留的封面原始字节;没有封面时为 None。 entry: 验证器保留的封面文件描述;没有封面时为 NoSTRING
HIGHbackend/ops/book_archive_cover.py102同步暂存已验证的封面,再通过不覆盖目标的硬链接发布或复用。 Args: content: 验证器保留的封面原始字节;没有封面时为 None。 entry: 验证器保留的封面文件描述;没有封面时为 NSTRING
HIGHbackend/ops/book_archive_export.py53在同一个只读快照会话内导出白名单原始文档,验证后发布新 ZIP。 Args: source_uri_env: 唯一允许读取的源 MongoDB URI 环境变量名。 source_database:STRING
HIGHbackend/services/llm/candidate_contract.py235在确认写入前复核候选输入指纹与全部来源版本。 Args: basis: 浏览器提交的候选依据。 current_source_versions: Service 重读得到的资源类型、ID到版本映射。STRING
HIGHbackend/services/task_flows/domain.py63把已核对的整理结果接到原业务输入,操作位置始终来自路由。 Args: task: 当前生成任务。 parameters: 作者输入或结果节点的业务参数。 scope: 路由固定的位置STRING
HIGHbackend/services/task_flows/domain.py112读取当前业务任务资料,不调用模型或保存候选。 Args: task: 原页面的业务任务。 parameters: 图中传到资料节点的业务参数。 scope: 原页面提供的小说、卷及字STRING
HIGHbackend/services/task_flows/llm.py36按本轮输入生成完整节点请求,供正式执行和编辑器模拟共同使用。 Args: node: AI 节点及其提示词配置。 inputs: 本次实例实际收到的输入。 schema: 节点的输出STRING
HIGHbackend/services/task_flows/preview_context.py113读取任务已有资料,允许尚未填写的生成前提。 Args: task: 编辑器正在查看的业务任务。 parameters: 节点中的假设输入,仅用于公开文本和数量展示。 scope: 用STRING
HIGHbackend/services/task_flows/engine.py65在当前异步请求内执行完整图并产出 SSE 可直接使用的事件。 Args: flow: 已保存或即将预览的完整方案。 inputs: 仅包含开始节点声明的作者输入。 context: STRING
HIGHbackend/services/task_flows/agent.py85构造初始模型消息,并保留执行和校验使用的完整输入。 Args: cfg: 当前修订保存的资料整理配置。 inputs: 上游完整资料和本次作者参数。 task: 当前任务,用于区分结STRING
HIGHbackend/services/novel/writing_context.py566构建四类任务共享的受控上下文,包含可复查的空查询。 Args: task: 当前层级任务。 parameters: 开始表单或图中传入的业务参数。 scope: 路径固定的位置与显式STRING
HIGHbackend/services/novel/cover_asset.py47流式读取并安全重编码单帧小说封面。 Args: upload: FastAPI 接收的上传文件;文件名和 Content-Type 均不作为格式依据。 Returns: 去除元数据、可按内STRING
HIGHbackend/services/novel/character_service.py123对明确的依赖 CAS miss 执行有界重读,直至按主档真相收敛。 Args: reconcile_once: 每次都重新读取依赖并执行单轮 CAS 调和的异步函数。 label: 达到上限时用于错STRING
HIGHbackend/services/novel/character_service.py448提取跨集合补偿必须同时匹配的小说与稳定业务身份。 Args: snapshot: 写入前读取的主档、关系或绑定预镜像。 Returns: 包含 ``novel_id`` 与当前集合稳定业务STRING
HIGH…end/services/novel/initialization_readiness_service.py99按部署能力读取 snapshot,standalone 则执行双读签名核对。 Args: novel_id: 小说 ObjectId 字符串。 Returns: STRING
HIGHbackend/services/novel/faction_service.py673校验核心阵营模型结果中的领域数量、名称和关系引用。 Args: result: 已通过结构 Schema 的 Provider 结果。 req: 本次生成数量与本批不建立直接STRING
HIGHbackend/services/novel/faction_service.py834校验同一小说同一层级下未删除阵营名称不重复。 Args: novel_id: 小说 ObjectId 字符串。 name: 待校验阵营名称。 leveSTRING
HIGHbackend/services/novel/character_name.py9规范化角色显示名和唯一性比较键。 Args: name: 用户、模型或历史角色文档提供的角色名称。 Returns: NFKC 规范化后的显示名,以及继续执行 casefold 的唯一性比STRING
HIGHbackend/services/novel/plot_service.py173为剧情生成读取正式资料,不要求当前已有剧情或准备标记。 Args: task: 两种剧情任务之一。 parameters: 作者要求。 scope: 路径固定的位置与目标版本。 STRING
Unused Imports226 hits · 222 pts
SeverityFileLineSnippetContext
LOWmain.py3CODE
LOWdesktop_launcher/frontend_build.py3CODE
LOWdesktop_launcher/settings.py3CODE
LOWbackend/runtime.py3CODE
LOWbackend/app.py4CODE
LOWbackend/llm/responses_client.py3CODE
LOWbackend/llm/config.py3CODE
LOWbackend/llm/models.py3CODE
LOWbackend/llm/base_client.py3CODE
LOWbackend/llm/__init__.py3CODE
LOWbackend/llm/__init__.py4CODE
LOWbackend/llm/__init__.py4CODE
LOWbackend/llm/__init__.py4CODE
LOWbackend/llm/__init__.py4CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py5CODE
LOWbackend/llm/__init__.py13CODE
LOWbackend/llm/__init__.py14CODE
LOWbackend/llm/__init__.py14CODE
LOWbackend/llm/__init__.py14CODE
LOWbackend/llm/__init__.py15CODE
LOWbackend/llm/__init__.py16CODE
LOWbackend/llm/__init__.py17CODE
LOWbackend/llm/logger.py3CODE
LOWbackend/llm/factory.py3CODE
LOWbackend/llm/gemini_interactions_client.py3CODE
LOWbackend/llm/openai_client.py3CODE
LOWbackend/llm/gemini_client.py3CODE
LOWbackend/llm/claude_client.py3CODE
LOWbackend/llm/json_guard.py3CODE
LOWbackend/llm/schemas/item_pydantic.py3CODE
LOWbackend/llm/schemas/character_relation_pydantic.py3CODE
LOWbackend/llm/schemas/writing_pydantic.py3CODE
LOWbackend/llm/schemas/writing_pydantic.py5CODE
LOWbackend/llm/schemas/__init__.py1CODE
LOWbackend/llm/schemas/__init__.py1CODE
LOWbackend/llm/schemas/__init__.py1CODE
LOWbackend/llm/schemas/__init__.py1CODE
LOWbackend/llm/schemas/location_pydantic.py3CODE
LOWbackend/llm/schemas/volume_entity_pydantic.py3CODE
LOWbackend/llm/schemas/faction_volume_state_pydantic.py3CODE
LOWbackend/llm/schemas/character_volume_state_pydantic.py3CODE
LOWbackend/llm/schemas/world_rule_pydantic.py3CODE
LOWbackend/llm/schemas/volume_planning_pydantic.py3CODE
LOWbackend/llm/schemas/volume_planning_pydantic.py6CODE
LOWbackend/llm/schemas/character_pydantic.py3CODE
LOWbackend/llm/schemas/faction_relation_pydantic.py3CODE
LOWbackend/config/config.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
LOWbackend/config/__init__.py1CODE
166 more matches not shown…
Excessive Try-Catch Wrapping195 hits · 178 pts
SeverityFileLineSnippetContext
LOWdesktop_launcher/settings.py147 except Exception:CODE
LOWdesktop_launcher/app.py560 except Exception as exc:CODE
LOWdesktop_launcher/app.py695 except Exception as exc:CODE
LOWdesktop_launcher/app.py828 except Exception as exc:CODE
LOWdesktop_launcher/app.py1597 except Exception as exc:CODE
LOWdesktop_launcher/app.py1621 except Exception as exc:CODE
LOWbackend/app.py126 except Exception as exc:CODE
LOWbackend/llm/responses_client.py103 except Exception as exc:CODE
LOWbackend/llm/responses_client.py167 except Exception as exc:CODE
LOWbackend/llm/responses_client.py209 except Exception as exc:CODE
LOWbackend/llm/base_client.py208 except Exception as exc:CODE
LOWbackend/llm/gemini_interactions_client.py172 except Exception as exc:CODE
LOWbackend/llm/gemini_interactions_client.py241 except Exception as exc:CODE
LOWbackend/llm/gemini_interactions_client.py277 except Exception as exc:CODE
LOWbackend/llm/openai_client.py402 except Exception as exc:CODE
LOWbackend/llm/openai_client.py456 except Exception as exc:CODE
LOWbackend/llm/openai_client.py539 except Exception as exc:CODE
LOWbackend/llm/openai_client.py594 except Exception as exc:CODE
LOWbackend/llm/openai_client.py673 except Exception as exc:CODE
LOWbackend/llm/gemini_client.py227 except Exception as exc:CODE
LOWbackend/llm/gemini_client.py279 except Exception as exc:CODE
LOWbackend/llm/gemini_client.py298 except Exception as parse_exc:CODE
LOWbackend/llm/gemini_client.py363 except Exception as exc:CODE
LOWbackend/llm/gemini_client.py417 except Exception as exc:CODE
LOWbackend/llm/gemini_client.py501 except Exception as exc:CODE
LOWbackend/llm/claude_client.py241 except Exception as exc:CODE
LOWbackend/llm/claude_client.py339 except Exception as exc:CODE
LOWbackend/llm/claude_client.py370 except Exception as parse_exc:CODE
LOWbackend/llm/claude_client.py435 except Exception as exc:CODE
LOWbackend/llm/claude_client.py482 except Exception as exc:CODE
LOWbackend/llm/claude_client.py560 except Exception as exc:CODE
LOWbackend/llm/schemas/character_pydantic.py134 except Exception as exc:CODE
LOWbackend/config/config.py729 except Exception as commit_exc:CODE
LOWbackend/config/config.py732 except Exception as restore_exc:CODE
LOWbackend/db/mongo.py99 except Exception:CODE
LOWbackend/db/mongo.py112 except Exception:CODE
LOWbackend/db/indexes.py66 except Exception as e:CODE
LOWbackend/db/indexes.py129 except Exception as e:CODE
LOWbackend/db/indexes.py225 except Exception as exc:CODE
LOWbackend/db/indexes.py317 except Exception as exc:CODE
LOWbackend/db/indexes.py372 except Exception as exc:CODE
LOWbackend/db/indexes.py444 except Exception as exc:CODE
LOWbackend/db/indexes.py515 except Exception as exc:CODE
LOWbackend/db/indexes.py592 except Exception as exc:CODE
LOWbackend/db/indexes.py618 except Exception as exc:CODE
LOWbackend/db/indexes.py644 except Exception as exc:CODE
LOWbackend/db/indexes.py729 except Exception as exc:CODE
LOWbackend/db/indexes.py755 except Exception as exc:CODE
LOWbackend/db/indexes.py834 except Exception as exc:CODE
LOWbackend/db/indexes.py860 except Exception as exc:CODE
LOWbackend/db/indexes.py1130 except Exception as exc:CODE
LOWbackend/db/endpoint_guard.py88 except Exception:CODE
LOWbackend/db/repositories/faction_relation_repository.py124 except Exception:CODE
LOW…b/repositories/character_faction_binding_repository.py116 except Exception:CODE
LOW…ckend/db/repositories/character_relation_repository.py112 except Exception:CODE
LOWbackend/db/repositories/character_repository.py108 except Exception:CODE
LOWbackend/api/default_routers/config_router.py223 except Exception as exc:CODE
LOWbackend/api/default_routers/config_router.py228 except Exception as restore_exc:CODE
LOWbackend/api/default_routers/config_router.py284 except Exception as exc:CODE
LOWbackend/api/default_routers/assistant_router.py224 except Exception as exc:CODE
135 more matches not shown…
Deep Nesting179 hits · 157 pts
SeverityFileLineSnippetContext
LOWdesktop_launcher/logs.py18CODE
LOWdesktop_launcher/app.py622CODE
LOWdesktop_launcher/app.py704CODE
LOWdesktop_launcher/app.py770CODE
LOWdesktop_launcher/app.py1477CODE
LOWdesktop_launcher/app.py1580CODE
LOWbackend/app.py103CODE
LOWbackend/llm/responses_client.py37CODE
LOWbackend/llm/responses_client.py75CODE
LOWbackend/llm/responses_client.py127CODE
LOWbackend/llm/base_client.py77CODE
LOWbackend/llm/logger.py161CODE
LOWbackend/llm/gemini_interactions_client.py89CODE
LOWbackend/llm/gemini_interactions_client.py145CODE
LOWbackend/llm/gemini_interactions_client.py196CODE
LOWbackend/llm/provider_probe.py71CODE
LOWbackend/llm/exceptions.py76CODE
LOWbackend/llm/openai_client.py37CODE
LOWbackend/llm/openai_client.py497CODE
LOWbackend/llm/gemini_client.py321CODE
LOWbackend/llm/gemini_client.py420CODE
LOWbackend/llm/claude_client.py57CODE
LOWbackend/llm/claude_client.py196CODE
LOWbackend/llm/claude_client.py277CODE
LOWbackend/llm/claude_client.py393CODE
LOWbackend/llm/json_guard.py18CODE
LOWbackend/llm/schemas/character_pydantic.py106CODE
LOWbackend/config/config.py465CODE
LOWbackend/api/error_protocol.py327CODE
LOWbackend/api/default_routers/arc_router.py21CODE
LOWbackend/ops/book_archive.py123CODE
LOWbackend/ops/book_archive.py226CODE
LOWbackend/ops/book_archive.py476CODE
LOWbackend/ops/book_archive_target.py32CODE
LOWbackend/ops/book_archive_restore.py137CODE
LOWbackend/ops/book_archive_cover.py101CODE
LOWbackend/ops/book_archive_contract.py114CODE
LOWbackend/ops/book_archive_contract.py258CODE
LOWbackend/ops/book_archive_contract.py703CODE
LOWbackend/ops/book_archive_contract.py929CODE
LOWbackend/ops/book_archive_contract.py1058CODE
LOWbackend/ops/book_archive_contract.py1259CODE
LOWbackend/ops/book_archive_contract.py1474CODE
LOWbackend/ops/book_archive_contract.py1568CODE
LOWbackend/ops/book_archive_faction_batches.py15CODE
LOWbackend/ops/book_archive_export.py49CODE
LOWbackend/services/assistant/changes.py78CODE
LOWbackend/services/assistant/changes.py221CODE
LOWbackend/services/assistant/changes.py572CODE
LOWbackend/services/assistant/changes.py780CODE
LOWbackend/services/assistant/changes.py1042CODE
LOWbackend/services/assistant/changes.py1190CODE
LOWbackend/services/assistant/changes.py232CODE
LOWbackend/services/assistant/generation.py76CODE
LOWbackend/services/assistant/generation.py196CODE
LOWbackend/services/assistant/generation.py431CODE
LOWbackend/services/assistant/generation.py368CODE
LOWbackend/services/assistant/domain.py104CODE
LOWbackend/services/assistant/tools.py207CODE
LOWbackend/services/assistant/runtime.py123CODE
119 more matches not shown…
Modern Structural Boilerplate101 hits · 100 pts
SeverityFileLineSnippetContext
LOWdesktop_launcher/ui.py99 def set_action(self, symbol: str, label: str) -> None:CODE
LOWdesktop_launcher/ui.py115 def set_theme(self, colors: dict[str, str]) -> None:CODE
LOWdesktop_launcher/app.py1019 def set_command(self, command: list[str], *, build_before_start: bool = False) -> None:CODE
LOWdesktop_launcher/app.py1191 def _set_port_status(self, message: str, level: str = "info") -> None:CODE
LOWbackend/runtime.py161def set_backend_debug_enabled(enabled: bool) -> None:CODE
LOWbackend/app.py91logger = logging.getLogger(__name__)CODE
LOWbackend/llm/__init__.py19__all__ = [CODE
LOWbackend/llm/schemas/item_pydantic.py443__all__ = [CODE
LOWbackend/llm/schemas/character_relation_pydantic.py608__all__ = [CODE
LOWbackend/llm/schemas/novel_pydantic.py470__all__ = [CODE
LOWbackend/llm/schemas/__init__.py8__all__ = [CODE
LOWbackend/llm/schemas/location_pydantic.py580__all__ = [CODE
LOWbackend/llm/schemas/faction_volume_state_pydantic.py229__all__ = [CODE
LOWbackend/llm/schemas/character_volume_state_pydantic.py214__all__ = [CODE
LOWbackend/llm/schemas/world_rule_pydantic.py227__all__ = [CODE
LOWbackend/llm/schemas/volume_planning_pydantic.py542__all__ = [CODE
LOWbackend/llm/schemas/character_pydantic.py772__all__ = [CODE
LOWbackend/llm/schemas/faction_relation_pydantic.py570__all__ = [CODE
LOWbackend/config/config.py16logger = logging.getLogger(__name__)CODE
LOWbackend/config/__init__.py15__all__ = [CODE
LOWbackend/db/mongo.py10logger = logging.getLogger(__name__)CODE
LOWbackend/db/transaction.py17logger = logging.getLogger(__name__)CODE
LOWbackend/db/confirmation_timing.py16logger = logging.getLogger(__name__)CODE
LOWbackend/db/indexes.py10logger = logging.getLogger(__name__)CODE
LOWbackend/db/write_contracts.py320__all__ = [CODE
LOW…d/db/repositories/character_volume_state_repository.py597__all__ = [CODE
LOWbackend/db/repositories/item_repository.py583__all__ = ["ItemRepository", "item_repo"]CODE
LOWbackend/db/repositories/faction_relation_repository.py14logger = logging.getLogger(__name__)CODE
LOW…d/db/repositories/volume_command_receipt_repository.py76__all__ = ["VolumeCommandReceiptRepository", "volume_command_receipt_repo"]CODE
LOWbackend/db/repositories/world_rule_repository.py573__all__ = [CODE
LOW…end/db/repositories/faction_volume_state_repository.py598__all__ = [CODE
LOWbackend/db/repositories/location_repository.py617__all__ = ["LocationRepository", "location_repo"]CODE
LOWbackend/db/repositories/volume_repository.py278__all__ = ["VolumeRepository", "volume_repo"]CODE
LOWbackend/db/repositories/novel_repository.py606__all__ = ["NovelRepository", "novel_repo"]CODE
LOWbackend/api/contracts.py155__all__ = [CODE
LOWbackend/api/error_protocol.py33logger = logging.getLogger(__name__)CODE
LOWbackend/api/error_protocol.py583__all__ = [CODE
LOW…d/api/default_routers/character_volume_state_router.py492__all__ = ["router", "plan_router"]CODE
LOWbackend/api/default_routers/item_router.py479__all__ = ["router"]CODE
LOW…end/api/default_routers/faction_volume_state_router.py469__all__ = ["router"]CODE
LOWbackend/api/default_routers/character_router.py440__all__ = [CODE
LOWbackend/api/default_routers/volume_router.py562__all__ = [CODE
LOWbackend/api/default_routers/initialization_router.py35__all__ = ["router"]CODE
LOWbackend/api/default_routers/novel_router.py591__all__ = [CODE
LOWbackend/api/default_routers/world_rule_router.py579__all__ = [CODE
LOWbackend/api/default_routers/location_router.py454__all__ = ["router"]CODE
LOWbackend/api/default_routers/faction_relation_router.py414__all__ = ["router", "serialize_faction_relation"]CODE
LOW…pi/default_routers/character_faction_binding_router.py722__all__ = [CODE
LOW…ckend/api/default_routers/character_relation_router.py403__all__ = ["router", "serialize_character_relation"]CODE
LOW…d/api/llm_routers/volume_location_generation_router.py56__all__ = ["router"]CODE
LOWbackend/api/llm_routers/world_rule_generation_router.py52__all__ = ["router"]CODE
LOWbackend/api/llm_routers/volume_planning_router.py117__all__ = ["router"]CODE
LOWbackend/api/llm_routers/item_generation_router.py52__all__ = ["router"]CODE
LOWbackend/api/llm_routers/character_generation_router.py113__all__ = ["router"]CODE
LOWbackend/services/llm/item_generation_service.py38__all__ = ["ItemGenerationService"]CODE
LOWbackend/services/llm/world_rule_generation_contract.py113__all__ = [CODE
LOWbackend/services/llm/format_review_service.py17logger = logging.getLogger(__name__)CODE
LOW…end/services/llm/volume_planning_generation_service.py360__all__ = ["VOLUME_PLANNING_INPUT_MAX_CHARS", "VolumePlanningGenerationService"]CODE
LOW…nd/services/llm/faction_relation_generation_service.py302__all__ = [CODE
LOWbackend/services/llm/character_generation_service.py469__all__ = [CODE
41 more matches not shown…
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHdesktop_launcher/settings.py151except OSError:CODE
HIGHbackend/llm/claude_client.py328except json.JSONDecodeError:CODE
HIGHbackend/services/task_flows/graph.py219except FlowValidationError:CODE
HIGHbackend/services/novel/volume_service.py351except Exception:CODE
HIGHbackend/services/novel/location_service.py468except Exception:CODE
HIGHbackend/services/novel/location_service.py1572except Exception:CODE
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWfrontend/src/i18n/messages/zh.json951 "placeholder": {CODE
LOWfrontend/src/i18n/messages/zh.json1021 "placeholder": "搜索名称、别名、标签或身份…"CODE
LOWfrontend/src/i18n/messages/zh.json1211 "placeholder": "输入你想如何修改这部分内容...",CODE
LOWfrontend/src/i18n/messages/en.json951 "placeholder": {CODE
LOWfrontend/src/i18n/messages/en.json1021 "placeholder": "Search names, aliases, tags, or identity…"CODE
LOWfrontend/src/i18n/messages/en.json1211 "placeholder": "Describe how you want this part changed...",CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbackend/config/config_default.yaml1config_version: 1COMMENT
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbackend/services/task_flows/engine.py54CODE