Files
2026-05-30 14:03:11 +08:00

12 KiB
Raw Permalink Blame History

Graph Report - backend (2026-05-30)

Corpus Check

  • 66 files · ~33,843 words
  • Verdict: corpus is large enough that graph structure adds value.

Summary

  • 969 nodes · 3028 edges · 34 communities (33 shown, 1 thin omitted)
  • Extraction: 84% EXTRACTED · 16% INFERRED · 0% AMBIGUOUS · INFERRED: 499 edges (avg confidence: 0.5)
  • Token cost: 0 input · 0 output

Graph Freshness

  • Built from commit: 69ee0f50
  • Run git rev-parse HEAD and compare to check if the graph is stale.
  • Run graphify update . after code changes (no API cost).

Community Hubs (Navigation)

God Nodes (most connected - your core abstractions)

  1. success_response() - 88 edges
  2. SysUser - 86 edges
  3. BaseModel - 71 edges
  4. error_response() - 63 edges
  5. Session - 57 edges
  6. SysDept - 48 edges
  7. SysRole - 44 edges
  8. SysDictData - 44 edges
  9. str - 44 edges
  10. generate_uuid() - 40 edges

Surprising Connections (you probably didn't know these)

  • bool --uses--> SysUser [INFERRED] app/crud/sample_code.py → app/models/models.py
  • Any --uses--> SysApiRequestLog [INFERRED] app/core/api_request_log_middleware.py → app/models/models.py
  • bytes --uses--> SysApiRequestLog [INFERRED] app/core/api_request_log_middleware.py → app/models/models.py
  • bool --uses--> SysApiRequestLog [INFERRED] app/core/api_request_log_middleware.py → app/models/models.py
  • ApiRequestLogMiddleware --uses--> SysApiRequestLog [INFERRED] app/core/api_request_log_middleware.py → app/models/models.py

Communities (34 total, 1 thin omitted)

Community 0 - "Community 0"

Cohesion: 0.07 Nodes (102): approve_task(), _business_type_label(), create_process_def(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields(), get_designer_data() (+94 more)

Community 1 - "Community 1"

Cohesion: 0.10 Nodes (92): attachment_download_url(), AttachmentDownloadUrlBody, create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_post(), create_role_management() (+84 more)

Community 2 - "Community 2"

Cohesion: 0.06 Nodes (71): _avatar_url_field(), _build_user_info_payload(), get_current_user_profile(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/shanxia2.0.sql 基线), 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。 (+63 more)

Community 3 - "Community 3"

Cohesion: 0.06 Nodes (52): Exception, str, Config, format_api_error_message(), PageResult, 将 HTTP/SQLAlchemy 等异常转为可展示的错误文案(避免 str([]) 空列表)。, ResponseModel, BaseModel (+44 more)

Community 4 - "Community 4"

Cohesion: 0.08 Nodes (41): Any, bool, bytes, int, Request, str, datetime, int (+33 more)

Community 5 - "Community 5"

Cohesion: 0.07 Nodes (45): Any, Request, str, bool, int, Redis, Request, str (+37 more)

Community 6 - "Community 6"

Cohesion: 0.10 Nodes (49): Session, str, Any, int, Session, str, Any, bool (+41 more)

Community 7 - "Community 7"

Cohesion: 0.09 Nodes (18): bool, bytes, int, str, BaseStorage, convert_heic_to_jpeg(), get_storage(), LocalStorage (+10 more)

Community 8 - "Community 8"

Cohesion: 0.13 Nodes (15): Any, bool, int, str, get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.html, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total_amo (+7 more)

Community 9 - "Community 9"

Cohesion: 0.20 Nodes (30): Any, bool, int, Session, str, SysUser, create_user(), get_user() (+22 more)

Community 10 - "Community 10"

Cohesion: 0.21 Nodes (16): Any, int, str, BusinessException, InvalidStatusTransitionException, log_api_request(), log_delivery_operation(), log_operation() (+8 more)

Community 11 - "Community 11"

Cohesion: 0.19 Nodes (20): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), submit_leave() (+12 more)

Community 12 - "Community 12"

Cohesion: 0.26 Nodes (22): Any, bool, datetime, int, Session, str, BizSampleCode, batch_generate_sample_codes() (+14 more)

Community 13 - "Community 13"

Cohesion: 0.16 Nodes (12): int, str, 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import WechatMes, 发送订单状态通知 Args: openid: 用户openid order_n, 发送支付成功通知 Args: openid: 用户openid order_n, 发送配送通知 Args: openid: 配送员openid task_no:, 发送配送时效预警 Args: openid: 配送员openid task_n, 发送退款结果通知 Args: openid: 用户openid order_n (+4 more)

Community 14 - "Community 14"

Cohesion: 0.37 Nodes (17): check_env(), check_python(), create_venv(), init_env(), install_dependencies(), log_error(), log_info(), log_success() (+9 more)

Community 15 - "Community 15"

Cohesion: 0.35 Nodes (17): Any, bool, int, Session, str, _build_tree(), _cascade_soft_delete(), create_menu() (+9 more)

Community 16 - "Community 16"

Cohesion: 0.34 Nodes (16): Any, int, Session, str, _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept() (+8 more)

Community 17 - "Community 17"

Cohesion: 0.34 Nodes (16): Any, bool, int, Session, str, create_dict_type(), dict_type_code_exists(), get_dict_type() (+8 more)

Community 18 - "Community 18"

Cohesion: 0.34 Nodes (16): Any, bool, int, Session, str, create_tenant(), get_tenant(), list_tenants() (+8 more)

Community 19 - "Community 19"

Cohesion: 0.33 Nodes (15): Any, int, Session, str, BizLeaveRequest, create_leave(), get_leave(), list_leaves() (+7 more)

Community 20 - "Community 20"

Cohesion: 0.38 Nodes (15): Any, bool, int, Session, str, create_post(), get_post(), list_posts() (+7 more)

Community 21 - "Community 21"

Cohesion: 0.38 Nodes (15): Any, bool, int, Session, str, create_site(), get_site(), list_sites() (+7 more)

Community 22 - "Community 22"

Cohesion: 0.27 Nodes (14): Any, bool, bytes, int, str, ApiCryptoError, _b64url_decode(), _b64url_encode() (+6 more)

Community 23 - "Community 23"

Cohesion: 0.40 Nodes (13): check_python(), ensure_dirs(), ensure_venv_and_runtime(), is_running(), log_error(), log_info(), log_warn(), show_help() (+5 more)

Community 24 - "Community 24"

Cohesion: 0.27 Nodes (11): Any, bool, str, decrypt_login_payload(), ensure_initialized(), extract_login_credentials(), get_public_pem(), 登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。 (+3 more)

Community 25 - "Community 25"

Cohesion: 0.29 Nodes (10): datetime, int, Session, str, BizNoKind, allocate_next_biz_no(), _format_biz_no(), _prefix_for() (+2 more)

Community 26 - "Community 26"

Cohesion: 0.18 Nodes (10): 1. 创建虚拟环境, 2. 安装依赖, 3. 配置环境变量, 4. 启动服务, API 路由分组, shanxia2.0 后端骨架(FastAPI), 开发规范, 快速开始 (+2 more)

Community 27 - "Community 27"

Cohesion: 0.33 Nodes (10): Any, int, Session, str, list_ethnics(), 民族码表 CRUD(全局 sys_ethnic), _row_to_dict(), 民族码表 sys_ethnic(国标 GB/T 3304,全局) (+2 more)

Community 28 - "Community 28"

Cohesion: 0.33 Nodes (8): str, derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。, ThreeStatus, _to_decimal(), Decimal

Community 29 - "Community 29"

Cohesion: 0.32 Nodes (7): str, eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci()

Community 30 - "Community 30"

Cohesion: 0.40 Nodes (3): BaseSettings, Config, Settings

Knowledge Gaps

  • 33 isolated node(s): Request, bool, bool, Config, bool (+28 more) These have ≤1 connection - possible missing edges or undocumented components.
  • 1 thin communities (<3 nodes) omitted from report — run graphify query to explore isolated nodes.

Suggested Questions

Questions this graph is uniquely positioned to answer:

  • Why does generate_uuid() connect Community 6 to Community 0, Community 2, Community 4, Community 9, Community 12, Community 15, Community 16, Community 17, Community 18, Community 19, Community 20, Community 21, Community 25? High betweenness centrality (0.135) - this node is a cross-community bridge.
  • Why does SysUser connect Community 0 to Community 1, Community 2, Community 6, Community 9, Community 12? High betweenness centrality (0.133) - this node is a cross-community bridge.
  • Why does BaseModel connect Community 3 to Community 0, Community 1, Community 11? High betweenness centrality (0.085) - this node is a cross-community bridge.
  • Are the 74 inferred relationships involving SysUser (e.g. with AttachmentDownloadUrlBody and DeptCreateBody) actually correct? SysUser has 74 INFERRED edges - model-reasoned connections that need verification.
  • Are the 5 inferred relationships involving Session (e.g. with BizAttachment and SysDept) actually correct? Session has 5 INFERRED edges - model-reasoned connections that need verification.
  • What connects 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin, Request to the rest of the system? 136 weakly-connected nodes found - possible documentation gaps or missing edges.
  • Should Community 0 be split into smaller, more focused modules? Cohesion score 0.06983471074380165 - nodes in this community are weakly interconnected.