X-LightYear opened a new issue, #7294:
URL: https://github.com/apache/rocketmq-dashboard/issues/7294
## Problem
The `rmq.message.query` MCP catalog declares only `instanceId` and
`topicName` as required. Its implementation, however, dispatches only when at
least one of `msgId`, `uniqueKey`, or `key` contains a value, and otherwise
returns a 400 error.
## Reproduction
Submit this otherwise schema-valid input to `rmq.message.query`:
```json
{
instanceId: instance-a,
topicName: TopicA
}
```
The runtime schema validator accepts the input and the request reaches the
handler, which then fails with `message query requires one of: msgId,
uniqueKey, key`.
## Expected behavior
The catalog/runtime input schema should reject the request before handler
execution and explain that one message identifier is required.
## Actual behavior
The schema accepts the request because it has no cross-field requirement for
`msgId`, `uniqueKey`, or `key`; the handler performs the same validation later.
## Fix
Declare an `anyOf` requirement for `msgId`, `uniqueKey`, or `key`, and
regenerate the rmqctl catalog artifact. Existing identifier precedence and
handler behavior are unchanged.
## Regression evidence
- Pre-fix:
`ToolCatalogTest.messageQueryRequiresAnIdentifierInTheRuntimeSchemaTest` failed
because validation did not raise an error.
- Post-fix: the focused catalog, handler, and output-contract suite passed
(18 tests).
- Checkstyle: 0 violations.
- rmqctl catalog tests passed.
## Scope
This is limited to the MCP catalog contract and generated CLI catalog
metadata; no message query implementation behavior changes.
--
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]