Hello Zoltan Chovan, Zoltan Martonka, Gabriella Lotz, Attila Bukor, Kudu
Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24907
to look at the new patch set (#3).
Change subject: KUDU-3806: classify CLI actions for the MCP server
......................................................................
KUDU-3806: classify CLI actions for the MCP server
The MCP server (added in a later change) exposes CLI actions as
callable tools. Whether an action may be surfaced at all -- and
whether it needs gating -- is a safety property of the action, so it
belongs next to the action definition rather than in a lookup table
the server maintains separately.
Introduce a Disposition vocabulary (SURFACE / GATED / REJECT /
EXCLUDE) plus advisory node-local / unsafe tags, and hang them off
ActionBuilder via McpDisposition() / McpNodeLocal() / McpUnsafe().
Disposition is forward-declared in tool_action.h with a fixed
underlying type so the CLI framework carries the classification
without depending on the MCP feature.
mcp_disposition.{h,cc} own the enum, the command-path helper, and
ValidateDispositionCoverage[OrDie](), which walks the reconstructed
action tree and fails loudly if any non-test action is unclassified.
A companion test asserts coverage against the current tree, so a new
action that is never classified breaks the build rather than silently
becoming non-surfaceable at runtime.
Classify every existing action across the fourteen mode families.
This wires no server yet; it only tags actions and enforces that the
tags are complete.
Change-Id: I29aaf7910198c33589438638140fbb8e8cc5a695
Co-Authored-By: Claude Opus 4.8 <[email protected]>
---
M src/kudu/tools/CMakeLists.txt
A src/kudu/tools/mcp_disposition-test.cc
A src/kudu/tools/mcp_disposition.cc
A src/kudu/tools/mcp_disposition.h
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action.h
M src/kudu/tools/tool_action_cluster.cc
M src/kudu/tools/tool_action_diagnose.cc
M src/kudu/tools/tool_action_fs.cc
M src/kudu/tools/tool_action_hms.cc
M src/kudu/tools/tool_action_local_replica.cc
M src/kudu/tools/tool_action_master.cc
M src/kudu/tools/tool_action_pbc.cc
M src/kudu/tools/tool_action_perf.cc
M src/kudu/tools/tool_action_remote_replica.cc
M src/kudu/tools/tool_action_table.cc
M src/kudu/tools/tool_action_tablet.cc
M src/kudu/tools/tool_action_tserver.cc
M src/kudu/tools/tool_action_txn.cc
M src/kudu/tools/tool_action_wal.cc
20 files changed, 845 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/07/24907/3
--
To view, visit http://gerrit.cloudera.org:8080/24907
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I29aaf7910198c33589438638140fbb8e8cc5a695
Gerrit-Change-Number: 24907
Gerrit-PatchSet: 3
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>