Generalize the remote tooling check to a list of required commands
Check NixOS configurations / eval-hosts (pull_request) Failing after 12m13s

Per-run tooling verification (added in the previous commit) was hardcoded
to checking just `nix`. Turn it into a small array instead, so a future
remote build step needing another tool extends that list rather than
growing a second parallel check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 14:42:00 +00:00
co-authored by Claude Sonnet 5
parent f5ef3194d4
commit 9a1d6842d7
+23 -12
View File
@@ -544,18 +544,29 @@ ensure_remote_repo() {
ssh "$ssh_target" "git clone '${origin_url}' '${remote_repo_dir}'"
fi
# Checked (and bootstrapped if missing) every run, not just right after a
# fresh clone -- confirmed live: a first bootstrap can clone the repo
# successfully and still leave the node without a working `nix` (e.g. the
# node had no `sudo`, which the Nix installer's root path depends on --
# see the fix in scripts/codex-setup.sh), and a later run with the repo
# already present would otherwise never retry it. Sources
# scripts/lib/nix-bootstrap.sh's ensure_nix_profile the same way the
# build commands below do -- a single-user Nix install typically only
# gets sourced into login shells, and ssh's non-interactive command
# execution is neither, so a freshly-installed `nix` still wouldn't be on
# PATH here without it.
if ssh "$ssh_target" "cd '${remote_repo_dir}' && . scripts/lib/nix-bootstrap.sh && ensure_nix_profile && command -v nix" >/dev/null 2>&1; then
# Trivial check, run every time (not just right after a fresh clone) --
# confirmed live: a first bootstrap can clone the repo successfully and
# still leave the node without a working `nix` (e.g. the node had no
# `sudo`, which the Nix installer's root path depends on -- see the fix
# in scripts/codex-setup.sh), and a later run with the repo already
# present would otherwise never retry it. Sources
# scripts/lib/nix-bootstrap.sh's ensure_nix_profile first -- a
# single-user Nix install typically only gets sourced into login shells,
# and ssh's non-interactive command execution is neither, so a
# freshly-installed `nix` still wouldn't be on PATH here without it.
#
# Just `nix` today -- the only thing the remote build commands below
# actually invoke -- but a list (not a single hardcoded check) so a
# future remote step needing another tool can add itself here instead of
# growing a parallel check.
local remote_required_cmds=(nix)
local tooling_check_cmd="cd '${remote_repo_dir}' && . scripts/lib/nix-bootstrap.sh && ensure_nix_profile"
local cmd
for cmd in "${remote_required_cmds[@]}"; do
tooling_check_cmd="${tooling_check_cmd} && command -v ${cmd}"
done
if ssh "$ssh_target" "$tooling_check_cmd" >/dev/null 2>&1; then
echo "Build tooling already present on ${node}."
else
echo "==> Bootstrapping build tooling on ${node} (scripts/codex-setup.sh)..."