{"record":{"id":"62e39c39d9e9c422","repo":"paperclipai/paperclip","slug":"usage-pnpm-smoke-local-provider-profile-p","errorCode":null,"errorMessage":"Usage: pnpm smoke:local-provider -- --profile <${PROFILE_IDS.join(\"|\")}|all>","messagePattern":"Usage: pnpm smoke:local-provider -- --profile <(.+?)\\|all>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/run-local-provider-smoke.mjs","lineNumber":20,"sourceCode":"\nimport { access, mkdir, mkdtemp, readdir, rm, stat } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { basename, join, resolve } from \"node:path\";\n\nimport { withIsolatedProfileCredentials } from \"./local-provider-smoke-environment.mjs\";\n\nconst PROFILE_IDS = [\n  \"runner-acpx-claude\",\n  \"runner-acpx-codex\",\n  \"runner-codex\",\n  \"runner-opencode\",\n];\n\nfunction parseProfiles(args) {\n  const selected = [];\n  for (let index = 0; index < args.length; index += 1) {\n    if (args[index] !== \"--profile\" || !args[index + 1]) {\n      throw new Error(\n        `Usage: pnpm smoke:local-provider -- --profile <${PROFILE_IDS.join(\"|\")}|all>`,\n      );\n    }\n    selected.push(args[++index]);\n  }\n  if (selected.length === 0) return [\"runner-acpx-claude\"];\n  const expanded = selected.flatMap((profile) =>\n    profile === \"all\" ? PROFILE_IDS : [profile],\n  );\n  for (const profile of expanded) {\n    if (!PROFILE_IDS.includes(profile)) {\n      throw new Error(`Unsupported local provider smoke profile: ${profile}`);\n    }\n  }\n  return [...new Set(expanded)];\n}\n\nfunction liveCandidate(id, candidateSlots) {","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/run-local-provider-smoke.mjs#L2-L38","documentation":"parseProfiles in the local provider smoke script validates its --profile CLI argument loop. If any argument is not exactly `--profile` or the flag has no following value, it immediately throws the usage message. The script supports only the known PROFILE_IDS (or `all`).","triggerScenarios":"Running `pnpm smoke:local-provider` with any argument that is not `--profile <id>`: passing an unknown flag (e.g. `--prof`), passing `--profile` as the last argument with no value, or passing positional arguments like a profile name without the flag.","commonSituations":"Typos in the flag name, forgetting the value after --profile, copying an invocation from another script that used positional args, or shell quoting dropping the value.","solutions":["Pass profiles as repeated flags: `pnpm smoke:local-provider -- --profile <id>` (repeat --profile for multiple, or use --profile all).","Run `pnpm smoke:local-provider -- --profile all` to select every profile without listing IDs.","Check PROFILE_IDS in packages/paperclip-runner/scripts/run-local-provider-smoke.mjs for the exact accepted profile names."],"exampleFix":"// before\npnpm smoke:local-provider -- claude\n// after\npnpm smoke:local-provider -- --profile runner-acpx-claude","handlingStrategy":"validation","validationCode":"const VALID = ['runner-acpx-claude','all'];\nconst i = process.argv.indexOf('--profile');\nif (i === -1 || !process.argv[i+1]) throw new Error('pass --profile <id|all>');","typeGuard":null,"tryCatchPattern":"try { execSync('pnpm smoke:local-provider -- --profile all', {stdio:'inherit'}); } catch (e) { console.error('usage:', e.message); process.exit(2); }","preventionTips":["Always use the --profile flag form","Use --profile all when unsure of ids","Check PROFILE_IDS before scripting invocations"],"tags":["cli","argument-parsing","smoke-test"],"backgroundTag":"missing-required-flag","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"}