Repository navigation
fix: exclude document history from split fragments - #496
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. |
entelecheia
force-pushed
the
fix/449-split-storages
branch
from
November 10, 2026 16:02
33114d1 to
d1c4783
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.
Closes #449.
Section, saved-page and typed-range split outputs carried whole-source revision history. Remove
hwp5_doc_historyfrom each owned fragment clone before writing or range resource scanning, and return typed preservation evidence fromSplitOutcome/RangeOutcome. The CLI merges it into the existing loss ledger before strict evaluation; MCP receives that same summary. Writers and source documents are unchanged.hwp5_doc_historyhwp5_xml_templatehwpx_extra_entrieshwpx_opf_extra_itemspaired; range binary-reference scanning of these carried parts remains active.The existing header/metadata and section/page-preview policies remain unchanged. Outputs continue to retain those global dependencies and information. This is a bounded history-exclusion policy.
History omissions use existing
HwpContainerStorageRemoved/ContainerStorageandHwpContainerStreamRemoved/ContainerStreamevents withRemoveddisposition. Loss evidence is available through--loss-report, the unconditional stderr summary and MCP top-level preservation.--strictnow refuses history-bearing splits before fragment publication, after saving the loss report. The frozen, binary/address-focusedrange-extraction-v1JSON shape stays unchanged.Test-only baseline
43340bcreproduced all four intended assertions: history remained in section/page/range containers and strict split incorrectly succeeded. Three compatibility controls passed. After the fix, all 7 CLI/container tests and 75 converter split/range unit tests passed, with hwp-cli/hwp-convert all-target clippy green.Tests use owner-authored opaque sentinels, checking actual CFB storage and payload-byte absence, typed ledger counts, strict no-publication, retained schema bytes and paired HWPX parts/manifest entries. Ordinary convert/edit preserve history, and native no-op rewriting preserves the whole input byte-for-byte. Saved-page selection uses explicit fixture flags without host-font pagination assertions. These tests do not parse genuine revision-history records or establish a Hancom open/export result.
Full verification at
33114d1dead6f7c0de9b4b4ef9e3b669e74b6662: exact-head remote Linux/Rust 1.93.0,CARGO_BUILD_JOBS=2 RUST_TEST_THREADS=2 scripts/check.sh </dev/null, with verifier stdin also closed, exit 0. All 7 new CLI/container cases ran in this pass.Missing-fixture skips are 49, including 4 optional cases; absent fixture paths remain unverified. Public PDF parity auto-skipped for the environment's Poppler version. Hosted three-OS/parity checks and native Hancom evidence remain separate.