Aglet

How to investigate out-of-order events with sequence evidence

An out-of-order investigation asks where a source sequence becomes a different processing sequence and whether that change matters. Trace versions and interleaving, reproduce the smallest harmful permutation, and test one correction while preserving valid independent events for the same aggregate.

Build a useful investigation brief

  1. Align sequence and processing chronology

    Map source version, event creation, transport arrival, consumer claim, handler start and finish, retry, lock or serialization, projection write, and final aggregate version. Compare related events by stable identity. Record missing sequence evidence rather than using arrival order as a substitute.

  2. Reproduce the harmful permutation

    Hold aggregate and event payload structure fixed while delaying one older event, retrying it, or running consumers concurrently. Compare source-order and arrival-order outcomes, including fields, transitions, notifications, and audit history. Use distinct aggregates to check whether an ordering guard is scoped correctly.

  3. Test one sequence-safe correction

    Evaluate one change such as rejecting older versions, buffering until a sequence is available, applying a commutative update, or serializing one aggregate. Replay in-order, delayed, duplicate, and missing-event cases. Check liveness, recovery, final version, and side effects before accepting stricter ordering.

What to carry forward

Deliver an evidence-backed brief with sequence and arrival timelines, harmful permutation, aggregate contract, tested correction, and unresolved alternatives. Investigation is complete when implementation can target one ordering boundary and verification can prove both delayed and normal sequences.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow