Skip to content

fix(semantic-query): symbols table never populated — index_size always 0 #188

Description

@Wolfvin

Root Cause (verified)

semantic_search_engine.py reads from the symbols table:
SELECT COUNT() FROM symbols → 0 (always empty after scan)
SELECT COUNT(
) FROM graph_nodes → 652 (data lives here)

scan populates graph_nodes/graph_edges but nothing populates symbols.
semantic-query reads the wrong table → index_size: 0, returned: 0 on every query.

Fix (Option A — recommended)

Change _load_symbols_from_db in semantic_search_engine.py to read from graph_nodes:
node_id → id, name → name, file → file_path, node_type → kind, line → line_start

No schema change needed.

Definition of Done

  • semantic-query "google auth session flow" returns index_size > 0 and returned > 0 on a scanned workspace
  • Results ranked by TF-IDF relevance
  • index_size ≈ number of functions/classes in workspace

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug-fixRegression or broken behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions