From db44d71dc9bcebc354addb66b90a1e80826cf4c3 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 4 Nov 2026 17:19:55 +0000 Subject: [PATCH 1/3] test(server): reproduce #31007 Antigravity startup failures hiding exit signal and code These tests reproduce #31007: when the downloaded Antigravity runtime exits during verification, the install error drops the signal or exit code and shows only a generic message. Private stderr stays hidden. AI-assisted; verified with the tests and tools listed in the PR. --- .../provider/AntigravityInstallation.test.ts | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/apps/server/src/provider/AntigravityInstallation.test.ts b/apps/server/src/provider/AntigravityInstallation.test.ts index fb142d41decdd..78774c127e412 100644 --- a/apps/server/src/provider/AntigravityInstallation.test.ts +++ b/apps/server/src/provider/AntigravityInstallation.test.ts @@ -18,6 +18,8 @@ import * as Scope from "effect/Scope"; import * as Sink from "effect/Sink"; import * as Stream from "effect/Stream"; import { HttpClient, HttpClientResponse } from "effect/http"; +import * as ChildProcess from "effect/process/ChildProcess"; +import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner"; import * as AntigravityInstallation from "./AntigravityInstallation.ts"; import { type AntigravityReleaseAsset } from "./antigravityRelease.ts"; @@ -311,6 +313,55 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst }), ); + it.effect.each([ + { + name: "a SIGKILL exit", + stderr: "", + exit: "process.kill(process.pid, 'SIGKILL')", + message: + "The downloaded Antigravity runtime could not start in this environment: it exited after signal SIGKILL.", + }, + { + name: "a non-zero exit code", + stderr: "Private startup diagnostics: internal runtime failure", + exit: "process.exit(3)", + message: + "The downloaded Antigravity runtime could not start in this environment: it exited with code 3.", + }, + ])( + "reports $name without private stderr and keeps the previous release", + (testCase) => + Effect.gen(function* () { + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const { installation, stagingReleased } = yield* makeHarness({ + previous: true, + useDefaultValidation: true, + }).pipe( + Effect.provideService( + ChildProcessSpawner.ChildProcessSpawner, + ChildProcessSpawner.make((command) => + spawner.spawn( + command._tag === "StandardCommand" && command.command.endsWith(executableName) + ? ChildProcess.make(process.execPath, [ + "-e", + `process.stderr.write(${encodeJsonString(testCase.stderr)}, () => ${testCase.exit});`, + ]) + : command, + ), + ), + ), + ); + yield* installation.start; + expect(yield* terminalState(installation)).toMatchObject({ + phase: "failed", + message: testCase.message, + }); + yield* Deferred.await(stagingReleased); + yield* expectPreviousRelease(installation); + }), + { skip: hostPlatform === "win32" }, + ); + it.effect.each([ { name: "checksum mismatch", completeAsset: { sha256: "2".repeat(64) } }, { name: "short download", archive: completeArchive.subarray(0, -1), completeAsset: {} }, From 51f163eebab0cc58e187cc98987f2c711868f655 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 4 Nov 2026 17:24:31 +0000 Subject: [PATCH 2/3] fix(server): Antigravity install errors name how the runtime exited When install verification fails because the downloaded runtime exits, the error detail now says which signal killed it or which code it exited with, instead of only the generic "could not start" text. stderr stays private. AI-assisted; verified with the tests and tools listed in the PR. --- .../src/provider/AntigravityInstallation.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/server/src/provider/AntigravityInstallation.ts b/apps/server/src/provider/AntigravityInstallation.ts index b70e5d6860000..8a57d0e49d930 100644 --- a/apps/server/src/provider/AntigravityInstallation.ts +++ b/apps/server/src/provider/AntigravityInstallation.ts @@ -422,11 +422,17 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma Effect.provideService(SecureRandom.SecureRandom, random), Effect.mapError((cause) => { if (isInstallationError(cause)) return cause; - const detail = - isAcpProcessExitedError(cause) && - /\b(?:AF_INET6|enforce_kernel_ipv6_support)\b/.test(cause.stderr ?? "") - ? "Antigravity requires IPv6 socket support. Enable IPv6 in this environment. On WSL, remove ipv6.disable=1 from .wslconfig and run wsl --shutdown." - : "The downloaded Antigravity runtime could not start in this environment."; + const generic = "The downloaded Antigravity runtime could not start in this environment"; + if (!isAcpProcessExitedError(cause)) { + return installationError("verify", `${generic}.`, cause); + } + const detail = /\b(?:AF_INET6|enforce_kernel_ipv6_support)\b/.test(cause.stderr ?? "") + ? "Antigravity requires IPv6 socket support. Enable IPv6 in this environment. On WSL, remove ipv6.disable=1 from .wslconfig and run wsl --shutdown." + : cause.signal !== undefined + ? `${generic}: it exited after signal ${cause.signal}.` + : cause.code !== undefined + ? `${generic}: it exited with code ${cause.code}.` + : `${generic}.`; return installationError("verify", detail, cause); }), ); From 086bd2f740e9e23f4c5a1ad957f699804a73e81a Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 4 Nov 2026 17:30:27 +0000 Subject: [PATCH 3/3] test(server): IPv6 hint keeps precedence over the Antigravity exit status AI-assisted; verified with the tests and tools listed in the PR. --- apps/server/src/provider/AntigravityInstallation.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/server/src/provider/AntigravityInstallation.test.ts b/apps/server/src/provider/AntigravityInstallation.test.ts index 78774c127e412..0a26f7c8f4ca7 100644 --- a/apps/server/src/provider/AntigravityInstallation.test.ts +++ b/apps/server/src/provider/AntigravityInstallation.test.ts @@ -314,6 +314,14 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("Antigravity inst ); it.effect.each([ + { + name: "an IPv6 startup failure", + stderr: + "enforce_kernel_ipv6_support.cc:70] Check failed: AddressFamilySupported(AF_INET6, &loopback6_ok)", + exit: "process.exit(1)", + message: + "Antigravity requires IPv6 socket support. Enable IPv6 in this environment. On WSL, remove ipv6.disable=1 from .wslconfig and run wsl --shutdown.", + }, { name: "a SIGKILL exit", stderr: "",