Skip to content

homebrew-nodespace: nodespace-cli formula isn't wired into release-sync/drift-check automation #2162

Closed

Description

@mstomar125

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 to Casks/nodespace.rb. It has no knowledge of Formula/nodespace-cli.rb at 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:

  1. Teach scripts/update-homebrew-cask.ts (or a focused sibling script) to also render/update Formula/nodespace-cli.rb's version + digests after a release, gated the same way sync-homebrew-cask's job is (needs the relevant build-headless legs to have actually produced assets — reuse the same "missing is reported, not fatal" philosophy already in place for the cask's single-arch handling).
  2. Extend homebrew-drift-check.yml to also compare the formula's live version against the latest release, so staleness there is caught the same day, not silently.
  3. Consider whether the formula's on_intel odie block 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

  1. mstomar125 commented on Aug 20, 2026

    @mstomar125
    ContributorAuthor

    Fixed in #2175 (merged, squash SHA `8ed26da0`).

    What shipped

    1. scripts/update-homebrew-formula.ts (new): resolves all 6 digests (nodespace + nodespaced, for macOS arm64 / Linux arm64 / Linux x86_64 — sharing REQUIRED_HEADLESS_TARGETS with publish-install-script.ts instead of a second copy) from the real published release assets, fully re-renders Formula/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.
    2. scripts/homebrew-tap-push.ts (new): the shared clone/write/commit/push mechanics, extracted out of update-homebrew-cask.ts so both sync scripts share one credential-scrubbing implementation instead of two copies that could drift apart.
    3. .github/workflows/release.yml: new sync-homebrew-formula job, gated on build-headless the same way sync-install-script already is, and sequenced after sync-homebrew-cask (via needs, 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.
    4. .github/workflows/homebrew-drift-check.yml: new, independent formula-drift-check job alongside the existing cask check, each opening its own distinctly-titled issue on drift.

    The on_intel odie question

    Left hardcoded, not made conditional on asset presence. Reasoning: unlike the cask's now-removed Intel .dmg leg (which build-tauri used to produce until #2169), release.yml's build-headless matrix 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 to build-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-cask and the new sync-homebrew-formula job (fixed by sequencing), the formula's rendered URLs using hand-typed filename literals decoupled from the verified digest (fixed by building the URL from digest.fileName instead), 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions