Ruptures are generated by different tasks. That means that they auto-incremental id they receive depends very much on the details of the distribution (i.e. the number of cores, the block_size, the way celery sends the tasks to the workers, etc).
If we rely on an ORDER BY rupture_id when performing a risk calculation, we are asking for trouble, since the same ruptures can come in different order in different computations, which means that the risk calculation will generate different numbers due to the inherent randomness of the ORDER BY, even if the master_seed is fixed. We should find a solution. For sure there is an ORDER BY rupture_id in the hazard_getters: we should look if there are others and find a general solution for the issue.
We could use as rupture id the triple (ses_id, source_id, ordinal_ of_the_ rupture_ generated_ by_that_ source) .