Skip to content

redact: the comment accused go-images/images of a defect it documents on purpose - #91

Merged
tannevaled merged 1 commit into
mainfrom
fix/the-comment-was-wrong-about-go-images
Nov 12, 2026
Merged

tannevaled merged 1 commit into
mainfrom
fix/the-comment-was-wrong-about-go-images

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

⛔⛔ Two claims went into a shipped comment without either being checked,
and I was one command away from filing two issues in other organisations on the
strength of them.

The comment added in #89 said the import swap saved linking a second decoder —
already corrected inside that pull request, go list -deps says image/jpeg
stays either way — and then that go-gfx/gfx/codec, go-images/images and
go-pdfkit/html2pdf importing image/jpeg is "a wider divergence than this
file"
, with go-images/images importing both singled out as the worst of
it.

Reading that dependency's source says otherwise, and says it deliberately

Its package doc: "PNG and JPEG via the standard library". Its partial.go,
the only file importing the fork:

⛔ One divergence from [Decode], stated rather than hidden. On a COMPLETE
file this returns the FORK's decode, and for a four-component JPEG that
differs: the fork upsamples chroma the way libjpeg does, where the standard
library repeats each sample. Decode's standard-library path is untouched, so
anything relying on its exact bytes still gets them.

So the two decoders live there on purpose, the divergence is written down
exactly where the divergence is made, and there is nothing to file. A tracker
entry claiming otherwise would have cost a maintainer a reading to refute.

What survives the check is the change itself

go-pdfkit/render's import list holds github.com/go-images/jpeg and not
image/jpeg, so decoding a redacted picture with the fork really is decoding
it the way the page is shown. That was the reason; the rest was decoration I
had not earned.

🤖 Generated with Claude Code

… on purpose

⛔⛔ I WROTE TWO CLAIMS INTO A SHIPPED COMMENT WITHOUT CHECKING EITHER, and was
one command away from filing two issues in other organisations on the strength
of them.

The comment added in #89 said the import swap saved linking a second decoder —
already corrected in that pull request, `go list -deps` says image/jpeg stays
either way — and then that go-gfx/gfx/codec, go-images/images and
go-pdfkit/html2pdf importing image/jpeg is "a wider divergence than this file",
with go-images/images importing BOTH singled out as the worst of it.

Reading that dependency's source says otherwise, and says it deliberately. Its
package doc: "PNG and JPEG via the standard library". Its partial.go, which is
the only file importing the fork:

    ⛔ One divergence from [Decode], stated rather than hidden. On a COMPLETE
    file this returns the FORK's decode, and for a four-component JPEG that
    differs: the fork upsamples chroma the way libjpeg does, where the standard
    library repeats each sample. Decode's standard-library path is untouched,
    so anything relying on its exact bytes still gets them.

So the two decoders live there on purpose, the divergence is written down where
the divergence is made, and there is nothing to file. A tracker entry claiming
otherwise would have cost a maintainer a reading to refute.

⛔ WHAT SURVIVES THE CHECK IS THE CHANGE ITSELF. go-pdfkit/render's import list
holds github.com/go-images/jpeg and NOT image/jpeg, so decoding a redacted
picture with the fork really is decoding it the way the page is shown. That was
the reason; the rest was decoration I had not earned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 62d1750 into main Nov 12, 2026
1 of 2 checks passed
@tannevaled
tannevaled deleted the fix/the-comment-was-wrong-about-go-images branch November 12, 2026 11:01
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