{"record":{"id":"5b7d834bbf82cd74","repo":"affaan-m/ECC","slug":"config-dir-must-exist-and-contain-a-regular-sixt","errorCode":null,"errorMessage":"--config-dir must exist and contain a regular sixtytwo.yaml before any process is started.","messagePattern":"--config-dir must exist and contain a regular sixtytwo\\.yaml before any process is started\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":135,"sourceCode":"  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    ) {\n      throw new Error(\"invalid qualification configuration\");\n    }\n  } catch {\n    throw new Error(\n      \"--config-dir must exist and contain a regular sixtytwo.yaml before any process is started.\"\n    );\n  }\n}\n\nfunction parseArgs(argv, environment = process.env) {\n  const args = [...argv];\n  if (\n    args.length === 0\n    || args.includes(\"--help\")\n    || args.includes(\"-h\")\n  ) {\n    return Object.freeze({ help: true, invocationArgs: [] });\n  }\n\n  if (environment.ECC_DRY_RUN === \"1\" || args.includes(\"--dry-run\")) {\n    throw new Error(\n      \"Itô compute has no paper or dry-run success mode. No CLI operation was invoked.\"","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ito.js#L117-L153","documentation":"After confirming --config-dir is absolute, validateNodeQualificationArgs resolves it with fs.realpathSync.native and verifies it is a directory containing a regular file named sixtytwo.yaml. Any resolution/stat failure or missing file throws this error, emphasizing the check happens before any process is started.","triggerScenarios":"Running `ecc ito evals --live-sixtytwo ... --config-dir /abs/dir` where /abs/dir does not exist, is a file, or lacks a sixtytwo.yaml file directly inside it; symlink loops or permission errors during realpathSync also land here.","commonSituations":"Pointing at the parent directory instead of the one containing sixtytwo.yaml; a typo in the directory name; CI environments where the config checkout step was skipped; using a path that only exists on another machine.","solutions":["Create/verify the directory and place sixtytwo.yaml inside it: mkdir -p /abs/dir && test -f /abs/dir/sixtytwo.yaml","Point --config-dir at the exact directory that contains sixtytwo.yaml, not a parent","Check the path resolves on this machine (no broken symlinks): realpath /abs/dir","Ensure read permissions on the directory and the yaml file"],"exampleFix":"// before\nargs.push('--config-dir', '/opt/ito') // no sixtytwo.yaml here\n// after\nargs.push('--config-dir', '/opt/ito/config') // contains sixtytwo.yaml\n// or create it:\n// fs.mkdirSync('/opt/ito/config', {recursive:true}); fs.writeFileSync('/opt/ito/config/sixtytwo.yaml', cfg)","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction cfgDirOk(d) {\n  try { return fs.statSync(d).isDirectory() && fs.statSync(require('path').join(d, 'sixtytwo.yaml')).isFile(); }\n  catch { return false; }\n}\nif (!cfgDirOk(configDir)) throw new Error('sixtytwo.yaml missing from config dir');","typeGuard":null,"tryCatchPattern":"try {\n  runEccItoEvals(configDir);\n} catch (e) {\n  if (e.message.includes('sixtytwo.yaml')) {\n    console.error(`Place sixtytwo.yaml in ${configDir} or fix the path`);\n  } else throw e;\n}","preventionTips":["Pre-flight check the directory and sixtytwo.yaml existence before invoking the CLI","In CI, add an explicit step asserting the config checkout landed in the right directory","Point --config-dir at the directory that directly contains sixtytwo.yaml, not a parent"],"tags":["cli","filesystem","config-file"],"backgroundTag":"config-file-not-found","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"}