Skip to content

Commit f99774d

Browse files
fix(orchestration): preserve existing rollback and dispatch spans
1 parent eefab61 commit f99774d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/server/src/orchestration-v2/CheckpointRollbackService.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ export const layer: Layer.Layer<
355355
});
356356

357357
return CheckpointRollbackServiceV2.of({
358-
execute: Effect.fn("CheckpointRollbackService.execute")(
358+
// The inner execute owns the rollback span; this wrapper selects the workspace lease.
359+
execute: Effect.fnUntraced(
359360
function* (input) {
360361
// Storage cleanup removes worktrees under the same lease.
361362
const thread = yield* projections.getThread(input.threadId);

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11502,9 +11502,8 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
1150211502
} satisfies OrchestratorV2DispatchResult;
1150311503
});
1150411504

11505-
const dispatchWithReceipt = Effect.fn("Orchestrator.dispatchWithReceipt")(function* (
11506-
command: OrchestrationV2ServerCommand,
11507-
) {
11505+
// dispatchWithReceiptEffect owns the dispatch span; this wrapper selects the thread locks.
11506+
const dispatchWithReceipt = Effect.fnUntraced(function* (command: OrchestrationV2ServerCommand) {
1150811507
const dispatch = threadDispatch.withLock(
1150911508
commandThreadId(command),
1151011509
dispatchWithReceiptEffect(command),

0 commit comments

Comments
 (0)