Skip to content

🐛 fix(adminmcp): version_read names the fields the hive returns; guide matches the tools - #16890

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/adminmcp-docs-match-tools
Nov 6, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/adminmcp-docs-match-tools

Conversation

@Danathar

@Danathar Danathar commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Three statements about the admin MCP were wrong, one of them in a tool description the model reads. This PR corrects them and adds two tests so they cannot drift again. No behavior changes.

What was wrong

  1. version_read named a field that does not exist. The tool description and the operator guide both said the running build is in currentCommit. GET /api/version returns the running commit as hash (full) and short, and has no currentCommit at the top level. A model asked "which commit is this hive on?" was pointed at a field that is never there. The existing test for this tool stubbed the endpoint with a made-up currentCommit, so it could not notice.
  2. The guide left out the triggers settings section. settings_read offers it, and the tool's own schema lists it, but src/docs/admin-mcp.md did not.
  3. The guide said the write tools "appear only when writes are on". write_preview and write_confirm are always in tools/list. When writes are off, or not available to the caller, they carry metadata.preview.enabled: false and a note with the reason, and a call is refused.

Files

  • src/pkg/adminmcp/adminmcp.go: the version_read description.
  • src/docs/admin-mcp.md: the three corrections.
  • src/pkg/dashboard/admin_mcp_test.go: the stubbed test uses a real field; new TestVersionReadDescriptionNamesTheCommitFieldsTheHiveReturns runs the real /api/version handler.
  • src/pkg/adminmcp/tools_settings_test.go: new TestOperatorGuideListsEverySettingsSection.
  • changelog.d/fixed-admin-mcp-docs-match-tools.md

Tests

  • TestVersionReadDescriptionNamesTheCommitFieldsTheHiveReturns: the real handler answers with hash, short and branch, and the description names them.
  • TestOperatorGuideListsEverySettingsSection: fails on v6 with "does not list the settings_read section triggers".
  • go test ./pkg/adminmcp/ ./cmd/hive-admin-mcp/ and the AdminMCP and version tests in ./pkg/dashboard/ pass.
  • check-docs-citations.py and check-docs-links.py pass.

🤖 Generated with Claude Code

…e matches the tools

The version_read description and docs/admin-mcp.md told the reader to
look at currentCommit. GET /api/version returns the running commit as hash
and short and has no currentCommit, so the named field was never there.

docs/admin-mcp.md also omitted the triggers settings_read section and said
the write tools appear only when writes are on; they are always listed,
with metadata.preview.enabled false and the reason.

Two tests keep these from drifting: the description must name fields the
real /api/version handler answers with, and the guide must list every
settings_read section.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 6, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16884 ✨ feat(adminmcp): read and act on the Activity monitor; writes run as the verified caller same files src/docs/admin-mcp.md
src/pkg/adminmcp/adminmcp.go
src/pkg/dashboard/admin_mcp_test.go
#16889 🐛 fix(adminmcp): reads stop masking values that cannot be a credential same files src/docs/admin-mcp.md
src/pkg/adminmcp/adminmcp.go
#16893 🐛 fix(adminmcp): the HTTP endpoint answers ping and acknowledges notifications same files src/docs/admin-mcp.md
src/pkg/adminmcp/adminmcp.go
#16894 🐛 fix(adminmcp): issues_by_band accepts the outside band it reports same files src/pkg/adminmcp/adminmcp.go

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 6, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked each corrected claim against the v6 tree rather than the diff alone:

  • /api/version really does answer hash and short, not currentCommit (src/pkg/dashboard/api_version.go:34-35; currentCommit lives only on the autoupdate status struct, autoupdate_status.go:75). The new version_read description and the guide row now name the fields the endpoint returns.
  • triggers is a registered settings_read section (src/pkg/adminmcp/tools_settings.go:43) and was missing from the guide's list.
  • toolDefs appends write_preview/write_confirm unconditionally and only varies metadata via writeMetadata(writesEnabled, …) (adminmcp.go:371-376, :401-408), so "always listed, preview.enabled=false with a note when off" is the accurate description; the old "appear only when writes are on" was wrong.

TestOperatorGuideListsEverySettingsSection reads ../../docs/admin-mcp.md from the package dir and iterates SettingsSections(), which will keep the guide honest for future sections. All checks green except tide. Looks correct to me. (Carries conflicts-with-open-pr — overlaps adminmcp.go with #16889/#16885; a one-line rebase for whichever lands second.)

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer (folded here because this head already carries its hive review):

Checked each of the three corrections against the tree and they are all right:

  • handleVersion answers with hash and short (src/pkg/dashboard/api_version.go:34-35); nothing in that handler emits currentCommit, so the old description pointed a model at a field that never existed.
  • triggers is a real settings_read section (src/pkg/adminmcp/tools_settings.go:43).
  • toolDefs appends write_preview/write_confirm unconditionally and only varies their metadata (src/pkg/adminmcp/adminmcp.go:363-374), so "appear only when writes are on" was wrong.

The guide-vs-sections test is a nice ratchet. Looks correct to me.

Evidence bundle `#1689089878b3` sha256:c7cc737b7158958f0308f392bd1b5d1dc9fa213a059e5d22be300e13df0a344a — download from the dashboard or `hivectl review evidence #16890`.

@hivecommons-hive
hivecommons-hive Bot merged commit e8cc48a into hivecommons:v6 Nov 6, 2026
72 of 75 checks passed
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 6, 2026
Danathar added a commit to Danathar/hive that referenced this pull request Nov 6, 2026
…cker

src/docs/admin-mcp.md: kept the reorganized guide and carried over v6's changes to it: ping and notification answers (hivecommons#16893), version_read hash/short (hivecommons#16890), settings_read takes no limit and the triggers section (hivecommons#16892), What a read masks (hivecommons#16889), and write tools always listed with metadata.preview.enabled (hivecommons#16890); the troubleshooting row follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant