{"record":{"id":"516c85656c41e461","repo":"affaan-m/ECC","slug":"config-dir-must-be-an-existing-absolute-director","errorCode":null,"errorMessage":"--config-dir must be an existing absolute directory.","messagePattern":"--config-dir must be an existing absolute directory\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":124,"sourceCode":"function 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    ) {\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];","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ito.js#L106-L142","documentation":"Thrown by validateNodeQualificationArgs in scripts/ito.js:124 when the --config-dir value passed to `ecc ito evals` fails path.isAbsolute(). The Itô evals path is a live sixtytwo node-qualification workflow that needs an operator-owned config directory, so relative paths are rejected outright before any filesystem access is attempted. The absolute-path gate is the first of several layered checks on --config-dir (existence, directory-ness, presence of sixtytwo.yaml).","triggerScenarios":"Calling `ecc ito evals --cluster <id> --live-sixtytwo --nodes <list> --config-dir ./config` or `--config-dir config/sixtytwo` (any relative path). ITO_ENABLE_SIXTYTWO_LIVE=1, --live-sixtytwo, --cluster, and --nodes must already have passed their preceding checks at ito.js:107-121 for execution to reach line 123.","commonSituations":"Operator runs the evals subcommand from the repo root and passes a relative config path out of habit (e.g. `--config-dir ./sixtytwo-config`). Shell expansion of `~` also produces a relative-looking token (`~/config`) because Node's path.isAbsolute treats `~` literally, not as $HOME.","solutions":["Pass an absolute path: `--config-dir /home/operator/sixtytwo-config` (or `$(pwd)/config` if you want it relative to cwd).","Expand `~` before passing: `--config-dir \"$HOME/sixtytwo-config\"` — Node will not expand it for you.","Confirm the directory already contains a regular sixtytwo.yaml file, since the next check (ito.js:126-138) verifies that."],"exampleFix":"// before\n$ ecc ito evals --cluster c1 --live-sixtytwo --nodes n1,n2 --config-dir ./cfg\n// after\n$ ecc ito evals --cluster c1 --live-sixtytwo --nodes n1,n2 --config-dir \"$PWD/cfg\"","handlingStrategy":"validation","validationCode":"const path = require('path');\nfunction assertConfigDirAbsolute(configDirectory) {\n  if (typeof configDirectory !== 'string' || !path.isAbsolute(configDirectory)) {\n    throw new Error(`--config-dir must be an existing absolute directory (got: ${configDirectory})`);\n  }\n  return configDirectory;\n}\n// before calling `ecc ito evals`\nassertConfigDirAbsolute(process.env.ITO_CONFIG_DIR);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --config-dir via an absolute path computed with path.resolve() or $(pwd).","Never pass a '~'-prefixed path to a Node CLI — expand $HOME explicitly in the shell.","Centralize config-dir resolution in a single helper and unit-test path.isAbsolute on its output."],"tags":["cli","validation","config","path","ito","evals"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}