Skip to content

test: every MCP tool the platform prompt names is a published tool (#4486) - #4489

Merged
vybe merged 1 commit into
devfrom
feature/prompt-tool-name-guard
Nov 17, 2026
Merged

vybe merged 1 commit into
devfrom
feature/prompt-tool-name-guard

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

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:

  • every mcp__trinity__<name> in services/platform_prompt_service.py is a tool the MCP server publishes;
  • every backticked snake_case token in the rendered platform instructions, at each prompt tier, is a published tool or listed in NOT_TOOLS (arguments, statuses, field names) — so a renamed bare tool name such as ask_operator fails too;
  • NOT_TOOLS lists 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 passed
  • Red for the behaviour: renaming mcp__trinity__share_file and get_my_ask in the prompt made the two checks fail and name the bad tokens; reverted.
  • Ran alongside test_ent568_delegation_contract.py and test_ent243_prompt_tier.py in 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

…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>

@vybe vybe 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.

merge-train: batch validated on train/20261117-1746 (#4626)

@vybe
vybe merged commit b08d42c into dev Nov 17, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants