stablyai/orca · error
Adhoc label has no usable characters: ${JSON.stringify(label
Error message
Adhoc label has no usable characters: ${JSON.stringify(label)} What it means
Thrown by normalizeAdhocLabel when, after stripping refs/heads/ and origin/ prefixes, collapsing disallowed characters, trimming, truncating to 32 chars, and trimming trailing separators, the result is empty. The label goes verbatim into a release title and a $GITHUB_OUTPUT line, so the function replaces rather than rejects — but if every input character was disallowed (whitespace, emoji, punctuation only) there is nothing left to keep.
Source
Thrown at config/scripts/adhoc-build-version.mjs:68
*
* The input is free text from whoever ran the workflow, so it cannot be trusted
* to stay inside the title's shape: a stray `•` would forge a field separator,
* and a newline would break the `$GITHUB_OUTPUT` line the workflow parses. Both
* collapse to `-` here, which is why this replaces rather than rejects.
*/
export function normalizeAdhocLabel(label) {
const cleaned = String(label ?? '')
// `refs/heads/x` and `origin/x` are what a ref input tends to arrive as; the
// prefix is noise in a title where every row is already a branch build.
.replace(/^(?:refs\/heads\/|origin\/)/, '')
.replace(/[^\p{L}\p{N}._/-]+/gu, ' ')
.trim()
.replace(/\s+/g, '-')
.slice(0, ADHOC_LABEL_MAX_LENGTH)
// Truncation can land mid-separator, leaving a title ending in `-` or `/`.
.replace(/[-._/]+$/, '')
if (!cleaned) {
throw new Error(`Adhoc label has no usable characters: ${JSON.stringify(label)}`)
}
return cleaned
}
/**
* `1.4.163 • wasm-terminal • Aug 1, 2:25PM • abc1234` — the human-facing release
* title, shown verbatim in both the GitHub releases list and the build picker.
*
* Why the label sits where hourly puts its build number: several adhoc builds
* from different branches coexist in the channel, so the picker needs the branch
* to tell them apart. A counter would say nothing about which one to pick.
*/
export function formatAdhocReleaseName(version, label, commit, date) {
return [
version.split('-')[0],
normalizeAdhocLabel(label),
formatReleaseTitleTimestamp(date),
commit.slice(0, 7)View on GitHub (pinned to 1136503c6a)
Solutions
- Set ORCA_ADHOC_LABEL to a branch or feature name containing at least one letter or digit before dispatching the workflow.
- If the label should be optional, change the workflow to fall back to the branch/ref name when ORCA_ADHOC_LABEL is empty rather than passing it through verbatim.
- Pre-validate the label in the workflow dispatch input with a pattern that requires at least one \p{L}|\p{N} character.
- Surface a friendlier error message that names the env var and the required character class.
Example fix
// before // ORCA_ADHOC_LABEL='' node config/scripts/adhoc-build-version.mjs // -> 'Adhoc label has no usable characters: ""' // after // ORCA_ADHOC_LABEL='wasm-terminal' node config/scripts/adhoc-build-version.mjs
Defensive patterns
Strategy: validation
Validate before calling
function hasUsableLabel(label) {
const cleaned = String(label ?? '')
.replace(/^(?:refs\/heads\/|origin\/)/, '')
.replace(/[^\p{L}\p{N}._/-]+/gu, ' ')
.trim()
.replace(/\s+/g, '-')
.slice(0, 32)
.replace(/[-._/]+$/, '')
return cleaned.length > 0
}
// if (!hasUsableLabel(process.env.ORCA_ADHOC_LABEL)) throw new Error('ORCA_ADHOC_LABEL needs at least one letter or digit') Prevention
- Default ORCA_ADHOC_LABEL to the branch name (e.g. ${GITHUB_REF#refs/heads/}) in the workflow when the operator leaves it blank.
- Add a workflow_dispatch input pattern that requires at least one letter or digit.
- Document near the workflow input that pure-punctuation/emoji labels are rejected.
When it happens
Trigger: ORCA_ADHOC_LABEL env var was unset (empty string default), all punctuation/whitespace, or a single emoji; the workflow dispatched with the label field left blank.
Common situations: User triggered an adhoc build without filling the label input; label was set to a string of special characters (e.g. '!!! ???'); a script defaulted ORCA_ADHOC_LABEL to an empty string instead of a branch name.
Related errors
- Package version is not valid semver: ${baseVersion}
- Adhoc build timestamp is invalid.
- Package version is not valid semver: ${baseVersion}
- Hourly build timestamp is invalid.
- Hourly build number must be a positive integer: ${buildNumbe
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/01de910fc6df10fc.
Report an issue: GitHub.