test(agents): cover headless save round-trip for comments and tracked changes#647
Open
jacobjove wants to merge 1 commit into
Open
test(agents): cover headless save round-trip for comments and tracked changes#647jacobjove wants to merge 1 commit into
jacobjove wants to merge 1 commit into
Conversation
DocxReviewer's in-memory tests mutate a reviewer but never serialize back, and the MCP integration test stops before toBuffer() — so nothing asserted that a headless edit reaches the saved bytes. Add a round-trip test: parse a clean fixture, add a comment and a tracked insertion, toBuffer(), reload via fromBuffer(), and assert both survive. Exercises the from-scratch comments part (the fixture has none, so the save path must scaffold comments.xml). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the EigenPal Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
All contributors have signed the CLA ✍️ ✅ Posted by the CLA bot. |
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.
What & why
DocxReviewer's existing tests mutate a reviewer in memory but never serialize back, and the MCP integration test explicitly stops beforetoBuffer(). So nothing asserted that a headless edit actually reaches the saved bytes — the save path was only covered transitively.This adds a focused round-trip test for the headless review flow:
styled-content.docx— no pre-existing comments or changes).addComment+proposeInsertion.toBuffer(), then reload viafromBuffer().The from-scratch case is the point: the fixture has no comments part, so the save path has to scaffold
comments.xml+ its content-type/rels rather than patch an existing one. This locks that behavior against regression.Changes
packages/agents/src/__tests__/DocxReviewer.roundtrip.test.ts— new, 4 cases.Verification
bun run typecheckclean;bun test packages/agents/src/→ 245 pass / 0 fail. Test-only — no changeset, no public-API change.Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.