fix(orchestrator): Wake idle parents for each delegated sibling #9103
Closedmwolson(GitHub profile, opens in a new tab)wants to merge 250+ commits into
t3code/codex-turn-mapping fromrefs/pull/9103/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
- apps/server/src/orchestration-v2/Orchestrator.ts line 6751Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -6671,4 +6654,4 @@66716654 cohort.disposition === "open" &&66726655 projection.thread.archivedAt === null &&66736656 projection.thread.deletedAt === null &&6674- settledDeliveryCount < 2 &&6657+ deliveryRun.status !== "cancelled" &&
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/orchestration-v2/Orchestrator.ts line 7208Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -7128,12 +7205,4 @@71287205 for (const runId of terminalDeliveryRunIds) {71297206 yield* finalizeDelegatedCompletionDelivery(thread.id, runId);71307207 }7131- const refreshed = yield* projectionStore.getThreadProjection(thread.id);7132- for (const run of refreshed.runs) {7133- if (7134- run.delegatedCompletion?.delivery !== null &&7135- run.delegatedCompletion !== undefined7136- ) {7137- yield* offerDelegatedCompletionDelivery(thread.id, run.id);7138- }7139- }7208+ yield* offerDelegatedCompletionDeliveries(thread.id);apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts line 662Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -548,0 +644,21 @@644+ yield* Effect.yieldNow;645+ }646+ const afterCancel = yield* orchestrator.getThreadProjection(threadId);647+ assert.equal(648+ afterCancel.subagents.find((candidate) => candidate.id === taskId)?.completionDelivery649+ ?.state,650+ "pending",651+ );652+ assert.equal(653+ afterCancel.runs.find((candidate) => candidate.id === parentRunId)?.delegatedCompletion654+ ?.delivery,655+ null,656+ );657+658+ yield* orchestrator.dispatch({659+ type: "delegated_task.wake-policy",660+ commandId: CommandId.make("command:delegated-delivery-cancel-replan:wake-policy"),661+ parentThreadId: threadId,662+ taskId,663+ completionWake: "always",664+ });
juliusmarminge closed this
Sign in to join this conversation.


cursor[bot](GitHub profile, opens in a new tab) reviewed