feat(binary): brew tap formula + release automation hook - #624
Merged
KnockOutEZ merged 2 commits intoSep 8, 2026
Conversation
…s a tree Both acquisition paths hand consumer-smoke.sh a symlink rather than the executable: install.sh links ~/.local/bin/wigolo at an absolute path inside ~/.wigolo/dist, and brew links <prefix>/bin/wigolo at a relative path inside the keg. Deriving the installed tree from dirname of the link gave ~/.local or the Homebrew prefix, so the G1 arm copied the wrong tree — and on the install.sh leg the copied absolute symlink pointed back at the untouched original, which made the arm re-run the binary from its original location and call that relocation. On the brew leg the same mistake copied the Homebrew prefix and the arm failed outright, which is how it surfaced.
…sumer smoke The formula lives in KnockOutEZ/homebrew-wigolo and github.token is scoped to this repository, so the PR is opened by the tap's own workflow with the tap's own GITHUB_TOKEN, from a public release feed it can read without credentials. That workflow also runs hourly, so this job is the accelerator and the schedule is the guarantee: with HOMEBREW_TAP_TOKEN present the bump PR appears in seconds, without it the identical PR appears within the hour, and a missing token can never fail a release whose assets are already published. It needs the consumer smoke because the bump asks the tap to point users at these artifacts, and it carries no instruction because a scratch tag on the binary-only channel is a real published prerelease — the tap re-resolves its own target, preferring stable.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes wigolo-studio-run#507 (BIN-6, single-binary mini-spec §5).
brew install KnockOutEZ/wigolo/wigolonow works, against a real published prerelease, with the tap's version bump automated.What shipped
The tap —
KnockOutEZ/homebrew-wigolo(external by construction, named in this issue'slane-extra:rule):scripts/formula.sh <tag>regenerates the whole formula from that release's ownSHA256SUMS. Everything that differs between releases is foururl/sha256pairs and a version; a positional sed over a Ruby file can half-apply that, generating from the one authoritative input cannot. The version is read out of an asset name, so the formula can never claim a version the assets it points at do not carry..github/workflows/bump.ymlruns that script and opens the version-bump PR, onrepository_dispatch, an hourlyschedule, andworkflow_dispatch.Core —
.github/workflows/binary-release.ymlgains atapjob that pokes the tap once a release has passed the consumer smoke.Why the PR is opened by the tap and not by the release workflow (A-507-1)
Spec §5 says "the release workflow opens the version-bump commit against the tap". A core job can only write to the tap with a cross-repo token, and a token expires, gets revoked, and is missing exactly when a release is cut — the literal design makes the bump's availability equal to the credential's. Inverted: the tap opens the PR with its own
GITHUB_TOKENoff the public release feed, its hourly schedule is the guarantee, and thetapjob here is the accelerator. WithHOMEBREW_TAP_TOKENthe PR appears in seconds; without it the identical PR appears within the hour; and its absence exits 0 with a notice rather than failing a release whose assets are already published.The job needs
smoke, because the bump asks the tap to point users at these artifacts and the consumer smoke is the evidence they are installable. The poke deliberately cannot name a tag: all three triggers resolve one rule — newest release carrying binary assets, stable preferred over prerelease — because a scratch tag on the binary-only channel is a real published prerelease, and a payload the tap obeyed would let one become the formula ahead of a stable release. Recorded inDECISIONS-AUTO.mdwith its reversal condition.Acceptance
1.
brew installyields a workingwigolo --version+ MCP handshake on the host. Againstbinary-v0.2.1-sd507.1, a real published prerelease (5-target build + platform-native verify + publish + 3-OS consumer smoke, all green — run34192182228). The battery istests/integration/binary/consumer-smoke.sh, run underclean-path.shso no Node is onPATH:2. Checksums match
SHA256SUMS;brew audit --strictclean. The checksums are not compared toSHA256SUMS, they are generated from it byscripts/formula.sh.brew audit --strictexits 0 with zero warnings and zero waivers — two orderings it flagged are fixed rather than waived (livecheckbefore the platform blocks,skip_cleanbeforeinstall).brew test wigologreen.3. The automation step is exercised on a scratch tag. End to end and live: scratch tag → release workflow → tap workflow → tap PRs #2, #3 and #4, each opened by the automation and merged. Two defects in the automation only a live run could show, both fixed here:
Formula/does not exist on the first bump into an empty tap (git carries no empty directories), and an untracked formula is invisible togit diff --quiet— so the run that mattered most reported "nothing to bump". A third,gh pr viewanswering with the merged PR on a reused branch name and skipping creation, is now an explicit--state opencheck.The named-blocker + follow-up pair also exists, for the accelerator half only: no session can mint the credential (
gh auth tokenyields agho_OAuth token with broadreposcope and noworkflowscope; a minimum-scope fine-grained PAT or App installation token needs interactive browser auth), andwigolo-studio-run#522is filedreadyin Q-lane for it. The missing token costs latency, not the bump.A defect in #509's shipped smoke, found only by standing where brew stands
consumer-smoke.shderived the installed tree fromdirnameof the entry point, but both acquisition paths hand it a symlink: install.sh links~/.local/bin/wigoloat an absolute path, brew links<prefix>/bin/wigolointo the keg relatively. So G1 copied~/.localor the whole Homebrew prefix. On the brew leg that failed outright, which is how it surfaced; on the install.sh leg the arm had been passing vacuously, because the copied absolute symlink pointed back at the untouched original and the arm re-ran the binary from its original location and called that relocation.Fixed by resolving the entry symlink first, and proven with a base-vs-tip differential on a fixture whose relocation genuinely breaks (a stand-in that resolves its own realpath and refuses to run anywhere but where it was built):
Suites
npm test12080 pass / 1 fail ·npx tsc --noEmitclean ·npm run typecheck:studioclean ·npm run gate:studioclean (debt holds at baseline 341).The one red is
tests/unit/telemetry/queue.test.ts:211—expected 111.61 to be less than 100. That is the #506 wall-clock-budget flake class, already recorded inknown-issues.md, measured red on Windows at the same line and the same 100 ms budget at 479.62. Green in isolation (19/19), and this branch's diff is one workflow file plus a shell script, so nothing in it can reach telemetry.Notes
v*release ships binaries.src/change.