Skip to content

Pin the Homebrew cask to v0.2.9 with its real sha256 - #292

Draft
MaxGhenis wants to merge 5 commits into
mainfrom
fix/cask-v0.2.9-sha256
Draft

MaxGhenis wants to merge 5 commits into
mainfrom
fix/cask-v0.2.9-sha256

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Draft until the independent review finishes (round 2 is queued). The cask checks on a macOS runner all pass (see Validation). Max's go is to mark this ready and merge once the review finishes.

What changes

  • Casks/openmessage.rb:
    • version "0.2.0" → "0.2.9" and sha256 :no_check → the real hash. On main the cask installs the v0.2.0 DMG without checking its hash. This repo is its own tap (brew tap maxghenis/openmessage https://github.com/MaxGhenis/openmessage), so merging this ships 0.2.9 to everyone who tapped it.
    • brew style failed on main's cask with three autocorrectable offenses, all on lines this PR hadn't touched. Commit 3 fixes them:
      • the homepage gets a trailing slash;
      • depends_on macos: :sonoma is added, because v0.2.9 sets LSMinimumSystemVersion 14.0 and Homebrew now requires a macOS dependency on casks with an app stanza;
      • the zap paths are sorted. Their bundle id is still wrong; see below.
  • docs/release-checklist.md: a new "7. Homebrew Cask" section. It says to:
    • bump the cask after the release workflow publishes;
    • check the hash against GitHub's asset digest, with its sha256: prefix stripped. It is also the fallback when a hand-cut release has no SHA256SUMS. The steps are a runnable bash block, which prints matching hashes for v0.2.9;
    • keep depends_on macos: matching the release's LSMinimumSystemVersion (commit 4);
    • cut a new tag rather than replace a published DMG. Replacing one breaks fresh installs until the bump merges; if it can't be avoided, re-run the tag's original release run and bump right after (commit 5).

Where the hash comes from

  • v0.2.9 is the latest release, and no newer tag, draft or prerelease exists (checked 2026-11-18).
  • The hash a0f96618f65b4ecbc7bbe005229040fd70ccaa9e760b0b48761d36a6f7bd9ad9 is the OpenMessage.dmg line of v0.2.9's SHA256SUMS, fetched alone with gh release download v0.2.9 --pattern SHA256SUMS. The DMG itself was not downloaded on a maintainer Mac.
  • The hash matches the sha256: digest GitHub reports for the asset.
  • All v0.2.9 assets were uploaded together in the single release run (24740602667, attempt 1), and none has been replaced since.
  • The third-party remusa/homebrew-tap pins the same hash for 0.2.9.
  • On a fresh macOS runner, brew install downloaded the DMG and Homebrew verified it against this hash (Validation).

Tap check

  • MaxGhenis/homebrew-tap holds only Casks/rambar.rb (plus a README) and has no PRs.
  • No other MaxGhenis repo matches "homebrew" or "tap".
  • Homebrew/homebrew-cask has no openmessage cask and no PR for one.
  • So this repo holds the only official copy. Third-party copies exist, such as remusa/homebrew-tap at 0.2.9; they aren't ours to bump.

Found, not fixed here

  • Wrong zap paths. The stanza names com.openmessage.OpenMessage, but release builds ship as com.openmessage.app. That id is in v0.2.9's Info.plist, and release.yml now enforces it. The CI install below confirms the installed app's id.
    • The app is unsandboxed and uses UserDefaults.standard, so its preferences go to ~/Library/Preferences/com.openmessage.app.plist, which --zap misses.
    • It also uses URLSession.shared and a default WKWebView store, so ~/Library/Caches/com.openmessage.app and ~/Library/WebKit/com.openmessage.app are likely too. That is inferred from Apple's defaults, not observed.
    • Fixing this changes what --zap deletes on users' machines, so it belongs in its own PR.
  • Stale header comment. It speaks of "the upstream PR", but there is no homebrew/cask submission.
  • Dispatched releases build the wrong ref. release.yml takes GITHUB_REF_NAME ahead of inputs.tag and checks out the dispatched ref, so a workflow_dispatch from main builds main. Publish multi-architecture container images, improve documentation and UX #279 appears to change this; this PR's checklist wording holds either way.
  • Tap trust for users. Since Homebrew 6.0.0, a non-official tap needs brew trust before Homebrew will load it for audit, fetch or a short-name install. The header's fully qualified brew install --cask maxghenis/openmessage/openmessage trusts this one cask on its own, as CI confirmed, so the instructions still work.

Validation

  • Throwaway CI on branch ci-scratch/cask-check-292, which has been deleted; the runs stay readable. Nothing ran on a maintainer Mac.

    • Round 1 (run 44372333271) found the three brew style offenses.
    • Round 3 (run 44383567135), at head 0bba657 (commit 4 changes only the checklist), on macOS 26.7.2 with Homebrew 7.0.13, passed every gate:
      • brew style found no offenses.
      • brew install --cask maxghenis/openmessage/openmessage worked with no prior brew trust, and Homebrew verified the freshly downloaded DMG against the pinned hash.
      • The installed /Applications/OpenMessage.app is com.openmessage.app 0.2.9 with minimum OS 14.0, and spctl accepts it as "Notarized Developer ID".
      • brew uninstall --cask worked.
      • brew audit --cask was clean plain, with --online, and with --strict --online.
      • A copy of the cask with a zeroed sha256 was rejected with "reports different checksum".
    • On Linux brew, style and the plain audit were also clean.
  • Three skeptic agents tried to refute the hash, the checklist and this body. This was in-session, so it is supporting evidence only. Their notes fixed four wording points in the checklist (commit 2).

  • Independent review, round 1 (Subfleet job 20261118-151503-om-cask-292, at head 83c913e), returned REQUEST_CHANGES. It raised three P1s and a P2, all in checklist section 7, and commit 5 fixes all four:

    • the digest fallback would have pasted sha256:<hex> into the cask;
    • --dir <empty dir> wasn't valid shell;
    • it was wrong that the hash doesn't exist before publishing;
    • the section didn't warn that replacing a pinned DMG breaks fresh installs.

    The reviewer confirmed the hash, the release, the CI evidence and the tap scope.

  • Independent review, round 2 (full): Subfleet job 20261119-190355-om-cask-292-r2 at head 72ecb9b, queued.

  • git merge-file merges this PR's checklist cleanly with Publish multi-architecture container images, improve documentation and UX #279, Rebuild openmessage.ai around verified claims #283 and Prepare v0.3.0 release from upstream main #180, which edit the same file.

🤖 Generated with Claude Code

MaxGhenis and others added 5 commits November 18, 2026 13:38
The cask still named v0.2.0 with `sha256 :no_check`, so installing it
from this repo's tap fetched the v0.2.0 DMG without checking its hash.
Set version 0.2.9, the latest release, and the OpenMessage.dmg hash
from that release's SHA256SUMS, which matches the digest GitHub reports
for the asset.

Add a Homebrew Cask section to the release checklist: bump the cask
after the release workflow publishes, and again if the tag's assets
are replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Say that the asset digest carries a `sha256:` prefix, and fall back to
  it when a hand-cut release has no SHA256SUMS (v0.1.0 has none).
- "Previous release" was wrong: until the bump merges, the cask installs
  whatever version main pins (0.2.0 today, nine releases back).
- Name re-running the tag's own release run, not "a re-run of the
  release workflow": a workflow_dispatch from main builds main.
- Third-party taps carry copies of the cask, so call this repo's copy the
  only official one rather than the only one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brew style on a macOS runner flagged three autocorrectable offenses, all
on lines this PR had not touched:

- Cask/HomepageUrlStyling: the homepage needs a slash after the domain.
- Homebrew/OSDependsOn: a cask with an `app` stanza needs a macOS
  dependency. Use `depends_on macos: :sonoma`, since v0.2.9's Info.plist
  sets LSMinimumSystemVersion 14.0; the cop rejects the old
  `">= :sonoma"` string form.
- Cask/ArrayAlphabetization: sort the zap paths. Their bundle id is
  still the wrong one (com.openmessage.OpenMessage, not
  com.openmessage.app); that fix changes what --zap deletes, so it gets
  its own PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 3 added `depends_on macos: :sonoma` to the cask, so the checklist's
bump step now says to keep it matching the release's
LSMinimumSystemVersion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Independent review (round 1) of this section found:

- The digest fallback would put `sha256:<hex>` into the cask, which
  Homebrew compares as a whole string and rejects. The digest query
  now drops the prefix with `ltrimstr("sha256:")`, and the text says
  the cask takes exactly the 64 hex digits.
- `--dir <empty dir>` is not valid shell. The steps are now a runnable
  block with `tag` and `checksums_dir` variables; it prints matching
  hashes for v0.2.9.
- "The DMG's hash does not exist before then" was wrong: the workflow
  computes it before upload. The reason to wait is that the cask must
  pin the bytes users download.
- Replacing a pinned DMG breaks fresh installs until the new hash
  reaches main, and --clobber deletes the old asset first. Prefer a new
  tag; if a replacement can't be avoided, re-run all jobs of the tag's
  original release run (within GitHub's 30-day re-run window), and
  bump the cask right after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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