{"record":{"id":"5020a854e1db459a","repo":"deepseek-ai/deepseek-harness","slug":"aclsandbox-temp-dir-does-not-exist-or-is-not-a-dir","errorCode":null,"errorMessage":"AclSandbox temp dir does not exist or is not a directory: ${tempDir}","messagePattern":"AclSandbox temp dir does not exist or is not a directory: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/sandbox/sandbox-windows-acl/src/index.ts","lineNumber":247,"sourceCode":"      const parseSid = (sid: string): NativePtr => {\n        const sidSlot = allocPtrSlot()\n        if (api.convertStringSidToSidW(sid, sidSlot) === 0) {\n          throwLastError(api, 'ConvertStringSidToSidW', sid)\n        }\n        const parsedSid = decodePtr(sidSlot)\n        if (parsedSid === null) throw new Win32Error('ConvertStringSidToSidW', api.getLastError(), sid)\n        return parsedSid\n      }\n      this.writeSidPtr = this.writeSid === undefined ? undefined : parseSid(this.writeSid)\n      this.tempWriteSidPtr = this.tempWriteSid === undefined ? undefined : parseSid(this.tempWriteSid)\n\n      const tempDir = this.mode === 'read-only' || this.tempDirOption === null ? null : this.tempDirOption\n      /* v8 ignore next -- constructor validation requires workspace-write to supply\n         an explicit temp directory or null; the other branches normalize to null. */\n      if (tempDir === undefined) throw new Error('AclSandbox workspace-write temp directory was not resolved')\n      if (tempDir !== null) {\n        if (!existsSync(tempDir) || !statSync(tempDir).isDirectory()) {\n          throw new Error(`AclSandbox temp dir does not exist or is not a directory: ${tempDir}`)\n        }\n        assertPrivateTempDisjoint(this.writableDirs, tempDir)\n      }\n      this.tempDirResolved = tempDir\n\n      // manageDacls: false — the caller (the sandbox seam's grant) already\n      // materialized the ACEs; this instance must neither add nor remove any.\n      // When this instance owns the DACLs, writableDir ACEs are STANDING (the\n      // per-workspace reuse cache — dispose() never revokes them, or the next\n      // provision would re-propagate the whole tree) and the temp ACE is\n      // REVOCABLE (dispose() removes it before the private directory is\n      // deleted; the ambient temp root is never granted).\n      if (this.manageDacls) {\n        if (this.writeSidPtr !== undefined) {\n          for (const path of this.writableDirs) {\n            grantWrite(api, path, this.writeSidPtr)\n          }\n          if (tempDir !== null && this.tempWriteSidPtr !== undefined) {","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox-windows-acl/src/index.ts#L229-L265","documentation":"Error \"AclSandbox temp dir does not exist or is not a directory: ${tempDir}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox-windows-acl/src/index.ts:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the temp directory before constructing the sandbox, or pass null to let the sandbox manage one."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}