Skip to content

default to compiled agent installs on macos and linux - #2140

Open
kevinjosethomas wants to merge 14 commits into
mainfrom
feat/eng-6027-standalone-binaries
Open

default to compiled agent installs on macos and linux#2140
kevinjosethomas wants to merge 14 commits into
mainfrom
feat/eng-6027-standalone-binaries

Conversation

@kevinjosethomas

@kevinjosethomas kevinjosethomas commented Sep 9, 2026

Copy link
Copy Markdown
Member

This is part of the PR stack migrating us to use Bun to compile Prime Agent for releases. This makes supported installations self-contained, removing the need to download and install Node.js and npm packages separately.

This PR changes the installer to use the compiled version by default, so new users on supported Macs and Linux machines get the self-contained Prime Agent. The installer checks the download and confirms it runs before making it active. Machines that can't run it automatically use the existing Node.js installation.

Tested fresh installs and failed or interrupted downloads across Debian 12, Ubuntu 18.04/20.04/22.04/24.04, and Alpine 3.24. CI also tested compiled packages on macOS 15 and Ubuntu 24.04, on x64 and ARM64. Actual macOS 13/14 execution remains untested.

ENG-6027 · Stack: #2140#2165#2166. Ship all three together.


Note

High Risk
Changes the default install path and release artifact set for all supported macOS/Linux users; installer and R2 publishing logic are security- and availability-sensitive despite broad automated coverage.

Overview
Ships four-platform standalone prime-agent archives (darwin/linux × arm64/x64) built with Bun 1.4.0, assembled via new scripts, and validated in CI on native runners—including tests with JS runtimes removed from PATH.

Release and CI wiring: a reusable standalone-binaries workflow feeds build-binaries (download verified artifacts, stage under packages/coding-agent/binaries, pass --binary-dir into release pack). Production/beta uploads now checksum-verify artifacts and publish both npm .tgz and platform .tar.gz files; manifests gain a binaries array.

install.sh behavior change: on macOS 13+ and glibc Linux, auto mode prefers the compiled archive (checksum, safe tar validation, executable probe) into a locked managed install with atomic prime-agent / previous symlinks; Node/npm remains for unsupported platforms, npm-only releases, or failed probes (PRIME_AGENT_INSTALL_METHOD=node|binary). Adds --native-platform and optional bootstrap via prime-agent --prime-agent-bootstrap.

Agent packaging: build:binary / asset copy move into build-binary.mjs and copy-binary-assets.mjs; kernel bootstrap resolves prime-agent-runtime beside the flat binary layout.

Reviewed by Cursor Bugbot for commit ac5d8fb. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Default agent installer to compiled binaries on macOS and Linux

  • Adds a four-platform native build matrix (macOS ARM64/x64, Linux ARM64/x64) using Bun 1.4.0, with CI validation and release archive assembly via scripts/assemble-release-archives.mjs.
  • install.sh now defaults to downloading, verifying, and extracting a compiled archive on supported platforms (macOS 13+, glibc Linux), falling back to the Node installer only when the executable cannot run in auto mode.
  • Native installation uses an owned, locked managed root, atomic link activation with rollback targets, and archive safety checks that reject absolute paths, symlinks, and non-regular files.
  • Adds comprehensive tests for compiled artifacts and the native installer, covering activation, rollback, signal interruption, validation failures, and Node fallback.
  • Behavioral Change: install.sh auto mode now prefers native compiled installation on supported macOS 13+ and glibc Linux platforms; packages/coding-agent/package.json build:binary and copy-binary-assets scripts are now functional.

Macroscope summarized db14f90.

Comment thread .github/workflows/standalone-binaries.yml Fixed
Comment thread .github/workflows/standalone-binaries.yml Fixed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/coding-agent/scripts/build-binary.mjs Outdated
Comment thread packages/coding-agent/scripts/copy-binary-assets.mjs
kevinjosethomas added a commit that referenced this pull request Sep 9, 2026
kevinjosethomas added a commit that referenced this pull request Sep 9, 2026
kevinjosethomas added a commit that referenced this pull request Sep 9, 2026
@kevinjosethomas kevinjosethomas changed the title ship standalone agent archives for macos and linux default to compiled agent installs on macos and linux Sep 9, 2026
kevinjosethomas added a commit that referenced this pull request Sep 9, 2026
Comment thread install.sh

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread install.sh
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Prime Agent performance — completed

PR ac5d8fba compared with main 1eee2938.

Overall: 0 regressed · 0 improved · 17 no clear change.

Metric Main This PR Change
Cold startup 2,773.4 ms 2,956.3 ms ≈ +182.9 ms (+6.60%)
Warm startup 1,619.0 ms 1,704.9 ms ≈ +85.9 ms (+5.31%)
Installation 25.76 s 26.79 s ≈ +1.03 s (+4.01%)
Compressed release artifacts 11.12 MB 11.12 MB ≈ +0.0021 MB (+0.02%)
Installed footprint 597.49 MB 597.50 MB ≈ +0.0092 MB (+0.00%)
Idle memory, summed RSS 1,048.71 MB 1,113.22 MB ≈ +64.51 MB (+6.15%)

