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.