Skip to content

Function.is_test is false for functions under tests/ — query_graph cannot exclude tests #1294

Description

@melihemreguler

Summary

The stored is_test node property disagrees with the tool-level test filter. The property reports false for a function that lives in tests/, while trace_path classifies the same node as a test. Anyone filtering with WHERE f.is_test = false in query_graph gets tests back.

Repro

query_graph --query "MATCH (f:Function {name:'pipeline_create_free'}) RETURN f.file_path, f.is_test"
-> ["tests/test_pipeline.c", "false"]

The same node is treated as a test by trace_path: inbound callers of cbm_pipeline_new go from 83 with include_tests=true to 3 with the default false, and this node is among those excluded.

So the tool-level filter is correct and the stored property is wrong.

Secondary: the path filter misses tests/repro/

With the default include_tests=false, rpd_index_and_fingerprint (in tests/repro/) still appears in results. The filter appears to match tests/test_* rather than the whole tests/ tree.

Impact

  • query_graph cannot exclude tests at all — the documented property is unusable as a filter.
  • The search_graph(max_degree=0) dead-code candidate list is polluted with test files; GraphTab.deadcode.test.tsx and GraphTab.filters.test.tsx appear at the top.

Environment

  • Version: codebase-memory-mcp 0.9.0 (release binary, darwin-arm64)
  • OS: macOS 26.5.2, Apple Silicon
  • Repo under test: DeusData/codebase-memory-mcp @ af3ffbd (21,143 nodes / 123,103 edges)
  • Verified identically through both the MCP server and cli mode (outputs byte-identical)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions