Flaky CI Failure: codesign command not found during macOS Nix fixupPhase for bindings-node-js-napi
flaky
## Flaky CI Failure: codesign command not found during macOS Nix fixupPhase
**Workflow:** Cache all Nix Outputs
**Failed run:** https://github.com/xmtp/libxmtp/actions/runs/24476900293
**Commit:** a5fe14fafddefb141a810ad6e4eeed1a4f7a6e21
**Failed jobs:** build (warp-macos-26-arm64-12x)
### Summary
The macOS ARM64 Nix build job failed during the `fixupPhase` of building `bindings-node-js-napi-1.10.0`. The Darwin stdenv's setup script attempted to run `codesign` (macOS code-signing tool) but the command was not found (exit code 127), causing the entire Nix derivation to fail. The Linux `warp-ubuntu-latest-x64-16x` build completed successfully; only the macOS runner was affected. This occurred on the commit immediately following #3511 (`fix(nix): skip otool -L header line in darwin node binary /nix/store check`), which also addressed a macOS system-tool availability issue in the Nix sandbox.
### Error Details
```
build (warp-macos-26-arm64-12x) Build all flake outputs
> Running phase: fixupPhase
> checking for references to /nix/var/nix/builds/nix-8877-2580031817/ in /nix/store/6jf2mwffw6m5c0a9g0invmiwigmyl6b1-bindings-node-js-napi-1.10.0...
> patching script interpreter paths in /nix/store/6jf2mwffw6m5c0a9g0invmiwigmyl6b1-bindings-node-js-napi-1.10.0
> /nix/store/4c9ajc7qmxd8kaanj1c9v0fbi60bn805-stdenv-darwin/setup: line 277: codesign: command not found
error: Cannot build '/nix/store/52jvp5plx93c1f5f05j5pb03jsw9dhz1-bindings-node-js-napi-1.10.0.drv'.
Reason: builder failed with exit code 127.
Output paths:
/nix/store/6jf2mwffw6m5c0a9g0invmiwigmyl6b1-bindings-node-js-napi-1.10.0
error: Cannot build '/nix/store/x4y2511d9pbf9c5qpj14qmmayhw00j0i-devour-output.json.drv'.
Reason: 1 dependency failed.
Error: `nix build` failed; exit code: Some(1)
```
### Analysis
The `stdenv-darwin` setup script calls `codesign` during `fixupPhase` to sign macOS binaries. The command fails with exit code 127 (command not found), meaning `/usr/bin/codesign` is not accessible inside the Nix build sandbox on the `warp-macos-26-arm64-12x` runner.
This is a macOS-only, Nix-sandbox issue. The Darwin stdenv expects `codesign` to be reachable (typically via `/usr/bin/codesign`), but the Nix sandbox on the warp macOS runner is either not allowing-listing `/usr/bin` correctly or the host tool is missing. The timing is notable: commit `a5fe14f` (#3511) fixed a closely related problem where `otool -L`'s header line was tripping a `/nix/store` path check for node binaries. Both `codesign` and `otool` are macOS system tools that must be available to the Darwin stdenv during `fixupPhase`.
Root cause hypothesis: the `warp-macos-26-arm64-12x` runner's Nix sandbox configuration does not grant access to `/usr/bin/codesign`, or the tool is absent on the runner image. This is a build-infrastructure/Nix-config failure, not a test/code failure.
---
*Reported by [Flaky Failure Watcher](https://github.com/xmtp/libxmtp/blob/main/.github/workflows/flaky-failure-watcher.yml)*
关闭于 2026-04-15 3 条评论