{"record":{"id":"dd39399d18f610a5","repo":"paperclipai/paperclip","slug":"cloud-artifacts-timed-out-for-sha-missing-missing-join","errorCode":null,"errorMessage":"Cloud artifacts timed out for ${sha}; missing: ${missing.join(\", \")}.","messagePattern":"Cloud artifacts timed out for (.+?); missing: (.+?)\\.","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/cloud-readiness.mjs","lineNumber":96,"sourceCode":"    const results = await Promise.all([\n      imageExists(sha, fetchImpl),\n      migratorPublished(sha, fetchImpl, token),\n    ]);\n    missing = [\"image\", \"migrator\"].filter((_, index) => !results[index]);\n    if (missing.length === 0) {\n      // Verify the exact signed bytes and all pinned downloads after the\n      // publisher succeeds. An inaccessible or corrupt artifact cannot pass.\n      await verifyPublished(sha, fetchImpl, { verifyProvenance });\n      log(`Cloud artifacts available for ${sha}: verified image and exact-source migrator ${version}.`);\n      return { version: 1, sha, packageVersion: version };\n    }\n    const state = missing.join(\", \");\n    if (state !== previous) log(`Waiting for cloud artifacts for ${sha}: ${state}.`);\n    previous = state;\n    const remaining = deadline - now();\n    if (remaining > 0) await sleep(Math.min(intervalMs, remaining));\n  }\n  throw new Error(`Cloud artifacts timed out for ${sha}; missing: ${missing.join(\", \")}.`);\n}\n\nif (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {\n  try { await waitForCloudArtifacts(process.argv[2]); }\n  catch (error) { console.error(error.message); process.exitCode = 1; }\n}\n","sourceCodeStart":78,"sourceCodeEnd":103,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/scripts/cloud-readiness.mjs#L78-L103","documentation":"waitForCloudArtifacts polls until the deadline for the container image and the exact-source migrator publication to become available and verifiable. If the deadline passes with items still missing it throws, naming the commit and which artifacts (image, migrator) are absent.","triggerScenarios":"30 minutes elapse while imageExists() or migratorPublished() keep returning false — the image build or the migrator publish workflow has not completed for this SHA.","commonSituations":"Long CI queues pushing a build past 30 minutes; the cloud-migrator-artifacts workflow was never triggered on this commit; the image registry push is stuck; polling started before the push event landed.","solutions":["Check GitHub Actions for the cloud-migrator-artifacts run and the image build for the SHA; rerun them if missing, then poll again with a longer timeoutMs.","If builds are legitimately slow, raise timeoutMs (e.g. 60 * 60_000) or lower intervalMs for tighter polling.","Confirm the commit was pushed to master — publication only happens for master pushes/workflow_dispatch on that SHA."],"exampleFix":"// before\nawait waitForCloudArtifacts(sha); // default 30 min\n// after\nawait waitForCloudArtifacts(sha, { timeoutMs: 60 * 60_000, intervalMs: 15_000 });","handlingStrategy":"retry","validationCode":"// before waiting, confirm producers were triggered\nconst sha = \"<full-40-char-sha>\";\nconst pushed = await fetch(`https://api.github.com/repos/paperclipai/paperclip/actions/runs?head_sha=${sha}&branch=master`).then(r => r.json());\nif (!pushed.total_count) console.warn(\"No runs for this SHA yet — did the push to master happen?\");","typeGuard":null,"tryCatchPattern":"try {\n  await waitForCloudArtifacts(sha, { timeoutMs: 60 * 60_000 });\n} catch (error) {\n  if (/Cloud artifacts timed out/.test(error.message)) {\n    const missing = error.message.split(\"missing: \")[1];\n    console.error(`Still missing after 1h: ${missing}. Trigger the producer workflows and retry.`);\n    process.exitCode = 1;\n  } else throw error;\n}","preventionTips":["Trigger the migrator publish workflow before starting releases","Use a timeout that exceeds worst-case CI duration","Log which artifacts are missing each poll to distinguish slow CI from never-triggered workflows"],"tags":["timeout","ci","github-actions"],"backgroundTag":"request-timeout","analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-22T01:17:13.364Z"}