fix(ssh): Intel Mac hosts no longer try to download a missing t3 archive#33325

merged4
main
fix/issue-33314
opened1d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 9h ago

Problem

Automatic SSH setup on an Intel Mac host (Darwin/x86_64) builds t3-<version>-darwin-x64.tar.gz and starts downloading it. T3 does not publish that archive: CLI_ARCHIVE_PLATFORM_KEYS and the cli_archive: false row in release.yml leave darwin-x64 out because Node single executables crash there. So the user gets a failed download instead of the "has no t3 release archive" message that other unsupported hosts get.

Reproduced on 2b65ffb641 by generating the runner with buildRemoteT3RunnerScript and running it in sh with an isolated HOME, a stub uname, and a stub curl. Darwin/x86_64 reached curl just like Darwin/arm64, Linux/x86_64 and Linux/aarch64 did.

Change

The runner's two separate uname -s and uname -m cases are now one case "$(uname -s) $(uname -m)". It lists only the published archive keys: Darwin arm64, Linux arm64/aarch64, and Linux x86_64/amd64. Any other host, Darwin x86_64 included, prints Remote host <os> <arch> has no t3 release archive. and exits 1 before any download. Supported hosts get the same archive names as before. A comment on each side ties the runner's list to CLI_ARCHIVE_PLATFORM_KEYS.

Scope and approval

Fixes pingdotgg/t3code#33314

This only changes automatic SSH archive installation. It does not add Intel macOS support and does not change explicitly configured Node script runners.

Verification

  • packages/ssh/src/tunnel.test.ts, "only downloads a release archive the host can run": the test runs the generated runner in a real sh with a stub uname and a stub curl.
    • The Darwin x86_64 case fails on main with expected 'download attempt\n' to not include 'download attempt' and passes with the fix.
    • The Darwin arm64 case still reaches the downloader.
    • vp test run src/tunnel.test.ts: 12/12 pass.
  • vp run check:changed passes on f73f07179d, after merging main: format, lint, knip, typecheck (35 packages) and tests (3 files, 17 tests).
  • There are no UI changes, so there are no captures.
  • Not checked: a live SSH connection to a native Intel Mac. The host platform was simulated with a stub uname.

Evidence

Runtime transcripts of the generated runner, from merge-base 6c9adfb273 and from f73f07179d, with archive version 0.1.7. Each run used dash with an isolated HOME, a stub uname, and a stub curl that serves SHA256SUMS, logs each URL it is asked for, and fails on the archive request. Row R1 instead starts with a ready runtime already installed. Environment: Linux 6.8.0 x86_64, /bin/sh is dash, Node v26.12.1.

Rowuname -s -mBefore (merge-base 6c9adfb273)After (head f73f07179d)
C1Darwin x86_64requests t3-0.1.7-darwin-x64.tar.gz; stub exit 22exit 1: Remote host Darwin x86_64 has no t3 release archive.; no fetch
C2Darwin arm64requests t3-0.1.7-darwin-arm64.tar.gz; stub exit 22requests t3-0.1.7-darwin-arm64.tar.gz; stub exit 22
C3Linux arm64requests t3-0.1.7-linux-arm64.tar.gz; stub exit 22requests t3-0.1.7-linux-arm64.tar.gz; stub exit 22
C4Linux aarch64requests t3-0.1.7-linux-arm64.tar.gz; stub exit 22requests t3-0.1.7-linux-arm64.tar.gz; stub exit 22
C5Linux x86_64requests t3-0.1.7-linux-x64.tar.gz; stub exit 22requests t3-0.1.7-linux-x64.tar.gz; stub exit 22
C6Linux amd64requests t3-0.1.7-linux-x64.tar.gz; stub exit 22requests t3-0.1.7-linux-x64.tar.gz; stub exit 22
C7Darwin amd64requests t3-0.1.7-darwin-x64.tar.gz; stub exit 22exit 1: Remote host Darwin amd64 has no t3 release archive.; no fetch
C8Darwin aarch64requests t3-0.1.7-darwin-arm64.tar.gz; stub exit 22exit 1: Remote host Darwin aarch64 has no t3 release archive.; no fetch
C9Darwin riscv64exit 1: Remote host riscv64 has no t3 release archive.; no fetchexit 1: Remote host Darwin riscv64 has no t3 release archive.; no fetch
C10Linux riscv64exit 1: Remote host riscv64 has no t3 release archive.; no fetchexit 1: Remote host Linux riscv64 has no t3 release archive.; no fetch
C11FreeBSD x86_64exit 1: Remote host FreeBSD has no t3 release archive.; no fetchexit 1: Remote host FreeBSD x86_64 has no t3 release archive.; no fetch
R1Darwin x86_64execs ready t3; 3 args preserved, exit 37; no uname/fetch/lockexecs ready t3; 3 args preserved, exit 37; no uname/fetch/lock

