This bit us while upgrading Hydra[1]: when all the data was read into the hashing sink while receinving NAR contents, the hash was never created which lead to a test failing because file size was correct, but the hash was std::nullopt. [1] https://git.lix.systems/lix-project/hydra/src/commit/7a0dae579b53b4b96a829263b160c6dc9f42ce75/src/hydra-queue-runner/nar-extractor.cc#L70-L73 Change-Id: Ie71b5f1f17c926a2ab95fb2aabf23c7a575ff70b