Skip to content

fast mode silently excludes scripts/ — first-class Python source dropped from graph (built-in skip list?) #1406

Description

@Limebird01

Version

codebase-memory-mcp 0.9.0

Platform

Linux (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard (portable static build, linux-amd64)

What happened, and what did you expect?

index_repository --mode fast silently excluded the entire scripts/ directory of a mid-size Python repo. Only 46 of 156 .py files were indexed, and scripts appeared in the excluded.dirs list of the index output. Re-indexing the same repo with --mode full captured everything (5,286 nodes / 17,328 edges, 6.0 s, ~232 MB max RSS).

No .gitignore or .cbmignore pattern matches scripts/. In this repo (as in many Python projects) scripts/ holds first-class production entry-point modules — it is a common Python layout, not a bin of throwaway files.

Expected: fast mode should reduce analysis depth (cheaper resolution strategies, fewer passes), not silently drop first-class source directories from the graph — or at minimum it should emit a visible warning that a top-level source dir was skipped by a built-in heuristic.

This looks like the same silent-exclusion family as #1184 (built-in skip list drops deploy/deployment(s) dirs, mode full, not overridable via .cbmignore) and #411 (closed; moderate mode silently drops subtrees), and #1219 (default assets exclusion swallows API route files) — but none of those covers scripts/ in fast mode specifically. Note the docs state the built-in skip list is not user-overridable, so there is currently no workaround other than switching to --mode full.

Reproduction

  1. Code: any generic Python repo with a top-level scripts/ directory containing real importable modules, e.g.:

    repo/
      src/pkg/core.py
      scripts/deploy_tool/main.py   # first-class entry points, plain .py modules
      scripts/reporting/report.py
    
  2. Commands:

    codebase-memory-mcp cli index_repository --repo-path /path/to/repo --mode fast --persistence false
    codebase-memory-mcp cli index_repository --repo-path /path/to/repo --mode full --persistence false
    
  3. Result: fast-mode output lists scripts under excluded.dirs; indexed file count drops to 46/156 .py; every symbol under scripts/ is absent from the graph. Full mode indexes all 156 files. Expected: identical file coverage in both modes (only analysis depth should differ), or an explicit warning naming the skipped directory.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

5,286 nodes / 17,328 edges / 156 .py files (full mode)

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    windowsWindows-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions