Files
Pranay Prakash 62d3ade7fe test(recovery): prove exactly-once when a worker boots mid-run (multi-worker)
Adds a deterministic postgres repro for the concern that boot-time recovery
(`reenqueueActiveRuns`) might re-run steps that are healthily in-flight on
another worker: worker B runs a long step, worker A boots while it's running
(its instrumentation re-enqueues ALL active runs), and the test counts how
many times the step body actually executed (via a shared side-effect log).

Result: exactly once. The re-enqueue replays the workflow, but the step's
`correlationId` idempotency key means graphile-worker won't run a concurrent
duplicate of the locked job, and by the time any re-dispatch could run the
original step has completed and the terminal-state guard skips it. So the
re-enqueue does NOT override step idempotency.

Adds `sideEffectStepWorkflow` (records each execution before sleeping). Gated
behind MULTIWORKER_RECOVERY_TEST + the postgres world; not in the default CI
gate. Verified locally: VITEST EXIT 0, step executed 1×.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 23:23:31 -07:00
..
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00

Workflows Example App

Local Dev

$ vc link --repo --yes --scope uncurated-tests