fix(test): resolve embedded runner crash and timeout

This commit is contained in:
Nathan Hangen 2026-01-29 11:59:44 -05:00
parent 7101cba543
commit c7ea713c61
2 changed files with 104 additions and 108 deletions

View File

@ -101,7 +101,7 @@ beforeAll(async () => {
workspaceDir = path.join(tempRoot, "workspace"); workspaceDir = path.join(tempRoot, "workspace");
await fs.mkdir(agentDir, { recursive: true }); await fs.mkdir(agentDir, { recursive: true });
await fs.mkdir(workspaceDir, { recursive: true }); await fs.mkdir(workspaceDir, { recursive: true });
}, 20_000); }, 120_000);
afterAll(async () => { afterAll(async () => {
if (!tempRoot) return; if (!tempRoot) return;

View File

@ -396,10 +396,7 @@ export function buildAgentSystemPrompt(params: {
params.modelAliasLines && params.modelAliasLines.length > 0 && !isMinimal ? "" : "", params.modelAliasLines && params.modelAliasLines.length > 0 && !isMinimal ? "" : "",
"## Workspace", "## Workspace",
`Your working directory is: ${params.workspaceDir}`, `Your working directory is: ${params.workspaceDir}`,
"Treat this directory as the single global workspace for file operations unless explicitly instructed otherwise.", ...(runtimeInfo?.os?.toLowerCase()?.includes("windows")
...workspaceNotes,
"",
...(runtimeInfo?.os?.toLowerCase().includes("windows")
? [ ? [
"## Windows Shell Guidance", "## Windows Shell Guidance",
"You are running on Windows (PowerShell).", "You are running on Windows (PowerShell).",
@ -421,8 +418,7 @@ export function buildAgentSystemPrompt(params: {
? `Sandbox workspace: ${params.sandboxInfo.workspaceDir}` ? `Sandbox workspace: ${params.sandboxInfo.workspaceDir}`
: "", : "",
params.sandboxInfo.workspaceAccess params.sandboxInfo.workspaceAccess
? `Agent workspace access: ${params.sandboxInfo.workspaceAccess}${ ? `Agent workspace access: ${params.sandboxInfo.workspaceAccess}${params.sandboxInfo.agentWorkspaceMount
params.sandboxInfo.agentWorkspaceMount
? ` (mounted at ${params.sandboxInfo.agentWorkspaceMount})` ? ` (mounted at ${params.sandboxInfo.agentWorkspaceMount})`
: "" : ""
}` }`