{"record":{"id":"aef05e6939857364","repo":"affaan-m/ECC","slug":"harness-label-is-an-advanced-harness-and-is-not","errorCode":null,"errorMessage":"${harness.label} is an advanced harness and is not guided-ready","messagePattern":"(.+?) is an advanced harness and is not guided-ready","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/harness-capabilities.js","lineNumber":355,"sourceCode":"    throw new Error('The all/* harness selection cannot be combined with other selections');\n  }\n  if (allTokens.length > 0) {\n    return GUIDED_HARNESS_IDS.slice();\n  }\n\n  const selected = new Set();\n  for (const token of tokens) {\n    const normalizedToken = normalizeLookupToken(token);\n    const menuIndex = /^\\d+$/.test(normalizedToken) ? Number(normalizedToken) - 1 : -1;\n    const harness = menuIndex >= 0\n      ? listGuidedHarnesses()[menuIndex] || null\n      : getHarnessCapability(token);\n\n    if (!harness) {\n      throw new Error(`Unknown guided harness selection: ${token}`);\n    }\n    if (!harness.guidedReady) {\n      throw new Error(`${harness.label} is an advanced harness and is not guided-ready`);\n    }\n    selected.add(harness.id);\n  }\n\n  if (selected.size === 0) {\n    throw new Error('At least one guided harness must be selected');\n  }\n\n  return GUIDED_HARNESS_IDS.filter(id => selected.has(id));\n}\n\nmodule.exports = {\n  GUIDED_HARNESS_IDS,\n  HARNESS_CAPABILITIES,\n  getHarnessCapability,\n  listGuidedHarnesses,\n  listHarnessCapabilities,\n  normalizeHarnessSelection,","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/harness-capabilities.js#L337-L373","documentation":"normalizeHarnessSelection() resolves the token to a harness capability object, then requires harness.guidedReady. Harnesses that exist and are supported but are flagged as advanced (not guided-ready) are rejected for guided workflows with this error. The library deliberately separates 'supported' from 'guided-ready' so guided flows never run against harnesses lacking the automation hooks they assume.","triggerScenarios":"Calling normalizeHarnessSelection (directly or via askHarnesses/normalizedHarnesses/selectedHarnessIds/harnesses/runTests) with a valid, registered harness id or menu number whose capability object has guidedReady === false, e.g. requesting an advanced harness for a guided install/test run.","commonSituations":"Users selecting a power-user harness by id in a guided script; config files left from manual setups that name an advanced harness; teams whose CI reuses guided entry points with advanced harness ids.","solutions":["Pick a guided-ready harness (check guidedReady on entries from listGuidedHarnesses()).","If the advanced harness is intentional, use the non-guided workflow/flags instead of the guided API.","If the harness should be guided-ready, update its capability definition (guidedReady: true) after verifying it meets guided requirements."],"exampleFix":"// before\nnormalizeHarnessSelection(['my-advanced-harness']); // throws: not guided-ready\n// after\nconst { listGuidedHarnesses } = require('./scripts/lib/harness-capabilities');\nconst guidedIds = listGuidedHarnesses().filter(h => h.guidedReady).map(h => h.id);\nnormalizeHarnessSelection(['my-advanced-harness'].filter(id => guidedIds.includes(id)));","handlingStrategy":"validation","validationCode":"const { getHarnessCapability } = require('./scripts/lib/harness-capabilities');\nfunction isGuidedReady(token) {\n  const h = getHarnessCapability(token);\n  return h != null && h.guidedReady === true;\n}\nif (!tokens.every(isGuidedReady)) {\n  throw new Error('All harnesses must be guided-ready for guided workflows');\n}","typeGuard":"function isGuidedReadyHarness(h) { return h != null && typeof h === 'object' && h.guidedReady === true; }","tryCatchPattern":"try {\n  const ids = normalizeHarnessSelection(tokens);\n} catch (err) {\n  if (err.message.includes('is not guided-ready')) {\n    console.error(`${err.message} — use the non-guided workflow or choose a guided harness.`);\n  } else throw err;\n}","preventionTips":["Check harness.guidedReady before routing a harness into any guided flow.","Keep advanced harnesses in separate, non-guided scripts/configs.","Document which harnesses are guided-ready for your team."],"tags":["cli","harness-selection","unsupported-operation","guided-mode"],"backgroundTag":"unsupported-operation","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"}