Aias00 opened a new issue, #4979: URL: https://github.com/apache/rocketmq-dashboard/issues/4979
## Problem For an interactive L2/L3 rmqctl mutation without `--dry-run` or an explicit `--confirm-token`, the CLI currently asks the operator to type `yes` before it requests the server dry-run preview. The prompt only contains the command, risk level, and server URL. After approval, rmqctl fetches the server-issued `ToolPlan` and confirmation token, but it never displays that plan before applying the mutation. The two-phase token protocol is mechanically satisfied while the human approval is not based on the actual summary, impact, before/after state, or warnings produced by the server. ## Proposed design 1. Keep schema validation and non-interactive safety checks before any request. 2. For an interactive L2/L3 mutation that needs an automatic confirmation token, request the dry-run preview first. 3. Render the decoded mutation preview to stderr so structured stdout remains machine-readable. 4. Prompt only after the preview is visible; on rejection, stop after the dry-run and never send the apply call. 5. Preserve automation behavior: `--yes` still auto-fetches the token without interactive output, explicit `--dry-run` remains preview-only, and explicit `--confirm-token` does not repeat the preview. ## Test plan - Update the interactive auto-token regression so the plan summary must appear before `Type "yes" to continue` in stderr. - Add a rejection regression that observes exactly one dry-run call and no apply call. - Preserve tests for `--yes`, explicit token, L1, and non-interactive rejection. - Run the focused catalog tests, full rmqctl tests, `go vet`, formatting, and catalog verification. ## Acceptance criteria - Interactive approval is requested only after the server plan is displayed. - Rejecting the prompt cannot execute the mutation. - Structured stdout contains only the final requested result. - Non-interactive invocations without `--yes` still make no HTTP request. -- 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]
