Repository navigation
fix: refuse text edits that shift opaque HWP5 range tags - #498
Open
entelecheia wants to merge 8 commits into
Open
entelecheia wants to merge 8 commits into
entelecheia wants to merge 8 commits into
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 307f949398
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
entelecheia
force-pushed
the
fix/470-range-tag-edits
branch
from
November 10, 2026 17:42
307f949 to
4cd428f
Compare
entelecheia
force-pushed
the
fix/470-range-tag-edits
branch
from
November 10, 2026 17:43
4cd428f to
2f3dbfd
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.
Text-length changes previously retained opaque HWP5
PARA_RANGE_TAGrecords with stale WCHAR positions. The editor now preflights selected edits and refuses a width-changing splice before mutation, with a Korean cause and a remedy: use equal-WCHAR-width text, or remove the range marks in Hangul and retry.Closes #470.
PARA_RANGE_TAG; the broader local saved-sample directory was unavailable. This PR therefore takes the refusal option. It does not infer a payload layout or rewrite offsets. Format reference: 한글문서파일형식 5.0 §4.3.5.InlineCtrl(TAB)before both width checks and insertion. The same builder serves field creation and hyperlink displays. Field-value extraction retains inline tabs, and hyperlink style boundaries use the full inserted WCHAR width. This prevents a one-WCHAR field value from accepting a tab that the HWP5 writer expands to eight WCHARs, while allowing a genuinely equal-width eight-WCHAR replacement. Slot/form splices already use the shared tab normalization.Resultand CLI callers propagate the controlled refusal. Existing CLI/MCP JSON shapes are unchanged. The native reader, opaque payload preservation and identity serialization are unchanged. The binding pipeline already rejects opaque target records; its low-level splice now also propagates errors.Validation:
307f949plus test-only commitfdefc3b: four new unit tests and the CLI tab-refusal test failed at their intended assertions; the same-width non-tab control passed. The CLI setup verified a named one-WCHAR field and its opaque tag in the serialized source, then failed because the old editor accepted the tab edit. Other cases cover equal-width tab acceptance, field creation width and hyperlink style restoration.scripts/check.shpassed at final head2f3dbfda0e205e3f49655233cfae0859509c3360, rebased onto main521c4ff, with stdin closed and two build/test workers. All 39 new regression/control tests passed (31 range-tag units, two field creation/style tests, six CLI tests). Local-only fixtures were absent (49 skips, including four optional); public PDF parity was skipped because the pinned Poppler version was unavailable.