diff --git a/test/e2e/live/full-e2e.test.ts b/test/e2e/live/full-e2e.test.ts index 2eb85960307..fd66ca21cfd 100644 --- a/test/e2e/live/full-e2e.test.ts +++ b/test/e2e/live/full-e2e.test.ts @@ -148,7 +148,7 @@ async function runOpenClawLaunchTurnAfterRecovery(input: { env: env(PORTABLE_PROFILE ? { DOCKER_HOST: "" } : {}), exitCommand: "/exit", host: input.host, - postReplyReadyText: "connected | idle", + postReplyReadyText: "gateway connected | idle", readyText: "gateway connected | idle", redactionValues: input.redactionValues, sandboxName: SANDBOX_NAME, diff --git a/test/e2e/live/launch-readiness-lease-acceptance.test.ts b/test/e2e/live/launch-readiness-lease-acceptance.test.ts index 67d637f294d..7084031cdcf 100644 --- a/test/e2e/live/launch-readiness-lease-acceptance.test.ts +++ b/test/e2e/live/launch-readiness-lease-acceptance.test.ts @@ -38,7 +38,7 @@ test.runIf(process.platform === "linux" && SANDBOX_NAME.length > 0)( env: process.env, exitCommand: "/exit", host, - postReplyReadyText: "connected | idle", + postReplyReadyText: "gateway connected | idle", readyText: "gateway connected | idle", redactionValues: [], sandboxName: SANDBOX_NAME, diff --git a/test/e2e/support/launch-agent-turn.test.ts b/test/e2e/support/launch-agent-turn.test.ts index a93c5f4292d..a41a5259ec0 100644 --- a/test/e2e/support/launch-agent-turn.test.ts +++ b/test/e2e/support/launch-agent-turn.test.ts @@ -88,7 +88,7 @@ it.runIf(process.platform === "linux")( env: {}, exitCommand: "/exit", host: host as never, - postReplyReadyText: "connected | idle", + postReplyReadyText: "gateway connected | idle", readyText: "gateway connected | idle", redactionValues: [], sandboxName: "alpha", @@ -116,12 +116,12 @@ it.runIf(process.platform === "linux")( ]); expect( calls.slice(1).map((call) => call.env?.NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT), - ).toEqual(["connected | idle", "connected | idle"]); + ).toEqual(["gateway connected | idle", "gateway connected | idle"]); }, ); it.runIf(process.platform !== "win32")( - "waits for 'gateway connected | idle' before the prompt and 'connected | idle' before exit (#9023)", + "requires the exact reply before the post-reply 'gateway connected | idle' line (#9023)", () => { const fixtureRoot = mkdtempSync(join(tmpdir(), "nemoclaw-launch-turn-ready-")); const scriptStub = join(fixtureRoot, "script"); @@ -144,13 +144,18 @@ if IFS= read -r -t 1 -d $'\r' _; then fi printf 'gateway connected | idle\n' | tee -a "$capture" IFS= read -r -d $'\r' _ -printf 'PONG\n' | tee -a "$capture" printf 'gateway connected | idle\n' | tee -a "$capture" if IFS= read -r -t 1 -d $'\r' _; then - echo "exit arrived before post-reply readiness" >&2 + echo "exit command arrived before the exact reply" >&2 + exit 1 +fi +printf 'PONG\n' | tee -a "$capture" +printf 'gateway connected | busy\n' | tee -a "$capture" +if IFS= read -r -t 1 -d $'\r' _; then + echo "exit command arrived while the TUI reported 'gateway connected | busy'" >&2 exit 1 fi -printf 'connected | idle\n' | tee -a "$capture" +printf 'gateway connected | idle\n' | tee -a "$capture" IFS= read -r -d $'\r' exit_command [[ "$exit_command" == "/exit" ]] exit 0 @@ -171,7 +176,7 @@ exit 0 NEMOCLAW_LAUNCH_EXIT_COMMAND: "/exit", NEMOCLAW_LAUNCH_EXPECTED_REPLY: "PONG", NEMOCLAW_LAUNCH_PROMPT: "prompt", - NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT: "connected | idle", + NEMOCLAW_LAUNCH_POST_REPLY_READY_TEXT: "gateway connected | idle", NEMOCLAW_LAUNCH_READY_TEXT: "gateway connected | idle", NEMOCLAW_LAUNCH_SANDBOX: "sandbox", PATH: `${fixtureRoot}:${process.env.PATH ?? ""}`,