{"record":{"id":"7cd1d545f8819781","repo":"deepseek-ai/deepseek-harness","slug":"source-filepath-resolves-outside-the-workspac","errorCode":null,"errorMessage":"source \"${filePath}\" resolves outside the workspace","messagePattern":"source \"(.+?)\" resolves outside the workspace","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lsp/lsp-stdio/src/host.ts","lineNumber":92,"sourceCode":"  filePath: string,\n  workspace: HostWorkspace,\n  maxDocumentBytes: number,\n  signal?: AbortSignal,\n): Promise<HostSource> {\n  throwIfAborted(signal)\n  let target: FsTarget\n  try {\n    target = await fs.resolve(filePath, {\n      cwd: workspace.canonicalPath,\n      ...signal === undefined ? {} : { signal },\n    })\n  } catch (error: unknown) {\n    throwIfAborted(signal)\n    throw new Error(`source \"${filePath}\" cannot be resolved: ${messageOf(error)}`, { cause: error })\n  }\n  throwIfAborted(signal)\n  if (!fs.contains(workspace.target, target)) {\n    throw new Error(`source \"${filePath}\" resolves outside the workspace`)\n  }\n  const chunks: string[] = []\n  let bytes = 0\n  try {\n    // XXX(lsp-source-replacement): Revisit stable-handle identity only if a real query observes\n    // replacement between canonical containment and the provider opening this stream.\n    const stream = await fs.streamText(target, signal)\n    for await (const chunk of stream) {\n      throwIfAborted(signal)\n      bytes += Buffer.byteLength(chunk)\n      if (bytes > maxDocumentBytes) break\n      chunks.push(chunk)\n    }\n  } catch (error: unknown) {\n    throwIfAborted(signal)\n    throw new Error(`source \"${filePath}\" could not be read: ${messageOf(error)}`, { cause: error })\n  }\n  if (bytes > maxDocumentBytes) {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/lsp-stdio/src/host.ts#L74-L110","documentation":"Error \"source \"${filePath}\" resolves outside the workspace\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/lsp/lsp-stdio/src/host.ts:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass only paths that resolve inside the workspace root."],"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"}