Repository navigation
fix: preserve PDF object-generation precedence across updates - #1152
Merged
Merged
Conversation
andiwand
force-pushed
the
review/133-pdf-file-boundaries
branch
from
October 6, 2026 17:33
9782e86 to
525d513
Compare
andiwand
force-pushed
the
review/134-pdf-xref-generations
branch
from
October 6, 2026 17:39
5d50960 to
2d08dc0
Compare
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.
🤖 Generated with Claude Code
Incremental PDF updates merged cross-reference entries by the full object/generation pair. A newer free entry therefore left the deleted object's previous generation readable, and reused object IDs could expose both versions.
Merge older sections by object ID so the newest entry wins across generations. Hybrid merges also remove superseded free entries before installing the stream entry. This follows ISO 32000-1 §§7.5.4, 7.5.6 and 7.5.8.4.
Validation: all three extended/new regressions fail on the parent; 54 cross-reference, document-parser, incremental-writer and annotation tests pass with the fix. LLVM 22 clang-tidy passes. Existing unit tests cover generation replacement and hybrid precedence; one complete incremental PDF checks that a deleted reference actually resolves to null.