GRAPH_REPORT.md 9.7 KB

Graph Report - py-backend (2026-05-04)

Corpus Check

  • 45 files · ~41,068 words
  • Verdict: corpus is large enough that graph structure adds value.

Summary

  • 688 nodes · 2455 edges · 22 communities detected
  • Extraction: 46% EXTRACTED · 54% INFERRED · 0% AMBIGUOUS · INFERRED: 1319 edges (avg confidence: 0.65)
  • Token cost: 0 input · 0 output

Community Hubs (Navigation)

  • [[_COMMUNITY_Community 0|Community 0]]
  • [[_COMMUNITY_Community 1|Community 1]]
  • [[_COMMUNITY_Community 2|Community 2]]
  • [[_COMMUNITY_Community 3|Community 3]]
  • [[_COMMUNITY_Community 4|Community 4]]
  • [[_COMMUNITY_Community 5|Community 5]]
  • [[_COMMUNITY_Community 6|Community 6]]
  • [[_COMMUNITY_Community 7|Community 7]]
  • [[_COMMUNITY_Community 8|Community 8]]
  • [[_COMMUNITY_Community 9|Community 9]]
  • [[_COMMUNITY_Community 10|Community 10]]
  • [[_COMMUNITY_Community 11|Community 11]]
  • [[_COMMUNITY_Community 12|Community 12]]
  • [[_COMMUNITY_Community 13|Community 13]]
  • [[_COMMUNITY_Community 14|Community 14]]
  • [[_COMMUNITY_Community 15|Community 15]]
  • [[_COMMUNITY_Community 16|Community 16]]
  • [[_COMMUNITY_Community 17|Community 17]]
  • [[_COMMUNITY_Community 18|Community 18]]
  • [[_COMMUNITY_Community 19|Community 19]]
  • [[_COMMUNITY_Community 20|Community 20]]
  • [[_COMMUNITY_Community 21|Community 21]]

God Nodes (most connected - your core abstractions)

  1. ok() - 259 edges
  2. fail() - 144 edges
  3. SysUser - 66 edges
  4. CrmCustomer - 57 edges
  5. next_id() - 55 edges
  6. Base - 53 edges
  7. build() - 50 edges
  8. offset() - 50 edges
  9. limit() - 50 edges
  10. CrmCustomerPool - 40 edges

