pilichoumao opened a new pull request, #6317: URL: https://github.com/apache/rocketmq-dashboard/pull/6317
Fixes #6316. When an MCP client's stdout pipe breaks, the stdio bridge currently ignores failed response, notification and error-frame writes. A real `App.Execute` reproducer exits 0 and still forwards initialized/tools-list after the initialize response could not be delivered. Propagate stdout errors (including short writes) and stop immediately. On early exit, cancel the call context and close the session before waiting for workers; close interruptible input and join its scanner so a pipe blocked in Read does not remain running. Clean EOF still drains results/notifications, and upstream diagnostic sanitization and handshake order are preserved. No request is replayed because of an output failure. Validation against rocketmq-studio `5e4c39b053c35a5598cc79ff331b8a54e649d7b1`: - Regression tests fail on the baseline for response/notification/error writes and the actual CLI HTTP path. - CLI exits nonzero after one failed write/one initialize POST and performs one session DELETE. - Short-write and blocked stdin/worker cleanup tests pass; focused output/cleanup tests pass 10 consecutive race runs. - `go test -race -count=1 -parallel 1 -timeout 60s ./...` passes. - `make fmt vet build-all` passes, including catalog consistency and six platform builds/license manifests. All checks ran sequentially with `GOMAXPROCS=1`, `GOMEMLIMIT=384MiB`, `GOFLAGS=-p=1`. An arbitrary embedded `io.Reader` cannot be interrupted by a generic interface; its caller must arrange for blocked reads to finish. Actual stdin pipes support close. AI-assisted implementation; reviewed final diff and raw test evidence. -- 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]
