Aglet

Learn From Repeated Wrong Sort Order

Learning from sort defects means preserving the comparison semantics that were implicit or inconsistent. Record the first inversion, the value types involved, and the consumer that exposed it. Turn those details into shared fixtures and review checks that protect ordering across lists and exports.

Keep the lesson for the next incident

  1. Document sort semantics

    Write sort fields, directions, type conversion, null placement, locale behavior, tie-breaker, and source stability assumptions. State whether order is user-facing, processing-significant, or only a presentation preference. Name intentional consumer differences so later reviews do not mistake them for drift.

  2. Keep sequence fixtures

    Retain compact fixtures for mixed types, nulls, equal keys, locale variants, page boundaries, and malformed values where relevant. Assert identifier sequence and tied groups across each critical consumer. Preserve expected outputs as readable examples of the ordering contract.

  3. Review recurrence

    Assign owners for the shared rule and each consumer that can override it. Review first inversions, unstable tied groups, and changed ordering after schema or query changes. Reopen investigation for a new inversion or unexplained consumer difference, and keep unresolved policy decisions visible.

What to carry forward

Close the learning record with explicit ordering semantics, sequence fixtures, owners, and a recurrence trigger for inversions or unstable ties. Preserve intentional differences as contract exceptions. The durable improvement is consistent, explainable sequence behavior at the boundaries where users and processes depend on order.

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