Discovered during #8 verification
PR #24 (graph data model) populates graph_nodes + graph_edges only during full scan. Incremental scan (scan --incremental) skips graph population entirely, so the graph tables become stale after incremental scans.
Reproduction
codelens scan /workspace # graph: {nodes: N, edges: M} populated
codelens scan /workspace --incremental # graph field absent, tables NOT updated
# trace --use-graph now returns stale data
Expected
Incremental scan should update graph tables for changed files only:
- Detect changed files (existing incremental logic)
- Delete graph_nodes + graph_edges where
file IN (changed_files)
- Re-parse changed files, INSERT new nodes + edges
- This keeps graph in sync without full re-population
Workaround (current)
Run codelens scan (full) after incremental scans to refresh graph. Or use trace --no-graph to force flat backend.
Priority
Medium — not blocking Phase 1 (full scan works), but agents using --incremental (the recommended post-edit workflow) will have stale graph data. Should be fixed before Phase 1 is declared done.
Related
Discovered during #8 verification
PR #24 (graph data model) populates
graph_nodes+graph_edgesonly during full scan. Incremental scan (scan --incremental) skips graph population entirely, so the graph tables become stale after incremental scans.Reproduction
Expected
Incremental scan should update graph tables for changed files only:
file IN (changed_files)Workaround (current)
Run
codelens scan(full) after incremental scans to refresh graph. Or usetrace --no-graphto force flat backend.Priority
Medium — not blocking Phase 1 (full scan works), but agents using
--incremental(the recommended post-edit workflow) will have stale graph data. Should be fixed before Phase 1 is declared done.Related