Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): deferred-steer check and queued cancel no longer read a thread's whole history #36100

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/36100/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 131 additions and 3 deletions.

x
0 of 2 viewed, 2 left
121 additions and 1 deletionapps/server/src/orchestration-v2/Orchestrator.control-reads.test.tsModified
View file
@@ -2468,6 +2468,19 @@
walks.push(...(yield* historyWalks("queued-message.promote-to-steer")));
+ yield* dispatch("cancelled");
+ const cancelledRun = (yield* projections.getThreadProjection(threadId)).runs.at(-1)!;
+ assert.equal(cancelledRun.status, "queued");
+ statements.splice(0);
+ yield* observed(
+ orchestrator.dispatch({
+ type: "queued-run.cancel",
+ commandId: CommandId.make("cancel:long-history-reads"),
+ threadId,
+ runId: cancelledRun.id,
+ }),
+ );
+ walks.push(...(yield* historyWalks("queued-run.cancel")));
yield* observed(
orchestrator.dispatch({
type: "run.interrupt",
@@ -2481,7 +2494,14 @@
const after = yield* projections.getThreadProjection(threadId);
assert.deepEqual(
after.messages.filter((message) => message.role === "user").map((message) => message.text),
- ["Request 1", "Request 2", "Request 3", "/compact", "Request queued, edited"],
+ [
+ "Request 1",
+ "Request 2",
+ "Request 3",