Skip to content

Indexing gap - "instanceof" #1409

Description

@oobenland

Version

codebase-memory-mcp 0.9.0

Platform

macOS (Apple Silicon)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

The codebase-memory-mcp indexer cannot fully parse Java 21 record pattern matching in instanceof expressions. The tree-sitter Java grammar doesn't support this syntax, resulting in parse_partial errors in 6 Java files.

Affected files and line ranges:

  • ${project_dir}/Foo.java:19-21 — Multi-line record pattern
  • ${project_dir}/Bar.java:13 — Single-line record pattern
  • ${project_dir}/Bazz.java:12 — Single-line record pattern
  • ${project_dir}/FooBar.java:19 — Single-line record pattern
  • ${project_dir}/FooBazz.java:119-121 — Multi-line record pattern
  • ${project_dir}/BazzBar.java:11-13 — Multi-line record pattern

Reproduction

Minimal reproducible pattern:
record Bazz(byte[] content) {
@OverRide
public boolean equals(final Object o) {
if (!(o instanceof Bazz(final byte[] otherContent))) {
return false;
}
return Arrays.equals(content, otherContent);
}
}

The parser fails on the record pattern destructuring syntax Bazz(final byte[] otherContent) inside the instanceof operator.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

11000 nodes / 26000 edges / 30000 files

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

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgeswindowsWindows-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions