perf(test): skip sandbox prune in context smoke

This commit is contained in:
Peter Steinberger
2026-04-23 15:08:59 +01:00
parent e050e18945
commit 3e834f2f83
2 changed files with 9 additions and 2 deletions

View File

@@ -107,7 +107,12 @@ describe("resolveSandboxContext", () => {
const cfg: OpenClawConfig = {
agents: {
defaults: {
sandbox: { mode: "all", backend: "test-backend", scope: "session" },
sandbox: {
mode: "all",
backend: "test-backend",
scope: "session",
prune: { idleHours: 0, maxAgeDays: 0 },
},
},
},
};

View File

@@ -134,7 +134,9 @@ export async function resolveSandboxContext(params: {
}
const { rawSessionKey, cfg, runtime } = resolved;
await (await import("./prune.js")).maybePruneSandboxes(cfg);
if (cfg.prune.idleHours !== 0 || cfg.prune.maxAgeDays !== 0) {
await (await import("./prune.js")).maybePruneSandboxes(cfg);
}
const { agentWorkspaceDir, scopeKey, workspaceDir } = await ensureSandboxWorkspaceLayout({
cfg,