mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #351] [MERGED] fix(aenv): preserve queued input during recovery #371
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/351
Author: @Boulea7
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @yingdi-shan
Base:
main← Head:ln-cx/agentenv-36-terminal-input-20261009📝 Commits (2)
3fab007fix(aenv): preserve queued input during recovery6379af9test(aenv): require each recovery input in order📊 Changes
2 files changed (+284 additions, -10 deletions)
View changed files
📝
crates/aenv/src/commands/connect.rs(+4 -10)➕
crates/aenv/src/commands/connect/input_tests.rs(+280 -0)📄 Description
What
Preserve input queued while a recovery
SendInputRPC is in flight.Why
The RPC sends one chunk, but its completion previously drained every later chunk from stdin. This could discard Ctrl-C and subsequent commands before they were sent.
Related issue
Refs #36.
Scope and non-goals
Client recovery input only. The transport protocol and reconnect policy are unchanged.
Design and behavior changes
Remove the post-RPC drain and its unused receiver parameter. The existing serial input loop consumes the remaining chunks in FIFO order. Add regressions for success, RPC errors, timeouts, and Ctrl-C queued behind another input.
Compatibility and operations
Validation
make fmtmake clippymake test-unitCommands and results:
All checks passed; 114 CLI tests passed. The four new regressions fail on the base commit. Tests used a short temporary directory for Unix sockets.
Also exercised real envd PTY input through a forced TCP disconnect: the production watchdog entered recovery, output reconnection finished recovery, and Ctrl-C plus subsequent commands worked in the same shell.
Skipped checks and reasons: validation was limited to the affected CLI package and a standalone envd fixture; full-workspace and server proxy/VM integration were not run.
Risks and reviewer notes
Delivery of already-submitted input remains uncertain after a timeout or disconnect. This change preserves queued input without adding retries for those submitted bytes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.