Repository navigation
Collapse Homebrew cask generator to arm64-only - #2174
Merged
Merged
Conversation
scripts/update-homebrew-cask.ts still carried a full Intel code path that could no longer be exercised after #2169 dropped x86_64 macOS from release CI. Collapses ArchDigest.arch and ARCH_SUFFIX to a single arm64 constant, drops ArchDigestResult.intel and the on_arm/on_intel two-architecture branch in renderCask(), and makes resolveArchDigests() throw a hard error on a missing Apple Silicon asset instead of reporting it as non-fatal (there is no other architecture left to fall back to, so a missing build is no longer a degrade case). renderCask()'s single rendering path now reproduces the platform- support rationale, livecheck strategy note, and MACOSX_DEPLOYMENT_TARGET comment that are already live on NodeSpaceAI/homebrew-nodespace's Casks/nodespace.rb -- the old generator's comments had drifted from what's actually published. Verified byte-for-byte (diff + sha256) that rendering v0.2.0 with the real published digest now reproduces the live file exactly. Rewrites the header docblock, which still claimed the script was "not yet wired into CI" and described HOMEBREW_TAP_TOKEN as something to add "once this is wired into the release flow" -- both stale as of yesterday: the sync-homebrew-cask job in release.yml already runs this script with --push on the release event, gated on build-tauri-macos-arm, with a notify-failure job on failure and homebrew-drift-check.yml as a scheduled backstop. Updates update-homebrew-cask.test.ts to match: removes the both-architectures test case and Intel fixtures, adds a byte-for-byte assertion against the live published cask's exact content. Co-Authored-By: Claude <noreply@anthropic.com>
…p unattested test assertion
release.yml's sync-homebrew-cask job comment still described the old
tolerant behavior (renders an honest single-arch cask on a missing
asset) that the previous commit replaced with a hard failure. Also
drops a defensive test assertion for a phrase ("Intel Mac Support")
that never actually appeared in cask output -- it was release.ts's
now-removed changelog text, not anything renderCask() ever produced.
Co-Authored-By: Claude <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2171.
What changed
scripts/update-homebrew-cask.tsstill carried a full Intel code path that could no longer be exercised after #2169 dropped x86_64 macOS from release CI. This collapses the generator to match:ArchDigest.archcollapsed from"arm" | "intel"to"arm";ARCH_SUFFIX: Record<"arm"|"intel", string>replaced with a singleARCH_SUFFIX_AARCH64constant;ArchDigestResult.intel?dropped.resolveArchDigests()resolves only the Apple Silicon.dmgand now throws a hard error if it's missing, instead of reporting it in a non-fatalmissing: string[]array — there's no other architecture left to fall back to.renderCask()keeps exactly one rendering path (top-levelurl/sha256+depends_on arch: :arm64); theon_arm/on_inteltwo-architecture branch is gone.main()no longer prints the⚠ missing release assetswarning on a normal arm64-only release.ArchDigest, matching the pattern inpublish-install-script.ts.release.yml'ssync-homebrew-caskjob (gated onbuild-tauri-macos-arm,--pushwithHOMEBREW_TAP_TOKEN,notify-failureon failure) andhomebrew-drift-check.ymlas a scheduled backstop.release.yml'ssync-homebrew-caskjob (describing the old tolerant/non-fatal behavior) is corrected to describe the new hard-fail behavior.Byte-identical verification (acceptance criterion)
Confirmed directly, not assumed: rendered
renderCask("v0.2.0", ...)with the real published sha256 (b19edf954ae0...) and diffed against a live fetch ofNodeSpaceAI/homebrew-nodespace'sCasks/nodespace.rbviagh api repos/NodeSpaceAI/homebrew-nodespace/contents/Casks/nodespace.rb. Output is byte-for-byte identical — samesha256 -a 256checksum on both files. (This required updating the generator's comment constants to match the tap's actual published wording, which had drifted from the old generator's single-arch output even before this change — now they're pinned together, and a new test (matches the published tap's Casks/nodespace.rb byte-for-byte for v0.2.0) locks it in.)Tests
scripts/update-homebrew-cask.test.ts: both-architecture test case and Intel fixtures removed; added a byte-for-byte assertion against the live published cask content and a "no x64/on_intel trace" assertion.bun run test:scripts: 110 pass, 0 fail.Test plan
scripts/update-homebrew-cask.tshas nointel/x64code path.dmgfails loudly (hard error) rather than rendering a cask with no URL⚠ missing release assetswarning on a normal arm64-only releaserenderCask()output verified byte-identical to the publishedCasks/nodespace.rbfor v0.2.0 (diff + sha256 match)bun run test:scriptspassessync-homebrew-caskwiringbun run quality:fixclean; full pre-push gate (scripts/test-gate.ts) passed clean, includingcargo test -p nodespace-app(ADR-048 Tauri-seam suite)release.ymlcomment) addressed in a follow-up commit🤖 Generated with Claude Code