Symptom
detect_changes_tool runs for 1779s+ in GitHub Actions, ending with:
MCP error -32000: Connection closed
STDIO connection closed after 1794s (cleanly)
Environment
- Repo: 109,189 nodes, 1,312,887 edges
- Languages: Java, Scala, Python, JavaScript, Bash
- Call site: Claude CLI in GitHub Actions (no step timeout set)
- Version: 2.3.3 (latest release)
Root Cause
detect_changes_tool calls analyze_changes(), which calls compute_risk_score() for every changed function in the PR. compute_risk_score() calls get_transitive_tests() on each function. get_transitive_tests() does a BFS that follows all CALLS edges with no cap on frontier size.
Query explosion:
- Large PR → N changed functions (no upper bound)
- Per function:
get_transitive_tests() fetches all CALLS edges from that function → M callees
- Per callee: one
TESTED_BY SQL query
- Total queries: N × M (e.g., 1000 functions × 100 callees = 100,000 queries)
On a 1.3M-edge graph with hub functions common in Java/Scala, M can easily exceed 100.
Symptom
detect_changes_toolruns for 1779s+ in GitHub Actions, ending with:Environment
Root Cause
detect_changes_toolcallsanalyze_changes(), which callscompute_risk_score()for every changed function in the PR.compute_risk_score()callsget_transitive_tests()on each function.get_transitive_tests()does a BFS that follows allCALLSedges with no cap on frontier size.Query explosion:
get_transitive_tests()fetches allCALLSedges from that function → M calleesTESTED_BYSQL queryOn a 1.3M-edge graph with hub functions common in Java/Scala, M can easily exceed 100.