From 6b816b04a6ed78bb7f02fb152119c1341b6dd420 Mon Sep 17 00:00:00 2001 From: Claude Code Bot Date: Wed, 18 Nov 2026 14:13:19 -0800 Subject: [PATCH] fix(swm-macos-runner): install a current python3 in the VM image The base image's python3 is the Command Line Tools 3.9. Its pty.spawn copy loop is `while True` and only drops the pty fd on EOF, so on macOS it never returns once the child exits. The dotfiles pbrun pty test hung a bash-tests job on this runner for over an hour (Task 8 Step 3). macos-latest ships a current python3, so the image now installs Homebrew python and the build fails if python3 is older than 3.10. The guest-dir hash changes, so the updater rebuilds the image. Advances #252 --- scripts/swm-macos-runner/guest/install-runner.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/swm-macos-runner/guest/install-runner.sh b/scripts/swm-macos-runner/guest/install-runner.sh index 7d24c85..2bab3cd 100755 --- a/scripts/swm-macos-runner/guest/install-runner.sh +++ b/scripts/swm-macos-runner/guest/install-runner.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Build VM: install runner, hook, run-job.sh. Args: VERSION SHA256. +# Build VM: install runner, hook, run-job.sh, python3. Args: VERSION SHA256. # job-started.sh and run-job.sh are already in /tmp. set -euo pipefail export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" @@ -23,4 +23,8 @@ sudo install -o root -g wheel -m 0755 /tmp/run-job.sh "${job}" printf 'ACTIONS_RUNNER_HOOK_JOB_STARTED=%s\n' "${hook}" >"${dir}/.env" grep -q "^ACTIONS_RUNNER_HOOK_JOB_STARTED=${hook}$" "${dir}/.env" || { echo "hook not configured" >&2; exit 1; } [[ -x "${job}" && -x "${dir}/run.sh" ]] || { echo "runner files missing" >&2; exit 1; } +# Base python3 is CLT 3.9: its pty.spawn never returns on macOS. macos-latest +# has a current one. +brew install --quiet python +python3 -c 'import sys; sys.exit(sys.version_info < (3, 10))' || { echo "python3 is older than 3.10" >&2; exit 1; } echo "install-runner: ${version} installed"