Skip to content

No parent/child path resolution - subdirectory queries fail #250

@Retengart

Description

@Retengart

Problem

get_indexing_status and search_code use exact string matching on paths. Querying a subdirectory of an indexed codebase returns "not indexed".

Steps to Reproduce

  1. Index /home/user/project
  2. Query status for /home/user/project/src
  3. Returns "not indexed" even though parent is indexed

Current Behavior

// handlers.ts:451-452
const isIndexed = this.snapshotManager.getIndexedCodebases().includes(absolutePath);

Exact string match - no parent traversal.

Expected Behavior

If queried path is a subdirectory of an indexed codebase, recognize it as part of indexed content.

Location

  • packages/mcp/src/handlers.ts:451-462 - search_code check
  • packages/mcp/src/handlers.ts:722 - get_indexing_status check
  • packages/mcp/src/snapshot.ts:405-409 - getCodebaseStatus()

Suggested Fix

Before exact match, check if queried path starts with any indexed codebase path (normalized, with trailing slash handling).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions