Repository navigation
feat(mesh): compute nodes run the assistant's code on a sandbox gateway of their own - #607
Merged
Merged
Conversation
…ay of their own A compute node's install line has LENS_NODE_SANDBOX=1, which starts an OpenShell gateway there. lens node hands Lens the gateway's client certificate once (PUT /api/v1/mesh/node/sandbox, kept sealed) and reports whether the gateway answers; Lens reaches it over the mesh only, through the node's relay on 7443, with mutual TLS checked against the gateway certificate's name, and registers the install's compute nodes with the code sandbox while one has a gateway. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTrHPwWHtEvFJFq3M1YpH4
…way runs Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTrHPwWHtEvFJFq3M1YpH4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTrHPwWHtEvFJFq3M1YpH4
This was referenced Oct 18, 2026
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.
Description
Before: a machine could join as a compute node, but it ran nothing. The code sandbox's node seam (#572) had no nodes to offer, so the assistant's code always ran on this machine.
After: a compute node runs the assistant's code.
LENS_NODE_SANDBOX=1. That also starts an OpenShell gateway on the node, using thesandboxprofile ofdocker-compose.node.yml, and the setting is kept in the node's.envfor later runs.lens nodehands Lens the gateway's client certificate once (PUT /api/v1/mesh/node/sandbox), and Lens keeps it sealed. Each beat then reports whether the gateway answers.sandbox_nodeslists it, andrun_pythonandrun_bashcan run on it.How:
mesh.sandbox_gatewaychecks and seals the certificate.mesh.gateway_driverbuilds the sandbox's Driver for a node.mesh.offer_sandboxescallssandbox.register_nodeswhile a compute node has a gateway; it runs on that hand-over, on remove and undo, and on each compute node's beat (which also covers a restarted API).sandbox.OpenShellcan now take a certificate held in memory and check the gateway against a name rather than its address. OpenShell's client takes neither, so its channel is swapped for one that does; the client is pinned below 0.2.mesh_node.Gatewayreads the certificate from thesandbox-keyvolume, sends it again only when it changes, and checks the gateway's port.Motivation and Context
Part of the Nebula network with a Nodes settings page: remote sandboxes on compute nodes over the mesh. Follows #553, #591, #595 and #602.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).test_mesh_compute.py, including a real mutual-TLS round trip against the fake gateway, with a stranger's certificate refused;settings-mesh.test.tsx.docs/accordingly (docs/mesh.md "Compute nodes", docs/assistant.md).changelog.d/mesh-compute.md.Done questions (AGENTS.md)
sandbox_nodesandnodeonrun_pythonandrun_bash. Nodes are managed over/api/v1/meshand MCP.sandbox.run, naming the node.make openapioutput updated.register_nodesseam, the primary's gateway compose services, the sidecar's relay andsettings.seal.Generated by Claude Code