Surprising Connections (you probably didn't know these)

  • tenant_list() --calls--> ok() [INFERRED] app/routers/auth.py → app/schemas/init.py
  • dept_list() --calls--> ok() [INFERRED] app/routers/system.py → app/schemas/init.py
  • upload_file() --calls--> fail() [INFERRED] app/routers/system.py → app/schemas/init.py
  • list_oss_by_ids() --calls--> ok() [INFERRED] app/routers/system.py → app/schemas/init.py
  • visit_statistics_overview() --calls--> ok() [INFERRED] app/routers/crm/visit.py → app/schemas/init.py

Communities

Community 0 - "Community 0"

Cohesion: 0.05 Nodes (99): add_contact(), _contact_to_dict(), delete_contacts(), _fill_create_fields(), _fill_update_fields(), get_contact(), list_birthday_contacts(), list_by_customer() (+91 more)

Community 1 - "Community 1"

Cohesion: 0.11 Nodes (63): add_attachment(), add_category(), add_price(), add_product(), add_tag(), adjust_price(), _attachment_to_dict(), AttachmentForm (+55 more)

Community 2 - "Community 2"

Cohesion: 0.09 Nodes (53): add_follow(), add_opportunity(), add_product(), assign_opportunities(), AssignForm, batch_add_products(), batch_update_expect_date(), batch_update_stage() (+45 more)

Community 3 - "Community 3"

Cohesion: 0.09 Nodes (57): add_change(), add_contract(), add_product(), add_template(), _apply_change_to_contract(), _approval_to_dict(), approve_approval(), approve_change() (+49 more)

Community 4 - "Community 4"

Cohesion: 0.06 Nodes (46): Base, Base, BaseModel, DeclarativeBase, create_access_token(), decode_access_token(), get_current_user(), get_optional_user() (+38 more)

Community 5 - "Community 5"

Cohesion: 0.15 Nodes (52): get_db(), auto_recycle_customers(), check_overdue_payment_plans(), check_protect_period_expired(), _get_tenant_ids(), Auto-recycle long-unfollowed customers to pool. Runs daily at 2am., Warn about customers approaching auto-recycle. Runs daily at 8am., Get all active tenant IDs. (+44 more)

Community 6 - "Community 6"

Cohesion: 0.11 Nodes (55): _clue_to_dict(), list_clues(), list_follows(), list_my_clues(), list_to_follow(), list_contacts(), list_approvals_paginated(), list_contracts() (+47 more)

Community 7 - "Community 7"

Cohesion: 0.11 Nodes (41): add_product(), add_quote(), _approval_to_dict(), ApprovalForm, approve_quote(), approve_via_approval(), convert_to_contract(), copy_quote() (+33 more)

Community 8 - "Community 8"

Cohesion: 0.11 Nodes (33): add_clue(), add_follow(), assign_clues(), AssignForm, check_convert(), ClueForm, ClueQuery, convert_clue() (+25 more)

Community 9 - "Community 9"

Cohesion: 0.12 Nodes (33): add_info(), add_invoice(), approve_invoice(), batch_add_items(), BatchItemForm, delete_infos(), delete_invoices(), _fill_create_fields() (+25 more)

Community 10 - "Community 10"

Cohesion: 0.15 Nodes (30): add_plan(), add_problem(), add_visit(), CancelForm, CloseForm, _d(), _dt(), _fill_create_fields() (+22 more)

Community 11 - "Community 11"

Cohesion: 0.14 Nodes (29): add_collection(), add_payment(), add_plan(), _collection_to_dict(), CollectionForm, CollectionQuery, delete_collections(), delete_payments() (+21 more)

Community 12 - "Community 12"

Cohesion: 0.21 Nodes (13): add_supplier(), delete_suppliers(), _fill_create_fields(), _fill_update_fields(), get_supplier(), list_all_suppliers(), StatusForm, _supplier_to_dict() (+5 more)

Community 13 - "Community 13"

Cohesion: 0.24 Nodes (8): create_app(), DecryptMiddleware, start_scheduler(), BaseHTTPMiddleware, decrypt_aes_ecb(), decrypt_rsa(), _get_private_key(), try_decrypt_request()

Community 14 - "Community 14"

Cohesion: 0.22 Nodes (1): Comprehensive E2E: all CRM pages, all functions.

Community 15 - "Community 15"

Cohesion: 0.4 Nodes (3): get_settings(), Settings, BaseSettings

Community 16 - "Community 16"

Cohesion: 0.67 Nodes (1): Debug: Capture exact login request and response.

Community 17 - "Community 17"

Cohesion: 0.67 Nodes (1): Debug login - capture network requests.

Community 18 - "Community 18"

Cohesion: 0.67 Nodes (1): E2E test: Login → navigate all CRM pages via sidebar → screenshot each page. Ver

Community 19 - "Community 19"

Cohesion: 1.0 Nodes (1): Debug: Investigate why post-login navigation fails.

Community 20 - "Community 20"

Cohesion: 1.0 Nodes (1): Reconnaissance: Login page investigation.

Community 21 - "Community 21"

Cohesion: 1.0 Nodes (1): Debug login flow with console log capture.

Knowledge Gaps

  • 7 isolated node(s): Debug: Investigate why post-login navigation fails., Debug: Capture exact login request and response., Reconnaissance: Login page investigation., Debug login flow with console log capture., Debug login - capture network requests. (+2 more) These have ≤1 connection - possible missing edges or undocumented components.
  • Thin community Community 14 (9 nodes): force_close_dialogs(), has_error(), has_table(), nav_to(), e2e_full.py, Comprehensive E2E: all CRM pages, all functions., record(), row_count(), ss() Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 16 (3 nodes): on_response(), debug_login3.py, Debug: Capture exact login request and response. Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 17 (3 nodes): on_response(), debug_login2.py, Debug login - capture network requests. Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 18 (3 nodes): e2e_crm.py, E2E test: Login → navigate all CRM pages via sidebar → screenshot each page. Ver, screenshot_name() Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 19 (2 nodes): debug_nav.py, Debug: Investigate why post-login navigation fails. Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 20 (2 nodes): recon_login.py, Reconnaissance: Login page investigation. Too small to be a meaningful cluster - may be noise or needs more connections extracted.
  • Thin community Community 21 (2 nodes): debug_login.py, Debug login flow with console log capture. Too small to be a meaningful cluster - may be noise or needs more connections extracted.

Suggested Questions

Questions this graph is uniquely positioned to answer:

  • Why does ok() connect Community 0 to Community 1, Community 2, Community 3, Community 4, Community 7, Community 8, Community 9, Community 10, Community 11, Community 12? High betweenness centrality (0.412) - this node is a cross-community bridge.
  • Why does fail() connect Community 0 to Community 1, Community 2, Community 3, Community 4, Community 7, Community 8, Community 9, Community 10, Community 11, Community 12? High betweenness centrality (0.093) - this node is a cross-community bridge.
  • Why does Base connect Community 4 to Community 1, Community 2, Community 3, Community 5, Community 7, Community 8, Community 9, Community 10, Community 11, Community 12? High betweenness centrality (0.051) - this node is a cross-community bridge.
  • Are the 258 inferred relationships involving ok() (e.g. with login() and logout()) actually correct? ok() has 258 INFERRED edges - model-reasoned connections that need verification.
  • Are the 143 inferred relationships involving fail() (e.g. with login() and get_user_info()) actually correct? fail() has 143 INFERRED edges - model-reasoned connections that need verification.
  • Are the 64 inferred relationships involving SysUser (e.g. with LoginBody and LoginVo) actually correct? SysUser has 64 INFERRED edges - model-reasoned connections that need verification.
  • Are the 55 inferred relationships involving CrmCustomer (e.g. with Get all active tenant IDs. and Check customers whose protect period has expired. Runs daily at 1am.) actually correct? CrmCustomer has 55 INFERRED edges - model-reasoned connections that need verification.