{"record":{"id":"bdd31200f43580e2","repo":"deepseek-ai/deepseek-harness","slug":"aclsandbox-writable-dir-does-not-exist-or-is-not-a","errorCode":null,"errorMessage":"AclSandbox writable dir does not exist or is not a directory: ${absolute}","messagePattern":"AclSandbox writable 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":186,"sourceCode":"  readonly mode: 'read-only' | 'workspace-write'\n  private readonly tempDirOption: string | null | undefined\n  private readonly manageDacls: boolean\n  private tempDirResolved: string | null | undefined\n  private api: Win32Bindings | undefined\n  private token: NativePtr | undefined\n  private writeSidPtr: NativePtr | undefined\n  private tempWriteSidPtr: NativePtr | undefined\n  /** The well-known/logon SID allocations init() makes; freed by dispose() alongside the write SIDs. */\n  private sidAllocations: NativePtr[] = []\n  private grantedPaths: Array<{ path: string; sidPtr: NativePtr }> = []\n\n  constructor(options: AclSandboxOptions) {\n    this.mode = options.mode\n    this.manageDacls = options.manageDacls ?? true\n    this.writableDirs = options.writableDirs.map((directory) => {\n      const absolute = resolve(directory)\n      if (!existsSync(absolute) || !statSync(absolute).isDirectory()) {\n        throw new Error(`AclSandbox writable dir does not exist or is not a directory: ${absolute}`)\n      }\n      return absolute\n    })\n    this.tempDirOption = options.tempDir\n    this.writeSid = options.writeSid\n    this.tempWriteSid = options.tempWriteSid\n    if (this.mode === 'workspace-write' && this.writeSid === undefined) {\n      throw new Error('AclSandbox workspace-write requires a write SID — derive it from the workspace via workspaceWriteSid()')\n    }\n    if (this.mode === 'workspace-write' && this.tempDirOption === undefined) {\n      throw new Error('AclSandbox workspace-write requires an explicit private temp directory or null')\n    }\n    if (this.mode === 'read-only' && this.tempDirOption !== undefined && this.tempDirOption !== null) {\n      throw new Error('AclSandbox read-only does not accept a temp directory')\n    }\n    if (this.mode === 'read-only' && (this.writeSid !== undefined || this.tempWriteSid !== undefined)) {\n      throw new Error('AclSandbox read-only does not accept write SIDs')\n    }","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox-windows-acl/src/index.ts#L168-L204","documentation":"Error \"AclSandbox writable dir does not exist or is not a directory: ${absolute}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox-windows-acl/src/index.ts:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the writable directory before constructing AclSandbox, or pass an existing directory path.","Verify the path is not a file or symlink to a non-directory."],"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"}