fix(sandbox): canonicalize agent main alias

This commit is contained in:
Peter Steinberger
2026-01-12 02:22:56 +00:00
parent 828d9955f2
commit 76c8fc8697
6 changed files with 68 additions and 16 deletions

View File

@@ -105,6 +105,14 @@ describe("resolveSandboxContext", () => {
}),
).toBeNull();
expect(
await resolveSandboxContext({
config: cfg,
sessionKey: "agent:main:main",
workspaceDir: "/tmp/clawdbot-test",
}),
).toBeNull();
expect(
await ensureSandboxWorkspaceForSession({
config: cfg,
@@ -113,6 +121,14 @@ describe("resolveSandboxContext", () => {
}),
).toBeNull();
expect(
await ensureSandboxWorkspaceForSession({
config: cfg,
sessionKey: "agent:main:main",
workspaceDir: "/tmp/clawdbot-test",
}),
).toBeNull();
expect(spawn).not.toHaveBeenCalled();
vi.doUnmock("node:child_process");