Imagine generating a short reference document from a longer source on two different days. The text that a reader sees in the body is the same. The date at the top has changed. A colleague who wants to check whether the body has changed needs a different comparison from someone checking whether they received the exact same file. We tested a generator that records a digest of the body and a separate digest of the whole output. A date change, a source line-ending change, and a body edit gave us three ways to see what those comparisons cover.
Change only the date
We started with a synthetic source and generated a document from it. Then we ran the same generator on the same source with a different date. The recorded body digest matched the first run. The digest we calculated from all the output bytes differed. The header carries the date, so the delivered file had changed even though the extracted body was the same. In this example, whole-file comparison answers whether the delivered bytes match. Body comparison answers whether the extracted portion matches, with the date outside its scope.
A repeated run with the same inputs had also produced identical output in the local tests. That baseline helps interpret the date experiment. If two runs always produced different bytes, a change in the whole-file digest would tell us little about the date. Holding the other inputs constant makes it possible to attribute the difference in this fixture to the changed date. It does not tell us what would happen if we changed several pieces of metadata together. We exercised one date change and compared the two digest scopes on the resulting documents.
Change only the source line endings
A different fixture supplied the source with carriage-return and line-feed pairs in place of line feeds. We kept the date fixed. The generator normalizes those source line endings before making the output. In this comparison, both the body digest and the whole-file digest matched the baseline. The input bytes differed, and the generated bytes matched. The digest of the generated file therefore identifies the output of that normalization and extraction, with no claim that the source bytes were identical.
These two experiments separate differences a reader might otherwise lump together. The date change survived into the delivered file but did not enter its body digest. The tested newline change disappeared during generation. To understand why a digest stays the same or changes, follow what happens to the changed input before calculating it. A choice about normalization happens earlier than a choice about which output bytes to include. A matching digest at the end can tell us only about the bytes at the point where it was calculated.
Ask what the verifier actually compares
We wrote the dated variant to a temporary file and ran the built-in body verifier. It accepted the file. The verifier compared its body with the body digest recorded in that file. It did not compare the whole delivered file with the separate file digest. We then appended a synthetic line to the body without changing the recorded digest. The verifier rejected that file. Those two results show the distinction between a body consistent with its own recorded digest and one whose text has changed since that digest was recorded.
Six determinism tests and the added comparisons passed locally on the merged revision. The hosted tools job was skipped, so the evidence about the date, line endings, and body edit comes from the local fixtures. The tests do not identify who generated a document or prove that the digest came from a trusted record. They do give us a concrete way to describe the evidence in a handoff. If the question is whether two generated bodies match, record which body bytes the digest covered. If the question is whether an exact file arrived intact, compare the whole file with a digest from the record that identifies the expected artifact. The scope belongs alongside the digest because it tells the next reader what a match means.
← All engineering articles