Repository Analysis

SuanmoSuanyangTechnology/MemoryBear

MemoryBear Equip AI with human-like memory capability

19.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of SuanmoSuanyangTechnology/MemoryBear, a Python project with 5,197 GitHub stars. SynthScan v2.0 examined 493,119 lines of code across 2099 source files, recording 7699 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 19.4 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).

19.4
Adjusted Score
19.4
Raw Score
100%
Time Factor
2026-08-28
Last Push
5.2K
Stars
Python
Language
493.1K
Lines of Code
2.1K
Files
7.7K
Pattern Hits
2026-08-29
Scan Date
0.15
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 322MEDIUM 499LOW 6878

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

Excessive Try-Catch Wrapping2242 hits · 2113 pts
SeverityFileLineSnippetContext
LOWmem-knowledge/src/db.py121 except Exception:CODE
LOWmem-knowledge/src/runtime.py68 except Exception as exc:CODE
LOWmem-knowledge/src/tasks/dispatch.py51 except Exception as exc:CODE
LOWmem-knowledge/src/tasks/dispatch.py72 except Exception:CODE
LOWmem-knowledge/src/repositories/file.py45 except Exception:CODE
LOWmem-knowledge/src/repositories/file.py92 except Exception:CODE
LOWmem-knowledge/src/repositories/document.py50 except Exception:CODE
LOWmem-knowledge/src/repositories/document.py106 except Exception:CODE
LOWmem-knowledge/src/repositories/document.py120 except Exception:CODE
LOWmem-knowledge/src/repositories/knowledge_share.py59 except Exception:CODE
LOWmem-knowledge/src/repositories/knowledge_share.py114 except Exception:CODE
LOWmem-knowledge/src/repositories/knowledge_share.py137 except Exception:CODE
LOWmem-knowledge/src/repositories/knowledge.py86 except Exception:CODE
LOWmem-knowledge/src/repositories/knowledge.py216 except Exception:CODE
LOWmem-knowledge/src/rag/retrieval/async_elasticsearch.py419 except Exception:CODE
LOWmem-knowledge/src/rag/metadata/auto_filter.py119 except Exception:CODE
LOWmem-knowledge/src/api/routes/health.py35 except Exception as exc:CODE
LOWmem-knowledge/src/api/routes/chunk.py77 except Exception as exc:CODE
LOWmem-knowledge/src/api/routes/knowledge.py310 except Exception:CODE
LOWmem-knowledge/src/api/routes/knowledge.py325 except Exception:CODE
LOWmem-knowledge/src/infrastructure/storage.py95 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_metadata.py313 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_metadata.py432 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_metadata.py492 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_metadata.py584 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_retrieval.py215 except Exception as exc:CODE
LOWmem-knowledge/src/services/chunk.py377 except Exception:CODE
LOWmem-knowledge/src/services/chunk.py398 except Exception as exc:CODE
LOWmem-knowledge/src/services/chunk.py424 except Exception as exc:CODE
LOWmem-knowledge/src/services/chunk.py539 except Exception:CODE
LOWmem-knowledge/src/services/file.py213 except Exception:CODE
LOWmem-knowledge/src/services/file.py217 except Exception:CODE
LOWmem-knowledge/src/services/file.py242 except Exception:CODE
LOWmem-knowledge/src/services/file.py282 except Exception:CODE
LOWmem-knowledge/src/services/file.py302 except Exception:CODE
LOWmem-knowledge/src/services/file.py380 except Exception:CODE
LOWmem-knowledge/src/services/qa_import.py91 except Exception:CODE
LOWmem-knowledge/src/services/qa_import.py112 except Exception:CODE
LOWmem-knowledge/src/services/document.py224 except Exception:STRING
LOWmem-knowledge/src/services/document.py339 except Exception:STRING
LOWmem-knowledge/src/services/document.py410 except Exception:STRING
LOWmem-knowledge/src/services/document.py447 except Exception:STRING
LOW…wledge/src/services/knowledge_retrieval_preparation.py313 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_commands.py65 except Exception:CODE
LOWmem-knowledge/src/services/knowledge_commands.py89 except Exception:CODE
LOWmem-knowledge/src/services/knowledge.py537 except Exception:CODE
LOWmem-knowledge/src/services/qa_export.py107 except Exception:CODE
LOWmem-knowledge/src/services/qa_export.py128 except Exception:CODE
LOWsandbox/runtime/pool/zygote_worker.py154 except Exception as e: # noqa: BLE001 - best effortCODE
LOWsandbox/runtime/pool/zygote_worker.py168 except Exception as e: # noqa: BLE001 - best effort, skip failuresCODE
LOWsandbox/runtime/pool/zygote_worker.py239 except Exception:CODE
LOWsandbox/runtime/pool/zygote_worker.py331 except Exception:CODE
LOWsandbox/runtime/pool/zygote_worker.py339 except Exception:CODE
LOWsandbox/runtime/pool/zygote_worker.py459 except Exception:CODE
LOWsandbox/runtime/pool/zygote_worker.py465 except Exception:CODE
MEDIUMsandbox/runtime/pool/zygote_worker.py195def _read_ctrl_frames(self):CODE
LOWsandbox/tests/stress_test.py352 except Exception as e:CODE
LOWsandbox/tests/stress_test.py889 except Exception as e:CODE
LOWpackages/storage-core/src/mem_storage/local.py53 except Exception as exc:CODE
LOWpackages/storage-core/src/mem_storage/local.py78 except Exception as exc:CODE
2182 more matches not shown…
Hyper-Verbose Identifiers1950 hits · 1782 pts
SeverityFileLineSnippetContext
LOWweb/src/views/Conversation/utils/conversationActions.ts78export function createConversationActions(deps: ConversationActionDeps) {CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py61def normalize_internal_operation(method: str, legacy_path: str) -> tuple[str, str]:CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py108def collect_legacy_operations(CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py137def compare_openapi_operations(CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py177def _operation_response_schema(CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py195def compare_openapi_responses(CODE
LOWmem-knowledge/src/db.py85 def _get_sync_session_factory(self) -> sessionmaker[Session]:CODE
LOWmem-knowledge/src/db.py95 def _get_async_session_factory(self) -> async_sessionmaker[AsyncSession]:CODE
LOWmem-knowledge/src/config.py262 def settings_customise_sources(CODE
LOWmem-knowledge/src/runtime.py86def reset_worker_runtime_after_fork() -> ProcessRuntime:CODE
LOWmem-knowledge/src/runtime.py105def shutdown_worker_runtime_sync() -> None:CODE
LOWmem-knowledge/src/tasks/celery_worker.py18def initialize_worker_process(**kwargs: object) -> None:CODE
LOWmem-knowledge/src/utils/datetime_utils.py54def normalize_progress_message_timestamps(CODE
LOWmem-knowledge/src/utils/datetime_utils.py76def parse_timestamp_to_utc_naive(timestamp: int | float | None) -> datetime | None:CODE
LOWmem-knowledge/src/utils/datetime_utils.py107def parse_metadata_time_to_utc_naive(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py35 async def get_by_knowledge_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py47 async def get_by_knowledge_ids_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py97 async def delete_by_knowledge_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py120 async def get_bindings_by_metadata_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py132 async def get_bindings_by_document_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py144 async def delete_bindings_by_metadata_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py157 async def delete_bindings_by_document_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py186 async def count_active_bindings_by_metadata_ids_async(CODE
LOWmem-knowledge/src/repositories/file.py17async def get_files_paginated_async(CODE
LOWmem-knowledge/src/repositories/file.py56async def get_file_by_id_in_workspace_async(CODE
LOWmem-knowledge/src/repositories/file.py76async def get_files_by_parent_id_async(CODE
LOWmem-knowledge/src/repositories/document.py22async def get_documents_paginated_async(CODE
LOWmem-knowledge/src/repositories/document.py64async def get_document_by_id_in_workspace_async(CODE
LOWmem-knowledge/src/repositories/document.py84async def reset_documents_progress_by_kb_id_async(CODE
LOWmem-knowledge/src/repositories/document.py112async def delete_document_by_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py17async def get_knowledgeshares_paginated_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py38async def get_source_kb_ids_by_target_kb_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py49async def create_knowledgeshare_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py67async def get_knowledgeshare_by_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py82async def get_knowledgeshare_by_id_in_source_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py99async def delete_knowledgeshare_by_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge_share.py120async def delete_knowledgeshare_by_id_in_source_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py38async def get_knowledges_paginated_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py61async def get_chunked_knowledgeids_async(db: AsyncSession, filters: list) -> list:CODE
LOWmem-knowledge/src/repositories/knowledge.py92async def get_knowledge_by_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py100async def get_knowledge_by_id_in_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py114async def get_knowledge_by_external_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py129async def get_knowledge_ids_by_external_ids_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py144async def get_knowledges_by_parent_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py157async def get_knowledges_by_parent_ids_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py175async def get_document_counts_by_knowledge_ids_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py193async def get_knowledge_by_name_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py208async def delete_knowledge_by_id_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py222async def get_total_doc_num_by_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py235async def get_total_chunk_num_by_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py248async def get_total_kb_count_by_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py260async def get_user_kb_chunk_num_by_workspace_async(CODE
LOWmem-knowledge/src/repositories/knowledge.py274async def get_non_user_kb_count_by_workspace_async(CODE
LOWmem-knowledge/src/rag/parser_config.py27def build_default_knowledge_parser_config() -> dict[str, Any]:CODE
LOWmem-knowledge/src/rag/parser_config.py53def build_default_document_parser_config() -> dict[str, Any]:CODE
LOWmem-knowledge/src/rag/parser_config.py78def normalize_new_knowledge_parser_config(CODE
LOWmem-knowledge/src/rag/parser_config.py107def normalize_knowledge_parser_config_update(CODE
LOWmem-knowledge/src/rag/parser_config.py133def set_graph_pipeline_for_migration(CODE
LOWmem-knowledge/src/rag/chunk/hierarchy.py10def validate_parent_child_result(CODE
LOWmem-knowledge/src/rag/vdb/pit_search.py9async def iter_async_search_after_hits(CODE
1890 more matches not shown…
Decorative Section Separators405 hits · 1376 pts
SeverityFileLineSnippetContext
MEDIUMweb/src/components/D3Graph/types.ts4// ─── Raw input types (mirror of API response, no external dependency) ─────────COMMENT
MEDIUMweb/src/components/D3Graph/types.ts45// ─── D3 graph types ───────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/CommunityGraph.tsx8// ─── Component ────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/initGraph.ts7// ─── Community graph init ─────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/transform.ts4// ─── Community graph data transform ─────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts3// ─── Colors ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts16// ─── Arrow markers ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts33// ─── Zoom ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts45// ─── Node drag ────────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts56// ─── Cluster force ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/forces.ts111// ─── Group centers ────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/hull.ts4// ─── Hull helpers ─────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/hull.ts83// ─── Hull render ──────────────────────────────────────────────────────────────COMMENT
MEDIUMweb/src/components/D3Graph/utils/legend.ts4// ─── Legend ───────────────────────────────────────────────────────────────────COMMENT
MEDIUM…views/UserMemoryDetail/components/CommunityNetwork.tsx11// ─── Tooltip ──────────────────────────────────────────────────────────────────COMMENT
MEDIUM…views/UserMemoryDetail/components/CommunityNetwork.tsx37// ─── Component ────────────────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py41# ── Config ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py66# ── Task Definitions ─────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py84# ── Task: JSON parsing ───────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py308# ── Request sender ───────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py406# ── Single-run executor ──────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py504# ── Output helpers ───────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py539# ── Console report ───────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py644# ── JSON report ──────────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py686# ── Markdown report ──────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py779# ── Main ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMsandbox/tests/stress_test.py107# ── Task: Computation ────────────────────────────────────────────────────STRING
MEDIUMsandbox/tests/stress_test.py148# ── Task: String processing ──────────────────────────────────────────────STRING
MEDIUMsandbox/tests/stress_test.py173# ── Task: Data structures ────────────────────────────────────────────────STRING
MEDIUMsandbox/tests/stress_test.py200# ── Task: Mixed ──────────────────────────────────────────────────────────STRING
MEDIUMsandbox/tests/stress_test.py237# ── Registry ─────────────────────────────────────────────────────────────STRING
MEDIUMsandbox/tests/stress_test.py255# ── HTTP client ──────────────────────────────────────────────────────────STRING
MEDIUMe2b-infra/tests/test_e2e.py27# ─── Configuration ────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/tests/test_e2e.py73 # ──────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/tests/test_e2e.py75 # ──────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/tests/test_e2e.py362 # ──────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/tests/test_e2e.py364 # ──────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh29# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh31# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh41# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh43# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh52# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh54# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh80# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh82# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh94# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh96# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh105# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh107# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh112# ──────────────────────────────────────────────────────────────COMMENT
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh114# ──────────────────────────────────────────────────────────────COMMENT
MEDIUM…/agent-runtime/runtime/core/workflow/nodes/llm/node.py313 # ------------------------------------------------------------------COMMENT
MEDIUM…/agent-runtime/runtime/core/workflow/nodes/llm/node.py315 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py438 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py440 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py572 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py574 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py79 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py81 # ------------------------------------------------------------------COMMENT
MEDIUM…gent-runtime/runtime/core/workflow/nodes/agent/node.py381 # ------------------------------------------------------------------COMMENT
345 more matches not shown…
Docstring Block Structure257 hits · 1285 pts
SeverityFileLineSnippetContext
HIGH…untime/runtime/core/workflow/variable/base_variable.py41Maps a Python value to a corresponding VariableType. Args: var: The Python value to map. RSTRING
HIGH…untime/runtime/core/workflow/variable/base_variable.py88Returns the default value for a given VariableType. Args: var_type: The variable type for which to get the STRING
HIGH…untime/runtime/core/workflow/variable/base_variable.py171Validates or converts a value to the correct type for the variable. Args: value: The value to validSTRING
HIGH…nt-runtime/runtime/core/workflow/nodes/node_factory.py125创建节点实例 Args: node_config: 节点配置 workflow_config: 工作流配置 down_stream_nodes: 下游STRING
HIGH…ntime/runtime/core/workflow/nodes/jinja_render/node.py25 Execute the node: render the Jinja2 template with mapped variables. The rendered result is returned inSTRING
HIGH…/agent-runtime/runtime/core/workflow/nodes/llm/node.py968处理 LLM 调用异常,根据 error_handle 配置决定行为 Args: error: LLM 调用中捕获的异常 Returns: STRING
HIGH…gent-runtime/runtime/core/workflow/nodes/start/node.py84处理自定义变量 从输入数据中提取自定义变量,应用默认值和验证。 Args: pool: 变量池实例 ReturnsSTRING
HIGH…untime/runtime/core/workflow/nodes/cycle_graph/node.py152 Execute the cycle node at runtime. Based on the node type: - LOOP: Executes LoopRuntime, repeaSTRING
HIGH…-runtime/runtime/core/workflow/engine/variable_pool.py252Retrieve a variable instance from the variable pool. Args: selector: Variable selecSTRING
HIGH…-runtime/runtime/core/workflow/engine/variable_pool.py282Retrieve a variable value from the variable pool. Args: selector: Variable selectorSTRING
HIGH…-runtime/runtime/core/workflow/engine/variable_pool.py317Retrieve a variable value from the variable pool. Args: selector: Variable selectorSTRING
HIGH…-runtime/runtime/core/workflow/engine/graph_builder.py89Retrieve the type of node given its ID. Args: node_id (str): The unique identifier of the node. STRING
HIGH…time/core/workflow/engine/stream_output_coordinator.py364 Process and yield all currently active output segments for the currently active End node. This method STRING
HIGHapi/app/dependencies.py46Extract API Key from request headers Args: request: FastAPI Request object STRING
HIGHapi/app/dependencies.py854 Get App or Workspace from API Key Supports two API Key formats: 1. Authorization: Bearer <api_key> STRING
HIGHapi/app/core/language_utils.py25 校验语言参数,确保其为有效值。 Args: language: 待校验的语言代码,可以是 None、"zh"、"en" 或其他值 Returns: 有效的STRING
HIGHapi/app/core/language_utils.py67 从请求头获取并校验语言参数。 这是一个便捷函数,用于在 controller 层统一处理 X-Language-Type Header。 Args: language_type:STRING
HIGHapi/app/core/storage_strategy.py183 Get the appropriate storage strategy for the given context. Args: context: The uplSTRING
HIGHapi/app/core/api_key_utils.py98校验 end_user 是否存在且属于指定 workspace。 Args: db: 数据库会话 end_user_id: 终端用户 ID workspace_id: 工作空间 IDSTRING
HIGHapi/app/core/upload_policies.py66 根据上传上下文获取对应的上传策略 Args: context: 上传上下文 Returns: 对应的上传策略 Raises: STRING
HIGHapi/app/core/tools/langchain_adapter.py198根据工具参数创建Pydantic schema Args: parameters: 工具参数列表 operation: 特定操作(用于过滤参数) STRING
HIGHapi/app/core/tools/base.py80验证参数 Args: parameters: 输入参数 Returns: 验证错误字典,空字典表示验证通过 STRING
HIGHapi/app/core/tools/builtin/database_tool.py80根据连接参数同步建立一个 PostgreSQL 连接(阻塞调用,请在线程池中执行) Args: conn_args: 包含 driver/host/port/user/password/database/conneSTRING
HIGHapi/app/core/tools/builtin/mineru_tool.py169调用 MinerUV3Client 解析单个文件,返回 markdown 字符串。 Args: **kwargs: file_name (str, 推荐 — 用于服STRING
HIGHapi/app/core/memory/memory_service.py374快速写入记忆:清洗 → Embedding → 写入 :Dialogue 节点 与 self.write() 并列,复用 __init__/create 已加载到 self.ctx 的 memory_config, STRING
HIGHapi/app/core/memory/llm_tools/openai_embedder.py62 生成嵌入向量实现 Args: messages: 文本列表 **kwargs: 额外参数 Returns: 嵌入向STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py68 生成嵌入向量 Args: messages: 文本列表 **kwargs: 额外参数 Returns: 嵌入向量列STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py107 带重试机制的嵌入向量生成接口 Args: messages: 文本列表 **kwargs: 额外参数 Returns: STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py133 为单个文本生成嵌入向量 Args: text: 单个文本 **kwargs: 额外参数 Returns: 嵌入向量STRING
HIGHapi/app/core/memory/llm_tools/embedder_client.py155 批量生成嵌入向量(支持大批量文本) Args: texts: 文本列表 batch_size: 每批处理的文本数量 **kwargsSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py68 聊天接口 Args: messages: 消息列表,每个消息包含 role 和 content **kwargs: 额外参数 ReturnSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py90 结构化输出接口 Args: messages: 消息列表 response_model: 期望的响应模型类型(Pydantic BaseModel) STRING
HIGHapi/app/core/memory/llm_tools/llm_client.py130 带重试机制的聊天接口 Args: messages: 消息列表 **kwargs: 额外参数 Returns: LSTRING
HIGHapi/app/core/memory/llm_tools/llm_client.py161 带重试机制的结构化输出接口 Args: messages: 消息列表 response_model: 期望的响应模型类型 **kwaSTRING
HIGHapi/app/core/memory/llm_tools/openai_client.py73 聊天接口实现 Args: messages: 消息列表 **kwargs: 额外参数 Returns: LLM 响STRING
HIGHapi/app/core/memory/llm_tools/openai_client.py109 结构化输出接口实现 Args: messages: 消息列表 response_model: 期望的响应模型类型 **kwargs:STRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py116Get LLM client from MemoryConfig object. Args: memory_config: Configuration containing llm_STRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py134Get embedder client from MemoryConfig object. Args: memory_config: Configuration containingSTRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py152Get reranker client from MemoryConfig object. Args: memory_config: Configuration containingSTRING
HIGHapi/app/core/memory/utils/llm/llm_utils.py172Get LLM client from MemoryConfig object. DEPRECATED: Use MemoryClientFactory(db).get_llm_client_from_config(memSTRING
HIGHapi/app/core/memory/utils/embedder/embedder_utils.py18 Get embedder client from MemoryConfig object. **PREFERRED METHOD**: Use this function in production code wSTRING
HIGHapi/app/core/memory/utils/embedder/embedder_utils.py44 Get embedder client by model ID. **LEGACY/TEST METHOD**: Use this function only for: - Test/evaluationSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py49Validate that a class name follows OWL naming conventions. Validation rules: 1. Must not be empSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py115Attempt to sanitize an invalid class name into a valid format. Sanitization steps: 1. Strip whiSTRING
HIGH…app/core/memory/utils/validation/ontology_validator.py179Remove duplicate ontology classes based on case-insensitive name comparison. When duplicates are found,STRING
HIGH…app/core/memory/utils/validation/ontology_validator.py234Truncate a description to a maximum length. If the description exceeds max_length, it will be truncatedSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py53Validate extracted ontology classes against OWL standards. This method creates an OWL ontology from theSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py256Export ontology to OWL file in specified format. Supported formats: - rdfxml: RDF/XML format (dSTRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py521Validate that ontology classes are compatible with Protégé editor. Protégé compatibility checks: STRING
HIGHapi/app/core/memory/utils/validation/owl_validator.py592从 OWL 内容解析出本体类型 支持解析 RDF/XML、Turtle 和 JSON 格式的 OWL 文件, 提取其中定义的 owl:Class 及其 rdfs:label 和 rdfs:cSTRING
HIGHapi/app/core/memory/agent/utils/template_tools.py49 Load a template from disk with caching. Args: template_name: Relative path to tempSTRING
HIGHapi/app/core/memory/agent/utils/template_tools.py77 Load and render a Jinja2 template. Args: template_name: Relative path to template STRING
HIGHapi/app/core/memory/models/base_response.py36Handle cases where LLM returns a list instead of a dict. Some LLMs may wrap the response in a list like [{"fielSTRING
HIGHapi/app/core/memory/models/ontology_scenario_models.py74Validate that the class name follows PascalCase convention. PascalCase rules: - Must start with an uppeSTRING
HIGH…/extraction_engine/extraction_pipeline_orchestrator.py145Run a critical coroutine concurrently with sidecar steps. Args: critical_coro: The awaitable for thSTRING
HIGH…es/extraction_engine/deduplication/entity_dedup_llm.py294 Use LLM to assist fuzzy deduplication among candidate entity pairs and produce an `id_redirect` mapping plus auSTRING
HIGH…action_engine/knowledge_extraction/chunk_extraction.py81Process a dialogue by generating chunks and adding them to the DialogData object. Args: dialogue: TSTRING
HIGH…action_engine/knowledge_extraction/chunk_extraction.py147Save the chunking results to a file and return the output path. Args: chunks: List of Chunk objectsSTRING
HIGH…ion_engine/knowledge_extraction/ontology_extraction.py68Extract ontology classes from a scenario description. This is the main extraction method that orchestraSTRING
HIGH…ion_engine/knowledge_extraction/ontology_extraction.py268Call LLM to extract ontology classes from scenario. This method renders the extraction prompt using theSTRING
197 more matches not shown…
Unused Imports1257 hits · 1146 pts
SeverityFileLineSnippetContext
LOWmem-knowledge/scripts/check_model_ownership.py3CODE
LOWmem-knowledge/scripts/export_openapi.py3CODE
LOWmem-knowledge/scripts/check_import_boundaries.py3CODE
LOWmem-knowledge/scripts/compare_legacy_contracts.py3CODE
LOWmem-knowledge/src/bootstrap.py3CODE
LOWmem-knowledge/src/logging.py3CODE
LOWmem-knowledge/src/db.py3CODE
LOWmem-knowledge/src/trace.py3CODE
LOWmem-knowledge/src/config.py3CODE
LOWmem-knowledge/src/runtime.py3CODE
LOWmem-knowledge/src/errors.py3CODE
LOWmem-knowledge/src/main.py3CODE
LOWmem-knowledge/src/tasks/celery_app.py3CODE
LOWmem-knowledge/src/tasks/dispatch.py3CODE
LOWmem-knowledge/src/tasks/celery_worker.py3CODE
LOWmem-knowledge/src/tasks/celery_worker.py12CODE
LOWmem-knowledge/src/utils/datetime_utils.py3CODE
LOWmem-knowledge/src/repositories/knowledge_metadata.py3CODE
LOWmem-knowledge/src/repositories/file.py3CODE
LOWmem-knowledge/src/repositories/document.py3CODE
LOWmem-knowledge/src/repositories/reference.py3CODE
LOWmem-knowledge/src/repositories/knowledge_share.py3CODE
LOWmem-knowledge/src/repositories/model_registry.py3CODE
LOWmem-knowledge/src/repositories/knowledge.py3CODE
LOWmem-knowledge/src/models/__init__.py3CODE
LOWmem-knowledge/src/models/__init__.py3CODE
LOWmem-knowledge/src/models/references/__init__.py3CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py4CODE
LOWmem-knowledge/src/models/references/__init__.py13CODE
LOWmem-knowledge/src/models/references/__init__.py14CODE
LOWmem-knowledge/src/models/owned/__init__.py3CODE
LOWmem-knowledge/src/models/owned/__init__.py4CODE
LOWmem-knowledge/src/models/owned/__init__.py4CODE
LOWmem-knowledge/src/models/owned/__init__.py4CODE
LOWmem-knowledge/src/models/owned/__init__.py5CODE
LOWmem-knowledge/src/models/owned/__init__.py5CODE
LOWmem-knowledge/src/models/owned/__init__.py5CODE
LOWmem-knowledge/src/models/owned/__init__.py5CODE
LOWmem-knowledge/src/models/owned/__init__.py6CODE
LOWmem-knowledge/src/models/owned/__init__.py6CODE
LOWmem-knowledge/src/models/owned/__init__.py7CODE
LOW…owledge/src/rag/knowledge_graph/elasticsearch_store.py3CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py3CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py3CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py3CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py3CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py3CODE
LOWmem-knowledge/src/rag/chunk/preview.py3CODE
LOWmem-knowledge/src/rag/chunk/__init__.py3CODE
LOWmem-knowledge/src/rag/chunk/__init__.py3CODE
LOWmem-knowledge/src/rag/chunk/__init__.py4CODE
LOWmem-knowledge/src/rag/chunk/__init__.py5CODE
LOWmem-knowledge/src/rag/models/__init__.py3CODE
LOWmem-knowledge/src/rag/models/__init__.py3CODE
1197 more matches not shown…
Deep Nesting645 hits · 548 pts
SeverityFileLineSnippetContext
LOWmem-knowledge/scripts/check_model_ownership.py52CODE
LOWmem-knowledge/src/rag/chunk/preview.py32CODE
LOWmem-knowledge/src/rag/chunk/preview.py122CODE
LOWmem-knowledge/src/rag/retrieval/graph_bridge.py16CODE
LOWmem-knowledge/src/rag/metadata/auto_filter.py134CODE
LOWmem-knowledge/src/services/knowledge_metadata.py345CODE
LOWmem-knowledge/src/services/file.py263CODE
LOWmem-knowledge/src/services/file.py340CODE
LOWsandbox/runtime/pool/zygote_worker.py216CODE
LOWsandbox/runtime/pool/zygote_worker.py248CODE
LOWsandbox/runtime/pool/zygote_worker.py424CODE
LOWsandbox/tests/stress_test.py542CODE
LOWsandbox/tests/stress_test.py689CODE
LOWsandbox/tests/stress_test.py875CODE
LOWpackages/storage-core/src/mem_storage/oss.py195CODE
LOWpackages/scripts/check_import_boundaries.py78CODE
LOWpackages/scripts/check_import_boundaries.py88CODE
LOW…es/redbear-model/src/redbear_model/providers/openai.py118CODE
LOWe2b-infra/tests/smoke_test_runtime.py32CODE
LOWe2b-infra/tests/test_e2e.py95CODE
LOWe2b-infra/tests/test_e2e.py176CODE
LOWe2b-infra/templates/agent-runtime/runtime/entrypoint.py46CODE
LOWe2b-infra/templates/agent-runtime/runtime/entrypoint.py190CODE
LOW…-infra/templates/agent-runtime/runtime/tools/loader.py25CODE
LOWe2b-infra/templates/agent-runtime/runtime/tools/base.py13CODE
LOWe2b-infra/templates/agent-runtime/runtime/tools/base.py250CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py172CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py471CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py587CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py606CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py638CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py651CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py916CODE
LOW…untime/runtime/core/workflow/variable/base_variable.py40CODE
LOW…agent-runtime/runtime/core/workflow/nodes/base_node.py874CODE
LOW…agent-runtime/runtime/core/workflow/nodes/base_node.py923CODE
LOW…runtime/core/workflow/nodes/document_extractor/node.py38CODE
LOW…runtime/core/workflow/nodes/document_extractor/node.py138CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py245CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py347CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py455CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py500CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py797CODE
LOW…/agent-runtime/runtime/core/workflow/nodes/llm/node.py1005CODE
LOW…ent-runtime/runtime/core/workflow/nodes/memory/node.py98CODE
LOW…runtime/core/workflow/nodes/human_intervention/node.py232CODE
LOW…runtime/core/workflow/nodes/human_intervention/node.py268CODE
LOW…agent-runtime/runtime/core/workflow/nodes/code/node.py197CODE
LOW…gent-runtime/runtime/core/workflow/nodes/start/node.py83CODE
LOW…gent-runtime/runtime/core/workflow/nodes/agent/node.py95CODE
LOW…gent-runtime/runtime/core/workflow/nodes/agent/node.py384CODE
LOW…gent-runtime/runtime/core/workflow/nodes/agent/node.py441CODE
LOW…time/core/workflow/nodes/variable_aggregator/config.py25CODE
LOW…e/runtime/core/workflow/nodes/cycle_graph/iteration.py143CODE
LOW…e/runtime/core/workflow/nodes/cycle_graph/iteration.py247CODE
LOW…untime/runtime/core/workflow/nodes/cycle_graph/loop.py181CODE
LOW…untime/runtime/core/workflow/nodes/cycle_graph/node.py41CODE
LOW…ime/runtime/core/workflow/nodes/http_request/config.py80CODE
LOW…ntime/runtime/core/workflow/nodes/http_request/node.py106CODE
LOW…ntime/runtime/core/workflow/nodes/http_request/node.py243CODE
585 more matches not shown…
Modern Structural Boilerplate402 hits · 404 pts
SeverityFileLineSnippetContext
LOWmem-knowledge/src/__init__.py5__all__ = ["__version__"]CODE
LOWmem-knowledge/src/errors.py83__all__ = [CODE
LOWmem-knowledge/src/main.py23logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/tasks/celery_app.py69__all__ = [CODE
LOWmem-knowledge/src/tasks/dispatch.py13logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/tasks/dispatch.py77__all__ = ["TaskDispatcher"]CODE
LOWmem-knowledge/src/tasks/celery_worker.py14logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/tasks/celery_worker.py41__all__ = ["celery_app"]CODE
LOWmem-knowledge/src/utils/datetime_utils.py134__all__ = [CODE
LOWmem-knowledge/src/repositories/file.py14logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/repositories/document.py15logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/repositories/knowledge_share.py14logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/repositories/model_registry.py117__all__ = ["AsyncSQLModelRegistry"]CODE
LOWmem-knowledge/src/repositories/knowledge.py19logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/models/__init__.py5__all__ = ["owned", "references"]CODE
LOWmem-knowledge/src/models/references/__init__.py16__all__ = [CODE
LOWmem-knowledge/src/models/owned/__init__.py9__all__ = [CODE
LOW…owledge/src/rag/knowledge_graph/elasticsearch_store.py204__all__ = ["GraphElasticsearchStore", "graph_index_name"]CODE
LOWmem-knowledge/src/rag/knowledge_graph/__init__.py11__all__ = [CODE
LOWmem-knowledge/src/rag/chunk/preview.py227__all__ = ["preview_binary"]CODE
LOWmem-knowledge/src/rag/chunk/metadata.py36__all__ = ["SYSTEM_METADATA_KEYS", "merge_parser_metadata"]CODE
LOWmem-knowledge/src/rag/chunk/__init__.py7__all__ = [CODE
LOWmem-knowledge/src/rag/chunk/hierarchy.py43__all__ = ["GroupedChildChunks", "validate_parent_child_result"]CODE
LOWmem-knowledge/src/rag/models/__init__.py14__all__ = [CODE
LOWmem-knowledge/src/rag/integrations/feishu/models.py18__all__ = ["FileInfo"]CODE
LOWmem-knowledge/src/rag/integrations/feishu/client.py125__all__ = ["FeishuAPIClient"]CODE
LOWmem-knowledge/src/rag/integrations/feishu/__init__.py5__all__ = ["FeishuAPIClient"]CODE
LOWmem-knowledge/src/rag/integrations/feishu/exceptions.py18__all__ = ["FeishuAPIError", "FeishuAuthError", "FeishuError"]CODE
LOWmem-knowledge/src/rag/integrations/yuque/models.py21__all__ = ["YuqueRepoInfo"]CODE
LOWmem-knowledge/src/rag/integrations/yuque/client.py89__all__ = ["YuqueAPIClient"]CODE
LOWmem-knowledge/src/rag/integrations/yuque/__init__.py5__all__ = ["YuqueAPIClient"]CODE
LOWmem-knowledge/src/rag/integrations/yuque/exceptions.py18__all__ = ["YuqueAPIError", "YuqueAuthError", "YuqueError"]CODE
LOWmem-knowledge/src/rag/retrieval/models.py91__all__ = [CODE
LOWmem-knowledge/src/rag/retrieval/__init__.py5__all__ = ["AsyncChunkStore"]CODE
LOW…m-knowledge/src/rag/retrieval/elasticsearch_queries.py166__all__ = [CODE
LOWmem-knowledge/src/rag/retrieval/graph_bridge.py113__all__ = ["GraphRetrievalBridge"]CODE
LOWmem-knowledge/src/rag/retrieval/async_elasticsearch.py424__all__ = [CODE
LOWmem-knowledge/src/rag/metadata/filter_strategies.py131__all__ = ["NumberFilterStrategy", "StringFilterStrategy", "TimeFilterStrategy", "_escape_like"]CODE
LOWmem-knowledge/src/rag/metadata/filter_engine.py167__all__ = ["FilterCondition", "FilterGroup", "MetadataFilterEngine"]CODE
LOWmem-knowledge/src/rag/metadata/__init__.py6__all__ = [CODE
LOWmem-knowledge/src/rag/metadata/auto_filter.py169__all__ = ["generate_filter_groups"]CODE
LOWmem-knowledge/src/api/router.py22__all__ = ["internal_v1_router"]CODE
LOWmem-knowledge/src/api/dependencies.py54__all__ = ["Principal", "get_principal", "get_runtime"]CODE
LOWmem-knowledge/src/api/schemas/__init__.py15__all__ = [CODE
LOWmem-knowledge/src/api/schemas/common.py54__all__ = ["ApiResponse", "SuccessEnvelope", "fail", "success"]CODE
LOWmem-knowledge/src/api/routes/chunk.py468__all__ = ["router"]CODE
LOWmem-knowledge/src/api/routes/document.py317__all__ = ["router"]CODE
LOWmem-knowledge/src/api/routes/knowledge.py58logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/infrastructure/__init__.py8__all__ = [CODE
LOWmem-knowledge/src/services/knowledge_retrieval.py35logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/services/knowledge_retrieval.py330__all__ = ["KnowledgeRetrievalService"]CODE
LOWmem-knowledge/src/services/graph.py71__all__ = ["delete_graph", "get_graph", "graph_entity_types", "rebuild_graph"]CODE
LOWmem-knowledge/src/services/chunk.py32logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/services/chunk.py548__all__ = [CODE
LOWmem-knowledge/src/services/file.py36logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/services/qa_import.py121__all__ = [CODE
LOWmem-knowledge/src/services/document.py34logger = logging.getLogger(__name__)CODE
LOWmem-knowledge/src/services/document.py455__all__ = [STRING
LOW…wledge/src/services/knowledge_retrieval_preparation.py37logger = logging.getLogger(__name__)CODE
LOW…wledge/src/services/knowledge_retrieval_preparation.py374__all__ = ["KnowledgeRetrievalPreparation"]CODE
342 more matches not shown…
Cross-File Repetition41 hits · 205 pts
SeverityFileLineSnippetContext
HIGHmem-knowledge/src/utils/datetime_utils.py0parse an iso datetime and normalize it to naive utc.STRING
HIGH…tes/agent-runtime/runtime/core/utils/datetime_utils.py0parse an iso datetime and normalize it to naive utc.STRING
HIGHapi/app/core/utils/datetime_utils.py0parse an iso datetime and normalize it to naive utc.STRING
HIGHmem-knowledge/src/models/owned/file.py0knowledge model copied from the legacy api service.STRING
HIGHmem-knowledge/src/models/owned/document.py0knowledge model copied from the legacy api service.STRING
HIGHmem-knowledge/src/models/owned/knowledge_share.py0knowledge model copied from the legacy api service.STRING
HIGHmem-knowledge/src/models/owned/knowledge.py0knowledge model copied from the legacy api service.STRING
HIGHmem-knowledge/src/api/schemas/file.py0knowledge request and response schemas copied from the legacy api.STRING
HIGHmem-knowledge/src/api/schemas/document.py0knowledge request and response schemas copied from the legacy api.STRING
HIGHmem-knowledge/src/api/schemas/knowledge_share.py0knowledge request and response schemas copied from the legacy api.STRING
HIGHmem-knowledge/src/api/schemas/knowledge.py0knowledge request and response schemas copied from the legacy api.STRING
HIGHapi/app/core/rag_utils/chunk_insight.py0get llm client from user-connected config. raises if no config found.STRING
HIGHapi/app/core/rag_utils/chunk_summary.py0get llm client from user-connected config. raises if no config found.STRING
HIGHapi/app/core/rag_utils/chunk_tags.py0get llm client from user-connected config. raises if no config found.STRING
HIGH…ore/memory/analytics/implicit_memory/habit_detector.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…alytics/implicit_memory/analyzers/interest_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…ytics/implicit_memory/analyzers/preference_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…lytics/implicit_memory/analyzers/dimension_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGH…/analytics/implicit_memory/analyzers/habit_analyzer.py0initialize the habit analyzer. args: db: database session llm_model_id: optional llm model id to use for analysis tenantSTRING
HIGHapi/app/core/rag/deepdoc/vision/recognizer.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/deepdoc/vision/ocr.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/deepdoc/parser/pdf_parser.py0if you have trouble downloading huggingface models, -_^ this might help!! for linux: export hf_endpoint=https://hf-mirroSTRING
HIGHapi/app/core/rag/graphrag/general/graph_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/general/leiden.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGH…re/rag/graphrag/general/community_reports_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/general/entity_embedding.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/rag/graphrag/light/graph_extractor.py0reference: - [graphrag](https://github.com/microsoft/graphrag)STRING
HIGHapi/app/core/storage/local.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/oss.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/s3.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/base.py0download a file from the storage backend. args: file_key: unique identifier for the file in the storage system. returns:STRING
HIGHapi/app/core/storage/local.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/oss.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/s3.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/core/storage/base.py0check if a file exists in the storage backend. args: file_key: unique identifier for the file in the storage system. retSTRING
HIGHapi/app/controllers/document_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
HIGH…app/controllers/service/rag_api_document_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
HIGHapi/app/controllers/service/rag_api_file_controller.py0paged query file list - support filtering by kb_id and parent_id - support keyword search for file names - support dynamSTRING
HIGH…p/controllers/service/memory_display_api_controller.py0encode result for json serialization, preserving response objects as-is.STRING
HIGHapi/app/controllers/service/memory_api_controller.py0encode result for json serialization, preserving response objects as-is.STRING
HIGHapi/app/controllers/service/ontology_api_controller.py0encode result for json serialization, preserving response objects as-is.STRING
Over-Commented Block151 hits · 126 pts
SeverityFileLineSnippetContext
LOWweb/src/utils/timezones.ts41 'America/New_York', // New York, USACOMMENT
LOWweb/src/utils/timezones.ts61 // 'Asia/Istanbul', // Istanbul, TurkeyCOMMENT
LOWweb/src/utils/timezones.ts81 // 'America/Denver', // Denver, USACOMMENT
LOWweb/src/utils/timezones.ts121 'Asia/Kolkata': hi_IN, // Kolkata, India - HindiCOMMENT
LOWweb/src/utils/timezones.ts141 COMMENT
LOWweb/src/utils/timezones.ts161 // 'America/Toronto': 'en_CA', // Toronto, Canada - English (Canada)COMMENT
LOWweb/src/utils/timezones.ts181 // 'Africa/Cairo': 'ar_EG', // Cairo, Egypt - Arabic (Egypt)COMMENT
LOWweb/src/components/Markdown/index.tsx441 disallowedElements={['script', 'iframe', 'head', 'html', 'meta', 'link', 'style', 'body']}COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts161 },COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts181 // { label: 'threeHours', value: '3' },COMMENT
LOWweb/src/views/MemoryExtractionEngine/constant.ts201 // {COMMENT
LOW…rc/views/KnowledgeBase/components/RecallTestResult.tsx81 // Render content via RbMarkdown exclusively.COMMENT
LOW…/views/KnowledgeBase/components/CreateDatasetModal.tsx81 // // 调用父组件传递的回调函数,传递选中的数据COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx341 key: '2',COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx361 // createImageDataset?.current?.handleOpen(knowledgeBaseId || '', parentId || '')COMMENT
LOW…/src/views/KnowledgeBase/[knowledgeBaseId]/Private.tsx381 // onClick: () => {COMMENT
LOW…ents/Properties/SubmitTypeList/SubmitTypeEditModal.tsx21 iconText: 'W',COMMENT
LOW…orkflow/components/Properties/hooks/useVariableList.ts541 processNodeVariables(node.getData(), node.getData().id, list, keys);COMMENT
LOW…orkflow/components/Properties/hooks/useVariableList.ts721 //COMMENT
LOWweb/src/views/Workflow/constant/nodeLibraryPart1.ts21 },COMMENT
LOWweb/src/views/Workflow/constant/nodeFlags.ts41 // time: {COMMENT
LOWsandbox/server/src/config.rs61COMMENT
LOWsandbox/server/src/main.rs21/// Only available on Unix (Linux Docker).COMMENT
LOWe2b-infra/templates/agent-runtime/extract_runtime.sh1#!/bin/bashCOMMENT
LOW…ent-runtime/runtime/core/workflow/nodes/base_config.py121 #COMMENT
LOW…agent-runtime/runtime/core/workflow/nodes/base_node.py661 "token_usage": None,COMMENT
LOW…nt-runtime/runtime/core/workflow/nodes/start/config.py21 )COMMENT
LOW…nt-runtime/runtime/core/workflow/nodes/start/config.py41 # VariableDefinition(COMMENT
LOW…agent-runtime/runtime/core/workflow/engine/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOWapi/alembic.ini1# A generic, single database configuration.COMMENT
LOWapi/alembic.ini21# string value is passed to ZoneInfo()COMMENT
LOWapi/alembic.ini41# The path separator used here should be the separator specified by "version_path_separator" below.COMMENT
LOWapi/alembic.ini61# output_encoding = utf-8COMMENT
LOWapi/app/tasks.py3861# db=settings.REDIS_DB,COMMENT
LOWapi/app/tasks.py3881# status = "Fail"COMMENT
LOWapi/app/tasks.py4541# bind=True,COMMENT
LOWapi/app/tasks.py4561# return {"status": "SUCCESS", "message": "没有终端用户",COMMENT
LOWapi/app/tasks.py4581# processed_users += 1COMMENT
LOWapi/app/tasks.py4601# "failed_users": failed_usersCOMMENT
LOWapi/app/dependencies.py421# 校验当前用户对指定工作空间的访问权限:COMMENT
LOWapi/app/dependencies.py441# # 超管跨租户访问不允许COMMENT
LOWapi/app/core/config.py441 # workflow_node_executions 保留策略开关。COMMENT
LOWapi/app/core/__init__.py1# -*- coding: UTF-8 -*-COMMENT
LOW…re/memory/utils/visualization/forgetting_visualizer.py361 config = ForgettingEngineConfig(offset=0.1, lambda_time=0.5, lambda_mem=0.5)COMMENT
LOWapi/app/core/memory/utils/prompt/prompt_utils.py141COMMENT
LOWapi/app/core/memory/models/variate_config.py141 emotion_enabled: bool = Field(default=False, description="是否启用情绪提取旁路")COMMENT
LOW…/extraction_engine/deduplication/deduped_and_disamb.py141 # TODO: fact_summary 功能暂时禁用,待后续开发完善后启用COMMENT
LOW…/extraction_engine/deduplication/deduped_and_disamb.py161 # src_a = _extract_sources(fact_a)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1561COMMENT
LOW…vices/reflection_engine/deterministic/cypher_merger.py41# async def fetch_degrees(COMMENT
LOW…vices/reflection_engine/deterministic/cypher_merger.py61# async def fetch_degrees_batch(COMMENT
LOWapi/app/core/memory/src/search.py461) -> Dict[str, List[Dict[str, Any]]]:COMMENT
LOWapi/app/core/memory/src/search.py481 # base = float(it.get("combined_score", it.get("score", 0.0)) or 0.0)COMMENT
LOWapi/app/core/memory/src/search.py501# """COMMENT
LOWapi/app/core/memory/src/search.py521COMMENT
LOWapi/app/core/memory/src/search.py541# # Get model name for metadataCOMMENT
LOWapi/app/core/memory/src/search.py561COMMENT
LOWapi/app/core/memory/src/search.py581# item_text = extract_text(item)COMMENT
LOWapi/app/core/memory/src/search.py601# - 0.0 means completely irrelevantCOMMENT
LOWapi/app/core/memory/src/search.py621# # Clamp to [0.0, 1.0]COMMENT
91 more matches not shown…
Verbosity Indicators74 hits · 105 pts
SeverityFileLineSnippetContext
LOW…plicationManagement/components/UploadWorkflowModal.tsx37 'upload', // Step 1: File uploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx38 'complex', // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx39 'sureInfo', // Step 3: Information confirmationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx40 'completed' // Step 4: Success messageCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx95 case 0: // Step 1: Upload fileCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx130 case 1: // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx144 case 2: // Step 3: Confirm informationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx215 case 0: // Step 1: UploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx229 case 3: // Step 4: CompletedCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx40 'upload', // Step 1: File uploadCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx41 'complex', // Step 2: Error/warning displayCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx42 'completed' // Step 4: Success messageCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx96 case 0: // Step 1: Upload fileCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx164 case 0: // Step 1: UploadCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx25 'receiveTask', // Step 1: Receive taskCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx26 'analyTask', // Step 2: Analyze task intentCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx27 'dynamicMatchSkill', // Step 3: Dynamically match appropriate skillCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx28 'executeTask' // Step 4: Execute the taskCODE
LOWe2b-infra/tests/test_e2e.py376 # Step 1: HealthCOMMENT
LOWe2b-infra/tests/test_e2e.py383 # Step 2: TemplateCOMMENT
LOWe2b-infra/tests/test_e2e.py390 # Step 3: Create sandboxCOMMENT
LOWe2b-infra/tests/test_e2e.py396 # Step 4: Wait readyCOMMENT
LOWe2b-infra/tests/test_e2e.py405 # Step 5: Write fileCOMMENT
LOWe2b-infra/tests/test_e2e.py409 # Step 6: Run commandCOMMENT
LOWe2b-infra/tests/test_e2e.py413 # Step 7: Stream commandCOMMENT
LOWe2b-infra/tests/test_e2e.py417 # Step 8: Read fileCOMMENT
LOWe2b-infra/tests/test_e2e.py421 # Step 9: Kill sandboxCOMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py735 # Step 2: 解析 memory_config_id(走 workspace 默认配置,与滑动窗口路径一致)COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py742 # Step 3: 逐条处理COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py693 # Step 1: 查询对话信息 + 未写入消息COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py764 # Step 4: 清理 pending_conversations SetCOMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py563 # Step 5: 摘要写入(依赖 Step 4 写入的 CONTAINS 边)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py588 # Step 6: 聚类(Celery 异步,不阻塞)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py617 # Step 1: 预处理COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py645 # Step 2: 萃取COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py755 # Step 3: 存储COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py989 # Step 4: 聚类COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py358 # Step 1: 剪枝 - 统一剪枝所有消息COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py446 # Step 2: 预处理 - 消息分块COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py492 # Step 3: 萃取 + 摘要 LLM 生成并行启动COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py524 # Step 4: Store + Stats 并行(Neo4j + Redis 互不依赖)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py124 # Step 1: Call LLM for extraction with timeoutCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py169 # Step 2: First-layer validation (string validation and cleaning)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py191 # Step 3: Second-layer validation (OWL semantic validation)COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py74 # Step 1: 从 DB 刷新 pruned_contentCOMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py78 # Step 2: 遍历消息,收集 LLM 任务COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py139 # Step 3: 并发执行 LLM 任务COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py195 # Step 4: 批量回写 DBCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1312 # Step 1: 候选召回(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1318 # Step 2: 综合打分(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1324 # Step 3: LLM 调用(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1331 # Step 4: 策略决策(选择 keeper)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1361 # Step 5: 写入COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1752 # Step 1: 获取上下文COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1762 # Step 2: LLM 消解 + 提取COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1391 # Step 6: 写 ReflectionLogCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1778 # Step 3: 校验COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1811 # Step 4: 写入 Neo4jCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1956 # Step 5: 写反思日志(仅 resolved=true 时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py2073 # Step 1: 碎片拆分 + 备份 timelineCOMMENT
14 more matches not shown…
Structural Annotation Overuse74 hits · 104 pts
SeverityFileLineSnippetContext
LOW…plicationManagement/components/UploadWorkflowModal.tsx37 'upload', // Step 1: File uploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx38 'complex', // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx39 'sureInfo', // Step 3: Information confirmationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx40 'completed' // Step 4: Success messageCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx95 case 0: // Step 1: Upload fileCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx130 case 1: // Step 2: Error/warning displayCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx144 case 2: // Step 3: Confirm informationCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx215 case 0: // Step 1: UploadCODE
LOW…plicationManagement/components/UploadWorkflowModal.tsx229 case 3: // Step 4: CompletedCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx40 'upload', // Step 1: File uploadCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx41 'complex', // Step 2: Error/warning displayCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx42 'completed' // Step 4: Success messageCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx96 case 0: // Step 1: Upload fileCODE
LOW…views/ApplicationManagement/components/UploadModal.tsx164 case 0: // Step 1: UploadCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx25 'receiveTask', // Step 1: Receive taskCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx26 'analyTask', // Step 2: Analyze task intentCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx27 'dynamicMatchSkill', // Step 3: Dynamically match appropriate skillCODE
LOW…src/views/ApplicationConfig/components/Skill/index.tsx28 'executeTask' // Step 4: Execute the taskCODE
LOWe2b-infra/tests/test_e2e.py376 # Step 1: HealthCOMMENT
LOWe2b-infra/tests/test_e2e.py383 # Step 2: TemplateCOMMENT
LOWe2b-infra/tests/test_e2e.py390 # Step 3: Create sandboxCOMMENT
LOWe2b-infra/tests/test_e2e.py396 # Step 4: Wait readyCOMMENT
LOWe2b-infra/tests/test_e2e.py405 # Step 5: Write fileCOMMENT
LOWe2b-infra/tests/test_e2e.py409 # Step 6: Run commandCOMMENT
LOWe2b-infra/tests/test_e2e.py413 # Step 7: Stream commandCOMMENT
LOWe2b-infra/tests/test_e2e.py417 # Step 8: Read fileCOMMENT
LOWe2b-infra/tests/test_e2e.py421 # Step 9: Kill sandboxCOMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py735 # Step 2: 解析 memory_config_id(走 workspace 默认配置,与滑动窗口路径一致)COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py742 # Step 3: 逐条处理COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py693 # Step 1: 查询对话信息 + 未写入消息COMMENT
LOWapi/app/core/memory/pipelines/dispatcher.py764 # Step 4: 清理 pending_conversations SetCOMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py563 # Step 5: 摘要写入(依赖 Step 4 写入的 CONTAINS 边)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py588 # Step 6: 聚类(Celery 异步,不阻塞)COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py617 # Step 1: 预处理COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py645 # Step 2: 萃取COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py755 # Step 3: 存储COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py989 # Step 4: 聚类COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py358 # Step 1: 剪枝 - 统一剪枝所有消息COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py446 # Step 2: 预处理 - 消息分块COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py492 # Step 3: 萃取 + 摘要 LLM 生成并行启动COMMENT
LOWapi/app/core/memory/pipelines/write_pipeline.py524 # Step 4: Store + Stats 并行(Neo4j + Redis 互不依赖)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py124 # Step 1: Call LLM for extraction with timeoutCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py169 # Step 2: First-layer validation (string validation and cleaning)COMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py191 # Step 3: Second-layer validation (OWL semantic validation)COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py74 # Step 1: 从 DB 刷新 pruned_contentCOMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py78 # Step 2: 遍历消息,收集 LLM 任务COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py139 # Step 3: 并发执行 LLM 任务COMMENT
LOW…xtraction_engine/data_preprocessing/pruning_service.py195 # Step 4: 批量回写 DBCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1312 # Step 1: 候选召回(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1318 # Step 2: 综合打分(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1324 # Step 3: LLM 调用(均摊耗时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1331 # Step 4: 策略决策(选择 keeper)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1361 # Step 5: 写入COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1752 # Step 1: 获取上下文COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1762 # Step 2: LLM 消解 + 提取COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1391 # Step 6: 写 ReflectionLogCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1778 # Step 3: 校验COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1811 # Step 4: 写入 Neo4jCOMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py1956 # Step 5: 写反思日志(仅 resolved=true 时)COMMENT
LOW…storage_services/reflection_engine/layer2_inspector.py2073 # Step 1: 碎片拆分 + 备份 timelineCOMMENT
14 more matches not shown…
Cross-Language Confusion20 hits · 98 pts
SeverityFileLineSnippetContext
HIGHsandbox/tests/stress_test.py137 for (let i = 2; i <= n; i++) if (isPrime[i]) primes.push(i);CODE
HIGHe2b-infra/tests/test_e2e.py230 "cmd": "echo $TEST_VAR && python -c \"import json; data=json.load(open('/app/test_config.json')); print(CODE
HIGHe2b-infra/tests/test_e2e.py265 cmd = "for i in 1 2 3; do echo \"line_$i\"; sleep 0.5; done && echo '{\"event\": \"done\", \"data\": {\"count\":CODE
HIGH…/agent-runtime/runtime/core/workflow/nodes/llm/node.py247 # Optional (required=False) scalar fields allow null; required fields do notCOMMENT
HIGH…/agent-runtime/runtime/core/workflow/nodes/llm/node.py331 (recursively, each child defaults to null) so the full schemaSTRING
HIGH…gent-runtime/runtime/core/workflow/nodes/agent/node.py53 {"tool_id": "uuid", "tool_type": "builtin", "operation": null, "enabled": true}STRING
HIGHapi/app/core/workflow/nodes/llm/node.py248 # Optional (required=False) scalar fields allow null; required fields do notCOMMENT
HIGHapi/app/core/workflow/nodes/llm/node.py332 (recursively, each child defaults to null) so the full schemaSTRING
HIGHapi/app/core/workflow/nodes/agent/node.py56 {"tool_id": "uuid", "tool_type": "builtin", "operation": null, "enabled": true}STRING
HIGHapi/app/repositories/neo4j/cypher_queries.py2812 e.activation_value = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py2815 e.last_access_time = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py2820 e.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py45SET s.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py284SET c.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py510SET e.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py528SET s.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py533SET o.delete_at = null,CODE
HIGHapi/app/repositories/neo4j/cypher_queries.py2799 e.delete_at = null,CODE
HIGHapi/app/controllers/memory_dashboard_controller.py592 } | null,STRING
HIGHapi/app/services/workflow_service.py5194 第二轮 user 不会成为孤儿(parent=null)。第一轮无已落库 assistant 时返回 None。STRING
Redundant / Tautological Comments52 hits · 77 pts
SeverityFileLineSnippetContext
LOWsandbox/runtime/script/env.sh3# Check if the correct number of arguments are providedCOMMENT
LOWsandbox/runtime/script/env.sh30# Check if src is a file or directoryCOMMENT
LOWe2b-infra/tests/test_e2e.py99 # Check if template already existsCOMMENT
LOWe2b-infra/tests/setup_and_test.sh99# Check if httpx is availableCOMMENT
LOW…agent-runtime/runtime/core/workflow/nodes/base_node.py492 # Check if it's a completion markerCOMMENT
LOW…agent-runtime/runtime/core/workflow/nodes/base_node.py635 # # Check if the node has an error edge definedCOMMENT
LOW…time/core/workflow/engine/stream_output_coordinator.py423 # Check if this variable's scope was already fully streamed via node_chunk events.COMMENT
LOWapi/app/dependencies.py497 # Check if user is a memberCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py77 # Check if emptyCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py85 # Check if it's an OWL reserved wordCOMMENT
LOW…app/core/memory/utils/validation/ontology_validator.py91 # Check if starts with uppercase letter (only for ASCII letters)COMMENT
LOWapi/app/core/memory/utils/validation/owl_validator.py142 # Check if parent existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py105 # Check if file existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py204 # Check if file existsCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py218 # Open file and seek to end to start streaming new contentCOMMENT
LOWapi/app/core/memory/agent/logger_file/log_streamer.py227 # Check if file has new contentCOMMENT
LOW…ion_engine/knowledge_extraction/ontology_extraction.py184 # Check if we have enough classes after first-layer validationCOMMENT
LOWapi/app/core/memory/src/search.py171 # Check if we've seen this ID or content beforeCOMMENT
LOWapi/app/core/memory/src/search.py522# # Check if reranking is enabledCOMMENT
LOWapi/app/core/models/llm.py551 # Check if there's a fallback methodCOMMENT
LOWapi/app/core/rag/graphrag/general/index.py463 # Check if task has been canceled before resolutionCOMMENT
LOWapi/app/core/rag/crawler/content_extractor.py87 # Check if content is staticCOMMENT
LOWapi/app/core/rag/crawler/url_normalizer.py120 # Check if domains matchCOMMENT
LOWapi/app/core/rag/crawler/url_normalizer.py155 # Check if href starts with http/https (absolute URL)COMMENT
LOWapi/app/core/rag/crawler/web_crawler.py143 # Check if static contentCOMMENT
LOWapi/app/core/workflow/nodes/base_node.py492 # Check if it's a completion markerCOMMENT
LOWapi/app/core/workflow/nodes/base_node.py635 # # Check if the node has an error edge definedCOMMENT
LOW…/app/core/workflow/engine/stream_output_coordinator.py469 # Check if this variable's scope was already fully streamed via node_chunk events.COMMENT
LOWapi/app/core/validators/file_validator.py223 # Check if the detected type matches the extensionCOMMENT
LOWapi/app/repositories/memory_config_repository.py680 # Check if config exists but workspace is missingCOMMENT
LOWapi/app/repositories/memory_config_repository.py787 # Check if config exists but workspace is missingCOMMENT
LOWapi/app/controllers/mcp_market_controller.py186 # Check if the mcp market name already existsCOMMENT
LOWapi/app/controllers/file_storage_controller.py201 # Read file contentsCOMMENT
LOWapi/app/controllers/i18n_controller.py116 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py176 # Check if language already existsCOMMENT
LOWapi/app/controllers/i18n_controller.py228 # Check if language existsCOMMENT
LOWapi/app/controllers/i18n_controller.py316 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py355 # Check if locale existsCOMMENT
LOWapi/app/controllers/i18n_controller.py417 # Check if locale existsCOMMENT
LOWapi/app/controllers/knowledge_controller.py659 # Check if the knowledge base name already existsCOMMENT
LOWapi/app/controllers/upload_controller.py242 # Check if physical file existsCOMMENT
LOWapi/app/services/prompt_optimizer_service.py253 # Check if end tag already in bufferCOMMENT
LOWapi/app/services/workflow_tool_publish_service.py185 # Check if already publishedCOMMENT
LOWapi/app/services/memory_agent_service.py54 # Check if AI message contains tool callsCOMMENT
LOWapi/app/services/memory_agent_service.py70 # Check if tool messageCOMMENT
LOWapi/app/services/memory_agent_service.py116 # Check if pool usage is too highCOMMENT
LOWapi/app/services/memory_agent_service.py186 # Check if file exists before starting streamCOMMENT
LOWapi/app/services/memory_agent_service.py699 # Check if file exists before starting streamCOMMENT
LOWapi/app/services/memory_config_service.py1156 # Check if this is the default config - default configs cannot be deletedCOMMENT
LOWapi/app/services/memory_config_service.py1267 # Check if this is the default config - default configs cannot be deletedCOMMENT
LOWapi/app/services/memory_config_service.py1416 # Check if it's a numeric string (legacy int format)COMMENT
LOWapi/app/services/user_memory_service.py206 # Check if time distribution is too concentrated (likely batch imported data)STRING
AI Structural Patterns71 hits · 52 pts
SeverityFileLineSnippetContext
LOW…/redbear-model/src/redbear_model/runtime/generation.py92CODE
LOW…/redbear-model/src/redbear_model/runtime/generation.py179CODE
LOW…es/agent-runtime/runtime/core/agent/langchain_agent.py219CODE
LOW…untime/core/workflow/nodes/parameter_extractor/node.py249CODE
LOWapi/app/tasks.py2572CODE
LOWapi/app/tasks.py2822CODE
LOWapi/app/tasks.py2689CODE
LOWapi/app/core/memory/memory_service.py307CODE
LOWapi/app/core/memory/pipelines/write_pipeline.py250CODE
LOWapi/app/core/memory/agent/utils/get_dialogs.py8CODE
LOW…ion_engine/knowledge_extraction/ontology_extraction.py55CODE
LOW…y/storage_services/reflection_engine/self_reflexion.py160CODE
LOW…e/memory/read_services/search_engine/content_search.py60CODE
LOWapi/app/core/agent/langchain_agent.py221CODE
LOWapi/app/core/models/generation.py77CODE
LOWapi/app/core/models/generation.py197CODE
LOWapi/app/core/rag/deepdoc/parser/mineru_parser.py440CODE
LOWapi/app/core/rag/graphrag/utils.py423CODE
LOWapi/app/core/rag/graphrag/general/graph_extractor.py51CODE
LOWapi/app/core/rag/nlp/search.py696CODE
LOWapi/app/core/workflow/nodes/parameter_extractor/node.py290CODE
LOWapi/app/core/workflow/adapters/dify/converter.py1172CODE
LOWapi/app/controllers/api_key_controller.py287CODE
LOWapi/app/controllers/model_controller.py44CODE
LOWapi/app/controllers/model_controller.py112CODE
LOWapi/app/controllers/memory_display_controller.py38CODE
LOWapi/app/controllers/app_controller.py473CODE
LOWapi/app/controllers/app_log_controller.py24CODE
LOWapi/app/controllers/document_controller.py109CODE
LOWapi/app/controllers/knowledge_controller.py279CODE
LOW…app/controllers/service/rag_api_document_controller.py30CODE
LOW…pp/controllers/service/rag_api_knowledge_controller.py69CODE
LOWapi/app/services/prompt_optimizer_service.py563CODE
LOWapi/app/services/app_chat_service.py482CODE
LOWapi/app/services/app_chat_service.py1057CODE
LOWapi/app/services/app_chat_service.py1971CODE
LOWapi/app/services/app_chat_service.py2008CODE
LOWapi/app/services/memory_reflection_service.py790CODE
LOWapi/app/services/multi_agent_orchestrator.py140CODE
LOWapi/app/services/multi_agent_orchestrator.py1404CODE
LOWapi/app/services/workspace_service.py418CODE
LOWapi/app/services/e2b_agent_adapter.py35CODE
LOWapi/app/services/e2b_agent_adapter.py169CODE
LOWapi/app/services/draft_run_service.py669CODE
LOWapi/app/services/draft_run_service.py1130CODE
LOWapi/app/services/draft_run_service.py1596CODE
LOWapi/app/services/draft_run_service.py2798CODE
LOWapi/app/services/draft_run_service.py3423CODE
LOWapi/app/services/draft_run_service.py3653CODE
LOWapi/app/services/generation_service.py77CODE
LOWapi/app/services/generation_service.py132CODE
LOWapi/app/services/generation_service.py177CODE
LOWapi/app/services/app_service.py2755CODE
LOWapi/app/services/app_service.py1243CODE
LOWapi/app/services/workflow_service.py931CODE
LOWapi/app/services/workflow_service.py1293CODE
LOWapi/app/services/workflow_service.py6314CODE
LOWapi/app/services/workflow_service.py6836CODE
LOWapi/app/services/memory_storage_service.py1168CODE
LOWapi/app/services/memory_storage_service.py1177CODE
11 more matches not shown…
Modern AI Meta-Vocabulary16 hits · 50 pts
SeverityFileLineSnippetContext
MEDIUMe2b-infra/templates/agent-runtime/extract_runtime.sh11# - Document parsing (RAG ingestion happens outside sandbox)COMMENT
MEDIUMapi/app/tasks.py2640 # RAG 存储类型走独立路径COMMENT
MEDIUMapi/app/core/error_codes.py85 # RAG/知识(9xxx)COMMENT
MEDIUMapi/app/core/rag_utils/README.md1# RAG Chunk 分析工具COMMENT
MEDIUMapi/app/core/memory/pipelines/dispatcher.py333# RAG 写入COMMENT
MEDIUMapi/app/core/rag/llm/embedding_model.py54 # between cl100k_base (used by truncate) and the actual embedding modelCOMMENT
MEDIUMapi/app/models/end_user_model.py98 # RAG存储模式专用字段 - RAG Storage Mode FieldsCOMMENT
MEDIUMapi/app/controllers/memory_controller.py88 # ── RAG 路径:保持不变,直接拼接文本写向量库 ──COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py26# "/{app_id}/multi-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py118# "/{app_id}/multi-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py135# "/{app_id}/multi-agent/run",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py163# "/{app_id}/multi-agent/test-routing",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py283# "/{app_id}/multi-agent/test-master-agent",COMMENT
MEDIUMapi/app/controllers/multi_agent_controller.py437# "/{app_id}/multi-agent/batch-test-routing",COMMENT
MEDIUMapi/app/controllers/memory_dashboard_controller.py424# ======== RAG 数据统计 ========COMMENT
MEDIUMapi/app/services/memory_dashboard_service.py450# ======== RAG 相关服务 ========COMMENT
Self-Referential Comments16 hits · 48 pts
SeverityFileLineSnippetContext
MEDIUMsandbox/runtime/script/env.sh45 # Create the same directory structure in the destinationCOMMENT
MEDIUM…t-runtime/runtime/core/workflow/nodes/assigner/node.py52 # Initialize a variable pool for accessing conversation, node, and system variablesCOMMENT
MEDIUMapi/app/core/memory/utils/validation/owl_validator.py86 # Create a new world (isolated ontology environment)COMMENT
MEDIUM…alytics/implicit_memory/analyzers/interest_analyzer.py41 # Define the four interest categories we analyzeCOMMENT
MEDIUM…lytics/implicit_memory/analyzers/dimension_analyzer.py42 # Define the four dimensions we analyzeCOMMENT
MEDIUMapi/app/core/rag/crawler/robots_parser.py67 # Create a permissive parserCOMMENT
MEDIUMapi/app/core/workflow/executor.py210 # Initialize the variable pool and system variablesCOMMENT
MEDIUMapi/app/core/workflow/nodes/assigner/node.py52 # Initialize a variable pool for accessing conversation, node, and system variablesCOMMENT
MEDIUMapi/app/services/file_storage_service.py358# Create a default instance for convenienceCOMMENT
MEDIUMapi/app/services/workspace_service.py821 # Create the workspace without adding any membersCOMMENT
MEDIUMapi/app/services/workspace_service.py868 # Create the workspace without adding any membersCOMMENT
MEDIUMapi/app/services/memory_konwledges_server.py326 # Create a documentCOMMENT
MEDIUMapi/app/services/user_service.py48 # Create a default tenant for the superuserCOMMENT
MEDIUMapi/app/services/upload_service.py163 # Create a temporary UoW wrapper for the existing sessionCOMMENT
MEDIUMapi/tests/workflow/nodes/base.py51 # Initialize system variables (sys namespace)COMMENT
MEDIUMapi/tests/workflow/nodes/base.py56 # Initialize system variables (sys namespace)COMMENT
Synthetic Comment Markers3 hits · 20 pts
SeverityFileLineSnippetContext
HIGHweb/src/i18n/en/detail.ts90 portraitSubTitle: 'Personalized insights generated by AI based on your preference tags',CODE
HIGHapi/app/core/memory/models/graph_models.py274 # Core fields (ordered as requested)COMMENT
HIGHapi/app/core/memory/models/graph_models.py285 # Emotion fields (ordered as requested, emotion_intensity first for display)COMMENT
Dead Code9 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py550CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py566CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py567CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py568CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py625CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py626CODE
MEDIUMapi/app/core/rag/deepdoc/parser/pdf_parser.py647CODE
MEDIUMapi/app/repositories/memory_config_repository.py1074CODE
MEDIUMapi/app/repositories/memory_config_repository.py1078CODE
AI Slop Vocabulary5 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUM…orkflow/components/Properties/hooks/useVariableList.ts547 // Uses the same robust strategy as useVariableList:COMMENT
MEDIUMapi/app/core/memory/agent/logger_file/log_streamer.py35 # This pattern is comprehensive to handle various log formatsCOMMENT
MEDIUMapi/app/core/memory/models/base_response.py15 """Base class for LLM response models with robust validation.STRING
MEDIUMapi/app/core/rag/graphrag/light/graph_prompt.py140PROMPTS["summarize_entity_descriptions"] = """You are a helpful assistant responsible for generating a comprehensive sumCODE
MEDIUMapi/app/controllers/memory_short_term_controller.py109 # Compile comprehensive memory statistics responseCOMMENT
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippetContext
LOWapi/app/core/config.py201 FIRST_SUPERUSER_EMAIL: str = os.getenv("FIRST_SUPERUSER_EMAIL", "admin@example.com")CODE
LOWapi/app/core/memory/src/search.py476 # model_name = rc.get("model", "placeholder")COMMENT
LOWapi/app/core/rag/knowledge_graph/prompts.py29 "name": "Acme Corp",CODE
LOWapi/app/core/rag/prompts/structured_output_prompt.md14 {"name": "John Doe", "age": 30}CODE
LOWapi/app/schemas/order_schema.py25 "customer_name": "John Doe",CODE
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHapi/app/services/dynamic_handoff_tools.py309 api_key="your-api-key",CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOW…e/runtime/core/workflow/nodes/cycle_graph/iteration.py143 async def run_task(self, item, idx):CODE
LOWapi/app/core/workflow/nodes/cycle_graph/iteration.py143 async def run_task(self, item, idx):CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…re/memory/utils/visualization/forgetting_visualizer.py353 # Example usageCOMMENT