From 8ab532843787eeabdea09502afc2ffbaf3faf7bf Mon Sep 17 00:00:00 2001 From: Alexander Mills Date: Sat, 8 Aug 2026 00:36:13 -0500 Subject: [PATCH 1/2] test: keep operation lock out of Nix consumer output --- tests/nix/interop.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/nix/interop.nix b/tests/nix/interop.nix index 7dcc948d..98707a33 100644 --- a/tests/nix/interop.nix +++ b/tests/nix/interop.nix @@ -72,6 +72,7 @@ let test -f .vendor/.zed/zed-pkg/docker-node-lib/package.json test -f node_modules/@zed-pkg/docker-node-lib/package.json test ! -e .vendor/.zed/zed-pkg/docker-node-lib/generated/output.txt + test ! -e .zed/operation.lock runHook postCheck ''; From 6312466cbc518108dea95852a75e87245309943d Mon Sep 17 00:00:00 2001 From: Alexander Mills Date: Sat, 8 Aug 2026 01:23:19 -0500 Subject: [PATCH 2/2] fix: strip consumer operation locks before Nix packaging --- nix/zed-package.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nix/zed-package.nix b/nix/zed-package.nix index 92b02249..cb82b886 100644 --- a/nix/zed-package.nix +++ b/nix/zed-package.nix @@ -365,6 +365,24 @@ rec { ${postUnpack} ''; postPatch = '' + # A source checkout may carry the durable operation rendezvous created + # by prior Zed commands. Its diagnostic bytes are mutable coordination + # state, not package input, and must not enter the immutable consumer + # output. Preserve every other deterministic `.zed` adapter artifact. + operation_lock=".zed/operation.lock" + if [[ -L "$operation_lock" ]]; then + echo "mkZedPackage: operation lock must not be a symlink" >&2 + exit 1 + fi + if [[ -e "$operation_lock" ]]; then + if [[ ! -f "$operation_lock" ]]; then + echo "mkZedPackage: operation lock must be a regular file" >&2 + exit 1 + fi + rm -f -- "$operation_lock" + rmdir .zed 2>/dev/null || true + fi + if [[ ! -d ${zedDeps}/tree ]]; then echo "mkZedPackage: zedDeps does not contain the Nix bridge tree" >&2 exit 1