Skip to content

Fix project matching for SSH host aliases - #361

Merged
askonomm merged 4 commits into
mainfrom
fix/ssh-host-alias-project-matching
Oct 28, 2026
Merged

askonomm merged 4 commits into
mainfrom
fix/ssh-host-alias-project-matching

Conversation

@askonomm

Copy link
Copy Markdown
Contributor

Summary

  • Resolve SSH host aliases through OpenSSH user configuration before building repository IDs, fixing telemetry attribution and automatic account matching.
  • Honor Include files, wildcard hosts, and user/port-specific config while disabling DNS canonicalization and remote connections.
  • Bound config evaluation to five seconds, log failures, and retain the original remote host on failure. HTTPS matching is unchanged.
  • Include OpenSSH in the Docker image and document configuration and fallback behavior.

Regression coverage

The new end-to-end regression test returned empty project IDs before the fix and now resolves the expected IDs. Coverage includes SCP-style, ssh:// and git+ssh:// remotes, included config, wildcard and user-specific rules, Azure normalization, unchanged HTTPS handling, and invalid-config fallback.

Validation

  • 989 unit tests passed.
  • 17 project-matching e2e tests passed against the release binary.
  • Release build and production Clippy passed.
  • All-target Clippy passed with two unrelated pre-existing e2e lints excluded (sliced-string-as-bytes and doc-lazy-continuation).
  • Branch Code Health safeguard passed; resolver and regression test module score 10.0.
  • git diff --check passed.
  • Docker backend was not run because Docker is unavailable in this environment.

Resolve SSH hosts through OpenSSH user configuration before building repository identities. Cover alias matching and invalid-config fallback with end-to-end tests, and document the behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codescene-access[bot]

This comment was marked as outdated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Add unit coverage for alias normalization, missing and inaccessible config, malformed output, unavailable SSH, command failure, and timeouts. Isolate command execution for deterministic failure-path tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Honor USERPROFILE for Windows SSH config discovery and normalize Include paths. Build Docker e2e images with the runner UID/GID so OpenSSH can resolve its local passwd entry. Add a Windows home override regression test and include server diagnostics in matching failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Coverage Gates Passed
Overall Coverage: 98.5% (required = 95%)
New & Changed Code Coverage: 99.6% (required = 95%)

Review details by gate
  • Overall Coverage

    • Pass/Fail Reason:
      The overall coverage gate was checked for all code in npm/, vscode/ and meets the goal: 98.5% covered >= threshold = 95%
    • Action:
      You have 84 files with a sum of 17386 covered and 267 uncovered lines of code.
  • New & Changed Code Coverage

    • Pass/Fail Reason:
      New or changed code meets coverage goal: 99.6% covered >= threshold = 95%
    • Action:
      You modified 5 files, and covered 226 added/modified lines of code.

@askonomm
askonomm merged commit 88b7a86 into main Oct 28, 2026
15 checks passed
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.

1 participant