Skip to content

fix: parse remote authority from right#944

Open
EhabY wants to merge 4 commits intomainfrom
fix/parse-remote-authority-safe-host
Open

fix: parse remote authority from right#944
EhabY wants to merge 4 commits intomainfrom
fix/parse-remote-authority-safe-host

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented May 7, 2026

Closes #937.

Summary

  • Parse Coder remote authorities from the right, rejoining all safeHost segments before username/workspace extraction.
  • Drop legacy empty-safeHost and --agent parser expectations; add double-dash/triple-dash safeHost regressions.
  • Remove empty-hostname fallbacks in path/secrets/SSH config helpers and avoid session lookup when no deployment is selected.

Tests

  • pnpm test:extension ./test/unit/util.test.ts ./test/unit/core/pathResolver.test.ts ./test/unit/remote/sshConfig.test.ts
  • pnpm typecheck
  • pnpm lint
  • pnpm test:extension
  • pnpm format:check
Implementation notes (Coder Agents generated)
  • parseRemoteAuthority now requires coder-vscode.<safeHost> and at least username/workspace fields.
  • The parser treats the last -- segment as workspace/agent, the previous segment as username, and rejoins earlier segments as safeHost.
  • Tests cover Latin double-dash safeHost, triple-dash Punycode-like safeHost, and multiple embedded -- segments.
  • Legacy deployment-unaware helpers and tests were removed per issue scope.

Generated by Coder Agents.

@EhabY EhabY self-assigned this May 7, 2026
@EhabY EhabY requested a review from code-asher May 7, 2026 16:35
@EhabY EhabY force-pushed the fix/parse-remote-authority-safe-host branch from 98cae3a to 7193197 Compare May 7, 2026 16:39
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.

parseRemoteAuthority: parse right-to-left to handle all safeHost shapes uniformly

1 participant