Skip to content

feat(packaging): build and verify Homebrew releases - #6

Merged
hyperb1iss merged 2 commits into
mainfrom
nova/homebrew-packaging
Sep 6, 2026
Merged

feat(packaging): build and verify Homebrew releases#6
hyperb1iss merged 2 commits into
mainfrom
nova/homebrew-packaging

Conversation

@hyperb1iss

Copy link
Copy Markdown
Owner

💡 Build a Homebrew formula with each release

macOS support is merged, but the tap needs a Python package with its dashboard and native MIDI dependency. Releases now generate a checksum-pinned Homebrew formula from the built source archive. The release workflow's CI gate installs that formula on macOS and runs its package tests before tagging; publication repeats the gate at the release tag.

🛠️ Packaging contract

The generator reads the archive's own package version and lockfile, follows the runtime dependency closure, and writes source-resource checksums into the formula. Missing dashboard content, mismatched versions, ambiguous locked versions, and unsafe resource fields fail generation. Build backends still use Homebrew's normal isolated builds; this is not a fully hermetic build.

The formula uses Homebrew's Python virtualenv support with Python 3.14, Rust, CMake, and pkgconf. Installation does not start a service. Users explicitly run blocksd install after stopping a foreground instance and repeat that command after upgrades to refresh the LaunchAgent path.

Publication attaches blocksd.rb and includes it in SHA256SUMS. The current shared tap updater only accepts native binary artifacts, so the first formula will enter hyperb1iss/homebrew-tap through a separate PR after v0.6.0 is published. Automatic updates need shared-workflow support for formula artifacts and the tap token; this PR does not claim to enable them.

🧪 Validation

  • All 496 Python tests passed locally, including archive-version/checksum/runtime-closure tests and rejection of incomplete or mismatched archives. Ruff lint/format, ty, documentation lint/build, and workflow YAML parsing passed.
  • A real Homebrew source build on Apple Silicon installed the generated formula into an unlinked temporary-tap keg (14.3 MB). The installed CLI, CoreMIDI extension, package version, and bundled dashboard passed brew test --force.
  • The existing distribution verifier also passed against the Homebrew-installed Python environment, not the checkout.
  • Independent consumer review caught an unsupported --version invocation in the formula test. The corrected test exercises CLI help and reads the installed package version through Python metadata.

The local build uses the unreleased checkout's 0.5.0 archive only for verification. No formula pointing to the existing v0.5.0 release has been published. Availability through the tap follows the new release and its tap PR.

Generate the formula from the source archive and locked runtime
resources so its version, checksum, and dashboard match the release.
Gate release and publication on a real macOS Homebrew install and test.

Keep service startup explicit and document the separate tap PR needed
until the shared updater accepts Python formula artifacts.
Use the explicit v0.6.0 minimum instead of relative next-release copy.
Describe the platform-specific installer behavior and keep tap
availability conditional on its formula being merged.
@hyperb1iss
hyperb1iss merged commit 0b421bd into main Sep 6, 2026
7 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