Repository navigation
Description
Problem
nodespace-cli (homebrew-nodespace/Formula/nodespace-cli.rb, added in #2146) hardcodes its own version and 6 asset URLs/sha256 digests, entirely independent of the automation #2114 built for the sibling nodespace cask:
scripts/update-homebrew-cask.ts(the sync job that runs after every release) writes exclusively toCasks/nodespace.rb. It has no knowledge ofFormula/nodespace-cli.rbat all..github/workflows/homebrew-drift-check.yml(the daily watchdog that opens a loud issue on staleness) only checks the cask's version. It will report "Tap in sync" while the formula silently drifts indefinitely behind it.
This is the same failure mode #2114 was filed and fixed for the cask (a hand-maintained downstream artifact silently drifting, in that case for two months, v0.1.6 while v0.2.0 shipped) — now reintroduced for the formula, in the very PR that added it.
Compounding factor: release assets can vanish post-upload with no CI failure signal (see #2154 — SHA256SUMS still lists checksums for nodespace-x86_64-apple-darwin/nodespaced-x86_64-apple-darwin, which are not currently downloadable release assets despite CI having succeeded at build time). The formula has zero protection against this beyond what a human notices by hand.
Also, minor but related: on_intel do odie(...) in the formula's macOS block is a hardcoded, hand-maintained "no Intel build" statement. When #2154 is eventually fixed and Intel assets return, nothing will notice or remind anyone to update it — it'll just keep refusing forever unless someone remembers.
Proposed fix
Extend the existing automation rather than inventing new automation:
- Teach
scripts/update-homebrew-cask.ts(or a focused sibling script) to also render/updateFormula/nodespace-cli.rb's version + digests after a release, gated the same waysync-homebrew-cask's job is (needs the relevantbuild-headlesslegs to have actually produced assets — reuse the same "missing is reported, not fatal" philosophy already in place for the cask's single-arch handling). - Extend
homebrew-drift-check.ymlto also compare the formula's live version against the latest release, so staleness there is caught the same day, not silently. - Consider whether the formula's
on_intel odieblock should become conditional on asset presence rather than hardcoded, so it self-corrects once Intel assets return.
Context
Found during adversarial review of #2146's homebrew-nodespace PR (#2). Deliberately scoped as a follow-up rather than folded into that already-large PR — #2146's own acceptance criteria only require the formula to exist and install a headless CLI, not to stay in sync going forward.
Activity
mstomar125 commentedon Aug 20, 2026
Fixed in #2175 (merged, squash SHA `8ed26da0`).
What shipped
scripts/update-homebrew-formula.ts(new): resolves all 6 digests (nodespace+nodespaced, for macOS arm64 / Linux arm64 / Linux x86_64 — sharingREQUIRED_HEADLESS_TARGETSwithpublish-install-script.tsinstead of a second copy) from the real published release assets, fully re-rendersFormula/nodespace-cli.rb, and can push it to the tap. Every target is required — a missing asset is a loud hard error, matching Make the Homebrew cask generator arm64-only to match the Intel-macOS drop #2171's "missing arm64 is a hard error" precedent for the cask, since the formula has no optional architecture to omit. Verified byte-for-byte against the live published formula for v0.2.0.scripts/homebrew-tap-push.ts(new): the shared clone/write/commit/push mechanics, extracted out ofupdate-homebrew-cask.tsso both sync scripts share one credential-scrubbing implementation instead of two copies that could drift apart..github/workflows/release.yml: newsync-homebrew-formulajob, gated onbuild-headlessthe same waysync-install-scriptalready is, and sequenced aftersync-homebrew-cask(vianeeds, not gated on its result) since both jobs write to the same tap branch and would otherwise be able to race each other's push..github/workflows/homebrew-drift-check.yml: new, independentformula-drift-checkjob alongside the existing cask check, each opening its own distinctly-titled issue on drift.The
on_intel odiequestionLeft hardcoded, not made conditional on asset presence. Reasoning: unlike the cask's now-removed Intel
.dmgleg (whichbuild-tauriused to produce until #2169),release.yml'sbuild-headlessmatrix has never had a macOS x86_64 leg at all — there's no CI signal this script could ever observe flip from absent to present. Making it conditional now would be speculative generality for a scenario with no live path to occur under the current pipeline, and it's consistent with #2171's own "Apple Silicon is the only supported target" decision for the cask. Worth revisiting only if a macOS x86_64 leg is ever added tobuild-headless.Process notes
An adversarial review (independent subagent, not the implementing session) against the real diff found 3 real issues, all fixed before merge: a genuine tap-push race between
sync-homebrew-caskand the newsync-homebrew-formulajob (fixed by sequencing), the formula's rendered URLs using hand-typed filename literals decoupled from the verified digest (fixed by building the URL fromdigest.fileNameinstead), and incomplete credential-scrubbing coverage in the new shared push helper (widened to the whole operation).Verified:
bun run test:scripts(115 pass),bun run quality:fix,bun run test:all, full pre-push gate including the ADR-048 Tauri-seam suite, and the real sync script run end-to-end against the actual v0.2.0 release.