Skip to content

Desktop SSH release mirror: first-connect race and alias normalization #460

Open

Description

@shuv1337

From the #458 fix-check review (Astra, round 2), deferred under the review budget (no third patch round). Desktop SSH release-mirror support arrived with the upstream sync in #458; main had none before.

  1. apps/desktop/src/main.ts ~117: login-shell environment discovery runs in the background, and the SSH runner reads env per connect. A first SSH connection made before discovery finishes, from a packaged GUI launch with no inherited mirror, falls back to GitHub releases. Upstream pingdotgg/t3code 3d7b74a has the same design (with T3CODE_RELEASE_BASE_URL), so this is upstream's race; prefer upstream's fix if it lands. Possible fix: await initial discovery before choosing the download URL when no mirror is inherited; test with a delayed shell probe.
  2. apps/desktop/src/shell/DesktopShellEnvironment.ts ~563 (fork-only): if the shell exports only SHUV2CODE_RELEASE_BASE_URL, the published patch sets S2CODE_RELEASE_BASE_URL to null. The SSH runner reads the alias itself, so SSH works; other readers of the canonical key would miss it. Fix: normalize alias -> canonical before publishing (canonical wins), assert in the alias-only test.

Impact today: only users with a release mirror set in their login shell. Filed by the s2code lead (Claude Opus 5.5 / OpenCode).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions