Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds SSH profile support to the iris-standalone crate. It introduces a Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Parser
participant Args as Args Struct
participant Config as Config
participant Session as resolve_launch_target()
participant Target as SSH Launch Target
CLI->>Args: Parse --profile <name>
Args->>Session: Pass args with profile
Session->>Session: Trim & validate profile name
Session->>Config: ssh_profile_by_name(name)
Config->>Config: Case-insensitive lookup
Config-->>Session: Return SshProfile
Session->>Session: Extract destination & port
Session->>Target: Construct SessionLaunchTarget::Ssh
Target->>Target: Store destination + Optional<port>
Session-->>CLI: Return launch target
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Objective
Implement config-backed session profile selection for standalone bootstrap so
iris --profile <name>can plan SSH sessions from saved profile data instead of requiring ad-hoc--ssharguments each run.Scope
--profile <name>CLI support incrates/iris-standalone/src/cli.rs.crates/iris-standalone/src/config.rswith typed SSH profile support:SshConfigSshProfile(name,host,user,port)user@host)Config::ssh_profile_by_name(...).config.rs:crates/iris-standalone/src/session.rs:--profilefrom config into SSH launch targetsssh -p <port>-e/--commandas SSH remote command in profile mode--profilewith--ssh/--serial) and unknown profiles.docs/phases/06.mdstatus/checklist andCHANGELOG.mdentries.API and Behavior Changes
config.rs:SshConfigSshProfileSshProfile::destination()Config::ssh_profile_by_name(...).Args.profileincli.rs.iris --profile productionnow resolves config-defined SSH profile settings into PTY launch planning.-e/--commandis forwarded as remote command when profile mode selects SSH.--sshor--serial.Backward Compatibility
Test Coverage
Added/updated tests in
crates/iris-standalone:cli::tests::parses_cli_flags_and_subcommand(now covers--profileparsing)load_from_path_parses_ssh_profilesload_from_path_rejects_empty_ssh_profile_nameload_from_path_rejects_empty_ssh_profile_hostload_from_path_rejects_duplicate_ssh_profile_names_case_insensitivelyssh_profile_lookup_is_case_insensitiveuses_ssh_profile_mode_when_profile_is_suppliedprofile_mode_accepts_command_override_as_remote_commandrejects_blank_profile_namerejects_unknown_profilerejects_combining_profile_with_ssh_or_serialssh_arguments_include_port_when_presentStrategy:
Verification
cargo fmt --all(pass)cargo clippy -p iris-standalone --all-targets -- -D warnings(pass)cargo test -p iris-standalone(pass; 53 tests)Files Changed
crates/iris-standalone/src/cli.rscrates/iris-standalone/src/config.rscrates/iris-standalone/src/session.rsdocs/phases/06.mdCHANGELOG.mdNotes
Summary by CodeRabbit
Release Notes
--profile <name>flag to launch SSH sessions using preconfigured profiles from configuration