Skip to content

Improve user-facing error messages for remote server install failures#10531

Draft
alokedesai wants to merge 2 commits into
masterfrom
orchestrator/error-messages
Draft

Improve user-facing error messages for remote server install failures#10531
alokedesai wants to merge 2 commits into
masterfrom
orchestrator/error-messages

Conversation

@alokedesai
Copy link
Copy Markdown
Member

@alokedesai alokedesai commented May 8, 2026

Description

Problem: When the remote server install fails due to permission denied, disk full, SSH disconnect, or unsupported architecture, users see a generic "Script exited with code N: " message. The raw stderr is often hundreds of characters of curl progress bars or tar errors, making it hard to understand what went wrong or how to fix it.

Solution: Pattern-match stderr content in Error::user_facing_error() to detect 4 common failure modes and produce actionable messages:

Failure Before After
Permission denied Script exited with code 1: mkdir: cannot create directory... Cannot create install directory — check write permissions on your home directory
Disk full Script exited with code 2: tar: No space left on device... (hundreds of lines) Not enough disk space on the remote host — free up space and try again
SSH disconnect Script exited with code 255: (empty) SSH connection was lost during installation — please reconnect and try again
Unsupported arch Script exited with code 2: unsupported arch: armv7l This remote host uses a armv7l processor, which is not supported. Warp SSH extension requires x86_64 or aarch64 (arm64).

Unrecognized errors fall through to the existing truncated-stderr format.

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.

Testing

Unit tests (all passing):

  • cargo test -p remote_server -- transport::tests — 12 passed, 0 failed
  • cargo fmt / cargo clippy — clean

New tests (12 total):

  • script_failed_permission_denied_produces_targeted_message
  • script_failed_read_only_fs_produces_targeted_message
  • script_failed_disk_full_produces_targeted_message
  • script_failed_curl_write_failure_produces_disk_full_message
  • script_failed_ssh_disconnect_produces_targeted_message
  • script_failed_ssh_disconnect_only_whitespace_stderr
  • script_failed_ssh_255_with_stderr_uses_default
  • script_failed_unsupported_arch_produces_targeted_message
  • script_failed_default_format_for_unrecognised_error
  • script_failed_truncates_long_stderr_in_default_format
  • script_failed_body_reflects_stage
  • timed_out_error_message / other_error_has_no_detail

Impact: Addresses permission denied (4.5%), disk full (3.7%), SSH disconnect (1.6%), unsupported arch (3.2%) — ~13% of errors get improved messages.

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

Agent Mode

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

Co-Authored-By: Oz oz-agent@warp.dev

CHANGELOG-IMPROVEMENT: Improved error messages for SSH extension install failures (permission denied, disk full, SSH disconnect)

Improve the ScriptFailed arm in Error::user_facing_error() to detect
specific patterns in stderr and produce targeted, actionable messages
instead of the generic 'Script exited with code N: <stderr>'.

New patterns detected:
- Permission denied / Read-only file system → write permissions advice
- No space left on device → disk space advice
- Exit code 255 + empty stderr → SSH disconnect message
- unsupported arch: <name> → architecture not supported message

Includes 12 unit tests covering all error patterns and edge cases.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
Docker testing revealed that when the install directory runs out of
space, curl exits with code 23 and 'Failure writing output to
destination' rather than the OS-level 'No space left on device'. Add
this pattern to the disk-full check and a corresponding unit test.

Co-Authored-By: Oz <oz-agent@warp.dev>
@alokedesai alokedesai changed the title Enhance user-facing error messages for remote server install failures Improve user-facing error messages for remote server install failures May 9, 2026
Copy link
Copy Markdown
Member Author

Screenshots: Improved Error Messages

Disk Full

When SSH extension install fails because the remote host runs out of disk space:

Before: Raw stderr like "Script exited with code 23: % Total % Received...curl: (23) Failure writing output to destination"
After:
Disk Full Error

"Failed to install SSH extension. Not enough disk space on the remote host — free up space and try again (exit code 23)"

Permission Denied

When the user's home directory is read-only and mkdir fails:

Before: Raw stderr like "Script exited with code 1: mkdir: cannot create directory '/home/testuser': Permission denied"
After:
Permission Denied Error

"Failed to install SSH extension. Cannot create install directory — check write permissions on your home directory (exit code 1)"


Reproduced using Docker containers: 5MB tmpfs for disk-full, chmod 444 /home/testuser for permission-denied.

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