{"record":{"id":"940388e29c3889ad","repo":"stablyai/orca","slug":"unknown-argument-arg-940388","errorCode":null,"errorMessage":"Unknown argument: ${arg}","messagePattern":"Unknown argument: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/run-codex-real-account-validation.mjs","lineNumber":308,"sourceCode":"      options.closeAfterLaunch = true\n    } else if (arg === '--skip-build') {\n      options.skipBuild = true\n    } else if (arg === '--keep') {\n      options.keep = true\n    } else if (arg === '--lane-aware-containment') {\n      // Why: on Windows the system-default real-home lane cannot be env-sandboxed\n      // (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(","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/run-codex-real-account-validation.mjs#L290-L326","documentation":"Thrown by the Codex validation harness CLI parser when an argument does not match any known flag. Known flags: --scenario, --report, --primary-home, --config-template, --temp-parent, --dry-run, --close-after-launch, --skip-build, --keep, --lane-aware-containment, --help.","triggerScenarios":"Passing any unrecognized flag like --verbose or a typo like --scneario. The parser's final else branch catches all unrecognized tokens.","commonSituations":"A developer passes a flag from a different script, or misspells a flag name.","solutions":["Run with --help to see the accepted flags and usage.","Remove or correct the unrecognized argument."],"exampleFix":"// before\nnode config/scripts/run-codex-real-account-validation.mjs --scneario mixed\n// after\nnode config/scripts/run-codex-real-account-validation.mjs --scenario mixed","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--scenario','--report','--primary-home','--config-template','--temp-parent','--dry-run','--close-after-launch','--skip-build','--keep','--lane-aware-containment','--help'])\nif (!KNOWN.has(arg) && !KNOWN.has(arg.split('=',1)[0])) {\n  throw new Error(`Unknown argument: ${arg}. Run with --help.`)\n}","typeGuard":"function isKnownCodexValidationFlag(arg) {\n  const name = arg.split('=', 1)[0]\n  return new Set(['--scenario','--report','--primary-home','--config-template','--temp-parent','--dry-run','--close-after-launch','--skip-build','--keep','--lane-aware-containment','--help']).has(name)\n}","tryCatchPattern":null,"preventionTips":["Always provide --help listing all accepted flags.","Consider a did-you-mean suggestion for close typos."],"tags":["cli","validation","argument-parsing"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}