mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-09 11:10:10 +00:00
This commit fixes 3 high-impact reliability issues that could cause runtime failures: 1. **OAuth server PID race condition** (shared/common.sh) - BEFORE: Used pgrep to find server PID, which could match wrong processes - AFTER: Store PID in a file and read it reliably - IMPACT: Prevents OAuth cleanup failures and orphaned server processes 2. **Unhandled curl failures in OAuth code exchange** (shared/common.sh) - BEFORE: curl failures returned empty response without error detection - AFTER: Check curl exit code and report network/API errors clearly - IMPACT: Users get actionable feedback instead of cryptic "empty key" errors 3. **Missing error handling in script download** (cli/src/commands.ts) - BEFORE: Caught download error but continued execution with undefined scriptContent - AFTER: Exit early when download fails to prevent crash - IMPACT: Prevents "Cannot read property of undefined" runtime errors All changes preserve existing behavior while adding defensive error handling. 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 | ||