Skip to content

Add amd64 arch mapping and install source telemetry#10534

Merged
alokedesai merged 7 commits into
masterfrom
orchestrator/arch-script-gzip
May 11, 2026
Merged

Add amd64 arch mapping and install source telemetry#10534
alokedesai merged 7 commits into
masterfrom
orchestrator/arch-script-gzip

Conversation

@alokedesai
Copy link
Copy Markdown
Member

@alokedesai alokedesai commented May 8, 2026

Description

Two changes:

1. Map amd64x86_64 (7 errors, 0.7%)

Some remote hosts report amd64 from uname -m instead of x86_64 (FreeBSD-style, some WSL configs). Both the Rust-side parse_uname_output() and the install script reject this as unsupported, even though amd64 IS x86_64.

Fix: Add "amd64" to the x86_64 match arm in both parse_uname_output() and the install script case statement.

2. Track install source in telemetry

The RemoteServerInstallation telemetry event now reports how the binary was installed, so we can measure SCP fallback usage in production.

Changes:

  • Add InstallSource enum (Server, Client) to transport.rs
  • Change install_binary() trait return type from Result<(), Error> to Result<InstallSource, Error>
  • Thread InstallSource through the manager → BinaryInstallComplete event → telemetry
  • RemoteServerInstallation event payload now includes "install_source": "server" or "install_source": "client" on success, null on failure

Testing

I used computer use to do the following:

  • Docker container with uname -m mocked to return amd64: OLD script exits with "unsupported arch: amd64", NEW script proceeds past arch detection

CHANGELOG-IMPROVEMENT: SSH extension now supports amd64 architecture and tracks install source in telemetry

Three related fixes for remote-server install failures:

1. amd64 arch mapping: Add 'amd64' to the x86_64 arm in both
   parse_uname_output() (setup.rs) and the install script's case
   statement. Some hosts report 'amd64' from uname -m instead of
   'x86_64'.

2. tar pre-check: Add a 'command -v tar' check in the install script
   before attempting any download. If tar is missing, the script exits
   with NO_TAR_EXIT_CODE (4) immediately, avoiding a wasted download.
   The new constant and placeholder substitution are wired through
   setup.rs.

3. gzip SCP fallback: Add a new gzip_scp_install_fallback() function
   in ssh_transport.rs, triggered when the install script exits with
   NO_TAR_EXIT_CODE. The fallback downloads the tarball locally,
   extracts the binary locally with tar, gzips just the binary,
   uploads the .gz via SCP, then runs 'gzip -d' + 'chmod +x' on the
   remote host.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@alokedesai alokedesai changed the title Add amd64 arch mapping, tar pre-check, and gzip SCP fallback for remote-server install Add amd64 arch mapping, tar pre-check, and gzip SCP fallback May 9, 2026
alokedesai and others added 3 commits May 11, 2026 12:14
The gzip fallback addressed only 0.6% of errors and neither VS Code nor
Zed implements it. Keep the simpler changes: amd64 arch mapping and
early tar detection with a clear error message.

Co-Authored-By: Oz <oz-agent@warp.dev>
The early tar check triggers SCP fallback which re-runs the script,
hitting the same tar check again. Let tar fail naturally at extraction
time, same as VS Code. Only 0.6% of errors.

Co-Authored-By: Oz <oz-agent@warp.dev>
Track whether the binary was installed via remote download (on_server)
or client-side SCP upload (on_client). Changes:

- Add InstallMethod enum (OnServer, OnClient) to transport.rs
- Change install_binary() return type: Result<(), Error> -> Result<InstallMethod, Error>
- Thread InstallMethod through manager -> BinaryInstallComplete -> telemetry
- RemoteServerInstallation event now includes install_method field

Co-Authored-By: Oz <oz-agent@warp.dev>
@alokedesai alokedesai changed the title Add amd64 arch mapping, tar pre-check, and gzip SCP fallback Add amd64 arch mapping and install source telemetry May 11, 2026
@alokedesai alokedesai requested a review from kevinyang372 May 11, 2026 22:34
@alokedesai alokedesai marked this pull request as ready for review May 11, 2026 22:34
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 11, 2026

