fix: audit MCP tools — bug fixes, new tools, tests & coverage#49
Open
fix: audit MCP tools — bug fixes, new tools, tests & coverage#49
Conversation
- PatchTool: RemoveColumn bounds check + empty runs cleanup after cross-run replace - CommentTools DateTime.TryParse moved to Phase 2 commit (same file) - HistoryTools: auto-save condition fix (3 places) + limit clamped to [1,100] - DocumentTools: force LocalFile source type for local paths in document_save - ElementTools: consistent EscapeJson usage in RemoveTableColumn - ExportTools: PDF temp file leak fix in finally block - QueryTool: [*] wildcard single element now returns pagination envelope - CountTool: throw instead of returning JSON error for missing body - ReadHeadingContentTool: heading_level validated to [1,9] - ConnectionTools: page_size clamped to [1,100] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
document_diff (closes #46): - New DiffTool.cs wrapping existing LCS-based DiffEngine - Compare two WAL positions, or baseline vs current state - SessionManager.GetBytesAtPosition() for read-only doc reconstruction comment_resolve: - Mark comments as resolved/re-opened via OOXML CommentsExPart - CommentHelper: ResolveComment, IsCommentResolved using w15:commentEx - comment_list now includes "resolved" field per comment - WAL replay support (resolve_comment op) Also includes CommentTools DateTime.TryParse fix from audit Phase 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 1 bug fix tests (10, distributed into existing files): - TableModificationTests: 4 tests (RemoveColumn bounds, cross-run cleanup) - QueryPaginationTests: 1 test (wildcard single element envelope) - ReadHeadingContentTests: 3 tests (heading_level validation) - UndoRedoTests: 2 tests (history limit clamping) Phase 3 RevisionTests (20 new tests): - track_changes_enable: enable, disable, idempotent - revision_list: empty, insertions, filter by author/type, pagination - revision_accept/reject: inserted/deleted runs, not found errors - WAL persistence: accept/reject/track_changes survive restart - Undo/Redo: accept undo, reject undo, accept undo redo Also adds coverlet.collector for code coverage support. Total: 456 tests passing (426 existing + 30 new) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
document_diff(closes Feat: build a get diff tool. #46) andcomment_resolvescripts/coverage.shfor .NET (coverlet) and Rust (tarpaulin)Test plan
dotnet test tests/DocxMcp.Tests/)dotnet build)bash scripts/coverage.shto verify coverage reportingCloses #46
🤖 Generated with Claude Code