Skip to content

Add standalone SSH and serial launch planning#132

Merged
qarlus merged 1 commit intodevfrom
feature/standalone-remote-serial-planning
Apr 9, 2026
Merged

Add standalone SSH and serial launch planning#132
qarlus merged 1 commit intodevfrom
feature/standalone-remote-serial-planning

Conversation

@qarlus
Copy link
Copy Markdown
Collaborator

@qarlus qarlus commented Apr 9, 2026

Objective

Wire existing standalone CLI remote flags into concrete PTY launch planning so --ssh and --serial produce actionable runtime launch plans with explicit validation and predictable behavior.

Scope

  • Updated crates/iris-standalone/src/session.rs to introduce launch-target resolution with three modes: shell, SSH, and serial.
  • Added SSH planning support: --ssh <destination> now maps to ssh <destination>, and -e/--command is forwarded as an optional remote command argument in SSH mode.
  • Added basic serial planning support: --serial <port> [--baud <rate>] now maps to Python serial.tools.miniterm (python3 on Unix, py on Windows).
  • Added explicit validation/error handling for blank --ssh/--serial, conflicting --ssh + --serial, and invalid serial + -e/--command combinations.
  • Added comprehensive session-planning tests for SSH/serial happy paths and validation failures.
  • Updated standalone status/checklist docs in docs/phases/06.md to reflect completed SSH/serial launch-plan wiring.
  • Updated CHANGELOG.md with the standalone behavior change.

API and Behavior Changes

  1. API surface change
  • Added internal launch-target planning helpers in crates/iris-standalone/src/session.rs:
    • SessionLaunchTarget
    • resolve_launch_target(...)
    • ssh_arguments(...)
    • serial_session_command(...)
  1. Runtime behavior change
  • iris --ssh user@host now plans and launches ssh directly rather than defaulting to shell startup.
  • iris --ssh user@host -e "<cmd>" now forwards the command as an SSH remote command argument.
  • iris --serial <port> --baud <rate> now plans a basic serial session via serial.tools.miniterm.
  1. Error behavior change
  • build_pty_config(...) now returns explicit errors for:
    • empty SSH destination
    • empty serial port
    • conflicting SSH and serial modes
    • serial mode combined with -e/--command

Backward Compatibility

  • additive/non-breaking (existing shell and -e planning behavior preserved when neither remote mode is selected)

Test Coverage

Added/updated tests in crates/iris-standalone/src/session.rs:

  • uses_ssh_mode_when_destination_is_supplied
  • ssh_mode_accepts_command_override_as_remote_command
  • uses_serial_mode_with_baud_rate_when_port_is_supplied
  • rejects_blank_ssh_destination
  • rejects_blank_serial_port
  • rejects_combining_ssh_and_serial_modes
  • rejects_serial_mode_with_command_override
  • resolve_launch_target_prefers_shell_when_no_remote_mode_selected
  • ssh_arguments_include_remote_command_when_present
  • serial_session_command_uses_platform_launcher_and_miniterm_module

Strategy:

  • happy-path coverage: shell/ssh/serial launch target and argument construction.
  • error/edge coverage: empty inputs and invalid flag combinations.
  • platform-specific coverage: serial launcher command differs by OS (python3 vs py).

Verification

  • cargo fmt --all (pass)
  • cargo clippy -p iris-standalone --all-targets -- -D warnings (pass)
  • cargo test -p iris-standalone (pass; 42 tests)

Files Changed

  • crates/iris-standalone/src/session.rs
  • docs/phases/06.md
  • CHANGELOG.md

Notes

  • This is an intentionally bundled standalone planning update (244 changed lines) to deliver complete SSH/serial planning behavior plus validation and tests in one materially useful review unit.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Warning

Rate limit exceeded

@qarlus has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 10 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 10 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8ce4369f-c9d0-40a4-ad94-9faa91a71743

📥 Commits

Reviewing files that changed from the base of the PR and between 9372b2c and 16430bb.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • crates/iris-standalone/src/session.rs
  • docs/phases/06.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/standalone-remote-serial-planning

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 and usage tips.

@qarlus qarlus merged commit b0c65bb into dev Apr 9, 2026
7 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