stablyai/orca · error · Error
${name} is required.
Error message
${name} is required. What it means
Thrown by requiredEnv() in the macOS release build workflow harness when a required environment variable is null, undefined, or the empty string. The workflow refuses to proceed because the GitHub Actions release job cannot be dispatched without all of its identifying inputs (ref, run id, repository, tag, token). The message interpolates the missing variable's name so the operator can see exactly which input is absent.
Source
Thrown at config/scripts/run-release-mac-build-workflow.mjs:214
return JSON.stringify(data)
}
function readPositiveInteger(rawValue, defaultValue) {
if (rawValue == null || rawValue === '') {
return defaultValue
}
const value = Number(rawValue)
if (!Number.isInteger(value) || value <= 0) {
throw new Error(`Expected a positive integer, got "${rawValue}".`)
}
return value
}
function requiredEnv(value, name) {
if (value == null || value === '') {
throw new Error(`${name} is required.`)
}
return value
}
function sleepMilliseconds(milliseconds) {
return new Promise((resolve) => {
setTimeout(resolve, milliseconds)
})
}
if (import.meta.url === `file://${process.argv[1]}`) {
runReleaseMacBuildWorkflow(readReleaseMacBuildWorkflowOptions()).catch((error) => {
console.error(error)
process.exitCode = 1
})
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Set every required variable before invoking the harness, e.g. export RELEASE_MAC_BUILD_REF=$GIT_REF RELEASE_MAC_BUILD_RUN_ID=$RUN_ID GITHUB_REPOSITORY=owner/repo RELEASE_MAC_BUILD_TAG=$TAG GITHUB_TOKEN=$TOKEN.
- If running in GitHub Actions, add the missing key under the step's env: map (secrets.GITHUB_TOKEN for the token, github.* context values for ref/repo).
- Confirm the variable name spelling matches the requiredEnv() calls at run-release-mac-build-workflow.mjs:10-21 — copy-paste the exact identifier.
Example fix
// before pnpm run release:mac-build // after RELEASE_MAC_BUILD_REF=v1.2.3 RELEASE_MAC_BUILD_RUN_ID=42 GITHUB_REPOSITORY=owner/repo RELEASE_MAC_BUILD_TAG=v1.2.3 GITHUB_TOKEN=$TOKEN pnpm run release:mac-build
Defensive patterns
Strategy: validation
Validate before calling
// before invoking the workflow, assert all required env vars
const REQUIRED = ['RELEASE_MAC_BUILD_REF','RELEASE_MAC_BUILD_RUN_ID','GITHUB_REPOSITORY','RELEASE_MAC_BUILD_TAG','GITHUB_TOKEN']
const missing = REQUIRED.filter((k) => !process.env[k])
if (missing.length) {
console.error(`Missing required env: ${missing.join(', ')}`)
process.exit(1)
} Type guard
// narrows a possibly-undefined env value to a non-empty string
function isNonEmptyEnv(value: string | undefined): value is string {
return typeof value === 'string' && value.length > 0
} Prevention
- Keep the release env-var list in a single shared constant referenced by both the workflow and the script.
- Surface required inputs in the GitHub Actions workflow_dispatch inputs so they are visible and validated upstream.
- Add a pre-flight `node -e` check in CI that prints which required vars are set before invoking the harness.
When it happens
Trigger: Invoking run-release-mac-build-workflow.mjs (typically via pnpm run release:mac-build or a workflow_dispatch) where one of RELEASE_MAC_BUILD_REF, RELEASE_MAC_BUILD_RUN_ID, GITHUB_REPOSITORY, RELEASE_MAC_BUILD_TAG, or GITHUB_TOKEN/GH_TOKEN is unset or empty in process.env.
Common situations: Running the release harness locally without sourcing the CI env file; a GitHub Actions step that forgot to pass env: secrets.GITHUB_TOKEN; renaming a repository variable so RELEASE_MAC_BUILD_TAG no longer matches; a forked repo where the release workflow was copied but env inputs were not wired.
Related errors
- Mac release build workflow ${completedRun.html_url ?? comple
- Timed out finding dispatched mac release build workflow run
- Timed out after ${options.timeoutMinutes}m waiting for mac r
- [plain-node-entry-guard] daemon-entry.js was killed by ${res
- Package version is not valid semver: ${baseVersion}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/277a1b38642fe46e.
Report an issue: GitHub.