Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): scheduled task updates keep the saved workspace unless the binding changes #32494

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/32494/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 24 additions and 4 deletions.

x
0 of 2 viewed, 2 left
21 additions and 1 deletionapps/server/src/mcp/OrchestratorMcpService.test.tsModified
View file
@@ -2911,7 +2911,13 @@
Effect.gen(function* () {
const saved = yield* Ref.make<ReadonlyArray<ScheduledTask["workspaceStrategy"]>>([]);
const mcp = yield* OrchestratorMcpService.OrchestratorMcpService.pipe(
- Effect.provide(service(masterRepository, saved)),
+ Effect.provide(
+ service(masterRepository, saved, {
+ ...existing,
+ threadId: ThreadId.make("thread:scheduled-base"),
+ threadMode: "continue",
+ }),
+ ),
yield* mcp.updateScheduledTask(client, {
scheduledTaskId: existing.id,
@@ -2923,6 +2929,20 @@
+ it.effect("keeps the saved workspace when an unbound task stays unbound", () =>
+ Effect.gen(function* () {
+ const saved = yield* Ref.make<ReadonlyArray<ScheduledTask["workspaceStrategy"]>>([]);
+ const mcp = yield* OrchestratorMcpService.OrchestratorMcpService.pipe(
+ Effect.provide(service(masterRepository, saved)),
+ );
+ yield* mcp.updateScheduledTask(client, {
+ scheduledTaskId: existing.id,
+ bindToCurrentThread: false,
+ });