From 0dcae8db3f9aedccba03f3ddc897369a06536973 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 01:15:46 -0600 Subject: [PATCH 1/2] fix(antigravity-acp): add installCheck smoke check for patchelf-rewritten binaries (#4759) --- pkgs/antigravity-acp/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkgs/antigravity-acp/default.nix b/pkgs/antigravity-acp/default.nix index eca9bfa9c9..8f17acfdaa 100644 --- a/pkgs/antigravity-acp/default.nix +++ b/pkgs/antigravity-acp/default.nix @@ -82,6 +82,31 @@ stdenv.mkDerivation { --set-default SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" ''; + # Runtime smoke check (issue #4759): autoPatchelfHook rewrites these + # binaries on the current nixpkgs pin, and patchelf 0.19.x rewrites + # corrupt single-file executables (the t3 Node SEA segfault, #4884). + # agy_acp_server.par is exactly that shape -- a dynamically linked + # single-file PAR executable -- and this derivation previously had no + # install check that would catch such corruption. + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + export HOME="$TMPDIR" + # localharness_external is a Go binary: --help prints usage and exits + # 2. A SIGSEGV (139, the corruption signature) fails this test. + "$out/bin/localharness_external" --help > /dev/null 2>&1 || [ $? -eq 2 ] + # agy_acp_server.par itself cannot execute in the build sandbox: its + # tcmalloc startup aborts on the sandbox's restricted CPU view + # (third_party/tcmalloc NumCPUs CHECK) before main; on a host it + # starts and answers --help. What patchelf can corrupt is the ELF + # loading path -- the #4759 failure segfaulted inside ld.so before + # main ever ran -- so verify that path through the dynamic linker's + # --list mode, which resolves the patched interpreter and RUNPATH + # without running program initializers. + "${stdenv.cc.bintools.dynamicLinker}" --list "$out/bin/agy_acp_server.par" > /dev/null + runHook postInstallCheck + ''; + meta = { description = "Google's AI coding agent. Official ACP server powered by Antigravity"; homepage = "https://antigravity.google/docs/ide/extensions"; From 5ca0be720d2938bd9846bac5de0b607f978f5ad0 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 02:23:58 -0600 Subject: [PATCH 2/2] fix(antigravity-acp): inspect wrapped PAR payload in installCheck, Linux-guard ELF check (#4759) --- pkgs/antigravity-acp/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/antigravity-acp/default.nix b/pkgs/antigravity-acp/default.nix index 8f17acfdaa..8837ed7928 100644 --- a/pkgs/antigravity-acp/default.nix +++ b/pkgs/antigravity-acp/default.nix @@ -102,8 +102,16 @@ stdenv.mkDerivation { # loading path -- the #4759 failure segfaulted inside ld.so before # main ever ran -- so verify that path through the dynamic linker's # --list mode, which resolves the patched interpreter and RUNPATH - # without running program initializers. - "${stdenv.cc.bintools.dynamicLinker}" --list "$out/bin/agy_acp_server.par" > /dev/null + # without running program initializers. Two corrections from review: + # on Linux the public path is the makeBinaryWrapper launcher that + # postFixup's wrapProgram installs, and the patchelf-rewritten + # payload is the hidden .agy_acp_server.par-wrapped executable next + # to it, so --list the payload, not the launcher; and the check is + # ELF-specific, so it is Linux-only (Darwin's /usr/lib/dyld cannot + # be invoked this way). + ${lib.optionalString stdenv.hostPlatform.isLinux '' + "${stdenv.cc.bintools.dynamicLinker}" --list "$out/bin/.agy_acp_server.par-wrapped" > /dev/null + ''} runHook postInstallCheck '';