Procedures to enrich with their event timeline
Maximum parallel fetches (≤8 recommended)
Optionaldeadline: numberOptional wall-clock deadline (epoch ms). If Date.now()
exceeds the deadline between batches, the loop short-circuits and the
partial result is returned. This is the corpus rebuild's cooperative
cancellation mechanism: when the request-path budget fires, this
function stops queueing further events fetches so it no longer competes
with the request's own rate-limited calls.
Map of process-id → events array (failed fetches are absent; procedures whose batch never ran due to the deadline are also absent)
Fetch event sequences for a list of procedures with bounded concurrency.
Uses
Promise.allSettledso a single 404 or transient error does not abort the whole corpus build — failures are silently skipped (their contribution to the distribution is simply omitted).