Repository navigation
test: every MCP tool the platform prompt names is a published tool (#4486) - #4489
Merged
Merged
Conversation
…4486) The platform prompt teaches agents tool names on every turn, and only the delegation contract was pinned against the real MCP tool surface. A tool renamed or removed while another section still named it would fail silently. Checks every mcp__trinity__<name> in the prompt module, and every backticked snake_case token in the rendered instructions at each tier: it is a published tool or listed as a non-tool, and the non-tool list has no stale entries. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4486
What
Adds
tests/unit/test_platform_prompt_tool_names.py. The platform prompt names MCP tools on every agent turn, and only the delegation contract was checked against the real tool surface. This extends the check to the whole prompt module:mcp__trinity__<name>inservices/platform_prompt_service.pyis a tool the MCP server publishes;NOT_TOOLS(arguments, statuses, field names) — so a renamed bare tool name such asask_operatorfails too;NOT_TOOLSlists no published tool and has no stale entries.No production code changes. All names are valid today; this guards against drift.
Verification
pytest tests/unit/test_platform_prompt_tool_names.py— 5 passedmcp__trinity__share_fileandget_my_askin the prompt made the two checks fail and name the bad tokens; reverted.test_ent568_delegation_contract.pyandtest_ent243_prompt_tier.pyin random order — 77 passed.The review-checklist line from the issue is in the dev-methodology repo (separate PR).
Journey Impact
None — test only.
🤖 Generated with Claude Code