stablyai/orca · error · Error
Release title timestamp is invalid.
Error message
Release title timestamp is invalid.
What it means
Thrown by formatReleaseTitleTimestamp in config/scripts/release-title-timestamp.mjs when its `date` argument is not a Date instance, or is a Date whose time value is NaN (an Invalid Date). The function formats the timestamp segment of a dev-build release title (`Jul 31, 8:10PM`) in the America/Los_Angeles timezone via Intl.DateTimeFormat, which requires a valid Date. The guard at line 13-14 rejects anything else before formatToParts is called.
Source
Thrown at config/scripts/release-title-timestamp.mjs:14
const RELEASE_NAME_TIME_ZONE = 'America/Los_Angeles'
/**
* `Jul 31, 8:10PM` — the timestamp segment of a dev build's release title, shown
* verbatim in both the GitHub releases list and the in-app build picker.
*
* Why Pacific while the tag's own stamp stays UTC: that stamp is a sort key, and
* a local one would repeat an hour at every DST fall-back, making two distinct
* builds compare equal. A title is only ever read, so it uses the timezone the
* people reading it are in. The two therefore disagree by the current offset.
*/
export function formatReleaseTitleTimestamp(date) {
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
throw new Error('Release title timestamp is invalid.')
}
const parts = Object.fromEntries(
new Intl.DateTimeFormat('en-US', {
timeZone: RELEASE_NAME_TIME_ZONE,
month: 'short',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
hour12: true
})
.formatToParts(date)
.map((part) => [part.type, part.value])
)
// Assembled from parts rather than by string-editing the formatted output:
// recent ICU separates the time from AM/PM with U+202F, not a plain space, so
// a naive replace(' ', '') leaves the gap on some runtimes and not others.
return `${parts.month} ${parts.day}, ${parts.hour}:${parts.minute}${parts.dayPeriod.toUpperCase()}`
}View on GitHub (pinned to 1136503c6a)
Solutions
- Pass a valid Date instance constructed from a known-good timestamp: `formatReleaseTitleTimestamp(new Date(release.created_at))`.
- Guard the input at the call site: reject undefined/null before constructing the Date.
- If the source value may be invalid, validate `!Number.isNaN(new Date(value).getTime())` before calling.
Example fix
// before formatReleaseTitleTimestamp(release.created_at) // raw ISO string -> throws // after formatReleaseTitleTimestamp(new Date(release.created_at))
Defensive patterns
Strategy: type-guard
Validate before calling
const d = date instanceof Date ? date : new Date(date)
if (!(d instanceof Date) || Number.isNaN(d.getTime())) {
throw new Error('Cannot format release title: invalid timestamp')
}
return formatReleaseTitleTimestamp(d) Type guard
function isValidReleaseDate(date) {
return date instanceof Date && !Number.isNaN(date.getTime())
} Prevention
- Always construct a Date at the call site: `formatReleaseTitleTimestamp(new Date(value))`.
- Reject undefined/null before constructing — `new Date(undefined)` is an Invalid Date.
- Validate `!Number.isNaN(d.getTime())` on any Date built from untrusted input.
When it happens
Trigger: Call formatReleaseTitleTimestamp with a string/number/null/undefined, or with `new Date('invalid')`, `new Date(undefined)`, or `new Date(NaN)`. `!(date instanceof Date)` catches non-Date inputs and `Number.isNaN(date.getTime())` catches Invalid Date instances.
Common situations: A caller passes a raw ISO string instead of `new Date(iso)`, forwards an undefined timestamp from a release object whose `created_at` was missing, or constructs a Date from a non-numeric source. The Invalid-Date case is the subtler one — `new Date(undefined)` produces an Invalid Date that passes instanceof but fails getTime().
Related errors
- Adhoc build timestamp is invalid.
- Hourly build timestamp is invalid.
- Package version is not valid semver: ${baseVersion}
- Adhoc label has no usable characters: ${JSON.stringify(label
- Package version is not valid semver: ${baseVersion}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/4400bdbf5ac56a88.
Report an issue: GitHub.