From 5e35aa0ce8d5978db45bae8ec3bea953f04a26e5 Mon Sep 17 00:00:00 2001 From: Quickbeard Date: Thu, 6 Aug 2026 19:11:50 +0700 Subject: [PATCH 1/2] chore: correct the macOS bundle size to ~1.6 GB, bump to 0.5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-chip bundles (#252) were sized from an estimate made before they existed. They have now been built and verified — CLOSURE CLEAN, zip -t, sha256sum -c on both — and the real figures are 1637 MB arm64 and 1669 MB x86_64, so APPROX_BUNDLE_MB drops 1700 -> 1600. The prose that quotes a size does so to justify a decision — what fetching the wrong chip's bundle actually costs — so those numbers move with it rather than being dropped: 1.7 -> 1.6, and the Rosetta test's "3.4 GB to land 1.7" -> "3.2 GB to land 1.6". Matching updates in codev-scripts and codev-landing-page. --- README.md | 2 +- package.json | 2 +- src/lib/office.ts | 10 +++++----- tests/lib/download.test.ts | 2 +- tests/lib/office.test.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bcfbdd3..40a83a1 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ codevhub skill office --platform macos --arch arm64 # macOS needs a chip: arm6 codevhub skill office --dir /media/usb/codev-office # download somewhere else ``` -Because macOS has one bundle per chip, `--platform macos` from a non-Mac also needs `--arch arm64` or `--arch x86_64` — nothing on a Linux or Windows host implies which Mac the bundle is for, and guessing costs a 1.7 GB download. On a Mac the chip is detected for you (including through Rosetta), and `--arch` is only needed to stage a bundle for the *other* chip. There is still a single macOS setup script: it resolves its own bundle from `uname -m`. +Because macOS has one bundle per chip, `--platform macos` from a non-Mac also needs `--arch arm64` or `--arch x86_64` — nothing on a Linux or Windows host implies which Mac the bundle is for, and guessing costs a 1.6 GB download. On a Mac the chip is detected for you (including through Rosetta), and `--arch` is only needed to stage a bundle for the *other* chip. There is still a single macOS setup script: it resolves its own bundle from `uname -m`. Both files land side by side, and the command prints the exact line to run from that folder (`bash codev-office--setup.sh`, or `powershell -ExecutionPolicy Bypass -File .\codev-office-windows-setup.ps1`). A bundle downloaded for another OS is never executed on this machine. diff --git a/package.json b/package.json index 8f1f4f2..1a8de4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codev-ai", - "version": "0.5.14", + "version": "0.5.15", "description": "CoDev — AI Coding Agent Hub. Install, configure, and manage multiple AI coding agents.", "keywords": [ "ai", diff --git a/src/lib/office.ts b/src/lib/office.ts index 6337ffe..484d5bb 100644 --- a/src/lib/office.ts +++ b/src/lib/office.ts @@ -65,8 +65,8 @@ export function detectPlatform( // process.arch is the architecture of the NODE BINARY, not of the machine: an // x64 node running under Rosetta on Apple Silicon reports "x64". Trusting it // there would fetch the Intel bundle onto an M-series Mac, and the cost is not -// just the wrong 1.7 GB — the setup script is native bash, sees `uname -m` = -// arm64, finds no bundle it can use and downloads another 1.7 GB. The +// just the wrong 1.6 GB — the setup script is native bash, sees `uname -m` = +// arm64, finds no bundle it can use and downloads another 1.6 GB. The // sysctl.proc_translated flag is the supported way to detect the translation. function isRosettaTranslated(): boolean { if (process.platform !== "darwin" || process.arch !== "x64") return false; @@ -236,8 +236,8 @@ export function officeUninstallScriptName(platform: OfficePlatform): string { const APPROX_BUNDLE_MB: Record = { ubuntu: 1200, windows: 1400, - "macos-arm64": 1700, - "macos-x86_64": 1700, + "macos-arm64": 1600, + "macos-x86_64": 1600, }; // Adaptive size for progress lines: the setup script is ~13 KB and rendered @@ -431,7 +431,7 @@ export async function runSkillOffice( // macOS publishes one bundle per chip, so a macOS download needs an arch. // The host's own arch may only stand in for it when the host IS the target: // on a Linux/Windows x64 box, detectArch() would confidently answer x86_64 - // for a `--platform macos` download and hand the user the wrong 1.7 GB. + // for a `--platform macos` download and hand the user the wrong 1.6 GB. // --arch always wins, including on a Mac staging a bundle for the other chip. const arch = parsed.arch ?? (crossPlatform ? null : detectArch()); const target = officeTarget(platform, arch); diff --git a/tests/lib/download.test.ts b/tests/lib/download.test.ts index 589df1b..cc504c8 100644 --- a/tests/lib/download.test.ts +++ b/tests/lib/download.test.ts @@ -386,7 +386,7 @@ describe("runSkillOffice", () => { // macOS publishes one bundle per chip. From another OS nothing implies // which, and the host's own x64 would be a confident wrong answer costing - // 1.7 GB — so this must fail loudly instead of picking a default. + // 1.6 GB — so this must fail loudly instead of picking a default. // Pinned to linux so the macOS bundle is always the cross-platform case, // whichever machine runs the suite. test("a macOS bundle from another OS refuses without --arch", async () => { diff --git a/tests/lib/office.test.ts b/tests/lib/office.test.ts index ec917c2..4fde395 100644 --- a/tests/lib/office.test.ts +++ b/tests/lib/office.test.ts @@ -36,7 +36,7 @@ describe("detectArch", () => { // An x64 node under Rosetta reports "x64" on an Apple Silicon Mac. Believing // it downloads the Intel bundle, which the native-bash setup script then - // refuses — and re-downloads the arm64 one. 3.4 GB to land 1.7. + // refuses — and re-downloads the arm64 one. 3.2 GB to land 1.6. test("Rosetta translation overrides the reported x64", () => { expect(detectArch("x64", true)).toBe("arm64"); }); @@ -54,7 +54,7 @@ describe("officeTarget", () => { expect(officeTarget("macos", "x86_64")).toBe("macos-x86_64"); }); - test("macOS without an arch has no target — never guess a 1.7 GB download", () => { + test("macOS without an arch has no target — never guess a 1.6 GB download", () => { expect(officeTarget("macos", null)).toBeNull(); }); }); From ce68faba4d74e928ac5291d91efba3f0e74d42f7 Mon Sep 17 00:00:00 2001 From: Quickbeard Date: Thu, 6 Aug 2026 19:25:14 +0700 Subject: [PATCH 2/2] docs: drop the remaining bundle size from the --arch paragraph The reason to require --arch is that nothing on a non-Mac host implies which Mac the bundle is for; the download size was supporting colour, and the README now carries no hardcoded bundle size at all. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40a83a1..928419a 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ codevhub skill office --platform macos --arch arm64 # macOS needs a chip: arm6 codevhub skill office --dir /media/usb/codev-office # download somewhere else ``` -Because macOS has one bundle per chip, `--platform macos` from a non-Mac also needs `--arch arm64` or `--arch x86_64` — nothing on a Linux or Windows host implies which Mac the bundle is for, and guessing costs a 1.6 GB download. On a Mac the chip is detected for you (including through Rosetta), and `--arch` is only needed to stage a bundle for the *other* chip. There is still a single macOS setup script: it resolves its own bundle from `uname -m`. +Because macOS has one bundle per chip, `--platform macos` from a non-Mac also needs `--arch arm64` or `--arch x86_64` — nothing on a Linux or Windows host implies which Mac the bundle is for. On a Mac the chip is detected for you (including through Rosetta), and `--arch` is only needed to stage a bundle for the *other* chip. There is still a single macOS setup script: it resolves its own bundle from `uname -m`. Both files land side by side, and the command prints the exact line to run from that folder (`bash codev-office--setup.sh`, or `powershell -ExecutionPolicy Bypass -File .\codev-office-windows-setup.ps1`). A bundle downloaded for another OS is never executed on this machine.