Skip to content

fix(release): check the Homebrew formula from a local tap (#652) - #1462

Merged
godofecht merged 1 commit into
mainfrom
fix/652-qualify-brew-local-tap
Oct 8, 2026
Merged

godofecht merged 1 commit into
mainfrom
fix/652-qualify-brew-local-tap

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Part of #652 (v2.0.0 release qualification on macOS).

Problem

./flow tool qualify_release --dry-run --mode full on macOS (main c9ee072f, Homebrew 7.0.8) passed every gate and then failed formula_structural:

packaging/homebrew/Formula/flow.rb:1:1: C: Style/Documentation: Missing top-level documentation comment for class Flow.
packaging/homebrew/Formula/flow.rb:13:3: W: Lint/DuplicateMethods: Method Flow#install is defined at both /opt/homebrew/Library/Taps/flooooooooooow/homebrew-flow/Formula/flow.rb:14 and packaging/homebrew/Formula/flow.rb:13.
1 file inspected, 4 offenses detected
flow tool qualify_release: brew style failed on packaging/homebrew/Formula/flow.rb

Homebrew applies its formula rules only inside a tap. On a bare file path brew style runs generic RuboCop and loads the installed tap, and brew audit rejects --offline (Error: invalid option: --offline). Installing from a bare path is refused too, so the documented commands did not work.

Change

  • validate_formula_path copies the formula into a throwaway local tap (flowqualify/check under brew --repository), runs brew style and brew audit --strict (offline by default) on it, and removes the tap directory on every path.
  • docs/project/release-qualification.md, docs/project/RELEASING.md and packaging/homebrew/README.md use the same local-tap commands for style, audit, install and test.

Proof (macOS 26 arm64, Homebrew 7.0.8)

  • Before: --mode full result fail with the output above.
  • After: ./flow tool qualify_release --check-formula --mode full prints 1 file inspected, no offenses detected and formula.brew: pass, exit 0. No flowqualify tap is left behind.
  • The check can fail: a copy whose desc starts with an article and ends with a full stop fails with FormulaAudit/Desc offenses, which the old bare-path run never applied.
  • ./flow tool tests/scripts/qualify_release.flow 13/0, ./flow tool tests/tools/run.flow pass, doc_links and script_refs pass.

No tag, release or tap push. Risk: the check now writes and removes one directory under the Homebrew repository's Taps folder.

qualify_release --mode full ran `brew style` and `brew audit --strict
--offline` on the formula's file path. Current Homebrew applies formula
rules only inside a tap: on a bare path `brew style` runs generic RuboCop
and also loads the installed flooooooooooow/flow tap, so it reported
Style/Documentation and Lint/DuplicateMethods, and `brew audit` rejects
--offline. --mode full failed on macOS for a valid formula.

The qualifier now copies the formula into a throwaway local tap, runs
style and audit there (audit is offline by default), and removes it.
The release docs use the same local-tap commands for install and test.
@godofecht
godofecht enabled auto-merge October 8, 2026 00:40
@godofecht

Copy link
Copy Markdown
Contributor Author

Full macOS run on this branch head 0593ad2f (macOS 26 arm64, Homebrew 7.0.8): ./flow tool qualify_release --dry-run --mode full --promote-rc exits 0. Gates: sync_version, changelog_check, stability_manifest, doc_examples (strict), conformance, bootstrap_verify, formula.brew all pass. Artifacts flow-v2.0.0.tar.gz sha256 01725608...1789 and .zip; record result: pass, promotion: rc, v2.0.0-rc.1 recorded and not tagged. On main c9ee072f without this change the same run ends result: fail at brew style.

@godofecht
godofecht added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit bbc6aa9 Oct 8, 2026
28 checks passed
@godofecht
godofecht deleted the fix/652-qualify-brew-local-tap branch October 12, 2026 23:03
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