spawn/test/fixtures
L 3eca4221c6
fix: address architectural brittleness in Fly.io integration (issue #1581) (#1585)
Resolves sub-issues #1569, #1570, #1576, #1577, #1578, #1580.

#1569 — /wait endpoint replaces polling loop:
  _fly_wait_for_machine_start now uses GET /apps/{app}/machines/{id}/wait
  ?state=started&timeout=90. One blocking API call instead of 30 polls.

#1570 — fly machine exec replaces fly ssh console for run_server:
  run_server uses 'fly machine exec MACHINE_ID --app APP -- bash -c cmd'
  (direct API, no WireGuard tunnel) when FLY_MACHINE_ID is set. Falls
  back to 'fly ssh console -C' for environments without a machine ID.

#1576 — App name collision loop capped at 5 retries:
  Prevents infinite re-prompt. Suggests FLY_APP_NAME env var after 5
  failed attempts.

#1577 — destroy_server errors are now reported:
  All fly_api calls check for error responses. Reports failed machine
  deletions and exits non-zero on app deletion failure instead of
  always logging "destroyed" regardless of outcome.

#1578 — bun replaced with python3 for all JSON parsing:
  _fly_json_get, _fly_build_machine_body, _fly_list_orgs, destroy_server,
  list_servers all use python3 -c now. python3 is universally available;
  bun was only available after cloud-init completed on the target machine.

#1580 — upload_file uses stdin pipe instead of base64 string injection:
  'fly machine exec ... -- bash -c "cat > path" < local_file' streams
  file content directly. Eliminates the command-length/injection risk of
  embedding base64 content in a shell argument string.

test/mock.sh: add 'fly machine exec' case to the fly CLI mock.
test/fixtures/fly/_env.sh: add FLY_MACHINE_ID to test env.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 07:19:23 -08:00
..
digitalocean refactor: extract mock test env config and API assertions into per-cloud fixture files (#803) 2026-02-13 02:16:11 -08:00
fly fix: address architectural brittleness in Fly.io integration (issue #1581) (#1585) 2026-02-21 07:19:23 -08:00
hetzner feat: upgrade default server sizes, fix Fly.io agent installs, improve E2E tests (#1428) 2026-02-17 22:17:08 -08:00
ovh test: add missing API assertion fixtures and body validation for 8 cloud providers (#1107) 2026-02-14 11:46:49 -05:00
_shared_agent_assertions.sh fix: resolve 18 test/run.sh failures and expand sprite agent coverage (#1498) 2026-02-20 00:06:06 -05:00