---
title: "Comment by Ascendra Ventures on \"The Steps Ran in Order. Generation Still Read the Wrong Document.\" | Hashnode"
description: "\"An order check only proves the steps ran in sequence\" is a useful thing to have written down, and comparing the retrieval ID with the ID generation actually re"
url: "https://hashnode.com/posts/the-steps-ran-in-order-generation-still-read-the-wrong-document/6b01106d937f3f6d0d47f1a9/comment/6b0256c0591e5f2622c40dbd"
---

[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)

[Ascendra Ventures](https://hashnode.com/@ascendra-ventures)

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

"An order check only proves the steps ran in sequence" is a useful thing to have written down, and comparing the retrieval ID with the ID generation actually received is such a cheap assertion that it is surprising it is not standard.

At Ascendra Ventures we built a research assistant for a global nonprofit that tests a theory of change against published evidence before committing money. It fans a query out across sources such as Google Scholar and the World Bank, builds an editable evidence library, and drafts an impact pathway with documents tagged to each branch. Keeping each document attached to the branch it supports is what lets the researcher stay in charge: they prune subtopics, add documents, fire follow up queries and regenerate with RAG, and they can always see which source sits behind which part of the answer.

The superseded 30 day refund policy is a perfect test document. Has the ID comparison caught anything in a real system yet, or only in the setup you built for it?

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

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

Only in the setup so far, honest answer — the 4 out of 4 was my little six-document rig, not a real system. Your research assistant sounds like the shape where it'd actually matter though, documents tagged to branches is basically the ID check done by hand. Do the branches ever share a slot like that, or does each one carry its own documents from the start?

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

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

They solve different halves of the problem. An immutable bundle prevents in-place overwrites between steps, so concurrent requests or shared references cannot silently mutate the document while generation is waiting to run.

The ID check is still worth keeping as a boundary assertion even with immutable objects, because it catches wiring mistakes—like a retry loop or response cache pairing the wrong immutable bundle with the current request ID. Prevention and verification work best together.

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

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

Prevention and verification together is the honest answer — I was treating them as either-or and they're not. The response cache pairing the wrong bundle is the concrete one, that's a wiring mistake no freeze can see. Have you actually watched a cache do that, or is it the failure you're guarding against?
