{"record":{"id":"e8b6332e4e0d89ce","repo":"paperclipai/paperclip","slug":"expected-an-original-actions-campaign","errorCode":null,"errorMessage":"Expected an original Actions campaign","messagePattern":"Expected an original Actions campaign","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/refresh-runner-protocol-eval-report.mjs","lineNumber":28,"sourceCode":"\nexport async function refreshProtocolEvalReport({\n  sourceRoot,\n  evalsRoot,\n  viewerRoot,\n  outputRoot,\n  revision,\n  selection,\n  renderedAt = new Date().toISOString(),\n}) {\n  if (!/^[a-z0-9][a-z0-9-]{0,39}$/.test(revision ?? \"\"))\n    throw new Error(\"A safe, unique --revision is required\");\n  if (await lstat(outputRoot).catch(() => null))\n    throw new Error(\"Report refresh output must be a new directory\");\n  const campaign = JSON.parse(\n    await readFile(join(sourceRoot, \"campaign.json\"), \"utf8\"),\n  );\n  if (!/^gha-[1-9][0-9]*-[1-9][0-9]*$/.test(campaign.campaignId ?? \"\"))\n    throw new Error(\"Expected an original Actions campaign\");\n  const program = join(\n    evalsRoot,\n    \"evals/paperclip-runner/tools/eval_program.py\",\n  );\n  const rendererDigest = createHash(\"sha256\")\n    .update(await readFile(program))\n    .digest(\"hex\");\n  await mkdir(outputRoot, { recursive: true });\n  const runsRoot = join(outputRoot, \"public-runs\");\n  const reportRoot = join(outputRoot, \"report\");\n  await sanitizeProtocolEvalRuns({\n    runsRoot: join(sourceRoot, \"runs\"),\n    publicRunsRoot: runsRoot,\n  });\n  execFileSync(\n    \"python3\",\n    [\n      program,","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/refresh-runner-protocol-eval-report.mjs#L10-L46","documentation":"After loading sourceRoot/campaign.json, refreshProtocolEvalReport asserts the campaignId matches /^gha-[1-9][0-9]*-[1-9][0-9]*$/ — i.e. it must be an original GitHub Actions-generated campaign, not a hand-made or re-published one. The error means campaign.json describes a campaign the refresher refuses to operate on.","triggerScenarios":"Pointing --source at a local, synthetic, or refreshed campaign directory whose campaignId doesn't start with 'gha-' followed by two numeric segments; campaign.json missing campaignId (undefined fails the regex).","commonSituations":"Running the refresher against a previously refreshed report's output instead of the original campaign snapshot; editing campaignId by hand; a legacy campaign predating the gha- naming scheme.","solutions":["Point --source at the original Actions-produced campaign directory containing a gha-<run>-<n> campaignId","If the source is a refresh output, re-run from the original sourceRoot instead","Fix or regenerate campaign.json so campaignId follows the gha-<number>-<number> format","Confirm campaignId is present and not undefined in campaign.json"],"exampleFix":"// before\n// campaign.json: { \"campaignId\": \"my-local-campaign\" }\n// after\n// campaign.json: { \"campaignId\": \"gha-10293847-1\" }","handlingStrategy":"validation","validationCode":"const campaign = JSON.parse(await readFile(join(sourceRoot,'campaign.json'),'utf8')); if (!/^gha-[1-9][0-9]*-[1-9][0-9]*$/.test(campaign.campaignId ?? '')) throw new Error('Not an original Actions campaign: ' + campaign.campaignId);","typeGuard":"const isActionsCampaign = (c) => typeof c?.campaignId === 'string' && /^gha-[1-9][0-9]*-[1-9][0-9]*$/.test(c.campaignId);","tryCatchPattern":"try { await refreshProtocolEvalReport(opts); } catch (e) { if (e.message === 'Expected an original Actions campaign') console.error('campaign.json in', opts.sourceRoot, 'has a non-Actions campaignId'); throw e; }","preventionTips":["Always refresh from the original Actions snapshot, not refresh outputs","Never hand-edit campaignId","Assert the campaignId shape in CI before invoking the refresher"],"tags":["validation","campaign-id","ci"],"backgroundTag":"invalid-argument-value","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"}