{"record":{"id":"08c239114091cd1c","repo":"deepseek-ai/deepseek-harness","slug":"binname-failed-to-read-patches-file-stri","errorCode":null,"errorMessage":"${binName}: failed to read patches ${file}: ${String(error)}","messagePattern":"(.+?): failed to read patches (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/boot/app-boot/src/index.ts","lineNumber":284,"sourceCode":"\n/**\n * Load an optional patch-list file: a top-level YAML array of loader patch\n * entries (`@deepseek-ai/cordis-plugin-include`'s `PatchOptions`): id-targeted config\n * overrides and `insert` lists, with `!!js` expressions allowed. A missing\n * file means \"no layer\"; an unreadable, unparsable, or non-array file throws —\n * a present patch file that cannot apply is a misconfiguration and must fail\n * loud at boot, never be silently skipped.\n * @param binName - the diagnostic prefix on the thrown error.\n * @param file - absolute path of the patch file.\n * @returns the parsed patches, or `undefined` when the file does not exist.\n */\nexport function loadOptionalPatches(binName: string, file: string): PatchOptions[] | undefined {\n  let content: string\n  try {\n    content = readFileSync(file, 'utf8')\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException | null)?.code === 'ENOENT') return undefined\n    throw new Error(`${binName}: failed to read patches ${file}: ${String(error)}`)\n  }\n  return parsePatchList(binName, file, content, 'patches')\n}\n\n/**\n * Load a required overlay patch list: a bundle's `cordis.patch.yml` or a\n * `--patch <path>` overlay. Same file format as {@link loadOptionalPatches},\n * but a missing file throws, because the caller named this file — its absence\n * is a misconfiguration, not \"no overlay\".\n * @param binName - the diagnostic prefix on the thrown error.\n * @param file - absolute path of the overlay file.\n * @returns the parsed patch list.\n */\nexport function loadOverlayPatches(binName: string, file: string): PatchOptions[] {\n  let content: string\n  try {\n    content = readFileSync(file, 'utf8')\n  } catch (error) {","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/boot/app-boot/src/index.ts#L266-L302","documentation":"Error \"${binName}: failed to read patches ${file}: ${String(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/boot/app-boot/src/index.ts:284 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the patches file exists and is readable, then retry."],"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"}