From 607a7433c3b95d3940e3ba905967bfdb5fc3dde8 Mon Sep 17 00:00:00 2001 From: igneum-josh <337424239+igneum-josh@users.noreply.github.com> Date: Wed, 7 Oct 2026 04:44:26 +0100 Subject: [PATCH] lib.sh: bs_pin gives an empty pin for a tree without rust-toolchain.toml (a failed sed under pipefail ended the caller silently) The b3c228fa builds under the 0.3.16 app tree 5d118f58 (no rust-toolchain.toml yet) died right after the pairing line with no message: sed on the missing file failed, pipefail carried its status into the assignment, set -e ended the script. A guard and a tolerant pipeline; checked alive against a tree without the file. Co-Authored-By: Claude Fable 5.1 --- infra/build-server/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infra/build-server/lib.sh b/infra/build-server/lib.sh index 9eb8757f7..ef05dffbf 100755 --- a/infra/build-server/lib.sh +++ b/infra/build-server/lib.sh @@ -45,7 +45,10 @@ bs_rsync() { rsync -e "$BS_SSH_CMD" "$@"; } # a different compiler gives different bytes and, across a minor version, different lints and errors # the pin (main, 7 October 2026): rust-toolchain.toml at the worktree root (and the fork's own copy) names the channel; the Mac's # rustc AS RESOLVED IN THE CRATE DIR (rustup reads the file), the box's rustc and the pin must agree, else the build is refused -bs_pin() { sed -n 's/^channel *= *"\([^"]*\)".*/\1/p' "${1:-$BS_WT_ROOT}/rust-toolchain.toml" 2>/dev/null | head -1; } +# a tree without the file (an older release branch) gives an empty pin, never a failed pipeline: under pipefail the sed status would +# become the assignment's status and set -e would end the caller silently (7 Oct 2026, 03:36 UTC: the b3c228fa builds under the +# 0.3.16 app tree 5d118f58 died right after the pairing line) +bs_pin() { local f="${1:-$BS_WT_ROOT}/rust-toolchain.toml"; [ -f "$f" ] || { echo ""; return 0; }; { sed -n 's/^channel *= *"\([^"]*\)".*/\1/p' "$f" 2>/dev/null || true; } | head -1; } bs_toolchain_check() { local mac box pin pin=$(bs_pin "$BS_WT_ROOT"); [ -n "$pin" ] || pin=$(bs_pin "$BS_TOP")