feat(sandbox): boot the shared microVM at startup when sandboxing is enabled

Startup and the enforcement toggle now run the same ensureWorkspaceSandbox
path a command triggers, so the image pull, microVM boot, attestation and
exec-user provisioning are done before the first command instead of on it.
One microVM serves every repo and schedule worktree.
This commit is contained in:
Chris Scott committed 2026-08-28 13:14:17 -04:00
1 parent 2eba81d524
commit 297f6a5237
3 files changed
+63 -35

No files matched your search

+2 -4
View File
@@ -664,11 +664,9 @@ export class SandboxRuntimeService {
if (!capability.available) return
if (getProcessIdentityAttestationError() !== null) return
await cacheSandboxImage()
if (buildSandboxProvisionArgs().length === 0) return
const entry = findWorkspaceSandboxEntry(await listSandboxes())
if (entry === null || !entry.running) return
await ensureWorkspaceSandbox()
await provisionSandboxExecUserPasswd()
logger.info('Provisioned the workspace sandbox exec user passwd entry')
logger.info('Workspace sandbox is running and its exec user is provisioned')
}
isEnabled(): boolean {