Repository navigation
fix: reserve raw picture instance IDs during HWP5 synthesis - #499
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
After
mergerenumbers a picture's common instance ID, its preserved raw picture record can still hold0x30100000. A laterinsert_blocksimage previously received that same picture-record ID. Picture synthesis now reserves both common IDs and IDs in preserved raw picture records before selecting a new common/picture pair.Closes #465.
collect_raw_picture_idsreads only the complete little-endianu32atSHAPE_COMPONENT_PICTUREpayload bytes74..78. The source is this writer's existingbuild_picture_extrasappend sequence: 12 border + 32 corner + 16 clip + 8 margin + 3 adjustment + 2 BinItem-ID + 1 transparency bytes precede the ID. The same offset is documented indocs/design/03-hwp5-write.md, section 7. Short records are ignored without reading a partial field.merge, thenedit --ops insert_blockswith an image generated from an owner-authored pixel. It scans serialized HWP body records, verifies two pictures and preservation of the source raw payload, then checks distinct picture-record IDs. Five allocator regressions cover both candidate collision classes, nested raw Generic trees, captions, opaque owners and the complete-field boundary.document_merge.rschange is needed; the separate merge namespace work remains independent. Public APIs are unchanged. CHANGELOG adds only this issue's Fixed entry.Validation:
[0x30100000, 0x30100000]); the original raw payload remained byte-identical.scripts/check.shpassed on final head6966c7b32a2aaf092ae70d4cf69cab1a41260f98(stdin closed, two build/test workers). All five new allocator tests and the CLI regression passed in that run. Local-only fixtures were absent (49 skips, including four optional); public PDF parity was skipped because the pinned Poppler version was unavailable.