{"record":{"id":"99c425b87bc9559f","repo":"paperclipai/paperclip","slug":"runner-protocol-eval-history-s3-bucket-is-not-a-va","errorCode":null,"errorMessage":"RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET is not a valid bucket name","messagePattern":"RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET is not a valid bucket name","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/publish-runner-protocol-eval-history.mjs","lineNumber":71,"sourceCode":"function json(value) {\n  return `${JSON.stringify(value, null, 2)}\\n`;\n}\n\nasync function loadObject(path) {\n  const value = JSON.parse(await readFile(path, \"utf8\"));\n  if (value === null || Array.isArray(value) || typeof value !== \"object\") {\n    throw new Error(`Expected a JSON object: ${path}`);\n  }\n  return value;\n}\n\nexport function validateProtocolEvalHistoryDestination({\n  bucket,\n  prefix,\n  publicBaseUrl,\n}) {\n  if (!/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(bucket)) {\n    throw new Error(\n      \"RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET is not a valid bucket name\",\n    );\n  }\n  const normalizedPrefix = String(prefix ?? \"\").replace(/^\\/+|\\/+$/g, \"\");\n  if (\n    !normalizedPrefix ||\n    normalizedPrefix\n      .split(\"/\")\n      .some((segment) => !segment || segment === \".\" || segment === \"..\")\n  ) {\n    throw new Error(\n      \"RUNNER_PROTOCOL_EVAL_HISTORY_PREFIX must be a safe non-empty key prefix\",\n    );\n  }\n  const url = new URL(publicBaseUrl);\n  if (\n    url.protocol !== \"https:\" ||\n    url.username ||","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/publish-runner-protocol-eval-history.mjs#L53-L89","documentation":"Thrown by validateProtocolEvalHistoryDestination when the bucket value fails the S3 bucket-name regex ^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$ (3-63 chars, lowercase alphanumerics/dots/hyphens, no leading/trailing hyphen or dot). The env var RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET must name a valid S3 bucket for publishing eval history.","triggerScenarios":"Running the publish script with RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET unset, empty, containing uppercase/underscores, or shorter than 3 / longer than 63 characters.","commonSituations":"Typo or missing env var in CI; using a bucket alias or ARN instead of the raw bucket name; leftover underscores or uppercase in the configured name.","solutions":["Set RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET to the exact S3 bucket name in lowercase (e.g. paperclip-eval-history).","Remove invalid characters (uppercase, underscores); S3 forbids them.","Ensure the value is not empty or an ARN/URL — pass just the bucket name."],"exampleFix":"// before\nRUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET=My_Bucket\n// after\nRUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET=my-bucket","handlingStrategy":"validation","validationCode":"if (!/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(process.env.RUNNER_PROTOCOL_EVAL_HISTORY_S3_BUCKET ?? '')) throw new Error('bucket name must be a valid S3 bucket name (3-63 lowercase chars)');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Store the bucket name in lowercase without underscores in your env/CI config.","Validate env vars at pipeline start with a preflight script.","Use the bare bucket name, never an ARN or URL."],"tags":["config","env-var","s3"],"backgroundTag":"invalid-env-var-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"}