Skip to content

fix: preserve PDF object-generation precedence across updates - #1152

Merged
andiwand merged 1 commit into
mainfrom
review/134-pdf-xref-generations
Oct 6, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/134-pdf-xref-generations

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 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.

@andiwand
andiwand force-pushed the review/133-pdf-file-boundaries branch from 9782e86 to 525d513 Compare October 6, 2026 17:33
Base automatically changed from review/133-pdf-file-boundaries to main October 6, 2026 17:35
@andiwand
andiwand force-pushed the review/134-pdf-xref-generations branch from 5d50960 to 2d08dc0 Compare October 6, 2026 17:39
@andiwand
andiwand merged commit 6972b7f into main Oct 6, 2026
21 of 23 checks passed
@andiwand
andiwand deleted the review/134-pdf-xref-generations branch October 6, 2026 17:43
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