Background runs are finished by one runner at a time
A sync's bulk pass, a big metafield run, a Gadget import, a record cleanup, backfill or import, a queued job, a dev server start and a build each run under a lease that one runner holds. A runner that waited longer than its lease (on Shopify, on a slow install or upload) used to carry on beside the one that took over, writing its stale copy over the newer one: a sync's place or operation ids lost, a second bulk delete started, an applied metafield run set back to applying, an action run twice, a running dev server marked failed, a build gone live twice. Leases are now renewed while the work goes on, and every write a runner makes checks it still holds the lease; one that doesn't stops.
An import's rows get the same record ids each time their chunk is written, so a chunk run again after a runner stopped part way finds what it made instead of making it twice. A dev server's npm install is stopped after ten minutes instead of holding the start for good.
More in Jobs.