@@ -138,20 +138,6 @@ export class RoutingRunStore implements RunStore {
138138 return this . #routeOrNew( runId ) . runInTransaction ( runId , fn ) ;
139139 }
140140
141- // A waitpoint WRITE co-locates with its run by id-shape (cuid → LEGACY, run-ops id → NEW,
142- // unclassifiable → LEGACY), mirroring how `blockRunWithWaitpointEdges` routes the edge by
143- // run id. The caller's `tx` is never forwarded: a routed write must run on the OWNING store's
144- // OWN client so the row lands in that store's database (same-store atomicity comes from the
145- // owning store opening its own transaction, never from a caller-supplied one).
146- #routeWaitpointWrite(
147- id : string | undefined ,
148- _tx ?: PrismaClientOrTransaction
149- ) : { store : RunStore ; tx ?: PrismaClientOrTransaction } {
150- const store =
151- typeof id === "string" && this . #classifySafe( id ) === "NEW" ? this . #new : this . #legacy;
152- return { store, tx : undefined } ;
153- }
154-
155141 // Resolve which store ACTUALLY holds a waitpoint id: drain-on-read can relocate a cuid
156142 // waitpoint onto NEW while keeping its id, so probe the id-shape's home then the other.
157143 // `onPrimary` probes each store's own primary (read-your-writes callers; a fresh row may not
@@ -1187,7 +1173,7 @@ export class RoutingRunStore implements RunStore {
11871173 opts ?. residency ,
11881174 RoutingRunStore . #waitpointId( data )
11891175 ) ;
1190- // Never forward the caller's tx into a routed write (matches #routeWaitpointWrite ).
1176+ // Never forward the caller's tx into a routed write (it runs on the owning store's own client ).
11911177 return store . createWaitpoint ( args , undefined ) ;
11921178 }
11931179
@@ -1706,7 +1692,7 @@ export class RoutingRunStore implements RunStore {
17061692 ) : Promise < BatchTaskRun > {
17071693 // Route by the batch's classifiable internal id: run-ops id→NEW, cuid→LEGACY. The caller's
17081694 // `tx` is never forwarded — the create runs on the owning store's own client so the batch and
1709- // its co-resident child runs/items land on the same DB. Mirrors #routeWaitpointWrite /
1695+ // its co-resident child runs/items land on the same DB. Mirrors the by-id waitpoint-write routing /
17101696 // updateBatchTaskRun.
17111697 const store = await this . #routeOrNewForWrite( data . id ) ;
17121698 return store . createBatchTaskRun ( data , undefined ) ;
@@ -1723,7 +1709,7 @@ export class RoutingRunStore implements RunStore {
17231709 const id =
17241710 typeof args . where . id === "string" ? args . where . id : ( args . where . friendlyId ?? undefined ) ;
17251711 // The caller's `tx` is never forwarded — the update runs on the owning store's own client so
1726- // it targets the DB the batch actually lives on. Mirrors #routeWaitpointWrite .
1712+ // it targets the DB the batch actually lives on. Mirrors the by-id waitpoint-write routing .
17271713 const store = this . #routeOrNew( id ) ;
17281714 return store . updateBatchTaskRun ( args , undefined ) ;
17291715 }
@@ -1885,7 +1871,7 @@ export class RoutingRunStore implements RunStore {
18851871 // WaitpointTag — a standalone entity (no run/waitpoint FK) keyed by (environmentId, name).
18861872 // ---------------------------------------------------------------------------
18871873
1888- // Callers never mint a tag id (defaults to cuid), so #routeWaitpointWrite always resolves LEGACY
1874+ // Callers never mint a tag id (defaults to cuid), so a tag write always resolves LEGACY
18891875 // today — deliberately single-homed, like standalone waitpoint tokens. If tag-id minting is ever made
18901876 // residency-aware, findManyWaitpointTags must de-dupe by (environmentId, name) or names will duplicate.
18911877 upsertWaitpointTag (
0 commit comments