@alokedesai

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR maps amd64 to x86_64 in remote-server platform detection and the install script, and threads install-source information through the remote-server install telemetry event.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@alokedesai alokedesai enabled auto-merge (squash) May 11, 2026 22:56
@alokedesai
Copy link
Copy Markdown
Member Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 11, 2026

@alokedesai

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@alokedesai alokedesai merged commit 4714a61 into master May 11, 2026
24 of 25 checks passed
@alokedesai alokedesai deleted the orchestrator/arch-script-gzip branch May 11, 2026 23:12
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR maps amd64 to x86_64 in remote platform detection and adds install-source telemetry through the remote-server install flow.

Concerns

  • The new SCP fallback predicate skips fallback for the NO_HTTP_CLIENT_EXIT_CODE, which is exactly the no-curl/no-wget path the SCP upload fallback is intended to recover.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

// host's inability to reach the CDN.
_ => false,
fn should_skip_scp_fallback(error: &Error) -> bool {
matches!(error, Error::ScriptFailed { exit_code , .. } if *exit_code == remote_server::setup::NO_HTTP_CLIENT_EXIT_CODE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This skips SCP fallback when the install script exits with NO_HTTP_CLIENT_EXIT_CODE (no curl/wget), but that is the exact failure mode the SCP upload path is meant to recover; keep skipping only unsupported platform exits so hosts without HTTP clients still fall back to SCP.

cephalonaut pushed a commit that referenced this pull request May 12, 2026
## Description

**Two changes:**

### 1. Map `amd64` → `x86_64` (7 errors, 0.7%)
Some remote hosts report `amd64` from `uname -m` instead of `x86_64`
(FreeBSD-style, some WSL configs). Both the Rust-side
`parse_uname_output()` and the install script reject this as
unsupported, even though amd64 IS x86_64.

**Fix:** Add `"amd64"` to the x86_64 match arm in both
`parse_uname_output()` and the install script case statement.

### 2. Track install source in telemetry
The `RemoteServerInstallation` telemetry event now reports *how* the
binary was installed, so we can measure SCP fallback usage in
production.

**Changes:**
- Add `InstallSource` enum (`Server`, `Client`) to `transport.rs`
- Change `install_binary()` trait return type from `Result<(), Error>`
to `Result<InstallSource, Error>`
- Thread `InstallSource` through the manager → `BinaryInstallComplete`
event → telemetry
- `RemoteServerInstallation` event payload now includes
`"install_source": "server"` or `"install_source": "client"` on success,
`null` on failure


### Testing
I used computer use to do the following:
- Docker container with `uname -m` mocked to return `amd64`: OLD script
exits with "unsupported arch: amd64", NEW script proceeds past arch
detection


CHANGELOG-IMPROVEMENT: SSH extension now supports amd64 architecture and
tracks install source in telemetry

---------

Co-authored-by: Oz <oz-agent@warp.dev>
dagmfactory pushed a commit that referenced this pull request May 12, 2026
## Description

**Two changes:**

### 1. Map `amd64` → `x86_64` (7 errors, 0.7%)
Some remote hosts report `amd64` from `uname -m` instead of `x86_64`
(FreeBSD-style, some WSL configs). Both the Rust-side
`parse_uname_output()` and the install script reject this as
unsupported, even though amd64 IS x86_64.

**Fix:** Add `"amd64"` to the x86_64 match arm in both
`parse_uname_output()` and the install script case statement.

### 2. Track install source in telemetry
The `RemoteServerInstallation` telemetry event now reports *how* the
binary was installed, so we can measure SCP fallback usage in
production.

**Changes:**
- Add `InstallSource` enum (`Server`, `Client`) to `transport.rs`
- Change `install_binary()` trait return type from `Result<(), Error>`
to `Result<InstallSource, Error>`
- Thread `InstallSource` through the manager → `BinaryInstallComplete`
event → telemetry
- `RemoteServerInstallation` event payload now includes
`"install_source": "server"` or `"install_source": "client"` on success,
`null` on failure


### Testing
I used computer use to do the following:
- Docker container with `uname -m` mocked to return `amd64`: OLD script
exits with "unsupported arch: amd64", NEW script proceeds past arch
detection


CHANGELOG-IMPROVEMENT: SSH extension now supports amd64 architecture and
tracks install source in telemetry

---------

Co-authored-by: Oz <oz-agent@warp.dev>
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.

2 participants