From fa890366293384afa6940ee8c351ddc63868f95e Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Wed, 3 Jun 2026 10:32:28 -0400 Subject: [PATCH] test: use canonical host command tool id --- scripts/host-command-tool-smoke.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/host-command-tool-smoke.ts b/scripts/host-command-tool-smoke.ts index 4f10cac3..a349c391 100644 --- a/scripts/host-command-tool-smoke.ts +++ b/scripts/host-command-tool-smoke.ts @@ -18,7 +18,7 @@ async function main(): Promise { const registry = createHostToolRegistry([ createHostCommandTool({ - name: "host.node-smoke", + name: "host/node_smoke", description: "Runs a bounded Node.js host command for smoke coverage.", command: process.execPath, args: ["-e", "console.log(JSON.stringify({ cwd: process.cwd(), args: process.argv.slice(1), token: process.env.SMOKE_TOKEN || null }))", "--"], @@ -33,12 +33,12 @@ async function main(): Promise { const runtime = await createRuntime({ backend: "wordpress-playground", environment: { kind: "wordpress", version: "latest" }, - policy: { network: "deny", filesystem: "sandbox", commands: ["host.node-smoke"], secrets: "none", approvals: "never" }, + policy: { network: "deny", filesystem: "sandbox", commands: ["host/node_smoke"], secrets: "none", approvals: "never" }, hostTools: registry, }, createPlaygroundRuntimeBackend()) const ok = await runtime.execute({ - command: "host.node-smoke", + command: "host/node_smoke", args: [`input-json=${JSON.stringify({ args: ["--flag"], cwd: nested, env: { SMOKE_TOKEN: "allowed" } })}`], }) const okBody = JSON.parse(ok.stdout) as HostToolResult @@ -49,7 +49,7 @@ async function main(): Promise { assert(typeof okBody.output.stdout === "string" && okBody.output.stdout.includes("allowed"), "host command should pass explicitly allowed env") const deniedCwd = await runtime.execute({ - command: "host.node-smoke", + command: "host/node_smoke", args: [`input-json=${JSON.stringify({ cwd: tmpdir() })}`], }) const deniedCwdBody = JSON.parse(deniedCwd.stdout) as HostToolResult @@ -57,7 +57,7 @@ async function main(): Promise { assert(deniedCwdBody.error.message.includes("outside allowed roots"), "host command cwd errors should be explicit") const deniedEnv = await runtime.execute({ - command: "host.node-smoke", + command: "host/node_smoke", args: [`input-json=${JSON.stringify({ env: { SECRET_TOKEN: "blocked" } })}`], }) const deniedEnvBody = JSON.parse(deniedEnv.stdout) as HostToolResult