Skip to content

feat(dist): Homebrew formula + auto-bump action (#1237) - #1341

Merged
Sinity merged 1 commit into
masterfrom
feature/dist/homebrew-formula-1237-v2
May 19, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/dist/homebrew-formula-1237-v2

Conversation

@Sinity

@Sinity Sinity commented May 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a Homebrew distribution channel for macOS and Linuxbrew users. The
formula installs from the PyPI sdist (post-#1234 trusted publishing) and
exposes polylogue, polylogued, and polylogue-mcp on PATH. A
companion workflow auto-PRs the formula bump against
Sinity/homebrew-tap on every
vX.Y.Z tag push, mirroring the existing PyPI publish path.

Problem

#1237 (under the #953 broad-distribution umbrella) calls for Homebrew
coverage now that PyPI publishing is stable. The umbrella's strengthening
pass explicitly defers Homebrew until the Python install contract is
stable; that condition is now satisfied. Without an auto-bump, third-
party Homebrew taps rot quickly — most die from the manual maintenance
tax, not from technical issues with the formula.

Solution

  • nix/homebrew-tap-template/Formula/polylogue.rb: in-repo source of
    truth for the formula shape. Uses
    virtualenv_install_with_resources, declares [email protected], adds a
    service do block (opt-in, not auto-started), and a test do block
    that smokes each of the three entrypoints against an empty XDG archive.
  • nix/homebrew-tap-template/README.md: doubles as the tap repo README;
    documents brew tap sinity/tap && brew install polylogue, the
    brew services start polylogued opt-in, and local iteration commands.
  • .github/workflows/homebrew-bump.yml: tag-triggered workflow that
    polls PyPI for sdist availability (up to 10 minutes), computes the
    sha256, rewrites url/sha256 in the template, runs
    brew update-python-resources to regenerate the Python resource
    dependency closure, gates on brew audit --strict --online, then
    opens or refreshes a PR against the tap repo using a
    HOMEBREW_TAP_TOKEN fine-grained PAT secret.
  • docs/installation.md: adds a Homebrew section to the channel table
    and a full subsection with install/service/iteration guidance.
  • docs/release.md: wires the bump workflow into the cut-time flow and
    documents the one-time HOMEBREW_TAP_TOKEN secret requirement.

Decision: formula not cask (CLI-only, not GUI). Decision: own tap not
homebrew-core (per AC — defer core submission until distribution
stabilizes). Decision: bump workflow rewrites url/sha256 from the
in-repo template each run rather than editing the tap formula in place
— guarantees future formula-shape edits flow through this repo, not
the tap.

Verification

nix develop -c devtools verify --quick
# all 18 checks green, exit_code: 0, total_duration_s: 38.85

Pre-push hook also ran devtools verify --quick against the pushed
commit; same result.

Closes #1237
Ref #953

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Homebrew installation is now available with automatic version updates synchronized to releases.
  • Documentation

    • Installation guide expanded with Homebrew setup, daemon service configuration, and archive storage customization options.
    • Release workflow documentation updated to include Homebrew publishing process and required configuration steps.

Review Change Stack

Adds a Homebrew tap template under nix/homebrew-tap-template/ as the
in-repo source of truth for the polylogue formula shape, plus a
.github/workflows/homebrew-bump.yml workflow that auto-PRs a formula
bump against Sinity/homebrew-tap on every vX.Y.Z tag push (mirrors the
PyPI publish in release.yml).

The formula installs from PyPI sdist via virtualenv_install_with_resources,
declares [email protected], exposes polylogue/polylogued/polylogue-mcp on PATH,
ships a `service do ... end` block so users can opt in to the daemon via
`brew services start polylogued`, and includes a test block that smokes
each binary against an empty XDG archive.

The bump workflow polls PyPI for sdist availability, computes sha256,
rewrites url/sha256 in the template, runs `brew update-python-resources`
to regenerate dependency resource blocks, gates on `brew audit --strict
--online`, then opens or refreshes a PR via gh against the tap repo.

docs/installation.md documents the new channel; docs/release.md notes
the new HOMEBREW_TAP_TOKEN secret requirement and links the workflow
into the cut-time flow.

Closes #1237
@Sinity
Sinity merged commit babc820 into master May 19, 2026
2 checks passed
@Sinity
Sinity deleted the feature/dist/homebrew-formula-1237-v2 branch May 19, 2026 01:49
@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fbfe1942-7fd6-485a-8475-e8c838801da0

📥 Commits

Reviewing files that changed from the base of the PR and between 7d8dae1 and ad74136.

📒 Files selected for processing (6)
  • .github/workflows/homebrew-bump.yml
  • AGENTS.md
  • docs/installation.md
  • docs/release.md
  • nix/homebrew-tap-template/Formula/polylogue.rb
  • nix/homebrew-tap-template/README.md

📝 Walkthrough

Walkthrough

This PR delivers complete Homebrew distribution for polylogue: a formula template installed from PyPI via virtualenv, a GitHub Actions workflow automating tap PR creation on release tags, and comprehensive documentation for users and maintainers.

Changes

Homebrew formula distribution and auto-bump

Layer / File(s) Summary
Homebrew formula specification
nix/homebrew-tap-template/Formula/polylogue.rb
Defines the Polylogue formula with [email protected] and Rust dependencies, virtualenv installation from PyPI sdist, polylogued service configuration with logging to var/log/polylogue/, and smoke tests for polylogue --version, polylogued --help, and polylogue-mcp --help.
Homebrew formula auto-bump workflow
.github/workflows/homebrew-bump.yml
GitHub Actions pipeline triggered on version tags; validates version, polls PyPI for sdist availability, rewrites formula url and sha256 placeholders, regenerates Python resources via brew update-python-resources, audits the formula, and creates/rebases an idempotent PR in Sinity/homebrew-tap on a bump/polylogue-${VERSION} branch.
Installation and release documentation
docs/installation.md, docs/release.md, nix/homebrew-tap-template/README.md, AGENTS.md
Installation guide adds Homebrew channel row and dedicated section describing Sinity/homebrew-tap source, auto-bump on tags, virtualenv location, exposed binaries, brew services start polylogued daemon setup, POLYLOGUE_ARCHIVE_ROOT override, and local verify/audit commands. Release docs document required HOMEBREW_TAP_TOKEN secret and behavior on missing credentials. Tap template README covers directory layout, placeholder fields, installation, service configuration, archive paths, and verification steps. Command catalog entry added for devtools render-cli-output-schemas.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🐰 A bundle of joy upon the macOS shore,
Homebrew taps and PyPI at the door!
Auto-bumps dance with every release tag,
No manual work shall burden or drag.
Formula fresh, resources reborn anew—
Polylogue hops through the homebrew stew! 🍺

✨ 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 feature/dist/homebrew-formula-1237-v2

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.

❤️ Share

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

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad74136081

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/installation.md Resolved
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 57.F085 / P2: stale at the checked revision: The erroneous brew services start/info polylogued instructions are absent from the current installation guide. docs/installation.md:15 now installs and verifies the polylogue formula with brew install polylogue and brew test polylogue, rather than treating the daemon executable name as a formula.

Only the rows listed above are dispositioned. Held findings remain open.

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.

feat(dist): Homebrew formula for macOS/Linux with polylogue + polylogued + polylogue-mcp

1 participant