{"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":null,"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/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ito.js#L90-L126","documentation":"Live node qualification is gated behind the environment variable ITO_ENABLE_SIXTYTWO_LIVE, which must be exactly '1'. The guard runs before any process is started and fails closed if the env var is unset or any other value, because live qualification forwards credentials and touches real nodes.","triggerScenarios":"Running a live-qualification command without exporting ITO_ENABLE_SIXTYTWO_LIVE=1, or setting it to true/yes/on (only the literal '1' is accepted).","commonSituations":"Forgetting to export the env var in a fresh shell, setting it in a different shell than the one running the command, or assuming a boolean-ish value like true works.","solutions":["Export ITO_ENABLE_SIXTYTWO_LIVE=1 in the same shell before running the command","Prefix the command inline: ITO_ENABLE_SIXTYTWO_LIVE=1 node scripts/ito.js ...","Confirm with echo $ITO_ENABLE_SIXTYTWO_LIVE that the value is exactly 1"],"exampleFix":"// before\nnode scripts/ito.js qualify --live-sixtytwo ...\n// after\nITO_ENABLE_SIXTYTWO_LIVE=1 node scripts/ito.js qualify --live-sixtytwo ...","handlingStrategy":"validation","validationCode":"if (process.env.ITO_ENABLE_SIXTYTWO_LIVE !== '1') {\n  throw new Error('Set ITO_ENABLE_SIXTYTWO_LIVE=1 to enable live node qualification');\n}","typeGuard":"function isLiveQualificationEnabled(env) {\n  return env.ITO_ENABLE_SIXTYTWO_LIVE === '1';\n}","tryCatchPattern":"try { validateNodeQualificationArgs(args, process.env); }\ncatch (err) {\n  if (/ITO_ENABLE_SIXTYTWO_LIVE=1/.test(err.message)) {\n    console.error(`${err.message} Export it: export ITO_ENABLE_SIXTYTWO_LIVE=1`);\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Export ITO_ENABLE_SIXTYTWO_LIVE=1 in the same shell that runs the command","Verify with echo $ITO_ENABLE_SIXTYTWO_LIVE before running","Only the literal '1' is accepted; do not use true/yes/on"],"tags":["cli","environment","ito","live-qualification","safety-guard"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}