@@ -174,26 +174,26 @@ describe("realtime stream registration — run-ops store routed writes", () => {
174174 "completed run guard issues no push" ,
175175 { timeout : 60_000 } ,
176176 async ( { prisma17 } ) => {
177- const store = new PostgresRunStore ( { prisma : prisma17 , readOnlyPrisma : prisma17 } ) ;
178-
179- const runId = "run_routed_push_completed" ;
180- await seedRun ( prisma17 , {
181- runId,
182- slugSuffix : "completed17" ,
183- completedAt : new Date ( "2026-06-01T00:00:00.000Z" ) ,
184- } ) ;
185-
186- const streamId = "stream-late" ;
187- const result = await routedRegisterStream ( store , prisma17 , runId , streamId ) ;
188-
189- // The completedAt guard blocks the push (route returns 400).
190- expect ( result . pushed ) . toBe ( false ) ;
191-
192- const row = await prisma17 . taskRun . findFirst ( {
193- where : { id : runId } ,
194- select : { realtimeStreams : true } ,
195- } ) ;
196- expect ( row ?. realtimeStreams ) . toEqual ( [ ] ) ;
177+ const store = new PostgresRunStore ( { prisma : prisma17 , readOnlyPrisma : prisma17 } ) ;
178+
179+ const runId = "run_routed_push_completed" ;
180+ await seedRun ( prisma17 , {
181+ runId,
182+ slugSuffix : "completed17" ,
183+ completedAt : new Date ( "2026-06-01T00:00:00.000Z" ) ,
184+ } ) ;
185+
186+ const streamId = "stream-late" ;
187+ const result = await routedRegisterStream ( store , prisma17 , runId , streamId ) ;
188+
189+ // The completedAt guard blocks the push (route returns 400).
190+ expect ( result . pushed ) . toBe ( false ) ;
191+
192+ const row = await prisma17 . taskRun . findFirst ( {
193+ where : { id : runId } ,
194+ select : { realtimeStreams : true } ,
195+ } ) ;
196+ expect ( row ?. realtimeStreams ) . toEqual ( [ ] ) ;
197197 }
198198 ) ;
199199
0 commit comments