Skip to content

[3597 by Claude Opus 5.5] MCP: invalid cursor returns INTERNAL_ERROR, summaries count the wrong thing, and links.ui points at the API host - #3623

Merged
integry merged 2 commits into
3595-epic-0-9-h9lfrom
3597/claude-opus-5-5-mcp-invalid-cursor-return-20261117-0119-3gq
Nov 17, 2026
Merged

integry merged 2 commits into
3595-epic-0-9-h9lfrom
3597/claude-opus-5-5-mcp-invalid-cursor-return-20261117-0119-3gq

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3597

Branch: 3597/claude-opus-5-5-mcp-invalid-cursor-return-20261117-0119-3gq
Commits: ✅ Changes committed (715ba9b)


AI Processing Completed

Execution Details:

Summary:
That notice was from the watcher on the first test run, which I'd already stopped. Its replacement completed with every file passing, so nothing has changed since my summary above.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (11 files)
    • packages/api/mcp/config.ts (+12/−0)
    • packages/api/mcp/presentation.ts (+37/−25)
    • packages/api/mcp/readSummaries.ts (added, +113/−0)
    • packages/api/mcp/reviewDiscussion.ts (+21/−3)
    • packages/api/mcp/toolExecution.ts (+1/−0)
    • packages/api/mcp/tools.ts (+11/−6)
    • packages/api/mcp/toolsContext.ts (+2/−1)
    • packages/api/mcp/toolsPreviews.ts (+8/−7)
    • packages/api/mcp/toolsPullRequestReadiness.ts (added, +33/−0)
    • packages/api/mcp/toolsPullRequests.ts (+8/−14)
    • packages/api/mcp/toolsRepositoryEvents.ts (+1/−1)
  • Low risk (9 files)
    • docs/mcp-coverage.md (+1/−1)
    • docs/mcp.md (+19/−8)
    • packages/api/test/mcpAgentActivity.test.ts (+7/−4)
    • packages/api/test/mcpPresentation.test.ts (+76/−0)
    • packages/api/test/mcpPullRequestReadiness.test.ts (+14/−2)
    • packages/api/test/mcpPullRequests.test.ts (+34/−0)
    • packages/api/test/mcpRepositoryEvents.test.ts (+5/−2)
    • packages/api/test/mcpVisualPreviews.test.ts (+17/−0)
    • packages/api/test/mcpWorkflows.test.ts (+6/−0)

Validation evidence

  • No repository validation commands ran.

Diff size: 20 files changed, +426/−74 lines

Detailed Logs:

  • Conversation: 280 messages
  • Session: fcbc85b7-5431-49e7-87ca-97529b1f87a4

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3597-2026-11-17T01-49-03-631Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3597-2026-11-17T01-49-03-631Z-output.txt
Latest Conversation Messages
ASSISTANT: I fixed all seven points from #3597. All 55 MCP test files in `packages/api/test` and the admission-routes suite pass, and typecheck and lint are clean. Nothing is visible on screen, so there are no p...

ASSISTANT: [content unavailable]

ASSISTANT: That notice was from the watcher on the first test run, which I'd already stopped. Its replacement completed with every file passing, so nothing has changed since my summary above.


This PR was created automatically by ProPR after processing issue #3597.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…eady stopped. Its replacement completed with every file passing, so nothing has changed since my summary above.
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=6
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 6)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR improves MCP validation errors, read summaries, UI links, and readiness argument compatibility. The supplied diff shows no verified merge blockers. It is ready to merge within the reviewed scope, conditional on the four pending test shards passing.

✅ Compatible readiness arguments — Preserves number, accepts pullRequest, and rejects conflicting values before dispatch.

✅ Consistent semantic errors — Moves cross-argument validation into the executor and adds SDK-level assertions for structured INVALID_INPUT responses.

✅ Accurate read summaries — Counts explicitly identified result arrays and summarizes readiness verdicts without mistaking gates or repository lists for returned entities.

Review was static; no commands were run or files modified.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Test cursor error passthrough

Add a negative regression for readNewestComments showing that authentication, rate-limit, and unrelated GraphQL errors remain unchanged when a cursor is supplied. The new catch block explicitly preserves them, so this is optional coverage for an implemented boundary.

S2: 🟢 Narrow the cursor documentation

