From f14d9e4224aaf6b34f597da66251da3370e885a4 Mon Sep 17 00:00:00 2001 From: dmitry Date: Tue, 26 May 2026 11:06:17 +0300 Subject: [PATCH 1/2] fix cocoindex package dependency Declare CocoIndex as a runtime dependency so pip installs can run lifecycle commands without missing the console script. Co-authored-by: Cursor --- README.md | 3 ++- pyproject.toml | 3 ++- tests/test_packaging_metadata.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/test_packaging_metadata.py diff --git a/README.md b/README.md index e431e0f..fe565d8 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ pip install java-codebase-rag ``` Python **3.11+** required. After install, `java-codebase-rag --help` should print the CLI groups. +The package includes the CocoIndex lifecycle dependency used by `init`, `increment`, `reprocess`, and `erase`. > **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change. @@ -199,7 +200,7 @@ python3 -m venv .venv .venv/bin/pip install -r requirements.txt ``` -The `cocoindex` package is **only** needed for lifecycle commands that run the indexer (`init`, `increment`, `reprocess`, `erase`). Search and MCP navigation work without it. +The `cocoindex` package powers lifecycle commands that run the indexer (`init`, `increment`, `reprocess`, `erase`). Search and MCP navigation do not invoke it directly. The default embedding model is `sentence-transformers/all-MiniLM-L6-v2` (downloaded on first `init`). Override via the `EMBEDDING_MODEL` env var — see [`docs/CONFIGURATION.md` §1](./docs/CONFIGURATION.md#1-environment-variables). diff --git a/pyproject.toml b/pyproject.toml index 74ac683..afa0bc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "java-codebase-rag" -version = "0.2.0" +version = "0.2.1" description = "MCP server for semantic + structural search over Java codebases" readme = "README.md" requires-python = ">=3.11" @@ -23,6 +23,7 @@ classifiers = [ "Topic :: Software Development :: Libraries", ] dependencies = [ + "cocoindex[lancedb]>=1.0.0a43,<2", "kuzu>=0.11.3,<0.12", "lancedb>=0.25.3,<0.31", "mcp>=1.27.0,<2", diff --git a/tests/test_packaging_metadata.py b/tests/test_packaging_metadata.py new file mode 100644 index 0000000..79879a5 --- /dev/null +++ b/tests/test_packaging_metadata.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +import tomllib +from pathlib import Path + + +def test_published_package_installs_cocoindex_for_lifecycle_commands() -> None: + data = tomllib.loads((Path(__file__).resolve().parents[1] / "pyproject.toml").read_text()) + deps = data["project"]["dependencies"] + + cocoindex_deps = [dep for dep in deps if dep.startswith("cocoindex")] + + assert cocoindex_deps + assert any("[lancedb]" in dep for dep in cocoindex_deps) From 5e9d73b10a5eb3e17e840dccc7633c460c9056a7 Mon Sep 17 00:00:00 2001 From: dmitry Date: Tue, 26 May 2026 11:15:00 +0300 Subject: [PATCH 2/2] fix skills directory integrity test Allow the documented navigate-codebase skill alongside explore-codebase so CI reflects the shipped skills layout. Co-authored-by: Cursor --- tests/test_agent_skills_static.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_agent_skills_static.py b/tests/test_agent_skills_static.py index 2aa96c6..d829423 100644 --- a/tests/test_agent_skills_static.py +++ b/tests/test_agent_skills_static.py @@ -16,8 +16,6 @@ from pathlib import Path from typing import get_args -import pytest - from java_ontology import NodeKind from mcp_v2 import ComposedEdgeType, EdgeType @@ -39,6 +37,7 @@ SKILLS_DIR = Path(__file__).resolve().parent.parent / "skills" SKILL_NAME = "explore-codebase" +EXPECTED_SKILL_DIRS = {"explore-codebase", "navigate-codebase"} SKILL_PATH = SKILLS_DIR / SKILL_NAME / "SKILL.md" @@ -208,13 +207,13 @@ def test_readme_exists(self): assert (SKILLS_DIR / "README.md").is_file(), "skills/README.md missing" def test_no_other_skill_dirs(self): - """Only explore-codebase/ should exist as a skill directory.""" + """Only documented consumer skill directories should exist.""" skill_dirs = { p.name for p in SKILLS_DIR.iterdir() if p.is_dir() and (p / "SKILL.md").exists() } - assert skill_dirs == {SKILL_NAME}, ( - f"Expected only skills/{SKILL_NAME}/, found: {skill_dirs}" + assert skill_dirs == EXPECTED_SKILL_DIRS, ( + f"Expected only documented skills {EXPECTED_SKILL_DIRS}, found: {skill_dirs}" )