Repository navigation
Conversation
…ularity Since v0.17.0 a word comparison aligns logical words over characters, so that a word split across runs compares equal (F-X279b, issue 434 case 3). The character units then reached the output as they were: every unchanged character of a changed paragraph became its own w:r, and each letter of a revision its own w:delText or w:t inside the revision's run. For the 200 paragraphs of issue 446 case 1 that is 17,180 runs and 517 KiB of document.xml where v0.16.4 wrote 6,200 runs and 245 KiB. Character granularity has always written one run per character, and v0.16.4 wrote one run per word, space and punctuation mark at word granularity. The granularity now sets what is compared, never how the result is cut. Two rules, in the two helpers that the paragraph path and the inline control path share, apply to every granularity, story and revision kind: - coalesced_granular_alignment keeps unchanged pairs together while they continue the same original and the same edited text element, as it already kept the pairs of one change together. Unchanged text is one run between two revisions. - merge_unit_runs joins consecutive fragments of one text element back into one text with one source selection, whole again when every fragment is there. A revision holds its text in one w:delText or w:t, and a fully unchanged element is published from its source as at run granularity. The same 200 paragraphs now give 600 runs and 76 KiB, one run per revision and one per stretch of text around them. Two cases still cut a stretch: under ignore_whitespace an ignored whitespace unit ends it, so unchanged text stays one run per word and per space, and a tab or a break ends it as it ends a text element. The alignment, the text revisions, the logical-word rule, the shared revision of a word split across runs, the custody markers and the refusals are unchanged. One visible difference besides the runs: a formatting change of a run is one w:rPrChange per unchanged stretch, as at run granularity, instead of one per word (v0.16.4) or per character (v0.17.0). The space-flag control of compare_producer_noise pinned the one-run space of the old shape. It now checks the same fact on the stretch that ends with the space. Part of tensorbee#446. Tests, issue446_* in regression_test.rs state the shape as invariants in the body, a table cell, an inline control, a hyperlink, a header and a footnote (one text element a run, no added run that repeats the properties of the sibling it follows, run count bounded by the revisions, run count and added size independent of the unchanged text), two unit tests in comparison.rs, test_issue446_* in test_core.py Harness, unchanged, the samples make no comparison
…candidate once A comparison became slower in v0.17.0 at every granularity, the default run granularity included (about 4 times on the documents of issue 446, with the same output), and quadratic in the children of one paragraph or table. Four causes, none of them in the alignment: - The source guard of F-X272 (af99e9d) read a parent from its start once per child. RunSource::capture did it for each run of a paragraph, publication_parent_at and source_child for each row of a table, cell of a row, child of a cell or a control and inline control of a paragraph, in the five source snapshots of a comparison and again in the compare and mark paths (compare_table, compare_row, compare_cell_from_xml, compare_granular_controls, compare_complex_paragraph, paragraph_children_xml, marked rows and cells, and the parent of each written piece in compare_granular_paragraph). capture_all, publication_parents_at and source_children read a parent once for all its children. Each answer, an error included, is the one a read for that child alone gives, and each is taken where that read was made, so the errors keep their order. ParentScopes reads the scopes a paragraph path may ask on its first question. - Each postcondition direction resolved the candidate twice, once for the package guard and once more inside verify_footnote_destination (F-X272a, 1c69b7e). resolved_candidate resolves it once and both checks read it. - The postcondition signature of an ordinary part is taken at character granularity so that run splits do not change it (F-X279b, 2d38731). It built one unit, one copy of the run properties and one token per character of all four documents. A run with no raw child and no deleted text is now read one stretch at a time, and consecutive plain characters are one token, in paragraphs and in the direct runs of a control. Two signatures read equal exactly when their character tokens did. - A paragraph snapshot computed its run spans twice. It computes them once. The package guard still reads each cleaned story a second time, as v0.17.0 does. That read refuses a drawing that shares its run with the begin mark of a complex field, whatever else changes ("comparison could not correlate split field run 2"), and a test pins that refusal: a speed change must not change which inputs a guard refuses. compare() CPU time, median of 5 runs alternated between builds, release wheels (0.16.4 and v0.17.0 from PyPI with fat LTO, this branch with LTO off and 16 codegen units, which favours the older wheels), measured on the final tree of this series: case granularity 0.16.4 v0.17.0 branch issue 446, 200 changed run 0.11 s 0.44 s 0.31 s issue 446, 200 changed word 0.64 s 6.65 s 0.45 s issue 446, 200 changed character 1.74 s 6.95 s 0.76 s issue 446, 400 changed run 0.21 s 0.89 s 0.62 s issue 446, 400 changed word 1.38 s 14.40 s 0.94 s 1000 paragraphs, 100 chg. run 0.33 s 1.14 s 0.81 s 1000 paragraphs, 100 chg. word 0.73 s 4.33 s 0.94 s 1000 paragraphs, 100 chg. character 1.57 s 4.62 s 1.01 s one paragraph of 400 runs run 0.06 s 0.53 s 0.12 s one paragraph of 400 runs word 0.09 s 9.29 s 0.15 s table of 100 rows run 0.21 s 1.74 s 0.88 s table of 100 rows word 0.33 s 2.34 s 0.95 s Growth for 4 times the rows of a table is 4.2 (0.16.4 4.2, v0.17.0 6.9) and for 4 times the runs of one paragraph 4.4 at run and 4.6 at word granularity (v0.17.0 13.2 at run). Run granularity stays 2.5 to 3 times 0.16.4 on paragraphs and 4.2 on a table. Restoring the guard's second read accounts for part of it. A release profile of the issue 446 script at run granularity (400 paragraphs) attributes 24 percent of a comparison to the footnote custody validation in a document with no note, 18.5 percent to canonicalize_drawing_ids in a document with no drawing, 19 percent to the package guard and 15 percent to compare_body. Checked on the final tree of this series against the v0.17.0 release wheel, with a debug build and every debug oracle on. The 1,080 cases of a refusal map around revisions, notes, comments, moves, controls, fields and bookmarks give the same refusals and messages and leave refused inputs intact. 792 guard cases give the same refusals, messages and run-granularity bytes. 500 random pairs give the same accepted and rejected text and formatting, and the same insertions, deletions and run bytes except 3 pure resplits inside an inline control, which a later commit of this series compares as equal. Part of tensorbee#446. Tests, comparison.rs units compare the one-read answers with lone reads, errors included, check the stretch tokens, and count the source bytes a comparison reads for few and many runs, rows, hyperlink runs and inserted paragraphs and tables at the three granularities, issue446_comparison_keeps_refusing_a_drawing_in_a_field_begin_run in regression_test.rs, no timing threshold Harness, unchanged, the samples make no comparison
A word or character comparison of a changed paragraph whose w:t holds a reference refused with "split text has opaque mixed events", in the body and in every related story. That covers &, <, > and ", which rdocx writes itself on save, and numeric references such as &tensorbee#233;: saving and reopening "Smith & Sons pay now." and comparing it with "... later." refused. 0.16.4 compared it. source_text_fragment (F-X272, af99e9d) checks that the source of a split text is one element holding text, and took exactly one text event. The XML reader reports a reference as an event of its own between two pieces of text. Any number of text and reference events now pass at the text's depth. A nested element, CDATA, a comment or a processing instruction still refuses. The value written comes from the parsed model and is escaped again on output, as before. Part of tensorbee#446. Tests, issue446_comparison_splits_text_that_holds_references in regression_test.rs, with the reference in the changed token, at word and character granularity, in the body and a header, accepted and rejected back to each input Harness, unchanged, the samples make no comparison
A paragraph whose runs only split the same text differently compares equal since v0.17.0 (F-X279b). An inline content control did not: its runs were aligned one by one, so one run against three with the same text and formatting gave 4 revisions at run granularity, as in 0.16.4. A word redline of one sentence inside a control, accepted or rejected and compared again with its input, gave 25 revisions at word granularity and 70 at character granularity on 0.16.4 and v0.17.0, and 4 and 8 before this commit. It now gives none. When every child of both controls is a run and the runs differ, compare_control_from_xml now reads them with the equality the paragraph path trusts, coalesced_paragraphs_equal, and keeps the original source when they are equal. It does not apply under leaf capture, to a control holding a raw child or a revision, or to runs holding a field, whose source facts it cannot read from copies, which keep the path below. Part of tensorbee#446. Tests, issue446_comparison_reads_a_resplit_inline_control_as_equal in regression_test.rs at the three granularities, with a real change kept as a revision Harness, unchanged, the samples make no comparison
The rdocx archive grows with the issue 446 comparison changes and their tests, on main eb980e9. It is the only crate whose member bytes change. It was measured on 2026-11-16, which its row and the remeasurement date now record. Tests, scripts/readme_doctests.py build_package_archive and archive_measurement for rdocx, member bytes stable on a second pass Harness, unchanged, measurements only
… mark Microsoft Word for Mac 16.115 drops a zero-width bookmark pair that precedes the reference mark of a footnote that is not the first of its part, and keeps one that follows it (observed on every such save of the issue 430 shapes, again on a second save of the same file, and kept in 8 of 8 shapes once moved after the mark). A compare result whose note pair Word dropped can no longer prove its note owner, so later resolutions of that note refuse or lose its custody. The note pair now follows the reference-mark run inside the note's content insertion or deletion. A note without a reference-mark run keeps the earlier position, the start of its insertion or the paragraph boundary outside its deletion. Recognition is unchanged: it already admits a note pair as a direct child of the one wrapper that holds the note content. Part of tensorbee#430 (F-X287). Tests, issue430_custody_note_pair_follows_the_note_reference_mark checks the emitted position in both directions with and without a reference mark, issue430_word_saved_note_pair_after_the_reference_mark_resolves_and_compares runs a Word-saved result through every choice and an unrelated comparison Harness, unchanged, the samples make no comparison
…eference's insertion Word for Mac 16.115 merges adjacent insertions of one author and date. When a comparison adds a paragraph with a new footnote, the paragraph's text insertion and the reference insertion meet around the body custody pair, and the saved file has the pair inside the merged insertion, right before the reference run (the issue's own "a footnote added" case). note_markers refused every body pair inside a revision, so Accept All, Reject All, selective resolution and an unrelated comparison all refused with "body custody pair is inside a revision". A body pair is now also admitted as a direct child of the one insertion of a main-story paragraph whose next child is the reference run, and only when its note pair is present. That is the same proof as at the direct position: the next sibling names the reference, and the note pair binds the owner, which must agree. The insertion is the reference's own revision element, so it resolves with the unit. Everything else inside a revision still refuses, atomically: an unmatched pair (no note pair), a pair inside a deletion (Word was not observed to put one there), a pair folded into a preceding insertion or placed before another run, a pair in a move destination, and a pair nested one level deeper. An insertion whose content a resolution removes now keeps such a pair in its place instead of dropping it with the content. When another unit is still pending, the pair stays a tombstone and its part-presence bits still vote, so the lifetime does not depend on Word's merging. Word's own Reject All also keeps the pair. Part of tensorbee#430 (F-X287). Tests, issue430_word_saved_body_pair_in_its_reference_insertion_resolves_and_compares on the Word-saved bytes through every choice, an unrelated comparison and a partial id, issue430_body_pair_in_any_other_revision_position_still_refuses for six positions (the deletion, the unmatched pair and the nested pair among them) and three operations, atomic, issue430_body_pair_lifted_out_of_a_rejected_insertion_keeps_its_vote for both author orders and choices with reopens, which fails without the lift-out (the created part would survive) Harness, unchanged, the samples make no comparison
…les the note part When Word drops a note custody pair, its body pair is left without a note counterpart. Q-A430-29 keeps such a pair unassociated, so no unit is recognized and settle_footnote_custody returned early: accepting the whole Word-saved comparison left the hidden body bookmark behind, while a library-only result settles with no marker at all. A resolution that edits the note part or resolves a note reference, and leaves no revision in a normal note owner or a note reference, now settles the part even when no unit is recognized, and retires the pairs left in it, at the same point as any settlement. Resolving the reference alone counts, so the pair also retires when the note side settled first, in an earlier call or in Word. Whether a reference was resolved is read from the render that resolved it, only when the document holds custody pairs. A pair in a part that the resolution leaves untouched stays, as before, and while any note revision is pending every pair stays. This matches the contract for markers Word leaves in a completed part: kept while untouched, retired once the library edits that part. Part of tensorbee#430 (F-X287). Tests, issue430_word_saved_unmatched_body_pair_retires_when_its_part_settles on Word-saved bytes, with Word for Mac 16.115's own Accept All output as the untouched and the edited-part controls, issue430_settling_only_the_reference_retires_the_leftover_body_pair (the note side settled first by id, or already settled as Word leaves it, both choices), issue430_word_saved_mixed_authors_keep_pairs_until_the_last_note_settles for both author orders with reopens, test_issue430_word_saved_merged_body_pair_and_lost_note_pair_settle in test_core.py for the merged body pair (part B) and the leftover pair through the binding Harness, unchanged, the samples make no comparison
Footnote comparison pairs the owners of both inputs by note id. When the edited input inserts a note before an existing one, as Word and the add_footnote producer number notes, the new note takes the existing note's id and the existing note moves to the next id. The comparison then paired two different notes as one text change, deleted the original reference and inserted the edited one, both naming the same owner. The pending result held two physical references to one note, the shared-reference shape of Q-A430-28. Accept and reject still gave the edited and original notes, but Word for Mac 16.115 could not open the pending file (review A, the "a new note before an existing one" result, the same on v0.17.0). A footnote that both inputs reference now refuses atomically, before any note custody is written, when the pending result would give it more physical references than either input does. That is the "refuse a moved reference" rule of the note contract. Producing a pending result for this edit instead would need note ids that differ from one destination, which the exact-identity contract does not allow. Part of tensorbee#430. Tests, issue430_comparison_refuses_a_note_reference_that_moves_to_another_site (the refusal, atomic, and the same edit with the new note after the existing one still compares to both exact destinations) Harness, unchanged, the samples make no comparison
…d dropped A comparison that Word for Mac 16.115 saved before the note pair moved after the reference mark has lost its note pair for good: the RC3 packets of F-X287 are such files. Q-A430-29 forbids recovering the owner from the remaining body pair, so the note resolved as ordinary revisions. Rejecting an added note, or accepting a removed one, then had to remove the note's only paragraph mark and refused with "cannot remove the final paragraph mark". With another author pending, resolving the first author could also retire every custody pair while the second author's revisions stayed pending, because only marked units counted as pending. A tracked-note unit is a normal owner that no pair binds and whose own bytes prove that the whole definition is tracked as one insertion or one deletion: every paragraph carries a paragraph-mark revision of that kind, every other paragraph child is a wrapper of that kind or a zero-width range marker, and its one reference, bound by footnote id, is wrapped the same way. The proof reads no marker and no adjacent element, so an unmatched body pair stays unassociated. An unmatched body pair inside its reference's insertion is admitted only when that reference's note is a tracked note, and only keeps its place there. A selection of all its elements resolves it as one: the owner goes before rendering when the resolution removes its content. A partial selection keeps the ordinary element rules. A whole selection of an unreferenced tracked note removes it. An owner with two or more references keeps the shared-reference rules (Q-A430-28). A tracked note has no token or bits and does not vote on part presence, but it is pending for the open lifetime, so pairs stay while it is pending and retire at the last settlement. When a tracked note settles while a note owner outside every unit still holds a revision (a note with a hyperlink, say), the pairs stay too, as on v0.17.0. A comparison on top keeps an earlier author's unmatched body pair instead of retiring it at entry. The proof uses the note tree and the reference inventory that validate_footnote_custody already reads. Each reference site now carries its wrapper's revision, which also drops the per-site reparse of the reference story in the marked-unit check. Settlement reads the reference inventory only when it removes an owner, and does not read the note part again when it removes nothing and either a unit is still pending or no marked unit settles. Retirement returns at once when no unit carries a token, and projection returns before reading markers when no marked unit is retained or projected. Reverting this commit brings back, for files whose note pair Word already dropped and for hand-built wholly tracked notes: the refusals when rejecting a tracked note in a mixed save (review scenarios L1.2 and L1.4) or without any comparison (C2), and when removing an unreferenced tracked note (C3), and the first-author marker loss on the mixed shape with one pair kept and one lost. Its archive row must then be re-recorded. Part of tensorbee#430 (F-X287). This needs the maintainer's decision D1. Tests, issue430_word_saved_lost_note_pair_resolves_as_a_tracked_note on four Word-saved shapes (added note, added note with text and a new paragraph, merged body pair, removed note) through every choice and an unrelated comparison, issue430_word_saved_mixed_authors_resolve_in_both_orders_and_choices for both author orders, both choices and reopens, with both note pairs lost and with one kept, issue430_word_saved_mixed_note_outside_the_grammar_keeps_both_pairs (from review B: a mixed note with a hyperlink keeps both pairs, either author first, either choice), issue430_comparison_over_a_word_saved_tracked_note_keeps_both_lifetimes (a comparison that adds custody over a pending tracked note), issue430_word_saved_created_part_with_a_lost_note_pair_settles_to_its_destination (the discriminator: a part created with two notes rejected in either order ends absent, and without any pair a separator-only part stays), issue430_tracked_note_needs_its_whole_owner_and_its_only_reference_tracked_one_way (four shapes that keep the old refusal atomically, and both partial selections), test_issue430_word_saved_lost_note_pairs_resolve_in_both_author_orders in test_core.py Harness, unchanged, the samples make no comparison
The rdocx archive grows with the issue 430 custody changes and their tests, on tensorbee#450 (d3c5dc4). It is the only crate whose member bytes change. Its measurement date moves to the day of this measurement. Tests, scripts/readme_doctests.py build_package_archive and archive_measurement for rdocx, member bytes stable on a second pass Harness, unchanged, measurements only
hadim
marked this pull request as ready for review
November 16, 2026 21:02
This branch has not been deployed
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.
Part of #430. Stacked on #450.
What F-X287 asks
docs/hld/14-development-backlog.md(F-X287, "Repair note comparison after Word-save normalization"):This PR does that on reconstructed Word saves, in five code commits. The last one, part C, needs your decision D1, and it can be reverted alone.
Decisions for you
D1, the tracked-note unit (commit 5). A normal footnote that no custody pair binds is resolved as one unit when its own bytes prove that its whole definition is tracked as one insertion or one deletion (paragraph marks included), and its only reference is wrapped the same way.
w:footnoteReference/@w:idtow:footnote/@w:id. It never reads a marker or an adjacent element, so under Q-A430-29 an unmatched body pair stays unassociated.01bit can then make a reject remove a part that held only separators. This extends the limit you accepted under Q-A430-29 to markerless units.body custody pair is inside a revisionon Accept All and Reject All for the issue's "a footnote added" save whose body pair Word merged and whose note pair it dropped, the RC3 middle symptom, because commit 2 admits a merged pair only with its note pair (run on commit 4,inputs/word/added_para.docx). Commit 5's message omits this one.D2, partial selection of a tracked note. A partial selection keeps the ordinary element rules: what succeeds today still succeeds, and what refuses at the final paragraph mark still refuses. The alternative is the marked-unit rule, where a partial selection refuses atomically.
C3, removing an unreferenced tracked note. A whole selection of the elements of a tracked note with no reference left removes it. The alternative keeps today's refusal.
Not covered, a choice for you. A footnote that a person inserts in Word 16.115 with Track Changes on is not a tracked note: Word tracks its reference and content but not its paragraph mark.
reject_allleaves an empty unreferenced footnote where Word's own Reject All removes the note (tc_base_word_reject.docx). This is the same on v0.17.0, so it is not a regression.w:footnoteRefrun rather than on tracked paragraph marks, which would cover that case. This PR does not do it.Item 5, the moved reference (commit 4). The fix is a refusal, see below, and it narrows comparison. Of eight note drafts checked, two now refuse (a new note inserted before an existing one, and two notes that swap places), and so does a footnoted sentence moved to another paragraph with its id unchanged. All three compared on #450 to correct destinations inside the library, with a pending file holding one note from a deleted and an inserted reference. Word 16.115 could not open the pending result of the first. The other two were not opened in Word, by rule. A pending result with unique ids for these edits would need note ids that differ from one destination, which the exact-identity contract does not allow. Your options: keep the refusal, relax exact identities, or drop commit 4.
The parts
Where the Word observations come from.
open,save as,close.1. Note pair after the note reference mark (commit 1, D4)
Cause. Word 16.115 drops a zero-width bookmark pair that sits before the
w:footnoteRefrun of a footnote that is not the first of its part.Fix.
insert_note_markerplaces the note pair after the first reference-mark run of the content wrapper: inside thew:insfor an addition, inside thew:delfor a deletion.Re-check. With a build of commits 1 to 3 before the rebase onto #450, Word 16.115 kept every note pair on 9 of 9 shapes, including those that lost it before. An independent check confirmed it on 6 more shapes, against 6 of 6 dropped with the v0.17.0 placement. Word was not opened again after the rebase.
2. Body pair inside its reference's own insertion (commit 2)
Cause. Word 16.115 merges adjacent insertions of one author and date.
<w:ins><w:r>text</w:r><B/><w:r>reference</w:r></w:ins>.note_markersrefused every body pair inside a revision, so Accept All, Reject All, per author and an unrelated comparison all refused withbody custody pair is inside a revision, the RC3 middle symptom.Fix, admission. A body pair is also admitted as a direct child of the one
w:insof a main-story paragraph whose next child is the reference run, and only when its note pair is present.w:del(Word was never observed to put one there), a pair folded into a preceding insertion or placed before another run, a pair in a move destination, and a pair nested deeper.Fix, lift-out. An insertion whose content a resolution removes keeps such a pair in its place (
RenderState::custody_pairs, emitted inrender_selected_revision). When another unit is pending, the pair stays a tombstone and keeps its part-presence vote. Word's own Reject All also keeps it.3. Leftover pairs retire when a resolution settles the note part (commit 3, D3)
Cause. With a note pair gone, no unit is recognised and
settle_footnote_custodyreturned early. Accepting a Word-saved result left the hidden body bookmark behind, while a library-only result settles with no marker.Fix. A resolution that edits the note part or resolves a note reference, and leaves no revision in a normal note owner or note reference, now settles the part even when no unit is recognised, and retires the pairs in it.
4. A note reference that moves to another site refuses (commit 4)
Cause. Footnote comparison pairs owners by note id. A new note inserted before an existing one (the same on v0.17.0) is an edited input whose new first note takes id 2 while the existing note moves to id 3.
w:del(the original site) and one in aw:ins(the new site): the shared-reference shape of Q-A430-28.Fix. A footnote that both inputs reference refuses atomically, before any note custody is written, when the pending result would give it more physical references than either input does. This is the note contract's "refuse a moved reference". The same edit with the new note after the existing one still compares.
5. Tracked-note unit (commit 5, needs D1)
Cause. With the note pair lost, rejecting an added note or accepting a removed one ran as ordinary revisions. That had to remove the note's only paragraph mark, so it refused with
cannot remove the final paragraph mark, the RC3 mixed symptom. With a second author pending, resolving the first author could also retire every custody pair, because only marked units counted as pending.Fix, the proof (
tracked_note_units,tracked_note_owner). A normal owner with no bound pair is a unit when:bookmarkStart,bookmarkEndorproofErrFix, resolution.
Fix, lifetime.
FootnoteCustody::tokenbecomesOption<i32>, and reconciliation, projection and retirement use marked units only.Residual limits, unchanged from v0.17.0.
Why no guard is weaker
w:pw:insin the main story, and, with commit 5, an unmatched pair before a tracked note's reference. The resolver never drops such a pairBehaviour changes
w:del. Results written by 0.17.0 keep being recognised._rdocxCmpNoteF...Bbookmark. A pair left in a part retires when a resolution edits that part or resolves a note reference and leaves no note revision pending.F-X287 items, met and open
issue430_word_saved_body_pair_in_its_reference_insertion_resolves_and_compares,issue430_word_saved_lost_note_pair_resolves_as_a_tracked_note.issue430_word_saved_mixed_authors_resolve_in_both_orders_and_choices,issue430_word_saved_mixed_note_outside_the_grammar_keeps_both_pairs,issue430_comparison_over_a_word_saved_tracked_note_keeps_both_lifetimes,issue430_body_pair_lifted_out_of_a_rejected_insertion_keeps_its_vote. An independent review ran 1,004 Word-saved sequences, each reaching the library's own destination, on the branch before its last fix pass.issue430_word_saved_created_part_with_a_lost_note_pair_settles_to_its_destination(part presence of a created part) and the lift-out vote test.What needs your RC3 packets
These were built on this machine, not taken from the RC3 packets (
.claude/scratch/S96-final-evidence/.../native-middle-rc3-runtime-probe-1,native-mixed-rc3-runtime-probe-1):They reproduce the three recorded symptoms. Qualification as F-X287 defines it still needs your packets.
Left to you:
docs/hld/12-testing-strategy.mdline 5 and the sprint documents (docs/sprints/BACKLOG.md,CURRENT_SPRINT.md,SPRINT_PLAN.md,SPRINT_TRACKER.md,AS_BUILT.md), which still describe the carried gap. This PR changes only03-architecture.mdand10-bindings-spec.md.Custody reads (measured)
Counted with a debug-only parse counter on the CI-style debug build. Each row counts XML parses (
XmlTree::parse) per phase, base #450 (d3c5dc4e7) against this branch.For scale, an earlier
sampleprofile of a note-free run-granularity comparison put all custody validation at 6.8% to 13.9% ofcompare.Gates
Run on the final tree (
3513f67c2, on top of #450 atd3c5dc4e7), macOS arm64, Rust 1.97.1. Other branches ran full suites on the same machine before and between, so durations are not meaningful.cargo fmt --all --check: pass.cargo clippy --workspace --all-targets --all-features -- -D warnings: pass, exit 0.python3 scripts/prose_check.py: 0 violations.python3 scripts/sync_agent_skills.py --check: 26 skills in sync.python3 scripts/hash_harness.py --check: 49 entries match (the samples make no comparison).python3 scripts/readme_doctests.py: pass, with the re-recorded rdocx archive row (4,531,634 compressed bytes, 56,539,892 member bytes, 37 members, measured 2026-11-16).cargo build -p rdocx-cli: pass.cargo test -p rdocx --no-fail-fast(Poppler from pixi):large_word_and_presentation_pdfs_preserve_logical_reading_order,word_and_powerpoint_chart_pixels_are_identical(at the rasterizer version assert),fx195_variable_svg_paint_matches_independent_static_instances.odt_reader_matches_pinned_libreoffice_structure,public_authored_theme_and_fonts_match_pinned_word_resolution,sanitized_public_authoring_fixture_passes_every_conformance_stage,section_page_semantics_match_pinned_libreoffice_render,every_conditional_table_region_matches_word.test_issue_253_pdf_text_view,test_colour_inputs_and_nested_font_formats_reach_actual_rendering,test_fx200_python_style_saved_output_paints_exact_expected_colours_with_deterministic_native_cli, and the 58 tests oftest_rendering_threads.py(theF_X195_*inputs that CI prepares in a step not run here, and the Poppler 26.01 pin with 26.10.0 installed).mypy --strictontyping_smoke.pyand the package, no issues in 9 source files.mypy.stubtest rdocx, no issues in 8 modules.issue43*integration tests and scoped clippy pass at each code commit, theissue43*lib tests at commits 2, 3 and 5, theissue4*regression tests at commit 5, and theissue430Python tests at commits 3 and 5.Tests
Inline Word 16.115 bytes from the saves above, with rsid and
w14paragraph identities removed. Each fixture comment names the Word version and what was done. The fixture ofissue430_body_pair_lifted_out_of_a_rejected_insertion_keeps_its_voteis hand-built from two observed Word shapes, and says so.issue430_custody_note_pair_follows_the_note_reference_mark,issue430_word_saved_note_pair_after_the_reference_mark_resolves_and_compares.issue430_word_saved_body_pair_in_its_reference_insertion_resolves_and_comparesissue430_body_pair_in_any_other_revision_position_still_refuses: six positions (the deletion, the unmatched pair and the nested pair among them) x three operations, atomicissue430_body_pair_lifted_out_of_a_rejected_insertion_keeps_its_vote: both orders, both choices, reopens. It fails without the lift-out.issue430_word_saved_unmatched_body_pair_retires_when_its_part_settles,issue430_settling_only_the_reference_retires_the_leftover_body_pair,issue430_word_saved_mixed_authors_keep_pairs_until_the_last_note_settles, and the Python testtest_issue430_word_saved_merged_body_pair_and_lost_note_pair_settle.issue430_comparison_refuses_a_note_reference_that_moves_to_another_site(the refusal, atomic, and the control that still compares).issue430_word_saved_lost_note_pair_resolves_as_a_tracked_note: 4 shapes, every choice, unrelated comparisonissue430_word_saved_mixed_authors_resolve_in_both_orders_and_choices: both pairs lost, and one keptissue430_word_saved_mixed_note_outside_the_grammar_keeps_both_pairs: a mixed note outside the grammar, which fails without the fixissue430_comparison_over_a_word_saved_tracked_note_keeps_both_lifetimesissue430_word_saved_created_part_with_a_lost_note_pair_settles_to_its_destination: the discriminatorissue430_tracked_note_needs_its_whole_owner_and_its_only_reference_tracked_one_way: 4 shapes that keep the old refusal atomically, plus both partial selectionstest_issue430_word_saved_lost_note_pairs_resolve_in_both_author_orders.