Skip to content

[0.60.5] Preserve SSH username case in remote sessions - #554

Open
Finesssee wants to merge 1 commit into
mainfrom
codex/port-0.60.5-ssh-username-case
Open

Finesssee wants to merge 1 commit into
mainfrom
codex/port-0.60.5-ssh-username-case

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Port upstream b88c78718da1372c341dae2cde6d53b830a1c813.
  • Preserve SSH usernames exactly while deduplicating only the hostname case-insensitively.
  • Keep the first destination spelling and the existing validation and SSH command behavior.

Validation

  • cargo fmt --all -- --check
  • git diff --check
  • CARGO_TARGET_DIR=C:\Users\mac\AppData\Local\Temp\wcb-wave2-553-target cargo test --manifest-path rust/Cargo.toml agent_sessions --lib (56 passed)

This PR is intentionally scoped to the Windows remote-session host normalization path and is ready for review. It is not merged.

Summary by CodeRabbit

  • Bug Fixes

    • Host entries are now deduplicated case-insensitively by hostname while preserving differences in SSH username casing.
    • Entries such as Alice@host and alice@host remain distinct, while equivalent host-only entries are consolidated.
  • Tests

    • Added coverage verifying username-case preservation and hostname deduplication during host sanitization and merging.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ba5d0c0f-64ea-4d8f-8710-9d0ac25adfae

📥 Commits

Reviewing files that changed from the base of the PR and between 10e3b09 and 0daf189.

📒 Files selected for processing (2)
  • rust/src/agent_sessions/remote.rs
  • rust/src/agent_sessions/tests.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds hostname-aware deduplication for remote hosts. It preserves SSH username case, lowercases hostname comparisons, updates fetch filtering and host sanitization, and adds coverage for these cases.

Changes

SSH host deduplication

Layer / File(s) Summary
Hostname-aware deduplication key
rust/src/agent_sessions/remote.rs
Adds host_dedup_key, which trims hosts, preserves username case, and lowercases the hostname component.
Deduplication integration and validation
rust/src/agent_sessions/remote.rs, rust/src/agent_sessions/tests.rs
Updates fetch filtering and sanitized_hosts to use the new key. Tests verify distinct username casing and case-insensitive hostname deduplication.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving SSH username case in remote sessions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

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