123123213weqw opened a new pull request, #4470: URL: https://github.com/apache/rocketmq-dashboard/pull/4470
### Which Issue(s) This PR Fixes No issue: this is a small input-validation gap found while reading the tool handlers. Happy to file one if you would rather track it. ### Brief Description The `rmq.message.send` tool previewed a message without parsing its properties, so a malformed property string passed the confirmation step and failed only when the send was executed. The preview is what the operator reads before approving the write, so it has to reject the same input the execution path rejects: `preview` now parses the properties, which raises the same error the confirm step would, before the operator is asked to approve anything. This is revived from a branch whose pull request was closed when `rocketmq-studio` was folded into `master` and the base branch was deleted, and keeps its red/green pair. ### How Did You Test This Change? ``` cd server && mvn -B -ntp test -Dtest=MessageSendToolHandlerTest [INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0 ``` Test coverage: `MessageSendToolHandlerTest` asserts that a preview with an unparseable property string fails at preview time with the property error, instead of returning a plan that only fails on execution. A note for the larger AI-domain picture: the tool layer has been restructured since the earlier AI pull requests (`ops/ai/tool` is now split into `catalog`, `contract`, `core`, `filter`, `handler`, `service`, `support`, and `AiPayloadGuard` covers tool-invocation payloads). Most of those older branches are obsolete as a result, so I am not resubmitting them; this one is still applicable to the current handler. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`fix:`) - [x] Tests added or updated for non-trivial changes, test methods named `...Test` - [x] New UI text has both Chinese and English entries under `web/src/i18n/` — not applicable, no UI text added - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) - [x] New source files carry the ASF license header — no new source files - [x] Documentation touched where behaviour changed — none describes the preview contract -- 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]
