stablyai/orca · error · Error

--release requires a version argument, e.g. --release 1.4.16

Error message

--release requires a version argument, e.g. --release 1.4.160

What it means

Thrown by main() when the --release flag is present in argv but is the last token, so argv[releaseIndex + 1] is undefined/null. --release must be followed by a version string used to append/overwrite a release-mapping row (generate-skill-bundle-manifest.mjs:647-654).

Source

Thrown at config/scripts/generate-skill-bundle-manifest.mjs:653

      stale.push(filePath)
    }
  }
  if (stale.length > 0) {
    throw new Error(
      `Generated skill artifacts are stale:\n${stale
        .map((filePath) => path.relative(REPO_ROOT, filePath))
        .join('\n')}\nRun pnpm generate:skill-bundle-manifest.`
    )
  }
}

async function main() {
  const argv = process.argv.slice(2)
  const rebuildFromTags = argv.includes('--rebuild-from-tags')
  const releaseIndex = argv.indexOf('--release')
  const releaseVersion = releaseIndex !== -1 ? argv[releaseIndex + 1] : null
  if (releaseIndex !== -1 && !releaseVersion) {
    throw new Error('--release requires a version argument, e.g. --release 1.4.160')
  }

  const committedRegistry = await readCommittedRegistry()
  const committedMapping = await readCommittedReleaseMapping()
  const releasedHistory = rebuildFromTags
    ? releasedHistoryFromTags()
    : releasedHistoryFromCommitted(committedRegistry, committedMapping)
  const artifacts = await buildArtifacts(releasedHistory)

  if (releaseVersion) {
    // Why: the row names revisions the committed registry must already contain,
    // so proving those artifacts match this ref is what lets the cut record
    // provenance without regenerating them. If regeneration disagrees with what
    // is committed, the row would name a revision this tag does not ship.
    await verifyArtifacts(artifacts, CONTENT_ADDRESSED_PATHS)
    appendReleaseRow(artifacts, releaseVersion)
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Provide a version after --release, e.g. --release 1.4.160.
  2. In wrapper scripts, only append --release when the version variable is non-empty.
  3. Validate that the version matches the expected semver shape before invoking.

Example fix

# before
pnpm generate:skill-bundle-manifest --release
# after
pnpm generate:skill-bundle-manifest --release 1.4.160
Defensive patterns

Strategy: validation

Validate before calling

const argv = process.argv.slice(2)
const i = argv.indexOf('--release')
if (i !== -1 && (i + 1 >= argv.length || !/^\d/.test(argv[i + 1]))) {
  throw new Error('--release requires a version, e.g. --release 1.4.160')
}

Prevention

When it happens

Trigger: Running `pnpm generate:skill-bundle-manifest --release` with no version; a trailing --release after a copy-paste trim; a script that appends --release conditionally but drops the version.

Common situations: A release-cut wrapper that builds the flag list dynamically and the version variable was empty; manual invocation during release prep forgetting the version; an argument parser that strips the value.

Related errors


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