@@ -51,6 +51,7 @@ exit ${exitStatus}
5151 NEMOCLAW_LAUNCH_EXIT_COMMAND : closeAfterReply ? "" : "/exit" ,
5252 NEMOCLAW_LAUNCH_EXPECTED_REPLY : "PONG" ,
5353 NEMOCLAW_FIXTURE_REPLY : reply ,
54+ NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT : "" ,
5455 NEMOCLAW_LAUNCH_PROMPT : "prompt" ,
5556 NEMOCLAW_LAUNCH_READY_TEXT : "" ,
5657 NEMOCLAW_LAUNCH_SANDBOX : "sandbox" ,
@@ -87,6 +88,7 @@ it.runIf(process.platform === "linux")(
8788 env : { } ,
8889 exitCommand : "/exit" ,
8990 host : host as never ,
91+ postReplyReadyText : "connected | idle" ,
9092 readyText : "gateway connected | idle" ,
9193 redactionValues : [ ] ,
9294 sandboxName : "alpha" ,
@@ -108,11 +110,18 @@ it.runIf(process.platform === "linux")(
108110 "/exit" ,
109111 "/exit" ,
110112 ] ) ;
113+ expect ( calls . slice ( 1 ) . map ( ( call ) => call . env ?. NEMOCLAW_LAUNCH_READY_TEXT ) ) . toEqual ( [
114+ "gateway connected | idle" ,
115+ "gateway connected | idle" ,
116+ ] ) ;
117+ expect (
118+ calls . slice ( 1 ) . map ( ( call ) => call . env ?. NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT ) ,
119+ ) . toEqual ( [ "connected | idle" , "connected | idle" ] ) ;
111120 } ,
112121) ;
113122
114123it . runIf ( process . platform !== "win32" ) (
115- "waits for OpenClaw idle before the prompt and again before the exit command (#9023)" ,
124+ "waits for 'gateway connected | idle' before the prompt and 'connected | idle' before exit (#9023)" ,
116125 ( ) => {
117126 const fixtureRoot = mkdtempSync ( join ( tmpdir ( ) , "nemoclaw-launch-turn-ready-" ) ) ;
118127 const scriptStub = join ( fixtureRoot , "script" ) ;
@@ -140,7 +149,7 @@ if IFS= read -r -t 1 -d $'\r' _; then
140149 echo "exit arrived before post-reply readiness" >&2
141150 exit 1
142151fi
143- printf 'gateway connected | idle\n' | tee -a "$capture"
152+ printf 'connected | idle\n' | tee -a "$capture"
144153IFS= read -r -d $'\r' exit_command
145154[[ "$exit_command" == "/exit" ]]
146155exit 0
@@ -161,6 +170,7 @@ exit 0
161170 NEMOCLAW_LAUNCH_EXIT_COMMAND : "/exit" ,
162171 NEMOCLAW_LAUNCH_EXPECTED_REPLY : "PONG" ,
163172 NEMOCLAW_LAUNCH_PROMPT : "prompt" ,
173+ NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT : "connected | idle" ,
164174 NEMOCLAW_LAUNCH_READY_TEXT : "gateway connected | idle" ,
165175 NEMOCLAW_LAUNCH_SANDBOX : "sandbox" ,
166176 PATH : `${ fixtureRoot } :${ process . env . PATH ?? "" } ` ,
0 commit comments