From a8cf4e28266ff3790d63f1c645535c0974d9ca39 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 23 Oct 2026 18:55:16 -0400 Subject: [PATCH 1/2] Give the native import probe an owned package copy again 7a51a474b replaced the probe's private package copy with a symlink to the shared native store. Node resolves modules by realpath, so the probed ws entry's parentURL became the store path while the probe compared it with the lexical link path: the fence still refused bufferutil, the comparison filtered the refusal out, and native-scripts failed with seen == [] on every merge since #2873. The planted bufferutil also landed inside the shared store's node_modules for the length of the run. Copy the prepared package into the temporary root again so every ancestor of the probed entry is owned. TemporaryDirectory reaps the sealed copy. Co-Authored-By: Claude Opus 5.5 --- stack/test-native-import-rpc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stack/test-native-import-rpc.py b/stack/test-native-import-rpc.py index 2e0f043f2c..841ee83c5c 100755 --- a/stack/test-native-import-rpc.py +++ b/stack/test-native-import-rpc.py @@ -340,6 +340,9 @@ def main(launch: VerifiedNativePackage, root: Path) -> None: with tempfile.TemporaryDirectory(prefix="native-import-rpc-") as directory: root = Path(directory) prepared = pinned_native_package() - native_root = root / prepared.parents[2].name - native_root.symlink_to(prepared.parents[2], target_is_directory=True) - main(VerifiedNativePackage.qualify(native_root / PACKAGE_LAYOUT), root) + # Node resolves modules by realpath, so a link would put every ancestor of the + # probed ws entry back in the shared store; only an owned copy has owned ancestors. + package = root / prepared.parents[2].name / PACKAGE_LAYOUT + package.parent.mkdir(parents=True, mode=0o700) + shutil.copytree(prepared, package) + main(VerifiedNativePackage.qualify(package), root) From f43505e8e75d977e3549a562834091c1c501cbac Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 23 Oct 2026 18:59:20 -0400 Subject: [PATCH 2/2] Check probe package ownership by real path and repin native inputs The ownership guard compared spelled paths, so a package symlinked under the temporary root passed it while the probe planted and removed bufferutil inside the shared store. Compare resolved paths instead. Every stack/*.py is a native build input (native_build_inputs.py:35), so the probe edit moves the inputs pin; regenerate it with prepare-pi-native --update-pins. Co-Authored-By: Claude Opus 5.5 --- stack/pi-native.sha256 | 2 +- stack/test-native-import-rpc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stack/pi-native.sha256 b/stack/pi-native.sha256 index a7d4cb3668..653166425c 100644 --- a/stack/pi-native.sha256 +++ b/stack/pi-native.sha256 @@ -57,4 +57,4 @@ d64e8c05c7932d377034820b1db0df45612afe64885c0765f8f348a12e1bc955 dist/core/skil 0391543cf703a93a0163b37b3ccebe53e0f12bff6f6162b86d56fb017fe49011 dist/core/system-prompt.js # agent-comms-native-stock-v1 @earendil-works/pi-coding-agent@0.85.1 # agent-comms-native-tree-v1 17edf8badd73bafccf592b651b5a9c0f71b2b05b89db470d1042d3ccb544a0b9 -# agent-comms-native-inputs-v1 eb243f7053a9983fd735cb0d98c6c89ef674052403ef5ea3a41bb3426406df17 +# agent-comms-native-inputs-v1 98ae7ef97dd2811949ed3877038887d95c043f8b078331746bc1f8587645bcbc diff --git a/stack/test-native-import-rpc.py b/stack/test-native-import-rpc.py index 841ee83c5c..54b616da63 100755 --- a/stack/test-native-import-rpc.py +++ b/stack/test-native-import-rpc.py @@ -51,7 +51,7 @@ def ancestor_probe( package: Path, root: Path, env: dict[str, str], deny: Callable[[], None] ) -> dict: """Admit real PR77, then reach a committed ws entry's optional ancestor require.""" - assert package.is_relative_to(root), "Owned fixture package required" + assert package.resolve().is_relative_to(root.resolve()), "Owned fixture package required" ancestor = package.parent.parent / "bufferutil" ancestor.mkdir(mode=0o700) # Exclusive: never replace an existing dependency. marker = root / "ancestor-executed"