From 82669a069cf3a44805defd2f870687583f52d08c Mon Sep 17 00:00:00 2001 From: eiei114 <60887155+eiei114@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:42:45 +0900 Subject: [PATCH 1/2] feat: ship a macos-x86_64 archive and align the packer with rbxoc Rokit validates the OS of a downloaded binary but not its architecture, so on an Intel Mac it installed macos-aarch64, reported success, and left `rob` unable to exec. The README worked around that with a warning; this removes the need for one. macos-15-intel is a Standard GitHub-hosted runner (no `-large` or `-xlarge` suffix), so this costs nothing on a public repository. The arm64 job is pinned to macos-15 for the same reason as in rbxoc: name the image explicitly so a `-latest` migration cannot silently move one macOS entry. Two packager fixes ported from rbxoc's copy: - The `.sha256` sidecar is written with an explicit \n. Python's text mode emits CRLF on Windows, which breaks `sha256sum -c`. Verified: the sidecar now ends with a bare newline and `sha256sum -c` reports OK. - A target outside the approved matrix reports the target name. It used to leak a raw KeyError tuple, because `str(KeyError)` is the repr of the key. The publish guard counted exactly three built-commit records; it now expects four, matching the matrix. Verification of the packer paths (local, no release touched): - macos/x86_64 -> robcli-0.8.0-macos-x86_64.tar.gz with rob, license-mit, license-apache. - windows/x86_64 -> zip, sidecar passes `sha256sum -c`. - linux/aarch64 -> "target linux/aarch64 is outside the approved archive matrix". - 0.8.0-rc1 -> "version is not a plain numeric release". --- .github/workflows/release-assets.yml | 11 +++++++++-- readme.md | 9 ++------- scripts/package-release.py | 13 ++++++++++--- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index 895dd65..d3f0fc1 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -35,10 +35,17 @@ jobs: target_os: linux arch: x86_64 binary: rob - - os: macos-latest + - os: macos-15 target_os: macos arch: aarch64 binary: rob + # Standard (free) runner on public repos; no -large suffix needed. + # Emits macos-x86_64 so Rokit can serve Intel Macs, which it otherwise + # cannot detect: Rokit validates OS but not architecture. + - os: macos-15-intel + target_os: macos + arch: x86_64 + binary: rob runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -159,7 +166,7 @@ jobs: found=$((found + 1)) test "$(tr -d '\r\n' < "$file")" = "$expected" done < <(find commits -name built-commit.txt | sort) - test "$found" -eq 3 + test "$found" -eq 4 - name: Upload without replacing assets env: diff --git a/readme.md b/readme.md index 0181474..8b27df1 100644 --- a/readme.md +++ b/readme.md @@ -163,12 +163,6 @@ lookup falls back to scoring the executable suffix and contents instead of an exact filename match. Installation works today; matching the repository name would remove that fallback. -> [!warning] Intel Macs -> There is no `macos-x86_64` archive. Rokit 1.2.0 checks the operating system -> of the downloaded binary but **not** its architecture, so on an Intel Mac -> `rokit install` reports success and `rob --version` then fails to execute. -> Use the source build below instead, or omit `rob` from the manifest there. - **Rokit 1.2.0 does not read the `.sha256` sidecar.** If you need integrity beyond a pinned version, a GitHub Release, and Rokit's own trust prompt, verify the digest yourself as shown under the release archive section. @@ -194,7 +188,8 @@ cargo install --path . --locked ### From a GitHub Release archive Download one approved archive and its `.sha256` file for the same version: -Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, or macOS aarch64 `.tar.gz`. +Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, macOS aarch64 `.tar.gz`, or +macOS x86_64 `.tar.gz`. Compare the SHA-256 digest before extracting. A match checks the bytes only. It does not prove publisher identity, and these archives are not signed or notarized. The archive contains `rob` or `rob.exe` plus `license-mit` and diff --git a/scripts/package-release.py b/scripts/package-release.py index 4b7d9ea..38b6034 100644 --- a/scripts/package-release.py +++ b/scripts/package-release.py @@ -10,6 +10,7 @@ ("windows", "x86_64"): ("rob.exe", "zip"), ("linux", "x86_64"): ("rob", "tar.gz"), ("macos", "aarch64"): ("rob", "tar.gz"), + ("macos", "x86_64"): ("rob", "tar.gz"), } LICENSES = ("license-mit", "license-apache") @@ -42,8 +43,12 @@ def main() -> None: args = parser.parse_args() try: name, binary_name = archive_name(args.version, args.system, args.arch) - except (KeyError, ValueError) as error: - raise SystemExit(str(error) or "target is outside the approved archive matrix") from error + except KeyError: + raise SystemExit( + f"target {args.system}/{args.arch} is outside the approved archive matrix" + ) from None + except ValueError as error: + raise SystemExit(str(error)) from error if args.binary.name != binary_name or not args.binary.is_file(): raise SystemExit("binary name is outside the approved archive member list") licenses = [args.licenses / item for item in LICENSES] @@ -64,7 +69,9 @@ def main() -> None: archive.add(path, arcname=path.name) digest = hashlib.sha256(destination.read_bytes()).hexdigest() checksum = args.out / f"{name}.sha256" - checksum.write_text(f"{digest} {name}\n", encoding="utf-8") + # Pin the newline so the file stays `sha256sum -c` compatible on every host. + with checksum.open("w", encoding="utf-8", newline="\n") as handle: + handle.write(f"{digest} {name}\n") print(checksum) From cbc71e660bfa69c3dbf88c9a2e07ce3d54c03c0a Mon Sep 17 00:00:00 2001 From: eiei114 <60887155+eiei114@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:54:17 +0900 Subject: [PATCH 2/2] docs: state the macos-x86_64 backfill ordering v0.8.0 does not carry macos-x86_64 yet, and the publish guard blocks a backfill for that tag until this change is on main. Saying the archive exists without that caveat would be false at merge time for anyone on exactly 0.8.0. --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8b27df1..511834f 100644 --- a/readme.md +++ b/readme.md @@ -189,7 +189,9 @@ cargo install --path . --locked Download one approved archive and its `.sha256` file for the same version: Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, macOS aarch64 `.tar.gz`, or -macOS x86_64 `.tar.gz`. +macOS x86_64 `.tar.gz`. The Intel archive was added after `0.8.0` and is being +backfilled onto it; until that lands, use the source build for Intel Macs on +exactly `0.8.0`. Compare the SHA-256 digest before extracting. A match checks the bytes only. It does not prove publisher identity, and these archives are not signed or notarized. The archive contains `rob` or `rob.exe` plus `license-mit` and