fix(server): hydrate delegated wake-policy parents

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex committed 2026-07-27 19:23:29 +02:00
1 parent a7495ac4ba
commit 9fd6b628be
2 files changed
+11

No files matched your search

@@ -139,6 +139,16 @@ it("identifies every existing thread that must be hydrated before dispatch", ()
}),
).toEqual([parentThreadId]);
expect(
existingThreadIdsForCommand({
type: "delegated_task.wake-policy",
commandId: CommandId.make("command:thread-management:wake-policy"),
parentThreadId,
taskId: NodeId.make("node:thread-management:delegated"),
completionWake: "always",
}),
).toEqual([parentThreadId]);
expect(
existingThreadIdsForCommand({
type: "thread.created.record",
@@ -72,6 +72,7 @@ export function existingThreadIdsForCommand(
? [command.sourceThreadId]
: [command.sourceThreadId, command.targetThreadId];
case "delegated_task.request":
case "delegated_task.wake-policy":
return [command.parentThreadId];
case "thread.created.record":
return command.parentThreadId === command.targetThreadId