fix(antigravity): say why the runtime crashed instead of a generic line #13387
Closedjuliusmarmingewants to merge 2 commits into
main fromt3code/antigravity-startup-diagnosticsopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -379,0 +383,21 @@383+const WINDOWS_ILLEGAL_INSTRUCTION = 0xc000001d;384+const isAcpProcessExitedError = Schema.is(EffectAcpErrors.AcpProcessExitedError);385+386+/**387+ * Explains why Google's runtime died before it answered, or undefined when388+ * the error is not a process exit. Unknown exits keep the exit code or signal389+ * and the redacted stderr tail, which is still more than a generic line.390+ */391+export function describeAntigravityStartupFailure(error: unknown): string | undefined {392+ if (!isAcpProcessExitedError(error)) return undefined;393+ const stderr = error.stderr ?? "";394+ if (error.signal === "SIGILL" || error.code === WINDOWS_ILLEGAL_INSTRUCTION) {395+ return "Antigravity crashed with an illegal CPU instruction. Google's runtime needs a CPU with AVX2, which this machine does not have.";396+ }397+ if (/AF_INET6|enforce_kernel_ipv6_support/u.test(stderr)) {398+ return "Antigravity needs IPv6 sockets, which this kernel has disabled. On WSL, remove ipv6.disable=1 from .wslconfig and run wsl --shutdown.";399+ }400+ if (/Failed to extract .*failed to (?:open target file|write data chunk)/u.test(stderr)) {401+ return "Antigravity could not unpack its runtime into its temp directory. Check that the disk has a few GB free.";402+ }403+ return `Antigravity stopped while starting. ${error.message}`;
- apps/server/src/provider/acp/AntigravityAcpSupport.ts line 395OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -377,3 +378,18 @@377378 }378379 return blocks;379380 });381+382+// Windows reports an illegal instruction as this NTSTATUS exit code.383+const WINDOWS_ILLEGAL_INSTRUCTION = 0xc000001d;384+const isAcpProcessExitedError = Schema.is(EffectAcpErrors.AcpProcessExitedError);385+386+/**387+ * Explains why Google's runtime died before it answered, or undefined when388+ * the error is not a process exit. Unknown exits keep the exit code or signal389+ * and the redacted stderr tail, which is still more than a generic line.390+ */391+export function describeAntigravityStartupFailure(error: unknown): string | undefined {392+ if (!isAcpProcessExitedError(error)) return undefined;393+ const stderr = error.stderr ?? "";394+ if (error.signal === "SIGILL" || error.code === WINDOWS_ILLEGAL_INSTRUCTION) {395+ return "Antigravity crashed with an illegal CPU instruction. Google's runtime needs a CPU with AVX2, which this machine does not have.";
juliusmarminge added labelsmacroscope-review
juliusmarminge closed this
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This is a focused startup-diagnostics fix with tests, but it changes the Antigravity sign-in failure path and sanitizes OAuth URLs while also altering shared ACP process-error handling. Authentication and OAuth-related changes require human review under the applicable criteria.
Notes:
- Diff unchanged. Approvability was decided on eligibility alone.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).