zjncs opened a new pull request, #5746:
URL: https://github.com/apache/rocketmq-dashboard/pull/5746
### What
`ToolValidationFilter` and the `ToolFilterChain` that composes it had no
test. This adds `ToolValidationFilterTest` with 6 tests.
### What is pinned
- the filter declares the VALIDATION type;
- **input is validated before the tool runs and output after it returns** —
a journal across a full run pins the exact order: `validate-input, tool,
validate-output`;
- an invalid input never reaches the tool — the chain is not proceeded and
the output validation never fires;
- an invalid output surfaces after the tool ran;
- **the chain composes filters in declared type order** (AUDIT, VALIDATION,
CAPABILITY, MUTATION) regardless of the order they were handed over in;
- an empty chain runs the tool directly.
### Verification
- New tests on unmodified code: **6/6 green**, checkstyle clean (`mvn test
-Dtest=ToolValidationFilterTest`).
- Discriminating mutations, build result verified red each time:
1. the output validation dropped — red;
2. the chain composing filters as-given instead of sorted by type — red;
3. the input validation moved after the tool ran — red (the journal order
test catches it).
- Restored: 6/6 green. Test-only change; no product code touched.
--
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]