{"record":{"id":"4c761cea3890c59a","repo":"affaan-m/ECC","slug":"live-node-qualification-requires-live-sixtytwo-e","errorCode":null,"errorMessage":"Live node qualification requires --live-sixtytwo exactly once before any process is started.","messagePattern":"Live node qualification requires --live-sixtytwo exactly once before any process is started\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":113,"sourceCode":"    .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 {\n    const resolved = fs.realpathSync.native(configDirectory);\n    if (\n      !fs.statSync(resolved).isDirectory()\n      || !fs.statSync(path.join(resolved, \"sixtytwo.yaml\")).isFile()\n    ) {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ito.js#L95-L131","documentation":"The --live-sixtytwo flag must appear exactly once on the command line for live node qualification. The validator counts occurrences and rejects both zero (forgot to opt in) and more than one (ambiguous/duplicated opt-in), consistent with the other exactly-once requirements.","triggerScenarios":"Omitting --live-sixtytwo while passing the other live options, or passing it twice because a base command and an override both add it.","commonSituations":"A wrapper that unconditionally adds --live-sixtytwo colliding with a user-supplied copy, or assembling the command from fragments that each include the flag.","solutions":["Include --live-sixtytwo exactly once in the command","Remove the duplicate from either the wrapper or the user override","Use --help to confirm the canonical live-qualification command shape"],"exampleFix":"// before\n--live-sixtytwo --live-sixtytwo --cluster c1 ...\n// after\n--live-sixtytwo --cluster c1 ...","handlingStrategy":"validation","validationCode":"const liveCount = args.filter(a => a === '--live-sixtytwo').length;\nif (liveCount !== 1) {\n  throw new Error(`--live-sixtytwo must appear exactly once (found ${liveCount})`);\n}","typeGuard":"function liveSixtytwoExactlyOnce(args) {\n  return args.filter(a => a === '--live-sixtytwo').length === 1;\n}","tryCatchPattern":"try { validateNodeQualificationArgs(args, env); }\ncatch (err) {\n  if (/--live-sixtytwo exactly once/.test(err.message)) {\n    console.error(err.message);\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Compose the live-qualification command from a single source to avoid duplicates","Strip --live-sixtytwo from base templates when an override supplies it","Assert the flag count in your wrapper before invoking ito"],"tags":["cli","argument-validation","ito","live-qualification"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}