{"record":{"id":"8c1d631798c97c65","repo":"paperclipai/paperclip","slug":"unsupported-workflow-eval-schedule-mode-mode","errorCode":null,"errorMessage":"unsupported workflow eval schedule mode: ${mode}","messagePattern":"unsupported workflow eval schedule mode: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/run-runner-live-eval-schedule.mjs","lineNumber":23,"sourceCode":"  readdir,\n  rm,\n  stat,\n  writeFile,\n} from \"node:fs/promises\";\nimport { resolve } from \"node:path\";\n\nimport { renderRunnerWorkflowWithCanonicalEvalbook } from \"./render-runner-workflow-evalbook.mjs\";\n\nconst packageRoot = resolve(import.meta.dirname, \"..\");\nconst evals = await import(resolve(packageRoot, \"dist/eval/index.js\"));\nconst packageManifest = JSON.parse(\n  await readFile(resolve(packageRoot, \"package.json\"), \"utf8\"),\n);\nconst modeIndex = process.argv.indexOf(\"--mode\");\nconst mode = modeIndex < 0 ? \"nightly\" : process.argv[modeIndex + 1];\nconst execute = process.argv.includes(\"--execute\");\nif (mode !== \"nightly\" && mode !== \"chaos\")\n  throw new Error(`unsupported workflow eval schedule mode: ${mode}`);\nconst now = process.env.PAPERCLIP_EVAL_GENERATED_AT ?? new Date().toISOString();\nconst rotationDay = Number(\n  process.env.PAPERCLIP_EVAL_ROTATION_DAY ?? evals.runnerLiveRotationWeek(now),\n);\nconst seed =\n  process.env.PAPERCLIP_EVAL_SCHEDULE_SEED ?? \"runner-live-seven-week-v1\";\nconst outputDirectory = resolve(\n  packageRoot,\n  \".paperclip-local/evals/workflows\",\n);\nconst historyDirectory = resolve(\n  process.env.PAPERCLIP_EVAL_HISTORY_DIR ?? resolve(outputDirectory, \"history\"),\n);\nawait mkdir(outputDirectory, { recursive: true });\n\nfunction selectorValues(flag, environmentName) {\n  const values = [];\n  for (let index = 0; index < process.argv.length; index += 1) {","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/run-runner-live-eval-schedule.mjs#L5-L41","documentation":"run-runner-live-eval-schedule.mjs accepts --mode with exactly two values: `nightly` (default) or `chaos`. Any other value throws this error before generating the schedule. This is a strict two-value enum check on the CLI mode flag.","triggerScenarios":"`node run-runner-live-eval-schedule.mjs --mode weekly` or any misspelled mode, or passing --mode with a value that includes trailing whitespace/case variation (`Nightly`).","commonSituations":"Guessing schedule modes, copying flags from another eval script with more modes, typos or wrong casing.","solutions":["Use `--mode nightly` or `--mode chaos` exactly.","Omit --mode entirely to get the default `nightly`.","Check the script source for any newly added modes before using them."],"exampleFix":"// before\nnode scripts/run-runner-live-eval-schedule.mjs --mode weekly\n// after\nnode scripts/run-runner-live-eval-schedule.mjs --mode chaos","handlingStrategy":"validation","validationCode":"const mode = args.mode ?? 'nightly';\nif (mode !== 'nightly' && mode !== 'chaos') throw new Error('mode must be nightly|chaos');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use nightly or chaos","Omit --mode for the default","Check exact lowercase spelling"],"tags":["cli","invalid-value","enum","eval-schedule"],"backgroundTag":"invalid-enum-value","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}