fix: cap pip detection subprocess with a 10s timeout #12

Merged
JMR-dev merged 2 commits from claude/bootstrap-infinite-loop-arm64-VU64t into main 2026-05-22 19:14:53 +00:00
2 Commits
Author SHA1 Message Date
Claude 8a0e3ee9e4 fix: add timeouts to every subprocess invocation
`run()` and `shell()` now default to a 30-minute cap (generous enough for
heavy apt/brew installs and large downloads, bounded enough to catch a
true hang). Callers can override per-call.

All remaining direct subprocess.run sites have explicit timeouts sized to
the work they do: short caps for read-only probes (rpm, dpkg, brew list,
flatpak info, gh auth status, xcode-select -p, sysctl, VBoxManage), a
60-minute cap for the pyenv Python compile, a 15-minute cap for the
interactive `gh auth login` browser flow, and ConnectTimeout+30s for the
VM SSH helper. A small `_probe()` wrapper centralizes the probe pattern.

On timeout the bootstrap now warns and either fails the check gracefully
or returns rc=124, rather than blocking indefinitely.

https://claude.ai/code/session_01447pnRM4ogyxs5tVCUNDZW
2026-05-22 19:11:04 +00:00
Claude 4525cbc219 fix: cap pip detection subprocess with a 10s timeout
A hung `python3 -m pip --version` inside `_pip_installed()` could block
the bootstrap indefinitely, since `subprocess.run` was called without a
timeout. Treat a timeout (or a missing python3) as "pip not installed"
so the bootstrap proceeds to install it rather than hanging.

https://claude.ai/code/session_01447pnRM4ogyxs5tVCUNDZW
2026-05-22 19:05:28 +00:00