Worker reads wrong shard index

Code reviewMedium25 minGoogle and Uber style

Your task

Review this Go code (built with Go 1.21) that launches per-shard workers.

There are two distinct concurrency bugs. Identify both.