Skip to content

fix(desktop): build real sidecars in desktop-release-build (0-byte bundle bug) - #68

Merged
mfethe1 merged 1 commit into
product/mainfrom
fix/desktop-release-build-sidecars
Sep 20, 2026
Merged

mfethe1 merged 1 commit into
product/mainfrom
fix/desktop-release-build-sidecars

Conversation

@mfethe1

@mfethe1 mfethe1 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Problem

/Applications/Buzz.app/Contents/MacOS/ ships all six sidecars at 0 bytes (only buzz-desktop is real). Every in-app buzz invocation therefore succeeds with exit 0 and empty output — a silent no-op that is very hard to attribute, since nothing errors.

Root cause

desktop-release-build depended only on _ensure-sidecar-stubs, which touches 0-byte placeholders so Tauri's compile-time externalBin validation passes (needed by the clippy/check/test recipes). It then ran pnpm tauri build directly and never ran cargo build --release or scripts/bundle-sidecars.sh. Tauri happily bundled the stubs.

desktop-demo-build did it correctly — the release path simply never got the same treatment.

Fix

Extract the build+bundle into a shared _build-sidecars recipe and call it from both release and demo paths, rather than adding a third copy of the logic. desktop-demo-build had its own inline copy; the justfile already warns that duplicated sidecar logic drifts apart, so this consolidates instead of duplicating. Net -1 line, one definition.

_ensure-sidecar-stubs is intentionally left cheap and unchanged — the stubs exist only for the compile-time check used by non-bundling recipes.

Verification

Behaviour (the real gate for this change):

cargo build --release --target aarch64-apple-darwin -p buzz-acp -p buzz-agent \
  -p buzz-backend-kubernetes -p buzz-dev-mcp -p git-credential-nostr -p buzz-cli
./scripts/bundle-sidecars.sh aarch64-apple-darwin

Finished release profile in 3m 24sSidecars bundled for aarch64-apple-darwin. desktop/src-tauri/binaries/ went from six 0-byte files to six non-zero arm64 Mach-O executables:

sidecar bytes
buzz 14,821,712
buzz-acp 16,992,240
buzz-agent 10,900,064
buzz-backend-kubernetes 10,130,848
buzz-dev-mcp 20,992,048
git-credential-nostr 1,288,400

Each was then executed to confirm it is functional, not merely non-empty — all six produce real argument parsing / config validation / MCP handshake output (file -b → arm64 for each), versus the stubs' empty exit 0.

Recipe semantics: just --evaluate parses clean; just --dry-run desktop-release-build shows the dependency order _ensure-sidecar-stubs_build-sidecars (cargo build → bundle-sidecars.sh) → pnpm installpnpm tauri build; just --dry-run desktop-demo-build acme resolves _build-sidecars via {{just_executable()}} (absolute path, so it does not depend on just being on PATH inside the recipe).

JS gate: pnpm run check from desktop/ → RC=0 (4 warnings, all pre-existing CSS/lint items untouched by this change). Noting for reviewers that this gate covers desktop JS only and cannot validate justfile semantics — hence the build-level verification above.

Scope

Build tooling only; no runtime code. Follows Path B (branch + PR) rather than direct-to-main because build/CI config is a sensitive path under AGENTS.md.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9ec27507-465f-4dc4-a5b5-c14536fba726

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mfethe1

mfethe1 commented Sep 17, 2026

Copy link
Copy Markdown
Owner Author

🧪 Jev PR-Triage (v3)

PR #68: fix(desktop): build real sidecars in desktop-release-build (0-byte bundle bug) — verdict: REVIEW

dimension metric value
Correctness problem resolved P(yes)=0.90
Correctness rework needed 0.13/2
Quality code quality 1.88/2
Quality test coverage P(yes)=0.48
Architecture integration compatibility 1.96/2
Architecture future proof 1.16/2
Governance sensitive path P(yes)=0.20
Governance size concern P(yes)=0.06
Synthesis merge risk 0.87/2
Synthesis route needs_review (0.87)
Diff security exposure P(yes)=0.06
Diff performance impact 0.01/2

🔍 Reviewer focus

  • File: Justfile
  • Concern: correctness_edge_cases

Block reason (if any): none
Pilot: Jev (System One) typed triage, 15 metrics + reviewer focus. Verdict thresholds in code.

desktop-release-build depended only on _ensure-sidecar-stubs, which touches
0-byte placeholders to satisfy the Tauri compile-time externalBin check, then
ran `pnpm tauri build` directly. It never ran cargo build --release or
scripts/bundle-sidecars.sh, so released bundles shipped 0-byte sidecars and
every in-app `buzz` call silently no-opped (exit 0, empty output) -- as seen
in /Applications/Buzz.app, where all six sidecars were 0 bytes.

Extract the build+bundle into a shared _build-sidecars recipe and use it from
both desktop-release-build and desktop-demo-build, which carried its own copy.
Net -1 line, one definition.

Verified: cargo release build + bundle-sidecars.sh produce six non-zero arm64
executables (1.3-21 MB) in desktop/src-tauri/binaries/, each responding to
--version with real argument/config handling instead of empty output.
@mfethe1
mfethe1 force-pushed the fix/desktop-release-build-sidecars branch from cbb9121 to 1c75d43 Compare September 20, 2026 02:41
@mfethe1
mfethe1 merged commit a5b36be into product/main Sep 20, 2026
29 checks passed
@mfethe1
mfethe1 deleted the fix/desktop-release-build-sidecars branch September 20, 2026 02:58
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