Commit 5a4278e
fix(graph): populate Calls_* / Imports_* rel tables via AP resolve pass
The workflow-graph viz filter for ``calls`` and ``imports`` showed zero
nodes because Cortex's auto-indexer only invoked AP's ``index_codebase``
tool, which persists Defines_* / HasMethod_* / HasField_* but NEVER
Calls_* / Imports_* / Extends_* / Implements_*. Those require AP's
separate ``resolve_graph`` pass.
Changes
1. ``http_standalone.py::_bg_index`` — switched ``b.index_codebase(...)``
to ``b.analyze_codebase(...)`` (AP's all-in-one: index + resolve +
cluster). New project graphs now land fully populated.
2. ``http_standalone.py::_bg_index`` — for EXISTING graphs (already
indexed pre-Gap-10 with only ``index_codebase``), run the idempotent
``resolve_graph`` tool as a backfill so every project's Calls_* /
Imports_* / Implements_* rel tables get populated retroactively,
without paying the cost of a full re-parse.
3. ``http_launcher.py::_index`` — same switch from ``index_codebase``
to ``analyze_codebase`` for the launcher-side indexer (kicked off
when the user opens the viz from a project with no prior graph).
Debugging path required two upstream fixes that are NOT in this commit
but are prerequisites for the fix to render end-to-end:
* AP (sibling repo ``automatised-pipeline``): the resolver crashed on
the first unknown rel-table pair (e.g. ``Calls_Method_Struct``) via
a ``?`` in ``EdgeBuffer::flush`` — one unknown name aborted the
whole flush and dropped every resolved edge. Patched locally to
skip-with-warning; AP rebuilt from source.
* Cortex's AST disk cache at ``~/.claude/methodology/ast_cache/``
serialised per-project edges BEFORE the resolver ran and its
``_graph_signature`` didn't detect LadybugDB internal file changes.
Purging the 25 cache files + an HTTP respawn is needed once after
the AP fix lands.
Verified live: bulk ``resolve_graph`` across all 25 project graphs
yielded 50,160 calls + 937 imports + 6,492 implements. After cache
purge and HTTP respawn, the ``calls — symbol ↔ symbol`` and
``imports — file ↔ symbol`` filters populate as the phase-builder
streams L6 per-project batches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e6e8496 commit 5a4278e
2 files changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
333 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
334 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
335 | 345 | | |
336 | 346 | | |
337 | 347 | | |
338 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
339 | 354 | | |
340 | 355 | | |
341 | 356 | | |
| |||
0 commit comments