affaan-m/ECC · error · Error
orch-review: args.changedFiles must contain only string path
Error message
orch-review: args.changedFiles must contain only string paths
What it means
Error "orch-review: args.changedFiles must contain only string paths" thrown in affaan-m/ECC.
Source
Thrown at workflows/orch-review.workflow.js:171
try {
input = typeof args === 'string' ? JSON.parse(args) : (args ?? {});
} catch {
throw new Error('orch-review: args must be an object or valid JSON');
}
if (typeof input !== 'object' || input === null) {
throw new Error('orch-review: args must be an object');
}
if (typeof input.diff !== 'string' || input.diff.trim() === '') {
throw new Error('orch-review: args.diff must be a non-empty unified diff');
}
if (input.changedFiles != null && !Array.isArray(input.changedFiles)) {
throw new Error('orch-review: args.changedFiles must be an array of paths');
}
// Every entry must be a string path. A non-string (e.g. { path: '...' }) would
// stringify to "[object Object]" and silently poison the security-trigger
// haystack — fail closed on malformed input instead.
if (Array.isArray(input.changedFiles) && !input.changedFiles.every(f => typeof f === 'string')) {
throw new Error('orch-review: args.changedFiles must contain only string paths');
}
const diff = input.diff;
const haystack = `${diff}\n${(input.changedFiles || []).join('\n')}`;
// Build the review dimensions immutably. Quality always runs; language +
// security are conditional, spread in rather than pushed onto a shared array.
const langReviewer = input.language && LANGUAGE_REVIEWER[String(input.language).toLowerCase()];
const securityNeeded = SECURITY_TRIGGER.test(haystack);
const dimensions = [
{ key: 'quality', label: 'correctness & quality', agentType: 'ecc:code-reviewer' },
...(langReviewer ? [{ key: `lang:${input.language}`, label: `${input.language} idioms & pitfalls`, agentType: langReviewer }] : []),
...(securityNeeded ? [{ key: 'security', label: 'security (OWASP, secrets, injection)', agentType: 'ecc:security-reviewer' }] : [])
];
if (securityNeeded) {
log('Security trigger matched — adding security-reviewer dimension.');
}
View on GitHub (pinned to 01e15490f0)
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).
Example fix
changedFiles: files.map(f => typeof f === 'string' ? f : f.path)
When it happens
Trigger: Thrown at workflows/orch-review.workflow.js:171 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/7565305b15ae2f5b.
Report an issue: GitHub.