Repository Analysis

TencentCloud/TencentDB-Agent-Memory

TencentDB Agent Memory delivers fully local long-term memory for AI Agents via a 4-tier progressive pipeline, with zero external API dependencies.

23.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of TencentCloud/TencentDB-Agent-Memory, a TypeScript project with 8,839 GitHub stars. SynthScan v2.0 examined 46,710 lines of code across 155 source files, recording 458 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 23.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).

23.4
Adjusted Score
23.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
8.8K
Stars
TypeScript
Language
46.7K
Lines of Code
155
Files
458
Pattern Hits
2026-07-14
Scan Date
0.08
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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

CRITICAL 0HIGH 12MEDIUM 251LOW 195

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

Decorative Section Separators249 hits · 783 pts
SeverityFileLineSnippetContext
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py306# ---------------------------------------------------------------------------COMMENT
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py308# ---------------------------------------------------------------------------COMMENT
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py364# ---------------------------------------------------------------------------COMMENT
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py366# ---------------------------------------------------------------------------COMMENT
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py1124# ---------------------------------------------------------------------------COMMENT
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py1126# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py234# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py236# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py325# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py327# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py415# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py417# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py76# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py78# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py185# ---------------------------------------------------------------------------COMMENT
MEDIUM…mory_tencentdb/tests/test_memory_tencentdb_recovery.py187# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py70# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py72# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py105# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py107# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py262# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py264# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py466# ---------------------------------------------------------------------------COMMENT
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py468# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh36# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh38# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh82# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh84# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh203# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh209# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh222# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh224# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh380# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh386# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh741# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh748# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh931# ============================================================COMMENT
MEDIUMscripts/memory-tencentdb-ctl.sh933# ============================================================COMMENT
MEDIUMscripts/setup-offload.sh2# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh4# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh21# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh71# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh73# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh90# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh92# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh131# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh133# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh282# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh284# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh329# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/setup-offload.sh331# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh2# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh4# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh19# ═══════════════════════════════════════════════════════════════════COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh29# ─── 定位 OpenClaw 安装目录 ──────────────────────────────────────COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh122# ─── 检测 OpenClaw 版本 ──────────────────────────────────────────COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh126# ─── 已 patch 检测 ───────────────────────────────────────────────COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh151# ─── 备份工具 ────────────────────────────────────────────────────COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh161# ─── 查找所有候选文件 ────────────────────────────────────────────COMMENT
MEDIUMscripts/openclaw-after-tool-call-messages.patch.sh175# ─── 对每个候选文件尝试多种策略 ──────────────────────────────────COMMENT
189 more matches not shown…
Hyper-Verbose Identifiers76 hits · 80 pts
SeverityFileLineSnippetContext
LOWtsdown.config.ts5function collectExternalDependencies(): string[] {CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py543 def _ensure_alive_for_request(self) -> bool:CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py202def test_is_process_alive_returns_false_without_spawn():CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py207def test_is_process_alive_true_when_running():CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py213def test_is_process_alive_false_after_exit():CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py219def test_reap_dead_process_drops_handle():CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py226def test_reap_dead_process_keeps_alive_handle():CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py239def test_watchdog_starts_after_initialize(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py245def test_watchdog_detects_dead_gateway_and_resurrects(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py330def test_prefetch_recovers_when_stuck_false_and_breaker_closed(CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py420def test_shutdown_drops_supervisor_blocks_recovery(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py149def provider_with_fake_supervisor(monkeypatch, fast_watchdog):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py271def test_watchdog_picks_up_external_restart_without_respawning(CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py295def test_watchdog_resets_circuit_breaker_on_recovery(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py313def test_watchdog_stops_on_shutdown(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py360def test_prefetch_respects_open_breaker(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py378def test_handle_tool_call_recovers_when_stuck_false(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py396def test_sync_turn_recovers_when_stuck_false(provider_with_fake_supervisor):CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py432def test_shutdown_is_idempotent(provider_with_fake_supervisor):CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py117def _make_fake_gateway_script(tmpdir: pathlib.Path, pid_file: pathlib.Path) -> pathlib.Path:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py321 def test_provider_shutdown_should_stop_supervisor_gateway(self) -> None:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py349 def test_external_gateway_is_not_killed(self) -> None:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py396 def test_second_provider_does_not_reuse_stale_gateway(self) -> None:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py509 def test_real_gateway_graceful_shutdown(self) -> None:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py603 def test_wal_checkpoint_after_capture_and_sigterm(self) -> None:CODE
LOWscripts/migrate-sqlite-to-tcvdb/config-write.ts47export function buildMigrationPluginConfigPatch(target: MigrationPluginConfigTarget): Record<string, unknown> {CODE
LOWscripts/migrate-sqlite-to-tcvdb/config-write.ts102export async function writeMigrationPluginConfig(CODE
LOWscripts/migrate-sqlite-to-tcvdb/sqlite-to-tcvdb.ts564export function resolveMigrationCliOptions(argv: string[]): ResolvedMigrationCliOptions {CODE
LOWscripts/migrate-sqlite-to-tcvdb/sqlite-to-tcvdb.ts640export async function collectMigrationPreflight(CODE
LOWsrc/config.ts689function normalizeOffloadRetentionDays(value: number): number {CODE
LOWsrc/core/seed/input.ts94export function validateAndNormalizeRaw(CODE
LOWsrc/core/seed/input.ts417function checkTimestampConsistency(sessions: RawSession[]): TimestampCheckResult {CODE
LOWsrc/core/tools/conversation-search.ts83export async function executeConversationSearch(params: {CODE
LOWsrc/core/tools/conversation-search.ts249export function formatConversationSearchResponse(result: ConversationSearchResult): string {CODE
LOWsrc/core/hooks/auto-recall.ts272async function searchMemoriesWithDetails(CODE
LOWsrc/core/prompts/l1-dedup.ts94export function formatBatchConflictPrompt(matches: CandidateMatch[]): string {CODE
LOWsrc/core/prompts/scene-extraction.ts265export function buildSceneExtractionPrompt(params: SceneExtractionPromptParams): SceneExtractionPromptResult {CODE
LOWsrc/core/report/reporter.ts86export async function getOrCreateInstanceId(pluginDataDir: string): Promise<string> {CODE
LOWsrc/core/scene/filename-normalizer.ts74export function isNormalizedSceneFilename(name: string): boolean {CODE
LOWsrc/core/conversation/l0-recorder.ts457export async function readConversationMessagesGroupedBySessionId(CODE
LOWsrc/core/conversation/l0-recorder.ts521function extractUserAssistantMessages(messages: unknown[]): ConversationMessage[] {CODE
LOWsrc/utils/sanitize.ts345function escapeControlCharsInJsonStrings(text: string): string {CODE
LOWsrc/utils/clean-context-runner.ts65export function setPreferredEmbeddedAgentRuntime(CODE
LOWsrc/utils/clean-context-runner.ts71function resolveInjectedRunEmbeddedPiAgent(CODE
LOWsrc/utils/clean-context-runner.ts79async function resolveRunEmbeddedPiAgent(CODE
LOWsrc/utils/clean-context-runner.ts225export function resolveModelFromMainConfig(config: unknown): ModelRef | undefined {CODE
LOWsrc/utils/no-think-fetch.ts36export function isValidDisableThinkingStrategy(value: unknown): value is DisableThinkingStrategy {CODE
LOWsrc/utils/memory-cleaner.ts285function extractShardDateFromFileName(CODE
LOWsrc/utils/memory-cleaner.ts332function computeCutoffMsByLocalDay(nowMs: number, retentionDays: number): number {CODE
LOWsrc/utils/time.ts203export function describeTimeZoneForPrompt(): string {CODE
LOWsrc/offload/l3-helpers.ts14export function normalizeToolCallIdForLookup(id: string): string {CODE
LOWsrc/offload/l3-helpers.ts82export function isAssistantMessageWithToolUse(msg: any): boolean {CODE
LOWsrc/offload/l3-helpers.ts94export function extractToolUseIdFromAssistant(msg: any): string | null {CODE
LOWsrc/offload/l3-helpers.ts184export function replaceAssistantToolUseWithSummary(CODE
LOWsrc/offload/l3-helpers.ts264export function compressNonCurrentToolUseBlocks(CODE
LOWsrc/offload/reclaimer.ts199async function syncRegistryAfterJsonlDeletion(dir: string, logger: PluginLogger): Promise<void> {CODE
LOWsrc/offload/mmd-injector.ts173function findLatestUserMessageIndex(messages: any[]): number {CODE
LOWsrc/offload/mmd-injector.ts200export function findActiveMmdInsertionPoint(messages: any[]): number {CODE
LOWsrc/offload/mmd-injector.ts294export function findHistoryMmdInsertionPoint(messages: any[]): number {CODE
LOWsrc/offload/storage.ts382export function extractConfirmedIdsFromEntries(CODE
16 more matches not shown…
Magic Placeholder Names12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHREADME.md223MODEL_API_KEY="your-api-key"CODE
HIGHREADME.md247 -e MODEL_API_KEY="your-api-key" \CODE
HIGHREADME.md318TDAI_LLM_API_KEY="sk-your-api-key-here"CODE
HIGHREADME.md329 "apiKey": "your-api-key",CODE
HIGHREADME_CN.md227MODEL_API_KEY="your-api-key"CODE
HIGHREADME_CN.md251 -e MODEL_API_KEY="your-api-key" \CODE
HIGHREADME_CN.md322TDAI_LLM_API_KEY="sk-your-api-key-here"CODE
HIGHREADME_CN.md333 "apiKey": "your-api-key",CODE
HIGHdocker/opensource/README-hermes.md35 -e MODEL_API_KEY="your-api-key" \CODE
HIGHscripts/install_hermes_memory_tencentdb.sh362echo " MEMORY_TENCENTDB_LLM_API_KEY=your-api-key"CODE
HIGHscripts/export-tencent-vdb/export-tencent-vdb.ts158 console.error(' --api-key "your-api-key" \\');CODE
HIGHscripts/migrate-sqlite-to-tcvdb/README.md56 --tcvdb-api-key 'your-api-key-here' \CODE
Structural Annotation Overuse30 hits · 56 pts
SeverityFileLineSnippetContext
LOWSKILL-DIAGNOSTIC-EXPORT.md15### Step 1: 确认环境COMMENT
LOWSKILL-DIAGNOSTIC-EXPORT.md32### Step 2: 执行导出脚本COMMENT
LOWSKILL-DIAGNOSTIC-EXPORT.md50### Step 3: 确认导出结果COMMENT
LOWSKILL-DIAGNOSTIC-EXPORT.md70### Step 4: 告知用户后续操作COMMENT
LOWsrc/core/record/l1-extractor.ts151 // Step 1: LLM extraction (scene segmentation + memory extraction)COMMENT
LOWsrc/core/record/l1-extractor.ts218 // Step 2: Batch Conflict Detection + WriteCOMMENT
LOWsrc/core/hooks/auto-capture.ts298 // Step 3: Notify scheduler of this conversation roundCOMMENT
LOWsrc/core/prompts/l1-dedup.ts95 // Step 1: Build unified candidate pool (de-duplicate across all new memories)COMMENT
LOWsrc/core/prompts/l1-dedup.ts110 // Step 2: Format unified pool as JSONCOMMENT
LOWsrc/core/prompts/l1-dedup.ts128 // Step 3: Format each new memory with its related candidate IDsCOMMENT
LOWsrc/core/prompts/l1-dedup.ts155 // Step 4: Assemble final promptCOMMENT
LOWsrc/core/conversation/l0-recorder.ts109 // Step 1: Position slice + extract user/assistant messages.COMMENT
LOWsrc/core/conversation/l0-recorder.ts190 // Step 2: Replace polluted user messages with cached original prompt.COMMENT
LOWsrc/core/conversation/l0-recorder.ts246 // Step 3: Sanitize and filterCOMMENT
LOWsrc/core/conversation/l0-recorder.ts265 // Step 4: Write to JSONL file — one message per line (flat format)COMMENT
LOWsrc/utils/pipeline-manager.ts478 // Step 1: cancel the idle timer so it won't fire after we return.COMMENT
LOWsrc/utils/pipeline-manager.ts483 // Step 2: flush pending buffered messages through L1 if any.COMMENT
LOWsrc/utils/pipeline-manager.ts491 // Step 3: wait for L1 to drain. L1 is a single-consumer SerialQueueCOMMENT
LOWsrc/utils/pipeline-manager.ts560 // Step 1: Flush all L1 idle timers — only enqueue if there are buffered messagesCOMMENT
LOWsrc/utils/pipeline-manager.ts572 // Step 2: Wait for L1 queue to drainCOMMENT
LOWsrc/utils/pipeline-manager.ts576 // Step 3: Flush all L2 schedule timersCOMMENT
LOWsrc/utils/pipeline-manager.ts584 // Step 4: Wait for all remaining queues to drainCOMMENT
LOWsrc/utils/clean-context-runner.ts235 // Step 1: extract raw model value (string | { primary?: string })COMMENT
LOWsrc/utils/clean-context-runner.ts246 // Step 2: try direct "provider/model" parseCOMMENT
LOWsrc/utils/clean-context-runner.ts250 // Step 3: alias lookup — raw doesn't contain "/", check agents.defaults.modelsCOMMENT
LOWsrc/offload/reclaimer.ts91 // Step 1: Clean expired session JSONLCOMMENT
LOWsrc/offload/reclaimer.ts98 // Step 2: Clean orphan ref MDCOMMENT
LOWsrc/offload/reclaimer.ts105 // Step 3: Clean expired MMDCOMMENT
LOWsrc/offload/reclaimer.ts112 // Step 4: Log rotationCOMMENT
LOWsrc/offload/reclaimer.ts119 // Step 5: Registry pruningCOMMENT
Verbosity Indicators26 hits · 50 pts
SeverityFileLineSnippetContext
LOWsrc/core/record/l1-extractor.ts151 // Step 1: LLM extraction (scene segmentation + memory extraction)COMMENT
LOWsrc/core/record/l1-extractor.ts218 // Step 2: Batch Conflict Detection + WriteCOMMENT
LOWsrc/core/hooks/auto-capture.ts298 // Step 3: Notify scheduler of this conversation roundCOMMENT
LOWsrc/core/prompts/l1-dedup.ts95 // Step 1: Build unified candidate pool (de-duplicate across all new memories)COMMENT
LOWsrc/core/prompts/l1-dedup.ts110 // Step 2: Format unified pool as JSONCOMMENT
LOWsrc/core/prompts/l1-dedup.ts128 // Step 3: Format each new memory with its related candidate IDsCOMMENT
LOWsrc/core/prompts/l1-dedup.ts155 // Step 4: Assemble final promptCOMMENT
LOWsrc/core/conversation/l0-recorder.ts109 // Step 1: Position slice + extract user/assistant messages.COMMENT
LOWsrc/core/conversation/l0-recorder.ts190 // Step 2: Replace polluted user messages with cached original prompt.COMMENT
LOWsrc/core/conversation/l0-recorder.ts246 // Step 3: Sanitize and filterCOMMENT
LOWsrc/core/conversation/l0-recorder.ts265 // Step 4: Write to JSONL file — one message per line (flat format)COMMENT
LOWsrc/utils/pipeline-manager.ts478 // Step 1: cancel the idle timer so it won't fire after we return.COMMENT
LOWsrc/utils/pipeline-manager.ts483 // Step 2: flush pending buffered messages through L1 if any.COMMENT
LOWsrc/utils/pipeline-manager.ts491 // Step 3: wait for L1 to drain. L1 is a single-consumer SerialQueueCOMMENT
LOWsrc/utils/pipeline-manager.ts560 // Step 1: Flush all L1 idle timers — only enqueue if there are buffered messagesCOMMENT
LOWsrc/utils/pipeline-manager.ts572 // Step 2: Wait for L1 queue to drainCOMMENT
LOWsrc/utils/pipeline-manager.ts576 // Step 3: Flush all L2 schedule timersCOMMENT
LOWsrc/utils/pipeline-manager.ts584 // Step 4: Wait for all remaining queues to drainCOMMENT
LOWsrc/utils/clean-context-runner.ts235 // Step 1: extract raw model value (string | { primary?: string })COMMENT
LOWsrc/utils/clean-context-runner.ts246 // Step 2: try direct "provider/model" parseCOMMENT
LOWsrc/utils/clean-context-runner.ts250 // Step 3: alias lookup — raw doesn't contain "/", check agents.defaults.modelsCOMMENT
LOWsrc/offload/reclaimer.ts91 // Step 1: Clean expired session JSONLCOMMENT
LOWsrc/offload/reclaimer.ts98 // Step 2: Clean orphan ref MDCOMMENT
LOWsrc/offload/reclaimer.ts105 // Step 3: Clean expired MMDCOMMENT
LOWsrc/offload/reclaimer.ts112 // Step 4: Log rotationCOMMENT
LOWsrc/offload/reclaimer.ts119 // Step 5: Registry pruningCOMMENT
Excessive Try-Catch Wrapping31 hits · 33 pts
SeverityFileLineSnippetContext
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py90 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py213 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py250 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py265 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py293 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py320 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/client.py86 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/client.py90 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/client.py105 except Exception as e:CODE
MEDIUMhermes-plugin/memory/memory_tencentdb/__init__.py891def _sync():CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py534 except Exception as e: # defensive: never propagate to callerCODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py637 except Exception as e: # pragma: no cover - defensiveCODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py663 except Exception as e: # pragma: no cover - defensiveCODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py715 except Exception:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py784 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py852 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py900 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py971 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py1040 except Exception as e:CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py1063 except Exception as e:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py282 except Exception:CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py682 except Exception:CODE
MEDIUM…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py179def _term(_signum, _frame):CODE
LOWscripts/memory-tencentdb-ctl.sh139except Exception as e:CODE
LOWscripts/memory-tencentdb-ctl.sh413 except Exception:CODE
LOWscripts/memory-tencentdb-ctl.sh618 except Exception:CODE
LOWscripts/memory-tencentdb-ctl.sh671 except Exception as e:CODE
LOWscripts/memory-tencentdb-ctl.sh780 except Exception:CODE
LOWscripts/memory-tencentdb-ctl.sh792 except Exception:CODE
LOWscripts/bugfix-20260423/bugfix-20260423.sh181except Exception:CODE
LOWscripts/bugfix-20260423/bugfix-20260423-full.sh181except Exception:CODE
Over-Commented Block21 hits · 18 pts
SeverityFileLineSnippetContext
LOWREADME_CN.md221# ============ 配置参数说明 ============COMMENT
LOWindex.ts201 // the zod schema fix landed in v2026.4.24. Older hosts don't understandCOMMENT
LOWhermes-plugin/memory/memory_tencentdb/__init__.py41COMMENT
LOWhermes-plugin/memory/memory_tencentdb/__init__.py61_MAX_INFLIGHT_SYNCS = 4COMMENT
LOWhermes-plugin/memory/memory_tencentdb/__init__.py381 # time. Stuck threads (e.g. Gateway hung mid-capture) are tracked inCOMMENT
LOWhermes-plugin/memory/memory_tencentdb/__init__.py401 # it starts near zero at process start, which would make theCOMMENT
LOWscripts/memory-tencentdb-ctl.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/memory-tencentdb-ctl.sh21# 命令:COMMENT
LOWscripts/install_hermes_memory_tencentdb.sh1#!/bin/bashCOMMENT
LOWscripts/install_hermes_memory_tencentdb.sh21# 以目标用户身份执行(推荐):COMMENT
LOWscripts/install_hermes_memory_tencentdb.sh41# 3. ``whoami`` —— 当前 EUID 对应的用户COMMENT
LOWscripts/install_hermes_memory_tencentdb.sh61# 可通过环境变量 MEMORY_TENCENTDB_ROOT 覆盖COMMENT
LOWscripts/setup-offload.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/openclaw-after-tool-call-messages.patch.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/bugfix-20260423/bugfix-20260423.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/bugfix-20260423/bugfix-20260423-full.sh1#!/usr/bin/env bashCOMMENT
LOWsrc/core/hooks/auto-capture.ts141 }COMMENT
LOWsrc/core/scene/scene-extractor.ts241 // Phase 5: Subsequent processing — safe cleanup of soft-deleted filesCOMMENT
LOWsrc/core/conversation/l0-recorder.ts141 }COMMENT
LOWsrc/core/conversation/l0-recorder.ts181 );COMMENT
LOWsrc/utils/sanitize.ts21 // Remove offload-injected task context blocks (MMD mermaid diagrams)COMMENT
Unused Imports5 hits · 4 pts
SeverityFileLineSnippetContext
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py9CODE
LOWhermes-plugin/memory/memory_tencentdb/client.py7CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py27CODE
LOW…mory_tencentdb/tests/test_memory_tencentdb_recovery.py20CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py55CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWindex.ts350 // TODO: implement hard per-turn call limit via before_tool_call hook + execute early-return (方案 D)COMMENT
LOWindex.ts438 // TODO: implement hard per-turn call limit via before_tool_call hook + execute early-return (方案 D)COMMENT
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py20logger = logging.getLogger(__name__)CODE
LOWhermes-plugin/memory/memory_tencentdb/client.py15logger = logging.getLogger(__name__)CODE
LOWhermes-plugin/memory/memory_tencentdb/__init__.py42logger = logging.getLogger(__name__)CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWhermes-plugin/memory/memory_tencentdb/supervisor.py272 # Check if process diedCOMMENT
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWhermes-plugin/memory/memory_tencentdb/__init__.py594CODE
LOW…y/memory_tencentdb/tests/test_gateway_shutdown_leak.py603CODE