@@ -218,7 +218,7 @@ describe("RunHydrator read-route through the runStore seam (legacy + new)", () =
218218 } ) ;
219219
220220 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
221- const hydrator = new RunHydrator ( { replica : prisma14 , runStore } ) ;
221+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore } ) ;
222222
223223 const rows = await hydrator . hydrateByIds ( envId , [ newRunId , legacyRunId ] ) ;
224224 expect ( rows . map ( ( r ) => r . id ) . sort ( ) ) . toEqual ( [ legacyRunId , newRunId ] . sort ( ) ) ;
@@ -267,7 +267,7 @@ describe("RunHydrator read-route through the runStore seam (legacy + new)", () =
267267 } ) ;
268268
269269 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
270- const hydrator = new RunHydrator ( { replica : prisma14 , runStore } ) ;
270+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore } ) ;
271271
272272 const row = await hydrator . getRunById ( envId , migratedRunId ) ;
273273 expect ( row ?. id ) . toBe ( migratedRunId ) ;
@@ -300,7 +300,7 @@ describe("RunHydrator read-route through the runStore seam (legacy + new)", () =
300300 } ) ;
301301
302302 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
303- const hydrator = new RunHydrator ( { replica : prisma14 , runStore } ) ;
303+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore } ) ;
304304
305305 const byId = await hydrator . getRunById ( envId , oldRunId ) ;
306306 expect ( byId ?. payload ) . toBe ( '{"era":"old"}' ) ;
@@ -338,7 +338,7 @@ describe("RunHydrator read-route through the runStore seam (legacy + new)", () =
338338
339339 // A generic legacy replica would miss the NEW row entirely — the metadata must come off NEW.
340340 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
341- const hydrator = new RunHydrator ( { replica : prisma14 , runStore, cacheTtlMs : 0 } ) ;
341+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore, cacheTtlMs : 0 } ) ;
342342
343343 const snapshot = await hydrator . getRunById ( envId , terminalRunId ) ;
344344 expect ( snapshot ?. id ) . toBe ( terminalRunId ) ;
@@ -385,7 +385,7 @@ describe("RunHydrator read-route through the runStore seam (legacy + new)", () =
385385 // Use a 0ms TTL so each getRunById re-reads through the seam (no cached stale row across the
386386 // crossing). Single-flight/TTL are proven separately below.
387387 const runStore = makeRoutingShapedStore ( { newStore, legacyStore, classify } ) ;
388- const hydrator = new RunHydrator ( { replica : prisma14 , runStore, cacheTtlMs : 0 } ) ;
388+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore, cacheTtlMs : 0 } ) ;
389389
390390 // Before migration: served from LEGACY.
391391 const before = await hydrator . getRunById ( envId , runId ) ;
@@ -434,7 +434,7 @@ describe("RunHydrator single-flight + TTL cache intact across the seam", () => {
434434 } ) ;
435435
436436 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
437- const hydrator = new RunHydrator ( { replica : prisma14 , runStore, cacheTtlMs : 60_000 } ) ;
437+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore, cacheTtlMs : 60_000 } ) ;
438438
439439 // Two concurrent calls -> single-flight collapses to ONE underlying read.
440440 const [ a , b ] = await Promise . all ( [
@@ -466,7 +466,7 @@ describe("RunHydrator single-flight + TTL cache intact across the seam", () => {
466466 const missingRunId = newId ( "missing_run" ) ;
467467
468468 const runStore = makeRoutingShapedStore ( { newStore, legacyStore } ) ;
469- const hydrator = new RunHydrator ( { replica : prisma14 , runStore, cacheTtlMs : 60_000 } ) ;
469+ const hydrator = new RunHydrator ( { readClient : prisma14 , runStore, cacheTtlMs : 60_000 } ) ;
470470
471471 const first = await hydrator . getRunById ( envId , missingRunId ) ;
472472 expect ( first ) . toBeNull ( ) ;
@@ -504,7 +504,7 @@ describe("RunHydrator single-DB passthrough (one PostgresRunStore over one clien
504504 } ) ;
505505 }
506506
507- const hydrator = new RunHydrator ( { replica : prisma , runStore : store , cacheTtlMs : 60_000 } ) ;
507+ const hydrator = new RunHydrator ( { readClient : prisma , runStore : store , cacheTtlMs : 60_000 } ) ;
508508
509509 // hydrateByIds returns both rows from the single client.
510510 const rows = await hydrator . hydrateByIds ( envId , [ runIdA , runIdB ] ) ;
@@ -523,7 +523,7 @@ describe("RunHydrator single-DB passthrough (one PostgresRunStore over one clien
523523 postgresTest ( "empty id-set returns [] without touching the store" , async ( { prisma } ) => {
524524 const store = new PostgresRunStore ( { prisma, readOnlyPrisma : prisma } ) ;
525525 const findRunsSpy = vi . spyOn ( store , "findRuns" ) ;
526- const hydrator = new RunHydrator ( { replica : prisma , runStore : store } ) ;
526+ const hydrator = new RunHydrator ( { readClient : prisma , runStore : store } ) ;
527527
528528 const rows = await hydrator . hydrateByIds ( "env_none" , [ ] ) ;
529529 expect ( rows ) . toEqual ( [ ] ) ;
0 commit comments