4.9 KiB
4.9 KiB
status, created, owner
| status | created | owner |
|---|---|---|
| building | 2026-05-14 | tbd |
Homebrew Core Submission
Why
Kandev is currently installable via brew install kdlbs/kandev/kandev from the kdlbs/homebrew-kandev tap. The tap formula downloads pre-built release tarballs, which works for end users but is rejected by homebrew/homebrew-core policy. Landing in homebrew-core means:
brew install kandev(no tap required) — lower friction discovery.- Bottles are built and signed by Homebrew's CI, eliminating per-platform GH-release tarballs as the install path.
- Automated version bumps via
brew bump-formula-proncelivecheckis wired up.
What
- Add a package-manager build contract that produces the native runtime bundle from an already-installed source checkout. It builds the Vite SPA, syncs it into the Go embed input, compiles the host
kandevandagentctlbinaries, and cross-compiles the four Linux/macOS remoteagentctlhelpers. - Keep package-manager dependency installation outside that contract. Homebrew declares Go, Node 24, and pnpm as build dependencies and Git as a runtime facility.
- Compile only the host
kandevbinary with cgo and thefts5tag.mattn/go-sqlite3supplies the SQLite amalgamation, so the formula does not declare an external SQLite dependency unless build or linkage evidence requires it. - Merge and publish the source-build contract in a Stable Kandev release before authoring the Core formula. Core must consume the immutable GitHub tag archive for that release, never a branch or unreleased commit.
- Install the bundle under
libexec/binand expose onebin/kandevwrapper produced bywrite_env_script. The wrapper setsKANDEV_BUNDLE_DIR=<libexec>andKANDEV_VERSION=<version>. - Use stable numeric tags for
livecheck; prerelease and Nightly npm versions are not Homebrew channels. - Keep
kdlbs/homebrew-kandevas the upstream binary fast path alongside Homebrew Core's source-built bottles. The shared release-bundle validator must run before those binary archives are published, and the generated tap formula must smoke-test its version, readiness endpoint, and embedded SPA. - Preserve all four remote
agentctlhelpers in custom-tap installations. The tap must use an exact-path Homebrew mismatched-binary audit allowlist rather than pruning helpers, so Docker and SSH targets can differ from the Homebrew host. Decision: ADR-2026-08-05-homebrew-remote-helper-audit.
The runtime bundle contains exactly:
- host
kandev; - host
agentctl; agentctl-linux-amd64;agentctl-linux-arm64;agentctl-darwin-arm64;agentctl-darwin-amd64.
The Darwin arm64 helper must carry a Mach-O code signature so Apple Silicon can execute it.
Scenarios
- GIVEN the source-build contract is merged, WHEN a Stable release is published, THEN its immutable tag archive contains the contract used by the Homebrew formula.
- GIVEN the homebrew-core PR is merged, WHEN a user runs
brew install kandev, THEN Homebrew builds the Vite assets and native runtime bundle from source, installs it underCellar/kandev/X.Y.Z/{bin,libexec}, andkandev --versionprintsX.Y.Zwithout Node being present at runtime. - GIVEN the installed formula starts with an isolated home directory and loopback port, WHEN
brew test kandevpollsGET /health, THEN readiness returns{"status":"ok"}and/serves the embedded page containing<title>Kandev</title>. - GIVEN a new kandev release
vX.Y.Zis tagged, WHEN Homebrew's auto-bump worker runs, THENlivecheckresolves the new tag from GitHub Releases and a bump PR is opened against the formula. - GIVEN a maintainer reviews the PR, WHEN they run
brew install --build-from-source kandevlocally, THEN the build completes without network or sandbox failures andbrew test kandevpasses. - GIVEN a Stable release updates
kdlbs/homebrew-kandev, WHEN its platform archive is built and the tap formula is tested, THEN the archive contains the complete executable runtime and the installed launcher serves both/healthand the embedded Kandev page. - GIVEN a tap archive contains remote helpers for CPU architectures other than the Homebrew host, WHEN Homebrew audits the installed formula on macOS or Linux, THEN only the four declared remote-helper paths are exempted and the complete runtime remains installed.
Out of scope
- Migrating users from
kdlbs/homebrew-kandevto homebrew-core (both can coexist; users opt in by switching tap reference). - Linuxbrew bottle parity beyond what homebrew-core's CI provides by default.
- Vendoring JS dependencies via
resourceblocks — falls back here only if maintainers reject network-during-install. - Changing the custom tap's direct-push publication or deploy-key authentication model.
- Advertising untapped
brew install kandevbefore the Core formula merges. - Notability lobbying — submission goes in as-is; maintainers decide.