Files
Colby McHenry 50401a6deb perf(mcp): shape codegraph_explore to the agent's native-read unit (inline-cap, concentrated flow-windows)
The n=4 README A/B showed explore had re-inflated to 35–42K on big repos —
which (a) the host externalizes to a file the agent Reads back, (b) costs
cache-writes (cost went WITH-more-expensive on vscode/okhttp/gin), and (c)
spreads thin across 12 files, dropping the agent-named flow methods. Ground
truth from the WITHOUT arm: the agent natively reads ~6–9 files as ~100-line
windows (median 100, 51–250 dominant), located by signature greps. Shape
explore to match:

- Cap every tier's output at the ~24K inline ceiling (was 28/35/38K) with a
  25K absolute hard-stop — a bigger single response just externalizes. Repo
  size now scales the CALL budget (getExploreBudget), not the response size.
- One ~150–250 line WINDOW per file: per-symbol bodyCap 2x->1.5x and the spine
  is windowed too (a big-spine god-file like tokio worker.rs no longer eats the
  whole response and starves the co-flow file harness.rs); central whole-file
  4x->1.5x / 400->280 lines. Concentration onto the flow then emerges from the
  cap + the named-file-first sort dropping peripheral files.
- Explore's named-symbol injection now enumerates overloads via the direct name
  index (getNodesByName), not FTS — so a 50+-overload name (tokio `poll`)
  surfaces the wanted def (`Harness::poll`) for the type-token bias to pick,
  same fix already applied to codegraph_node.

Probe-validated: vscode explore 35K->16K; tokio now returns worker.rs +
harness.rs(poll) + mod.rs windows in 24.5K (harness.rs was dropped before);
all 7 README repos <=~25K. Full suite green (1112). Agent A/B re-bench pending.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 06:45:40 -05:00
..
2026-01-18 16:25:00 -06:00