Skip to content

Fix Ghostty SSH wrapper path in embedded app bundles - #8102

Merged
austinywang merged 1 commit into
mainfrom
issue-8093-ssh-ghostty-binary-path
Jul 15, 2026
Merged

austinywang merged 1 commit into
mainfrom
issue-8093-ssh-ghostty-binary-path

Conversation

@austinywang

@austinywang austinywang commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a deterministic regression for Ghostty SSH wrappers in embedded app bundles
  • export the exact bundled Ghostty CLI helper path from cmux and protect it from inherited/user environment overrides
  • teach Ghostty core and its zsh, bash, fish, nushell, and elvish integrations to invoke that full path instead of reconstructing <GUI executable dir>/ghostty
  • publish and checksum-pin the matching universal ReleaseFast GhosttyKit

Root cause

Ghostty derived GHOSTTY_BIN_DIR from selfExePath() and every SSH shell wrapper appended /ghostty. In a GhosttyKit host, selfExePath() is cmux, so the wrapper constructed /Applications/cmux.app/Contents/MacOS/ghostty. cmux actually ships the Ghostty CLI helper at Contents/Resources/bin/ghostty.

The fix introduces one full executable-path contract, GHOSTTY_BIN. Native Ghostty resolves it to its own executable; cmux sets it to its bundled helper. GHOSTTY_BIN_DIR remains only the directory used by the independent PATH feature. Embedded hosts without a helper do not install a broken SSH wrapper.

Affected users

Ghostty defaults ssh-env and ssh-terminfo to off, so ordinary sessions without either feature do not define the wrapper and will not reproduce the bug. It affects sessions where either feature is enabled by Ghostty config or cmux remote/bootstrap behavior. A separately installed Ghostty does not determine the outcome because the old wrapper directly executed the derived bundle path instead of searching PATH.

Regression proof

Commit d08653b7d4 contains the failing test only. Against the old submodule it invokes the actual zsh integration and fails with exit 127 and ssh:4: no such file or directory: .../cmux.app/Contents/MacOS/ghostty, matching #8093. Against the fixed head the same zsh and bash behavior checks invoke the host-provided helper as +ssh -- user@example.com and pass.

Verification

  • python3 tests/test_issue_8093_ghostty_ssh_binary_path.py
  • zsh, bash, and fish syntax checks
  • Ghostty fork required test workflow: green (shell-integration: invoke resolved Ghostty CLI path ghostty#115)
  • universal ReleaseFast GhosttyKit built from b4b6d69c8, archive validator passed, GitHub asset digest pinned as 89a2d738fc566c9c91e2c0ed7c2c9fa9f6ac18d9f0541fd9ff58e41bb8b8caa9
  • ./tests/test_ci_ghosttykit_checksum_present.sh
  • ./tests/test_ci_ghosttykit_checksum_verification.sh
  • python3 scripts/check-package-resolved-policy.py
  • python3 scripts/check-workspace-package-groups.py --check
  • global Swift budget script run; current main baseline fails in unrelated files, while the only touched Swift file is 315 lines and neither budget TSV changes
  • no local xcodebuild or app dogfood build run, per task instructions

Closes #8093

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Building Building Preview, Comment Jul 14, 2026 10:55pm
cmux-staging Building Building Preview, Comment Jul 14, 2026 10:55pm

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@austinywang, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 75d0fda1-380b-4f5f-883c-ee5d7423e449

📥 Commits

Reviewing files that changed from the base of the PR and between d8f6bdd and d08653b.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • tests/test_issue_8093_ghostty_ssh_binary_path.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8093-ssh-ghostty-binary-path

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@austinywang
austinywang marked this pull request as ready for review July 14, 2026 23:11
@greptile-apps

greptile-apps Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds regression coverage for Ghostty SSH wrappers in embedded app bundles. The main changes are:

  • A new Python test for the host-provided GHOSTTY_BIN path.
  • zsh and bash wrapper coverage for SSH invocation arguments.
  • CI wiring for the new regression test.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds the Ghostty SSH binary-path regression test to the existing CLI no-socket regression step.
tests/test_issue_8093_ghostty_ssh_binary_path.py Adds a Python regression test that verifies zsh and bash SSH wrappers call the exact host-provided executable path.

Reviews (2): Last reviewed commit: "test: reproduce embedded Ghostty SSH bin..." | Re-trigger Greptile

@austinywang austinywang reopened this Jul 14, 2026
@austinywang
austinywang merged commit 518a46c into main Jul 15, 2026
7 of 9 checks passed

This branch was successfully deployed

1 active deployment
Preview – cmux — d08653b7 Deployed Jul 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ghostty binary missing from application bundle?

1 participant