Part of #82. Depends on #83.
Summary
Extend the tree-sitter indexing walk to emit typed call and import edges with enclosing-symbol attribution for Python, and write them through the existing per-file lifecycle.
Scope
- Extend
indexer/languages.py with a per-language edge node map alongside SYMBOL_KINDS (same single-source-of-truth architecture); Python first: call (rightmost identifier of the callee) and import_statement/import_from_statement.
- Extend the walk in
indexer/symbols.py (or a sibling edges extractor sharing the walk) to emit edges in the same pass, tracking the enclosing definition node on the traversal path — no second walk, no join at write time.
- Write edges in
indexer/store.py with the same delete-and-reinsert-per-file pattern as symbols, inside the existing transaction (pure DML); ensure branch sweep/orphan cleanup covers edge rows via FK cascade.
- Bump
INDEX_SEMANTICS_VERSION so the CAS skip logic forces re-extraction.
- Unit fixtures mirroring
tests/unit/test_symbols.py: nested calls, method vs bare calls, aliased imports, edge line numbers (1-based).
Acceptance criteria
Part of #82. Depends on #83.
Summary
Extend the tree-sitter indexing walk to emit typed
callandimportedges with enclosing-symbol attribution for Python, and write them through the existing per-file lifecycle.Scope
indexer/languages.pywith a per-language edge node map alongsideSYMBOL_KINDS(same single-source-of-truth architecture); Python first:call(rightmost identifier of the callee) andimport_statement/import_from_statement.indexer/symbols.py(or a siblingedgesextractor sharing the walk) to emit edges in the same pass, tracking the enclosing definition node on the traversal path — no second walk, no join at write time.indexer/store.pywith the same delete-and-reinsert-per-file pattern as symbols, inside the existing transaction (pure DML); ensure branch sweep/orphan cleanup covers edge rows via FK cascade.INDEX_SEMANTICS_VERSIONso the CAS skip logic forces re-extraction.tests/unit/test_symbols.py: nested calls, method vs bare calls, aliased imports, edge line numbers (1-based).Acceptance criteria
INDEX_SEMANTICS_VERSIONbump.