Repository navigation
feat(release): publish binary archives and a Homebrew formula - #1338
Merged
Merged
Conversation
A `vX.Y.Z` tag previously produced only ko container images and a Helm chart
in GHCR — no GitHub Release, no binary archives — so the only documented way
to get mecatl was to clone the repo and run `task build`.
Add GoReleaser alongside ko to publish the CLI half of a release: one tarball
per platform (darwin/linux x amd64/arm64) carrying both `mecated` and
`mecatui`, attached to a real GitHub Release with checksums, cosign sign-blob
bundles, per-archive SBOMs and build provenance, plus a generated `mecatl`
formula committed to the public stacklok/homebrew-tap. ko remains the sole
owner of every container image; the new `publish-cli` job takes no `needs:`
edge and runs the reusable-pin gate itself.
This mirrors the mechanism stacklok/modelith and stacklok/toolhive already
use, and it also supplies the signed, checksummed binary that ADR 0028 §5
asks for so the mecatequi composite action can stop building from source on
every consumer run.
Three details that would otherwise fail silently:
* The ldflags stamp is `internal/buildinfo.BuildID`, not `main.version`
(which does not exist here), and uses `v{{ .Version }}` because GoReleaser
strips the leading `v` that ko and the Taskfile both stamp. The formula's
`test:` block asserts both binaries report the tag, so a regression fails
`brew test` instead of shipping `dev+<sha>` to every tap user.
* `publish-cli` checks out at `fetch-depth: 0`, unlike the ko jobs, because
GoReleaser needs the full tag graph; that also provides `origin/main` for
the tag-on-main guard without a credentialed fetch.
* `concurrency` is now keyed on the tag rather than `github.ref`, which
differs between the tag-push and workflow_dispatch paths and would let a
re-publish race the original run.
`brews:` is deprecated upstream in favour of `homebrew_casks` but kept
deliberately: the tap is a `Formula/` tap and casks must live in `Casks/`.
`goreleaser check` therefore tolerates exit 2 in CI and `task release:check`.
Docs: `user-docs/install.md` is the new canonical install page (nothing owned
that topic before), `brew install` leads the README and the mecatui
getting-started page, and PATH-style examples drop their `bin/` prefix. The
Homebrew-prefix guidance in session-storage-operations.md is prose outside the
fences, because cmd/mecated's Scenario9 tests parse those code blocks and
assert the exact `/usr/local/bin/mecated` argv.
Local verification: `task release:check`, `task release:snapshot` and
`task release:verify` build the archives and formula with no tag, no upload
and no tokens; `release:verify` asserts both binaries are at the archive
root, that the linker stamp landed, and that `brew style` is clean.
`brew install stacklok/tap/mecatl` will 404 until stacklok/mecatl is public,
because Homebrew's downloader does not authenticate. The formula is inert
until then and cannot affect other formulas in the tap.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Release archives are cross-compiled for darwin on an ubuntu runner, which cannot execute them, so nothing in CI ever ran a darwin binary. The only execution check was the formula's own `brew test`, which runs after the formula is already public. Add a macos-14 job that builds `mecated` and `mecatui` CGO-free, runs each with `--version`, and asserts the exact `<name> <BuildID>` output. That pins the buildinfo.BuildID linker stamp: a wrong -X symbol path still compiles and still yields a working binary, it just reports the `dev+<vcs-rev>` fallback — so this is the only gate that catches it before publication. Addresses the native-smoke-test note in #891. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
JAORMX
approved these changes
Sep 10, 2026
3 of 21 tasks
This was referenced Sep 10, 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.
Summary
A
vX.Y.Ztag previously produced only ko container images and a Helm chart in GHCR — no GitHub Release, no binary archives — so the only documented way to get mecatl was to clone the repo and runtask build.mecatedandmecatui, attached to a real GitHub Release withchecksums.txt, cosignsign-blobbundles, per-archive SBOMs and build provenance.mecatlformula to the existing publicstacklok/homebrew-tap, sobrew install stacklok/tap/mecatlinstalls both executables. Mirrors the mechanismstacklok/modelithandstacklok/toolhivealready use.mecatequicomposite action can eventually stop building from source on every consumer run.Development stage
Contract linkage
v*tag produces —docs/usage/install.mdpreviously described those as "container-image tags".docs/development-process.mdthe waiver lifts plan/interface ceremony only; layering rules, AGENTS.md invariants, verification gates and human merge authority are unchanged and were all honoured.Interface conformance
No gRPC/protobuf, exported Go API, tool schema, event or persistence change. The interface surface is build/release configuration plus three new local-only Taskfile targets:
task release:check— validate.goreleaser.yamlofflinetask release:snapshot— build archives + formula locally (no tag, no upload, no tokens)task release:verify— assert both binaries per archive, the linker stamp, andbrew styleNew CI/release surface: one
publish-clijob inrelease.yml, onesmoke-darwin-arm64job and one config-validation step inci.yml.Issue relationship
Closes #891
Relates to #890
Relates to #893
Divergence from the issues as written, all decided by the directing human.
#890–#894were filed 2026-08-31 describing a different route; three of their premises are deliberately superseded:#892: create a new privatestacklok/homebrew-mecatlstacklok/homebrew-tapthvandmodelith; a second tap repo was not wanted. Most of#892and#894become unnecessary.#890/#892: private pre-launch tap + a user-owned credential shim for private asset downloads, "isolated for deletion at public launch"stacklok/mecatlis public, which is days away. Avoids building and then deleting a credential workaround.#890: Darwin ARM64 only, Intel macOS and Linux explicit non-goals;#892AC3 wants Intel rejected#893: begin with a reviewable tap PRmainmainis unprotected.#891's ACs are met with one wording difference: it specifiesmecatl_vX.Y.Z_darwin_arm64.tar.gzplus a per-file.sha256sidecar; GoReleaser strips the leadingvand emits a singlechecksums.txtcovering every artifact. The archive URL is still immutable underreleases/download/vX.Y.Z/.Type of change
Test plan
Baseline checks
task lint) — 0 issues across all seven modulestask test) — exit 0, zero failuresgo run ./cmd/mecademo) — turn → tool.call → permission.ask + approval → resulttask docs) — 372 docs, 3556 refs, 0 broken/orphan/unreachabletask site:build) — clean underonBrokenLinks: 'throw';/docs/installrenderstask api:check) — runs undertask test; no engine API touchedtask ac-trace-strict) — n/a, no plan/panel-review— not run; available on requestAdditionally:
actionlintclean;check-reusable-pins.shandcheck-action-templates.shpass.task release:check+release:snapshot+release:verify: four archives built, both binaries at each archive root,--versionreports the stamp (notdev+<sha>),brew stylereports no offences.smoke-darwin-arm64job's exact logic was run locally on darwin/arm64: both binaries build CGO-free, execute, and report<name> v0.0.0-cismoke.Not runnable before merge, stated plainly:
brew install stacklok/tap/mecatlcannot be exercised until the formula exists andstacklok/mecatlis public — Homebrew's downloader does not authenticate.cosign verify-blobandgh attestation verifylikewise need the workflow's OIDC token, so a local snapshot has nothing to verify.brew auditrequires the formula to live in a real tap, so onlybrew stylewas run.One environment note:
.github/scripts/lint-vet-workflow_test.shcannot run on macOS (it usesmapfile, which needs bash 4+; macOS ships 3.2). Its assertions were hand-verified instead —analysisgained nogo vet, no|| trueand nocontinue-on-error, and thevetjob whose shell body it pins byte-for-byte is untouched.Changes
.goreleaser.yamlbrewsblock, changelog and release config..github/workflows/release.ymlpublish-clijob;concurrencyre-keyed on the tag; header/permissions comments..github/workflows/ci.ymlsmoke-darwin-arm64job;goreleaser checkvalidation inanalysis.Taskfile.ymlGORELEASER_VERSION+release:check/release:snapshot/release:verify; stale Go-version comment..gitignore/dist/.user-docs/install.mduser-docs/mecatui/getting-started.mdbrew install;task builddemoted to a subsection.README.md,docs/usage/install.md,docs/usage.mduser-docs/filesbin/→ bare-command sweep..claude/skills/cut-release/SKILL.mdUser-facing change
brew install stacklok/tap/mecatlinstallsmecatedandmecatuion macOS (Apple silicon and Intel) and Linux (x86_64 and arm64). Every release also attaches four verifiable archives to its GitHub Release.mecademo,mecatequiandmecak8sare not in the formula and remain source- or image-only.The formula will 404 until
stacklok/mecatlis public — Homebrew sends no credentials, so this affects everyone, not just non-members. It is inert in the meantime: the tap has no formula-validating CI, and a tap is independent Ruby files with no cross-formula resolution, sothvandmodelithcannot be affected.Special notes for reviewers
Five details worth scrutiny, each guarding a silent failure:
internal/buildinfo.BuildID, notmain.version— the latter does not exist in this repo, and GoReleaser's default ldflags would stamp four nonexistentmain.*symbols, leaving every tap user withdev+<sha>. It usesv{{ .Version }}because GoReleaser strips the leadingvthat ko and the Taskfile both stamp. Three things now pin this: the formula'stest:block,task release:verify, and the new macOS smoke job.publish-clichecks out atfetch-depth: 0, unlike every ko job'sfetch-depth: 1— GoReleaser needs the full tag graph, and depth-1 also leaves.git/shallow. That also suppliesorigin/mainfor the tag-on-main guard without a credentialed fetch (verified inactions/checkoutat the pinned SHA:fetchDepth <= 0takes the all-history refspec unconditionally for tags). Note the guard usesorigin/main, not modelith'sgit fetch --no-tags origin main, which would fail here underpersist-credentials: falseon an internal repo.concurrencywas re-keyed fromgithub.refto the tag. Onworkflow_dispatchgithub.refisrefs/heads/mainbut on a tag push it isrefs/tags/vX.Y.Z, so the two paths sat in different groups — a dispatch re-publish could race the original run. Tolerable for idempotent ko jobs; not for a Release object and a cross-repo commit.brews:is deprecated upstream in favour ofhomebrew_casks, and is kept deliberately: the tap is aFormula/tap and casks must live inCasks/. Migrating is an org-wide move across three repos. Consequence:goreleaser checkcan exit 2, so both the CI step andtask release:checktolerate0|2and fail only on 1.gomod:block, deliberately.gomod.proxy: truewould fetchgithub.com/stacklok/mecatl/enginefromproxy.golang.org, where it does not exist — the root reaches it viareplace … => ./engine. That would be a total release failure. Relatedly,go run github.com/goreleaser/goreleaser/v2@<ver>does not build on this toolchain (its graph resolvesgrpc v1.80.0against anx/netlackinghttp2.TrailerPrefix), which is why the Taskfile expectsgoreleaseron PATH, likeko. CI is unaffected —goreleaser-actiondownloads a prebuilt binary.The Homebrew-prefix guidance in
session-storage-operations.mdis prose outside the code fences.cmd/mecated/session_storage_continuity_scenario9_test.goparses those fenced blocks and asserts the exact/usr/local/bin/mecatedargv. All four fenced blocks in that file are byte-identical tomain(hash-compared before and after editing).Coordination risk with no automated gate: the archive
name_template,checksums.txt, the.sigstore.jsonsuffix, and the cosign--certificate-identity-regexpare quoted verbatim inuser-docs/install.mdand the cut-release skill. They agree with the committed config today, but nothing enforces that they keep agreeing.Credentials are already in place and reuse toolhive's App:
stacklok/mecatl'sHOMEBREW_TAP_APP_CLIENT_IDis byte-identical to toolhive's, so the App's installation onhomebrew-tapand itscontents: writegrant are proven by toolhive's own releases rather than merely configured. One consequence worth noting: a single App's private key now sits in two repositories' secrets.🤖 Generated with Claude Code