Skip to content

aft_callgraph while the store is building: report progress, allow a bounded wait, or return marked lexical candidates #606

Open

Description

@iceteaSA

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 (396d0bf): no bounded wait and no fallback.

Proposal

Any one of these would help; together they would remove the dead end:

  1. Progress in the reply: files done / total, or elapsed time, so the agent can decide whether to wait.
  2. A bounded wait: an optional wait_ms (capped by config) that blocks until the store is ready or the wait expires, then answers or reports building with progress.
  3. A marked fallback: for callers and impact, return the lexical candidates (files that reference the name), clearly labelled unverified: lexical candidates while the call graph builds, with complete: false.

Option 3 must never present lexical candidates as the call-graph answer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions