fix(gateway): honor tty flag for interactive exec#2315
Conversation
Pass the requested TTY mode through the interactive SSH relay. Skip PTY allocation and resize forwarding when TTY is disabled, and add regression coverage for both modes. Signed-off-by: emonq <emonq@outlook.com>
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
|
recheck |
PR Review StatusValidation: This is a focused gateway bug fix for confirmed issue #2228. It honors the existing Review findings:
Docs: No Fern update is needed; this restores behavior already documented by the protobuf contract and the existing Next state: |
…test streamed stdin and stdout/stderr Signed-off-by: emonq <emonq@outlook.com>
Re-check After Author UpdateThanks @emonq. I reviewed the new commit that strengthens the E2E coverage requested on the previous head. Validation: This remains a focused gateway bug fix for confirmed issue #2228. It restores the existing What I checked:
Review findings:
Docs: No Fern update is needed because this restores behavior already specified by the protobuf contract and existing Next state: |
|
Label |
|
/ok to test a34b6a5 |
Summary
Honor the requested TTY mode throughout the interactive SSH relay. When TTY is disabled, the gateway skips PTY allocation and ignores resize events, preserving pipe-based execution semantics.
Related Issue
Fixes #2228
Changes
ExecSandboxRequest.ttythrough the interactive exec relay.tty=true.tty=falseand TTY-backed withtty=true.Testing
mise run pre-commitall passed.cargo test -p openshell-server interactive_exec --lib— 10 passed.e2e/python/test_sandbox_api.py::test_sandbox_interactive_exec_honors_ttyagainst a Docker-backed gateway — 1 passed.cargo fmt --all -- --check— passed.Ruff format and lint checks — passed.
mise run pre-commitpassesUnit tests added/updated — existing focused unit tests passed; behavior is covered by E2E.
E2E tests added/updated (if applicable)
Checklist