Repository navigation
improvement(sandbox): verify the workbench CLI inside each command's launch - #9606
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…launch Every warm workbench call ran a separate CLI integrity check command (ownership write, launch, stop receipt, settle) before the user's command, about a third of a warm call's fixed cost. - The session supervisor's PID 1 now runs the same check as the ordinary user, after recording itself and before starting the command; a mismatch starts nothing and is reported on the stop receipt the call already fetches - A refused launch is repaired under the session lock and relaunched once; a second refusal fails the call - The check runs with an isolated interpreter instead of the user's login shell, never follows links or blocks on non-regular files, and treats an unreadable artifact as stale so repair overwrites it - A reused machine runs no separate check command; a new machine still installs the CLI first - Gated live test against real E2B covers refusal, repair, hooks, FIFOs, Stop during a slow check, and the warm-call cost
waleedlatif1
force-pushed
the
improvement/sandbox-cli-check-at-launch
branch
from
November 3, 2026 02:58
7b942ca to
6943fde
Compare
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryMoves workbench CLI verification into each command’s owned launch process, removing the separate check on reused workbenches.
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-I, fixed env) instead of the user's login shell, opens artifacts withO_NOFOLLOW|O_NONBLOCK, requires a regular file, and treats an unreadable artifact as stale so repair overwrites it.ensureSessionCliverifies through the same supervisor on handles that support itclikeyType of Change
Testing
session-cli-launch.live.test.tsagainst a real E2B workbench (SANDBOX_SESSION_SMOKE=1, JSON report viaSESSION_CLI_LAUNCH_REPORT_PATH), 12/12 passed: verified launch runs asuser; modified, symlinked, missing, unreadable, and FIFO artifacts are refused without starting the command (FIFO refused in ~0.6 s), then repaired; shell-profile and Python-site hooks cannot make the launch check pass; Stop during a 6 GB check settled in ~1.3 s and started nothing; exit codes and streams unchanged. Warm-call median: separate check + launch 507–638 ms vs verified launch 266–378 ms; unverified launch 245–307 mslib/execution/remote-sandbox/,execute-request.test.ts,lib/mothership/tools(1,333 tests) andbun run lint; type-check and audits run in CIChecklist
test-auditauthoring gate)