{"record":{"id":"7d1e295a8ad707aa","repo":"affaan-m/ECC","slug":"unknown-control-pane-action-actionid","errorCode":null,"errorMessage":"Unknown control-pane action: ${actionId}","messagePattern":"Unknown control-pane action: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/control-pane/actions.js","lineNumber":99,"sourceCode":"  const text = String(value);\n  if (text.length === 0) return \"''\";\n  if (/^[A-Za-z0-9_./:=@%+-]+$/.test(text)) return text;\n  return `'${text.replace(/'/g, `'\\\\''`)}'`;\n}\n\nfunction commandLineFor(action) {\n  return [\n    `cd ${shellQuote(action.cwd)}`,\n    '&&',\n    shellQuote(action.command),\n    ...action.args.map(shellQuote),\n  ].join(' ');\n}\n\nfunction buildControlPaneAction(actionId, options = {}) {\n  const definition = ACTION_DEFINITIONS.get(actionId);\n  if (!definition) {\n    throw new Error(`Unknown control-pane action: ${actionId}`);\n  }\n\n  const repoRoot = path.resolve(options.repoRoot || process.cwd());\n  const cwd = path.join(repoRoot, 'ecc2');\n  const limit = normalizeLimit(options.limit);\n  const query = String(options.query || '').trim();\n  const args = definition.args({ limit, query });\n  const action = {\n    id: actionId,\n    label: definition.label,\n    description: definition.description,\n    command: 'cargo',\n    args,\n    cwd,\n    executable: definition.executable,\n  };\n\n  return {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/control-pane/actions.js#L81-L117","documentation":"Registry lookup guard in buildControlPaneAction: the given actionId has no entry in ACTION_DEFINITIONS, so callers (including the runTests alias) cannot invoke a control-pane action that does not exist.","triggerScenarios":"Calling buildControlPaneAction(actionId, options) with an actionId string that is not a key of ACTION_DEFINITIONS (typo, renamed action, or dynamic id built at runtime).","commonSituations":"Typo in an action id; an action was removed or renamed in a newer version of the library; generating ids programmatically from user input without checking the registry.","solutions":["Use an action id defined in ACTION_DEFINITIONS.","Check for renamed ids after refactors and update callers.","Register the new action definition if it is intentionally new."],"exampleFix":"// before\nbuildControlPaneAction('run-tests'); // unknown\n// after\nconst { ACTION_DEFINITIONS } = require('./actions');\nif (ACTION_DEFINITIONS.has('run-tests')) buildControlPaneAction('run-tests');","handlingStrategy":"validation","validationCode":"const { ACTION_DEFINITIONS } = require('./actions');\nif (!ACTION_DEFINITIONS.has(actionId)) throw new Error(`unknown action: ${actionId}`);","typeGuard":"const isValidAction = (id) => typeof id === 'string' && ACTION_DEFINITIONS.has(id);","tryCatchPattern":"try { const a = buildControlPaneAction(id, opts); } catch (e) {\n  if (String(e.message).startsWith('Unknown control-pane action')) console.error(`'${id}' not registered; check ACTION_DEFINITIONS`);\n  else throw e;\n}","preventionTips":["Derive action ids from ACTION_DEFINITIONS keys, not string literals","Use constants/enums for action ids across the codebase","After upgrades, grep for renamed/removed action ids","Validate user-supplied action ids against the registry"],"tags":["invalid-enum-value","control-pane","argument"],"backgroundTag":"invalid-enum-value","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"}