Fix review feedback MCP tools: SQL bug, ownership, naming, and list tool#742
Merged
Conversation
The McpRequestContext type for listReviewFeedback was missing diffSnapshot, baseRef, resolvedBy, resolvedAt, and updatedAt — fields that listFeedbackItemsForAgent actually returns. Align the type with reality. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Fix ambiguous column reference in resolveReviewFeedbackItem RETURNING clause by qualifying all columns with fi. prefix - Broaden ownership checks to accept assigned_agent_id in addition to agent_id across resolve, thread message, and list queries - Rename dispatch_resolve_review_feedback → dispatch_review_resolve and dispatch_add_review_message → dispatch_review_add_message - Add dispatch_review_list_feedback tool so agents can discover item IDs - Add 15 integration tests covering create, resolve, thread messages, ownership enforcement, and listing - Update notification prompt with new tool names and list-first workflow Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
resolveReviewFeedbackItem— theRETURNINGclause reused unqualified column names (id,status, etc.) that are present on bothreview_feedback_itemsandreviews, causing PostgreSQL to throw "column reference 'id' is ambiguous" on every call. Fixed by inliningfi.-qualified columns.assigned_agent_idin addition toagent_idacross resolve, thread message, and list queries — so an agent assigned to handle a review can actually use the tools.dispatch_review_*prefix for consistency:dispatch_resolve_review_feedback→dispatch_review_resolve,dispatch_add_review_message→dispatch_review_add_message.dispatch_review_list_feedbacktool so agents can discover review feedback item IDs instead of guessing (previously only exposed via REST, not MCP).listReviewFeedback— added missing fields (diffSnapshot,baseRef,resolvedBy,resolvedAt,updatedAt) to match the actual return type.Test plan
pnpm run check— types passpnpm run test— 2236 unit tests pass (125 files)pnpm run test:e2e— 172 e2e tests passapps/server/test/review-feedback.test.ts— 15 tests covering all review feedback operations🤖 Generated with Claude Code