yyqdbngt opened a new pull request, #3838: URL: https://github.com/apache/rocketmq-dashboard/pull/3838
### Motivation The existing `AiPayloadGuardTest` covers chat UTF-8 boundaries, the command prompt/command requirement, tool-input JSON size and the outbound model contract, but the chat required-text guards, the prompt-only command path with a context size limit, and the tool-name requirement were untested. ### Changes - `chatShouldRejectMissingRequestOrMessage`: a null chat request and a blank message are rejected with their dedicated messages. - `commandShouldAcceptPromptOnlyAndRejectOversizedContext`: a prompt-only command validates, while a context map exceeding the JSON byte limit is rejected. - `toolInvocationShouldRejectBlankName`: a blank tool name is rejected before any size check. ### Verification ``` mvn -B test -Dtest=AiPayloadGuardTest [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0 [INFO] BUILD SUCCESS ``` -- 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]
