Skip to content

Commit b442f6f

Browse files
waleedlatif1claude
andcommitted
test(executor): remove stale fire-and-forget assertion
The deleted test asserted wrappedOnBlockStart returns before the user callback resolves. After the Stage 1 drain refactor, wrappedOnBlockStart must await the user callback so the executor's trackCallback set covers SSE writes — otherwise the drain at terminal-event time can't guarantee block:* flushes before execution:*. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0ef18ea commit b442f6f

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

apps/sim/lib/workflows/executor/execution-core.test.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -239,37 +239,6 @@ describe('executeWorkflowCore terminal finalization sequencing', () => {
239239
expect(findStartBlockMock).toHaveBeenCalledWith(expect.anything(), 'external', false)
240240
})
241241

242-
it('does not await user block start callback after persistence completes', async () => {
243-
let releaseCallback: (() => void) | undefined
244-
const callbackPromise = new Promise<void>((resolve) => {
245-
releaseCallback = resolve
246-
})
247-
248-
executorExecuteMock.mockResolvedValue({
249-
success: true,
250-
status: 'completed',
251-
output: { done: true },
252-
logs: [],
253-
metadata: { duration: 123, startTime: 'start', endTime: 'end' },
254-
})
255-
256-
await executeWorkflowCore({
257-
snapshot: createSnapshot() as any,
258-
callbacks: {
259-
onBlockStart: vi.fn(() => callbackPromise),
260-
},
261-
loggingSession: loggingSession as any,
262-
})
263-
264-
const contextExtensions = executorConstructorMock.mock.calls[0]?.[0]?.contextExtensions
265-
266-
await expect(
267-
contextExtensions.onBlockStart('block-1', 'Fetch', 'api', 1)
268-
).resolves.toBeUndefined()
269-
270-
releaseCallback?.()
271-
})
272-
273242
it('awaits terminal completion before updating run counts and returning', async () => {
274243
const callOrder: string[] = []
275244

0 commit comments

Comments
 (0)