Skip to content

Commit abf9f92

Browse files
test(server): an explicit steer into a run Stop reached is still refused
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a9674b0 commit abf9f92

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ it.effect("keeps a queued message queued when promoted into a run that Stop reac
17741774
);
17751775

17761776
// regression: #32891 a restart that Stop already reached is lost
1777-
it.effect("starts a restart sent into a run that Stop reached once the stop settles", () =>
1777+
it.effect("refuses a steer but starts a restart sent into a run that Stop reached", () =>
17781778
Effect.scoped(
17791779
Effect.gen(function* () {
17801780
const { started, steered, layer, startFirstTurn } =
@@ -1791,6 +1791,22 @@ it.effect("starts a restart sent into a run that Stop reached once the stop sett
17911791
threadId,
17921792
runId: first.runId,
17931793
});
1794+
const steerError = yield* orchestrator
1795+
.dispatch({
1796+
type: "message.dispatch",
1797+
commandId: CommandId.make("steer"),
1798+
threadId,
1799+
messageId: MessageId.make("message:steer"),
1800+
text: "steer",
1801+
attachments: [],
1802+
modelSelection: runSelection,
1803+
dispatchMode: { type: "steer_active", targetRunId: first.runId },
1804+
createdBy: "user",
1805+
creationSource: "web",
1806+
})
1807+
.pipe(Effect.flip);
1808+
assert.equal(steerError._tag, "OrchestratorDispatchError");
1809+
assert.include(String(steerError.cause), "is stopping and cannot be steered");
17941810
yield* orchestrator.dispatch({
17951811
type: "message.dispatch",
17961812
commandId: CommandId.make("restart"),

0 commit comments

Comments
 (0)