{"record":{"id":"c6d070412654270c","repo":"affaan-m/ECC","slug":"selection-excludes-every-requested-install-module","errorCode":null,"errorMessage":"Selection excludes every requested install module","messagePattern":"Selection excludes every requested install module","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":597,"sourceCode":"  const targetPlanningInput = target\n    ? {\n      repoRoot: manifests.repoRoot,\n      projectRoot: validatedProjectRoot || manifests.repoRoot,\n      homeDir: validatedHomeDir || os.homedir(),\n    }\n    : null;\n  const targetAdapter = target ? getInstallTargetAdapter(target) : null;\n\n  const effectiveRequestedIds = dedupeStrings(\n    requestedModuleIds.filter(moduleId => !excludedModuleOwners.has(moduleId))\n  );\n\n  if (requestedModuleIds.length === 0) {\n    throw new Error('No install profile, module IDs, or included component IDs were provided');\n  }\n\n  if (effectiveRequestedIds.length === 0) {\n    throw new Error('Selection excludes every requested install module');\n  }\n\n  const selectedIds = new Set();\n  const skippedTargetIds = new Set();\n  const excludedIds = new Set([\n    ...excludedModuleIds,\n    ...targetDefaultExclusions.map(exclusion => exclusion.moduleId),\n  ]);\n  const visitingIds = new Set();\n  const resolvedIds = new Set();\n\n  function resolveModule(moduleId, dependencyOf, rootRequesterId) {\n    const module = manifests.modulesById.get(moduleId);\n    if (!module) {\n      throw new Error(`Unknown install module: ${moduleId}`);\n    }\n\n    if (excludedModuleOwners.has(moduleId)) {","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L579-L615","documentation":"Thrown by resolveInstallPlan() when requestedModuleIds is non-empty but effectiveRequestedIds — requested minus excluded — is zero. Every module the user asked for was eliminated by an exclude component or a target-default exclusion. This catches the contradiction before producing a useless plan that installs nothing while pretending to honor the request.","triggerScenarios":"Passing includeComponentIds: ['lang:rust'] and excludeComponentIds: ['lang:rust'] simultaneously; or excluding every module that a profile pulls in. Target-default exclusions (e.g. OpenCode's intentional opt-outs) can also remove all requested modules.","commonSituations":"A wrapper script computes excludes from the same source as includes; a user manually excludes a baseline component while keeping the baseline profile; the OpenCode default exclusion list intersects the entire requested set.","solutions":["Reduce the exclude list so at least one requested module survives.","Review targetDefaultExclusions in the returned plan to understand target-driven opt-outs.","If you genuinely want nothing, do not call resolveInstallPlan at all.","Use module-level (not component-level) excludes if you want finer control."],"exampleFix":"// before\nresolveInstallPlan({ target: 'claude', profileId: 'baseline', excludeComponentIds: ['lang:rust'] });\n// after (drop the over-broad exclude)\nresolveInstallPlan({ target: 'claude', profileId: 'baseline' });","handlingStrategy":"validation","validationCode":"const requested = new Set([\n  ...(options.moduleIds || []),\n  ...(options.includeComponentIds || []),\n]);\nconst excluded = new Set(options.excludeComponentIds || []);\nconst contradiction = [...requested].filter(id => excluded.has(id));\nif (contradiction.length > 0 && requested.size === contradiction.length) {\n  throw new Error('Every requested component is also excluded');\n}\nresolveInstallPlan(options);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not source includes and excludes from the same list.","Inspect targetDefaultExclusions in the returned plan to understand target opt-outs."],"tags":["install","validation","exclude","selection","contradiction"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}