Skip to content

fix(deps): update dependencies - #27

Merged
tannevaled merged 1 commit into
mainfrom
renovate/deps
Sep 1, 2026
Merged

fix(deps): update dependencies#27
tannevaled merged 1 commit into
mainfrom
renovate/deps

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/go-pdfkit/render v0.20.0v0.21.0 age confidence
github.com/go-widgets/toolkit v0.297.0v0.300.0 age confidence

Release Notes

go-pdfkit/render (github.com/go-pdfkit/render)

v0.21.0: — a subsampled JPEG now looks like everyone else renders it

Compare Source

Go's image/jpeg replicates a subsampled chroma sample across the pixels it covers. libjpeg interpolates — nearer sample ×3, further ×1 each way, its "fancy upsampling", on by default and never turned off by poppler. Every PDF viewer built on libjpeg therefore shows a 4:2:0 JPEG slightly differently from how we did, and the gap is not small: a median of 27 levels on the corpus, reaching 127.

render now reproduces libjpeg's filter, and only where libjpeg applies it — 4:2:0, 4:2:2 and 4:4:0 above two chroma samples wide. 4:1:1 and 4:1:0 go through libjpeg's int_upsample, which replicates, and are asserted byte-for-byte unchanged.

Why this was worth changing

Neither behaviour violates ISO/IEC 10918, and pdf.js replicates too. This is a deliberate choice to agree with the renderer a reader is most likely to have seen the document in, rather than to be defensible in isolation.

It was found by measurement and diagnosed before being fixed. A per-channel comparison across 23 corpus populations and 3280 documents put JPXDecode at 99.2% agreement with poppler and DCTDecode at 34.0% — so the tolerance was not too tight in general, something was specifically wrong with JPEG.

The judge was cleared before our code was blamed, which matters because poppler's extraction tool has twice been the wrong side in this project: poppler has one JPEG path shared by pdfimages and pdftoppm; pdftoppm sampled at block centres is bit-identical to pdfimages -png; and pdfimages -png matches djpeg byte for byte while ours matched djpeg -nosmooth. The disagreement is that one option.

The decomposition then showed it is only this. Of 559 corpus JPEGs, greyscale — which has no chroma to reconstruct — differs by at most 1 level, and 4:4:4 by at most 4. One level is exactly what ISO/IEC 10918-2 allows a conformant decoder, so the Huffman decode, the dequantiser and the IDCT were never in question.

Effect

On us-dol/CA-10.pdf: 56 levels on 48.3% of pixels becomes 3 levels on 0.018%.

Correction, 2026-08-31. This section first claimed corpus-wide agreement with poppler rising from 61.2% to 99.3%. That was wrong: the figure was DCTDecode alone, at a magnitude gate of 4, over a denominator that admitted colour-converted pictures — and the 61.2% has no source in any landed record. Measured since by the conformance baseline, at a gate of 2 and with that denominator corrected:

  • DCTDecode 34.0% → 42.8% agreement, holding the bucketing rule fixed.
  • Direct-comparable pictures across 23 populations: 84.5% → 85.4% — first page of each document, excluding the 3139 pictures whose colour poppler converts and the measure declines to score.

Neither of those is this release in isolation: go-gfx/gfx moved v0.16.0 → v0.19.0 over the same interval. The cleanest number attributable to this change alone is the uk-govuk population, 92.3% → 100.0%, which moved no picture between buckets.

And the agreement rate understates the change, because a gate is a cliff and this was a change of magnitude. The per-population peak medians for directly compared JPEG fell from 16 18 23 23 26 31 34 47 50 58 62 to 3 3 3 3 3 3 4 4 4 4 — most pictures crossed the gate at once, which a pass/fail rate cannot show. Three populations stayed gross and are not chroma reconstruction.

100% statement coverage, go vet and -race clean, nine cross-compile targets, CGO-free.

go-widgets/toolkit (github.com/go-widgets/toolkit)

v0.300.0

Compare Source

v0.299.0

Compare Source

v0.298.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

@tannevaled

Copy link
Copy Markdown
Contributor Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 9 additional dependencies were updated

Details:

Package Change
github.com/andybalholm/brotli v1.2.2 -> v1.2.3
github.com/go-crdt/collab v0.33.0 -> v0.36.1
github.com/go-crdt/crdt v0.35.0 -> v0.37.0
github.com/go-images/images v0.0.0-20260815210351-4a50ef5ab734 -> v0.0.0-20260830151046-7e8189dc2288
github.com/go-richdoc/richdoc v0.2.0 -> v0.3.0
github.com/go-widgets/mvvm v0.5.0 -> v0.9.0
golang.org/x/net v0.49.0 -> v0.58.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 -> v0.0.0-20260526163538-3dc84a4a5aaa
google.golang.org/grpc v1.80.0 -> v1.83.2

@tannevaled
tannevaled merged commit cbc3162 into main Sep 1, 2026
2 checks passed
@tannevaled
tannevaled deleted the renovate/deps branch September 1, 2026 14:51
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