Skip to content

Commit f07c187

Browse files
authored
Merge branch 'main' into fix/1696-smoke-runtime-isolation
2 parents fa138ac + 5958f54 commit f07c187

51 files changed

Lines changed: 4491 additions & 214 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/pr.yml‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,29 @@ jobs:
6464
run: |
6565
# The full .diff endpoint rejects large-but-valid PRs at 20k lines.
6666
# The paginated files endpoint remains filename-only for this gate.
67-
FILES=$(gh api --paginate "repos/$REPO/pulls/$PR/files?per_page=100" --jq '.[].filename')
67+
if FILES=$(gh api --paginate "repos/$REPO/pulls/$PR/files?per_page=100" --jq '.[].filename'); then
68+
echo "file list: pulls/files API"
69+
else
70+
# The files endpoint renders the diff server-side too, and answers
71+
# 422 "this diff is taking too long to generate" for a PR that
72+
# regenerates a vendored parser (#2246: a 42 MB sql/parser.c) --
73+
# so does the compare endpoint. The PR merge ref's first parent is
74+
# the base, so a name-only diff across it is the same file list.
75+
# depth 2 + blob:none fetches commits and trees only (well under
76+
# 1 MB, under a second); nothing from the PR is checked out or run.
77+
echo "::notice::pulls/files API failed; file list taken from refs/pull/$PR/merge"
78+
CHANGES_GIT="$RUNNER_TEMP/changes.git"
79+
git init -q --bare "$CHANGES_GIT"
80+
git --git-dir="$CHANGES_GIT" fetch -q --depth=2 --filter=blob:none \
81+
"https://github.com/$REPO" "refs/pull/$PR/merge"
82+
FILES=$(git --git-dir="$CHANGES_GIT" diff --name-only --no-renames FETCH_HEAD^1 FETCH_HEAD)
83+
fi
6884
printf '%s\n' "$FILES"
69-
if printf '%s\n' "$FILES" | grep -qE '^(src/|internal/|install\.(sh|ps1)|scripts/build\.sh|scripts/smoke-test\.sh|scripts/smoke-local\.sh|scripts/smoke-fixture-server\.py|scripts/gen-third-party-notices\.sh|scripts/env\.sh|test-infrastructure/vm/(vm-smoke\.sh|windows-user-path-guard\.ps1)|Makefile\.cbm)'; then
85+
# A here-string, not a pipe: under this shell's pipefail, grep -q
86+
# exits on its first match, printf dies of SIGPIPE once the list
87+
# outgrows the pipe buffer, and the MATCH is then reported as a
88+
# failure -- product=false, smoke skipped, on the largest PRs.
89+
if grep -qE '^(src/|internal/|install\.(sh|ps1)|scripts/build\.sh|scripts/smoke-test\.sh|scripts/smoke-local\.sh|scripts/smoke-fixture-server\.py|scripts/gen-third-party-notices\.sh|scripts/env\.sh|test-infrastructure/vm/(vm-smoke\.sh|windows-user-path-guard\.ps1)|Makefile\.cbm)' <<<"$FILES"; then
7090
echo "product=true" >> "$GITHUB_OUTPUT"
7191
else
7292
echo "product=false" >> "$GITHUB_OUTPUT"

‎CONTRIBUTING.md‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ src/
5555
foundation/ Arena allocator, hash table, string utils, platform compat
5656
store/ SQLite graph storage (WAL mode, FTS5)
5757
cypher/ Cypher query → SQL translation
58-
mcp/ MCP server (JSON-RPC 2.0 over stdio, 14 tools)
58+
mcp/ MCP server (JSON-RPC 2.0 over stdio, 17 tools)
5959
pipeline/ Multi-pass indexing pipeline
6060
pass_*.c Individual pipeline passes (definitions, calls, usages, etc.)
6161
httplink.c HTTP route extraction (Go/Express/Laravel/Ktor/Python)
@@ -149,6 +149,25 @@ If in doubt, open an issue and ask.
149149
- Run `scripts/test.sh` and `scripts/lint.sh` before submitting
150150
- Keep PRs focused — avoid unrelated reformatting or refactoring
151151