What else changed, beyond the intended rejection:

  • The rejection message now names both the OS and the architecture. For example, Remote host riscv64 … is now Remote host Darwin riscv64 …, and Remote host FreeBSD … is now Remote host FreeBSD x86_64 ….
  • Darwin aarch64 and Darwin amd64 are no longer accepted. macOS reports arm64 and x86_64, so no real Mac reports either value.
  • Every supported host requests the same archive as before, and hosts that already have the runtime still skip the host check entirely.

The earlier runtime transcript and its driver cover rows C1, C2, C4 and C5. The runner source is byte-identical at this head. A second, independent run rebuilt both runners and replayed all 24 runs, and the outputs matched.

Verification log
  • Review round 1, on f73f07179d: two independent reviewers both returned MERGE with no confirmed bugs. Notes not acted on: a Rosetta shell on Apple Silicon reports x86_64 and is rejected, as it already was in effect, since the archive it requested before was never published. The error could also point Intel Mac users to the install guide.
  • Proof audit: the first pass found the earlier transcript stopped before the archive name. Rows C2–C11 and R1 were then captured, and the second pass found the evidence sufficient.
  • Tests: 12/12 in tunnel.test.ts; check:changed green.

AI-assisted; verified with the tests and tools listed above.

Checks

22 successful · 21 skipped
All checks passed
f73f071

Added 3 commits

  • Merge remote-tracking branch 'origin/main' into fix/issue-33314857cbfa
  • test(ssh): reproduce #33314, runner downloads an archive for Darwin x86_64c2ec79b
  • fix(ssh): Intel Mac hosts no longer try to download a missing t3 archivefdbde64
Synced from GitHub

Approvability

Verdict: Approved at 857cbfa

Macroscope's review found this PR approvable — SSH setup now reports unsupported Intel Mac hosts directly instead of attempting to download a nonexistent archive. Supported platforms and existing installed runtimes retain their current behavior.

No code changes detected at f73f071. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The SSH runner now selects release archives using supported operating system and architecture pairs. Tests check archive selection for Darwin x86_64 and arm64 hosts.

Changes: SSH archive selection

Layer / File(s)Summary
Platform-pair selection and tests
packages/shared/src/cliRelease.ts, packages/ssh/src/tunnel.ts, packages/ssh/src/tunnel.test.ts
The runner matches operating system and architecture pairs before selecting an archive. Tests verify that Darwin x86_64 does not invoke the stub downloader and Darwin arm64 does. The alignment comment now names the SSH runner’s host check.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related PRs

  • pingdotgg/t3code#33316: Changes the same SSH runner to reject Darwin x86_64 before downloading and adds tests for the platform check.

Suggested reviewers: t3dotgg, macroscopeapp

Merge Risk: External image Minimal · up to 857cb

The automatic SSH installer now rejects unsupported Intel macOS hosts before downloading while allowing supported Darwin hosts to reach the downloader. No merge-blocking issue was established.

Pre-merge checks: Passed 4

