Skip to content

docs: the art check compares text, not bytes - #7

Merged
HarperZ9 merged 1 commit into
mainfrom
fix/art-docstring-claim
Sep 3, 2026
Merged

docs: the art check compares text, not bytes#7
HarperZ9 merged 1 commit into
mainfrom
fix/art-docstring-claim

Conversation

@HarperZ9

@HarperZ9 HarperZ9 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

The claim

The renderer's module docstring carried this:

Here the picture is a pure function of a spec that IS diffable, so a test can
re-render and compare bytes.

That is not what happens. check_repo_art reads both sides like this:

if path.read_text(encoding="utf-8") != text + "\n":

Path.read_text applies universal-newline translation, so the comparison is over
text and a CRLF checkout passes either way. I wrote the claim, and the same
wording went out across the sibling repositories, so it is being corrected in
each of them.

Why it is worth a commit

The paragraph is the design rationale for check mode. Someone deciding whether
to trust the gate reads exactly this sentence, and what it promises is stronger
than what the gate delivers.

The byte-level reads are real, just elsewhere: the receipt records each drawing's
byte count and SHA-256 from read_bytes, which is why the art is pinned to LF in
.gitattributes. That pin is unchanged.

Scope

One docstring paragraph. No drawing moves, no check changes behaviour, and the
gate is green.

🤖 Generated with Claude Code

The renderer's module docstring said a test can re-render and compare bytes.
That is not what happens. check_repo_art reads both sides with
Path.read_text, which applies universal-newline translation, so the comparison
is over text and a CRLF checkout passes either way.

The paragraph is the design rationale for check mode, so a reader deciding
whether to trust the gate reads exactly this claim. It now says what the check
does.

The byte-level reads are elsewhere and unchanged: the receipt records each
drawing's byte count and SHA-256 from read_bytes, which is why the art is
pinned to LF in .gitattributes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@HarperZ9
HarperZ9 merged commit 6a4b29b into main Sep 3, 2026
10 checks passed
@HarperZ9
HarperZ9 deleted the fix/art-docstring-claim branch September 3, 2026 09:07
HarperZ9 added a commit that referenced this pull request Sep 3, 2026
The renderer's module docstring said a test can re-render and compare bytes.
That is not what happens. check_repo_art reads both sides with
Path.read_text, which applies universal-newline translation, so the comparison
is over text and a CRLF checkout passes either way.

The paragraph is the design rationale for check mode, so a reader deciding
whether to trust the gate reads exactly this claim. It now says what the check
does.

The byte-level reads are elsewhere and unchanged: the receipt records each
drawing's byte count and SHA-256 from read_bytes, which is why the art is
pinned to LF in .gitattributes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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