{"record":{"id":"399876b8826a8fc6","repo":"paperclipai/paperclip","slug":"profile-requires-missingcredentials-join","errorCode":null,"errorMessage":"${profile} requires ${missingCredentials.join(\", \")} in the smoke process environment","messagePattern":"(.+?) requires (.+?) in the smoke process environment","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/run-local-provider-smoke.mjs","lineNumber":260,"sourceCode":"  } = await import(\"../dist/eval/index.js\");\n  const candidates = new Map(\n    profiles.map((profile) => [\n      profile,\n      liveCandidate(profile, RUNNER_LIVE_CANDIDATE_SLOTS),\n    ]),\n  );\n  const credentialsByProfile = new Map();\n  for (const [profile, candidate] of candidates) {\n    if (!candidate) throw new Error(`Missing live candidate for ${profile}`);\n    const missingCredentials = [];\n    const profileCredentials = {};\n    for (const name of candidate.qualification.requiredEnvironment) {\n      const value = ambientEnvironment[name]?.trim();\n      if (value) profileCredentials[name] = value;\n      else missingCredentials.push(name);\n    }\n    if (missingCredentials.length > 0) {\n      throw new Error(\n        `${profile} requires ${missingCredentials.join(\", \")} in the smoke process environment`,\n      );\n    }\n    credentialsByProfile.set(profile, profileCredentials);\n  }\n  const providerCredentialNames = new Set(\n    [...credentialsByProfile.values()].flatMap((credentials) =>\n      Object.keys(credentials),\n    ),\n  );\n  const credentialValues = new Set(\n    [...credentialsByProfile.values()].flatMap((credentials) =>\n      Object.values(credentials),\n    ),\n  );\n  const evalCase = runnerWorkflowCase(\"completion-robustness\");\n  for (const profile of profiles) {\n    const candidate = candidates.get(profile);","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/run-local-provider-smoke.mjs#L242-L278","documentation":"After resolving the live candidate, the script collects each name in candidate.qualification.requiredEnvironment from the ambient process environment. If any required variable is absent or empty/whitespace, it throws this error listing exactly which variables are missing for that profile. The smoke refuses to run live providers without their credentials.","triggerScenarios":"Running the smoke for a profile whose candidate requires env vars (e.g. ANTHROPIC_API_KEY) that are unset, empty, or whitespace-only in the shell invoking pnpm.","commonSituations":"Forgetting to export credentials in the current shell, using a .env file the script does not load, running under CI where secrets were not injected, or typos in the variable name.","solutions":["Export the listed variables before running, e.g. `ANTHROPIC_API_KEY=... pnpm smoke:local-provider -- --profile runner-acpx-claude`.","Source your credentials file in the same shell (the script reads process.env, not .env files).","Verify variable names match candidate.qualification.requiredEnvironment exactly (case-sensitive)."],"exampleFix":"// before\npnpm smoke:local-provider -- --profile runner-acpx-claude\n// after\nexport ANTHROPIC_API_KEY=sk-...\npnpm smoke:local-provider -- --profile runner-acpx-claude","handlingStrategy":"validation","validationCode":"const required = ['ANTHROPIC_API_KEY']; // per profile\nconst missing = required.filter(k => !process.env[k]?.trim());\nif (missing.length) { console.error(`missing: ${missing}`); process.exit(1); }","typeGuard":null,"tryCatchPattern":"try { runSmoke(); } catch (e) { if (e.message.includes('requires') && e.message.includes('in the smoke process environment')) { console.error('export the listed vars and rerun'); } else throw e; }","preventionTips":["Export credentials in the invoking shell","Remember the script does not load .env files","Match variable names case-sensitively","Inject secrets in CI before this step"],"tags":["environment","credentials","smoke-test"],"backgroundTag":"missing-env-var","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}