Skip to content

Discover SSH aliases in captured WSL completion scopes - #707

Open
Kuddev wants to merge 3 commits into
mainfrom
feat/wsl-ssh-hosts-679-20261021
Open

Kuddev wants to merge 3 commits into
mainfrom
feat/wsl-ssh-hosts-679-20261021

Conversation

@Kuddev

@Kuddev Kuddev commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Result / 用户结果

SSH destination completion in an owned WSL pane now reads that distribution's configuration, including nested quoted Includes, instead of returning no guest aliases. Captured distribution/user options and explicit -F selection stay with the request. Windows configuration is never substituted for unavailable guest data.

在已有 WSL 终端中输入 SSH 目标时,可以补全来宾配置里的字面 Host,包括嵌套 Include 和含空格、中文的路径;三种补全模式沿用现有编辑语义。

Refs #679. This is the discovery and owned-pane completion slice. Host-library/launcher admission, selecting guest connections from Windows panes, and guest SSH startup/restore remain separate work; this PR does not close the full request.

Design / 设计边界

  • One Rust scanner owns Host validation, Include order, cycle detection and limits. Native and guest adapters supply filesystem operations with their own path semantics.
  • A fixed isolated Python 3 reader performs bounded regular-file reads and directory listing. Configuration contents are not executed; discovery does not run ssh -G.
  • Guest discovery shares a ten-second deadline, 1 MiB source budget, 64-file/eight-level limits, 4096 examined directory entries and 1024 aliases. Native discovery retains its existing cooperative deadline.
  • Admission reads the running-distribution snapshot before executing in a guest. An external stop between enumeration and execution remains a documented OS race.
  • The existing per-pane cache and cancellation/generation ownership remain authoritative. Cache keys distinguish distribution, requested user, config, home expansion and cwd; failed reads are unavailable results, not successful empty snapshots.
  • No private keys are copied and no authentication occurs during completion. The reader resolves the effective guest account for its own query and pins subsequent file operations to it. A captured launch without an explicit user retains WSL's configured-default-user semantics.

Evidence / 验证依据

  • Five targeted Windows regressions passed: shared Include traversal, guest/user/config scope separation, existing host completion isolation, UTF-16 running-list decoding, and the opt-in real WSL completion request.
  • The real Debian fixture explicitly ran the production request pipeline in Inline, Popup and Hybrid modes. It checked login prefixes, a jump-host argument, -F none, cancellation and nested quoted Unicode Include files; the inert Match command was not executed.
  • The production guest reader was also exercised in Debian for exact UTF-8/CRLF text, canonical paths, read limits and bounded listing. WSL management output was checked with both values of WSL_UTF8; the adapter explicitly selects the default UTF-16 behavior.
  • Locked offline GPUI test compilation, complete formatting, architecture checks against 8d629559, platform cfg 459/459 and diff checks passed. Counted source changes: 835, within the default limit.
  • All five actual native platforms and required reports passed on 6f59d484 (run). Local application checks reused the existing dependency build cache; the independent CI validates the exported source separately. This evidence does not claim physical GUI selection, guest SSH authentication or restart/remote-cwd acceptance.

Required Review / 必须确认

  • Followed contribution, architecture and project constraints.
  • Kept one shared SSH traversal policy and existing completion ownership.
  • Existing architecture and platform budgets pass without increases.
  • Verified rejection/scope paths and stated the remaining issue scope.
  • No new UI text, credential store or persisted workspace format.

@github-actions github-actions Bot added the size/L 501–1500 行 label Oct 21, 2026
@Kuddev
Kuddev marked this pull request as ready for review October 21, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L 501–1500 行

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant