fix(homebrew): correct a style violation in both formulae, and record what blocks each submission

Checked while asking whether the amethyst-nostr cask's review feedback applied
to the two formulae. It does not — but running homebrew-core's own linter over
them turned up a real defect neither had been checked for.

**The style violation, in both files.** `brew style` flags

    Homebrew/FormulaPathMethods: Use formula_opt_prefix("openjdk")
      instead of Formula["openjdk"].opt_prefix

on the `write_env_script` line. Fixed in `amy.rb` and `geode.rb`; both now
report no offenses. It would have been raised on submission.

**A duplicated sentence.** amy.rb opened with "Reference Homebrew formula for
`amy`, the Amethyst CLI." twice, once on line 1 and again on line 3.

**Why they must NOT be made to match the cask.** The cask lost its `livecheck`
block and inline comments on review, so the obvious next step is to do the same
here. That would be wrong, and the header now says so with the evidence:
homebrew-cask and homebrew-core differ. Sampling the live core tap, 127 of 300
formulae with GitHub-release URLs declare `livecheck` (62 using
`:github_latest`), and 109 of 200 carry indented inline comments. `livecheck`
is load-bearing in core — it is what lets BrewTestBot open version-bump PRs, so
stripping it would disable exactly the automation the block exists for.

**geode cannot be submitted under that name.** homebrew-core's
`formula_renames.json` maps "geode" -> "apache-geode", so the token is
permanently reserved and `brew info --formula geode` resolves to Apache Geode.
Submitting needs a different token (`geode-relay`, `amethyst-geode`) plus a
matching change to bump-homebrew-geode-formula.yml. Recorded as a blocker in
the header rather than discovered at PR time.

**amy is unblocked but not ready.** The one-open-AI-PR limit that gated it is
cleared now the cask has merged; the ~70 MB bundle from `:commons` pulling
Compose/Skiko onto the CLI classpath is still the likely review objection, and
`brew audit --new --formula` has not been run end to end.

Verified the enlarged headers cannot confuse the bump workflows: both anchor on
`^  url ` / `^  sha256 ` at a two-space indent, each matches exactly once, and
replaying their `sed` changes those two lines only. `ruby -c` passes on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gs2gi3sZfQ7SHrVm2njLMw
This commit is contained in:
Vitor Pamplona
2026-08-24 11:14:36 -04:00
co-authored by Claude Opus 5
parent 7f0e1f2f90
commit e184db69c7
2 changed files with 36 additions and 5 deletions
+21 -4
View File
@@ -1,8 +1,7 @@
# Reference Homebrew formula for `amy`, the Amethyst CLI.
#
# Reference Homebrew formula for `amy`, the Amethyst CLI. Submit this to
# Homebrew/homebrew-core (new-formula PR) or drop it into a personal tap
# (`Formula/amy.rb`) for an instant `brew install <tap>/amy`.
# Submit this to Homebrew/homebrew-core (new-formula PR) or drop it into a
# personal tap (`Formula/amy.rb`) for an instant `brew install <tap>/amy`.
#
# The url + sha256 below are kept in sync automatically on every stable release
# by .github/workflows/bump-homebrew-formula.yml (it downloads the published
@@ -18,6 +17,24 @@
# to download a pre-built, no-JRE jar bundle and depend on the system openjdk.
# We publish exactly that as `amy-<version>-jvm.tar.gz` (bin/amy + lib/*.jar,
# no bundled runtime) from .github/workflows/create-release.yml.
#
# Submission status (2026-08-24): NOT yet submitted. The `amethyst-nostr` cask
# is live in Homebrew/homebrew-cask, and Homebrew allows a non-maintainer only
# ONE open AI-assisted pull request at a time, so that had to merge first — it
# has. Two things to settle before opening this one:
# * The bundle is ~70 MB because `:commons` drags Compose/Skiko onto the CLI
# classpath. homebrew-core reviewers do question payload size; a
# commons core/ui split would shrink it and smooth review.
# * `brew audit --new --formula` has not been run end to end (it needs the
# published tarball). `brew style` is clean as of this commit.
#
# Do NOT "simplify" this formula to match `desktopApp/packaging/homebrew/
# amethyst-nostr.rb`. That cask had its `livecheck` block and inline comments
# stripped on review, but homebrew-CASK and homebrew-CORE differ here: in a
# sample of 300 core formulae with GitHub-release URLs, 127 declare `livecheck`
# (62 with `:github_latest`), and 109 of 200 carry indented inline comments.
# The `livecheck` below is load-bearing — it is what lets BrewTestBot open the
# version-bump PRs.
class Amy < Formula
desc "Nostr client from the Amethyst project"
homepage "https://github.com/vitorpamplona/amethyst"
@@ -39,7 +56,7 @@ class Amy < Formula
libexec.install Dir["*"]
# Wrapper on PATH that pins JAVA_HOME to Homebrew's openjdk so amy runs
# regardless of the user's own Java setup.
(bin/"amy").write_env_script libexec/"bin/amy", JAVA_HOME: Formula["openjdk"].opt_prefix
(bin/"amy").write_env_script libexec/"bin/amy", JAVA_HOME: formula_opt_prefix("openjdk")
end
test do
+15 -1
View File
@@ -21,6 +21,20 @@
# Note: geode is a long-running relay daemon. Homebrew is a convenient way to
# INSTALL it on a workstation for local testing; for a production deployment
# prefer the Docker image or the .deb/.rpm + systemd unit (see geode/README.md).
#
# BLOCKER (verified 2026-08-24): this formula CANNOT be submitted to
# homebrew-core under the name `geode`. That name is permanently reserved —
# homebrew-core's `formula_renames.json` maps "geode" -> "apache-geode"
# (Apache Geode's old name), so `brew info --formula geode` resolves to that
# package. Submitting would need a different token, e.g. `geode-relay` or
# `amethyst-geode`, which also means renaming the binary's Homebrew-facing name
# and updating .github/workflows/bump-homebrew-geode-formula.yml. Until that is
# decided this file is a reference for a personal tap only, where the name does
# not collide.
#
# As with amy.rb, do NOT strip the `livecheck` block or the comments to match
# the amethyst-nostr cask — homebrew-core conventions differ from
# homebrew-cask's, and `livecheck` is what drives automated version bumps.
class Geode < Formula
desc "Standalone Nostr relay from the Amethyst project"
homepage "https://github.com/vitorpamplona/amethyst"
@@ -42,7 +56,7 @@ class Geode < Formula
libexec.install Dir["*"]
# Wrapper on PATH that pins JAVA_HOME to Homebrew's openjdk so geode runs
# regardless of the user's own Java setup.
(bin/"geode").write_env_script libexec/"bin/geode", JAVA_HOME: Formula["openjdk"].opt_prefix
(bin/"geode").write_env_script libexec/"bin/geode", JAVA_HOME: formula_opt_prefix("openjdk")
end
test do