Repository Analysis

MoonshotAI/kimi-cli

Kimi Code CLI is your next CLI agent.

31.0 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of MoonshotAI/kimi-cli, a Python project with 11,073 GitHub stars. SynthScan v2.0 examined 235,259 lines of code across 953 source files, recording 4721 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 31.0 places this repository in the Strong 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).

31.0
Adjusted Score
31.0
Raw Score
100%
Time Factor
2026-07-16
Last Push
11.1K
Stars
Python
Language
235.3K
Lines of Code
953
Files
4.7K
Pattern Hits
2026-08-02
Scan Date
0.10
HC Hit Rate

What These Metrics Mean

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

Score History

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

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

Severity Breakdown

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

CRITICAL 52HIGH 43MEDIUM 724LOW 3902

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 4721 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.

Hyper-Verbose Identifiers2859 hits · 2744 pts
SeverityFileLineSnippetContext
LOWtests_e2e/test_wire_steer.py20def test_steer_no_active_turn(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_steer.py57def test_steer_during_active_turn(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_steer.py117def test_steer_basic_lifecycle_completes(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_protocol.py24def test_initialize_handshake(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_protocol.py125def test_initialize_external_tool_conflict(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_protocol.py390def test_prompt_without_initialize(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_question.py39def _question_request_handler(answers: dict[str, str]):CODE
LOWtests_e2e/test_wire_question.py55def test_question_request_answer(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_question.py122def test_question_request_error_response(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_question.py194def test_question_capability_negotiation(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_question.py217def test_ask_user_tool_hidden_when_question_not_supported(tmp_path) -> None:CODE
LOWtests_e2e/test_mcp_cli.py62def test_mcp_stdio_management(tmp_path: Path) -> None:CODE
LOWtests_e2e/test_mcp_cli.py153def test_mcp_http_management_and_auth_errors(tmp_path: Path) -> None:CODE
LOWtests_e2e/test_wire_sessions.py45def test_session_files_created(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_sessions.py86def test_continue_session_appends(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_sessions.py171def test_clear_context_rotates(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_sessions.py319def test_manual_compact_with_usage(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_sessions.py384def test_replay_streams_wire_history(tmp_path) -> None:CODE
LOWtests_e2e/wire_helpers.py59def register_path_replacements(CODE
LOWtests_e2e/wire_helpers.py353def build_tool_result_response(CODE
LOWtests_e2e/wire_helpers.py421def _normalize_tool_result_extras(value: dict[str, Any]) -> dict[str, Any]:CODE
LOWtests_e2e/wire_helpers.py432def _normalize_path_separators(value: str, replacements: Mapping[str, str]) -> str:CODE
LOWtests_e2e/wire_helpers.py452def _normalize_echo_error_message(value: str) -> str:CODE
LOWtests_e2e/wire_helpers.py484def _normalize_server_version(value: Any) -> Any:CODE
LOWtests_e2e/test_wire_approvals_tools.py56def test_shell_approval_approve(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py187def test_shell_approval_reject(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py685def test_display_block_diff_write_file(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py754def test_display_block_diff_str_replace(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py932def test_tool_call_part_streaming(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py1050def test_default_agent_missing_tool(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_approvals_tools.py1156def test_custom_agent_exclude_tool(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_real_llm.py12def test_parallel_task_subagents() -> None:CODE
LOWtests_e2e/test_wire_real_llm.py17def test_thinking_mode_toggle() -> None:CODE
LOWtests_e2e/test_wire_prompt.py330def test_status_update_fields(tmp_path) -> None:STRING
LOWtests_e2e/test_wire_prompt.py387def test_concurrent_prompt_error(tmp_path) -> None:STRING
LOWtests_e2e/test_wire_skills_mcp.py55def test_skill_prompt_injects_skill_text(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_errors.py19def test_invalid_json_request(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_errors.py113def test_cancel_without_prompt(tmp_path) -> None:CODE
LOWtests_e2e/test_wire_auth.py54def test_provider_connection_error_surfaces(tmp_path) -> None:CODE
LOWsdks/kimi-sdk/tests/test_smoke.py9def _chat_completion_response() -> dict[str, object]:CODE
LOW…/features/chat/components/virtualized-message-list.tsx54function VirtuosoScrollerComponent(CODE
LOW…/features/chat/components/virtualized-message-list.tsx148function VirtualizedMessageListComponent(CODE
LOW…/src/features/chat/components/chat-prompt-composer.tsx74export const ChatPromptComposer = memo(function ChatPromptComposerComponent({CODE
LOW…features/chat/components/activity-status-indicator.tsx198export const ActivityStatusIndicator = memo(function ActivityStatusIndicatorComponent({CODE
LOW…features/chat/components/activity-status-indicator.tsx266export const ToolbarActivityIndicator = memo(function ToolbarActivityIndicatorComponent({CODE
LOW…res/chat/components/prompt-toolbar/toolbar-changes.tsx21export const ToolbarChangesPanel = memo(function ToolbarChangesPanelComponent({CODE
LOW…res/chat/components/prompt-toolbar/toolbar-changes.tsx78export const ToolbarChangesTab = memo(function ToolbarChangesTabComponent({CODE
LOW…atures/chat/components/prompt-toolbar/toolbar-todo.tsx18export const ToolbarTodoPanel = memo(function ToolbarTodoPanelComponent({CODE
LOW…res/chat/components/prompt-toolbar/toolbar-context.tsx26 function ToolbarContextIndicatorComponent({CODE
LOW…tures/chat/components/prompt-toolbar/toolbar-queue.tsx109export const ToolbarQueuePanel = memo(function ToolbarQueuePanelComponent({CODE
LOWweb/src/features/sessions/sessions.tsx126function SessionsScrollerComponent(CODE
LOWweb/src/features/tool/components/display-content.tsx816function isImageSearchByTextResult(CODE
LOWweb/src/features/tool/components/display-content.tsx832function isImageSearchByImageResult(CODE
LOWweb/src/features/tool/components/display-content.tsx876function unwrapSearchResponseResult(data: unknown): SearchResponseResult {CODE
LOWweb/src/components/ui/diff/utils/parse.ts73function diffCharsIfWithinEditLimit(CODE
LOWweb/src/components/ui/diff/utils/parse.ts262function buildUnpairedDeletePrefix(changes: _Change[], pairOfDel: Int32Array) {CODE
LOWweb/src/components/ai-elements/code-block.tsx161function sanitizeCodeForLineNumbers(raw: string): {CODE
LOWweb/src/components/ai-elements/code-block.tsx204function makeLineNumberTransformer(numbers?: number[]): ShikiTransformer {CODE
LOWweb/src/hooks/use-theme.ts66function stopThemeSwitchingNextFrame(root: HTMLElement): void {CODE
LOWweb/src/lib/api/models/UpdateConfigTomlRequest.ts33export function instanceOfUpdateConfigTomlRequest(value: object): value is UpdateConfigTomlRequest {CODE
2799 more matches not shown…
Decorative Section Separators681 hits · 2583 pts
SeverityFileLineSnippetContext
MEDIUM…/src/features/chat/components/prompt-toolbar/index.tsx20// ─── Types ───────────────────────────────────────────────────COMMENT
MEDIUM…/src/features/chat/components/prompt-toolbar/index.tsx36// ─── Main toolbar ────────────────────────────────────────────COMMENT
MEDIUM…res/chat/components/prompt-toolbar/toolbar-changes.tsx14// ─── Exported components ─────────────────────────────────────COMMENT
MEDIUM…atures/chat/components/prompt-toolbar/toolbar-todo.tsx12// ─── Panel ───────────────────────────────────────────────────COMMENT
MEDIUM…atures/chat/components/prompt-toolbar/toolbar-todo.tsx55// ─── Tab ─────────────────────────────────────────────────────COMMENT
MEDIUM…tures/chat/components/prompt-toolbar/toolbar-queue.tsx26// ─── Sub-components ──────────────────────────────────────────COMMENT
MEDIUM…tures/chat/components/prompt-toolbar/toolbar-queue.tsx103// ─── Exported components ─────────────────────────────────────COMMENT
MEDIUMtests/ui/test_update_gate.py144# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py146# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py277# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py279# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py11# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py13# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py130# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py132# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py260# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py262# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py335# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui/test_update_gate.py337# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py116# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py118# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py193# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py195# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py272# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py274# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py231# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_switch_slash.py233# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py83# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py85# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py101# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py157# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py159# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py203# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_shell_feedback_slash.py205# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py52# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py186# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py188# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py343# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py345# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py380# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_empty_think_part_indicator.py382# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py92# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py94# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py184# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py186# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py318# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py320# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py347# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py349# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py414# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py416# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/ui_and_conv/test_export_import.py440# ---------------------------------------------------------------------------COMMENT
621 more matches not shown…
Hallucination Indicators52 hits · 560 pts
SeverityFileLineSnippetContext
CRITICALtests/background/test_agent_timeout.py37 runtime.subagent_store.output_path.return_value.parent.mkdir(parents=True, exist_ok=True)CODE
CRITICALtests/background/test_agent_timeout.py132 runtime.subagent_store.output_path.return_value.parent.mkdir(parents=True, exist_ok=True)CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py481 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py499 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py516 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py520 beta_header = mock.calls.last.request.headers.get("anthropic-beta", "")CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py537 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py555 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py573 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py589 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py606 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py628 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py648 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py666 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py686 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py704 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py721 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py738 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py755 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py776 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py795 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…ages/kosong/tests/api_snapshot_tests/test_anthropic.py812 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py400 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py413 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py431 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py463 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py484 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py506 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py537 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py592 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py611 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py631 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/tests/api_snapshot_tests/test_kimi.py651 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py267 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py303 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py326 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py341 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py373 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py400 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…/kosong/tests/api_snapshot_tests/test_openai_legacy.py428 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…s/kosong/tests/api_snapshot_tests/test_google_genai.py506 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…s/kosong/tests/api_snapshot_tests/test_google_genai.py542 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…s/kosong/tests/api_snapshot_tests/test_google_genai.py565 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py378 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py389 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py405 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py420 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py434 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py450 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICAL…song/tests/api_snapshot_tests/test_openai_responses.py465 body = json.loads(mock.calls.last.request.content.decode())CODE
CRITICALpackages/kosong/src/kosong/chat_provider/kimi.py184 raw_response = await self.client.chat.completions.with_raw_response.create(CODE
CRITICALsrc/kimi_cli/soul/slash.py259 soul.runtime.session.state.additional_dirs.append(str(path))CODE
Unused Imports555 hits · 520 pts
SeverityFileLineSnippetContext
LOWtests_e2e/test_wire_steer.py1CODE
LOWtests_e2e/test_wire_protocol.py1CODE
LOWtests_e2e/test_wire_config.py1CODE
LOWtests_e2e/test_wire_question.py3CODE
LOWtests_e2e/test_mcp_cli.py1CODE
LOWtests_e2e/test_wire_sessions.py1CODE
LOWtests_e2e/wire_helpers.py1CODE
LOWtests_e2e/test_wire_approvals_tools.py1CODE
LOWtests_e2e/test_wire_real_llm.py1CODE
LOWtests_e2e/test_wire_prompt.py1CODE
LOWtests_e2e/test_wire_skills_mcp.py1CODE
LOWtests_e2e/test_wire_errors.py1CODE
LOWtests_e2e/test_wire_auth.py8CODE
LOWsdks/kimi-sdk/tests/test_smoke.py1CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py71CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py73CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py73CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py73CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py73CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py74CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py84CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py84CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py84CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py85CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py97CODE
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py111CODE
LOWtests/test_attachment_cache.py1CODE
LOWtests/conftest.py3CODE
LOWtests/test_git_context.py3CODE
LOWtests/test_clipboard.py1CODE
LOWtests/test_additional_dirs_state.py3CODE
LOWtests/test_constant.py3CODE
LOWtests/background/test_agent_timeout.py3CODE
495 more matches not shown…
Excessive Try-Catch Wrapping205 hits · 208 pts
SeverityFileLineSnippetContext
LOWtests_e2e/wire_helpers.py174 except Exception:CODE
MEDIUMtests_e2e/wire_helpers.py170def _run(self) -> None:CODE
LOWtests/ui_and_conv/test_shell_switch_slash.py266 except Exception:CODE
LOW…s/skills/feature-smoke-test/scripts/inspect_session.py66 except Exception:CODE
LOWexamples/custom-tools/my_tools/ls.py21 except Exception as e:CODE
LOWexamples/kimi-psql/main.py130 except Exception as e:CODE
LOWexamples/kimi-psql/main.py428 except Exception as e:CODE
LOWscripts/inject_build_sha.py61 except Exception:CODE
LOWscripts/inject_build_sha.py81 except Exception:CODE
LOWscripts/telemetry_debug_server.py72 except Exception as exc:CODE
LOWscripts/build_vis.py54 except Exception:CODE
LOWpackages/kosong/src/kosong/tooling/simple.py130 except Exception as e:CODE
MEDIUMpackages/kosong/src/kosong/tooling/simple.py126def _call():CODE
LOW…kages/kosong/src/kosong/chat_provider/openai_common.py36 except Exception:CODE
LOW…kages/kosong/src/kosong/chat_provider/openai_common.py46 except Exception:CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py437 except Exception:CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py453 except Exception:CODE
LOW…osong/src/kosong/contrib/chat_provider/google_genai.py169 except Exception as e: # genai_errors.APIError and othersCODE
LOWsrc/kimi_cli/session_state.py63 except Exception:CODE
LOWsrc/kimi_cli/mcp_oauth.py47 except Exception as exc:CODE
LOWsrc/kimi_cli/session.py123 except Exception:CODE
LOWsrc/kimi_cli/app.py49 except Exception:CODE
LOWsrc/kimi_cli/app.py98 except Exception as exc:CODE
LOWsrc/kimi_cli/app.py286 except Exception:CODE
LOWsrc/kimi_cli/app.py470 except Exception:CODE
LOWsrc/kimi_cli/app.py508 except Exception:CODE
LOWsrc/kimi_cli/constant.py79 except Exception:CODE
LOWsrc/kimi_cli/constant.py93 except Exception:CODE
MEDIUMsrc/kimi_cli/__main__.py36 print(f"Error: {exc}", file=sys.stderr)CODE
LOWsrc/kimi_cli/background/worker.py171 except Exception as exc:CODE
LOWsrc/kimi_cli/background/agent_runner.py110 except Exception as exc:CODE
LOWsrc/kimi_cli/background/manager.py190 except Exception as exc:CODE
LOWsrc/kimi_cli/background/manager.py368 except Exception:CODE
LOWsrc/kimi_cli/background/manager.py413 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/update.py295 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/update.py314 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/update.py330 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/slash.py799 except Exception as e:CODE
MEDIUMsrc/kimi_cli/ui/shell/__init__.py505def _invalidate_after_mcp_loading() -> None:CODE
MEDIUMsrc/kimi_cli/ui/shell/__init__.py1193def _refresh() -> None:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py366 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py508 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py770 except Exception as e:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py815 except Exception as e:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py1018 except Exception as e:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py1109 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py1459 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/setup.py95 except Exception as e:CODE
LOWsrc/kimi_cli/ui/shell/replay.py133 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py934 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py948 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py983 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py1499 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py1680 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py1921 except Exception:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_interactive.py153 except Exception as e:CODE
LOWsrc/kimi_cli/ui/print/__init__.py215 except Exception:CODE
LOWsrc/kimi_cli/ui/print/__init__.py375 except Exception:CODE
LOWsrc/kimi_cli/ui/print/__init__.py400 except Exception:CODE
LOWsrc/kimi_cli/ui/print/__init__.py473 except Exception:CODE
145 more matches not shown…
Deep Nesting134 hits · 122 pts
SeverityFileLineSnippetContext
LOWtests_e2e/wire_helpers.py544CODE
LOWtests/e2e/test_hooks_wire_e2e.py384CODE
LOWtests/e2e/test_shell_pty_e2e.py44CODE
LOWtests/e2e/shell_pty_helpers.py291CODE
LOWtests/e2e/shell_pty_helpers.py105CODE
LOWtests/e2e/test_subagent_smoke_e2e.py50CODE
LOW…s/skills/feature-smoke-test/scripts/inspect_session.py39CODE
LOW…s/skills/feature-smoke-test/scripts/inspect_session.py159CODE
LOWexamples/kimi-psql/main.py79CODE
LOWexamples/kimi-psql/main.py431CODE
LOWpackages/kosong/src/kosong/__main__.py47CODE
LOWpackages/kosong/src/kosong/chat_provider/kimi.py469CODE
LOWpackages/kosong/src/kosong/utils/jsonschema.py27CODE
LOWpackages/kosong/src/kosong/utils/jsonschema.py212CODE
LOWpackages/kosong/src/kosong/utils/jsonschema.py46CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py354CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py394CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py230CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py496CODE
LOW…g/src/kosong/contrib/chat_provider/openai_responses.py522CODE
LOW…osong/src/kosong/contrib/chat_provider/google_genai.py454CODE
LOW…osong/src/kosong/contrib/chat_provider/google_genai.py628CODE
LOW…osong/src/kosong/contrib/chat_provider/google_genai.py685CODE
LOW…osong/src/kosong/contrib/chat_provider/google_genai.py314CODE
LOW…song/src/kosong/contrib/chat_provider/openai_legacy.py291CODE
LOW…s/kosong/src/kosong/contrib/chat_provider/anthropic.py650CODE
LOW…s/kosong/src/kosong/contrib/chat_provider/anthropic.py443CODE
LOW…s/kosong/src/kosong/contrib/chat_provider/anthropic.py577CODE
LOWsrc/kimi_cli/session.py62CODE
LOWsrc/kimi_cli/llm.py238CODE
LOWsrc/kimi_cli/app.py401CODE
LOWsrc/kimi_cli/session_fork.py97CODE
LOWsrc/kimi_cli/session_fork.py172CODE
LOWsrc/kimi_cli/background/worker.py31CODE
LOWsrc/kimi_cli/background/agent_runner.py54CODE
LOWsrc/kimi_cli/background/manager.py420CODE
LOWsrc/kimi_cli/ui/shell/update.py224CODE
LOWsrc/kimi_cli/ui/shell/__init__.py1493CODE
LOWsrc/kimi_cli/ui/shell/__init__.py321CODE
LOWsrc/kimi_cli/ui/shell/__init__.py382CODE
LOWsrc/kimi_cli/ui/shell/__init__.py820CODE
LOWsrc/kimi_cli/ui/shell/replay.py183CODE
LOWsrc/kimi_cli/ui/shell/prompt.py289CODE
LOWsrc/kimi_cli/ui/shell/prompt.py810CODE
LOWsrc/kimi_cli/ui/shell/prompt.py913CODE
LOWsrc/kimi_cli/ui/shell/prompt.py954CODE
LOWsrc/kimi_cli/ui/shell/prompt.py295CODE
LOWsrc/kimi_cli/ui/shell/prompt.py1911CODE
LOWsrc/kimi_cli/ui/shell/usage.py38CODE
LOWsrc/kimi_cli/ui/shell/keyboard.py106CODE
LOWsrc/kimi_cli/ui/shell/keyboard.py207CODE
LOWsrc/kimi_cli/ui/shell/visualize/_question_panel.py39CODE
LOWsrc/kimi_cli/ui/shell/visualize/_question_panel.py108CODE
LOWsrc/kimi_cli/ui/shell/visualize/_blocks.py128CODE
LOWsrc/kimi_cli/ui/shell/visualize/_blocks.py451CODE
LOWsrc/kimi_cli/ui/shell/visualize/_live_view.py188CODE
LOWsrc/kimi_cli/ui/shell/visualize/_live_view.py570CODE
LOWsrc/kimi_cli/ui/shell/visualize/_interactive.py203CODE
LOWsrc/kimi_cli/ui/shell/visualize/_approval_panel.py282CODE
LOWsrc/kimi_cli/ui/shell/visualize/_approval_panel.py62CODE
74 more matches not shown…
Cross-Language Confusion19 hits · 105 pts
SeverityFileLineSnippetContext
HIGHtests/tools/test_tool_descriptions.py118- **Query mode**: Omit `todos` (or pass null) to retrieve the current todo list without changes.STRING
HIGHtests/tools/test_tool_descriptions.py158- For multiple related commands, use `&&` to chain them in a single call, e.g. `cd /path && ls -la`STRING
HIGHtests/tools/test_shell_bash.py62 result = await shell_tool(Params(command="false || echo 'Success'"))CODE
HIGHtests/utils/test_shell_quoting.py27 ("ls 2>nul; echo done", "ls 2>/dev/null; echo done"),CODE
HIGHtests/utils/test_shell_quoting.py28 ("ls 2>nul && echo ok", "ls 2>/dev/null && echo ok"),CODE
HIGHtests/utils/test_shell_quoting.py29 ("ls 2>nul) ", "ls 2>/dev/null) "),CODE
HIGHtests/utils/test_shell_quoting.py35 ("foo >nul; bar 2>nul", "foo >/dev/null; bar 2>/dev/null"),CODE
HIGHtests/utils/test_shell_quoting.py74 cmd = "git status && git diff"CODE
HIGHtests/e2e/test_shell_pty_e2e.py906 build_shell_tool_call("tc-c1", "sleep 2 && printf should-not-exist > cancel_output.txt"),CODE
HIGHtests/e2e/test_shell_pty_e2e.py925 shell.read_until_contains("Using Shell (sleep 2 && printf should-", after=cancel_mark)CODE
HIGHpackages/kaos/tests/test_local_kaos_sh.py108 exit_code, stdout, stderr = await run_sh("false || echo 'Success'")CODE
HIGHpackages/kaos/tests/test_local_kaos_cmd.py69 """Chaining commands with && should work."""STRING
HIGH…kages/kosong/tests/test_scripted_echo_chat_provider.py95 tool_call: {"id": "tc-1", "name": "get_weather", "arguments": null}CODE
HIGHpackages/kosong/tests/test_echo_chat_provider.py73 tool_call: {"id": "tc-1", "name": "get_weather", "arguments": null}CODE
HIGHpackages/kosong/tests/test_trace_id.py94 '"delta":{"role":"assistant","content":"hi"},"finish_reason":null}]}\n\n'CODE
HIGHtests_ai/accuracy_smoke/local_kimi_cli_agent.py26 command="apt-get update && apt-get install -y curl",CODE
HIGHsrc/kimi_cli/utils/rich/markdown.py599 self.style_stack.push(style)CODE
HIGHsrc/kimi_cli/utils/rich/markdown.py729 context.stack.push(Link.create(self, token))CODE
HIGHsrc/kimi_cli/utils/rich/markdown.py767 context.stack.push(element)CODE
Self-Referential Comments31 hits · 102 pts
SeverityFileLineSnippetContext
MEDIUMtests/background/test_agent_timeout.py34 # Create a minimal subagent store mockCOMMENT
MEDIUMtests/ui_and_conv/test_shell_task_slash.py909 # Create a pending approval request in the runtimeCOMMENT
MEDIUMtests/ui_and_conv/test_modal_lifecycle.py1253 # Create a pending approval in the runtimeCOMMENT
MEDIUMtests/tools/test_grep.py269 # Create a file with multiline contentCOMMENT
MEDIUMtests/tools/test_grep.py49 # Create a subdirectory with filesSTRING
MEDIUMtests/tools/test_read_file.py382 # Create a test file in temp_work_dir and use ~ to reference itCOMMENT
MEDIUMtests/tools/test_read_file.py389 # Create the test file in home directoryCOMMENT
MEDIUMtests/tools/test_read_file.py347 # Create a file with more than MAX_LINES linesCOMMENT
MEDIUMtests/tools/test_read_file.py366 # Create a file that exceeds MAX_BYTESCOMMENT
MEDIUMtests/tools/test_read_file.py505 # Create a file with more than MAX_LINES linesCOMMENT
MEDIUMtests/tools/test_read_file.py559 # Create a file where tail_buf total bytes >> MAX_BYTES but n_lines=1 is fine.COMMENT
MEDIUMtests/tools/test_fetch_url.py242 # Create a mock server for the serviceCOMMENT
MEDIUMtests/tools/test_glob.py17 # Create a directory structureCOMMENT
MEDIUMtests/tools/test_shell_bash.py110 # Create a test fileCOMMENT
MEDIUMtests/tools/test_todo.py138 # Create a subagent runtimeCOMMENT
MEDIUMtests/tools/test_todo.py143 # Initialize the subagent instance directoryCOMMENT
MEDIUMtests/tools/test_mcp_tool_result.py160 # Create a content block with an unknown typeCOMMENT
MEDIUMtests/core/test_session_fork.py391 # Create a fake video fileCOMMENT
MEDIUMtests/core/test_plugin_manager.py202 # Create a valid plugin with SKILL.mdCOMMENT
MEDIUMtests/core/test_plugin.py233 # Create the file so it exists (the guard should trigger before reading)COMMENT
MEDIUMtests/core/test_print_background_integration.py100 # Create a task that is "running"COMMENT
MEDIUMtests/core/test_background_agent_kill.py88 # Create a background task via the manager.COMMENT
MEDIUMtests/core/test_background_agent_kill.py285 # Create the background agent task and IMMEDIATELY kill it withoutCOMMENT
MEDIUMtests/core/test_background_agent_kill.py380 # Create a fake pending approval belonging to this background agent.COMMENT
MEDIUMtests/core/test_load_agent.py197 # Create main agent YAML that registers one builtin subagent typeCOMMENT
MEDIUMtests/web/test_session_error_recovery.py52 # Create a mock process whose stdout has one line then EOFCOMMENT
MEDIUMtests/web/test_session_error_recovery.py109 # Create a mock process that immediately returns EOFCOMMENT
MEDIUMtests/utils/test_utils_path.py23 # Create the parent directoryCOMMENT
MEDIUMtests/e2e/test_hooks_wire_e2e.py386 # Create a blocking hook scriptCOMMENT
MEDIUMsrc/kimi_cli/utils/slashcmd.py72 # Create the primary command with aliasesCOMMENT
MEDIUMsrc/kimi_cli/utils/rich/markdown.py1# This file is modified from https://github.com/Textualize/rich/blob/4d6d631a3d2deddf8405522d4b8c976a6d35726c/rich/markdCOMMENT
Modern Structural Boilerplate57 hits · 60 pts
SeverityFileLineSnippetContext
LOWsdks/kimi-sdk/src/kimi_sdk/__init__.py113__all__ = [CODE
LOWtests/ui_and_conv/test_shell_feedback_slash.py38def _setup_feedback_provider(runtime: Runtime) -> None:CODE
LOWtests/e2e/shell_pty_helpers.py58def _set_window_size(fd: int, *, columns: int, lines: int) -> None:CODE
LOWpackages/kosong/tests/api_snapshot_tests/common.py13__all__ = [CODE
LOWpackages/kosong/src/kosong/__init__.py89__all__ = [CODE
LOWpackages/kosong/src/kosong/tooling/__init__.py227 def _update_class_schema(self, json_schema, cls, config) -> None: # type: ignore[reportMissingParameterType]CODE
LOW…kages/kosong/src/kosong/chat_provider/echo/__init__.py4__all__ = [CODE
LOW…s/kosong/src/kosong/contrib/chat_provider/anthropic.py543 def _update_usage(self, delta_usage: MessageDeltaUsage) -> None:CODE
LOWsrc/kimi_cli/__init__.py29__all__ = ["logger"]CODE
LOWsrc/kimi_cli/constant.py109__all__ = [CODE
LOWsrc/kimi_cli/background/__init__.py18__all__ = [CODE
LOWsrc/kimi_cli/ui/theme.py214def set_active_theme(theme: ThemeName) -> None:CODE
LOWsrc/kimi_cli/ui/shell/__init__.py1278 def _set_active_view(self, view: Any) -> None:CODE
LOWsrc/kimi_cli/ui/shell/task_browser.py102 def set_message(self, text: str, *, duration_s: float = _FLASH_MESSAGE_SECONDS) -> None:CODE
LOWsrc/kimi_cli/ui/shell/prompt.py1963 def set_prefill_text(self, text: str) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_question_panel.py39 def _setup_current_question(self) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_question_panel.py353 def set_panel(self, panel: QuestionRequestPanel | None) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_blocks.py444 def set_subagent_metadata(self, agent_id: str, subagent_type: str) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_btw_panel.py84 def set_start_time(self, t: float) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_btw_panel.py91 def set_result(self, response: str | None, error: str | None) -> None:CODE
LOWsrc/kimi_cli/ui/shell/visualize/_approval_panel.py368 def set_request(self, request: ApprovalRequest) -> None:CODE
LOWsrc/kimi_cli/tools/ask_user/__init__.py18logger = logging.getLogger(__name__)CODE
LOWsrc/kimi_cli/tools/plan/__init__.py26logger = logging.getLogger(__name__)CODE
LOWsrc/kimi_cli/tools/plan/enter.py19logger = logging.getLogger(__name__)CODE
LOWsrc/kimi_cli/subagents/__init__.py12__all__ = [CODE
LOWsrc/kimi_cli/wire/types.py451 def set_exception(self, exc: BaseException) -> None:CODE
LOWsrc/kimi_cli/wire/types.py664__all__ = [CODE
LOWsrc/kimi_cli/auth/__init__.py5__all__ = ["KIMI_CODE_PLATFORM_ID"]CODE
LOWsrc/kimi_cli/web/auth.py181__all__ = [CODE
LOWsrc/kimi_cli/web/__init__.py5__all__ = ["create_app", "run_web_server"]CODE
LOWsrc/kimi_cli/web/app.py451__all__ = ["create_app", "run_web_server"]CODE
LOWsrc/kimi_cli/web/runner/__init__.py5__all__ = ["KimiCLIRunner"]CODE
LOWsrc/kimi_cli/web/api/sessions.py550def _update_last_session_id(session: JointSession) -> None:CODE
LOWsrc/kimi_cli/web/api/__init__.py10__all__ = [CODE
LOWsrc/kimi_cli/plugin/__init__.py114def _set_nested(obj: dict[str, Any], dotted_path: str, value: object) -> None:CODE
LOWsrc/kimi_cli/utils/proctitle.py6def set_process_title(title: str) -> None:CODE
LOWsrc/kimi_cli/utils/proctitle.py16def set_terminal_title(title: str) -> None:CODE
LOWsrc/kimi_cli/vis/app.py175__all__ = ["create_app", "run_vis_server"]CODE
LOWsrc/kimi_cli/vis/api/sessions.py25logger = logging.getLogger(__name__)CODE
LOWsrc/kimi_cli/vis/api/__init__.py5__all__ = ["sessions_router", "statistics_router", "system_router"]CODE
LOWsrc/kimi_cli/hooks/__init__.py4__all__ = ["HookDef", "HookEventType", "HOOK_EVENT_TYPES", "HookEngine"]CODE
LOWsrc/kimi_cli/approval_runtime/__init__.py17__all__ = [CODE
LOWsrc/kimi_cli/telemetry/crash.py28def set_phase(phase: str) -> None:CODE
LOWsrc/kimi_cli/telemetry/__init__.py64def set_current_trace_id(trace_id: str | None) -> None:CODE
LOWsrc/kimi_cli/telemetry/__init__.py74def set_context(*, device_id: str, session_id: str) -> None:CODE
LOWsrc/kimi_cli/telemetry/__init__.py81def set_client_info(*, name: str, version: str | None = None) -> None:CODE
LOWsrc/kimi_cli/soul/kimisoul.py340 def _set_trace_id(self, trace_id: str | None) -> None:CODE
LOWsrc/kimi_cli/soul/kimisoul.py356 def set_hook_engine(self, engine: HookEngine) -> None:CODE
LOWsrc/kimi_cli/soul/approval.py145 def set_runtime(self, runtime: ApprovalRuntime) -> None:CODE
LOWsrc/kimi_cli/soul/approval.py152 def set_yolo(self, yolo: bool) -> None:CODE
LOWsrc/kimi_cli/soul/approval.py156 def set_afk(self, afk: bool) -> None:CODE
LOWsrc/kimi_cli/soul/approval.py168 def set_runtime_afk(self, afk: bool) -> None:CODE
LOWsrc/kimi_cli/soul/toolset.py65def set_session_id(sid: str) -> None:CODE
LOWsrc/kimi_cli/soul/toolset.py250 def set_hook_engine(self, engine: HookEngine) -> None:CODE
LOWsrc/kimi_cli/acp/server.py324 async def set_session_mode(self, mode_id: str, session_id: str, **kwargs: Any) -> None:CODE
LOWsrc/kimi_cli/acp/server.py327 async def set_session_model(self, model_id: str, session_id: str, **kwargs: Any) -> None:CODE
LOWsrc/kimi_cli/notifications/__init__.py17__all__ = [CODE
Structural Annotation Overuse27 hits · 52 pts
SeverityFileLineSnippetContext
LOWtests/core/test_context_pending_tokens.py335 # Step 1: API returned, total tokens = 840K (below 85% of 1M = 850K)COMMENT
LOWtests/core/test_context_pending_tokens.py338 # Step 2: Large tool results appended (e.g. file content)COMMENT
LOWtests/core/test_toolset.py437 # Step 1: execute a toolCOMMENT
LOWtests/core/test_toolset.py456 # Step 2: same call with empty last_calls should execute normallyCOMMENT
LOWtests/auth/test_oauth_refresh.py493 # Step 1: hit a 401 with R1 → marks R1 rejectedCOMMENT
LOWtests/auth/test_oauth_refresh.py503 # Step 2: simulate a concurrent instance writing a fresh token (R2) to diskCOMMENT
LOWtests/auth/test_oauth_refresh.py509 # Step 3: next ensure_fresh should detect the rotation, clear theCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py95 # Step 1: initial request uses token-ACOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py101 # Step 2: simulate OAuth token refreshCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py104 # Step 3: simulate network error → on_retryable_error rebuilds clientCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py107 # Step 4: the rebuilt client must send token-B, not token-ACOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py217 # Step 1: Select modelCOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py245 # Step 2: Determine thinking modeCOMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py473 # Step 1: mtime sorting (files_with_matches only, skip on timeout)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py482 # Step 2: shorten paths to relative (prefix stripping)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py488 # Step 3: filter sensitive files from outputCOMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py531 # Step 4: count_matches summary (before pagination, on full results)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py552 # Step 5: offset + head_limit paginationCOMMENT
LOWsrc/kimi_cli/tools/file/read.py243 # Step 1: Apply n_lines / MAX_LINES from head of tail_buf.COMMENT
LOWsrc/kimi_cli/tools/file/read.py250 # Step 2: Apply MAX_BYTES — if candidates exceed the byte budget,COMMENT
LOWsrc/kimi_cli/tools/file/read.py266 # Step 3: Collect results from candidatesCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md238### Step 1: Understanding the Skill with Concrete ExamplesCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md255### Step 2: Planning the Reusable Skill ContentsCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md279### Step 3: Initializing the SkillCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md291### Step 4: Edit the SkillCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md330### Step 5: Packaging a SkillCOMMENT
LOWsrc/kimi_cli/skills/skill-creator/SKILL.md358### Step 6: IterateCOMMENT
Cross-File Repetition10 hits · 50 pts
SeverityFileLineSnippetContext
HIGHpackages/kosong/src/kosong/chat_provider/kimi.py0copy the chat provider, updating the generation kwargs with the given values. returns: self: a new instance of the chat STRING
HIGH…g/src/kosong/contrib/chat_provider/openai_responses.py0copy the chat provider, updating the generation kwargs with the given values. returns: self: a new instance of the chat STRING
HIGH…osong/src/kosong/contrib/chat_provider/google_genai.py0copy the chat provider, updating the generation kwargs with the given values. returns: self: a new instance of the chat STRING
HIGH…song/src/kosong/contrib/chat_provider/openai_legacy.py0copy the chat provider, updating the generation kwargs with the given values. returns: self: a new instance of the chat STRING
HIGH…s/kosong/src/kosong/contrib/chat_provider/anthropic.py0copy the chat provider, updating the generation kwargs with the given values. returns: self: a new instance of the chat STRING
HIGHpackages/kosong/src/kosong/chat_provider/kimi.py0the parameters of the model to use. for tracing/logging purposes.STRING
HIGH…g/src/kosong/contrib/chat_provider/openai_responses.py0the parameters of the model to use. for tracing/logging purposes.STRING
HIGH…osong/src/kosong/contrib/chat_provider/google_genai.py0the parameters of the model to use. for tracing/logging purposes.STRING
HIGH…song/src/kosong/contrib/chat_provider/openai_legacy.py0the parameters of the model to use. for tracing/logging purposes.STRING
HIGH…s/kosong/src/kosong/contrib/chat_provider/anthropic.py0the parameters of the model to use. for tracing/logging purposes.STRING
Redundant / Tautological Comments26 hits · 44 pts
SeverityFileLineSnippetContext
LOWweb/scripts/generate-api.sh23# Check if docker is availableCOMMENT
LOWtests/tools/test_shell_bash.py118 # Read the fileCOMMENT
LOWtests/tools/test_shell_bash.py168 # Check if output was truncated (it should be)COMMENT
LOWtests/tools/test_shell_bash.py184 # Check if output was truncatedCOMMENT
LOWtests/telemetry/test_telemetry.py505 # Set mtime to 8 days agoCOMMENT
LOWexamples/kimi-psql/main.py91 # Check if query returns resultsCOMMENT
LOWexamples/kimi-psql/main.py393 # Check if mode switch was requestedCOMMENT
LOWpackages/kosong/src/kosong/tooling/simple.py55 # Check if the return annotation is ToolReturnValueCOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py272 # Check if anything changedCOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py879 # Set title to match the convention used by fork_sessionCOMMENT
LOWsrc/kimi_cli/ui/shell/__init__.py721 # Check if it's an allowed slash command in shell modeCOMMENT
LOWsrc/kimi_cli/ui/shell/__init__.py733 # Check if user is trying to use 'cd' commandCOMMENT
LOWsrc/kimi_cli/ui/shell/debug.py34 # Check if it looks like a system tagCOMMENT
LOWsrc/kimi_cli/tools/file/replace.py131 # Read the file contentCOMMENT
LOWsrc/kimi_cli/tools/file/replace.py141 # Check if any changes were madeCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py121 # Check if session is busyCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py507 # Check if resolved path points to sensitive locationCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py767 # Check if title was already generated (avoid duplicate calls)COMMENT
LOWsrc/kimi_cli/web/api/sessions.py947 # Check if session existsCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py953 # Check if session has historyCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py972 # Check if WebSocket is still connected before continuingCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py1140 # Check if it is a git repositoryCOMMENT
LOWsrc/kimi_cli/web/api/sessions.py1148 # Check if HEAD exists (repo has at least one commit)COMMENT
LOWsrc/kimi_cli/soul/slash.py227 # Check if already added (exact match)COMMENT
LOWsrc/kimi_cli/soul/slash.py232 # Check if it's within the work_dir (already accessible)COMMENT
LOWsrc/kimi_cli/soul/slash.py238 # Check if it's within an already-added additional directory (redundant)COMMENT
Verbosity Indicators21 hits · 43 pts
SeverityFileLineSnippetContext
LOWtests/core/test_context_pending_tokens.py335 # Step 1: API returned, total tokens = 840K (below 85% of 1M = 850K)COMMENT
LOWtests/core/test_context_pending_tokens.py338 # Step 2: Large tool results appended (e.g. file content)COMMENT
LOWtests/core/test_toolset.py437 # Step 1: execute a toolCOMMENT
LOWtests/core/test_toolset.py456 # Step 2: same call with empty last_calls should execute normallyCOMMENT
LOWtests/auth/test_oauth_refresh.py493 # Step 1: hit a 401 with R1 → marks R1 rejectedCOMMENT
LOWtests/auth/test_oauth_refresh.py503 # Step 2: simulate a concurrent instance writing a fresh token (R2) to diskCOMMENT
LOWtests/auth/test_oauth_refresh.py509 # Step 3: next ensure_fresh should detect the rotation, clear theCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py95 # Step 1: initial request uses token-ACOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py101 # Step 2: simulate OAuth token refreshCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py104 # Step 3: simulate network error → on_retryable_error rebuilds clientCOMMENT
LOWpackages/kosong/tests/test_kimi_stale_api_key.py107 # Step 4: the rebuilt client must send token-B, not token-ACOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py217 # Step 1: Select modelCOMMENT
LOWsrc/kimi_cli/ui/shell/slash.py245 # Step 2: Determine thinking modeCOMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py473 # Step 1: mtime sorting (files_with_matches only, skip on timeout)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py482 # Step 2: shorten paths to relative (prefix stripping)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py488 # Step 3: filter sensitive files from outputCOMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py531 # Step 4: count_matches summary (before pagination, on full results)COMMENT
LOWsrc/kimi_cli/tools/file/grep_local.py552 # Step 5: offset + head_limit paginationCOMMENT
LOWsrc/kimi_cli/tools/file/read.py243 # Step 1: Apply n_lines / MAX_LINES from head of tail_buf.COMMENT
LOWsrc/kimi_cli/tools/file/read.py250 # Step 2: Apply MAX_BYTES — if candidates exceed the byte budget,COMMENT
LOWsrc/kimi_cli/tools/file/read.py266 # Step 3: Collect results from candidatesCOMMENT
Docstring Block Structure8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHpackages/kosong/src/kosong/_generate.py27 Generate one message based on the given context. Parts of the message will be streamed to the specified callbacSTRING
HIGHsrc/kimi_cli/config.py292 Load configuration from config file. If the config file does not exist, create it with default configuration. STRING
HIGHsrc/kimi_cli/config.py343 Load configuration from a TOML or JSON string. Args: config_string (str): TOML or JSON configuration tSTRING
HIGHsrc/kimi_cli/app.py538 Run the Kimi Code CLI instance without any UI and yield Wire messages directly. Args: userSTRING
HIGHsrc/kimi_cli/session_fork.py98Read wire.jsonl and return all lines up to and including the given turn. Args: wire_path: Path to the wire.STRING
HIGHsrc/kimi_cli/session_fork.py222Fork a session, creating a new session with history up to the given turn. Args: source_session_dir: Path toSTRING
HIGHsrc/kimi_cli/soul/compaction.py88 Compact a sequence of messages into a new sequence of messages. Args: messages (Sequence[MSTRING
HIGHsrc/kimi_cli/soul/approval.py207 Request approval for the given action. Intended to be called by tools. Args: sender (str):STRING
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHREADME.md126 "CONTEXT7_API_KEY": "YOUR_API_KEY"CODE
HIGHpackages/kimi-code/README.md126 "CONTEXT7_API_KEY": "YOUR_API_KEY"CODE
HIGHtests_ai/accuracy_smoke/README.md68export KIMI_API_KEY="your_api_key"CODE
HIGHtests_ai/accuracy_smoke/scripts/run_smoke.sh35 echo 'Example: export KIMI_API_KEY="your_api_key"' >&2CODE
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippetContext
LOWsrc/kimi_cli/app.py441COMMENT
LOWsrc/kimi_cli/ui/shell/update.py341# async def update(app: "Shell", args: list[str]):COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py101COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py161COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py181 "</system-reminder>"COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py221 )COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py241 # haven't published yet. Without thisCOMMENT
LOWsrc/kimi_cli/ui/print/__init__.py301 f"({wait_cap}s), killed {len(killed)} tasks\n"COMMENT
LOWsrc/kimi_cli/ui/print/__init__.py381 # The follow-up soul turn already took aCOMMENT
LOWsrc/kimi_cli/auth/oauth.py1021 except OAuthUnauthorized as exc:COMMENT
AI Slop Vocabulary6 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMweb/package-lock.json13015 "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",CODE
MEDIUMweb/src/hooks/useSessionStream.ts1503 // Match message by toolCallId directly - this is robust against:COMMENT
LOWexamples/kimi-psql/main.py559 # For psql, just pass the connection URLCOMMENT
LOWsrc/kimi_cli/wire/server.py1036 msg_id = request.id # just use the approval request id as message idCODE
LOWsrc/kimi_cli/telemetry/transport.py166 # every reload, so falling back to disk would just create aCOMMENT
LOWsrc/kimi_cli/soul/kimisoul.py1676 # to refresh and retrying would just add latency.COMMENT
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHweb/src/lib/api/runtime.ts125 * @return True if the given MIME is JSON, false otherwise.COMMENT
Dead Code3 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMtests/core/test_skill.py1423CODE
MEDIUMtests/core/test_auth_error_handling.py483CODE
MEDIUMpackages/kosong/tests/test_openai_common.py248CODE
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdocs/AGENTS.md22Only the Chinese documentation and the English changelog are manually reviewed. Other translations (e.g., English versioCODE
AI Structural Patterns5 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/kimi_cli/app.py122CODE
LOWsrc/kimi_cli/ui/shell/visualize/__init__.py114CODE
LOWsrc/kimi_cli/web/app.py228CODE
LOWsrc/kimi_cli/cli/web.py11CODE
LOWsrc/kimi_cli/cli/__init__.py78CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_git_context.py185 "test@test.com",CODE
LOWtests/ui_and_conv/test_file_completer.py155 ["git", "config", "user.email", "test@test.com"],CODE
LOWtests/ui_and_conv/test_prompt_tips.py861 captured.append(kwargs.get("placeholder"))CODE
LOWtests/e2e/test_file_mention_e2e.py38 ["git", "config", "user.email", "test@test.com"],CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests_e2e/test_wire_protocol.py284 def handle_request(msg: dict[str, Any]) -> dict[str, Any]:CODE
LOWtests/tools/test_grep.py321 f.write("def test_function():\n return 'hello world'\n")CODE