You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Runtime Host SSH management: a fully received frame is discarded when the SSH process times out #3546
Spun out of the review of #3419 at the author's request ([P3], not a merge blocker).
What happens
apps/desktop/src/main/runtime-host-ssh-terminal.ts, in runServiceManagement:
managementTerminal=terminal;if(frame)completePresentation(terminal);// :457 — the frame is already fully decoded hereconstresult=awaitwaitForTerminalProcess(process,{signal: managementInput.signal,timeoutMs: MANAGEMENT_TIMEOUT_MS,// :458-464 — throws on timeouttimeoutMessage: 'Remote Runtime Host service management timed out',
...
});filter.finish();if(frameFailure)throwframeFailure;if(!frame){ ... }// :467 — never reached on timeout
MANAGEMENT_TIMEOUT_MS = 2 * 60_000 (:65).
If the remote emitted its management frame and the frame decoded successfully, but the SSH process then fails to exit within two minutes (a wedged shell, a lingering child holding the pty, a stalled connection teardown), waitForTerminalProcess throws before the already-received frame is ever returned. The frame is discarded and the caller is told the operation failed.
The caller sees a failure while the operation on the Host side may have already succeeded. Before #3419 this path carried the setup flow; #3419 routes side-effecting credential operations (revocation, pending-credential creation) through the same code, so the false-failure window now spans operations that changed remote state.
Why P3 and not higher
No data loss — the Host-side effect is durable, only the local report is wrong.
Retry is safe: revocation is idempotent, and re-preparing replaces the pending credential.
Once a frame has been received and decoded, a process-exit timeout should not turn the call into a failure. Either skip the process wait when frame is set, or catch the timeout, log a warning, and return the frame — letting the process teardown fall to the existing cleanup path.
Activity