fix(packaging): ship src/ra in the wheel (uv_build module-name)#104
Merged
Conversation
The project is named "kai", so uv_build's default module discovery packages
only src/kai and silently drops src/ra — the recursive-LM framework that kai
imports (`from ra... import ...`). As a result `pip install kai @ git+...`
produces an install that crashes on `import ra`.
Declare both top-level modules so ra ships too:
[tool.uv.build-backend]
module-root = "src"
module-name = ["kai", "ra"]
Verified: the unfixed wheel contained only `kai`; the fixed wheel contains
kai + ra; a fresh py3.12 venv installs the wheel and imports kai.main +
ra.core.types with no source tree on the path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The why is in the prior commit message + PR description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
aktasbatuhan
approved these changes
Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The project is named
kai, souv_build's default module discovery packages onlysrc/kaiand silently dropssrc/ra— the recursive-LM framework thatkaiimports (from ra.agents import ...,from ra.core.types import ...). Sopip install kai @ git+https://github.com/firstbatchxyz/kai-security.gitproduces an install that crashes onimport ra.This surfaced while wiring kai-security as a sub-harness plugin in kai-agent (firstbatchxyz/kai-agent#171): its default install spec is the git URL, and the PYTHONPATH workaround there only applies to a local
KAI_SECURITY_REPOcheckout — so the default install path (local and remote) was broken.Fix
Declare both top-level modules under
src/:One file, additive.
Verification
kaionly (ramissing).kai+ra.pip installthe built wheel (deps from PyPI, no source tree on path) →import kai.main; import ra.core.typessucceeds.uv runimports both; full test suite still passes (one unrelated failure was a livehttpbin.org503).Unblocks firstbatchxyz/kai-agent#171's default install and lets the sub-harness runner there drop its PYTHONPATH workaround.
🤖 Generated with Claude Code