docs/mcp.md promises rejection of any cursor not returned by this tool, while reviewDiscussion.ts translates cursor errors reported by GitHub without independently checking cursor provenance. Describe malformed or GitHub-rejected cursors instead. This optional clarification avoids implying repository or discussion binding that this change does not establish.

Score

The implementation is focused and includes relevant regression coverage. The supplied current-head status reports no failures, with four test shards still pending.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 32s
  • Tokens: 61,161 (60,690 in / 471 out)
  • Cost: $0.50

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 3595-epic-0-9-h9l into 3597/claude-opus-5-5-mcp-invalid-cursor-return-20261117-0119-3gq in commit 4176a7c

Conflicting Files

  • packages/api/mcp/presentation.ts

Resolution Summary

I resolved the one conflict, in packages/api/mcp/presentation.ts. The two branches wanted different summaries for list_pull_requests, so I also changed one assertion in packages/api/test/mcpActivity.test.ts. Typecheck, eslint and the four affected test files all pass (87 tests, 0 failures). No conflict markers are left anywhere. The only other matches were ==== separator lines in docs/library/repomix.md, which aren't conflict markers.

What the conflict was about

Both branches changed the same block of short result summaries.

  • This PR made those summaries use correct singular and plural ("1 repository", "1 event") through countOf. Its tests expect pull-request lists to use the standard page format: list pull requests: N pull requests in this page. More follow.
  • 3595-epic-0-9-h9l (✅⑨ [3596 by Claude Opus 5.5] MCP: get_current_activity and get_recent_activity silently cover only the first 20 repositories #3613) added a note at the end saying when some granted repositories were not scanned: N granted repositories were not scanned; work there may be missing. Continue with repositoryOffset X. It added that note to get_current_activity and get_recent_activity. It also added a separate list_pull_requests summary in a different format: N pull requests across M repositories.

How I resolved it

  • get_current_activity and get_recent_activity: I kept this PR's plural handling and added the epic's "not scanned" note. The two changes don't overlap, so both apply.
  • list_pull_requests: I didn't take the epic's version, because it would have overridden this PR's standard page summary. That would drop the "More follow." paging hint and the plural handling, and break this PR's tests in mcpPresentation.test.ts and mcpPullRequests.test.ts. Instead, readSummary now uses the standard page summary and adds the epic's "not scanned" note at the end. The result looks like: list pull requests: 0 pull requests in this page. 4 granted repositories were not scanned; work there may be missing. Continue with repositoryOffset 20.

The test change

The two branches' tests expected different wording for the same summary, so both couldn't pass. Keeping the epic's format would have broken this PR's tests. So I changed the start of the epic's expected text in mcpActivity.test.ts:183 from 0 pull requests across 19 repositories. to list pull requests: 0 pull requests in this page.. The rest of that assertion is the same, so it still checks the epic's warning and the repositoryOffset 20 hint.

Why this approach

It follows the instruction to prefer this PR's intent: summaries stay consistent and grammatical, and the paging hint is kept. The epic's real addition, telling the reader when repositories were left out and how to reach them, still reaches every summary it targeted.


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 6m 39s

View Task Execution


System-triggered merge conflict resolution

…-5-5-mcp-invalid-cursor-return-20261117-0119-3gq

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- packages/api/mcp/presentation.ts

PR: #3623
Model: Claude Opus 5.5
@propr-dev propr-dev Bot changed the title 🔨 [3597 by Claude Opus 5.5] MCP: invalid cursor returns INTERNAL_ERROR, summaries count the wrong thing, and links.ui points at the API host ✅⑨ [3597 by Claude Opus 5.5] MCP: invalid cursor returns INTERNAL_ERROR, summaries count the wrong thing, and links.ui points at the API host Nov 17, 2026
@integry
integry merged commit 7ee2255 into 3595-epic-0-9-h9l Nov 17, 2026
39 checks passed
@propr-dev propr-dev Bot changed the title ✅⑨ [3597 by Claude Opus 5.5] MCP: invalid cursor returns INTERNAL_ERROR, summaries count the wrong thing, and links.ui points at the API host [3597 by Claude Opus 5.5] MCP: invalid cursor returns INTERNAL_ERROR, summaries count the wrong thing, and links.ui points at the API host Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant