Skip to content

docs: describe the round-trip guarantee and how it is tested - #3

Merged
jdsika merged 1 commit into
mainfrom
docs/round-trip-guarantee
Aug 5, 2026
Merged

docs: describe the round-trip guarantee and how it is tested#3
jdsika merged 1 commit into
mainfrom
docs/round-trip-guarantee

Conversation

@jdsika

@jdsika jdsika commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Documentation only; no code changes.

The "how it works" list stopped at idiomatic re-serialization and stated that all triples are
preserved. Since 0.0.2 there is a fourth step — the output is re-parsed and required to be
isomorphic to the input — and preservation is enforced by the library rather than asserted in
prose.

That is worth stating explicitly because the failure it guards against is invisible: Turtle's
compact ( … ) syntax cannot express a list whose tail is shared, so for those graphs the
idiomatic form silently dropped or duplicated triples while still parsing cleanly (#1). It also
explains why output is occasionally more verbose than "idiomatic" would suggest — the fallback to
explicit rdf:first/rdf:rest — which a consumer would otherwise notice without knowing why.

Adds a short section listing the four properties the suite asserts (lossless, idempotent,
label-independent, order-independent) and the supporting checks, so someone deciding whether to
depend on this can see what is actually verified rather than inferring it from the changelog.

The "how it works" list described idiomatic re-serialization as the final step and said all
triples are preserved. Since 0.0.2 there is a fourth step - the output is re-parsed and required
to be isomorphic to the input - and the preservation claim is now something the library enforces
rather than something the reader has to trust.

Worth documenting explicitly because the behaviour it guards against is invisible: Turtle's
compact collection syntax cannot express a list whose tail is shared, so for those graphs the
idiomatic form silently dropped or duplicated triples while still parsing cleanly (#1). A consumer
reading the old README would have had no reason to suspect that, or to know that output is now
occasionally more verbose than "idiomatic" implies, and why.

Also adds the four properties the test suite asserts - lossless, idempotent,
blank-node-label-independent, triple-order-independent - since correctness is what this library is
for, and a reader deciding whether to depend on it should be able to see what is actually checked.

Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
@jdsika
jdsika merged commit 3782cda into main Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant