Skip to content

fix(docx-core): replace duplicate rPrChange snapshots#459

Draft
stevenobiajulu wants to merge 1 commit into
mainfrom
451-dedupe-rprchange-stack-20260611
Draft

fix(docx-core): replace duplicate rPrChange snapshots#459
stevenobiajulu wants to merge 1 commit into
mainfrom
451-dedupe-rprchange-stack-20260611

Conversation

@stevenobiajulu

Copy link
Copy Markdown
Member

What changed

addFormatChange now removes any existing w:rPrChange under the same w:rPr before appending the replacement snapshot. A regression test covers repeated format-change visits for one run, and the #451 emitted-schema known failure was removed.

Why

The comparison pipeline can visit multiple format-changed atoms that came from the same split run. Appending a new w:rPrChange each time creates invalid CT_RPr because only one run-property revision child is allowed in a single w:rPr.

Validation

  • npm exec vitest -- packages/docx-core/src/baselines/atomizer/inPlaceModifier.test.ts --run
  • npm run check:conformance-citations
  • npm run build -w @usejunior/docx-core

Note: the full committed output corpus still contains unrelated pre-existing schema failures from other issue branches, so validation here is focused on the #451 invariant.

Comparison can visit multiple format-changed atoms that belong to the same split run. Appending a fresh w:rPrChange each time violates CT_RPr, which admits at most one run-property revision child under a single w:rPr.

This keeps the latest format snapshot by removing any existing w:rPrChange before appending the replacement. The regression locks the single-snapshot invariant and the emitted-schema known failure for #451 is removed.

Fixes: #451
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
site Ready Ready Preview, Comment Jun 11, 2026 11:09pm

Request Review

@github-actions github-actions Bot added the fix label Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant