Skip to content

fix(install): ask for darwin-arm64, not darwin-aarch64, on Apple Silicon#357

Merged
aaronsb merged 1 commit into
mainfrom
fix/darwin-arm64-prebuilt-slug
Jul 10, 2026
Merged

fix(install): ask for darwin-arm64, not darwin-aarch64, on Apple Silicon#357
aaronsb merged 1 commit into
mainfrom
fix/darwin-arm64-prebuilt-slug

Conversation

@aaronsb

@aaronsb aaronsb commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Every Apple Silicon install has been silently building from source instead of using our published binaries.

uname -m reports arm64 on Darwin and aarch64 on Linux — two spellings, one architecture. Our release assets follow the same split: we publish darwin-arm64 but linux-aarch64.

Four downloaders normalized with a blanket rewrite:

ARCH=$(uname -m | sed 's/arm64/aarch64/')

On Linux that's a no-op (uname -m already says aarch64). The only platform it changes is macOS, and there it produces darwin-aarch64 — an asset that has never been published. Each script then prints Available: ... darwin-arm64 in its own --help, one screen below the line that mangled it.

Affected: download-ways.sh, download-attend.sh, download-attend-chat.sh, download-ways-audit.sh.
Not affected: way-embed/download-binary.sh, which never applied the sed — which is precisely why way-embed is the one component that successfully fetches a prebuilt on macOS.

Why it stayed hidden

The 404 isn't loud. make setup treats a failed prebuilt download as "no binary available" and falls back to a from-source build. That's the same silent degradation prebuilt-lib.sh was created to eliminate — its header says so:

a transient GitHub API / network blip ... was swallowed, so an empty result read as "no release" and ways update silently degraded to a from-source build

It was hardened against the transient cause. This one fails 100% of the time on Apple Silicon, and produced a working install anyway, so nobody chased it.

Change

Platform detection moves into prebuilt-lib.sh — already sourced by all four scripts — as detect_platform(), mapping per-OS to the spelling each release actually publishes.

Test plan

  • detect_platform() unit-checked against a shadowed uname for all six host combinations:
    Darwin/arm64 → darwin-arm64, Darwin/x86_64 → darwin-x86_64, Linux/aarch64 → linux-aarch64, Linux/x86_64 → linux-x86_64, plus the inverted spellings Linux/arm64 → linux-aarch64 and Darwin/aarch64 → darwin-arm64. All pass.
  • Cross-checked all 16 component x platform slugs against the assets GitHub actually publishes (ways, attend, attend-chat, ways-audit x 4 platforms) — every one resolves to a real asset.
  • bash -n on all five scripts; each downloader's --help still reports a platform.
  • scripts/check-portability.sh passes.

Safety

If a downloaded binary won't execute, download-ways.sh runs --version, deletes it, and exits 1 — so make setup falls back to the source build. Fixing the slug cannot strand anyone with a binary that doesn't run on their machine.

Not in scope

Surfaced while debugging a macOS report where way-embed is killed with signal: 9 (SIGKILL) on a CrowdStrike-managed laptop — killed even when built from source, so it is not a provenance/signature issue. Tracked separately. This PR only fixes the slug.

ARM64 has two spellings for one architecture, and `uname -m` reports whichever
the kernel prefers: `arm64` on Darwin, `aarch64` on Linux. The release assets
follow the same split — we publish `darwin-arm64` but `linux-aarch64`.

Four downloaders normalized with a blanket `sed 's/arm64/aarch64/'`. On Linux
that is a no-op, because `uname -m` already says `aarch64`. The only platform it
changes is macOS, where it changes it to the wrong thing: every Apple Silicon
install asked for `ways-darwin-aarch64`, an asset that has never existed. Each
script then printed `Available: ... darwin-arm64` in its own help text, one
screen below the line that had just mangled it.

The 404 was not loud. `make setup` treats a failed prebuilt download as "no
binary available" and silently degrades to a from-source build — the exact
degradation prebuilt-lib.sh was introduced to stop being silent about, hardened
there for transient network blips but not for this, which fails 100% of the time
on Apple Silicon.

Platform detection moves into prebuilt-lib.sh (already sourced by all four) as
detect_platform(), mapping per-OS to the spelling each release actually
publishes. Verified: all 16 component x platform slugs now resolve to a real
published asset.

`way-embed/download-binary.sh` was already correct — it never applied the sed —
which is why way-embed was the one component that did fetch a prebuilt.
@aaronsb aaronsb merged commit 7fba094 into main Jul 10, 2026
32 checks passed
@aaronsb aaronsb deleted the fix/darwin-arm64-prebuilt-slug branch July 10, 2026 00:35
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