Skip to content

fix: include docs/ in wheel and look up bundled copy at runtime#485

Open
mvanhorn wants to merge 1 commit into
tirth8205:mainfrom
mvanhorn:fix/8205-crg-package-docs-in-wheel
Open

fix: include docs/ in wheel and look up bundled copy at runtime#485
mvanhorn wants to merge 1 commit into
tirth8205:mainfrom
mvanhorn:fix/8205-crg-package-docs-in-wheel

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

get_docs_section (used by docs and suggested_questions MCP tools) only searched filesystem-relative paths. After pipx install code-review-graph==2.3.2, the wheel didn't include docs/LLM-OPTIMIZED-REFERENCE.md, so both tools returned status: error, reason: docs_not_found outside a checked-out repo.

Two changes:

  1. pyproject.toml: tool.hatch.build.targets.wheel.force-include ships docs/LLM-OPTIMIZED-REFERENCE.md to code_review_graph/docs/LLM-OPTIMIZED-REFERENCE.md inside the wheel.
  2. tools/docs.py: when no repo_root is passed, check the in-package code_review_graph/docs/ first; fall back to source-tree docs/ next to the package. Both paths now resolve.

This PR is scoped to bug 1 of #480; bug 2 (suggested_questions returning role-user dicts) is already addressed in 4b6293f.

Why this matters

#480 surfaces a hard failure for pipx/uvx users on 2.3.2. The wheel layout is the root cause — tool.hatch.build.targets.wheel.packages = ["code_review_graph"] doesn't pick up top-level docs/. Force-include in pyproject.toml ships the file in the wheel at a path the runtime can find. 2 new tests assert both the source-tree path and the bundled-wheel path resolve from outside any repo.

closes #480

AI was used for assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP docs and suggested-questions tools fail in 2.3.2

1 participant