From b4b9ba0e102795f6b21c9c2c4caed738f68fd552 Mon Sep 17 00:00:00 2001 From: nandi Date: Wed, 25 Nov 2026 12:05:27 -0800 Subject: [PATCH] remote-build: pull artifacts with sprite file pull; a tar stream over exec breaks on reconnect Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01DPL5hk4tUnZsmzjbobxkwy --- scripts/remote-build.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/remote-build.sh b/scripts/remote-build.sh index 4ce12a3..3e65173 100755 --- a/scripts/remote-build.sh +++ b/scripts/remote-build.sh @@ -21,7 +21,13 @@ sp --no-stdin --dir "$ROOT" -- bash -c \ 'export PATH=$HOME/.pixi/bin:$HOME/.moon/bin:$HOME/.local/bin:$PATH; pixi run just '"${targets[*]}" echo "== pull artifacts" -mkdir -p build host-wasm/target/release -sp --no-stdin --dir "$ROOT" -- tar cf - build/compositor.wasm build/components host-wasm/target/release/chandra-host \ - | tar xf - +# `sprite file pull` rather than a tar stream over exec: a streamed binary can break on reconnect. +# -r on a directory fails, so pull build/components/ file by file. +mkdir -p build/components host-wasm/target/release +pull() { sprite file pull -s "$SPRITE" -p "$@"; } +pull "$ROOT/build/compositor.wasm" build/ +pull "$ROOT/host-wasm/target/release/chandra-host" host-wasm/target/release/ +mods=(); while IFS= read -r f; do mods+=("$ROOT/build/components/$f"); done \ + < <(sp --no-stdin --dir "$ROOT" -- ls build/components | grep -E '\.(wasm|json)$') +pull "${mods[@]}" build/components/ ls -la build/compositor.wasm host-wasm/target/release/chandra-host