{"record":{"id":"df37040f6e21ac26","repo":"Hmbown/CodeWhale","slug":"no-release-yml-workflow-run-found-for-tag-at-tagsha-rerun","errorCode":null,"errorMessage":"No release.yml workflow run found for ${tag} at ${tagSha}. Rerun the Release workflow before publishing npm, or increase the verifier's last-100-runs search window.","messagePattern":"No release\\.yml workflow run found for (.+?) at (.+?)\\. Rerun the Release workflow before publishing npm, or increase the verifier's last-100-runs search window\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/verify-release-assets.js","lineNumber":247,"sourceCode":"    const runId = candidate.database_id || candidate.id;\n    if (!runId) {\n      continue;\n    }\n    const jobs = await api(repo, `/actions/runs/${runId}/jobs?per_page=100`);\n    const releaseJob = (jobs.jobs || []).find(\n      (job) => job.name === \"release\" && job.conclusion === \"success\",\n    );\n    if (releaseJob) {\n      // #5429: pin asset freshness to the successful release job's own\n      // started_at, not the run-level run_started_at. A job-level rerun\n      // (`gh run rerun --failed`) bumps run_started_at past the asset upload\n      // timestamps even though this release job produced those assets.\n      return { ...candidate, release_job_started_at: releaseJob.started_at || null };\n    }\n  }\n\n  if (orderedCandidates.length === 0) {\n    throw new Error(\n      `No release.yml workflow run found for ${tag} at ${tagSha}. ` +\n        \"Rerun the Release workflow before publishing npm, or increase the verifier's last-100-runs search window.\",\n    );\n  }\n  throw new Error(\n    `No successful asset-publishing job found in release.yml workflow runs for ${tag} at ${tagSha}. ` +\n      \"Repair the Release workflow before publishing npm.\",\n  );\n}\n\nfunction parseGitHubTime(value, label) {\n  const timestamp = Date.parse(value);\n  if (!Number.isFinite(timestamp)) {\n    throw new Error(`GitHub ${label} timestamp is invalid: ${value}`);\n  }\n  return timestamp;\n}\n","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/npm/codewhale/scripts/verify-release-assets.js#L229-L265","documentation":"findReleaseWorkflowRun scans the last 100 runs of release.yml for a run matching the given tag and commit SHA. If no candidate runs exist at all, it throws telling you to rerun the Release workflow or widen the search window before publishing npm.","triggerScenarios":"publish step calls findReleaseWorkflowRun(repo, tag, tagSha) and the /actions/workflows/release.yml/runs list contains no run associated with the tag/SHA within the last 100 runs.","commonSituations":"Publishing npm before the Release workflow was ever triggered for the tag; more than 100 newer runs pushed the release run out of the window; workflow file renamed so the list is empty.","solutions":["Rerun the Release workflow for the tag, then retry the publish.","Check `gh run list --workflow=release.yml` for the tag run.","Reduce CI run volume or raise the per_page window (currently 100) in the script."],"exampleFix":"// before\nnpm publish\n// after\ngh workflow run release.yml -f tag=v1.2.3 && npm run verify-release-assets && npm publish","handlingStrategy":"retry","validationCode":"const runs = await githubApi(repo, \"/actions/workflows/release.yml/runs?per_page=100\"); if (!runs.workflow_runs?.some(r => r.head_sha === expectedSha)) throw new Error(\"Run the Release workflow first\");","typeGuard":null,"tryCatchPattern":"try { await verifyReleaseAssets(); } catch (e) { if (e.message.includes(\"No release.yml workflow run found\")) { console.error(\"Trigger release.yml for this tag, wait for it to finish, then retry.\"); process.exit(1); } throw e; }","preventionTips":["Always trigger the Release workflow before npm publish","Gate publish on successful completion of release.yml","Keep release workflow runs within the last-100 window or increase per_page"],"tags":["github-actions","ci","release","publish"],"backgroundTag":"record-not-found","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}