{"record":{"id":"f6b4b16236f4ac5a","repo":"oven-sh/bun","slug":"args-must-yield-an-array-of-file-count-diagpath","errorCode":null,"errorMessage":"args must yield an array of {file,count,diagPath}","messagePattern":"args must yield an array of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/clippy-loop/edit-round.workflow.ts","lineNumber":13,"sourceCode":"export const meta = {\n  name: \"dead-code-edit-round\",\n  description: \"Per-file direct-edit dead-code fixer + 1-reviewer gate\",\n  phases: [\n    { title: \"Edit\", detail: \"agent edits one file directly (no cargo/git/cross-file)\" },\n    { title: \"Review\", detail: \"1 adversarial reviewer reads the diff\" },\n  ],\n};\n\n// args: Array<{file,count,diagPath}> or {files:[...]} or 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 yield an array of {file,count,diagPath}\");\n\nconst RESULT_SCHEMA = {\n  type: \"object\",\n  required: [\"status\", \"summary\"],\n  properties: {\n    status: { type: \"string\", enum: [\"fixed\", \"skipped\", \"partial\"] },\n    summary: { type: \"string\" },\n  },\n  additionalProperties: false,\n};\n\nconst REVIEW_SCHEMA = {\n  type: \"object\",\n  required: [\"verdict\", \"notes\"],\n  properties: {\n    verdict: { type: \"string\", enum: [\"ok\", \"revert\", \"fix-needed\"] },\n    notes: { type: \"string\" },\n  },","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/clippy-loop/edit-round.workflow.ts#L1-L31","documentation":"Error \"args must yield an array of {file,count,diagPath}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/clippy-loop/edit-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"}