zjncs opened a new pull request, #5719:
URL: https://github.com/apache/rocketmq-dashboard/pull/5719

   ### What
   
   `ToolAuditFilter` — the audit leg of the tool execution chain — had no test. 
This adds `ToolAuditFilterTest` with 5 tests.
   
   ### Why
   
   Two contracts matter and both fail silently if regressed: the audit trail 
must record **both** outcomes with the tool's identity (an audit that only 
remembers failures is a distorted trail), and an audit-store outage must 
**never** take the tool call down with it — the answer the operator is waiting 
for outranks the log line.
   
   ### What is pinned
   
   - a successful call is audited as `SUCCESS` with the tool's derived 
operation type (`LIST_TOPIC`), resource type (`TOPIC`), name and bound 
instance, and its output flows through untouched;
   - a failing call is audited as `FAILED` with the failure message, and the 
**original exception instance** is rethrown;
   - an audit-store failure never fails a successful tool call;
   - an audit-store failure on a failing call still rethrows the **original** 
failure, not the audit failure;
   - the filter declares the `AUDIT` type.
   
   ### Verification
   
   - New tests on unmodified code: **5/5 green**, checkstyle clean (`mvn test 
-Dtest=ToolAuditFilterTest`).
   - Discriminating mutations on `ToolAuditFilter`, build result verified red 
each time:
     1. the success-path recording dropped — red;
     2. the failure path recorded as `SUCCESS` — red;
     3. the audit-failure swallow removed so the store outage propagates into 
the tool call — red, in both directions (successful call fails; failing call 
loses its original exception).
   - Restored: 5/5 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]

Reply via email to