feat(dist): Homebrew cask + curl|sh installer + completions packaging (AD-8 / P4-PROD-05)#105
Conversation
… (AD-8 / P4-PROD-05) GoReleaser now pre-generates bash/zsh/fish completions into every archive and publishes a Homebrew cask to Reederey87/homebrew-devstrap on stable tags (skip_upload: auto; cask not formula -- brews: is deprecated since GoReleaser v2.16 and casks now cover Linux; unsigned binaries get the documented quarantine-strip postflight until P4-SEC-05 signing lands). scripts/install.sh is a POSIX curl|sh installer that verifies checksums.txt BEFORE extracting and never sudos. release.yml passes the tap PAT. .goreleaser.yaml and scripts/** are now spec-tracked (spec/03) and work-log-gated (specdrift). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds Homebrew cask publishing and a curl|sh installer script for DevStrap distribution, wires a Homebrew-tap-scoped GitHub token into the release workflow, extends spec-drift work-log gating to cover release-tier files (.goreleaser.yaml, scripts/**), and updates documentation and spec files to reflect the new distribution channels. ChangesDistribution packaging and installer
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant Workflow as release.yml
participant GoReleaser
participant HomebrewTap as homebrew-devstrap
participant GitHubRelease
Workflow->>GoReleaser: run with HOMEBREW_TAP_GITHUB_TOKEN
GoReleaser->>GoReleaser: generate completions/*
GoReleaser->>GitHubRelease: publish archives + checksums
GoReleaser->>HomebrewTap: push devstrap cask
sequenceDiagram
participant User
participant InstallScript as install.sh
participant GitHubAPI
participant Filesystem
User->>InstallScript: run curl | sh
InstallScript->>GitHubAPI: resolve release tag
GitHubAPI-->>InstallScript: tag/version info
InstallScript->>GitHubAPI: download archive + checksums.txt
InstallScript->>InstallScript: verify sha256
InstallScript->>Filesystem: extract and install devstrap binary
InstallScript->>User: print PATH note if needed
InstallScript->>Filesystem: run devstrap version
Related Issues: Not specified in provided information. Related PRs: Not specified in provided information. Suggested labels: distribution, release-tooling, documentation Suggested reviewers: Not specified in provided information. 🐰 A tap, a script, a cask now cast, 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/audits/README.md`:
- Line 167: The `P5-DX-01` reference in the `docs/audits/README.md` audit table
is inconsistent with the rest of the document because it is still listed as open
in Pass 5 while this row says the completions work shipped earlier. Update the
audit entry that mentions `P4-PROD-05` so it either moves the `P5-DX-01` finding
to the “Recently shipped” section or removes that cross-reference entirely,
keeping the status text aligned across the README.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e61df357-1970-4c03-b823-da43f83b4e55
📒 Files selected for processing (15)
.github/workflows/release.yml.gitignore.goreleaser.yamlREADME.mdRELEASING.mddocs/audits/README.mdinternal/specdrift/specdrift.gointernal/specdrift/specdrift_test.goscripts/install.shspec/02_PRODUCT_REQUIREMENTS.mdspec/03_SYSTEM_ARCHITECTURE.mdspec/11_IGNORE_AND_LOCAL_GARBAGE.mdspec/14_MVP_ROADMAP_AND_BACKLOG.mdspec/16_TEST_PLAN.mdspec/18_WORK_LOG.md
| | P4-QUAL-07 | P3 | Enable resource/context-leak linters (`bodyclose`, `sqlclosecheck`, `contextcheck`, …) | | ||
| | P4-PROD-04 | P2 | `devstrap service install` (LaunchAgent/systemd unit wrapping `run-loop`) | | ||
| | P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions (P5-DX-01 is a prerequisite) | | ||
| | P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions — **partial 2026-07-05**: cask publishing (`homebrew_casks` → `Reederey87/homebrew-devstrap`, `skip_upload: auto`), checksum-verifying `scripts/install.sh`, and completions-in-archives shipped; closes when the `v0.1.0` tag publishes them (P5-DX-01 completions shipped earlier) | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Reconcile the P5-DX-01 reference.
This row says the completions work shipped earlier, but the same file still lists P5-DX-01 as open in Pass 5. Either move that finding to “Recently shipped” or drop the cross-reference here.
Fix
-| P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions — **partial 2026-07-05**: cask publishing (`homebrew_casks` → `Reederey87/homebrew-devstrap`, `skip_upload: auto`), checksum-verifying `scripts/install.sh`, and completions-in-archives shipped; closes when the `v0.1.0` tag publishes them (P5-DX-01 completions shipped earlier) |
+| P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions — **partial 2026-07-05**: cask publishing (`homebrew_casks` → `Reederey87/homebrew-devstrap`, `skip_upload: auto`), checksum-verifying `scripts/install.sh`, and completions-in-archives shipped; closes when the `v0.1.0` tag publishes them |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions — **partial 2026-07-05**: cask publishing (`homebrew_casks` → `Reederey87/homebrew-devstrap`, `skip_upload: auto`), checksum-verifying `scripts/install.sh`, and completions-in-archives shipped; closes when the `v0.1.0` tag publishes them (P5-DX-01 completions shipped earlier) | | |
| | P4-PROD-05 | P2 | Distribution: Homebrew tap + `curl\|sh` installer + shell completions — **partial 2026-07-05**: cask publishing (`homebrew_casks` → `Reederey87/homebrew-devstrap`, `skip_upload: auto`), checksum-verifying `scripts/install.sh`, and completions-in-archives shipped; closes when the `v0.1.0` tag publishes them | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/audits/README.md` at line 167, The `P5-DX-01` reference in the
`docs/audits/README.md` audit table is inconsistent with the rest of the
document because it is still listed as open in Pass 5 while this row says the
completions work shipped earlier. Update the audit entry that mentions
`P4-PROD-05` so it either moves the `P5-DX-01` finding to the “Recently shipped”
section or removes that cross-reference entirely, keeping the status text
aligned across the README.
Summary
homebrew_casksblock (cask, not formula —brews:is deprecated since GoReleaser v2.16 and casks now cover Linux) targetingReederey87/homebrew-devstrap,skip_upload: auto(rc tags never touch the tap), with the documented quarantine-strip postflight for unsigned binaries (signing tracked under P4-SEC-05/P4-QUAL-05). Install:brew install Reederey87/devstrap/devstrap— completions install with the cask.curl|shinstaller:scripts/install.sh— POSIX sh, os/arch detection, latest-release resolution via the releases/latest redirect (no API token),DEVSTRAP_VERSION/DEVSTRAP_INSTALL_DIRoverrides (unprefixed versions normalized), sha256 verification before extraction with the matching checksum line extracted first (a missing entry is a hard fail — this machine's/sbin/sha256sumfails open on empty stdin, so the pipeline shape mattered),/usr/local/bin→~/.local/binfallback, never sudo.beforehooks pre-generate bash/zsh/fish completions into every archive (generation is stateless)..goreleaser.yamlandscripts/**were neither spec-tracked nor work-log-gated; now both (spec/03tracks_code+requiresWorkLog, pinned byTestReleaseTierFilesRequireWorkLog).Review
Dual-reviewed (Codex + opus): Codex's 2 P1s on the checksum pipeline fixed and pinned by a missing-entry smoke case; opus P3 (version normalization) fixed; both otherwise clean.
Validation
goreleaser check+release --snapshot --clean: 4 archives each with binary + LICENSE + README + 3 completions;Casks/devstrap.rbrenders with postflight + completion stanzas, no deprecation warningsdevstrap version), corrupted-artifact rejection, missing-checksums-entry rejectiongo test -race ./...,golangci-lint run, spec-drift,sh -nall green🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
curl | shinstaller with version selection and checksum verification.Documentation