{"record":{"id":"db75c32154c147b3","repo":"oven-sh/bun","slug":"args-must-be-an-array-of-file-count-diagpath","errorCode":null,"errorMessage":"args must be an array of {file,count,diagPath}","messagePattern":"args must be an array of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/clippy-loop/fix-round.workflow.ts","lineNumber":13,"sourceCode":"export const meta = {\n  name: \"clippy-fix-round\",\n  description: \"Per-file clippy fixer with 2-reviewer adversarial gate\",\n  phases: [\n    { title: \"Fix\", detail: \"one read-only agent per file produces a unified diff\" },\n    { title: \"Review\", detail: \"2 adversarial reviewers per diff; both must approve\" },\n  ],\n};\n\n// args: Array<{file, count, diagPath}>  (or {files: [...]}, or a JSON string of either)\nconst parsed = typeof args === \"string\" ? JSON.parse(args) : args;\nconst files = Array.isArray(parsed) ? parsed : parsed.files;\nif (!Array.isArray(files)) throw new Error(\"args must be an array of {file,count,diagPath}\");\nlog(`round: ${files.length} files`);\n\nconst PATCH_SCHEMA = {\n  type: \"object\",\n  required: [\"patch\", \"summary\"],\n  properties: {\n    patch: {\n      type: \"string\",\n      description:\n        \"Unified diff (git apply compatible) against the repo root. Must use 'a/<path>' and 'b/<path>' headers and at least 3 lines of context. Empty string if no safe fix is possible.\",\n    },\n    summary: { type: \"string\", description: \"One line per lint addressed, or why a lint was left alone.\" },\n    skipped: {\n      type: \"array\",\n      items: { type: \"string\" },\n      description: \"Lint codes intentionally not fixed and why (one entry each).\",\n    },\n  },","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/clippy-loop/fix-round.workflow.ts#L1-L31","documentation":"Error \"args must be an array of {file,count,diagPath}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/clippy-loop/fix-round.workflow.ts:13 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":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}