Module Lifecycle.Integration

type facts =
  1. | No_problem
  2. | Rejected
  3. | Delivery_lost
  4. | Rejected_and_lost
type error =
  1. | Closed
  2. | Invalid_label
val register : label:string -> facts:(unit -> facts) -> flush:(unit -> unit Lwt.t) -> shutdown:(unit -> unit Lwt.t) -> (unit, error) Stdlib.result

Register a ready output with a bounded safe label and finite cumulative delivery facts. Fact callbacks are sampled synchronously when lifecycle reports are produced, including timeout snapshots, and must be prompt, side-effect free, and concurrency-safe. Independent flush boundaries may overlap each other and an in-progress shutdown; repeated shutdown callers share one shutdown invocation. Runtime control exceptions remain native.