Skip to content

Document the preserving writer, in one page and two languages - #6

Merged
samuelduchesne merged 2 commits into
mainfrom
006-lossless-round-trip
Sep 6, 2026
Merged

Document the preserving writer, in one page and two languages#6
samuelduchesne merged 2 commits into
mainfrom
006-lossless-round-trip

Conversation

@samuelduchesne

Copy link
Copy Markdown
Contributor

Draft: blocked on docs-2026.3 being published from idfkit-js, which is blocked on idfkit/idfkit-js#45. check-vendored fails until then, and correctly: the TypeScript snippets here were vendored with sync_js_artifacts.py --from-sibling, which the tool permits and correctly says "is not evidence about the pinned tag".

One page under How-to, carrying parity("lossless-round-trip") after the intro. The macro renders nothing now that both sides are complete, which is the right answer: there is no longer a difference to report.

The section that would otherwise be missing

The text format preserves per object; the object notation is all or nothing — in both languages, because it is a property of the format rather than a difference between the libraries. A reader who knows the text format's terms would assume them, so the page states the difference next to the code rather than leaving it to be discovered.

The page also says what "the same file" means: reproduction is defined against the text a read was given, not against a file's bytes, and it names the two defects that live on the other side of that line — the TypeScript reader refusing a byte-order mark, and Python's save_idf translating line endings because it opens its destination without newline="".

Verified locally

The page builds, both languages' snippets inline correctly, and check_capability_declarations.py accepts it. make docs-test fails on this machine for a missing libcairo, unrelated to the page: none of the 108 warnings it emits names it.

[tool.idfkit.governance] moves to governance-2026.14 and [tool.idfkit.docs] to docs-2026.3.

One page under how-to, carrying parity("lossless-round-trip") after the intro.
The macro renders nothing now that both sides are complete, which is the right
answer: there is no longer a difference to report.

The section that would otherwise be missing is the last one. The text format
preserves per object and the object notation is all or nothing, in BOTH
languages, because it is a property of the format rather than a difference
between the libraries. A reader who knows the text format's terms would assume
them, so the page states the difference next to the code rather than leaving it
to be discovered.

The page also states what "the same file" means: reproduction is defined against
the text a read was GIVEN, not against a file's bytes, and the two defects that
live on the other side of that line are named.

`check-vendored` fails until idfkit-js publishes docs-2026.3. The TypeScript
snippets here were vendored from that tag in a local checkout, which the sync
tool permits under --from-sibling and correctly says is not evidence about the
pinned tag.
The snippets were identical; the TypeDoc reference was built from a working tree
that predated the last two commits on the branch. This is the one the tag
carries, fetched rather than built here.
@samuelduchesne
samuelduchesne marked this pull request as ready for review September 6, 2026 17:28
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

github-actions Bot added a commit that referenced this pull request Sep 6, 2026
@samuelduchesne
samuelduchesne merged commit 8e03218 into main Sep 6, 2026
6 checks passed
@samuelduchesne
samuelduchesne deleted the 006-lossless-round-trip branch September 6, 2026 17:31
github-actions Bot added a commit that referenced this pull request Sep 6, 2026
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