fix(docx-core): clean only vacated selected paragraph-mark properties - #993
Conversation
Native terminal mark resolution left vacated paragraph-mark property containers while the AST projection removed them. Clean only selected resolved terminal marks, preserve attributes, remaining glyph formatting, foreign history, content-bearing terminal paragraphs, and the required final table-cell paragraph. Twelve independent body/cell and selective-author controls establish the intended bounded cleanup; no content-only paragraph deletion rule is introduced. Fixes: #982
The initial terminal cleanup treated XML comments and processing instructions as empty and missed mirror revision directions. Capture selected paragraph-mark histories before resolution, then remove only attribute-free containers containing no nodes beyond blank text. Apply the same conservative vacancy rule to AST projection rather than using agreement with its inherited metadata loss as proof. Independent controls now cover all four ins/del directions, comments, processing instructions, and history-only selection while keeping foreign metadata untouched. Ref: #982
…rk-properties-20260917
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
LLM gate (advisory)All evaluated rules passed - 8 pass, 0 warn, 0 error, 8 skipped, 16 total FindingsNone. All 16 rules (8 evaluated, 8 skipped)
|
|
Advisory adjudication for head The duplicated vacancy predicate warning is a real, low-severity maintenance tradeoff, not a missed canonical package/source walk. Both implementations deliberately use the same conservative rule: no attributes, and only whitespace text children. This PR does not introduce another source of revision IDs, package parts or conformance facts. The native traversal is selected-revision-scoped; the comparison traversal operates on its own projected tree. Keeping the small predicate local avoids expanding this focused consumer cleanup into a shared projection-policy refactor. The 33 independent controls include attributes, namespaces, comments, processing instructions, CDATA, foreign/unselected history and real glyph properties; native/AST parity is asserted against concrete expected outcomes. Fresh Opus review and all six local gates plus the required 21-test corpus pass on this integrated head. The warning is acknowledged, not silently counted as PASS. No blocker was found by independent review. Inherited selective property-history loss is tracked in #991, and Word projections remain UNVERIFIED. |
|
Shipping held: required workspace-test (22) failed and workspace-test (20) was cancelled. Failure logs are retained locally at /private/tmp/993-node22-ci-failure-20260917.log. Investigating the exact failure before retrying or changing code; automerge is not armed. No failing gate is being bypassed. |
|
The unchanged-head retry reproduced the same existing real-ILPA annotation test timeout (30 seconds); no assertion mismatch was reported. Further retries are stopped. Preparing a separate focused test-only blocker repair that registers the same two-source/two-destination combinations as four individually bounded cases, preserving every assertion and the 30-second per-case timeout. All21 annotation tests pass locally. This cleanup PR stays unarmed; it will integrate the blocker through normal main history and repeat exact-head review/local gates before shipping. No test skip, timeout increase, runtime change or protection bypass. |
Two consecutive Node22 CI runs time out while one test aggregates two real ILPA sources and two destination projections under a single thirty-second limit. Register the same four source/destination combinations as individual cases so a slow runner can complete and report each one. Keep every hyperlink, named-style, size and destination-relationship assertion and the thirty-second per-case bound; do not skip inputs, raise timeouts, weaken assertions or change compiler/runtime behavior. The full annotation file now reports twenty-one passing tests instead of eighteen, with each public projection independently accountable. Keep this shipping-blocker repair separate from the focused native cleanup PR. Ref: #982, #993
Preserve reviewed history while incorporating main's independently bounded public ILPA annotation cases. Repeat final integration gates and review before pushing this focused runtime repair; do not rewrite or bypass protected history. Ref: #982
|
Evidence-label correction to the earlier advisory adjudication: the 33 checked-in controls cover comments, processing instructions, glyph color, foreign-author history and last-cell paragraphs. Attribute-bearing containers, foreign namespaces and CDATA were exercised separately by dynamic Opus reviewer probes; they are not part of the 33-control count. The acknowledged duplicated-predicate maintenance tradeoff remains unchanged. The latest integrated head is still held for a fresh clean release-gate run. One prior full run timed out in an unchanged comparison-emission test while verification sessions overlapped; that red log is retained and is not passing evidence. Both supervisor and Opus isolated runs passed the affected file. Word projections remain UNVERIFIED. |
|
Final local release evidence for head
This is pre-merge evidence, not a claim that fresh CI or post-merge smoke has passed. Automerge remains unarmed pending fresh CI/advisory/legacy deployment checks. Exact-merge clean-build real-document smoke and production SHA verification still required after merge. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Post-merge smoke passedMerged and freshly built in an isolated detached worktree: Own locked dependencies and all six required gates passed: build, workspace lint, full suite 3,462 passed / 47 platform or opt-in skips, spec coverage, conformance citations and conformance document. All process exits collected as 0. Real-world fixture: public NVCA Management Rights Letter, SHA-verified against this exact merge's manifest. Fresh built public native API Accept/Reject in all four terminal ins/del directions restores the exact main-story XML and preserves original paragraph-mark glyph properties. All 8/8 tracked/resolved main-story schema controls validate. The real fixture has genuine glyph properties; synthetic regressions separately exercise genuinely vacant containers, comments, PIs, foreign history and required cell paragraphs. Actual LibreOffice Accept/Reject dispatches used the unresolved tracked packages, compared with independently imported original identity: all four outputs match all 33 paragraph/heading texts. Native pre-projected files were not substituted as reader controls. Word projection remains UNVERIFIED; reader text agreement is not a full formatting or Word oracle. Visual evidence: skipped — conservative removal of vacated property containers is structurally invisible; original glyph properties are preserved exactly. Production docs/redirect deployment: READY, actual Local log: First 50 log linesLast 50 log lines |
Summary
Remove genuinely vacated paragraph-mark property containers after selected revision resolution, including terminal and table-cell cases. Preserve glyph formatting, foreign histories, attributes, namespace declarations, XML comments/PIs/CDATA and unrelated untracked empty containers. AST vacancy checks use the same conservative boundary without deleting arbitrary empty paragraphs.
Why / scope
Native resolution left empty pPr/rPr husks that comparison projection removed. The first cleanup candidate treated comments/PIs as vacancy; independent opposite-model red/green controls identified and repaired that loss. Capture selected mark/property-history paragraphs before revision removal, clean after resolution, and require attribute-free blank-text-only children.
One concern, no public API, renderer runtime dependency, protection mutation or hosted API work. Cleanup policy is explicitly implementation normalization, not a fabricated normative requirement. Reuse shared DOCX builders. The inherited pPrChange-only empty pPr case remains outside this consumed-mark repair; no global normalization promise.
Verification at 0f4a844
Reviewed7d0a3373 normally merged with mainca618780/PR988 before final gates; no force push or reviewed-history rewrite.
Fresh full build removes the stale-dist risk identified during review; built public smoke runs against final dist, not only Vitest aliases.
Word Accept/Reject UNVERIFIED. Cleanup does not fix the separate terminal move reader limitation#973, the inherited section/page-selection difference, or selective paragraph-mark rPrChange foreign-marker loss now tracked in#991. XML metadata directly under a replaced pPr snapshot remains a separate inherited limitation, not a guarantee of this vacancy predicate.
Base freshness is checked before arming automerge. Exact merged-commit clean-build/full-suite/public DOCX/schema smoke and read-only production-docs merge-SHA verification remain required after landing. Primary checkout/evidence preserved; no cleanup/close-out while other follow-ups remain.
Fixes: #982
Ref: #941, #985, #984, #986, #991