Repository Analysis

HKUDS/AI-Trader

"AI-Trader: 100% Fully-Automated Agent-Native Trading"

11.6 Low AI signal View on GitHub
11.6
Adjusted Score
11.6
Raw Score
100%
Time Factor
2026-05-21
Last Push
18,969
Stars
Python
Language
46,684
Lines of Code
135
Files
531
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 15MEDIUM 2LOW 514

Pattern Findings

531 matches across 8 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers252 hits · 229 pts
SeverityFileLineSnippet
LOWresearch/scripts/analyze_experiments.py233def _legacy_treatment_effect_rows(rows: list[dict], metric: str, family: str) -> list[dict]:
LOWresearch/scripts/research_common.py30def add_common_export_filters(parser: argparse.ArgumentParser) -> None:
LOWservice/frontend/src/appShared.tsx121export function buildLeaderboardChartData(profitHistory: any[], chartRange: LeaderboardChartRange, language: Language) {
LOWservice/frontend/src/appShared.tsx188function getPolymarketDisplayTitle(item: any) {
LOWservice/frontend/src/appCommunityPages.tsx78async function fetchActiveChallengeOptions() {
LOWservice/frontend/src/appCommunityPages.tsx90async function fetchMyTeamMissionOptions(token: string | null) {
LOWservice/server/experiment_metrics.py25def _max_drawdown_from_history(rows: list[dict[str, Any]]) -> float:
LOWservice/server/experiment_metrics.py36def refresh_agent_metric_snapshots(window_days: int = 7, window_key: str | None = None) -> dict[str, Any]:
LOWservice/server/routes_signals.py58def _agent_experiment_context(agent_id: int) -> list[dict[str, Any]]:
LOWservice/server/routes_signals.py98def _primary_experiment_context(agent_id: int) -> dict[str, Any] | None:
LOWservice/server/routes_shared.py107def allow_sync_price_fetch_in_api() -> bool:
LOWservice/server/routes_shared.py115def should_fetch_server_trade_price(market: str) -> bool:
LOWservice/server/routes_shared.py141def format_polymarket_reference(reference: str) -> str:
LOWservice/server/routes_shared.py194def check_price_api_rate_limit(ctx: RouteContext, agent_id: int) -> bool:
LOWservice/server/routes_shared.py242def invalidate_agent_message_caches(ctx: RouteContext, agent_id: int) -> None:
LOWservice/server/routes_shared.py686def invalidate_agent_signal_caches(ctx: RouteContext) -> None:
LOWservice/server/routes_shared.py693def invalidate_signal_list_caches(ctx: RouteContext) -> None:
LOWservice/server/routes_shared.py703def invalidate_leaderboard_caches(ctx: RouteContext) -> None:
LOWservice/server/routes_shared.py710def invalidate_trending_caches() -> None:
LOWservice/server/routes_shared.py718def invalidate_signal_read_caches(ctx: RouteContext, refresh_trending: bool = False) -> None:
LOWservice/server/routes_shared.py725def invalidate_position_cache(ctx: RouteContext, agent_id: int | None = None) -> None:
LOWservice/server/routes_shared.py393def _record_experiment_notice_exposed(agent_id: int, notice: dict[str, Any], *, surface: str) -> None:
LOWservice/server/routes_shared.py467def attach_experiment_unread_notice(
LOWservice/server/routes_shared.py561def normalize_content_fingerprint(content: str) -> str:
LOWservice/server/routes_shared.py565def enforce_content_rate_limit(
LOWservice/server/experiment_notifications.py159def resolve_experiment_notification_targets(
LOWservice/server/experiment_notifications.py198def resolve_recent_active_experiment_targets(
LOWservice/server/experiment_notifications.py241def resolve_unread_active_experiment_targets(
LOWservice/server/experiment_notifications.py358def resolve_challenge_notification_targets(
LOWservice/server/experiment_notifications.py395def resolve_team_mission_notification_targets(
LOWservice/server/experiment_notifications.py493def _validate_notification_payload(message_type: str, title: str, content: str) -> None:
LOWservice/server/experiment_notifications.py509def validate_notification_request(message_type: str, title: str, content: str) -> None:
LOWservice/server/experiment_notifications.py728def build_experiment_target_rule(
LOWservice/server/services.py74def _get_or_issue_agent_token(agent: Dict) -> str:
LOWservice/server/services.py190def _update_position_from_signal(
LOWservice/server/services.py347async def _broadcast_signal_to_followers(leader_id: int, signal_data: dict) -> int:
LOWservice/server/research_exports.py345def fetch_challenge_export_rows(
LOWservice/server/research_exports.py391def fetch_research_export_rows(
LOWservice/server/research_exports.py1109def get_research_dataset_names(primary_only: bool = False) -> list[str]:
LOWservice/server/research_exports.py1113def get_research_export_columns(dataset_name: str) -> list[str]:
LOWservice/server/research_exports.py1197def _append_agent_filter_templates(
LOWservice/server/research_exports.py1264def fetch_research_export_rows(
LOWservice/server/research_exports.py1321def research_schema_for_dataset(dataset_name: str) -> dict[str, Any]:
LOWservice/server/research_exports.py1429def _export_single_research_file(output_dir: str | Path, filename: str, **filters: Any) -> str:
LOWservice/server/research_exports.py1452def fetch_challenge_export_rows(filename: str, **filters: Any) -> tuple[list[str], list[dict[str, Any]]]:
LOWservice/server/tasks.py130def _polymarket_updown_expired_seconds(symbol: str | None, now_ts: float) -> Optional[float]:
LOWservice/server/tasks.py141def _backfill_polymarket_position_metadata() -> None:
LOWservice/server/tasks.py63def _price_failure_retry_after(key: tuple[str, str, str, str], now_ts: float) -> float:
LOWservice/server/tasks.py679async def refresh_macro_signal_snapshots_loop():
LOWservice/server/tasks.py702async def refresh_etf_flow_snapshots_loop():
LOWservice/server/tasks.py725async def refresh_stock_analysis_snapshots_loop():
LOWservice/server/tasks.py762def _record_profit_history_once() -> int:
LOWservice/server/tasks.py928async def settle_polymarket_positions():
LOWservice/server/tasks.py1137async def score_team_contributions_loop():
LOWservice/server/tasks.py1155async def settle_team_missions_loop():
LOWservice/server/tasks.py1173async def score_signal_quality_loop():
LOWservice/server/tasks.py1191async def refresh_agent_metric_snapshots_loop():
LOWservice/server/tasks.py1247def background_tasks_enabled_for_api() -> bool:
LOWservice/server/tasks.py1252def get_enabled_background_task_names() -> list[str]:
LOWservice/server/tasks.py436def _profit_history_prune_done(task: asyncio.Task) -> None:
192 more matches not shown…
Excessive Try-Catch Wrapping182 hits · 167 pts
SeverityFileLineSnippet
LOWresearch/scripts/research_common.py77 except Exception:
LOWresearch/scripts/research_common.py89 except Exception:
LOWresearch/scripts/research_common.py98 except Exception:
LOWskills/heartbeat/SKILL.md84 except Exception as e:
MEDIUMskills/heartbeat/SKILL.md85 print(f"Error: {e}")
LOWservice/server/experiment_metrics.py164 except Exception:
LOWservice/server/experiment_metrics.py327 except Exception:
LOWservice/server/worker.py33 except Exception as exc:
LOWservice/server/worker.py67 except Exception:
LOWservice/server/worker.py71 except Exception:
LOWservice/server/worker.py85 except Exception:
LOWservice/server/worker.py110 except Exception:
LOWservice/server/routes_signals.py70 except Exception as exc:
LOWservice/server/routes_signals.py130 except Exception:
LOWservice/server/routes_signals.py225 except Exception:
LOWservice/server/routes_signals.py383 except Exception as exc:
LOWservice/server/routes_signals.py539 except Exception:
LOWservice/server/routes_signals.py542 except Exception:
LOWservice/server/routes_signals.py547 except Exception:
LOWservice/server/routes_signals.py551 except Exception:
LOWservice/server/routes_signals.py673 except Exception as exc:
LOWservice/server/routes_signals.py813 except Exception as exc:
LOWservice/server/routes_signals.py1201 except Exception:
LOWservice/server/routes_shared.py164 except Exception:
LOWservice/server/routes_shared.py682 except Exception as exc:
LOWservice/server/routes_shared.py311 except Exception:
LOWservice/server/routes_shared.py511 except Exception:
LOWservice/server/routes_shared.py781 except Exception:
LOWservice/server/experiment_notifications.py53 except Exception:
LOWservice/server/experiment_notifications.py63 except Exception:
LOWservice/server/experiment_notifications.py83 except Exception:
LOWservice/server/experiment_notifications.py569 except Exception as exc:
LOWservice/server/experiment_notifications.py677 except Exception as exc:
LOWservice/server/experiment_notifications.py711 except Exception:
LOWservice/server/services.py151 except Exception as e:
LOWservice/server/research_exports.py1158 except Exception:
LOWservice/server/tasks.py136 except Exception:
LOWservice/server/tasks.py42 except Exception:
LOWservice/server/tasks.py59 except Exception:
LOWservice/server/tasks.py78 except Exception:
LOWservice/server/tasks.py107 except Exception:
LOWservice/server/tasks.py118 except Exception:
LOWservice/server/tasks.py672 except Exception as e:
LOWservice/server/tasks.py695 except Exception as e:
LOWservice/server/tasks.py718 except Exception as e:
LOWservice/server/tasks.py741 except Exception as e:
LOWservice/server/tasks.py758 except Exception as e:
LOWservice/server/tasks.py920 except Exception as e:
LOWservice/server/tasks.py949 except Exception:
LOWservice/server/tasks.py1113 except Exception as e:
LOWservice/server/tasks.py1131 except Exception as e:
LOWservice/server/tasks.py1149 except Exception as e:
LOWservice/server/tasks.py1167 except Exception as e:
LOWservice/server/tasks.py1185 except Exception as e:
LOWservice/server/tasks.py1203 except Exception as e:
LOWservice/server/tasks.py1220 except Exception as e:
LOWservice/server/tasks.py441 except Exception as exc:
LOWservice/server/tasks.py644 except Exception as e:
LOWservice/server/tasks.py897 except Exception:
LOWservice/server/tasks.py1095 except Exception as e:
122 more matches not shown…
Cross-File Repetition14 hits · 70 pts
SeverityFileLineSnippet
HIGHservice/server/routes_signals.py0select follower_id from subscriptions where leader_id = ? and status = 'active'
HIGHservice/server/routes_shared.py0select follower_id from subscriptions where leader_id = ? and status = 'active'
HIGHservice/server/services.py0select follower_id from subscriptions where leader_id = ? and status = 'active'
HIGHservice/server/team_missions.py0insert into team_mission_participants (mission_id, agent_id, status, variant_key, joined_at) values (?, ?, 'joined', ?,
HIGHservice/server/team_missions.py0insert into team_mission_participants (mission_id, agent_id, status, variant_key, joined_at) values (?, ?, 'joined', ?,
HIGHservice/server/team_missions.py0insert into team_mission_participants (mission_id, agent_id, status, variant_key, joined_at) values (?, ?, 'joined', ?,
HIGHservice/server/tests/test_team_missions.py0insert into agents (name, token, role, points, cash, created_at, updated_at) values (?, ?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_admin_permissions.py0insert into agents (name, token, role, points, cash, created_at, updated_at) values (?, ?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_research_exports.py0insert into agents (name, token, role, points, cash, created_at, updated_at) values (?, ?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_routes_shared.py0insert into agents (name, token, points, cash, created_at, updated_at) values (?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_challenges.py0insert into agents (name, token, points, cash, created_at, updated_at) values (?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_experiment_assignments.py0insert into agents (name, token, points, cash, created_at, updated_at) values (?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_rewards.py0insert into agents (name, token, points, cash, created_at, updated_at) values (?, ?, 0, 100000.0, ?, ?)
HIGHservice/server/tests/test_experiment_events.py0insert into agents (name, token, points, cash, created_at, updated_at) values (?, ?, 0, 100000.0, ?, ?)
Unused Imports45 hits · 44 pts
SeverityFileLineSnippet
LOWresearch/scripts/build_network_edges.py3
LOWresearch/scripts/generate_figures.py3
LOWresearch/scripts/build_agent_features.py3
LOWresearch/scripts/compute_metrics.py3
LOWresearch/scripts/analyze_experiments.py3
LOWresearch/scripts/research_common.py3
LOWresearch/scripts/export_research_dataset.py3
LOWservice/server/experiment_metrics.py3
LOWservice/server/routes_signals.py4
LOWservice/server/routes_signals.py19
LOWservice/server/experiment_notifications.py3
LOWservice/server/services.py7
LOWservice/server/services.py11
LOWservice/server/research_exports.py3
LOWservice/server/team_missions.py3
LOWservice/server/routes_research.py3
LOWservice/server/database.py7
LOWservice/server/challenge_scoring.py3
LOWservice/server/cache.py7
LOWservice/server/experiment_events.py3
LOWservice/server/signal_quality.py3
LOWservice/server/routes_agent.py22
LOWservice/server/routes_experiments.py3
LOWservice/server/team_scoring.py3
LOWservice/server/experiments.py3
LOWservice/server/utils.py10
LOWservice/server/utils.py12
LOWservice/server/utils.py12
LOWservice/server/permissions.py3
LOWservice/server/rewards.py3
LOWservice/server/main.py14
LOWservice/server/routes_challenges.py3
LOWservice/server/routes_team_missions.py3
LOWservice/server/market_intel.py10
LOWservice/server/team_matching.py3
LOWservice/server/challenges.py3
LOWservice/server/tests/test_user_auth_security.py3
LOWservice/server/tests/test_user_auth_security.py4
LOWservice/server/scripts/migrate_sqlite_to_postgres.py9
LOWservice/server/scripts/cleanup_dirty_trade_data.py18
LOWservice/server/scripts/cleanup_dirty_trade_data.py23
LOWservice/server/scripts/repair_market_alias_positions.py11
LOWservice/server/scripts/repair_market_alias_positions.py17
LOW…rvice/server/scripts/send_read_conversion_reminders.py4
LOWservice/server/scripts/manage_leaderboard_exclusions.py15
Deep Nesting34 hits · 28 pts
SeverityFileLineSnippet
LOWservice/server/experiment_metrics.py171
LOWservice/server/routes_signals.py103
LOWservice/server/routes_signals.py105
LOWservice/server/routes_signals.py849
LOWservice/server/routes_shared.py251
LOWservice/server/routes_shared.py635
LOWservice/server/experiment_notifications.py621
LOWservice/server/services.py190
LOWservice/server/research_exports.py227
LOWservice/server/research_exports.py1164
LOWservice/server/tasks.py63
LOWservice/server/tasks.py239
LOWservice/server/tasks.py468
LOWservice/server/tasks.py928
LOWservice/server/team_missions.py1152
LOWservice/server/challenge_scoring.py51
LOWservice/server/routes_trading.py45
LOWservice/server/routes_trading.py56
LOWservice/server/routes_trading.py377
LOWservice/server/routes_agent.py78
LOWservice/server/routes_agent.py552
LOWservice/server/routes_experiments.py52
LOWservice/server/price_fetcher.py110
LOWservice/server/price_fetcher.py292
LOWservice/server/price_fetcher.py461
LOWservice/server/price_fetcher.py668
LOWservice/server/price_fetcher.py722
LOWservice/server/rewards.py19
LOWservice/server/market_intel.py473
LOWservice/server/market_intel.py731
LOWservice/server/market_intel.py802
LOWservice/server/market_intel.py823
LOWservice/server/scripts/migrate_sqlite_to_postgres.py132
LOWservice/server/scripts/cleanup_dirty_trade_data.py308
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippet
HIGHservice/server/scripts/fix_agent_profit.py6 cd service/server && python -c "
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWdocs/README_AGENT.md16 -d '{"name": "MyTradingBot", "email": "user@example.com"}'
LOWdocs/README_AGENT_ZH.md16 -d '{"name": "MyTradingBot", "email": "user@example.com"}'
AI Slop Vocabulary1 hit · 0 pts
SeverityFileLineSnippet
LOWservice/server/services.py360 # For now, we just return the count