Skip to content

Optimize JavaScript sandbox command startup - #74

Merged
luke-lombardi merged 3 commits into
masterfrom
codex/inline-sandbox-exec
Jul 22, 2026
Merged

Optimize JavaScript sandbox command startup#74
luke-lombardi merged 3 commits into
masterfrom
codex/inline-sandbox-exec

Conversation

@luke-lombardi

@luke-lombardi luke-lombardi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • opt blocking sandbox execution into beta9's inline wait response
  • consume inline exit status, stdout, and stderr without follow-up HTTP requests
  • coalesce concurrent first-use runtime preparation so file/image setup only runs once
  • preserve polling and streaming behavior for long-running commands, including combined inline logs
  • release the canonical JS package as @beamcloud/[email protected]

Why

The ComputeSDK JavaScript benchmark runs a very short command. The SDK was paying separate status, stdout, and stderr requests plus a 100 ms polling interval after the command had already finished. Concurrent first-use calls could also duplicate runtime preparation.

Exact-artifact verification

A fresh benchmark clone installed the ComputeSDK adapter branch as a packed package and resolved Beam JS 1.0.13 from the public npm registry. The only benchmark-source adjustment supplied the target gateway URL. All official modes completed without SDK errors in staging:

  • sequential: 100/100, median 193.00 ms, p95 212.94 ms, p99 217.81 ms, score 97.98
  • staggered: 100/100, median 183.42 ms, p95 206.10 ms, p99 227.98 ms, score 98.04
  • burst: 100/100, median 1810.46 ms, p95 2223.25 ms, p99 2279.95 ms, score 80.16

The staging benchmark workspace was temporarily given the official 100-sandbox quota for the burst gate and restored afterward.

Validation

  • npm ci
  • npm test -- --runInBand — 138/138 tests passed
  • npm run build — ESM and CJS builds passed
  • npm pack dry run verified package contents
  • public registry install verified exact 1.0.13 runtime resolution
  • ComputeSDK adapter: 15/15 tests, typecheck, and build passed
  • latest upstream benchmark: 100/100 sequential, staggered, and burst

Release

Published as @beamcloud/[email protected] from the canonical beam-client/js package.

@luke-lombardi
luke-lombardi merged commit 46d0775 into master Jul 22, 2026
3 checks passed
@luke-lombardi
luke-lombardi deleted the codex/inline-sandbox-exec branch July 22, 2026 16:27
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