{"record":{"id":"6a3040ec1373a3f2","repo":"stablyai/orca","slug":"the-codex-lb-scenario-requires-config-template-o","errorCode":null,"errorMessage":"The codex-lb scenario requires --config-template outside primary ~/.codex","messagePattern":"The codex-lb scenario requires --config-template outside primary ~/\\.codex","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/run-codex-real-account-validation.mjs","lineNumber":315,"sourceCode":"      // (native codex ignores USERPROFILE), so strict zero-event containment is\n      // structurally unreachable there. This mode records codex's designed\n      // volatile churn without aborting while every other real-home write stays\n      // a hard failure. The absolute zero-event claim is carried by macOS runs.\n      options.laneAwareContainment = true\n    } else if (arg === '--help') {\n      console.log(\n        'Usage: node config/scripts/run-codex-real-account-validation.mjs [--scenario mixed|managed-only|codex-lb] [--config-template <path>] [--temp-parent <dir>] [--skip-build] [--dry-run] [--close-after-launch] [--keep] [--lane-aware-containment] [--report <path>]'\n      )\n      process.exit(0)\n    } else {\n      throw new Error(`Unknown argument: ${arg}`)\n    }\n  }\n  if (!VALID_SCENARIOS.has(options.scenario)) {\n    throw new Error(`Invalid scenario: ${options.scenario}`)\n  }\n  if (options.scenario === 'codex-lb' && !options.configTemplate) {\n    throw new Error('The codex-lb scenario requires --config-template outside primary ~/.codex')\n  }\n  return options\n}\n\n// Why: `npx` resolves to a .cmd shim on Windows that execFileSync cannot launch\n// (ENOENT), so the harness could not build its own app there. Run the\n// repository-local electron-vite JS entry with the current Node binary instead;\n// process.execPath + a resolved .js path behaves identically on macOS, Linux,\n// and Windows without a shell.\nexport function resolveElectronViteBuildCommand(repoRoot) {\n  const electronViteEntry = path.join(\n    repoRoot,\n    'node_modules',\n    'electron-vite',\n    'bin',\n    'electron-vite.js'\n  )\n  if (!existsSync(electronViteEntry)) {","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/run-codex-real-account-validation.mjs#L297-L333","documentation":"Thrown by the Codex validation harness when --scenario codex-lb is selected without a --config-template. The codex-lb (load-balanced) scenario routes to a native Codex instance that requires a config.toml; the template must be supplied and must live outside the primary ~/.codex (enforced separately by error 195).","triggerScenarios":"Passing --scenario codex-lb without --config-template. The check runs after scenario validation, so it only fires once codex-lb is confirmed valid.","commonSituations":"A developer selects the codex-lb scenario without reading that it mandates a template.","solutions":["Pass --config-template <path> with a config.toml outside ~/.codex, e.g. --config-template /tmp/codex-lb.toml.","Switch to a scenario that does not require a template: --scenario mixed or --scenario managed-only."],"exampleFix":"// before\nnode config/scripts/run-codex-real-account-validation.mjs --scenario codex-lb\n// after\nnode config/scripts/run-codex-real-account-validation.mjs --scenario codex-lb --config-template /tmp/codex-lb.toml","handlingStrategy":"validation","validationCode":"if (options.scenario === 'codex-lb' && !options.configTemplate) {\n  throw new Error('The codex-lb scenario requires --config-template outside primary ~/.codex')\n}","typeGuard":"function codexLbRequirementsMet(scenario, configTemplate) {\n  return scenario !== 'codex-lb' || (typeof configTemplate === 'string' && configTemplate.length > 0)\n}","tryCatchPattern":null,"preventionTips":["Document scenario-specific requirements (like mandatory flags) in --help next to each scenario.","Validate cross-flag dependencies in a dedicated post-parse block so all constraint errors surface together."],"tags":["cli","validation","scenario","codex-lb","config-template"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}