π Darkwood Daily #04 β When Order Changes the Outcome
on December 4, 2026
December 4, 2026 edition. A gate at a fictional pier sends three events to a dashboard. It opens, an inspection reads its state, then it closes. The dashboard receives messages in the order 3, 1, 2, 3. Applying them on arrival puts one closing event before the opening and processes the same closing event twice. The displayed history then tells a different story.
Advent of Code β Day 4
Todayβs official challenge is Perilous Pier. When checked on December 4, the Darkwood account showed zero stars. Part 1 was available and Part 2 was still locked. The gate example explores event ordering independently.
Replay the event history
| Sequence at source | Event | Resulting state |
|---|---|---|
| 1 | Open | Open |
| 2 | Inspect | Open |
| 3 | Close | Closed |
The controller assigns the sequence number when it produces the event. The number survives redelivery, so two copies of event 3 with identical payloads count as one event. If their contents disagree, stop and investigate the conflict before trusting the history.
If sequence 2 is missing, the consumer can detect the gap and ask the controller to replay from its last confirmed position. Inspection is a read operation here. Real side effects such as sending an email, collecting a payment or issuing a hardware command need protection against re-execution during replay.
Flow β Ordered Event Replay
Darkwood Page β Advent of Code
The calendar
Day 03. Darkwood participates independently, without affiliation or endorsement from Advent of Code.