Check nameStatusExplanation
Title checkPassedThe title names the main change: Intel Mac hosts no longer attempt to download a missing t3 archive. It matches the changeset, which makes the SSH runner check the combined OS and architecture against…
Linked Issues checkPassedIssue #33314 requires three runner behaviors. (1) Darwin/x86_64 must print an unsupported-platform message and exit before any download. (2) Darwin/arm64 must continue to the downloader. (3) Linux x86…
Out of Scope Changes checkPassedAll changed files relate to issue #33314. packages/ssh/src/tunnel.ts replaces the separate OS and architecture checks in the remote runner with one combined host check and a single archive name. This …
Description checkPassedThe description covers the problem, change, scope, and focused verification. It links the related issue but does not include an explicit maintainer approval comment or explain why the fix qualifies wi…
Full details: Title check

Explanation

The title names the main change: Intel Mac hosts no longer attempt to download a missing t3 archive. It matches the changeset, which makes the SSH runner check the combined OS and architecture against published archive platforms. It uses the conventional commit format and is specific to the fix.

Full details: Linked Issues check

Explanation

Issue #33314 requires three runner behaviors. (1) Darwin/x86_64 must print an unsupported-platform message and exit before any download. (2) Darwin/arm64 must continue to the downloader. (3) Linux x86_64 and aarch64 must continue to the downloader. At head, packages/ssh/src/tunnel.ts uses one case statement over "$(uname -s) $(uname -m)". Only "Darwin arm64", "Linux arm64", "Linux aarch64", "Linux x86_64", and "Linux amd64" set T3_PLATFORM_KEY. All other combinations, including Darwin x86_64, print "Remote host <os> <arch> has no t3 release archive." and exit 1 before t3_fetch runs. The keys match the published entries in CLI_ARCHIVE_PLATFORM_KEYS (packages/shared/src/cliRelease.ts), which excludes darwin-x64. The new test "only downloads a release archive the host can run" in packages/ssh/src/tunnel.test.ts runs the generated runner under sh with stub uname and curl. It covers Darwin x86_64 (no download, unsupported message) and Darwin arm64 (download attempted). Linux hosts have no automated test case in this PR. Their behavior rests on code reading and on the runtime transcript the author cites, which is outside this review. The issue's acceptance criteria do not require a Linux test. Requirements are met at the code level.

Full details: Out of Scope Changes check

Explanation

All changed files relate to issue #33314. packages/ssh/src/tunnel.ts replaces the separate OS and architecture checks in the remote runner with one combined host check and a single archive name. This is the requested fix. packages/ssh/src/tunnel.test.ts adds Node built-in imports with a diagnostics override and one parameterized runner test. The test supports the fix. packages/shared/src/cliRelease.ts changes only a comment. The comment links CLI_ARCHIVE_PLATFORM_KEYS to the runner host check, and no runtime code changes. The PR does not change Node script runners or add Intel macOS support. One small behavior change is that "Darwin aarch64" is now rejected. macOS reports arm64 for uname -m, so this does not affect real hosts. This change follows from the combined case and is not a demonstrated unrelated change.

Full details: Description check

Explanation

The description covers the problem, change, scope, and focused verification. It links the related issue but does not include an explicit maintainer approval comment or explain why the fix qualifies without prior approval. It also says AI was used but does not name the model and harness.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info

External image Run configuration

External image Commits

Reviewing files that changed from the base of the PR and between 4c8eb1dfd503fa94986c51b84532604c2abe54bb and 857cbfae6043a5ede3cd25f8bac41a066c8d2721.

External image Files selected for processing: 3

  • packages/shared/src/cliRelease.ts
  • packages/ssh/src/tunnel.test.ts
  • packages/ssh/src/tunnel.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
CodexLive turn WebSocket decoded21.5 KiB21.5 KiB0 B (0.0%)24.4 KiB✅
CodexLive turn messages110 (0.0%)8✅
ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
ClaudeLive turn messages110 (0.0%)8✅

Baseline: 6c9adfb · PR result: f73f071 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Added 1 commit

  • Merge remote-tracking branch 'origin/main' into pr-33325f73f071