Commit Graph
16 Commits
Author SHA1 Message Date
Martin Vogel 6b51d3e75e Bump version to 0.1.2 v0.1.2 2026-02-25 16:06:15 +01:00
Martin Vogel 0a2c3b1787 Add auto-sync watcher, fix WithTransaction data race, add infra file indexing
Auto-sync: background watcher polls indexed projects for file changes
(mtime+size) and triggers incremental re-indexing automatically. Adaptive
polling interval scales with repo size (1s-60s). Non-blocking — uses
TryLock to skip if manual index_repository is in progress.

WithTransaction: changed signature to return a transaction-scoped Store
instead of mutating the shared querier field. Eliminates a data race
where concurrent read handlers could use a committed transaction.

Infrastructure file indexing: new pipeline pass indexes Dockerfiles,
docker-compose, cloudbuild, .env, Terraform, and YAML config files as
InfraFile nodes with structured properties.

Also includes: indexMu mutex on Server for safe concurrent access,
Claude Code skill file in repo, updated README with auto-sync docs.
2026-02-25 16:05:34 +01:00
Martin Vogel ead77ff51b Add cross-service query guidance to tool descriptions
Clarify that search_graph relationship filter counts node degrees
(not edges), direct users to query_graph Cypher for listing
HTTP_CALLS/ASYNC_CALLS edges with properties, and recommend
direction=both in trace_call_path for full cross-service context.
v0.1.1
2026-02-25 14:20:48 +01:00
Martin Vogel c6be7b9017 Fix 7 lint violations: extract helpers to reduce cognitive complexity
- processFileCalls: extract resolvePythonSelfCall + extendTypeMapWithReceiver (gocognit, nestif)
- injectEnvBindings: extract buildConstantsList + mergeWithExistingModule (gocognit, nestif)
- TestAsyncDispatchKeywords: extract writeTestFile, createTestNode, assertEdgeType helpers (funlen)
- envscan.go: return filepath.Walk errors instead of nil (nilerr), simplify regex (gocritic)
v0.1.0
2026-02-25 13:55:53 +01:00
Martin Vogel 94e27ba13f 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 5201ab267e Add comprehensive docs: troubleshooting, Cypher subset, qualified names, .cgrignore
Addresses documentation gaps found during review:
- First Use: clarify repo_path is required, document when to reindex
- Tool tables: add key parameters, scoping notes, pagination details
- New sections: Qualified Names format, Supported Cypher Subset,
  Edge Properties, .cgrignore syntax, Troubleshooting table
- Usage examples: project filter, discover-then-trace pattern, pagination
- CLAUDE.md snippet: add project scoping and discover-then-trace tips
2026-02-25 10:43:59 +01:00
Martin Vogel 07a559b119 Fix setup.sh: Apple Silicon detection under Rosetta and tmpdir cleanup
- detect_platform() now checks hw.optional.arm64 sysctl on macOS to
  pick the arm64 binary even when bash runs under Rosetta (uname -m
  reports x86_64 in that case)
- Move tmpdir to a global CLEANUP_DIR so the EXIT trap does not hit
  an unbound variable error from set -u after the function returns
2026-02-25 10:19:32 +01:00
Martin Vogel 55a6fc68ff Fix CI: replace deprecated macos-13 with macos-15-intel
macos-13 runners were removed in Dec 2025. macos-15-intel is the
free replacement for x86_64 macOS builds (available until Aug 2027).
v0.0.2
2026-02-25 10:14:07 +01:00
Martin Vogel 08c86bd4a8 Rewrite installation docs for binary-first onboarding
Lead with pre-built binary download (no toolchain needed), then setup
scripts for automation, then build-from-source for contributors.

- Add platform table with all 5 targets including linux-arm64
- Add Windows SmartScreen guidance for unsigned binary
- Document checksums.txt for integrity verification
- Credit @Flipper1994 for WSL2 workaround (closes #1)
2026-02-25 10:07:52 +01:00
Martin Vogel 35e2dfd3da Add cross-platform setup scripts and CI release workflow
- GitHub Actions workflow builds native binaries for 5 platforms:
  darwin-arm64, darwin-amd64, linux-amd64, linux-arm64, windows-amd64
- Windows build uses MSYS2 UCRT64 toolchain for CGO compatibility
- setup.sh: macOS/Linux installer (binary download or --from-source)
- setup-windows.ps1: Windows installer (native .exe or -FromSource via WSL)
- Both scripts offer interactive Claude Code MCP auto-configuration
- Release includes checksums.txt with SHA-256 hashes
- PS5.1-compatible JSON handling (no -AsHashtable dependency)
2026-02-25 10:07:45 +01:00
Martin Vogel df86daaab3 Fix .gitignore to not block cmd/ subdirectory
Anchor the binary ignore pattern to the repo root so it does not
match cmd/codebase-memory-mcp/.
2026-02-25 10:07:23 +01:00
Martin Vogel 5171e53dd4 Resolve Gin route handler references and cross-file group prefixes
Extract the handler function from .POST("/path", h.Handler) registrations
and create CALLS edges from the registering function to the handler.
Resolve route group prefixes defined in separate files by scanning for
.Group() assignments and matching them to route registrations.
2026-02-25 10:07:03 +01:00
Martin Vogel a915e6bedc Add offset/limit pagination to search_graph and search_code
Return total count, offset, limit, and has_more in responses so LLM
clients can page through large result sets without fetching everything.
Default limit is 100 (was unlimited).
2026-02-25 10:06:55 +01:00
Martin Vogel 74604466c5 Classify Go interfaces, structs, and type aliases correctly
Use type_spec and type_alias tree-sitter nodes instead of type_declaration,
then inspect the child node kind to distinguish interface_type (→ Interface)
from struct_type (→ Class) and everything else (→ Type).

Adds tests for standalone and grouped type declarations.
2026-02-25 10:06:51 +01:00
Martin Vogel 0fa3eb7c8c Add project filter, route group prefixes, decorator entry points, and remove limit caps
- search_graph: add `project` parameter to scope searches to a single project
- httplink: resolve Go gin router Group() prefixes into Route node paths
- pipeline: recognize @app.middleware, @app.exception_handler, @app.on_event as entry points
- search_graph/search_code: make `limit` optional (no default cap, no max 200)
- Fix cypher test assertions after previous SubmitOrder rename
2026-02-25 00:39:25 +01:00
Martin Vogel 8ea3f2ee21 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.
v0.0.1
2026-02-25 00:10:39 +01:00