@@ -47,17 +47,6 @@ function logSSHBackoffWait(initLogger: InitLogger, waitMs: number): void {
4747}
4848
4949// Re-export SSHRuntimeConfig from connection pool (defined there to avoid circular deps)
50- const USER_INITIATED_SSH_MAX_WAIT_MS = 2 * 60 * 1000 ;
51-
52- function userInitiatedSSHWaitExecOptions (
53- initLogger : InitLogger
54- ) : Pick < ExecOptions , "connectionMaxWaitMs" | "onConnectionWait" > {
55- return {
56- connectionMaxWaitMs : USER_INITIATED_SSH_MAX_WAIT_MS ,
57- onConnectionWait : ( waitMs ) => logSSHBackoffWait ( initLogger , waitMs ) ,
58- } ;
59- }
60-
6150export type { SSHRuntimeConfig } from "./sshConnectionPool" ;
6251
6352/**
@@ -140,15 +129,9 @@ export class SSHRuntime implements Runtime {
140129
141130 // Ensure connection is healthy before executing.
142131 // This provides backoff protection and singleflighting for concurrent requests.
143- if ( options . connectionMaxWaitMs !== undefined && options . connectionMaxWaitMs > 0 ) {
144- await sshConnectionPool . acquireConnection ( this . config , {
145- maxWaitMs : options . connectionMaxWaitMs ,
146- abortSignal : options . abortSignal ,
147- onWait : options . onConnectionWait ,
148- } ) ;
149- } else {
150- await sshConnectionPool . acquireConnection ( this . config ) ;
151- }
132+ await sshConnectionPool . acquireConnection ( this . config , {
133+ abortSignal : options . abortSignal ,
134+ } ) ;
152135
153136 // Build command parts
154137 const parts : string [ ] = [ ] ;
@@ -649,7 +632,6 @@ export class SSHRuntime implements Runtime {
649632
650633 // Step 2: Ensure the SSH host is reachable before doing expensive local work
651634 await sshConnectionPool . acquireConnection ( this . config , {
652- maxWaitMs : USER_INITIATED_SSH_MAX_WAIT_MS ,
653635 abortSignal,
654636 onWait : ( waitMs ) => logSSHBackoffWait ( initLogger , waitMs ) ,
655637 } ) ;
@@ -718,7 +700,6 @@ export class SSHRuntime implements Runtime {
718700 cwd : "~" ,
719701 timeout : 300 , // 5 minutes for clone
720702 abortSignal,
721- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
722703 } ) ;
723704
724705 const [ cloneStdout , cloneStderr , cloneExitCode ] = await Promise . all ( [
@@ -741,7 +722,6 @@ export class SSHRuntime implements Runtime {
741722 cwd : "~" ,
742723 timeout : 30 ,
743724 abortSignal,
744- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
745725 }
746726 ) ;
747727 await createTrackingBranchesStream . exitCode ;
@@ -756,7 +736,6 @@ export class SSHRuntime implements Runtime {
756736 cwd : "~" ,
757737 timeout : 10 ,
758738 abortSignal,
759- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
760739 }
761740 ) ;
762741
@@ -775,7 +754,6 @@ export class SSHRuntime implements Runtime {
775754 cwd : "~" ,
776755 timeout : 10 ,
777756 abortSignal,
778- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
779757 }
780758 ) ;
781759 await removeOriginStream . exitCode ;
@@ -787,7 +765,6 @@ export class SSHRuntime implements Runtime {
787765 cwd : "~" ,
788766 timeout : 10 ,
789767 abortSignal,
790- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
791768 } ) ;
792769
793770 const rmExitCode = await rmStream . exitCode ;
@@ -803,7 +780,6 @@ export class SSHRuntime implements Runtime {
803780 cwd : "~" ,
804781 timeout : 10 ,
805782 abortSignal,
806- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
807783 } ) ;
808784 await rmStream . exitCode ;
809785 } catch {
@@ -842,7 +818,6 @@ export class SSHRuntime implements Runtime {
842818 timeout : 3600 , // 1 hour - generous timeout for init hooks
843819 abortSignal,
844820 env : muxEnv ,
845- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
846821 } ) ;
847822
848823 // Create line-buffered loggers
@@ -916,7 +891,6 @@ export class SSHRuntime implements Runtime {
916891 cwd : "/tmp" ,
917892 timeout : 10 ,
918893 abortSignal,
919- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
920894 } ) ;
921895 const mkdirExitCode = await mkdirStream . exitCode ;
922896 if ( mkdirExitCode !== 0 ) {
@@ -979,7 +953,6 @@ export class SSHRuntime implements Runtime {
979953 cwd : workspacePath , // Use the full workspace path for git operations
980954 timeout : 300 , // 5 minutes for git checkout (can be slow on large repos)
981955 abortSignal,
982- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
983956 } ) ;
984957
985958 const [ stdout , stderr , exitCode ] = await Promise . all ( [
@@ -1044,7 +1017,6 @@ export class SSHRuntime implements Runtime {
10441017 cwd : workspacePath ,
10451018 timeout : 120 , // 2 minutes for network operation
10461019 abortSignal,
1047- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
10481020 } ) ;
10491021
10501022 const fetchExitCode = await fetchStream . exitCode ;
@@ -1064,7 +1036,6 @@ export class SSHRuntime implements Runtime {
10641036 cwd : workspacePath ,
10651037 timeout : 60 , // 1 minute for fast-forward merge
10661038 abortSignal,
1067- ...userInitiatedSSHWaitExecOptions ( initLogger ) ,
10681039 } ) ;
10691040
10701041 const [ mergeStderr , mergeExitCode ] = await Promise . all ( [
0 commit comments