From b56cf38784ae09f29dad22909e7a5c377d2d6e37 Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 21 Jul 2026 10:54:15 +0800 Subject: [PATCH] fix(cli): stop overstating workspace durability on sandbox stop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nemoclaw stop` printed "Workspace state is preserved" unconditionally after `docker stop` succeeded. `start` is a direct `docker start` of the same container, and the sandbox /sandbox workspace lives on an OpenShell-owned PVC whose re-attachment NemoClaw does not control, so the message promised a durability guarantee it cannot make (#7199). Reword to state only what stop guarantees — the sandbox stays registered for a later `start` — and guard the #6026 test against the old absolute claim regressing. Refs #7199 Signed-off-by: Dongni Yang Co-Authored-By: Claude Opus 4.8 (1M context) --- src/lib/actions/sandbox/stop.test.ts | 3 ++- src/lib/actions/sandbox/stop.ts | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/actions/sandbox/stop.test.ts b/src/lib/actions/sandbox/stop.test.ts index d2ebcb2a209..b3986c60678 100644 --- a/src/lib/actions/sandbox/stop.test.ts +++ b/src/lib/actions/sandbox/stop.test.ts @@ -92,7 +92,8 @@ describe("stopSandbox", () => { expect(result.exitCode).toBe(0); const output = h.log.mock.calls.map(([line]) => line).join("\n"); - expect(output).toContain("Workspace state is preserved"); + expect(output).toContain("The sandbox stays registered for restart"); + expect(output).not.toContain("Workspace state is preserved"); expect(output).toContain("nemoclaw my-sandbox start"); }); diff --git a/src/lib/actions/sandbox/stop.ts b/src/lib/actions/sandbox/stop.ts index 1fc5e20376d..77de22339e8 100644 --- a/src/lib/actions/sandbox/stop.ts +++ b/src/lib/actions/sandbox/stop.ts @@ -181,7 +181,12 @@ export function stopSandbox( }; } - log(` Sandbox '${sandboxName}' stopped. Workspace state is preserved.`); + // Do not promise workspace-data durability here: `start` is a direct + // `docker start` of the same container, and the sandbox's /sandbox workspace + // lives on an OpenShell-owned PVC whose re-attachment on restart NemoClaw does + // not control (#7199). State only what stop guarantees — the sandbox stays + // registered so a later `start` can bring it back. + log(` Sandbox '${sandboxName}' stopped. The sandbox stays registered for restart.`); log(` Start it again with '${CLI_NAME} ${sandboxName} start'.`); return { exitCode: 0 }; }