Sandbox Trail lane execution with managed Colima/Lima - #29
Merged
Merged
Conversation
forhappy
force-pushed
the
codex/colima-lane-runtime
branch
from
August 13, 2026 18:04
85fe3b7 to
4f41359
Compare
forhappy
marked this pull request as ready for review
August 13, 2026 18:24
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
hostand optionalcolimamanaged-execution backend for lane exec, tests, evals, and agent-driven commandsMain use cases and agent workflow
The agent/provider process and Trail database remain the contained host control plane; managed commands are the Colima guest data plane. The PR does not claim arbitrary agent binaries execute inside the VM.
Usage
HTTP exposes
POST /v1/lanes/{lane}/execand/exec/cancel. MCP exposestrail.lane_execandtrail.lane_exec_cancel; because one stdio connection is ordered, cancel a blocking MCP call through a second Trail MCP session or CLI/HTTP client. Existing workspaces remain on host execution.Security and lifecycle
.trail, home directory, or ambient credentials in the guestlimactl, isolated Colima/Lima/Docker state, and direct user argv without shell interpolationEXECUTION_CANCELLED(CLI 17 / HTTP 409),EXECUTION_VALIDATION_FAILED(CLI 18 / HTTP 422), andEXECUTION_INFRASTRUCTURE_FAILED(CLI 19 / HTTP 503)Colima owns and downloads its guest image. Trail provisions the pinned CLI toolchain, not a VM image. File-secret OCI mounts remain unsupported until a VM-safe broker exists.
Validation
openspec validate integrate-colima-runtime --strictcargo fmt --all -- --checkCARGO_TARGET_DIR=/Volumes/Workspace/crabbuild-target/trail-main cargo check --workspace --lockedCARGO_TARGET_DIR=/Volumes/Workspace/crabbuild-target/trail-main cargo clippy --workspace --all-targets --all-features --locked -- -D warningsThe broad workspace commands initially hit two pre-existing wall-clock budgets while the host was under unrelated Rust compilation load. Both timing tests passed on isolated reruns; the rest of the suite was rerun with those two omitted and then continued explicitly after a reviewed mutation-inventory fixture correction.
Post-qualification socket-fix verification
cargo fmt --all -- --check, workspacecargo check --locked, and all-target/all-feature Clippy with-D warningspassedenvironment_resolve_cli_executes_and_reuses_a_real_cargo_snapshot: its offlinecargo generate-lockfilesubprocess exited 101; the exact test rerun reproduced it, while the Colima, library, check, and Clippy gates above remained greenReal-host Colima and Claude Code qualification (2026-08-13)
claw-codeat commitd621f5d5d858b30de12234c424e5f657a59e021eprovider=colima,execution_backend=colima, and containment receipttrail_no_host_mounts_v1LIMA_HOMEproduced a 123-byte SSH socket path above macOS's 104-byte AF_UNIX limit; Lima state now uses private~/.trail-lima/with regression coveragesandbox-exec; test commands ran in isolated Linux/aarch64 Colima guest namespaces with no host mountslane testgate per lane usingcargo test --workspace --lockedfollowed by a real CLI rundump-manifestsprinted 131 commands, 31 tools, and 12 bootstrap phasesdump-manifestsran successfullybootstrap-planran successfullyready=true, clean workdirs, no blockers, and exact one-file changed-path sets; the only readiness warning is that no separate eval gate was requested/Users/haipingfu/Githubremained unchanged; all qualification state stayed in the disposable workspace and Trail-owned Colima profileTrail provisions Colima/Lima/Docker tooling, but it intentionally does not provision a project language toolchain. Repositories should declare or bootstrap the Rust/Node/Python toolchain they require inside the guest data plane.
Branch audit
main68d12e87691e5311bd9c2ad2c012199e7693765c)