test: add revision projection and accept/reject corpus fixtures - #140
Merged
Git-Uzair merged 1 commit intoSep 10, 2026
Merged
Conversation
Collaborator
|
Thank you @Dmitry-Kov . Merged! |
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.
Adds two read-only revision-projection scenarios and two accept/reject scenarios from the synthetic ooxml-integrity corpus for #137.
08_agent_nested_revisionsis the key case: its input is the only one of the four reviewed candidates containing nestedw:ins > w:del, covering the nested-revision case promised in that discussion.09_agent_rewrite_revisionsadds paragraph rewrites layered alongside earlier pending revisions by another author. The two accept/reject scenarios resolve selected existing revisions while preserving the rest of each document.08_agent_nested_revisionst1_bare: 5 insertion elements, 2 deletion elements, including one deletion nested inside an insertion.09_agent_rewrite_revisionst5_rewrite_pres: 5 insertion elements and 4 deletion elements, covering multi-author rewrites and earlier pending revisions.10_agent_counsel_accept_rejectt2_bare: accepts A. Counsel's professional-indemnity insertionChg:101; rejects the annual-fee replacement EUR 40,000 → EUR 44,500 via deletionChg:102, paired with insertionChg:103. The original fee is restored and no pending revisions remain.11_agent_table_accept_rejectt2_pres: accepts the Discovery-fee replacement EUR 12,000 → EUR 14,000 via insertionChg:202, paired with deletionChg:201; rejects the Delivery-date replacement 2026-12-01 → 2027-01-15 via deletionChg:203, paired with insertionChg:204. Keeps the inserted rowChg:205and earlier A. Counsel revisions pending.The accept/reject IDs above were verified with
adeu extracton the exact input files. All four inputs carry two comments and two footnote references each, which are retained. These scenarios exercise existing revisions alongside comments, footnotes, tables, header/footer text, a content control, a hyperlink and the placeholder image, extending the comment-projection coverage in #138.Upstream scenarios
06and07create a targetedWEBINPUT→WEBSAVEDreplacement in inputs without pending revisions. These four inputs are different and already contain revisions, so they cover projection and selective resolution rather than repeating that edit operation. Numbering continues from upstream07through08–11.Each folder contains only
input.docx, a UTF-8test.jsonwithout a BOM and two Markdown goldens. Scenarios08/09useread_only: true;10/11include their accept/reject actions andgolden_abstract.xml. All ten goldens were regenerated with the unchanged upstreampython/scripts/generate_goldens.pyusing Adeu 3.0.4. They reproduce the previous golden bytes exactly. Existing fixtures, Adeu source, other tests, CI configuration and docs are unchanged;shared/fixtures/base.docxis not added again.The namespace comparison is fixed upstream in #139, and the accept/reject scenarios are included at the maintainer's request.
Thanks, @Git-Uzair, for the quick fix for #139!
Provenance and cosmetic author rename
Source: Dmitry-Kov/ooxml-integrity at e07ee5cdb1993786aff293e7799e62d32c2f04bd, MIT. The editor/model version of these agent runs was not recorded. Their package
Applicationvalue iscorpus-builder; it does not establish an editor or model version.Three fixture copies cosmetically rename the revision author
ClaudetoAgentto remove a model vendor name from another project's test suite;t2_barerequires no transformation. Only that attribute value inword/document.xmlchanges in the transformed copies. Revision structure, the authorsA. CounselandM. Reviewer, comments, footnotes, tables, header/footer and the placeholder image are untouched. The originalruns/*experimental records in ooxml-integrity remain unchanged.The exact transformations, also recorded in each
test.json, are:Dmitry-Kov/ooxml-integrity@e07ee5cdb1993786aff293e7799e62d32c2f04bd,runs/t1_bare/agreement.docx(SHA-25645e7577092fb7ef730cb1cf2feae5f8f4c047f5db637fe437e636ace89d055e4), thenw:author="Claude"was replaced withw:author="Agent"inword/document.xml(4 occurrences). Result SHA-256:aea576d0c6df3fda5aabd55a6b8507a171593fa44db2d69b8184de1954a1105d.runs/t5_rewrite_pres/agreement.docx(SHA-256cda096d9efad4fbacc7d3fe43d93ea1b641236de12c2692a0aeeee4ac15ca240), then the same attribute value was replaced inword/document.xml(6 occurrences). Result SHA-256:239bb9e0ce5629904bfc9ac2f13910ecf2bff07d3d179c439d530ae3cfb791ab.runs/t2_bare/agreement.docx(SHA-25608dfdb78f9093526e2021376be992019935a0cb3cfee401505a8464754de6b9a).t2_bareis unmodified from the corpus, including the original ZIP bytes. Result SHA-256:08dfdb78f9093526e2021376be992019935a0cb3cfee401505a8464754de6b9a.runs/t2_pres/agreement.docx(SHA-2563e86542ed700ae7a7826902da185e0280ab8eab0570f60d9297fcbd23af9e330), thenw:author="Claude"was replaced withw:author="Agent"inword/document.xml(11 occurrences). Result SHA-256:8a75fb6e1297a8e9dd5e7d38faa361d17a62340bd608554e2662fb34ac37ad9a.No other package-part content bytes changed; ZIP entry order and metadata were preserved when writing the three transformed packages.
t2_bareretains all original archive bytes. All four inputs retain their individually approved final SHA-256 values.All four reviewed inputs passed ooxml-integrity with zero errors, warnings or informational findings. All package XML/relationships, author and initials attributes, properties, text and binary members were audited. The retained authors are
A. Counsel,M. ReviewerandAgent, with comment initialsAC/MR. The sole binary member is the unchanged 74-byte, 8×8 PNG placeholder without text or EXIF metadata. All four input pages were rendered and inspected, including an additional comments-in-margin view. Exact final hashes were independently reviewed and approved by the contributor.I have redistribution rights for these synthetic documents and license the fixture copies under MIT. They contain no personal data that I do not want public, including author names inside comments or revisions. Source license: MIT, Copyright (c) 2026 Dmitrii Kovalev.
Local validation
Rebased onto upstream v3.0.4, commit 7461e17, after #138 merged. Validated with all four additions, on macOS with Python 3.12.14 and Node 24.19.0:
No local test failures remain. This macOS run does not cover Windows-only live Word COM tests or every Python/Node version in the CI matrix.