spawn/shared
A 8df6724ef4
fix: improve reliability in shared/common.sh error handling (#1177)
This commit fixes 3 critical reliability bugs in shared/common.sh:

1. Float arithmetic in OAuth polling loop (line 702)
   - Bug: elapsed=$((elapsed + POLL_INTERVAL)) fails when POLL_INTERVAL is decimal
   - Impact: OAuth timeout detection breaks when users set SPAWN_POLL_INTERVAL=0.5
   - Fix: Use python3 for float addition with integer fallback

2. Missing error handling in extract_ssh_key_ids (line 1249)
   - Bug: No error handling when python3 fails or API returns malformed JSON
   - Impact: Silent failures in SSH key provisioning across 7+ cloud providers
   - Fix: Add error handling with clear diagnostic messages

3. Unsafe fallback in calculate_retry_backoff (line 1312)
   - Bug: Empty interval returned if python3 unavailable and echo fails
   - Impact: sleep "" errors break retry loops in all cloud API wrappers
   - Fix: Add input validation and use printf instead of echo

All tests pass (13685 pass, 0 fail).

Agent: code-health

Co-authored-by: spawn-refactor-bot <refactor@openrouter.ai>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 00:08:27 -05:00
..
common.sh fix: improve reliability in shared/common.sh error handling (#1177) 2026-02-15 00:08:27 -05:00
github-auth.sh refactor: decompose ensure_jq and ensure_gh_cli into focused helpers (#994) 2026-02-13 12:14:56 -08:00
key-request.sh fix: HIGH severity security issues (command injection + weak VNC password) (#1150) 2026-02-14 20:39:48 -05:00