Latest Results
Align Eq and Ord on ScheduledTimeEvent and OwnBookOrder (#4598)
Ord requires that a == b exactly when a.cmp(&b) is Equal, and neither
type satisfied that. Both are contract repairs with no demonstrated
in-tree consequence: no container combines the two relations, nothing
deduplicates on Equal, and nothing sorts or searches these values.
ScheduledTimeEvent derives full-field equality over the inner TimeEvent
while its Ord compared only ts_event, reversed so the heap yields the
earliest timestamp first, so two events at the same instant compared
Equal while differing in name, event ID or ts_init. The comparator now
orders by (ts_event, name, ts_init, event_id) with every component
reversed. That key is not newly invented: TimeEventHandler::cmp_event
already orders by those four fields in the same sequence, so this is the
existing tie-break reversed for heap use, and its first two components
match the (ts_event, name) sort TestClock::advance_time applies to the
events it returns. Equal-timestamp entries now follow that tie-break
instead of comparing Equal; earliest timestamps remain highest priority.
TestTimer::next mints a fresh UUID4 per event as it iterates, so a
changed processing order among simultaneous timers can change which
opaque event ID accompanies which event; no consumer relies on that
association and UUID allocation has no ordering contract.
OwnBookOrder compares equal on client_order_id alone and hashes on the
same field, but its Ord compared (ts_init, client_order_id), so two
snapshots of one order taken at different initialization times were
equal yet ordered as Less or Greater. Ord is the implementation that
drifted: 3dfb7e0858 deliberately narrowed equality to client_order_id,
removing status and ts_last, and in the same commit added
client_order_id as an ordering tie-break while leaving ts_init primary.
Identity is the client order ID elsewhere too, with the ladder storing
orders in an IndexMap keyed by ClientOrderId. The comparator is now
client_order_id alone, leaving PartialEq, Eq and Hash untouched.
External Rust callers that sort OwnBookOrder move from chronological to
client-order-ID ordering; there is no such caller in this repository.
Coded by an LLM. Latest Branches
-1%
-45%
-42%
Pushkarm029:order_emulator © 2026 CodSpeed Technology