Python runtime

Metric Main This PR Change
Python kernel startup 117.9 ms 129.8 ms ≈ +11.9 ms (+10.10%)
Python cell round trip 0.473 ms 0.514 ms ≈ +0.041 ms (+8.69%)
Empty bash command 10.4 ms 11.7 ms ≈ +1.3 ms (+12.55%)
Bash git status 15.3 ms 17.2 ms ≈ +2.0 ms (+12.81%)
Bash 32 KiB output 10.8 ms 11.8 ms ≈ +1.0 ms (+9.42%)
35 cells / 9 shell calls 153.4 ms 171.4 ms ≈ +18.0 ms (+11.72%)
Python interrupt to done 1.368 ms 1.468 ms ≈ +0.100 ms (+7.29%)
Python state snapshot 24.8 ms 26.1 ms ≈ +1.3 ms (+5.08%)
Python state restore 331.2 ms 375.6 ms ≈ +44.4 ms (+13.40%)
Python idle RSS 35.56 MB 35.07 MB ≈ -0.49 MB (-1.37%)
Python RSS after pandas workload 97.62 MB 97.08 MB ≈ -0.54 MB (-0.55%)

Sandbox cost: ~$0.0859 — no inference calls.
Run, logs, and downloadable raw results

Methodology and samples

Main resolved at 2026-09-11T01:35:36.494001+00:00. Harness 1eee2938.
Linux x64, 4 vCPU, 8 GB RAM, 20 GB disk; region us.
Image: node:24-bookworm@sha256:be23f54a88d34e8824c741b19b91064094f92c1c97b194144bfc8b50d67258e2.
Stock tools, skills, daemon, and Python bootstrap enabled; fresh homes and a fixed Git fixture.
Onboarding is dismissed; the editor starts without a selected model or submitted prompt.
Medians shown. Arrows require a 20% timing/memory change plus absolute floors and IQR.
These practical noise floors are not a statistical significance test.
Cold means stopped Prime processes; OS filesystem caches are not flushed.
No model requests or credentials. Installation excludes build/setup time.
Installer tarballs use loopback; npm/Python downloads use the network with fresh caches.
Artifact size counts release tarballs; footprint after first use includes registry packages.
MB is decimal. Summed RSS can double-count shared pages; PSS is recorded when available.
Provisioning, setup, and build durations are recorded separately in the raw results.
Kernel probes use the installed JSONL runtime, outside the TUI/TypeScript host.
Per trial: 50 Python cells, 5 calls per shell case, and one 35-cell mix (9 git status calls).
Cell/shell values are batch means; other runtime timings are single operations.
State fixture: a 10,000-row × 8-column integer DataFrame and a 10,000-integer list.
Restore runs in a fresh kernel, including pandas imports; kernel startup is excluded.
Kernel RSS covers the isolated Python process; loaded RSS follows the pandas workload.
Costs estimate full sandbox lifetimes at configured rates, including setup and build.
Budget target: $1; not a billing cap. Checks are informational.

Metric Main successful/attempted PR successful/attempted Main spread PR spread
Cold startup 10/10 10/10 IQR 59.3 ms IQR 74.5 ms
Warm startup 10/10 10/10 IQR 13.9 ms IQR 48.7 ms
Installation 3/3 3/3 range 1.02 s range 0.36 s
Compressed release artifacts 1/1 1/1
Installed footprint 1/1 1/1
Idle memory, summed RSS 10/10 10/10 IQR 28.12 MB IQR 109.92 MB
Python kernel startup 10/10 10/10 IQR 6.6 ms IQR 5.4 ms
Python cell round trip 10/10 10/10 IQR 0.024 ms IQR 0.044 ms
Empty bash command 10/10 10/10 IQR 0.4 ms IQR 1.2 ms
Bash git status 10/10 10/10 IQR 1.3 ms IQR 1.7 ms
Bash 32 KiB output 10/10 10/10 IQR 0.5 ms IQR 1.0 ms
35 cells / 9 shell calls 10/10 10/10 IQR 10.2 ms IQR 8.1 ms
Python interrupt to done 10/10 10/10 IQR 0.076 ms IQR 0.081 ms
Python state snapshot 10/10 10/10 IQR 1.0 ms IQR 2.5 ms
Python state restore 10/10 10/10 IQR 15.9 ms IQR 50.8 ms
Python idle RSS 10/10 10/10 IQR 3.56 MB IQR 1.92 MB
Python RSS after pandas workload 10/10 10/10 IQR 3.65 MB IQR 1.95 MB

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread install.sh
kevinjosethomas added a commit that referenced this pull request Sep 10, 2026
@kevinjosethomas
kevinjosethomas force-pushed the feat/eng-6027-standalone-binaries branch from fb1582a to 81322c1 Compare September 10, 2026 23:42

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 81322c1. Configure here.

Comment thread install.sh
Comment thread install.sh Outdated
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.

2 participants