paperclipai/paperclip · error · Error

Cloud artifacts timed out for

Error message

Cloud artifacts timed out for ${sha}; missing: ${missing.join(", ")}.

What it means

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.

Solutions

  1. 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.
  2. If builds are legitimately slow, raise timeoutMs (e.g. 60 * 60_000) or lower intervalMs for tighter polling.
  3. Confirm the commit was pushed to master — publication only happens for master pushes/workflow_dispatch on that SHA.

Example fix

// before
await waitForCloudArtifacts(sha); // default 30 min
// after
await waitForCloudArtifacts(sha, { timeoutMs: 60 * 60_000, intervalMs: 15_000 });
Defensive patterns

Strategy: retry

Validate before calling

// before waiting, confirm producers were triggered
const sha = "<full-40-char-sha>";
const pushed = await fetch(`https://api.github.com/repos/paperclipai/paperclip/actions/runs?head_sha=${sha}&branch=master`).then(r => r.json());
if (!pushed.total_count) console.warn("No runs for this SHA yet — did the push to master happen?");

Try / catch

try {
  await waitForCloudArtifacts(sha, { timeoutMs: 60 * 60_000 });
} catch (error) {
  if (/Cloud artifacts timed out/.test(error.message)) {
    const missing = error.message.split("missing: ")[1];
    console.error(`Still missing after 1h: ${missing}. Trigger the producer workflows and retry.`);
    process.exitCode = 1;
  } else throw error;
}

Prevention

When it happens

Trigger: 30 minutes elapse while imageExists() or migratorPublished() keep returning false — the image build or the migrator publish workflow has not completed for this SHA.

Common situations: 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.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18). Data as JSON: /api/errors/dd39399d18f610a5. Report an issue: GitHub.

Appendix: source

Thrown at scripts/cloud-readiness.mjs:96

    const results = await Promise.all([
      imageExists(sha, fetchImpl),
      migratorPublished(sha, fetchImpl, token),
    ]);
    missing = ["image", "migrator"].filter((_, index) => !results[index]);
    if (missing.length === 0) {
      // Verify the exact signed bytes and all pinned downloads after the
      // publisher succeeds. An inaccessible or corrupt artifact cannot pass.
      await verifyPublished(sha, fetchImpl, { verifyProvenance });
      log(`Cloud artifacts available for ${sha}: verified image and exact-source migrator ${version}.`);
      return { version: 1, sha, packageVersion: version };
    }
    const state = missing.join(", ");
    if (state !== previous) log(`Waiting for cloud artifacts for ${sha}: ${state}.`);
    previous = state;
    const remaining = deadline - now();
    if (remaining > 0) await sleep(Math.min(intervalMs, remaining));
  }
  throw new Error(`Cloud artifacts timed out for ${sha}; missing: ${missing.join(", ")}.`);
}

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  try { await waitForCloudArtifacts(process.argv[2]); }
  catch (error) { console.error(error.message); process.exitCode = 1; }
}

View on GitHub (pinned to 3f1d897a7c)