From 9ef2cafa0424e3da33c94ed7d72da6b2b3ec7ced Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 13 Feb 2026 19:43:16 +0100 Subject: [PATCH] fix: finalize exec approval race fix (openclaw#3357) thanks @ramin-shirali --- CHANGELOG.md | 1 + src/agents/pi-tools.workspace-paths.test.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e83528b4e0..31de48489d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Docs: https://docs.openclaw.ai - CLI: resolve bundled Chrome extension assets by walking up to the nearest assets directory; add resolver and clipboard tests. (#8914) Thanks @kelvinCB. - Tests: stabilize Windows ACL coverage with deterministic os.userInfo mocking. (#9335) Thanks @M00N7682. - Exec approvals: coerce bare string allowlist entries to objects to prevent allowlist corruption. (#9903, fixes #9790) Thanks @mcaxtr. +- Exec approvals: ensure two-phase approval registration/decision flow works reliably by validating `twoPhase` requests and exposing `waitDecision` as an approvals-scoped gateway method. (#3357, fixes #2402) Thanks @ramin-shirali. - Heartbeat: allow explicit accountId routing for multi-account channels. (#8702) Thanks @lsh411. - TUI/Gateway: handle non-streaming finals, refresh history for non-local chat runs, and avoid event gap warnings for targeted tool streams. (#8432) Thanks @gumadeiras. - Security: stop exposing Gateway auth tokens via URL query parameters in Control UI entrypoints, and reject hook tokens in query parameters. (#9436) Thanks @coygeek. diff --git a/src/agents/pi-tools.workspace-paths.test.ts b/src/agents/pi-tools.workspace-paths.test.ts index 320bd7f936..251068e7a4 100644 --- a/src/agents/pi-tools.workspace-paths.test.ts +++ b/src/agents/pi-tools.workspace-paths.test.ts @@ -105,7 +105,10 @@ describe("workspace path resolution", () => { it("defaults exec cwd to workspaceDir when workdir is omitted", async () => { await withTempDir("openclaw-ws-", async (workspaceDir) => { - const tools = createOpenClawCodingTools({ workspaceDir, exec: { host: "gateway" } }); + const tools = createOpenClawCodingTools({ + workspaceDir, + exec: { host: "gateway", ask: "off", security: "full" }, + }); const execTool = tools.find((tool) => tool.name === "exec"); expect(execTool).toBeDefined(); @@ -128,7 +131,10 @@ describe("workspace path resolution", () => { it("lets exec workdir override the workspace default", async () => { await withTempDir("openclaw-ws-", async (workspaceDir) => { await withTempDir("openclaw-override-", async (overrideDir) => { - const tools = createOpenClawCodingTools({ workspaceDir, exec: { host: "gateway" } }); + const tools = createOpenClawCodingTools({ + workspaceDir, + exec: { host: "gateway", ask: "off", security: "full" }, + }); const execTool = tools.find((tool) => tool.name === "exec"); expect(execTool).toBeDefined();