fix(core): coalesce deleted runs without duplicate revision IDs - #142
Open
6uimorais wants to merge 1 commit into
Open
fix(core): coalesce deleted runs without duplicate revision IDs#1426uimorais wants to merge 1 commit into
6uimorais wants to merge 1 commit into
Conversation
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.
Summary
Fixes #141.
Keep adjacent runs deleted by one resolved text edit inside a single
w:delwrapper, rather than writing sibling deletion wrappers with duplicate IDs. This is mirrored in the Node and Python engines, as required by the contribution guidelines.Thank you for the earlier work on logical-change grouping. This proposal preserves the compact two-entry delete/insert bubble for the ordinary adjacent multi-run case in #16 while making that output pass independent OpenXML validation.
Implementation and scope
AI_CONTEXT.md.No new dependencies, tool schema changes, version bumps, global XML normalization, or renumbering of existing revisions. This is scoped to the regular text deletion/replacement path, not a redesign of insertion IDs, paragraph-mark IDs, or revision grouping.
Regression coverage
The initial four cases in each engine failed on duplicate deletion IDs before the fix. They now verify:
Validation
On Linux, Node 24.13.0 and Python 3.13.7:
npm ci, thennpm run build: passed for all Node workspaces, including MCP bundle verification.npm test: core 1,067 passed / 32 skipped, MCP server 327 passed, n8n 51 passed.npm run lint: passed.uv run ruff check .anduv run ruff format --check .: passed.uv run mypy src: passed (42 source files).uv run pytest: 1,998 passed / 128 skipped; system LibreOffice 7.3.7.2 selected on PATH.@ooxml-tools/validate@0.4.6, Microsoft365 target, on the synthetic example from Multi-run replacements emit duplicate w:del IDs rejected by OpenXML validation #141: input 0 errors, unpatched Node output Sem_UniqueAttributeValue, patched Node output 0 errors, patched Python output 0 errors.An initial Python run selected an incompatible bundled LibreOffice executable and failed three probe tests. The same three failed on an unmodified
maincheckout. Selecting the working system LibreOffice resolved them without changing or skipping tests. Likewise, installation used Node 24 after the machine's default Node 25 failed compiling the existingisolated-vmdependency.Limitations / review points