Repository navigation
Make the Homebrew cask generator arm64-only to match the Intel-macOS drop #2171
Description
Problem
#2169 dropped Intel (x86_64) macOS from release CI, making Apple Silicon the only supported macOS target. Most of the distribution surface already reflects that decision, but scripts/update-homebrew-cask.ts still carries a full Intel code path that can no longer be exercised.
This is cleanup, not a live defect. The generator already degrades correctly: resolveArchDigests() treats a missing architecture as non-fatal, and renderCask() falls through to its single-architecture branch, emitting depends_on arch: :arm64 and no Intel URL. Confirmed against the published tap — Casks/nodespace.rb is arm64-only today, correctly documented, and brew install --cask nodespace is not broken.
The cost is dead code that reads as if Intel were still supported, and a two-architecture rendering branch that is now unreachable and untestable against any real release.
Current state (verified 2026-08-19)
Already consistent with #2169 — no action needed:
scripts/release.ts— release-notes table dropped the Intel DMG row and the stale "Intel Mac Support" changelog entry (fixed in Drop Intel (x86_64) macOS from release CI #2169)scripts/publish-install-script.ts—x86_64-apple-darwinis deliberately excluded from the target list, with a comment saying sohomebrew-nodespaceCasks/nodespace.rb— published cask is arm64-only,depends_on arch: :arm64, with a platform-support note
Still carrying Intel:
scripts/update-homebrew-cask.tsArchDigest.arch: "arm" | "intel"ARCH_SUFFIX: Record<"arm" | "intel", string> = { arm: "aarch64", intel: "x64" }ArchDigestResult.intel?resolveArchDigests()builds awantedmap including the Intel.dmgand loops both architectures — so every run downloads-or-misses an asset CI no longer produces, and reports it inmissing, printing a⚠ missing release assetswarning on every releaserenderCask()'s two-architecture branch emittingon_arm/on_intel, plus the Intel half ofarchNote
scripts/update-homebrew-cask.test.ts— a test asserting theon_arm/on_intelboth-architectures rendering, andintelDigestfixtures
Fix direction
Make the generator arm64-only, matching the decision rather than tolerating its absence:
- Collapse the arch union to arm; replace
ARCH_SUFFIXwith a singleaarch64constant resolveArchDigests()resolves only the Apple Silicon.dmg. A missing arm asset should be a hard error (there is no other architecture to fall back to), not a warningrenderCask()keeps one rendering path — top-levelurl/sha256plusdepends_on arch: :arm64— and drops theon_arm/on_intelbranch- Update the tests: delete the both-architectures case and the Intel fixtures; keep coverage that the rendered cask pins
arm64and contains nox64URL - Carry the rationale in a comment, as
publish-install-script.tsand the published cask already do: Apple Silicon is the only supported target because x86_64 macOS artifacts cannot be tested, and this is reversible
The eliminated warning is a side benefit: today every release prints ⚠ missing release assets ... NodeSpace_<v>_x64.dmg, which is noise that trains operators to ignore that warning line.
Also in scope: correct the file's stale header comment
scripts/update-homebrew-cask.ts's header docblock still describes the script as not yet wired into CI, which is no longer true and actively misleads anyone reading it (it misled a review of this exact area). Since this issue already edits the file, fix the comment here rather than filing separately.
Two stale claims:
-
"a PAT ... set as a repo secret once this is wired into the release flow"
HOMEBREW_TAP_TOKENis set as a repo secret (added 2026-08-19). -
"this script is a natural sibling job there, or a manual step run right after
bun run release:watchreports the build finished, until it is wired into CI directly."It is wired in.
release.ymlhas async-homebrew-caskjob that runs--pushon thereleaseevent withHOMEBREW_TAP_TOKENin its env, gated onbuild-tauri-macos-arm(deliberately not onbuild-tauri, so a Windows failure cannot block the cask sync), with anotify-failurejob that opens an issue if it fails.homebrew-drift-check.ymlis a scheduled backstop.
Rewrite the "Where this hooks in" paragraph to describe the actual wiring and point at the sync-homebrew-cask job, so the file documents what happens rather than what was once planned. The --push/HOMEBREW_TAP_TOKEN usage lines above it stay accurate and can remain.
Comment-only — no behavior change.
Non-goals
- No change to
release.ts,publish-install-script.ts, or the published cask — all already correct - Not re-litigating Drop Intel (x86_64) macOS from release CI #2169. Re-adding an architecture later means restoring a suffix map and a rendering branch; the comment should say so
Acceptance criteria
-
scripts/update-homebrew-cask.tshas nointel/x64code path - A missing Apple Silicon
.dmgfails loudly rather than rendering a cask with no URL - No
⚠ missing release assetswarning on a normal arm64-only release -
renderCask()output is byte-identical to the currently publishedCasks/nodespace.rbfor v0.2.0 (pure refactor — no behavior change to the artifact) - Tests updated; both-architectures test and Intel fixtures removed;
bun run test:scriptspasses - Comment records why Apple Silicon is the only target and what re-adding one would involve
- Header docblock no longer claims the script is unwired/manual; it describes the
sync-homebrew-caskjob and the already-setHOMEBREW_TAP_TOKENsecret
Related
- Drop Intel (x86_64) macOS from release CI #2169 — dropped Intel from release CI (the decision this aligns to)
- Automate Homebrew tap sync + drift guard #2157 — added the cask generator, which predates that decision
Activity
mstomar125 commentedon Aug 20, 2026
Merged in #2174 (997032d).
scripts/update-homebrew-cask.tsis now arm64-only, matching #2169's decision explicitly rather than tolerating Intel's absence implicitly: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 throws a hard error if it's missing — no other architecture to fall back to.renderCask()keeps exactly one rendering path (top-levelurl/sha256+depends_on arch: :arm64); theon_arm/on_intelbranch is gone.ArchDigest(why Apple Silicon only, that it's reversible, what re-adding an architecture would involve), matchingpublish-install-script.ts's pattern.release.yml'ssync-homebrew-caskjob (gated onbuild-tauri-macos-arm,--push+HOMEBREW_TAP_TOKEN,notify-failureon failure) andhomebrew-drift-check.ymlas the scheduled backstop.release.yml'ssync-homebrew-caskjob that still described the old tolerant/non-fatal behavior — caught by the adversarial review, addressed before merge.Byte-identical verification, actually checked, not assumed: rendered
renderCask("v0.2.0", ...)with the real published sha256 and diffed against a livegh api repos/NodeSpaceAI/homebrew-nodespace/contents/Casks/nodespace.rbfetch — output is byte-for-byte identical (confirmed viadiff -uand matchingshasum -a 256). 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; a new test pins the two together going forward.Acceptance criteria
scripts/update-homebrew-cask.tshas nointel/x64code path.dmgfails loudly 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.0bun run test:scriptspasses (110 pass, 0 fail)sync-homebrew-caskjob and the setHOMEBREW_TAP_TOKENsecretAdversarial review (general-purpose subagent) ran against the real diff, independently re-verified the byte-identical claim, and found no blockers — one real, non-blocking finding (the stale
release.ymlcomment above) addressed before merge.Full pre-push gate (
scripts/test-gate.ts) passed clean, includingcargo test -p nodespace-app(ADR-048 Tauri-seam integration suite, 70+ tests). Along the way, found and fixed a genuinely stale local build artifact in this worktree (thenodespacedsidecar/debug binaries predated yesterday's #2167/#2168 fix by about a month, unrelated to this PR's diff) that had caused the pre-push gate'sai_chat_send_to_idle_testto hang on repeated attempts — rebuilt viabun run --cwd packages/desktop-app dev:tauri:sidecarsand a directcargo build, confirmed fixed, then the gate passed clean.Wire the nodespace-cli Homebrew formula into release-sync and drift-c…