From 32ab3a6656b8c1285dd3221ffd704d18ab3976e0 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Thu, 18 Jun 2026 10:34:37 +0000 Subject: [PATCH] test(provisioner): skip stale platform-agent drift-gate after Dockerfile.platform-agent deletion (fixes #3040) #3027 removed workspace-server/Dockerfile.platform-agent because core no longer builds the platform-agent image, but left the drift-gate test that reads it. That test now fails CI / Platform (Go) on main. Skip the two test functions when the Dockerfile is absent; #3038 tracks complete removal of the stale drift-gate test file. --- .../provisioner/platform_agent_image_drift_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/workspace-server/internal/provisioner/platform_agent_image_drift_test.go b/workspace-server/internal/provisioner/platform_agent_image_drift_test.go index 24f7caef..efe298cf 100644 --- a/workspace-server/internal/provisioner/platform_agent_image_drift_test.go +++ b/workspace-server/internal/provisioner/platform_agent_image_drift_test.go @@ -223,7 +223,16 @@ func resolveSSOTRoot(t *testing.T) (path string, available bool) { // "someone vendored the config into core"); AND // - a FULL SSOT-content gate that runs on the publish workflow // (catches "image-baked content drifted from template repo"). +func skipIfPlatformAgentImageRemoved(t *testing.T) { + dockerfilePath := filepath.Join("..", "..", "Dockerfile.platform-agent") + if _, err := os.Stat(dockerfilePath); os.IsNotExist(err) { + t.Skipf("%s was removed in #3027 (core no longer builds the platform-agent image); this drift-gate is stale and will be removed in #3038", dockerfilePath) + } +} + func TestPlatformAgentImageDriftGate(t *testing.T) { + skipIfPlatformAgentImageRemoved(t) + // === Half 1: Dockerfile-side checks (always run) === dockerfilePath := filepath.Join("..", "..", "Dockerfile.platform-agent") @@ -357,6 +366,8 @@ func TestPlatformAgentImageDriftGate(t *testing.T) { // in lockstep. The shape (identity-fallback.sh + /entrypoint.sh // handoff) is the load-bearing part; the names are conventions. func TestPlatformAgentEntrypointWiring(t *testing.T) { + skipIfPlatformAgentImageRemoved(t) + dockerfilePath := filepath.Join("..", "..", "Dockerfile.platform-agent") dockerfile, err := os.ReadFile(dockerfilePath) if err != nil { -- 2.52.0