mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 00:02:29 +00:00
The stderr handler in system-ssh-port-forward-provider.ts stays attached for the forward process's entire lifetime and appends every chunk to an unbounded string, only ever read to build the exit-error detail. A chatty/warning-spamming remote sshd over a long-lived `ssh -N -L` forward could grow it without bound. Fix: keep only the most-recent 64 KB tail, mirroring MAX_RELAY_STARTUP_BUFFER_BYTES in ssh-relay-deploy-helpers.ts. The tail is what the error message surfaces anyway. Test (red->green): emitting >64 KB of stderr then exiting keeps the recent tail marker and drops the oldest, detail bounded below the produced size; without the cap the whole string is retained.