stablyai/orca · error

Release ${repo}@${tag} was not found in the draft-aware rele

Error message

Release ${repo}@${tag} was not found in the draft-aware releases list

What it means

Thrown by fetchRelease() when the GitHub Releases API returns a valid array of releases but none has a tag_name matching the requested tag. The script deliberately lists releases (not the single-release endpoint) because the publish gate runs while the release is still in draft state, and the single endpoint hides drafts. So this fires when the tag genuinely has no release object yet — draft or otherwise — within the first 100 releases returned.

Source

Thrown at config/scripts/verify-release-required-assets.mjs:74

    }
  })
  if (!res.ok) {
    const body = await res.text().catch(() => '')
    throw new Error(`GitHub request failed ${res.status} ${res.statusText}: ${body.slice(0, 300)}`)
  }
  return res
}

async function fetchRelease(repo, tag, token) {
  // The publish gate runs while the release is still draft.
  const res = await githubFetch(`https://api.github.com/repos/${repo}/releases?per_page=100`, token)
  const releases = await res.json()
  if (!Array.isArray(releases)) {
    throw new Error(`GitHub releases response for ${repo} was not an array`)
  }
  const release = releases.find((candidate) => candidate.tag_name === tag)
  if (!release) {
    throw new Error(`Release ${repo}@${tag} was not found in the draft-aware releases list`)
  }
  return release
}

async function fetchAssetText(repo, asset, token) {
  const res = await githubFetch(
    `https://api.github.com/repos/${repo}/releases/assets/${asset.id}`,
    token,
    'application/octet-stream'
  )
  return res.text()
}

export async function verifyRequiredReleaseAssets({ repo, tag, token }) {
  const release = await fetchRelease(repo, tag, token)
  const assetsByName = new Map(release.assets.map((asset) => [asset.name, asset]))

  const requiredNames = new Set(getRequiredReleaseAssetNames(tag))

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Confirm the GitHub Release object exists for the tag (drafts included) in the target repo's Releases page before running the gate.
  2. Check the tag spelling matches a real tag_name exactly, including any leading 'v'.
  3. If the repo has more than 100 releases, paginate the releases endpoint instead of relying on per_page=100, or raise per_page within the documented limit.
  4. Verify GITHUB_REPOSITORY env var points at the repo that owns the release (defaults to stablyai/orca).
  5. Ensure the release-create workflow step has run before this verify step in the publish pipeline.

Example fix

// before
const res = await githubFetch(`https://api.github.com/repos/${repo}/releases?per_page=100`, token)
// after — paginate until the tag is found or releases are exhausted
async function fetchRelease(repo, tag, token) {
  let page = 1
  while (true) {
    const res = await githubFetch(`https://api.github.com/repos/${repo}/releases?per_page=100&page=${page}`, token)
    const releases = await res.json()
    if (!Array.isArray(releases)) throw new Error(`GitHub releases response for ${repo} was not an array`)
    const release = releases.find((c) => c.tag_name === tag)
    if (release) return release
    if (releases.length < 100) break
    page += 1
  }
  throw new Error(`Release ${repo}@${tag} was not found in the draft-aware releases list`)
}
Defensive patterns

Strategy: validation

Validate before calling

// Before calling fetchRelease, confirm the tag format and that a release is expected.
function assertTagShape(tag) {
  if (!/^v?\d+\.\d+\.\d+/.test(tag)) {
    throw new Error(`Refusing to look up malformed tag: ${tag}`)
  }
}
// In the workflow, ensure the release-create step completed:
//   if: steps.create_release.outcome == 'success'
// before invoking verify-release-required-assets.mjs.

Prevention

When it happens

Trigger: Calling verify-release-required-assets.mjs with a tag whose GitHub Release has not been created yet; the release exists as a git tag but the GitHub Releases object was never authored; the release sits beyond the 100-item per_page window on a repo with many releases; a typo'd tag that doesn't match any candidate.tag_name.

Common situations: Running the asset-verification gate before the release-create step of the workflow has finished; tag name casing/format mismatch (e.g. v1.2.3 vs 1.2.3); repository with >100 historical releases pushing the target past the first page; wrong GITHUB_REPOSITORY env value pointing at a fork that lacks the release.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/af5631887db53856. Report an issue: GitHub.