Fix MCP live eval after steering removal - #363
Conversation
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f18a0ee593
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const removedFields = findRemovedSteeringFields( | ||
| result.blocks.map((block) => block.json), | ||
| ); |
There was a problem hiding this comment.
Inspect structuredContent for removed metadata
The check only walks JSON parsed from text blocks, while MCP tool responses also expose structuredContent, which wrapTool returns separately. These representations are not always identical: buildContentPayload converts feature-disabled and metadata-error objects into plain text, so a deployed response could leak steering fields through structuredContent while this live eval sees no JSON field and passes. Preserve and scan the complete result's structuredContent, as the transport regression tests do.
Useful? React with 👍 / 👎.
| const REMOVED_STEERING_FIELDS = new Set([ | ||
| '_agent_steering', | ||
| 'presentation_guidance', | ||
| 'suggested_follow_ups', | ||
| 'suggested_tools', | ||
| ]); |
There was a problem hiding this comment.
Include
_response_contract in the forbidden keys
The steering-removal contract also forbids _response_contract: stripResponseSteering explicitly removes it and the MCP transport tests reject its presence. Because this set omits that key, a response such as {"_response_contract": {}} passes the new absence check even though it restores the removed runtime contract wrapper. Add _response_contract to the forbidden-field check and its focused test.
Useful? React with 👍 / 👎.
Summary
_agent_steeringblocks in the live MCP eval_agent_steering,presentation_guidance,suggested_follow_ups, orsuggested_toolsreappear at any JSON depthTesting
npm run test --workspace @terminal49/mcp -- --run(220 passed)npm run build --workspace @terminal49/mcpnpm run lint --workspace @terminal49/mcpnpm run eval:check --workspace @terminal49/mcpvp test run packages/mcp/eval/quality.test.ts(2 passed)vp fmt --check packages/mcp/evalnpm run eval --workspace @terminal49/mcp(skipped as expected without live credentials)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.