mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 17:31:04 +00:00
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> |
||
|---|---|---|
| .. | ||
| common.sh | ||
| github-auth.sh | ||
| key-request.sh | ||