{"record":{"id":"c35341cbf6a6b508","repo":"deepseek-ai/deepseek-harness","slug":"file-search-excludeddirectories-entries-must-be-no","errorCode":null,"errorMessage":"file search excludedDirectories entries must be non-empty directory basenames","messagePattern":"file search excludedDirectories entries must be non-empty directory basenames","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/context/file-reference-local/src/search.ts","lineNumber":65,"sourceCode":" * bounded traversal until the `@` interaction ends or a tool result invalidates it.\n */\nexport class WorkspaceFileSearch {\n  private readonly excludedDirectories: ReadonlySet<string>\n  private generation: IndexGeneration | undefined\n  private disposed = false\n\n  constructor(\n    private readonly root: string,\n    private readonly config: FileSearchConfig,\n  ) {\n    if (!Number.isSafeInteger(config.maxResults) || config.maxResults <= 0) {\n      throw new Error('file search maxResults must be a positive safe integer')\n    }\n    if (!Number.isSafeInteger(config.maxEntries) || config.maxEntries <= 0) {\n      throw new Error('file search maxEntries must be a positive safe integer')\n    }\n    if (config.excludedDirectories.some(name => name.length === 0 || name.includes('/') || name.includes('\\\\'))) {\n      throw new Error('file search excludedDirectories entries must be non-empty directory basenames')\n    }\n    this.excludedDirectories = new Set(config.excludedDirectories)\n  }\n\n  /**\n   * Return ranked path candidates for the current token.\n   * @param rawQuery - path text following `@` or `@\"`.\n   * @param signal - cancels this caller's wait without killing an index shared by a newer query.\n   * @returns at most `maxResults` deterministic candidates.\n   */\n  async list(rawQuery: string, signal: AbortSignal): Promise<FileReferenceCandidate[]> {\n    signal.throwIfAborted()\n    if (this.disposed) return []\n    const query = rawQuery.replaceAll('\\\\', '/')\n    const slash = query.lastIndexOf('/')\n    if (query === '' || slash >= 0) {\n      const directory = slash < 0 ? '' : query.slice(0, slash + 1)\n      const fragment = slash < 0 ? '' : query.slice(slash + 1)","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/context/file-reference-local/src/search.ts#L47-L83","documentation":"Error \"file search excludedDirectories entries must be non-empty directory basenames\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/context/file-reference-local/src/search.ts:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use non-empty directory basenames in the file search excludedDirectories."],"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"}