{"record":{"id":"cb4fb4f401b96a59","repo":"oven-sh/bun","slug":"args-must-yield-an-array-of-file-count-diagpath-cb4fb4","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/review-round.workflow.ts","lineNumber":12,"sourceCode":"export const meta = {\n  name: \"review-round\",\n  description: \"Per-file PR review-comment fixer + 1-reviewer gate\",\n  phases: [\n    { title: \"Address\", detail: \"agent reads bot review comments and fixes the file\" },\n    { title: \"Review\", detail: \"1 adversarial reviewer per file\" },\n  ],\n};\n\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 VERDICT_SCHEMA = {\n  type: \"object\",\n  required: [\"verdict\", \"notes\"],\n  properties: {\n    verdict: { type: \"string\", enum: [\"ok\", \"revert\", \"fix-needed\", \"skipped\"] },\n    notes: { type: \"string\" },\n  },\n  additionalProperties: false,\n};\n\nconst ADDRESS_SCHEMA = {\n  type: \"object\",\n  required: [\"status\", \"summary\"],\n  properties: {\n    status: { type: \"string\", enum: [\"fixed\", \"skipped\", \"partial\"] },\n    summary: { type: \"string\" },\n    skipped: {","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/clippy-loop/review-round.workflow.ts#L1-L30","documentation":"Top-level workflow-args guard in the clippy-loop review-round workflow: it validates that the args passed to the workflow parse into an array of {file,count,diagPath} entries (or an object with such a files array). It fires when the invoking step supplied a malformed JSON shape, before any review phase runs.","triggerScenarios":"Thrown at scripts/clippy-loop/review-round.workflow.ts:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the per-file worklist as an array of {file,count,diagPath}","Wrap the list as {files:[...]} or a JSON string of either"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}