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

   ### What
   
   `AgentStreamOptions` — the provider-neutral bag every hosted-agent run is 
spawned from — had no test. This adds `AgentStreamOptionsTest` with 6 tests.
   
   ### What is pinned
   
   - `extraEnv` defaults to an empty map, and an explicitly null one is 
normalised to empty so callers iterate without a guard;
   - **the credential-leak contract**: `extraEnv` is where the per-run rmqctl 
handshake (`RMQ_AI_ACCESS_KEY` / `RMQ_AI_SECRET_KEY`) travels, and `toString()` 
must never surface the keys or the values — a log line that interpolates the 
options must not become a credential leak — while the provider still reads the 
full map;
   - the timeout falls back **only when unset**: a set budget is returned 
as-is, an unset one yields the caller's fallback;
   - `toBuilder` round-trips every field and allows a single override (the 
resume-session swap between turns);
   - the `AgentProcessSink` is the narrow cancellation view: the provider hands 
the freshly started subprocess over exactly once.
   
   ### Verification
   
   - New tests on unmodified code: **6/6 green**, checkstyle clean (`mvn test 
-Dtest=AgentStreamOptionsTest`).
   - Discriminating mutations on `AgentStreamOptions`, build result verified 
red each time:
     1. the null normalisation dropped from `getExtraEnv` — red;
     2. the `@ToString.Exclude` dropped so the credential environment renders — 
red;
     3. `timeoutOr` returning the raw field, ignoring the fallback — red.
   - 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]

Reply via email to