Markdown supported · ⌘↵ to post
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.
Ascendra Ventures
"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?