152+
## AI-assisted and AI-authored contributions
153+
154+
Contributions written with the help of an AI tool, or written by an AI agent acting for a person, are welcome here on the same terms as any other. What we review is the change, not who or what typed it. Three things make that work:
155+
156+
- **Say so.** If an agent wrote the PR or is answering in the thread, disclose it — a line in the PR description or at the top of a comment is enough ("written with X", "this account is operated by an AI agent on behalf of Y"). Disclosure is never held against a contribution. Finding out later is.
157+
- **A person is accountable.** The [DCO sign-off](#license-and-sign-off-dco--required-on-every-commit) is a legal certification, and only a person can make it. The human behind the account certifies every commit, answers for it, and is who we talk to if something goes wrong. An agent may carry the conversation; it cannot carry the responsibility.
158+
- **The bar does not move.** Every claim in a PR must be something a reviewer can check: the failing test, the command that was run, the numbers and the machine they came from. "The model says it works" is not evidence, and a confident description does not replace a test that fails without the fix. We read AI-written PRs exactly as carefully as human-written ones — no more suspiciously, and no less.
159+
160+
Two practical notes:
161+
162+
- `Co-authored-by:` trailers naming a tool are fine. Links to private chat or agent sessions are not — they are dead to everyone else and do not belong in permanent history; we will ask you to remove them.
163+
- High-volume, low-effort submissions — many near-identical PRs, changes nobody ran, replies that do not engage with the review — will be closed, whoever or whatever produced them. One careful PR is worth more than twenty generated ones.
164+
165+
### Who speaks for the project
166+
167+
Only the maintainer account ([@DeusData](https://github.com/DeusData)) speaks for this project. A review, an approval, a "this will be merged" or a "this is a duplicate" from any other account is that person's opinion, however official it sounds — helpful reviews from the community are very welcome, and that is what they are.
168+
169+
**Impersonating a maintainer is not acceptable**, by a person or by an agent: presenting yourself as part of the maintainer team, posting approvals or change requests styled as maintainer decisions, or telling other contributors what the project has decided. We dismiss such reviews, hide the comments, say publicly in the affected threads that they were not ours, and report and block the account. If you are unsure whether a response you received is from the project, check the account name — and ask.
170+
152171
## Security
153172

154173
We take security seriously. All PRs go through:

‎README.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
**The fastest and most efficient code intelligence engine for AI coding agents.** Full-indexes an average repository in milliseconds, the Linux kernel (28M LOC, 75K files) in 3 minutes. Answers structural queries in under 1ms. Ships as a native executable with a small verified runtime-asset set for macOS, Linux, and Windows — download, run `install`, done.
1818

19-
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 162 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 15 MCP tools. No language runtime, hosted service, or API key. Plug and play across 45 supported automatic/conditional client surfaces.
19+
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 162 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 17 MCP tools. No language runtime, hosted service, or API key. Plug and play across 45 supported automatic/conditional client surfaces.
2020

2121
> **Research** — The design and benchmarks behind this project are described in the preprint [*Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP*](https://arxiv.org/abs/2603.27277) (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.
2222
@@ -37,7 +37,7 @@ High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-si
3737
- **45 supported automatic/conditional client surfaces** — `install` configures detected clients and safely activates conditional clients only when their documented platform, marker, or explicit existing config path is present. See [Multi-Agent Support](#multi-agent-support) for the complete matrix and manual/UI-only boundaries.
3838
- **Built-in graph visualization** — 3D interactive UI at `localhost:9749`, served from the binary itself.
3939
- **Infrastructure-as-code indexing** — Dockerfiles, Kubernetes manifests, and Kustomize overlays indexed as graph nodes with cross-references. `Resource` nodes for K8s kinds, `Module` nodes for Kustomize overlays with `IMPORTS` edges to referenced resources.
40-
- **15 MCP tools** — search, trace, architecture, impact analysis, targeted index-coverage checks, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
40+
- **17 MCP tools** — search, trace, architecture, impact analysis, targeted index-coverage checks, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
4141

4242
## Quick Start
4343

@@ -461,7 +461,7 @@ Add to `~/.claude.json` (user scope) or project `.mcp.json`:
461461
}
462462
```
463463

464-
Restart your agent. Verify with `/mcp` — you should see `codebase-memory-mcp` with 15 tools.
464+
Restart your agent. Verify with `/mcp` — you should see `codebase-memory-mcp` with 17 tools.
465465

466466
</details>
467467

@@ -673,6 +673,7 @@ JSON arguments can also be piped on stdin, for tools that take arguments. A tool
673673
| `list_projects` | List all indexed projects with node/edge counts. |
674674
| `delete_project` | Remove a project and all its graph data. |
675675
| `index_status` | Check indexing status of a project. |
676+
| `check_index_coverage` | Check whether exact paths or a scope are indexed and fresh. A clean result means no recorded gap, not proof of completeness. |
676677

677678
### Querying
678679

@@ -683,7 +684,9 @@ JSON arguments can also be piped on stdin, for tools that take arguments. A tool
683684
| `detect_changes` | Map git diff to affected symbols + blast radius with risk classification. |
684685
| `query_graph` | Execute Cypher-like graph queries (read-only). |
685686
| `get_graph_schema` | Node/edge counts, relationship patterns, property definitions per label. Run this first. |
687+
| `compare_graphs` | Compare two indexed snapshots: node/edge additions and removals between a base and a target. |
686688
| `get_code_snippet` | Read source code for a function by qualified name. |
689+
| `get_file_outline` | Declaration outline of one repository-relative file in source order, with optional label filter and paging. |
687690
| `get_architecture` | Codebase overview: languages, packages, routes, hotspots, clusters, ADR. |
688691
| `search_code` | Grep-like text search within indexed project files. |
689692
| `manage_adr` | CRUD for Architecture Decision Records (`get` reads, `update` replaces the whole document, `set_sections` rewrites only the named sections and leaves every other byte untouched, `sections` lists headings). Query modes do not wait behind a same-project reindex; writes remain serialized. |
@@ -849,7 +852,7 @@ Also supported (not yet benchmarked): Ada, Agda, Apex, Assembly (NASM), Astro, A
849852
src/
850853
main.c Entry point (MCP stdio server + CLI + install/update/config)
851854
daemon/ Per-account session coordination, IPC, lifecycle, shared jobs/watchers
852-
mcp/ MCP server (15 tools, JSON-RPC 2.0, session detection, auto-index)
855+
mcp/ MCP server (17 tools, JSON-RPC 2.0, session detection, auto-index)
853856
cli/ Install/uninstall/update/config (45 client surfaces, hooks, instructions)
854857
store/ SQLite graph storage (nodes, edges, traversal, search, Louvain)
855858
pipeline/ Multi-pass indexing (structure → definitions → calls → HTTP links → config → tests)

‎docs/index.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"featureList": [
5757
"Indexes 158 programming languages via vendored tree-sitter grammars",
5858
"Hybrid LSP semantic type resolution for Python, TypeScript/JavaScript, PHP, C#, Go, C/C++, Java, Kotlin, and Rust",
59-
"15 MCP tools for structural search, call-path tracing, targeted coverage checks, and Cypher graph queries",
59+
"17 MCP tools for structural search, call-path tracing, targeted coverage checks, and Cypher graph queries",
6060
"Semantic vector code search via bundled nomic-embed-code embeddings (no API key, fully local)",
6161
"Semantic graph edges (SEMANTICALLY_RELATED) and near-clone detection (SIMILAR_TO, MinHash + LSH)",
6262
"Cross-service linking for HTTP, gRPC, GraphQL, tRPC, and pub/sub channels with confidence scoring",
@@ -739,8 +739,8 @@ <h3>3D graph visualization</h3>
739739
<p>The optional UI variant adds one verified, content-addressed frontend pack and serves an interactive 3D graph at <code>localhost:9749</code> to explore nodes, edges, and clusters visually.</p>
740740
</div>
741741
<div class="feature">
742-
<h3>15 MCP tools</h3>
743-
<p><code>search_graph</code>, <code>trace_path</code>, <code>detect_changes</code>, <code>query_graph</code> (Cypher), <code>get_architecture</code>, <code>get_code_snippet</code>, <code>check_index_coverage</code>, <code>manage_adr</code>, and 7 more.</p>
742+
<h3>17 MCP tools</h3>
743+
<p><code>search_graph</code>, <code>trace_path</code>, <code>detect_changes</code>, <code>query_graph</code> (Cypher), <code>get_architecture</code>, <code>get_code_snippet</code>, <code>check_index_coverage</code>, <code>manage_adr</code>, and 9 more.</p>
744744
</div>
745745
<div class="feature">
746746
<h3>Cypher graph queries</h3>

0 commit comments

Comments
 (0)