From e6c13f2518d4c0d5b828d9d5fc46d68a86e947ea Mon Sep 17 00:00:00 2001 From: Surma Date: Sun, 8 Nov 2026 04:34:45 +0000 Subject: [PATCH] Provide independent source tree references for the sandbox P1 checks --- flake.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index 5bc694e..a3df002 100644 --- a/flake.nix +++ b/flake.nix @@ -162,6 +162,7 @@ checks.tests = craneLib.mkCargoDerivation (common // wasiCcEnv // { inherit cargoArtifacts; pnameSuffix = "-test"; + nativeBuildInputs = common.nativeBuildInputs ++ [ pkgs.git ]; doCheck = true; buildPhaseCargoCommand = ""; # Keep the same sandbox-compatible modules in the shared host test executable. @@ -175,6 +176,15 @@ preCheck = '' export SAUSAGE_CACHE="$TMPDIR/sausage-cache" export CARGO_TARGET_DIR="$PWD/target" + export RUST_BACKTRACE=1 + # Flake sources omit Git history. Map the recorded revision to independently + # staged source trees for P1's directory-hash comparison. + cp -r ${userlandSrc}/agents ${userlandSrc}/skills ${userlandSrc}/extensions . + git init --quiet + git add agents skills extensions + git -c user.name=Sausage -c user.email=sausage@localhost \ + commit --no-gpg-sign --quiet -m 'Flake source trees' + git update-ref refs/replace/${revision} HEAD mkdir -p target/userland ln -s ${userland} target/bundle ln -s ${userland} target/userland/bundle