Fix orphaned quick commands, prompt timeouts and worker delete (#6, #21, #34)

- #6: a quick command to a disconnected worker is refused before an
  execution is recorded, instead of leaving one stuck in 'running'.
- #21: an unanswered prompt fails the execution (prompt_timeout) instead
  of continuing as if someone had chosen; prompt and wait steps never
  wait past the execution's deadline, and a wait cut short by it fails
  with execution_timeout. PULSE_PROMPT_TIMEOUT_MS (minimum 1 s, default
  60 min) lets the test stack use 8 s.
- #34: deleting a connected worker is a 409 explaining it would
  re-register on its next heartbeat; offline workers delete as before.

Tests for each (integration 45/45).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-23 00:04:06 -05:00
1 parent 073114c92e
commit d517cae7e6
4 files changed
+85 -11

No files matched your search

+12
View File
@@ -204,3 +204,15 @@ test('abort during a long command stops the workflow at once, without waiting fo
expect(logs(ex, 'step_started').map(l => l.step)).toEqual([1]);
expect(Date.now() - t0).toBeLessThan(10_000);
});
test('an unanswered prompt fails the execution instead of continuing (#21)', async () => {
// The test stack sets PULSE_PROMPT_TIMEOUT_MS=8000.
const id = await start(await createWorkflow([
{ id: 'ask', type: 'prompt', message: 'Anyone there?', options: ['Yes'] },
{ id: 'after', type: 'execute', command: 'echo continued', targets: ['node-01'] },
]));
const ex = await waitForExecution(id, { timeout: 20_000 });
expect(ex.status).toBe('failed');
expect(logs(ex, 'prompt_timeout')).toHaveLength(1);
expect(outputs(ex)).toEqual([]);
});