Cotal TypeScript packages
    Preparing search index...

    Function rearmOutstandingPauses

    • RE-ARM the timers of every pause this run is still holding, under THIS driver's coordinates.

      A checkpoint's armed schedule fires onto ept.<space>.<e>.<instanceId>.<epoch>.<token>.fire, derived from the coordinates of the instance that armed it. A run adopted by another host — or by the same host at a new epoch — therefore has live timers firing at a subject nobody is reading, and its pauses would sit until something else swept them. Nothing about that is repaired by resuming the program: the effect is a replayed pending step that goes straight back to waiting.

      So the driver re-emits a schedule request for each outstanding token at the CURRENT generation, which the timer writer arms onto this instance's own fire subject. Over-emission is harmless by construction (same (timerId, generation) re-derives the same .armed, a no-op replacement), so this is safe to run on every takeover and needs no record of what it did last time.

      Called AFTER the barrier activated, never before: arming timers for a run this process turned out not to hold would point another driver's fires at this one.

      Parameters

      • deps: { js: JetStreamClient; jsm: JetStreamManager; kv: KV }
      • binding: Pick<MeshHandlerBinding, "space" | "endpoint" | "instanceId" | "epoch">
      • entries: readonly JournalEntry[]

      Returns Promise<string[]>