{"record":{"id":"7565305b15ae2f5b","repo":"affaan-m/ECC","slug":"orch-review-args-changedfiles-must-contain-only-s","errorCode":null,"errorMessage":"orch-review: args.changedFiles must contain only string paths","messagePattern":"orch-review: args\\.changedFiles must contain only string paths","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"workflows/orch-review.workflow.js","lineNumber":171,"sourceCode":"try {\n  input = typeof args === 'string' ? JSON.parse(args) : (args ?? {});\n} catch {\n  throw new Error('orch-review: args must be an object or valid JSON');\n}\nif (typeof input !== 'object' || input === null) {\n  throw new Error('orch-review: args must be an object');\n}\nif (typeof input.diff !== 'string' || input.diff.trim() === '') {\n  throw new Error('orch-review: args.diff must be a non-empty unified diff');\n}\nif (input.changedFiles != null && !Array.isArray(input.changedFiles)) {\n  throw new Error('orch-review: args.changedFiles must be an array of paths');\n}\n// Every entry must be a string path. A non-string (e.g. { path: '...' }) would\n// stringify to \"[object Object]\" and silently poison the security-trigger\n// haystack — fail closed on malformed input instead.\nif (Array.isArray(input.changedFiles) && !input.changedFiles.every(f => typeof f === 'string')) {\n  throw new Error('orch-review: args.changedFiles must contain only string paths');\n}\n\nconst diff = input.diff;\nconst haystack = `${diff}\\n${(input.changedFiles || []).join('\\n')}`;\n\n// Build the review dimensions immutably. Quality always runs; language +\n// security are conditional, spread in rather than pushed onto a shared array.\nconst langReviewer = input.language && LANGUAGE_REVIEWER[String(input.language).toLowerCase()];\nconst securityNeeded = SECURITY_TRIGGER.test(haystack);\nconst dimensions = [\n  { key: 'quality', label: 'correctness & quality', agentType: 'ecc:code-reviewer' },\n  ...(langReviewer ? [{ key: `lang:${input.language}`, label: `${input.language} idioms & pitfalls`, agentType: langReviewer }] : []),\n  ...(securityNeeded ? [{ key: 'security', label: 'security (OWASP, secrets, injection)', agentType: 'ecc:security-reviewer' }] : [])\n];\nif (securityNeeded) {\n  log('Security trigger matched — adding security-reviewer dimension.');\n}\n","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/workflows/orch-review.workflow.js#L153-L189","documentation":"Error \"orch-review: args.changedFiles must contain only string paths\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at workflows/orch-review.workflow.js:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure every element of changedFiles is a string path; objects like {path: '...'} are rejected because they would stringify to '[object Object]' and corrupt the security-trigger scan.","Map structured entries to their path property before calling: files.map(f => f.path)."],"exampleFix":"changedFiles: files.map(f => typeof f === 'string' ? f : f.path)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}