test(diff): pin endnote-scope N-way note composition + fix stale comment (closes #231)#270
Merged
Merged
Conversation
… comment Issue #231 (compose footnote/endnote content edits across reviewers in the DocxDiff composite merger) was already implemented by #250/#261: MergeNoteScopes iterates { Footnote, Endnote } and ApplyCompositeNoteDiffs renders both scopes; the NoteOps-null tripwire is gone. This closes the two residual gaps that evaluation surfaced, both squarely in the IR-based DiffDocx engine: - Endnote regression coverage was missing. The dedicated IrCompositeNoteTests fixture is footnote-only, yet the acceptance criterion names "footnote/endnote text". IrCompositeEndnoteTests mirrors it for the endnote branch: disjoint endnote edits compose, same-endnote edits conflict per policy, consolidated revisions attribute endnote edits, and reject == base under all policies. - A stale comment in LowerStructuralOps still claimed "the composite path does not yet compose them across reviewers" (a pre-#250 leftover). Corrected: note scopes pass through body-op lowering unchanged and are composed later by MergeNoteScopes. No engine behavior change. Base 2-way parity stays 179/179; note suites green.
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
Issue #231 asked the DocxDiff composite merger to compose footnote/endnote content edits across reviewers (
NoteOpscomposition) and to remove theNoteOps-null tripwire. Evaluation finding: that capability is already fully implemented and tested — it landed after the issue was filed (2026-06-14), via #250 ("close the N-way Consolidate gap — note merge…") and #261 ("cross-kind note fix"). The issue was simply never closed.This PR closes the loop by landing the two residual gaps the evaluation surfaced — both squarely in the IR-based DiffDocx engine, no
WmlComparerchanges and no engine behavior change:IrCompositeNoteTestsfixture is footnote-only, yet issue feat(diff): composite — merge footnote/endnote content edits across reviewers (NoteOps composition) #231's acceptance criterion names "footnote/endnote text". Footnotes and endnotes run the sameMergeNoteScopeskind-loop ({ Footnote, Endnote }) and the sameApplyCompositeNoteDiffsrender dispatch, but the endnote branch had no committed test. NewIrCompositeEndnoteTestsmirrors the footnote suite for endnotes.IrCompositeMerger.LowerStructuralOpsstill read "the composite path does not yet compose them across reviewers" — a pre-feat(diff): close the N-way Consolidate gap — note merge, column composition, native split/merge/row-moves, cell-shell visibility #250 leftover that flatly contradictsMergeNoteScopes. Corrected (the architecture doc atir_diff_engine.mdline 248 was already updated; the comment was missed).Verification of #231's acceptance criteria in the current tree
MergeNoteScopescomposes note diffs across reviewers (both kinds)IrCompositeMerger.cskind-loop over Footnote and EndnoteNoteOps-nullDebug.Asserttripwire removedIrCompositeMarkupRenderer.csrenders whenNoteOpspresentIrCompositeNoteTests+IrCompositeCrossKindNoteTests(22 cases)IrCompositeEndnoteTests(6 cases)reject ≡ base(incl. notes) under all policiesIrParityScoreboardTests:Total: 179 PASS: 179 DEVIATION: 0 FAIL: 0Changes
Docxodus.Tests/Ir/Diff/IrCompositeEndnoteTests.cs(new): endnote sibling ofIrCompositeNoteTests.Disjoint_endnote_edits_compose_both_land(×3 policies) — both reviewers' disjoint endnote edits land on accept; endnotes restore to base on reject.Same_endnote_conflicting_edits_resolve_per_policy(×3 policies) — same-endnote edits recorded as a conflict with both authors; accept followsBaseWins/FirstReviewerWins/StackAll; reject ≡ base.Consolidated_revisions_surface_endnote_edits_with_attribution— endnote edits appear as attributed revisions.Docxodus/Ir/Diff/IrCompositeMerger.cs: corrected theLowerStructuralOpsnote-passthrough comment.Testing
dotnet build Docxodus/Docxodus.csproj -c Release→ 0 warnings, 0 errors (warnings-as-errors).IrCompositeEndnoteTests+IrCompositeNoteTests+IrCompositeCrossKindNoteTests→ 29/29 pass.IrParityScoreboardTests(2-way parity) → 179/179, deviation 0.Closes #231.
Generated by Claude Code