Concurrency is the hidden enemy of automation

In autonomous workflows, the same step can be triggered twice: a retry races with a user click, or two workers pick up overlapping tasks. Without a lock, the pipeline can double-advance state (publish twice, charge twice, or overwrite artifacts).

A lightweight lock pattern

We use a small state lock that allows safe retries while preventing concurrent advancement. The exact implementation depends on storage, but the principle is stable: acquire lock → verify state → advance → release lock.

  • Use a single authoritative state record per paper/run.
  • Acquire locks with timeouts so deadlocks are recoverable.
  • Store a unique idempotency key per step.

Why it matters

This is not just infrastructure hygiene—it’s an integrity guarantee. A press that can’t guarantee single publication semantics can’t guarantee auditability.