Repository navigation
feat(driver-tensorlake): add a Tensorlake compute driver - #2
Merged
Merged
Conversation
shanshantensorlake-spec
force-pushed
the
feat/add_tensorlake
branch
from
October 20, 2026 20:53
8a8b3c3 to
245519a
Compare
Add a standalone ComputeDriver subprocess that runs each sandbox in a Tensorlake microVM. Include the launch image and register the crate in AGENTS.md. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
- Keep sandboxes that are still launching out of poll reconciliation, so a new sandbox is not marked TensorlakeTerminated before it appears in the Tensorlake list. - Keep failed records failed when the Tensorlake VM is still running, so a recovered DriverRestarted sandbox does not go back to Pending. - Require a gateway CA bundle for an https gRPC endpoint, because the guard trusts only that CA, and reject endpoints that are not http or https. - Add the missing ocsf_otlp_headers field to the launch test fixture. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
- Add a control image with the gateway and the Tensorlake driver, a start script that runs both in one long-lived sandbox, and deploy.sh to create and start it. Guards reach the gateway through the Tensorlake port proxy. - Add build-images.sh to build the sandbox and control images on Tensorlake without local Docker. PUBLIC=1 publishes both images for all Tensorlake projects from a clean checkout, with the version in the image name. - The control image records its paired sandbox image and source commit. - Pin upstream OpenShell images to the base commit, because Tensorlake builds do not expand variables in FROM, and use a build context that contains the launcher script. - Document the control-plane setup, user authentication, and publishing. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The gateway calls ValidateSandboxCreate before it mints launch authentication, so the driver rejected every sandbox create. Check for launch authentication in CreateSandbox only, as the Docker driver does. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Tensorlake suspends a sandbox after its idle timeout (600 seconds by default), and only incoming traffic resets the timer. Guard traffic to the gateway is outgoing, so working sandboxes were suspended after 10 minutes. - Default the driver timeout to 0, which uses the plan maximum. - Create the control-plane sandbox with --timeout 0. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
- Build the sandbox and control images as CAS images (--cas). - Apply VERSION only to the default image names. Names set in SANDBOX_IMAGE or CONTROL_IMAGE are used as they are, so an exported CONTROL_IMAGE no longer gets a second version suffix. - Document CAS, the idle timeout, and the checks still to run on the CAS dataplane. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Propose mTLS user authentication through Tensorlake tunnels, with guards reaching the gateway through a local gRPC proxy behind the public port. This removes the need for unauthenticated users without an identity provider. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The driver reported a sandbox as running once the launcher started and never checked it again. When the launcher exited, the guard never connected and sandbox create waited until the gateway timed out. - Keep the launcher PID and check it on each status poll. A stopped launcher marks the sandbox failed (LauncherExited) with its exit status and the tl sbx logs command to run. - Stop sending the undocumented process name. With it, Tensorlake treated the launcher as a managed process and restarted it, and each restart failed because the launch bundle is deleted after the first run. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The Tensorlake port proxy resolves sandbox names only for authenticated requests. Guards call the gateway anonymously, so a name-based URL returned SANDBOX_NOT_FOUND. deploy.sh now reads the control sandbox ID and builds the public URL from it. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The launcher created /run/openshell-supervisor-ca with mode 0700. openshell-sandbox requires that directory to be traversable by every workload identity before it installs the public supervisor CA, so the boundary process failed and the sandbox never became ready. Create it with mode 0755, as the other drivers do. It holds only public certificates. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The isolation contract replaced the outer fence projection with ProvisioningEvidence. Build the launch bundle with the new type, bind the launch recipe to the sandbox generation, and set provisioning_evidence on the boundary config and runtime descriptor. Repin the supervisor, sandbox, and gateway images to the branch base commit, so the runtime binaries accept the new descriptor schema. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Tensorlake replaces a CAS image when it is built again under the same name, and cannot delete CAS images yet. Tell contributors to keep one pair of development image names, and describe the one-command rebuild paths for sandbox-only and driver changes. Add RECREATE=1 to deploy.sh, which terminates the existing control sandbox before creating it from a new control image. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The Tensorlake client had no request deadline, so one stalled API or proxy connection froze status and delete reconciliation for every sandbox. Set the Tensorlake SDK default of 300 seconds per request, send the SDK's X-Tensorlake-Request-Timeout-Ms header so the server stops at the same deadline, and add a 10 second connect timeout. Initialize TLS through openshell_crypto::tls::ensure_default_provider instead of installing AWS-LC directly, drop the direct rustls dependency, and list the client with the other Reqwest transports in the crypto README exclusions table. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Publish platform events with the shared progress metadata while a sandbox is accepted, pending, running, and while the launch bundle is uploaded and started. The CLI renders these as the requesting, pulling, and starting steps during sandbox creation. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Describe how the Tensorlake compute driver works, how to run the control plane on Tensorlake, how to run the driver next to your own gateway, and its trust model and limits. Link the page from the runtimes, overview, and drivers pages and add it to the navigation. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Run build-images.sh on demand with a version and a public flag so the control-plane and sandbox image pair can be published from CI. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Add the split-topology design for moving the guard out of the workload VM and name the Tensorlake capability it needs. Mark the public gateway with OIDC as the decided control-plane auth. Rewrite the README in plain language, link the new docs, and fix the stale note about image deletion. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Add the split topology, now the default: each OpenShell sandbox gets a workload VM and a guard VM. The workload VM runs openshell-sandbox in a private network namespace with a veth link, listens on a TLS port, and has every outbound connection turned off by a Tensorlake network policy. The guard VM runs openshell-supervisor and a Tensorlake tunnel that delivers the guard's connection to a forwarder in the workload VM, so OpenShell's TLS runs end to end and no credential enters the agent's VM. The driver creates, provisions, polls, recovers, and deletes the pair. Names are openshell-<id> and openshell-<id>-guard, and only UUID-shaped IDs are treated as sandboxes, so the control sandbox is no longer picked up by recovery. New flags: --topology, --guard-image, --guard-cpus, and --guard-memory-mb. --topology combined keeps the one-VM mode. Both topologies now run the workload runtime as PID 1 of its own PID namespace, which network policy needs to resolve binary identity, and no longer grant the transparent TCP capability, which is for guards that share the workload's network namespace. The image gains the Tensorlake CLI and socat. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Describe the two-VM layout, the tunnel and forwarder path, the trust model, the new flags, and the end-to-end results measured on Tensorlake Cloud, including the three findings that shaped the design. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
…e runbook Fix the parts of the README that drifted from the driver, the launch script, and the deploy script: the variables deploy.sh forwards, the file layout in the VMs, the standard driver flags, the recovery phases, and the Tensorlake CLI commands. Replace the test runbook with a Testing section that separates unit tests, the conformance scenarios that fit this driver, and the manual checks. The conformance lifecycle test stops and starts sandboxes, which this driver rejects, so the runbook no longer runs it. Move the upstream image pin in both Dockerfiles to the branch's merge base with main. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The gateway copies the name from every driver snapshot into its own record and refuses a name change. A recovered record had only an ID, so after a driver restart every status update for a recovered sandbox failed with "name cannot be changed after creation". Tensorlake keeps no labels, so the driver now saves a copy of each sandbox request, without its credentials, under --state-dir and reads it back at recovery. Create saves the request before any VM exists, forget removes it, and recovery prunes files whose VMs are gone. The control plane keeps the directory next to the gateway database. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
…sable Nagle on the forwarder The guard starts `tl sbx tunnel` with `env -i`, so the tunnel saw only the API key and always resolved the workload through the public sandbox service, even when `--tensorlake-api-url` named another deployment. Write `TENSORLAKE_SANDBOX_API_URL` into the tunnel env, which is the variable `tl` reads for the sandbox lifecycle URL. Reject API URL shapes that `tl` silently ignores so a bad value fails at startup. Set socat's nodelay option on both forwarder sockets. Every boundary RPC crosses them as small frames, so delayed ACKs could stall each exchange. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The split topology is the default, so its design doc repeated the README. Keep the four parts the README lacked as one short section: the trust model, why the tunnel, the rejected alternative, and the cost. Remove the doc. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
The guard always runs in its own VM now. The one-VM mode put the credentials in the agent's kernel, was unverified since the PID namespace change, and doubled the code paths. Drop the --topology flag, the combined launch role, and the branches that allowed a sandbox without a guard VM. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
With an allow list, the driver sent allow_internet_access: false for the guard VM. Tensorlake then blocks all DNS, so the tunnel could not resolve its own API host and every guard launcher exited with a DNS error. Keep internet access on in the Tensorlake policy when an allow list is set. Tensorlake then connects only to the listed hosts and its resolver answers only for them. Add the platform API host, where the tunnel checks its key, to the allow list and to the tunnel environment through a new --tensorlake-platform-api-url flag. Record the runbook results in the README and remove the runbook: the conformance scenarios, launcher kills, driver restart recovery, idle timeout, allow list, and delete all passed on Tensorlake on 2026-10-20. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Stop runs the launch script with --stop in both VMs, which ends the current generation, then suspends the VMs so their disks stay. Start resumes the VMs and launches a new generation with the fresh credentials the gateway sends. The launch script now ends a previous generation before it launches, so the same VMs can be used again. A launch counter on each record lets a stop or start cancel an in-flight launch. A stopped sandbox reports Suspended=True so the gateway keeps it Stopped, and a starting one reports Bootstrapping=True. Suspended VMs found at restart, or suspended by hand, are reported as stopped. The lifecycle conformance file passes on Tensorlake. The docs and the README limits sections are reduced to a single scope line. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Drop the stale two-topology wording, list the platform API URL in the tunnel environment, name every host that --allow-out adds, state which driver settings the control plane env file can carry, note when a failed sandbox can be started, and complete the unit test list. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Replace the Claude Code case study in the driver README with one that builds an OpenCode image on Tensorlake and runs it through OpenShell. Add the example Dockerfile, a tutorial page under docs/tutorials, and its navigation entry and index card. Remove docs/control-plane-auth.md. The OIDC decision it recorded is already in the README and the public Tensorlake page, and the mTLS fallback it designed is not implemented. The README now states that in one sentence. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
Add the 2026-10-21 login run to the verified list: Keycloak in a second Tensorlake sandbox as the issuer, browser login through the public URL, the OpenCode case study with an admin token, and a user-role account denied until it joins the workspace. Note the one defect found: the Tensorlake port proxy drops the gRPC status from trailers-only responses, so denied calls through the public URL show "missing grpc-status trailer". Tell users what the message means on the Tensorlake page, and list the fix options under Later. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
shanshantensorlake-spec
force-pushed
the
feat/add_tensorlake
branch
from
October 21, 2026 13:13
6c465dd to
8a9b94e
Compare
… commit A public build no longer needs a hand-picked version. build-images.sh takes it from the checkout: the release tag on HEAD with dots turned into dashes, or else the short commit hash. The Tensorlake Images workflow drops its version requirement and fetches tags so a run from a release tag publishes that release. VERSION stays as an override. Signed-off-by: Shanshan Wang <shanshan.tensorlake@gmail.com>
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.
Adds an extension compute driver that runs each OpenShell sandbox in Tensorlake microVMs.
Each sandbox uses two VMs. The workload VM runs the agent with no network. The guard VM holds the credentials and applies the policy. Stop and start keep the workspace.
Includes the driver, image build and publish scripts, a control-plane deploy script, docs, a tutorial that runs OpenCode on Tensorlake, and an image publish workflow.
Public images for this commit:
openshell-tensorlake-c736a72andopenshell-control-c736a72.Upstream proposal: ai-openshell#4795