From 815d32d3a9976b51f186dbfa97e76d4c8f437147 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Sat, 12 Sep 2026 10:27:38 +0800 Subject: [PATCH] fix(sandbox): use E2B BuildID as template version Disable the docker idle sweeper in integration tests so shared developer daemons are not reaped. --- internal/sandbox/docker_integration_test.go | 3 +++ internal/sandbox/e2b_remote_client.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/sandbox/docker_integration_test.go b/internal/sandbox/docker_integration_test.go index 4fe24bba..dedc1733 100644 --- a/internal/sandbox/docker_integration_test.go +++ b/internal/sandbox/docker_integration_test.go @@ -56,6 +56,9 @@ func newDockerIntegrationManager(t *testing.T, cfg *Config) *SessionBoundManager if err != nil { t.Fatalf("build docker client: %v", err) } + // Integration tests clean up their own sessions. Do not reclaim unrelated + // idle containers when using a shared developer daemon. + client.sweeper = nil probeCtx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() if err := client.Health(probeCtx); err != nil { diff --git a/internal/sandbox/e2b_remote_client.go b/internal/sandbox/e2b_remote_client.go index 0a3f92dc..183b3227 100644 --- a/internal/sandbox/e2b_remote_client.go +++ b/internal/sandbox/e2b_remote_client.go @@ -228,7 +228,7 @@ func (c *E2BRemoteClient) ListTemplates(ctx context.Context) ([]RemoteTemplate, ID: item.TemplateID, Name: name, Status: status, - Version: item.EnvdVersion, + Version: item.BuildID, CreatedAt: item.CreatedAt, UpdatedAt: item.UpdatedAt, Standard: standard,