Skip to content

Commit 37f5e91

Browse files
committed
test(server): associate recovery rosters with their provider runs
1 parent bfde2ab commit 37f5e91

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/ProjectionRecovery.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,20 @@ it.effect("reads the run that owns a background roster, not a queued or resumed
460460
.pipe(Effect.map((state) => state.runs.map((run) => run.id)));
461461
// Settled with background work left, then a queued follow-up.
462462
const settled = yield* createThread("roster-before-queue");
463-
const settledRun = yield* createRun(settled, "completed");
463+
const settledRun = yield* createRun(settled, "completed", {
464+
providerThreadId: ProviderThreadId.make(`provider-thread:${settled}`),
465+
});
464466
const queuedRun = yield* createRun(settled, "queued", { ordinal: 2, completedAt: null });
465467
yield* withRoster(settled);
466468
assert.deepEqual(yield* runIds(settled), [settledRun, queuedRun]);
467469
// A resumed queued run (ordinal 1) ended after a continuation (ordinal 2).
468470
const resumed = yield* createThread("roster-after-resume");
469471
const resumedRun = yield* createRun(resumed, "completed", {
472+
providerThreadId: ProviderThreadId.make(`provider-thread:${resumed}`),
470473
completedAt: DateTime.makeUnsafe("2026-10-03T10:05:00.000Z"),
471474
});
472475
const continuationRun = yield* createRun(resumed, "completed", {
476+
providerThreadId: ProviderThreadId.make(`provider-thread:${resumed}`),
473477
ordinal: 2,
474478
completedAt: DateTime.makeUnsafe("2026-10-03T10:00:00.000Z"),
475479
});

0 commit comments

Comments
 (0)