{"record":{"id":"c13ee1da44d1d45a","repo":"deepseek-ai/deepseek-harness","slug":"include-must-be-one-glob-not-a-comma-separated-li","errorCode":null,"errorMessage":"include must be one glob, not a comma-separated list (use {a,b} alternation instead)","messagePattern":"include must be one glob, not a comma-separated list \\(use (.+?) alternation instead\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/fs/tool-fs-search/src/grep.ts","lineNumber":76,"sourceCode":"  pattern: string\n  path?: string\n  include?: string\n}\n\n/**\n * Reject an `include` that is not ONE positive glob filter: blank strings,\n * negated patterns (`!…`), and comma-separated lists. A comma inside a brace\n * group is fine — `*.{ts,tsx}` is one glob with alternation, not a list.\n */\nfunction validateInclude(include: string): void {\n  if (include.trim().length === 0) throw new Error('include must be a non-empty glob when given')\n  if (include.startsWith('!')) throw new Error('include must be a positive glob filter; negated patterns (\"!…\") are not supported')\n  let braceDepth = 0\n  for (const char of include) {\n    if (char === '{') braceDepth++\n    else if (char === '}') braceDepth = Math.max(0, braceDepth - 1)\n    else if (char === ',' && braceDepth === 0) {\n      throw new Error('include must be one glob, not a comma-separated list (use {a,b} alternation instead)')\n    }\n  }\n}\n\n/**\n * Validate value constraints the schema DSL can't express: a non-EMPTY\n * `pattern` (whitespace is a legitimate regex), a non-blank `path` when given,\n * and a single positive `include` glob ({@link GrepInput}). Throws a plain\n * `Error` (an ordinary tool argument error) otherwise.\n *\n * @param args - the schema-validated `grep` arguments.\n * @returns the accepted input, unchanged.\n */\nexport function parseGrepArgs(args: { pattern: string; path?: string; include?: string }): GrepInput {\n  if (args.pattern.length === 0) throw new Error('pattern must be a non-empty string')\n  if (args.path !== undefined && args.path.trim().length === 0) throw new Error('path must be a non-empty string when given')\n  if (args.include !== undefined) validateInclude(args.include)\n  return {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/tool-fs-search/src/grep.ts#L58-L94","documentation":"Error \"include must be one glob, not a comma-separated list (use {a,b} alternation instead)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/tool-fs-search/src/grep.ts:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}