Skip to content

fix(release): unbreak simple_module_cli build + guard at PR time - #102

Merged
antosubash merged 1 commit into
mainfrom
feature/elegant-buck-292cf6
May 2, 2026
Merged

antosubash merged 1 commit into
mainfrom
feature/elegant-buck-292cf6

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • 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 had [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 that uv build --all-packages performs (the unpacked sdist has no parent skills/).
  • simple_module_cli/skills is already a symlink to the repo-root skills/, and hatchling follows symlinks during both sdist and wheel builds, so the exclude + force-include pair was both unnecessary and actively broken. Dropping it is the fix.
  • PR checks didn't catch this because pr.yml had no packaging job — uv build only ran on the manually-dispatched release workflow. Adding a package-build job that mirrors release.yml closes that gap.

Changes

  • framework/cli/pyproject.toml — drop exclude + force-include, rely on hatchling's symlink-following.
  • framework/cli/tests/test_build_packaging.py — new pytest module that runs uv build --package simple_module_cli and asserts the wheel + sdist ship simple_module_cli/skills/* and simple_module_cli/templates/*. Confirmed it fails on the old config and passes on the fix.
  • Makefile — new ci-build-packages target running uv build --all-packages, the same invocation release.yml uses.
  • .github/workflows/pr.yml — new package-build job calling make ci-build-packages, added to the pr-checks aggregate so it's required by branch protection.

Test plan

  • uv build --all-packages builds all 13 packages cleanly locally
  • uv run pytest framework/cli/tests/ — 97/97 passing
  • Regression test verified: it fails on the broken config and passes on the fix
  • make ci-build-packages succeeds locally
  • CI's new package-build job goes green on this PR
  • After merge, re-run the release workflow and confirm it ships

…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.
@antosubash
antosubash merged commit 9b81833 into main May 2, 2026
11 checks passed
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.

1 participant