minutes icon indicating copy to clipboard operation
minutes copied to clipboard

macOS app bundles ship a placeholder CLI sidecar; in-app Set up CLI installs a dead stub

Open silverstein opened this issue 5 months ago • 1 comments

Since v0.16.2, every CI-built macOS bundle (DMG and updater artifact) contains a 52-byte shell placeholder at Contents/MacOS/minutes instead of the real CLI. Any user who runs the in-app Set up CLI flow gets a symlink to that stub, and every minutes invocation prints minutes CLI placeholder and exits 1.

Root cause. tauri/src-tauri/build.rs stages the CLI sidecar only if a release binary already exists at target/release/minutes; otherwise it writes a placeholder and emits a cargo warning. The placeholder exists so plain cargo check/clippy work without a CLI build, on the assumption that real bundling always goes through scripts/build.sh (which builds the CLI first). The release workflow calls cargo tauri build directly, so the assumption silently fails on every release and the warning disappears into CI logs.

Why it was never caught. Local builds always go through build.sh or install-dev-app.sh, which build the CLI first, so every bundle a maintainer ever launched had the real binary. Only CI-built artifacts are affected. Confirmed by inspecting the v0.18.10 production bundle delivered by the auto-updater.

Scope. macOS only: the sidecar staging early-returns on other platforms, and externalBin is declared only in tauri.macos.conf.json. Homebrew and cargo install users are unaffected. Audited the rest of the packaging surface for the same class: the Swift helpers (system_audio_record, calendar-events) and the skill-bundle staging all hard-fail on error, and pack_mcpb.sh validates its inputs; this was the only silent fallback.

Fix.

  1. Build the release CLI in release-macos.yml before cargo tauri build.
  2. Make build.rs hard-fail instead of writing a placeholder when MINUTES_REQUIRE_REAL_CLI_SIDECAR=1 is set, and set it in the release workflow, so this class of bug fails the build instead of shipping.
  3. Assert the bundled sidecar is a real multi-MB binary after the build as a belt-and-braces check.

Shipping as 0.18.11.

silverstein avatar Jun 12 '26 21:06 silverstein

v0.18.11 is out on all channels. Proof from the shipped artifact itself, not just CI: downloaded Minutes.app.tar.gz from the release, extracted, and ran the bundled CLI directly. It is a real Mach-O arm64 binary that reports minutes 0.18.11. The new pipeline guard (hard-fail on placeholder + post-build verify) ran green on this release, so this class of bug now fails the build instead of shipping.

If you ran Set up CLI on an earlier version: update the app (or let it auto-update), then run Set up CLI once more from the app.

silverstein avatar Jun 13 '26 00:06 silverstein