Chunk Lifecycle
How run_chunks.status protects worker ownership and prevents stale workers from completing or releasing chunks they no longer own.
Notes
- Run creation inserts chunks as
pending. - Coordinator dispatch marks selected pending chunks with
dispatched_atas it enqueues boundedrun.chunk.readywindows. - Workers can claim a chunk only when the owning run is
running. - Completion and release both compare the stored lease timestamp to the worker's claimed lease.
- Cancellation changes open chunks to
cancelled.