Skip to content

feat(dist): Homebrew cask + curl|sh installer + completions packaging (AD-8 / P4-PROD-05)#105

Merged
Reederey87 merged 1 commit into
mainfrom
feat/dist-tap-installer
Jul 5, 2026
Merged

feat(dist): Homebrew cask + curl|sh installer + completions packaging (AD-8 / P4-PROD-05)#105
Reederey87 merged 1 commit into
mainfrom
feat/dist-tap-installer

Conversation

@Reederey87

@Reederey87 Reederey87 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Homebrew tap publishing: new homebrew_casks block (cask, not formula — brews: is deprecated since GoReleaser v2.16 and casks now cover Linux) targeting Reederey87/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|sh installer: scripts/install.sh — POSIX sh, os/arch detection, latest-release resolution via the releases/latest redirect (no API token), DEVSTRAP_VERSION/DEVSTRAP_INSTALL_DIR overrides (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/sha256sum fails open on empty stdin, so the pipeline shape mattered), /usr/local/bin~/.local/bin fallback, never sudo.
  • Completions packaged: GoReleaser before hooks pre-generate bash/zsh/fish completions into every archive (generation is stateless).
  • Drift-gate gap closed: .goreleaser.yaml and scripts/** were neither spec-tracked nor work-log-gated; now both (spec/03 tracks_code + requiresWorkLog, pinned by TestReleaseTierFilesRequireWorkLog).
  • README §Install reordered (brew → curl|sh → binaries → source); RELEASING.md gains the tap/PAT prerequisites and post-release smoke checklist; ledger P4-PROD-05 marked partial (closes when v0.1.0 publishes).

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.rb renders with postflight + completion stanzas, no deprecation warnings
  • Installer smoke: positive install (+devstrap version), corrupted-artifact rejection, missing-checksums-entry rejection
  • go test -race ./..., golangci-lint run, spec-drift, sh -n all green

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Homebrew installation support for macOS releases.
    • Added a simple curl | sh installer with version selection and checksum verification.
    • Release downloads now include shell completions and clearer install options.
  • Documentation

    • Updated setup and release docs with step-by-step install and verification guidance.
    • Expanded release notes to reflect the new distribution options.

… (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>
@Reederey87 Reederey87 enabled auto-merge (squash) July 5, 2026 05:50
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds 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.

Changes

Distribution packaging and installer

Layer / File(s) Summary
GoReleaser completions and Homebrew cask config
.goreleaser.yaml, .github/workflows/release.yml, .gitignore
Adds a before-hook to generate shell completions, includes LICENSE/README/completions in archives, configures homebrew_casks publishing with a quarantine-strip post-install hook, extends the release footer, adds HOMEBREW_TAP_GITHUB_TOKEN to the workflow env, and ignores the generated completions directory.
curl|sh installer script
scripts/install.sh
New POSIX installer resolving OS/arch and release tag, downloading archive and checksums, verifying SHA-256, extracting, selecting/writing an install directory without sudo, checking PATH, and running `devstrap version`.
Spec-drift work-log gating
internal/specdrift/specdrift.go, internal/specdrift/specdrift_test.go
Extends `requiresWorkLog` to flag `scripts/` and `.goreleaser.yaml` changes, and adds `TestReleaseTierFilesRequireWorkLog` verifying the gating behavior.
Documentation and spec updates
README.md, RELEASING.md, docs/audits/README.md, spec/02_PRODUCT_REQUIREMENTS.md, spec/03_SYSTEM_ARCHITECTURE.md, spec/11_IGNORE_AND_LOCAL_GARBAGE.md, spec/14_MVP_ROADMAP_AND_BACKLOG.md, spec/16_TEST_PLAN.md, spec/18_WORK_LOG.md
Documents Homebrew/curl install paths, release prerequisites and smoke checklist, updated backlog/roadmap statuses, a new "Distribution" spec section, tracked-file metadata, and a new work-log entry.

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
Loading
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
Loading

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,
Completions bundled, checksums fast,
No sudo needed, PATH announced,
The bunny's build is now pronounced!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is informative, but it omits the required Tests and Safety Checklist sections from the template. Add the missing Tests and Safety Checklist sections using the repository's checkbox format, and replace Review with the expected template headings.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main distribution and packaging changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dist-tap-installer

Comment @coderabbitai help to get the list of available commands.

@Reederey87 Reederey87 merged commit 5b5728d into main Jul 5, 2026
6 of 7 checks passed
@Reederey87 Reederey87 deleted the feat/dist-tap-installer branch July 5, 2026 05:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d9a8312 and 28b0613.

📒 Files selected for processing (15)
  • .github/workflows/release.yml
  • .gitignore
  • .goreleaser.yaml
  • README.md
  • RELEASING.md
  • docs/audits/README.md
  • internal/specdrift/specdrift.go
  • internal/specdrift/specdrift_test.go
  • scripts/install.sh
  • spec/02_PRODUCT_REQUIREMENTS.md
  • spec/03_SYSTEM_ARCHITECTURE.md
  • spec/11_IGNORE_AND_LOCAL_GARBAGE.md
  • spec/14_MVP_ROADMAP_AND_BACKLOG.md
  • spec/16_TEST_PLAN.md
  • spec/18_WORK_LOG.md

Comment thread docs/audits/README.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) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Suggested change
| 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.

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