aft_callgraph while the store is building: report progress, allow a bounded wait, or return marked lexical candidates
Problem
While the call-graph store is building, every aft_callgraph op returns at once:
callers: callgraph_building — callers: callgraph store is building in the background; retry shortly
data: {"index":{"callgraph":{"status":"building","reason":null}},"results":null}
The reply has no progress and no estimate. The agent can't tell whether "shortly" means seconds or ten minutes. On a large repository we got this answer twice, about four minutes apart, for the same query. So agents either loop on the call (wasting turns), or give up and grep without saying the result is unverified. Checked on main (396d0bff8): no bounded wait and no fallback.
Proposal
Any one of these would help; together they would remove the dead end:
- Progress in the reply: files done / total, or elapsed time, so the agent can decide whether to wait.
- A bounded wait: an optional
wait_ms(capped by config) that blocks until the store is ready or the wait expires, then answers or reportsbuildingwith progress. - A marked fallback: for
callersandimpact, return the lexical candidates (files that reference the name), clearly labelledunverified: lexical candidates while the call graph builds, withcomplete: false.
Option 3 must never present lexical candidates as the call-graph answer.
In v0.64.0, call-graph commands use the new index store and wait up to 30 seconds for a regular checkout's graph to become current before returning building. This implements the bounded-wait alternative in this issue; it does not add lexical answers or progress counters. Parent-folder queries can still report a child whose first graph is loading. Please reopen if a regular checkout still returns immediately throughout a build on v0.64.0.