Skip to content

Silent index degradation — status:"indexed" but only ~500 nodes for 72k LOC Rust codebase #333

@nguiaSoren

Description

@nguiaSoren

Title: Silent index degradation — status:"indexed" but only ~500 nodes for 72k LOC Rust codebase

Version: codebase-memory-mcp 0.6.0
Platform: macOS (Apple Silicon)
Project size: 72k LOC, 9 Rust files (single Cargo project)

Symptom

index_repository(mode="full") returns status:"indexed" but produces only ~500 nodes and ~500 edges for a 72k LOC Rust codebase. Expected ~5,000–10,000+ symbol nodes based on comparable smaller projects.

The status:"ready" / status:"indexed" response is misleading — the rebuild silently fails on something but reports success.

Reproduction

  1. Kill any existing codebase-memory-mcp processes:
    ps aux | grep codebase-memory then kill <PID>
  2. Delete cached index:
    rm ~/.local/share/codebase-memory-mcp/Users-soren-Desktop-new_simulator.db
  3. Verify directory is empty of project cache
  4. Restart Claude Code (spawns fresh MCP server process)
  5. In Claude Code: index_repository(mode="full")
  6. Run index_status — shows ~500 nodes / ~500 edges, status:"indexed"

Multiple fresh rebuilds produce the same low node count (469/462, 540/531, 572/555 across attempts).

Comparison with healthy project

Same machine, same MCP server binary:

  • X project (~6k LOC): 6,436 nodes / 10,308 edges, 14 MB .db file ✓ healthy
  • Y project (72k LOC): ~500 nodes / ~500 edges, 2 MB .db file ✗ degraded

The 2 MB file size is suspiciously exactly 2 × 1024 × 1024 bytes — suggests the database is being truncated or capped at a fixed boundary.

Known-symbol verification

search_graph(name_pattern="apply_knight_hero_effects") returns 0 results.

This function exists at src/hero_system.rs (verified via grep). Should be indexed as a function symbol but is missing from the graph.

Workaround

Direct file reads + grep work fine. The bug appears specific to the graph-based query path (search_graph, trace_path).

Diagnostic information requested

Happy to provide:

  • Sample file from the codebase that may be triggering the issue (if I can isolate which file)
  • Full index_repository output
  • Any debug logging the indexer emits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions