fix(mrs): add default per_page=20 to browse_mr_discussions#98
Merged
Conversation
Prevents hanging when fetching large discussion payloads without explicit pagination. Updates tool description to document the default. Closes #97
📊 Test Coverage ReportOverall Coverage: 90.6% Coverage Details
Coverage Report: View detailed coverage report
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a performance issue where browse_mr_discussions could hang for 80+ seconds when fetching large discussion payloads without pagination. The fix adds a default per_page=20 parameter to prevent unbounded responses.
Changes:
- Add default pagination limit to discussion list queries
- Update tool description to document the default behavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/entities/mrs/schema-readonly.ts | Add .default(20) to per_page field and update description to document the default |
| src/entities/mrs/registry.ts | Update tool description to mention the default 20 per page limit for the list action |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
per_page=20tobrowse_mr_discussionslist action to prevent hanging on large discussion payloadsProblem
browse_mr_discussionscould hang for extended periods (80+ seconds observed) when fetching discussions without explicitper_pageparameter, as discussion responses include full diff context, position data, and nested notes.Test plan
Closes #97