fix(release): unbreak simple_module_cli build + guard at PR time - #102
Merged
Merged
Conversation
…t PR time The last release (run 25247762589) failed building simple_module_cli with `FileNotFoundError: Forced include not found: .../sdists-v9/skills`. Root cause: framework/cli/pyproject.toml used [tool.hatch.build.targets.wheel.force-include] "../../skills" = "simple_module_cli/skills" That works when building the wheel directly from the source tree, but `uv build --all-packages` builds the sdist first and rebuilds the wheel from the unpacked sdist — and the sdist root has no parent `skills/`, so the rebuild crashes. simple_module_cli/skills is already a symlink to the canonical repo-root skills/, and hatchling follows symlinks in both sdist and wheel builds, so the force-include + exclude pair was both unnecessary and actively broken. Why PR checks missed it: pr.yml had no packaging job — the release build was only exercised on workflow_dispatch from the Releases tab. Changes: - framework/cli/pyproject.toml: drop exclude + force-include; rely on hatchling's symlink-following. - framework/cli/tests/test_build_packaging.py: new test that runs `uv build --package simple_module_cli` and asserts the wheel + sdist actually contain simple_module_cli/skills/* and templates/*. Confirmed it fails on the old config. - Makefile: new `ci-build-packages` target running `uv build --all-packages`, mirroring release.yml. - .github/workflows/pr.yml: new `package-build` job (release dry-run) added to the pr-checks aggregate so any future packaging regression fails the PR instead of the release.
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.
Summary
simple_module_cliwithFileNotFoundError: Forced include not found: .../sdists-v9/skills. Root cause:framework/cli/pyproject.tomlhad[tool.hatch.build.targets.wheel.force-include]pointing at../../skills, which works for a direct source build but breaks the standard PEP 517 sdist→wheel rebuild thatuv build --all-packagesperforms (the unpacked sdist has no parentskills/).simple_module_cli/skillsis already a symlink to the repo-rootskills/, and hatchling follows symlinks during both sdist and wheel builds, so theexclude+force-includepair was both unnecessary and actively broken. Dropping it is the fix.pr.ymlhad no packaging job —uv buildonly ran on the manually-dispatched release workflow. Adding apackage-buildjob that mirrorsrelease.ymlcloses that gap.Changes
framework/cli/pyproject.toml— dropexclude+force-include, rely on hatchling's symlink-following.framework/cli/tests/test_build_packaging.py— new pytest module that runsuv build --package simple_module_cliand asserts the wheel + sdist shipsimple_module_cli/skills/*andsimple_module_cli/templates/*. Confirmed it fails on the old config and passes on the fix.Makefile— newci-build-packagestarget runninguv build --all-packages, the same invocationrelease.ymluses..github/workflows/pr.yml— newpackage-buildjob callingmake ci-build-packages, added to thepr-checksaggregate so it's required by branch protection.Test plan
uv build --all-packagesbuilds all 13 packages cleanly locallyuv run pytest framework/cli/tests/— 97/97 passingmake ci-build-packagessucceeds locallypackage-buildjob goes green on this PRreleaseworkflow and confirm it ships