Skip to content

test: add revision projection and accept/reject corpus fixtures - #140

Merged
Git-Uzair merged 1 commit into
dealfluence:mainfrom
Dmitry-Kov:fixtures/agent-revision-projections
Sep 10, 2026
Merged

test: add revision projection and accept/reject corpus fixtures#140
Git-Uzair merged 1 commit into
dealfluence:mainfrom
Dmitry-Kov:fixtures/agent-revision-projections

Conversation

@Dmitry-Kov

Copy link
Copy Markdown
Contributor

Adds two read-only revision-projection scenarios and two accept/reject scenarios from the synthetic ooxml-integrity corpus for #137. 08_agent_nested_revisions is the key case: its input is the only one of the four reviewed candidates containing nested w:ins > w:del, covering the nested-revision case promised in that discussion. 09_agent_rewrite_revisions adds 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.

Scenario Input coverage
08_agent_nested_revisions t1_bare: 5 insertion elements, 2 deletion elements, including one deletion nested inside an insertion.
09_agent_rewrite_revisions t5_rewrite_pres: 5 insertion elements and 4 deletion elements, covering multi-author rewrites and earlier pending revisions.
10_agent_counsel_accept_reject t2_bare: accepts A. Counsel's professional-indemnity insertion Chg:101; rejects the annual-fee replacement EUR 40,000 → EUR 44,500 via deletion Chg:102, paired with insertion Chg:103. The original fee is restored and no pending revisions remain.
11_agent_table_accept_reject t2_pres: accepts the Discovery-fee replacement EUR 12,000 → EUR 14,000 via insertion Chg:202, paired with deletion Chg:201; rejects the Delivery-date replacement 2026-12-01 → 2027-01-15 via deletion Chg:203, paired with insertion Chg:204. Keeps the inserted row Chg:205 and earlier A. Counsel revisions pending.

The accept/reject IDs above were verified with adeu extract on 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 06 and 07 create a targeted WEBINPUTWEBSAVED replacement 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 upstream 07 through 0811.

Each folder contains only input.docx, a UTF-8 test.json without a BOM and two Markdown goldens. Scenarios 08/09 use read_only: true; 10/11 include their accept/reject actions and golden_abstract.xml. All ten goldens were regenerated with the unchanged upstream python/scripts/generate_goldens.py using 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.docx is 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 Application value is corpus-builder; it does not establish an editor or model version.

Three fixture copies cosmetically rename the revision author Claude to Agent to remove a model vendor name from another project's test suite; t2_bare requires no transformation. Only that attribute value in word/document.xml changes in the transformed copies. Revision structure, the authors A. Counsel and M. Reviewer, comments, footnotes, tables, header/footer and the placeholder image are untouched. The original runs/* experimental records in ooxml-integrity remain unchanged.

The exact transformations, also recorded in each test.json, are:

  • Copied from Dmitry-Kov/ooxml-integrity@e07ee5cdb1993786aff293e7799e62d32c2f04bd, runs/t1_bare/agreement.docx (SHA-256 45e7577092fb7ef730cb1cf2feae5f8f4c047f5db637fe437e636ace89d055e4), then w:author="Claude" was replaced with w:author="Agent" in word/document.xml (4 occurrences). Result SHA-256: aea576d0c6df3fda5aabd55a6b8507a171593fa44db2d69b8184de1954a1105d.
  • Copied from the same pinned corpus, runs/t5_rewrite_pres/agreement.docx (SHA-256 cda096d9efad4fbacc7d3fe43d93ea1b641236de12c2692a0aeeee4ac15ca240), then the same attribute value was replaced in word/document.xml (6 occurrences). Result SHA-256: 239bb9e0ce5629904bfc9ac2f13910ecf2bff07d3d179c439d530ae3cfb791ab.
  • Copied from the same pinned corpus, runs/t2_bare/agreement.docx (SHA-256 08dfdb78f9093526e2021376be992019935a0cb3cfee401505a8464754de6b9a). t2_bare is unmodified from the corpus, including the original ZIP bytes. Result SHA-256: 08dfdb78f9093526e2021376be992019935a0cb3cfee401505a8464754de6b9a.
  • Copied from the same pinned corpus, runs/t2_pres/agreement.docx (SHA-256 3e86542ed700ae7a7826902da185e0280ab8eab0570f60d9297fcbd23af9e330), then w:author="Claude" was replaced with w:author="Agent" in word/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_bare retains 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. Reviewer and Agent, with comment initials AC/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:

  • Python full suite: 1993 passed, 128 skipped.
  • TypeScript core: 1062 passed, 32 skipped; MCP server: 327 passed; n8n: 51 passed.
  • Both engines passed all 11 shared consistency scenarios (seven existing and these four additions), including both accept/reject XML comparisons and the raw/clean Markdown goldens.
  • All Node workspaces built; workspace lint, Ruff, format check and mypy passed.

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.

@Git-Uzair
Git-Uzair merged commit 0374c2e into dealfluence:main Sep 10, 2026
8 checks passed
@Git-Uzair

Copy link
Copy Markdown
Collaborator

Thank you @Dmitry-Kov . Merged!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants