Standard / BUS-2 v0.3 / Clause 7

7 Canonical form and comparison§

AGREED

7.1 The canonical form of a series file is the file§

BUS-1 17.5 needs a canonicalization step because JSON has permitted variation — key order, whitespace, number spelling — and comparison requires removing it. bus-csv-1 was profiled until it has none: one encoding, one line ending, one header, one timestamp form, one number grammar, one row order. Two conforming exporters of the same records produce the same bytes, so the canonical form of a conforming sample file is itself, and a canonicalization step would be a place for two implementations to disagree about nothing.

Test RT-28 applies this across a round trip: an importer stores samples in whatever internal form it likes, and what it re-emits is the same bytes. This is stricter than semantic equivalence and deliberately so — for evidence-grade data, "equivalent" is an argument and "identical" is a checksum, and the digests of BUS-1 16.5 mean the check costs nothing.

7.2 What byte equality does not require§

It does not require that two different exports of the same historian agree — coverage, retention, and export time all legitimately differ, and package chaining (BUS-1 16.9) is the tool for relating successive exports. It constrains re-emission of what was received, which is the reconstruction guarantee’s concern, and nothing else.