fix(minimald): plumb errors for spawning/attaching to session shells - #383
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThreads attach errors through the session actor by introducing a public AttachError, returning Result from SessionHandle::attach and Session::attach, minting hosts with Result propagation, and having the connection handler report attach failures to SSH channels and close them. ChangesSSH Channel Attach Error Handling
Sequence Diagram(s)sequenceDiagram
participant SSHClient
participant ConnectionHandler
participant SessionHandle
participant SessionActor
participant SessionHost
SSHClient->>ConnectionHandler: open channel and shell request
ConnectionHandler->>SessionHandle: attach(channel, config)
SessionHandle->>SessionActor: send SessionMessage::Attach with oneshot
SessionActor->>SessionHost: attempt attach with WinSize
alt attach succeeds
SessionHost-->>SessionActor: Ok
SessionActor-->>SessionHandle: Ok
SessionHandle-->>ConnectionHandler: Ok
else attach fails
SessionHost-->>SessionActor: Err(AttachError)
SessionActor-->>SessionHandle: Err(AttachError)
SessionHandle-->>ConnectionHandler: Err(AttachError)
ConnectionHandler-->>SSHClient: write error to channel and close channel
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7518bbc9-544a-4cf6-a900-84f2774b8013
📒 Files selected for processing (2)
crates/minimald/src/connection.rscrates/minimald/src/session.rs
85095d1 to
494170e
Compare
Plumb error handling/values through the session shell attach/spawn path, and surface an error to the user.
For example, a sensible error for not having a
minimal.tomlin the worktree:Summary by CodeRabbit