Skip to content

Take the reader that decodes a fax, which changes nothing here - #2

Merged
tannevaled merged 1 commit into
mainfrom
bump-fax-and-structure
Aug 27, 2026
Merged

Take the reader that decodes a fax, which changes nothing here#2
tannevaled merged 1 commit into
mainfrom
bump-fax-and-structure

Conversation

@tannevaled

@tannevaled tannevaled commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

reader v0.4.2 → v0.5.0. No code change.

This changes nothing this package produces, and the number is the point of
saying so.

Measured

Two binaries, each verified with go version -m:

old  github.com/go-pdfkit/reader v0.4.2   github.com/go-pdfkit/pdffont v0.3.0
new  github.com/go-pdfkit/reader v0.5.0   github.com/go-pdfkit/pdffont v0.3.0

For every one of the 2 268 forms in /Users/Shared/pdfforms the harness
dumped, and compared byte for byte:

  • whether the document has a form at all, whether it carries XFA, whether it
    asks for its appearances to be redrawn, and its default appearance string;
  • every field's whole name, kind, value, shown text, read-only / required flags,
    MaxLen, quadding, widget count, button states and option count;
  • the appearance the file already carries, for every widget of every field;
  • and a freshly drawn appearance for each fillable text field, filled with a
    probe string of the letters pdffont v0.3.0 taught the family to read
    (Příliš žluťoučký kůň Łódź Gdańsk Iğdır Șoseaua Ķīlis ąčęėįšųū Erdős),
    including the content stream byte for byte.
files compared 2 268
output differs 0
of the 1 633 real documents, files with a form 1 086
fields read 133 241 across all 2 268 (129 560 in the 1 633 real)
text fields filled by the probe (real only) 88 168
appearances drawn from those (real only) 88 159
appearances that differ 0

The 133 241 figure matches the corpus's own documented field count exactly, which
is the check that the harness was reading the whole thing.

Why it is taken anyway

A form does not carry its own scans, so there was nothing here for a fax decoder
to change. It is taken because this module resolves reader alongside four
siblings that do need v0.5.0 — and because a module of this family lagging its own
dependency is exactly how a defect gets shipped twice: pdffont shipped the
21-second reader.Open denial of service to its callers for one release for
precisely that reason.

Not measured

Wall clock and peak memory. Three other corpus jobs were running, so a timing
figure would be fiction, and there is no output change for one to explain.

Also here

A .gitignore. This was the only module of the family without one, which is how a
coverage profile nearly went in with the previous commit; its five siblings all
ignore exactly this file. (Landed in #1; noted here for completeness.)

Gates

go vet, gofmt, exact 100% statement coverage, nine cross-compile targets, all
pass locally with GOWORK=off CGO_ENABLED=0.

reader v0.4.2 -> v0.5.0, which decodes /CCITTFaxDecode.

This changes nothing this package produces, and the number is the point of
saying so: every one of the 2 268 forms in /Users/Shared/pdfforms was read
with both versions -- the whole field tree, every field's value and text
and flags, the appearance the file already carries for each of its widgets,
and a freshly drawn appearance for each of the 88 168 fillable text fields
among the 1 633 real documents -- and the output is byte for byte identical
in all 2 268. Both binaries verified with `go version -m`.

A form does not carry its own scans, so there was nothing here for a fax
decoder to change. It is taken because this package resolves reader
alongside four siblings that do need it, and a module of this family
lagging its own dependency is how a defect gets shipped twice.
@tannevaled
tannevaled merged commit f9685ce into main Aug 27, 2026
1 check 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