Code issuance batch
The Lifecycle
Transitions Explained
Requested: The generation request is saved and its worker has been requested. Running: Worker chunks are creating codes and progress reflects saved rows. Completed: The requested number of codes exists and completion is recorded once. Failed: Generation stopped with an explanation; successfully saved codes remain available.
What Cannot Happen
Completed generation returns saved progress without restarting. Failed generation remains final; further codes require another batch.
Concurrency and Timing
Each chunk locks its batch, recounts saved codes and inserts no more than the remaining request quantity. Workspace code conflicts cause bounded regeneration attempts; different batches retain separate progress.