Skip to content

Invert SCP fallback to deny-list and increase install timeout#10533

Draft
alokedesai wants to merge 1 commit intomasterfrom
orchestrator/scp-fallback-inversion
Draft

Invert SCP fallback to deny-list and increase install timeout#10533
alokedesai wants to merge 1 commit intomasterfrom
orchestrator/scp-fallback-inversion

Conversation

@alokedesai
Copy link
Copy Markdown
Member

Description

Invert the SCP fallback logic from an allow-list (only exit code 3) to a deny-list approach, and increase the install timeout. This is the highest-impact change for remote server install failures, covering ~65% of all install errors.

Changes

  1. crates/remote_server/src/setup.rs: Increase INSTALL_TIMEOUT from 60s to 180s (3 minutes) to accommodate slow remote hosts.
  2. crates/remote_server/src/install_remote_server.sh: Add --connect-timeout 15 to curl so it fails fast on unreachable CDN hosts instead of blocking for the full TCP timeout.
  3. app/src/remote_server/ssh_transport.rs: Refactor install_binary() SCP fallback:
    • Old: Only exit code 3 (no curl/wget) triggered SCP fallback.
    • New: All exit codes trigger SCP fallback EXCEPT exit code 2 (unsupported arch/OS), which is unrecoverable.
    • New: Timeout also triggers SCP fallback (previously returned Error::TimedOut).
    • Added should_skip_scp_fallback() helper function.

Why

Previously, DNS failures (exit 6), SSL errors (exit 60), CA cert errors (exit 77), connection refused (exit 7), and other network issues would fail permanently without attempting SCP fallback. The new deny-list approach means any failure that isn't fundamentally unrecoverable (like wrong arch) will attempt the SCP path, where the client downloads the tarball locally and uploads via SCP.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • Unit tests for should_skip_scp_fallback() covering exit codes 2 (skip), 0/1/3/6/7/28/60/77/-1 (don't skip)

  • Unit tests for INSTALL_TIMEOUT value (180s) and curl --connect-timeout 15 presence in install script

  • All 57 remote_server tests pass, all 5 ssh_transport tests pass

  • Docker integration test scripts created (DNS failure, connect-timeout) for manual validation

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/99fcf7a5-4132-4194-9699-a2c26900f06c
Run: https://oz.staging.warp.dev/runs/019e09f4-06e0-71ba-b6f8-56a4682975e9

This PR was generated with Oz.

- Increase INSTALL_TIMEOUT from 60s to 180s to accommodate slow hosts
- Add --connect-timeout 15 to curl in install script so it fails fast
  on unreachable CDN hosts instead of blocking for the full TCP timeout
- Refactor install_binary() SCP fallback from allow-list (only exit
  code 3) to deny-list (skip only exit code 2 = unsupported arch/OS).
  All other failures now trigger SCP fallback, covering DNS failures,
  SSL errors, connection refused, and other network issues (~65% of
  install errors)
- Also trigger SCP fallback on timeout (previously returned TimedOut)
- Add should_skip_scp_fallback() helper with unit tests
- Add setup_tests for INSTALL_TIMEOUT value and curl connect-timeout

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant