AI Slop Code Risk Monitor

OpenByteInc/QuantDinger

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

Open-source AI Trading OS, agent trading, and vibe trading, with Jev System One integration. Research, build Python strategies, backtest, and paper/live trade across crypto, stocks, and forex. Launch your own multi-tenant trading SaaS with built-in user management, billing, payments, and settlement.

31.2 High pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for OpenByteInc/QuantDinger, a Python project with 13,357 GitHub stars. SynthScan examined 301,348 lines of code across 1155 source files, recording 7871 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 31.2 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

31.2
Adjusted Signal
31.2
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
13.4K
Stars
Python
Language
301.3K
Lines of Code
1.2K
Files
7.9K
Pattern Hits
2026-10-31
Scan Date
0.26
HC Hit Rate

Risk Review · Payload v1

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

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

Cognitive Ownership Risk 51.4/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 11.8/100 · LOW

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

Agent Over-Engineering Ratio 73.9/100 · HIGH

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

PR Review Velocity Impact 81.1/100 · CRITICAL

Which changes need focused human review? 7871 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 300MEDIUM 332LOW 7239

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 7871 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers3799 hits · 3795 pts
SeverityFileLineSnippetContext
LOWscripts/bootstrap_env.py84def _password_from_database_url(value: str) -> str:CODE
LOWscripts/bootstrap_env.py136def _has_existing_database_volume(compose_file: Path) -> bool:CODE
LOWmcp_server/tests/test_transport_resolution.py39def test_transport_default_is_stdio(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py56def test_transport_aliases_resolve(monkeypatch, fresh_module, raw, expected):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py61def test_transport_unknown_exits(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py67def test_apply_http_settings_without_error(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py78def test_non_loopback_http_requires_auth(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py86def test_non_loopback_http_accepts_distinct_strong_auth(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py94def test_non_loopback_authenticated_http_requires_https(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_transport_resolution.py104def test_invalid_numeric_env_uses_default(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py32def test_mcp_tool_registry_complete(fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py39def test_gateway_tools_do_not_advertise_an_inferred_result_wrapper(fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py46def test_success_payload_is_preserved_without_a_result_wrapper(monkeypatch, fresh_module, body):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py53def test_health_failures_set_protocol_error(fresh_module, monkeypatch, failure):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py135def test_protocol_guard_denial_and_error_redaction(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py145def test_successful_empty_snapshot_is_not_an_error(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py153def test_strategy_authoring_contract_uses_agent_gateway(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py165def test_package_version_matches_pyproject():CODE
LOW⚡mcp_server/tests/test_security_and_tools.py175def test_protocol_server_version_matches_package(fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py181def test_create_strategy_uses_canonical_deployment_payload(monkeypatch, fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py246def test_stop_strategy_requires_confirmation(fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py252def test_place_quick_order_requires_confirmation(fresh_module):CODE
LOW⚡mcp_server/tests/test_security_and_tools.py258def test_indicator_code_size_rejected_in_mcp(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py74def test_health_success_stays_success(fresh_module, monkeypatch):CODE
LOWmcp_server/tests/test_security_and_tools.py85def test_mcp_tools_are_actually_registered(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py90def test_every_tool_has_explicit_risk_annotations(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py111def test_protocol_marks_gateway_and_business_failures(monkeypatch, fresh_module, status, body):CODE
LOWmcp_server/tests/test_security_and_tools.py124def test_protocol_marks_transport_failures(monkeypatch, fresh_module, exception_type):CODE
LOWmcp_server/tests/test_security_and_tools.py220def test_quick_order_forwards_native_protection(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py294def test_compile_strategy_code_forwards_idempotency_key(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py309def test_strategy_source_workspace_payloads(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py352def test_source_restore_and_paper_cancel_require_confirmation(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py372def test_redaction_handles_camel_case_and_deep_values():CODE
LOWmcp_server/src/quantdinger_mcp/server.py558def get_indicator_authoring_contract() -> Any:CODE
LOWmcp_server/src/quantdinger_mcp/server.py679def get_strategy_authoring_contract() -> Any:CODE
LOWmcp_server/src/quantdinger_mcp/server.py762def list_strategy_source_versions(source_id: int) -> Any:CODE
LOWmcp_server/src/quantdinger_mcp/server.py768def restore_strategy_source_version(CODE
LOWmcp_server/src/quantdinger_mcp/server.py1000def list_strategy_pending_orders(strategy_id: int, limit: int = 50, cursor: int = 0) -> Any:CODE
LOW⚡mcp_server/src/quantdinger_mcp/server.py1111def _apply_http_settings_from_env() -> None:CODE
LOW⚡mcp_server/src/quantdinger_mcp/server.py1132def _validate_network_security(transport: str) -> None:CODE
LOWmcp_server/src/quantdinger_mcp/security.py31def assert_indicator_code_size(code: str) -> None:CODE
LOW⚡backend_api_python/app/startup.py74def start_pending_order_worker():CODE
LOW⚡backend_api_python/app/startup.py99def start_execution_stream_supervisor():CODE
LOW⚡backend_api_python/app/startup.py190def _schedule_post_restore_position_sync() -> None:CODE
LOW⚡backend_api_python/app/startup.py261def _start_scheduler_services(*, include_celery_managed: bool = False) -> None:CODE
LOWbackend_api_python/app/startup.py46def get_execution_stream_supervisor():CODE
LOWbackend_api_python/app/startup.py55def _is_debug_reloader_parent() -> bool:CODE
LOWbackend_api_python/app/startup.py144def restore_running_strategies():CODE
LOWbackend_api_python/app/startup.py239def _start_trading_support_services(*, lease_guard=None) -> None:CODE
LOWbackend_api_python/app/startup.py250def stop_trading_support_services() -> None:CODE
LOWbackend_api_python/app/research/intelligence.py185def build_research_intelligence(CODE
LOWbackend_api_python/app/tasks/indicator_translation.py16def translate_indicator_metadata(CODE
LOWbackend_api_python/app/config/redis_urls.py38def celery_result_backend_url() -> str:CODE
LOWbackend_api_python/app/runtime/roles.py29def strategy_commands_enabled() -> bool:CODE
LOWbackend_api_python/app/utils/auth.py23def _configure_jwt_secret_warnings() -> None:CODE
LOWbackend_api_python/app/utils/db.py110def _resolve_market_symbols_sql_path() -> Path:CODE
LOWbackend_api_python/app/utils/db.py114def _resolve_strategy_templates_sql_path() -> Path:CODE
LOWbackend_api_python/app/utils/db.py127def _migration_timeout_seconds(name: str, default: int) -> int:STRING
LOWbackend_api_python/app/utils/db.py184def _apply_migration_component(STRING
LOW⚡backend_api_python/app/utils/local_brokers.py8def local_desktop_brokers_allowed() -> bool:CODE
3739 more matches not shown…
Excessive Try-Catch Wrapping2117 hits · 1961 pts
SeverityFileLineSnippetContext
LOWscripts/check_version.py39 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/server.py226 except Exception:CODE
LOW⚡mcp_server/src/quantdinger_mcp/server.py1120 except Exception:CODE
LOW⚡mcp_server/src/quantdinger_mcp/server.py1125 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/security.py84 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/security.py109 except Exception:CODE
LOWbackend_api_python/run.py14except Exception:CODE
LOWbackend_api_python/run.py28except Exception:CODE
LOWbackend_api_python/env_sync_core.py88 except Exception:CODE
LOW⚡backend_api_python/app/startup.py70 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py81 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py95 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py103 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py177 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py179 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py185 except Exception as e:CODE
LOW⚡backend_api_python/app/startup.py196 except Exception:CODE
LOW⚡backend_api_python/app/startup.py269 except Exception:CODE
LOW⚡backend_api_python/app/startup.py276 except Exception:CODE
LOW⚡backend_api_python/app/startup.py285 except Exception:CODE
LOW⚡backend_api_python/app/startup.py291 except Exception:CODE
LOWbackend_api_python/app/startup.py140 except Exception as e:CODE
LOWbackend_api_python/app/startup.py207 except Exception as exc:CODE
LOWbackend_api_python/app/_version.py66 except Exception:CODE
LOWbackend_api_python/app/__init__.py21except Exception:CODE
LOWbackend_api_python/app/__init__.py105 except Exception as exc:CODE
LOWbackend_api_python/app/__init__.py126 except Exception as sample_exc:CODE
LOWbackend_api_python/app/__init__.py128 except Exception as e:CODE
MEDIUMbackend_api_python/app/__init__.py100def _configure_ibkr_asyncio() -> None:CODE
MEDIUMbackend_api_python/app/__init__.py109def _bootstrap_database() -> None:CODE
LOWbackend_api_python/app/tasks/agent_jobs.py76 except Exception as exc:CODE
LOWbackend_api_python/app/utils/json_helpers.py18 except Exception:CODE
LOWbackend_api_python/app/utils/auth.py84 except Exception as e:CODE
LOWbackend_api_python/app/utils/auth.py193 except Exception as e:CODE
LOWbackend_api_python/app/utils/db.py238 except Exception:STRING
LOWbackend_api_python/app/utils/db.py241 except Exception:STRING
LOWbackend_api_python/app/utils/db.py365 except Exception as exc:STRING
LOWbackend_api_python/app/utils/db.py392 except Exception as exc:STRING
LOWbackend_api_python/app/utils/db.py398 except Exception as exc:STRING
LOWbackend_api_python/app/utils/config_loader.py34 except Exception as e:CODE
LOWbackend_api_python/app/utils/config_loader.py229 except Exception as e:CODE
LOWbackend_api_python/app/utils/config_loader.py311 except Exception as e:CODE
LOWbackend_api_python/app/utils/request_guard.py37 except Exception:CODE
LOWbackend_api_python/app/utils/request_guard.py107 except Exception:CODE
LOWbackend_api_python/app/utils/request_guard.py129 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py29except Exception: # pragma: no cover - fallback for very old runtimesCODE
LOWbackend_api_python/app/utils/timeutil.py45 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py80 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py95 except Exception:CODE
LOWbackend_api_python/app/utils/safe_exec.py387 except Exception as exc:CODE
LOWbackend_api_python/app/utils/safe_exec.py569 except Exception as e:CODE
LOWbackend_api_python/app/utils/safe_exec.py622 except Exception as e:CODE
LOWbackend_api_python/app/utils/safe_exec.py1150 except Exception:CODE
LOWbackend_api_python/app/utils/cache.py90 except Exception as e:CODE
LOW⚡backend_api_python/app/utils/cache.py103 except Exception as e:CODE
LOW⚡backend_api_python/app/utils/cache.py111 except Exception as e:CODE
LOW⚡backend_api_python/app/utils/cache.py118 except Exception as e:CODE
LOWbackend_api_python/app/utils/trade_close_reason.py213 except Exception:CODE
LOW⚡backend_api_python/app/utils/trade_net_pnl.py39 except Exception:CODE
LOW⚡backend_api_python/app/utils/trade_net_pnl.py45 except Exception:CODE
2057 more matches not shown…
Empty Error Handlers275 hits · 1375 pts
SeverityFileLineSnippetContext
HIGHmcp_server/src/quantdinger_mcp/server.py1120except Exception:CODE
HIGHbackend_api_python/run.py14except Exception:CODE
HIGHbackend_api_python/run.py28except Exception:CODE
HIGHbackend_api_python/env_sync_core.py91except FileNotFoundError:CODE
HIGHbackend_api_python/app/__init__.py21except Exception:CODE
HIGHbackend_api_python/app/utils/db.py241except Exception:CODE
HIGHbackend_api_python/app/utils/request_guard.py107except Exception:CODE
HIGHbackend_api_python/app/utils/timeutil.py45except Exception:CODE
HIGHbackend_api_python/app/utils/safe_exec.py484except ValueError:CODE
HIGHbackend_api_python/app/utils/trade_net_pnl.py178except Exception:CODE
HIGHbackend_api_python/app/utils/trade_net_pnl.py197except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py212except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py206except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py249except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py421except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py777except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py541except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py762except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py546except Exception:CODE
HIGHbackend_api_python/app/utils/db_postgres.py563except Exception:CODE
HIGHbackend_api_python/app/utils/agent_auth.py302except RuntimeError:CODE
HIGHbackend_api_python/app/utils/safe_exec_worker.py155except Exception:CODE
HIGHbackend_api_python/app/professional_report/snapshot.py33except (OverflowError, OSError, ValueError):CODE
HIGHbackend_api_python/app/professional_report/snapshot.py50except ValueError:CODE
HIGHbackend_api_python/app/data_providers/heatmap.py180except Exception:CODE
HIGHbackend_api_python/app/data_providers/hk_research.py48except Exception:CODE
HIGHbackend_api_python/app/data_providers/hk_research.py53except Exception:CODE
HIGHbackend_api_python/app/data_providers/hk_research.py58except Exception:CODE
HIGHbackend_api_python/app/data_providers/hk_research.py89except Exception:CODE
HIGHbackend_api_python/app/data_providers/__init__.py326except Exception:CODE
HIGHbackend_api_python/app/data_providers/us_research.py414except Exception:CODE
HIGHbackend_api_python/app/data_providers/commodities.py92except Exception:CODE
HIGHbackend_api_python/app/data_providers/news.py43except Exception:CODE
HIGHbackend_api_python/app/data_providers/news.py56except Exception:CODE
HIGH…kend_api_python/app/data_sources/cn_hk_fundamentals.py687except ImportError:CODE
HIGHbackend_api_python/app/data_sources/forex.py76except Exception:CODE
HIGHbackend_api_python/app/data_sources/forex.py266except Exception:CODE
HIGHbackend_api_python/app/data_sources/futures.py43except Exception:CODE
HIGHbackend_api_python/app/data_sources/crypto.py680except Exception:CODE
HIGHbackend_api_python/app/data_sources/tencent.py92except Exception:CODE
HIGHbackend_api_python/app/data_sources/asia_stock_kline.py136except Exception:CODE
HIGHbackend_api_python/app/routes/auth.py798except (ValueError, TypeError):CODE
HIGHbackend_api_python/app/routes/auth.py455except (ValueError, TypeError):CODE
HIGHbackend_api_python/app/routes/user.py1035except Exception:CODE
HIGHbackend_api_python/app/routes/user.py1395except (TypeError, ValueError):CODE
HIGHbackend_api_python/app/routes/quick_trade.py647except Exception:CODE
HIGHbackend_api_python/app/routes/ai_chat.py824except Exception:CODE
HIGHbackend_api_python/app/routes/ai_chat.py889except (TypeError, ValueError, OSError, OverflowError):CODE
HIGHbackend_api_python/app/routes/ai_chat.py1852except Exception:CODE
HIGHbackend_api_python/app/routes/ai_chat.py3322except Exception:CODE
HIGHbackend_api_python/app/routes/ai_chat.py3328except Exception:CODE
HIGHbackend_api_python/app/routes/strategy_notifications.py96except Exception:CODE
HIGHbackend_api_python/app/routes/dashboard.py497except Exception:CODE
HIGHbackend_api_python/app/routes/dashboard.py596except Exception:CODE
HIGHbackend_api_python/app/routes/dashboard.py742except Exception:CODE
HIGHbackend_api_python/app/routes/fast_analysis.py304except Exception:CODE
HIGHbackend_api_python/app/routes/fast_analysis.py287except Exception:CODE
HIGHbackend_api_python/app/routes/fast_analysis.py292except Exception:CODE
HIGHbackend_api_python/app/routes/strategy_ledger_routes.py106except Exception:CODE
HIGHbackend_api_python/app/routes/strategy_ledger_routes.py373except Exception:CODE
215 more matches not shown…
Decorative Section Separators214 hits · 736 pts
SeverityFileLineSnippetContext
MEDIUMdocker-compose.yml96 # ========================COMMENT
MEDIUMdocker-compose.yml98 # ========================COMMENT
MEDIUMdocker-compose.yml130 # ========================COMMENT
MEDIUMdocker-compose.yml132 # ========================COMMENT
MEDIUMdocker-compose.yml260 # ========================COMMENT
MEDIUMdocker-compose.yml262 # ========================COMMENT
MEDIUMdocker-compose.yml616 # ========================COMMENT
MEDIUMdocker-compose.yml618 # ========================COMMENT
MEDIUMdocker-compose.yml652 # ========================COMMENT
MEDIUMdocker-compose.yml654 # ========================COMMENT
MEDIUMdocs/deployment/NOTIFICATION_SMS_CONFIG_CN.md93# =========================COMMENT
MEDIUMdocs/deployment/NOTIFICATION_SMS_CONFIG_CN.md95# =========================COMMENT
MEDIUM⚡docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md72# =========================COMMENT
MEDIUM⚡docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md74# =========================COMMENT
MEDIUM⚡docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md92# =========================COMMENT
MEDIUM⚡docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md94# =========================COMMENT
MEDIUMdocs/deployment/NOTIFICATION_EMAIL_CONFIG_CN.md74# =========================COMMENT
MEDIUMdocs/deployment/NOTIFICATION_EMAIL_CONFIG_CN.md76# =========================COMMENT
MEDIUMbackend_api_python/app/utils/agent_jobs.py283# ──────────────────────────── progress / streaming ────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py350# ─────────────────────────── verification ───────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py393# ─────────────────────────── audit ───────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py483# ─────────────────────────── decorator ───────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py739# ─────────────────────────── idempotency ───────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py776# ─────────────────────────── helpers for routes ───────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py202# ─────────────────────────── token primitives ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py245# ─────────────────────────── distributed rate limit ───────────────────────────STRING
MEDIUMbackend_api_python/app/data_providers/__init__.py38# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py79# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py154# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py156# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_providers/opportunities.py232# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_providers/opportunities.py234# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…kend_api_python/app/data_sources/cn_hk_fundamentals.py520# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…kend_api_python/app/data_sources/cn_hk_fundamentals.py522# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py99# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py101# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py373# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py375# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/forex.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/forex.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/cache_manager.py171# ============================================COMMENT
MEDIUMbackend_api_python/app/data_sources/cache_manager.py172# ============================================COMMENT
MEDIUMbackend_api_python/app/data_sources/futures.py20# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/futures.py22# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/circuit_breaker.py152# ============================================COMMENT
MEDIUM⚡backend_api_python/app/data_sources/circuit_breaker.py153# ============================================COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py104# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py106# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py126# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py128# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py324# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/data_sources/asia_stock_kline.py326# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/asia_stock_kline.py486# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_sources/asia_stock_kline.py488# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡backend_api_python/app/routes/auth.py140# =============================================================================COMMENT
MEDIUM⚡backend_api_python/app/routes/auth.py142# =============================================================================COMMENT
154 more matches not shown…
Unused Imports746 hits · 712 pts
SeverityFileLineSnippetContext
LOWscripts/sync_env.py4CODE
LOWscripts/sync_env.py14CODE
LOWscripts/check_mojibake.py9CODE
LOWscripts/check_docs.py4CODE
LOWscripts/bootstrap_env.py4CODE
LOWscripts/bump_version.py12CODE
LOWscripts/check_version.py12CODE
LOWmcp_server/tests/test_transport_resolution.py11CODE
LOWmcp_server/src/quantdinger_mcp/server.py7CODE
LOWmcp_server/src/quantdinger_mcp/security.py2CODE
LOWmcp_server/src/quantdinger_mcp/tool_contract.py4CODE
LOWbackend_api_python/env_sync_core.py3CODE
LOWbackend_api_python/app/startup.py2CODE
LOWbackend_api_python/app/_version.py8CODE
LOWbackend_api_python/app/celery_app.py3CODE
LOWbackend_api_python/app/__init__.py2CODE
LOWbackend_api_python/app/__init__.py28CODE
LOWbackend_api_python/app/__init__.py28CODE
LOWbackend_api_python/app/research/__init__.py3CODE
LOWbackend_api_python/app/research/__init__.py4CODE
LOWbackend_api_python/app/research/intelligence.py3CODE
LOWbackend_api_python/app/research/workflows.py3CODE
LOWbackend_api_python/app/tasks/maintenance.py3CODE
LOWbackend_api_python/app/tasks/agent_jobs.py3CODE
LOWbackend_api_python/app/tasks/fast_analysis.py3CODE
LOWbackend_api_python/app/tasks/indicator_translation.py3CODE
LOWbackend_api_python/app/config/__init__.py2CODE
LOWbackend_api_python/app/config/__init__.py3CODE
LOWbackend_api_python/app/config/__init__.py4CODE
LOWbackend_api_python/app/config/__init__.py4CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/redis_urls.py3CODE
LOWbackend_api_python/app/runtime/roles.py3CODE
LOWbackend_api_python/app/runtime/__init__.py3CODE
LOWbackend_api_python/app/runtime/__init__.py3CODE
LOWbackend_api_python/app/runtime/process.py3CODE
LOWbackend_api_python/app/utils/json_helpers.py3CODE
LOWbackend_api_python/app/utils/redaction.py8CODE
LOWbackend_api_python/app/utils/db.py24CODE
LOWbackend_api_python/app/utils/db.py24CODE
LOWbackend_api_python/app/utils/db.py24CODE
LOWbackend_api_python/app/utils/local_brokers.py3CODE
LOWbackend_api_python/app/utils/request_guard.py3CODE
LOWbackend_api_python/app/utils/notification_display.py6CODE
LOWbackend_api_python/app/utils/timeutil.py21CODE
LOWbackend_api_python/app/utils/market_visibility.py27CODE
LOWbackend_api_python/app/utils/technical_indicators.py8CODE
LOWbackend_api_python/app/utils/__init__.py4CODE
LOWbackend_api_python/app/utils/__init__.py5CODE
LOWbackend_api_python/app/utils/__init__.py6CODE
LOWbackend_api_python/app/utils/trade_close_reason.py6CODE
LOWbackend_api_python/app/utils/trade_net_pnl.py10CODE
LOWbackend_api_python/app/utils/agent_jobs.py19CODE
LOWbackend_api_python/app/utils/resource_guard.py8CODE
686 more matches not shown…
Deep Nesting420 hits · 324 pts
SeverityFileLineSnippetContext
LOWscripts/check_mojibake.py80CODE
LOWscripts/check_docs.py49CODE
LOWmcp_server/src/quantdinger_mcp/security.py43CODE
LOWmcp_server/src/quantdinger_mcp/security.py90CODE
LOWbackend_api_python/app/startup.py144CODE
LOWbackend_api_python/app/utils/db.py376CODE
LOWbackend_api_python/app/utils/config_loader.py236CODE
LOWbackend_api_python/app/utils/request_guard.py55CODE
LOWbackend_api_python/app/utils/timeutil.py50CODE
LOWbackend_api_python/app/utils/safe_exec.py863CODE
LOWbackend_api_python/app/utils/safe_exec.py1067CODE
LOWbackend_api_python/app/utils/safe_exec.py346CODE
LOWbackend_api_python/app/utils/agent_jobs.py81CODE
LOWbackend_api_python/app/utils/agent_jobs.py333CODE
LOWbackend_api_python/app/utils/db_postgres.py496CODE
LOWbackend_api_python/app/utils/agent_auth.py49CODE
LOWbackend_api_python/app/observability/metrics.py72CODE
LOWbackend_api_python/app/openapi/register.py137CODE
LOWbackend_api_python/app/openapi/register.py172CODE
LOWbackend_api_python/app/professional_report/builder.py594CODE
LOWbackend_api_python/app/professional_report/snapshot.py229CODE
LOW…_api_python/app/professional_report/features/crypto.py139CODE
LOW…_api_python/app/professional_report/features/crypto.py292CODE
LOW…_api_python/app/professional_report/features/crypto.py421CODE
LOW…_api_python/app/professional_report/features/crypto.py513CODE
LOWbackend_api_python/app/data_providers/heatmap.py143CODE
LOWbackend_api_python/app/data_providers/heatmap.py163CODE
LOWbackend_api_python/app/data_providers/forex.py29CODE
LOWbackend_api_python/app/data_providers/forex.py69CODE
LOWbackend_api_python/app/data_providers/forex.py109CODE
LOWbackend_api_python/app/data_providers/forex.py158CODE
LOW…_api_python/app/data_providers/cross_asset_research.py136CODE
LOW…_api_python/app/data_providers/cross_asset_research.py271CODE
LOWbackend_api_python/app/data_providers/sentiment.py45CODE
LOWbackend_api_python/app/data_providers/sentiment.py114CODE
LOWbackend_api_python/app/data_providers/sentiment.py184CODE
LOWbackend_api_python/app/data_providers/sentiment.py253CODE
LOWbackend_api_python/app/data_providers/sentiment.py289CODE
LOWbackend_api_python/app/data_providers/sentiment.py325CODE
LOWbackend_api_python/app/data_providers/hk_research.py217CODE
LOWbackend_api_python/app/data_providers/__init__.py306CODE
LOWbackend_api_python/app/data_providers/us_research.py703CODE
LOWbackend_api_python/app/data_providers/opportunities.py85CODE
LOWbackend_api_python/app/data_providers/opportunities.py143CODE
LOWbackend_api_python/app/data_providers/opportunities.py236CODE
LOWbackend_api_python/app/data_providers/opportunities.py283CODE
LOWbackend_api_python/app/data_providers/opportunities.py323CODE
LOWbackend_api_python/app/data_providers/opportunities.py384CODE
LOWbackend_api_python/app/data_providers/crypto.py28CODE
LOWbackend_api_python/app/data_providers/crypto.py68CODE
LOW…kend_api_python/app/data_providers/company_research.py94CODE
LOW…kend_api_python/app/data_providers/company_research.py240CODE
LOWbackend_api_python/app/data_providers/commodities.py29CODE
LOWbackend_api_python/app/data_providers/commodities.py67CODE
LOWbackend_api_python/app/data_providers/commodities.py114CODE
LOWbackend_api_python/app/data_providers/commodities.py161CODE
LOWbackend_api_python/app/data_providers/indices.py30CODE
LOWbackend_api_python/app/data_providers/news.py15CODE
LOWbackend_api_python/app/workers/lease_heartbeat.py107CODE
LOWbackend_api_python/app/workers/trading.py166CODE
360 more matches not shown…
Modern Structural Boilerplate119 hits · 120 pts
SeverityFileLineSnippetContext
LOWscripts/bootstrap_env.py50def _set_value(path: Path, key: str, value: str) -> None:CODE
LOWbackend_api_python/run.py62 def _set_if_blank(key: str, value: str) -> None:CODE
LOWbackend_api_python/app/celery_app.py96__all__ = ["celery_app"]CODE
LOWbackend_api_python/app/research/__init__.py6__all__ = ["build_research_intelligence", "resolve_workflow"]CODE
LOWbackend_api_python/app/research/intelligence.py228__all__ = ["build_research_intelligence"]CODE
LOWbackend_api_python/app/research/workflows.py95__all__ = ["resolve_workflow"]CODE
LOWbackend_api_python/app/config/__init__.py15__all__ = [CODE
LOWbackend_api_python/app/runtime/__init__.py5__all__ = ["ProcessRole", "current_process_role"]CODE
LOWbackend_api_python/app/utils/db.py435__all__ = [CODE
LOWbackend_api_python/app/utils/config_loader.py70 def set_nested(cfg: Dict[str, Any], dotted_key: str, value: Any) -> None:CODE
LOWbackend_api_python/app/utils/timeutil.py112__all__ = ["to_utc_iso"]CODE
LOWbackend_api_python/app/utils/__init__.py8__all__ = ['get_logger', 'CacheManager', 'get_retry_session']CODE
LOWbackend_api_python/app/utils/broker_session.py119__all__ = ['BrokerSessionRegistry']CODE
LOWbackend_api_python/app/utils/numeric_precision.py75__all__ = [CODE
LOW⚡backend_api_python/app/utils/safe_exec_worker.py259 def set_universe(self, *args: Any, **kwargs: Any) -> None:CODE
LOW⚡backend_api_python/app/utils/safe_exec_worker.py262 def set_benchmark(self, *args: Any, **kwargs: Any) -> None:CODE
LOW⚡backend_api_python/app/utils/safe_exec_worker.py268 def set_warmup(self, *args: Any, **kwargs: Any) -> None:CODE
LOW⚡backend_api_python/app/utils/safe_exec_worker.py274 def set_metadata(self, *args: Any, **kwargs: Any) -> None:CODE
LOWbackend_api_python/app/observability/__init__.py10__all__ = ["init_http_observability"]CODE
LOWbackend_api_python/app/observability/db_metrics.py31__all__ = [CODE
LOWbackend_api_python/app/openapi/schemas/__init__.py11__all__ = [CODE
LOW…end_api_python/app/professional_report/llm_contract.py104__all__ = ["FastAnalysisNarrative", "validate_llm_analysis"]CODE
LOWbackend_api_python/app/professional_report/__init__.py9__all__ = ["build_professional_report"]CODE
LOWbackend_api_python/app/professional_report/narrative.py77__all__ = ["has_mojibake", "normalize_report_text", "numeric_tokens", "validate_evidence_claims"]CODE
LOWbackend_api_python/app/professional_report/builder.py849__all__ = ["build_professional_report"]CODE
LOWbackend_api_python/app/professional_report/contracts.py399__all__ = [CODE
LOWbackend_api_python/app/professional_report/risk.py216__all__ = ["build_risk_plan"]CODE
LOWbackend_api_python/app/professional_report/prompt.py218__all__ = ["build_professional_analysis_prompt"]CODE
LOWbackend_api_python/app/professional_report/quality.py189__all__ = ["apply_quality_gate", "assess_snapshot_quality"]CODE
LOWbackend_api_python/app/professional_report/snapshot.py494__all__ = ["build_evidence_snapshot"]CODE
LOW…pi_python/app/professional_report/providers/catalog.py586__all__ = [CODE
LOW…i_python/app/professional_report/providers/__init__.py22__all__ = [CODE
LOW…_api_python/app/professional_report/features/equity.py169__all__ = ["build_equity_features"]CODE
LOW…pi_python/app/professional_report/features/__init__.py7__all__ = [CODE
LOW…_api_python/app/professional_report/features/crypto.py775__all__ = ["VERSION", "build_crypto_features", "extract_crypto_features"]CODE
LOW…python/app/professional_report/features/cross_asset.py63__all__ = ["build_forex_features", "build_futures_features"]CODE
LOW…_api_python/app/data_providers/cross_asset_research.py327__all__ = [CODE
LOWbackend_api_python/app/data_providers/hk_research.py275__all__ = [CODE
LOWbackend_api_python/app/data_providers/us_research.py766__all__ = [CODE
LOWbackend_api_python/app/data_providers/news.py75__all__ = ["fetch_financial_news", "get_economic_calendar", "get_economic_calendar_payload"]CODE
LOWbackend_api_python/app/data_sources/cache_manager.py22logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/data_sources/rate_limiter.py18logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/data_sources/__init__.py13__all__ = [CODE
LOWbackend_api_python/app/data_sources/__init__.py35__all__ = [CODE
LOWbackend_api_python/app/data_sources/circuit_breaker.py21logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/data_sources/native_crypto.py630__all__ = [CODE
LOWbackend_api_python/app/events/dispatcher.py82__all__ = ["StrategyDueDispatcher"]CODE
LOWbackend_api_python/app/events/protocol.py297__all__ = [CODE
LOWbackend_api_python/app/events/__init__.py19__all__ = [CODE
LOWbackend_api_python/app/events/bar_clock.py266__all__ = [CODE
LOWbackend_api_python/app/events/bus.py118__all__ = ["EventBus", "EventSubscription", "InMemoryEventBus"]CODE
LOWbackend_api_python/app/events/topics.py98__all__ = ["TopicSpec", "event_topic_map", "topic_for_event", "topic_specs"]CODE
LOWbackend_api_python/app/events/kafka.py300__all__ = [CODE
LOWbackend_api_python/app/events/evaluator.py252__all__ = ["StrategyEvaluationBatchHandler"]CODE
LOW…nd_api_python/app/services/shared_market_price_feed.py229__all__ = [CODE
LOWbackend_api_python/app/services/event_inbox.py272__all__ = [CODE
LOW…pi_python/app/services/strategy_event_subscriptions.py210__all__ = [CODE
LOWbackend_api_python/app/services/virtual_trading.py853__all__ = [CODE
LOWbackend_api_python/app/services/ai_copilot_store.py440def update_request_usage(cur, request_id: int, **values: Any) -> None:CODE
LOW…nd_api_python/app/services/distributed_runtime_host.py201__all__ = ["DistributedRuntimeHost"]CODE
59 more matches not shown…
Cross-File Repetition18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHbackend_api_python/app/routes/credentials.py0insert into qd_exchange_credentials (user_id, name, exchange_id, api_key_hint, encrypted_config, created_at, updated_at)STRING
HIGHbackend_api_python/app/routes/openapi_brokers.py0insert into qd_exchange_credentials (user_id, name, exchange_id, api_key_hint, encrypted_config, created_at, updated_at)STRING
HIGHbackend_api_python/app/routes/alpaca.py0insert into qd_exchange_credentials (user_id, name, exchange_id, api_key_hint, encrypted_config, created_at, updated_at)STRING
HIGH…api_python/app/services/strategy_command_repository.py0select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() limSTRING
HIGHbackend_api_python/app/services/strategy.py0select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() limSTRING
HIGH…_api_python/app/services/strategy_v2/live_execution.py0select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() limSTRING
HIGHbackend_api_python/app/services/live_trading/okx.py0private endpoint to validate credentials (best-effort).STRING
HIGHbackend_api_python/app/services/live_trading/bitget.py0private endpoint to validate credentials (best-effort).STRING
HIGH…api_python/app/services/live_trading/bitget_classic.py0private endpoint to validate credentials (best-effort).STRING
HIGHbackend_api_python/app/services/live_trading/bybit.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGH…nd_api_python/app/services/live_trading/bitget_spot.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGH…ython/app/services/live_trading/bitget_spot_classic.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGHbackend_api_python/app/services/live_trading/bitget.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGH…api_python/app/services/live_trading/bitget_classic.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGHbackend_api_python/tests/test_agent_current_contract.py0def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contexSTRING
HIGHbackend_api_python/tests/test_strategy_evolution.py0def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contexSTRING
HIGHbackend_api_python/tests/test_strategy_v2_service.py0def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contexSTRING
HIGHbackend_api_python/tests/test_strategy_v2_runtime.py0def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contexSTRING
AI Slop Vocabulary32 hits · 76 pts
SeverityFileLineSnippetContext
MEDIUMbackend_api_python/app/routes/quick_trade.py312 # Swap input is margin and expands by leverage.COMMENT
MEDIUM⚡backend_api_python/app/routes/global_market.py146 """Get comprehensive market sentiment indicators."""STRING
MEDIUM…end_api_python/app/services/ai_generation_contracts.py101## Contract leverageCOMMENT
MEDIUM⚡backend_api_python/app/services/pending_order_worker.py1781 # - For OKX swap, leverage must be set via private endpoint; otherwise exchange defaults apply.COMMENT
MEDIUM⚡backend_api_python/app/services/pending_order_worker.py1782 # - For other exchanges, leverage setting is not implemented yet in this local client.COMMENT
MEDIUMbackend_api_python/app/services/llm.py1504 """Safe LLM call with robust JSON parsing and fallback structure."""STRING
LOWbackend_api_python/app/services/symbol_name.py228 # 1) Seed (already in our DB — nothing to learn, just return).COMMENT
MEDIUMbackend_api_python/app/services/indicator_workspace.py66 "# @strategy, # signal_form, # exit_owner, # flip_mode, # timeframe, risk, leverage, trade direction, stop lCODE
MEDIUM⚡backend_api_python/app/services/portfolio_monitor.py463 """Build a comprehensive text report (backward compatible)."""STRING
MEDIUMbackend_api_python/app/services/live_trading/okx.py97 # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/okx.py781 # since OKX may block leverage changes for any instrumentCOMMENT
MEDIUMbackend_api_python/app/services/live_trading/okx.py1155 # Algo order types that block leverage adjustment per OKX error 59669COMMENT
MEDIUM⚡backend_api_python/app/services/live_trading/okx.py626 """Read configured leverage for an instrument (works without open position)."""STRING
MEDIUM⚡backend_api_python/app/services/live_trading/okx.py636 """Read leverage from open position or account leverage-info."""STRING
MEDIUMbackend_api_python/app/services/live_trading/okx.py594 """Best-effort read of current leverage from an open position row."""STRING
MEDIUM…hon/app/services/live_trading/account_configuration.py100 """Apply requested leverage and margin mode or reject the order."""STRING
MEDIUMbackend_api_python/app/services/live_trading/bitget.py85 # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/gate.py916 # Gate expects ``leverage`` / ``cross_leverage_limit`` as **query parameters**, not JSON bodyCOMMENT
MEDIUMbackend_api_python/app/services/live_trading/gate.py917 # (see gateapi-python: update_position_leverage). Cross / portfolio mode: leverage=0 + cross_leverage_limit.COMMENT
MEDIUM…api_python/app/services/live_trading/bitget_classic.py86 # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/binance.py1097 """Read back symbol-level margin mode and leverage from positionRisk.STRING
MEDIUM…i_python/app/services/pending_orders/leverage_retry.py1"""Recoverable OKX leverage / algo-order (59669) retry helpers.STRING
MEDIUM…i_python/app/services/pending_orders/leverage_retry.py42 """Requeue a live order blocked by recoverable OKX leverage errors."""STRING
MEDIUM…d_api_python/app/services/usdt_payment/watchers/evm.py118# mainnet, and Etherscan's indexed tokentx endpoint is more robustCOMMENT
MEDIUMbackend_api_python/app/services/grid/engine.py1569 """One grid line's base quantity (amountPerGrid × leverage / price), exchange-normalized."""STRING
MEDIUM⚡backend_api_python/tests/test_okx_set_leverage_59669.py44 # Keep attempting set-leverage until retries are exhausted, thenCOMMENT
MEDIUM⚡backend_api_python/tests/test_okx_set_leverage_59669.py45 # report the target leverage as already configured on the venue.COMMENT
MEDIUMbackend_api_python/tests/test_okx_set_leverage_59669.py67 """Client whose set-leverage always fails with 59669 until retries run out."""STRING
MEDIUMbackend_api_python/tests/test_grid_engine.py508 """100 USDT * 20% margin * 20x leverage ≈ 400 USDT notional at 72710."""STRING
MEDIUM⚡backend_api_python/tests/test_indicator_code_quality.py74# @strategy leverage 2COMMENT
MEDIUM⚡backend_api_python/tests/test_risk_pct_basis.py62 # 92 / 100 = -8% > -9% — must NOT trigger even at 10x leverage.COMMENT
MEDIUMbackend_api_python/tests/test_risk_pct_basis.py114 # 16% price move required regardless of leverage.COMMENT
Structural Annotation Overuse28 hits · 47 pts
SeverityFileLineSnippetContext
LOWdocs/deployment/OAUTH_CONFIG_EN.md17### Step 1: Create a Google Cloud ProjectCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md23### Step 2: Configure OAuth Consent ScreenCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md35### Step 3: Create OAuth 2.0 Client IDCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md49### Step 4: Configure .env FileCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md62### Step 1: Create GitHub OAuth AppCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md75### Step 2: Get CredentialsCOMMENT
LOWdocs/deployment/OAUTH_CONFIG_EN.md81### Step 3: Configure .env FileCOMMENT
LOW⚡docs/deployment/OAUTH_CONFIG_EN.md96### Step 1: Create Turnstile WidgetCOMMENT
LOW⚡docs/deployment/OAUTH_CONFIG_EN.md106### Step 2: Get KeysCOMMENT
LOW⚡docs/deployment/OAUTH_CONFIG_EN.md112### Step 3: Configure .env FileCOMMENT
LOWdocs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md48### Step 1: Obtain SMTP Service InformationCOMMENT
LOW⚡docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md67### Step 2: Configure Environment VariablesCOMMENT
LOWdocs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md103### Step 3: Enable Email Notifications in StrategyCOMMENT
LOWdocs/deployment/NOTIFICATION_SMS_CONFIG_EN.md45### Step 1: Create a Twilio AccountCOMMENT
LOWdocs/deployment/NOTIFICATION_SMS_CONFIG_EN.md57### Step 2: Obtain API CredentialsCOMMENT
LOWdocs/deployment/NOTIFICATION_SMS_CONFIG_EN.md71### Step 3: Get a Phone NumberCOMMENT
LOW⚡docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md87### Step 4: Configure Environment VariablesCOMMENT
LOWdocs/deployment/NOTIFICATION_SMS_CONFIG_EN.md113### Step 5: Enable SMS Notifications in StrategyCOMMENT
LOWdocs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md27## Step 1: Create a Telegram BotCOMMENT
LOWdocs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md36## Step 2: Obtain Bot TokenCOMMENT
LOWdocs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md48## Step 3: Get Your User IDCOMMENT
LOWdocs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md71## Step 4: Configure Environment VariablesCOMMENT
LOWdocs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md84## Step 5: Enable Telegram Notifications in StrategyCOMMENT
LOW⚡backend_api_python/app/routes/auth.py175 # Step 1: Verify Turnstile (if enabled)COMMENT
LOW⚡backend_api_python/app/routes/auth.py184 # Step 2: Check rate limitingCOMMENT
LOW⚡backend_api_python/app/routes/auth.py191 # Step 3: AuthenticateCOMMENT
LOWbackend_api_python/app/routes/auth.py272 # Step 4: Record successful loginCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py183 # Step 1: resolve the watched account.COMMENT
Redundant / Tautological Comments22 hits · 30 pts
SeverityFileLineSnippetContext
LOWscripts/generate-secret-key.sh9# Check if .env exists.COMMENT
LOWbackend_api_python/docker-entrypoint.sh11# Check if .env file existsCOMMENT
LOW⚡backend_api_python/app/routes/auth.py197 # Check if user has no password set (code-login user)COMMENT
LOWbackend_api_python/app/routes/auth.py416 # Check if user existsCOMMENT
LOWbackend_api_python/app/routes/auth.py421 # Check if registration is enabledCOMMENT
LOWbackend_api_python/app/routes/auth.py727 # Check if registration is enabledCOMMENT
LOWbackend_api_python/app/routes/auth.py772 # Check if username already existsCOMMENT
LOWbackend_api_python/app/routes/auth.py777 # Check if email already existsCOMMENT
LOWbackend_api_python/app/routes/portfolio.py86 # Check if force refresh (skip cache)COMMENT
LOWbackend_api_python/app/routes/portfolio.py316 # Check if force refreshCOMMENT
LOWbackend_api_python/app/routes/portfolio.py730 # Check if alert already exists for this position (unique constraint)COMMENT
LOWbackend_api_python/app/services/pending_order_worker.py1685 # Check if this is an IBKR client (US stocks)COMMENT
LOW⚡backend_api_python/app/services/oauth_service.py681 # Check if user has password (can't unlink last auth method)COMMENT
LOW⚡backend_api_python/app/services/oauth_service.py689 # Check if this is the only OAuth linkCOMMENT
LOWbackend_api_python/app/services/oauth_service.py466 # Check if OAuth link existsCOMMENT
LOWbackend_api_python/app/services/oauth_service.py516 # Check if user exists with same emailCOMMENT
LOWbackend_api_python/app/services/llm.py1228 # Check if we have API key for the detected providerCOMMENT
LOW⚡backend_api_python/app/services/email_service.py52 # Check if email is properly configuredCOMMENT
LOWbackend_api_python/app/services/email_service.py197 # Check if code matchesCOMMENT
LOWbackend_api_python/app/services/portfolio_monitor.py1529 # Check if we can trigger (not triggered yet, or repeat interval passed)STRING
LOWbackend_api_python/app/services/user_service.py643 # Check if user has no password (code-login user)COMMENT
LOWbackend_api_python/app/services/user_service.py765 # Check if username already existsCOMMENT
Cross-Language Confusion5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHbackend_api_python/app/services/strategy_v2/runtime.py268 key not in updated or not frame.equals(updated[key].iloc[:len(frame)])CODE
HIGHbackend_api_python/app/services/strategy_v2/runtime.py484 or not cached.index.equals(frame.index[:cached_length])CODE
HIGHbackend_api_python/app/services/strategy_v2/data.py304 if any(not baseline.equals(rows.iloc[index]) for index in range(1, len(rows))):CODE
HIGH…ckend_api_python/tests/test_strategy_v2_market_data.py644 assert second.equals(first)CODE
HIGHbackend_api_python/tests/test_llm_litellm_provider.py270 b'data: {"choices":[{"delta":{"content":"partial"},"finish_reason":null}]}',CODE
AI Structural Patterns26 hits · 22 pts
SeverityFileLineSnippetContext
LOWmcp_server/src/quantdinger_mcp/server.py385CODE
LOWmcp_server/src/quantdinger_mcp/server.py629CODE
LOWbackend_api_python/app/professional_report/snapshot.py155CODE
LOWbackend_api_python/app/routes/user.py873CODE
LOWbackend_api_python/app/routes/global_market.py174CODE
LOWbackend_api_python/app/routes/ai_chat.py731CODE
LOWbackend_api_python/app/services/pending_order_worker.py2809CODE
LOWbackend_api_python/app/services/ai_copilot_store.py274CODE
LOWbackend_api_python/app/services/community_service.py245CODE
LOWbackend_api_python/app/services/community_service.py587CODE
LOWbackend_api_python/app/services/research_agent.py150CODE
LOW…ython/app/services/live_trading/external_flat_close.py333CODE
LOWbackend_api_python/app/services/live_trading/htx_v5.py370CODE
LOWbackend_api_python/app/services/live_trading/records.py510CODE
LOW…api_python/app/services/strategy_v2/factor_research.py81CODE
LOWbackend_api_python/app/services/strategy_v2/service.py70CODE
LOWbackend_api_python/app/services/strategy_v2/service.py297CODE
LOWbackend_api_python/app/services/strategy_v2/runtime.py1766CODE
LOW…api_python/app/services/pending_orders/fill_records.py126CODE
LOW…pi_python/app/services/execution_streams/repository.py14CODE
LOW…_python/app/services/strategy_runtime/order_intents.py84CODE
LOW…d_api_python/app/services/strategy_runtime/identity.py75CODE
LOW…d_api_python/app/services/quick_trade/trade_history.py136CODE
LOWbackend_api_python/app/services/grid/engine.py1943CODE
LOWbackend_api_python/app/services/grid/fill_handler.py27CODE
LOWbackend_api_python/app/services/grid/fill_handler.py103CODE
Fake / Example Data20 hits · 21 pts
SeverityFileLineSnippetContext
LOWbackend_api_python/app/routes/settings.py398 'default': 'admin@example.com',CODE
LOWbackend_api_python/app/routes/settings.py2255 if requested_admin_email and requested_admin_email != 'admin@example.com':CODE
LOWbackend_api_python/app/services/security_service.py27 'placeholder',CODE
LOWbackend_api_python/app/services/user_service.py383 if email == 'admin@example.com':CODE
LOWbackend_api_python/app/services/user_service.py384 return {'synced': False, 'reason': 'placeholder'}CODE
LOWbackend_api_python/app/services/user_service.py414 if current_email and current_email != 'admin@example.com' and not overwrite_existing:CODE
LOWbackend_api_python/app/services/user_service.py1127 admin_email = os.getenv('ADMIN_EMAIL', 'admin@example.com')CODE
LOWbackend_api_python/tests/test_db_log_noise_fixes.py80 result = service.start_setup(9383, "user@example.com")CODE
LOW…ckend_api_python/tests/test_initial_password_policy.py88 "email": "admin@example.com",CODE
LOW…ckend_api_python/tests/test_initial_password_policy.py162 "email": "admin@example.com",CODE
LOW…ckend_api_python/tests/test_registration_rate_limit.py60 email="user@example.com",CODE
LOWbackend_api_python/tests/test_auth_time_windows.py70 "user@example.com",CODE
LOWbackend_api_python/tests/test_auth_time_windows.py105 "user@example.com",CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py128 "user@example.com",CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py138 assert params == ("user@example.com", "login", 30)CODE
LOWbackend_api_python/tests/test_auth_time_windows.py154 "user@example.com",CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py177 "user@example.com",CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py186 assert params == ("user@example.com", "account", 90, 60, 5, 30)CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py222 "user@example.com",CODE
LOW⚡backend_api_python/tests/test_auth_time_windows.py231 assert email_params == ("user@example.com", 60)CODE
Synthetic Comment Markers2 hits · 16 pts
SeverityFileLineSnippetContext
HIGH⚡backend_api_python/app/services/ai_calibration.py147 # Approx correctness rules (as requested)COMMENT
HIGHbackend_api_python/app/services/ai_report_pdf.py505 "disclaimer": "This report is generated by AI for research only and is not investment advice.",CODE
Over-Commented Block16 hits · 14 pts
SeverityFileLineSnippetContext
LOWdocker-compose.ghcr.yml1# QuantDinger Docker Compose - GHCR prebuilt images (zero-repo deploy)COMMENT
LOWdocker-compose.ghcr.yml21# IMAGE_TAG - unified tag for backend AND frontend (optional; see per-side defaults below)COMMENT
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWdocker-compose.build.yml1# Override file for local frontend builds.COMMENT
LOWdocker-compose.yml1# QuantDinger Docker Compose - One-Click DeploymentCOMMENT
LOWdocker-compose.yml621 # (gitignored) and layer the build override on top:COMMENT
LOW.github/workflows/docker-publish.yml1name: Publish backend image to GHCRCOMMENT
LOWbackend_api_python/requirements.txt41# Runtime metricsCOMMENT
LOWbackend_api_python/requirements.txt61pypdf>=6.21.4,<7COMMENT
LOWbackend_api_python/app/services/builtin_indicators.py41# * output['signals'] is chart-only and never drives orders by itselfCOMMENT
LOWbackend_api_python/app/services/oauth_service.py161 # FRONTEND_URL accepts a comma-separated list of origins (the sameCOMMENT
LOWbackend_api_python/app/services/usdt_payment/service.py101 updated_at TIMESTAMP DEFAULT NOW()COMMENT
LOW…d_api_python/app/services/usdt_payment/watchers/evm.py81 "https://bsc-dataseed4.binance.org",COMMENT
LOW…d_api_python/app/services/usdt_payment/watchers/evm.py101# eth_getLogs; we cap at 4800 to stay safely under that. At 0.75s/blockCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py181 min_ts = int(ct.timestamp()) - 60 if ct else NoneCOMMENT
LOWbackend_api_python/tests/test_backtest_metrics.py941COMMENT
Verbosity Indicators5 hits · 9 pts
SeverityFileLineSnippetContext
LOW⚡backend_api_python/app/routes/auth.py175 # Step 1: Verify Turnstile (if enabled)COMMENT
LOW⚡backend_api_python/app/routes/auth.py184 # Step 2: Check rate limitingCOMMENT
LOW⚡backend_api_python/app/routes/auth.py191 # Step 3: AuthenticateCOMMENT
LOWbackend_api_python/app/routes/auth.py272 # Step 4: Record successful loginCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py183 # Step 1: resolve the watched account.COMMENT
Modern AI Meta-Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMdocker-compose.ghcr.yml13# - .env contains backend runtime settings and Docker Compose orchestration knobs.COMMENT
MEDIUMdocs/architecture/ARCHITECTURE.md52 ai/ # skills, prompts, provider orchestrationCODE
MEDIUMdocs/architecture/V6_HYPERSCALE_ARCHITECTURE_PLAN.md793### Phase 2: event-driven bar evaluationCOMMENT
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWinstall.sh5# Usage:COMMENT
LOWdocker-compose.build.yml2# Usage:COMMENT
LOWdocker-compose.yml2# Usage:COMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUM…kend_api_python/tests/test_ai_chat_snapshot_quality.py238CODE