Skip to content

fix(mcp-cli): add the missing gittensory_get_label_audit CLI descriptor - #4315

Merged
JSONbored merged 1 commit into
mainfrom
fix/mcp-cli-tool-count-drift
Jul 8, 2026
Merged

fix(mcp-cli): add the missing gittensory_get_label_audit CLI descriptor#4315
JSONbored merged 1 commit into
mainfrom
fix/mcp-cli-tool-count-drift

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • test/unit/mcp-cli-tools.test.ts's tool-count assertion (expect(payload.count).toBe(registered.length)) has been failing on main (confirmed on a clean checkout, unrelated to any other change): the stdio MCP server has 34 tools registered via server.registerTool, but the CLI's tools/tools --json subcommand only reported 33.
  • Root cause: feat(mcp-cli): add stdio tool gittensory_get_label_audit #4219 registered gittensory_get_label_audit with its description written inline in the server.registerTool call, instead of following the established pattern every other tool uses — add an entry to the shared STDIO_TOOL_DESCRIPTORS array and reference it via stdioToolDescription(name). The CLI's tools/tools --json output is built entirely from STDIO_TOOL_DESCRIPTORS, so a tool registered only inline never showed up there.
  • Fix: added the missing descriptor entry (copied verbatim from the tool's own existing inline description, so the CLI output text doesn't change at all — this is a pure plumbing fix, not a content change), and switched the registerTool call to reference it via stdioToolDescription("gittensory_get_label_audit"), matching the neighboring tool's own pattern and preventing this exact class of drift from recurring.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally (unsharded, fresh npm ci) — full suite green, including the previously-failing test/unit/mcp-cli-tools.test.ts.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests — this fix makes an already-existing test (test/unit/mcp-cli-tools.test.ts) pass; no new test needed since the existing assertion already covers this exact drift class (any future tool registered without a matching descriptor entry will fail the same way).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests — n/a, no auth/session code touched.
  • API/OpenAPI/MCP behavior is updated and tested where needed — the MCP tool's actual behavior/schema/description is unchanged; only its CLI-listing visibility is fixed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks — n/a, no UI changed.
  • UI Evidence — not applicable, no visible UI/frontend/docs/extension change in this PR.
  • Public docs/changelogs are updated where needed (none needed); changelog itself is untouched.

#4219 registered the stdio tool with an inline description instead of
the shared STDIO_TOOL_DESCRIPTORS + stdioToolDescription(name) pattern
every other tool follows, so the `tools --json`/`tools` CLI subcommand
(which only reads STDIO_TOOL_DESCRIPTORS) never listed it -- 33
reported vs. 34 actually registered via server.registerTool.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 30cfaa6 Commit Preview URL

Branch Preview URL
Jul 08 2026, 08:14 PM

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 8, 2026
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 Gittensory is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing

@JSONbored JSONbored self-assigned this Jul 8, 2026
@JSONbored
JSONbored merged commit 31c2bca into main Jul 8, 2026
10 checks passed
@JSONbored
JSONbored deleted the fix/mcp-cli-tool-count-drift branch July 8, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Development

Successfully merging this pull request may close these issues.

1 participant