Answer cooked-mode terminal queries in the originating turn when the native PTY can prove echo is quiet, and hold later query-only replies behind deferred replies on upstream SSH relays. Keep renderer replies atomic and bound both renderer and host-side queues with local, daemon, relay, native, and Docker SSH fish regression coverage.
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* fix(pty): bound cooked reply queue
* fix(pty): bound cooked reply queue
Implement bounded storage for cooked-echo-safe replies: 64 pending
replies and 4096 UTF-16 code units. Shed oldest replies on overflow,
never ordinary input. Add drain failure containment with generation
fencing to prevent stale operations from clearing fresh input after
clear() reuse.
* fix(pty): report pty id in drain failures
When the async drain yields, the owner may rebind to a different PTY
before the failure surfaces. Pass the failing pty id so the transport can
ignore stale failures from a rebound owner. Also tighten the pending
reply queue size bound to prevent half-written entries.