Skip to content

Commit 9cfda5a

Browse files
d-csclaude
andcommitted
chore(run-ops): purge ksuid from comments + changeset (migration file left for checksum)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f398bff commit 9cfda5a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.changeset/olive-bees-repeat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@trigger.dev/core": patch
33
---
44

5-
Change the run-ops run id format from a 27-char base62 KSUID to a 26-char lowercase base32hex id (ms timestamp + CSPRNG core, region char, version char) so run ids are DNS-1123 safe for Kubernetes pod names while staying lexicographically time-sortable, and rename the exported `ResidencyKind` value `"ksuid"` to `"runOpsId"` to reflect that the NEW-store id is no longer a KSUID
5+
Change the run-ops run id format from a 27-char base62 id to a 26-char lowercase base32hex id (ms timestamp + CSPRNG core, region char, version char) so run ids are DNS-1123 safe for Kubernetes pod names while staying lexicographically time-sortable, and rename the exported `ResidencyKind` value to `"runOpsId"` (was the pre-cutover base62-format label) to reflect the new format

packages/core/src/v3/isomorphic/runOpsResidency.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("ownerEngine — residency classifier (version char at fixed position,
4141
"A".repeat(25) + "1", // uppercase
4242
"a".repeat(24) + "-1", // hyphen region char
4343
"a".repeat(27), // pre-cutover 27-char shape → LEGACY under the version rule
44-
"run_" + "b".repeat(27), // 27-char base62 KSUID-era friendly id → LEGACY
44+
"run_" + "b".repeat(27), // 27-char base62 pre-cutover friendly id → LEGACY
4545
"x".repeat(40),
4646
]) {
4747
expect(ownerEngine(bad)).toBe("LEGACY");

packages/core/src/v3/isomorphic/runOpsResidency.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { isRunOpsIdBody } from "./friendlyId.js";
44
export type Residency = "LEGACY" | "NEW";
55

66
/**
7-
* Underlying id lineage. "runOpsId" (formerly "ksuid") is the label for the
8-
* NEW-store mint path — a base32hex run-ops v1 id (see friendlyId.ts). It is
9-
* the value persisted in the runOpsMintKind feature flag. "cuid" is every
10-
* legacy shape (cuid, nanoid, pre-cutover 27-char base62).
7+
* Underlying id lineage. "runOpsId" is the label for the NEW-store mint path
8+
* — a base32hex run-ops v1 id (see friendlyId.ts). It is the value persisted in
9+
* the runOpsMintKind feature flag. "cuid" is every legacy shape (cuid, nanoid,
10+
* and the pre-cutover 27-char base62 format).
1111
*/
1212
export type ResidencyKind = "cuid" | "runOpsId";
1313

@@ -45,7 +45,7 @@ function internalForm(id: string): string {
4545
* Returns the id lineage by the version-char rule: a well-formed run-ops v1
4646
* body (26 chars, version "1" at index 25, base32hex alphabet) is "runOpsId"
4747
* (NEW store); everything else — including malformed v1 shapes — is "cuid"
48-
* (legacy). Total: never throws. Transition: pre-cutover 27-char base62 KSUIDs (the old
48+
* (legacy). Total: never throws. Transition: pre-cutover 27-char base62 ids (the old
4949
* NEW-mint format) now classify LEGACY, so ship this with the base32hex generator only once
5050
* any 27-char NEW-resident runs are drained/disposable — no live run is misrouted mid-cutover.
5151
*/

0 commit comments

Comments
 (0)