---
title: "Comment by Ahmet Özel on \"The Steps Ran in Order. Generation Still Read the Wrong Document.\" | Hashnode"
description: "Having four out of eight queries silently answer with the wrong document while every timestamp assertion stays green is a great demonstration of why ordering lo"
url: "https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9/comment/6b0174eb50945b7d534e4355"
---

[Discussion](https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9)

Comment [The Steps Ran in Order. Generation Still Read the Wrong Document.](https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9)

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[5d ago](https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9/comment/6b0174eb50945b7d534e4355)

Having four out of eight queries silently answer with the wrong document while every timestamp assertion stays green is a great demonstration of why ordering logs are not provenance. In concurrent web workers, module-level caches or request-scoped globals repurposed across async hops create this exact overwrite hazard.

Passing an immutable retrieval bundle by value directly into generation removes the shared slot completely, and comparing the retrieved document ID against the consumed ID at the boundary turns any accidental mutation into a hard test failure rather than a plausible-looking wrong answer.

[Abdus Salam](https://hashnode.com/@aheadkit)

[5d ago](https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9/comment/6b0174eb50945b7d534e4355#reply-6b01a36f2c27664fcdcfc63c)

The ID comparison is already in the piece, it caught 4 out of 4 while the timing check stayed green on all of them — so that half of your fix is proven. The by-value bundle is the part I haven't tried, my third version just hands generation the object instead of the slot, and the swaps stop mattering. Going to run the by-value version against a mutation between the steps and see if it buys anything over holding the object. In your setup, is the bundle doing the work, or is the ID check?
