Commit Graph
9 Commits
Author SHA1 Message Date
Martin VogelandHarry Chan c4848a89aa Fix: respect explicit LIMIT in Cypher query_graph
applyLimit() silently capped all results to maxRows (default 200), even
when the user specified a higher LIMIT clause. This caused queries like
MATCH (f:Function) RETURN f.name LIMIT 500 to return only 200 rows,
and COUNT() aggregations to silently undercount on large datasets.

Now explicit LIMIT values from Cypher are respected as-is. The 200-row
default still applies when no LIMIT clause is provided.

Incorporates the fix from PR #40 by @re-thc.

Co-authored-by: Harry Chan <38070640+re-thc@users.noreply.github.com>
2026-03-12 13:05:53 +01:00
Martin Vogel a208b34c8b Fix all golangci-lint issues across the codebase
- watcher_test.go: add mustWriteFile/mustMkdirAll helpers for errcheck (26 fixes),
  use exec.CommandContext for noctx
- watcher.go: remove unused projectsCacheTTLValue, fix nilerr in WalkDir callbacks,
  name return values on checkSentinel, fix gofmt
- executor.go: rename shadowed builtin 'cap' to bindingCap/stepCap
- pipeline.go: extract runPostFlushPasses (funlen), extract collectEdgeQNs/
  createLSPStubNodes/buildEdgesFromResults from flushResolvedEdges (gocognit)
- pipeline_cbm.go: extract runGoLSPCrossFileResolution/collectLSPResolvedEdges/
  resolveCallEdge (gocognit, nestif), fix gofmt
- go_dep_registry.go: extract extractFuncDef/extractTypeDefs/extractStructEmbeds
  (gocognit), preallocate retTypes, nolint for deprecated parser.ParseDir
- go_lsp_cross.go: extract enrichStructFieldsFromGenDecl/enrichIfaceMethodsFromGenDecl
  (gocognit), fix rangeValCopy for 152-byte structs
- memleak_test.go: change file permissions to 0o600 (gosec G306)
- router.go, tools.go: fix gofmt formatting
2026-03-12 12:57:20 +01:00
Martin Vogel 02bc3b7352 Release v0.3.0: 25 languages, install/update CLI, skills, benchmark
Language expansion (13 → 25):
  Add Ruby, C, Bash, Zig, Elixir, Haskell, OCaml, HTML, CSS, YAML,
  TOML, HCL with tree-sitter grammars and language specs.
  Restore Erlang and SQL with extraction fixes.

CLI install/update/uninstall commands:
  Auto-detect Claude Code and Codex CLI, register MCP server,
  install task-specific skills, self-update with SHA-256 verification.

Embedded skills (4):
  exploring, tracing, quality, reference — auto-trigger in Claude Code
  for graph-first code discovery.

Pipeline improvements:
  Docstring extraction, enrichment pass for params/returns/complexity,
  graceful context cancellation, improved test detection.

35-language benchmark (BENCHMARK.md):
  12 questions × 35 repos, 91.8% overall score, Linux kernel stress
  test (20K nodes, zero timeouts). Replaces old benchmark artifacts.
2026-03-01 18:01:52 +01:00
Martin Vogel fb30ca61d6 v0.2.0: Multi-DB router, enrichment pipeline, update-available notification, enhanced language support
Major changes:
- Store router: per-project SQLite databases with automatic migration
- Pipeline enrichment: community detection, inheritance, decorators, read/write tracking, test detection, type usage, exception flows, configuration relationships
- Update checker: lightweight GitHub release check on startup, injects update_available into first tool response
- Language support: enhanced extraction for C++, C#, Go, Java, JavaScript, Lua, PHP, Python, Rust, Scala, TSX, TypeScript
- Cypher executor: improved query execution with better aggregation and pattern matching
- HTTP link detection: cross-service HTTP call inference
- CLI mode: extended with --raw flag, human-friendly summaries for all tools
- Search: sort_by support, exclude_labels, glob matching improvements
- AST debug tool for parser development
2026-02-28 01:58:47 +01:00
Martin Vogel 4ee7720b48 v0.1.5: Performance optimizations, mattn driver, batch passStructure, CTE BFS, SQL COUNT, fix delete_project file_hashes 2026-02-26 23:50:02 +01:00
Martin Vogel b5aded4eed Fix lint violations: extract helpers, use defer, prealloc slices
- Extract schema query helpers to reduce GetSchema cognitive complexity
- Add scanDegrees helper for batch degree counting with proper defer
- Fix errcheck, rowserrcheck, sqlclosecheck, prealloc, nestingReduce
- Suppress gocognit for Cypher step dispatch (inherently branchy)
2026-02-26 20:26:09 +01:00
Martin Vogel f932e87b6e v0.1.4: CLI mode, query performance optimizations, Go 1.26
Add CLI mode for direct tool invocation from the shell — every MCP tool
can now be called without an MCP client. Useful for testing, scripting,
and CI pipelines.

Query engine rewrite: SQL LIKE pre-filtering extracts literal substrings
from regex patterns before scanning, batch degree counting replaces
per-node queries, and schema queries use id→label maps instead of 3-way
JOINs. Cypher relationship queries up to 600x faster on large graphs.

Incremental reindex 4x faster via content-hash skip optimization.

Upgrade to Go 1.26 (Green Tea GC) and SQLite v1.46.1.
2026-02-26 19:27:27 +01:00
Martin Vogel 97284a35fa v0.1.0: Performance, incremental indexing, async boundary detection
Performance & quality:
- Transaction wrapping (Querier interface, single tx per index run)
- Composite indexes on edges table for faster traversals
- Cypher WHERE push-down (=, CONTAINS, STARTS WITH → SQL)
- golangci-lint with 25 linters, zero violations
- 11 benchmarks for pipeline, search, and BFS

Incremental indexing:
- Content-hash based file change detection
- Dependency-aware two-level invalidation (changed + dependents)
- Stale file cleanup for deleted files

Async boundary detection:
- Project-wide env var URL scanner (Dockerfile, YAML, .tf, .sh, .env,
  TOML, properties files) with 3-layer secret exclusion
- Env var default extraction in constant propagation (getEnv, os.environ.get,
  process.env with ||/?? fallback)
- ASYNC_CALLS edge type for Cloud Tasks, Pub/Sub, SQS/SNS, RabbitMQ, Kafka
  dispatch patterns, separate from synchronous HTTP_CALLS
- Tool descriptions updated with all edge types

Other improvements:
- Type inference for method dispatch resolution
- Interface implementation detection (IMPLEMENTS edges)
- Improved tool descriptions for discoverability
2026-02-25 13:43:57 +01:00
Martin Vogel f63c70865e Initial release: codebase-memory-mcp v0.0.1
MCP server that indexes codebases into a queryable knowledge graph.
Single Go binary, SQLite storage, 12 languages via tree-sitter.

Features: call graph, cross-service HTTP linking, dead code detection,
route nodes, Cypher queries, incremental reindex, JSON config scanning.
2026-02-25 00:10:39 +01:00