Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(server): stopped-queue steering test no longer races queue promotion #22529

Mergedtris203(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/22529/headmerged by maria-rcks View on GitHub

Showing 1 changed file with 19 additions and 5 deletions.

x
0 of 1 viewed, 1 left
19 additions and 5 deletionsapps/server/src/orchestration-v2/SteeringCompletion.integration.test.tsModified
View file
@@ -448,6 +448,7 @@
name: string,
canRestart = false,
canSteer = true,
+ interruptTurn: Effect.Effect<void> = Effect.void,
) {
const cwd = yield* checkpointWorkspace(name);
const events = yield* Queue.unbounded<ProviderAdapter.ProviderAdapterV2Event>();
@@ -538,7 +539,7 @@
interruptTurn: ({ providerTurnId }) =>
Effect.sync(() => {
interrupted.push(providerTurnId);
- }),
+ }).pipe(Effect.andThen(interruptTurn)),
respondToRuntimeRequest: () => Effect.void,
readThreadSnapshot: () => Effect.die("unused"),
rollbackThread: () => Effect.die("unused"),
@@ -1191,8 +1192,16 @@
it.effect("queues a plain send behind the stopped queue and releases its hold", () =>
Effect.scoped(
Effect.gen(function* () {
- const { started, steered, layer, startFirstTurn } =
- yield* nextTurnSelectionHarness("plain-send-after-stop");
+ const interruptReached = yield* Deferred.make<void>();
+ const releaseInterrupt = yield* Deferred.make<void>();
+ const { started, steered, layer, startFirstTurn } = yield* nextTurnSelectionHarness(
+ "plain-send-after-stop",
+ false,