{"record":{"id":"ddcbcfca6cac3370","repo":"affaan-m/ECC","slug":"live-node-qualification-requires-ito-enable-sixtyt","errorCode":null,"errorMessage":"Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1 before any process is started.","messagePattern":"Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1 before any process is started\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":108,"sourceCode":"}\n\nfunction requiredOptionValue(args, option) {\n  const indexes = args\n    .map((value, index) => (value === option ? index : -1))\n    .filter((index) => index >= 0);\n  if (indexes.length !== 1) {\n    throw new Error(`${option} is required exactly once for live node qualification.`);\n  }\n  const value = args[indexes[0] + 1];\n  if (!value?.trim() || value.startsWith(\"--\")) {\n    throw new Error(`${option} requires a non-empty value for live node qualification.`);\n  }\n  return value;\n}\n\nfunction validateNodeQualificationArgs(args, environment) {\n  if (environment.ITO_ENABLE_SIXTYTWO_LIVE !== \"1\") {\n    throw new Error(\n      \"Live node qualification requires ITO_ENABLE_SIXTYTWO_LIVE=1 before any process is started.\"\n    );\n  }\n  if (args.filter((value) => value === \"--live-sixtytwo\").length !== 1) {\n    throw new Error(\n      \"Live node qualification requires --live-sixtytwo exactly once before any process is started.\"\n    );\n  }\n  requiredOptionValue(args, \"--cluster\");\n  const nodes = requiredOptionValue(args, \"--nodes\");\n  if (!nodes.split(\",\").every((node) => node.trim().length > 0)) {\n    throw new Error(\"--nodes must explicitly list one or more non-empty nodes.\");\n  }\n  const configDirectory = requiredOptionValue(args, \"--config-dir\");\n  if (!path.isAbsolute(configDirectory)) {\n    throw new Error(\"--config-dir must be an existing absolute directory.\");\n  }\n  try {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ito.js#L90-L126","documentation":"validateNodeQualificationArgs() is a safety gate for live node qualification: it requires the environment variable ITO_ENABLE_SIXTYTWO_LIVE to be exactly \"1\" before any process is spawned. This opt-in switch prevents accidentally launching real live qualification processes. Without it the command is rejected up front.","triggerScenarios":"Running the live qualification path (e.g. with --live-sixtytwo) in any environment where process.env.ITO_ENABLE_SIXTYTWO_LIFE !== \"1\" — unset, \"0\", \"true\", or any other value.","commonSituations":"New CI runner or fresh shell lacking the exported env var; users setting ITO_ENABLE_SIXTYTWO_LIVE=true instead of =1; running locally after copying a command that assumed the env var was already set.","solutions":["Export the variable before running: ITO_ENABLE_SIXTYTWO_LIVE=1 ito --live-sixtytwo ...","Verify with `echo $ITO_ENABLE_SIXTYTWO_LIVE` that it prints exactly 1.","Fix the value if you used \"true\" or \"yes\" — only the string \"1\" is accepted.","Add the export to your CI job/runner environment setup if it keeps disappearing."],"exampleFix":"// before\nito --live-sixtytwo --cluster prod --nodes node-a   # ITO_ENABLE_SIXTYTWO_LIVE unset\n// after\nITO_ENABLE_SIXTYTWO_LIVE=1 ito --live-sixtytwo --cluster prod --nodes node-a","handlingStrategy":"validation","validationCode":"if (process.env.ITO_ENABLE_SIXTYTWO_LIVE !== '1') { throw new Error('Set ITO_ENABLE_SIXTYTWO_LIVE=1 to enable live qualification'); }","typeGuard":null,"tryCatchPattern":"try { runQualification(args); } catch (e) { if (e.message.includes('ITO_ENABLE_SIXTYTWO_LIVE')) { console.error('Export ITO_ENABLE_SIXTYTWO_LIVE=1 before running live qualification'); process.exit(2); } throw e; }","preventionTips":["Set the env var in CI/runner environment config, not per-command, so it is never missing.","Remember the only accepted value is the string \"1\" — not true/yes/on.","Deliberately leave the var unset in dev shells to keep the safety gate closed."],"tags":["cli","environment-variable","safety-gate"],"backgroundTag":"feature-not-enabled","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"}