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

   ### What
   
   `rmqctl/cmd/mcp.go` — the `mcp` command group (`newMCPCommand` / 
`newMCPStdioCommand` / `newMCPConfigCommand`) — had no direct test. The golden 
test (`mcp_config_golden_test.go`) pins the snippet rmqctl and the Studio 
server must agree on; these 5 tests pin the **command surface around it**:
   
   - the `mcp` parent registers **both** adapters (stdio and config);
   - the **stdio adapter resolves its target before touching the network** — a 
missing `--instance-id` fails with the flag named (decision 7), before any 
session is created;
   - the config adapter **honors the `--name` and `--command` overrides** while 
leaving the stdio args minimal (`["mcp", "stdio"]`) when every option still 
holds its default — no `--config`/`--context`/`--instance-id`/`--timeout` noise;
   - the config adapter **carries `--context`** onto the snippet;
   - the config adapter **renders YAML when asked** (`--output yaml`), not just 
JSON.
   
   ### Verification
   
   - New tests on unmodified code: **5/5 passed** (`go test ./cmd/ -count=1`), 
`go vet ./cmd/` clean.
   - Discriminating mutations on mcp.go (3 tests red, 2 green):
     - swallow the stdio target-resolution error: the target test reds;
     - drop the `--context` carriage: the context test reds;
     - always echo `--timeout`: the minimal-args assertion reds.
   - mcp.go restored: full `./cmd/` package **ok** (all existing tests green).
   
   ### Collision check
   
   Checked against all open PRs — no other PR touches `rmqctl/cmd/mcp.go` or 
adds `mcp_test.go` (the golden test file is untouched).


-- 
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