Skip to content

fix: wire cbm_store_get_architecture into handle_get_architecture MCP handler#1

Merged
OliverEvans96 merged 2 commits into
mainfrom
copilot/update-dependency-versions
Apr 21, 2026
Merged

fix: wire cbm_store_get_architecture into handle_get_architecture MCP handler#1
OliverEvans96 merged 2 commits into
mainfrom
copilot/update-dependency-versions

Conversation

Copilot AI commented Apr 21, 2026

Copy link
Copy Markdown

get_architecture only ever returned label/type histograms (node_labels, edge_types, relationship_patterns) because handle_get_architecture never called cbm_store_get_architecture — the rich architecture computation layer was completely bypassed regardless of which aspects were requested.

Changes

  • Extract aspects for store dispatch — parse the JSON aspects array into a const char*[] and pass it to cbm_store_get_architecture, which already handles "all" and per-name filtering internally
  • Serialize all populated architecture sections — after calling the store, emit each non-empty field from cbm_architecture_info_t:
    • languages (language, file_count)
    • packages (name, node_count, fan_in, fan_out)
    • entry_points (name, qualified_name, file)
    • routes (method, path, handler)
    • hotspots (name, qualified_name, fan_in)
    • boundaries (from, to, call_count)
    • layers (name, layer, reason)
    • file_tree (path, type, children)
  • Preserve existing histogram fieldsnode_labels, edge_types, relationship_patterns, and cross_repo_links are unchanged
  • Proper cleanupcbm_store_architecture_free called before return

Copilot AI requested a review from OliverEvans96 April 21, 2026 20:13
@OliverEvans96
OliverEvans96 marked this pull request as ready for review April 21, 2026 20:16
@OliverEvans96
OliverEvans96 merged commit 60a2452 into main Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants