{"record":{"id":"1b25dd12d6c80e4a","repo":"affaan-m/ECC","slug":"blockingissues-map-issue-issue-message-join-registry","errorCode":null,"errorMessage":"${blockingIssues.map(issue => issue.message).join('; ')}","messagePattern":"\\$\\{blockingIssues\\.map\\(issue => issue\\.message\\)\\.join\\('; '\\)\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-targets/registry.js","lineNumber":65,"sourceCode":"  return adapter;\n}\n\nfunction planInstallTargetScaffold(options = {}) {\n  const adapter = getInstallTargetAdapter(options.target);\n  const modules = Array.isArray(options.modules) ? options.modules : [];\n  const exemptValidationCodes = new Set(Array.isArray(options.exemptValidationCodes) ? options.exemptValidationCodes : []);\n  const planningInput = {\n    repoRoot: options.repoRoot,\n    projectRoot: options.projectRoot || options.repoRoot,\n    homeDir: options.homeDir,\n    env: resolveInvocationEnvironment(options),\n  };\n  const validationIssues = adapter.validate(planningInput);\n  const blockingIssues = validationIssues.filter(issue => (\n    issue.severity === 'error' && !exemptValidationCodes.has(issue.code)\n  ));\n  if (blockingIssues.length > 0) {\n    throw new Error(blockingIssues.map(issue => issue.message).join('; '));\n  }\n  const targetRoot = adapter.resolveRoot(planningInput);\n  const installStatePath = adapter.getInstallStatePath(planningInput);\n  const operations = adapter.planOperations({\n    ...planningInput,\n    modules,\n  });\n\n  return {\n    adapter: {\n      id: adapter.id,\n      target: adapter.target,\n      kind: adapter.kind,\n    },\n    targetRoot,\n    installStatePath,\n    validationIssues,\n    operations,","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-targets/registry.js#L47-L83","documentation":"planInstallTargetScaffold runs adapter.validate(planningInput) and joins every validation issue with severity 'error' (not exempted by exemptValidationCodes) into a single thrown Error. It is an aggregate validation gate: scaffolding is aborted unless the adapter considers the plan valid. The message is a semicolon-joined list of all blocking issue messages.","triggerScenarios":"Calling planInstallTargetScaffold (directly or via plan/scaffoldPlan) while adapter.validate returns error-severity issues, e.g. target root missing, conflicting modules, invalid module list, or an unsupported target state.","commonSituations":"Running the installer with modules that conflict for the chosen target; installing into a directory that fails adapter validation; stale install state producing error-severity issues; enabling an exempt-able code that is not in exemptValidationCodes.","solutions":["Read the joined messages — each is a blocking validation issue; fix them one by one.","Run adapter.validate(planningInput) yourself beforehand and inspect issue.code/severity.","Correct the planning input (target root, module list) that the adapter flags.","If a code should be non-blocking, verify whether it belongs in exemptValidationCodes rather than bypassing validation."],"exampleFix":"// before\nplanInstallTargetScaffold({ target, modules: ['agents', 'agents'] });\n// after\nconst issues = adapter.validate(planningInput).filter(i => i.severity === 'error');\nif (issues.length === 0) planInstallTargetScaffold({ target, modules: ['agents'] });","handlingStrategy":"validation","validationCode":"const issues = adapter.validate(planningInput).filter(i => i.severity === 'error');\nif (issues.length > 0) {\n  issues.forEach(i => console.error(`[${i.code}] ${i.message}`));\n  process.exitCode = 1;\n}","typeGuard":null,"tryCatchPattern":"try {\n  const plan = planInstallTargetScaffold(options);\n} catch (e) {\n  // message is ';'-joined issue list — split and surface each one\n  e.message.split('; ').forEach(msg => console.error('Blocking issue:', msg));\n  throw e;\n}","preventionTips":["Run adapter.validate yourself and print all issues (with codes) before planning.","Keep planning inputs (module list, target root) consistent with what the adapter expects.","Review exemptValidationCodes when introducing new issue codes so intended warnings are not blocking."],"tags":["validation","installer","scaffold"],"backgroundTag":"schema-validation-failed","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}