zmuxuny opened a new pull request, #5491:
URL: https://github.com/apache/rocketmq-dashboard/pull/5491

   ### Which Issue(s) This PR Fixes
   
   Fixes #5490
   
   ### Brief Description
   
   Keep a failed MCP reinitialization recoverable instead of forwarding later 
requests to a replacement session whose `notifications/initialized` exchange 
did not succeed.
   
   - Track an incomplete reconnect until both initialization steps succeed.
   - Publish the new session generation only after the initialized notification 
succeeds.
   - Check the pending state under the send lock on both the first attempt and 
the post-recovery retry.
   - Keep recovery bounded to one attempt per call; replay an ordinary request 
only after a definitive session-terminated response, not an HTTP 5xx, timeout, 
or JSON-RPC error.
   
   This does not change the separate old-session-id race tracked by #4880 / 
#4876.
   
   The target is `rocketmq-studio`, as required by the current 
`CONTRIBUTING.md`; the pull-request template still mentions `master`.
   
   AI assistance was used for investigation, implementation, and review. The 
reproduction uses the real mcp-go HTTP transport with an in-memory endpoint; no 
live-cluster failure or message loss is claimed.
   
   ### How Did You Test This Change?
   
   - Before the fix, both real-transport regressions (sequential retry and 
queued callers) failed in all 5 repetitions under the race detector, sending 
`tools/list` to an unready session.
   - After the fix, all 8 new regression tests, including table-driven 
initialization/error cases, passed 30 repetitions with `-race`.
   - `cd rmqctl && make ci`: formatting, full uncached race suite, catalog 
consistency, `go vet`, six platform builds, and each target's license 
verification passed.
   - `git diff --check`: passed.
   
   Additional regression coverage verifies failed initialize 
transport/empty/RPC/malformed responses, repeated initialized-notification 
failures, shared recovery across concurrent callers, bounded repeated 404s, and 
no replay of ambiguous tool-call failures.
   
   The backend and frontend test suites were not run for this Go-only change. 
No dependencies, catalog entries, generated artifacts, or UI strings changed.
   
   ### Checklist
   
   - [x] One coherent change
   - [x] Conventional Commit subject
   - [x] Regression coverage for non-trivial behavior
   - [x] ASF license header on the new test file
   - [x] Applicable Go CI checks passed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to