Repository navigation
Carry the colour a print file declares, and audit the rest of the catalogue - #46
Merged
Merged
Conversation
…alogue
OutputIntents and URI join the entries a rewrite carries.
⛔ FOUND BY AN AUDIT, not by a report. Twice in one afternoon this package was
found dropping a catalogue entry whose absence is not "no opinion" but a
DEFAULT — page labels, then optional content — so the whole list was measured:
a document holding twenty-three catalogue entries, a watermark over it, and of
each entry the question "what would its absence MEAN?".
/OutputIntents ⛔ no colour management: a prepress file lost the ICC
profile it declares and would print differently with
nothing to say why
/URI relative links resolve against wherever the viewer thinks
the document is — the link is not removed, it is
silently pointed elsewhere
Both name no page, so they copy safely. The test reaches the PROFILE STREAM and
not just the array, because an /OutputIntents whose /DestOutputProfile went
with the rebuild declares a colour space it cannot supply.
What is deliberately not carried is now written down with its reason:
OpenAction and AA are code and dropping them is safer; Legal and DSS belong to
a signature a rewrite has already invalidated; Threads and Collection point
into the document.
⛔ And three the audit reported as LOST are not: AcroForm, Outlines and
StructTreeRoot are all carried, and the audit's fixture held an EMPTY one of
each — which is deliberately not written. A measured absence has to be read
before it is believed, which is the other half of why the audit was worth
running.
100% statement coverage, go vet and gofmt clean. Two mutations caught.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OutputIntentsandURIjoin the entries a rewrite carries.⛔ Found by an audit, not by a report
Twice in one afternoon this package was found dropping a catalogue entry
whose absence is not "no opinion" but a default — page labels, then optional
content — so the whole list was measured: a document holding twenty-three
catalogue entries, a watermark over it, and of each entry the question what
would its absence mean?
/OutputIntents/URIBoth name no page, so they copy safely. The test reaches the profile stream
and not just the array, because an
/OutputIntentswhose/DestOutputProfilewent with the rebuild declares a colour space it cannot supply.
What is deliberately not carried, now written down with its reason
/OpenAction,/AA— these are code. Dropping them is safer, and iswhat
sanitizeexists for;/Legal,/DSS— a signature's attestation and validation data. Arewrite invalidated that signature the moment it changed a byte, and carrying
the validation data of a signature that no longer verifies would say the
document is still attested when it is not;
/Threads,/Collection— they point into the document, which is why/Names /Destsis not carried either.⛔ And three the audit reported as lost that are not
/AcroForm,/Outlinesand/StructTreeRootare all carried. The audit'sfixture held an empty one of each, and an empty form, outline or structure
tree is deliberately not written.
A measured absence has to be read before it is believed — which is the other
half of why the audit was worth running, and why the report is in the README
rather than only in a commit message.
Checks
100 % statement coverage with zero uncovered blocks,
go vetandgofmtclean. Two mutations caught.
🤖 Generated with Claude Code