Skip to content

Fix MCP live eval after steering removal - #363

Merged
dodeja merged 2 commits into
mainfrom
cursor/fix-mcp-live-eval-steering-58dc
Sep 10, 2026
Merged

Fix MCP live eval after steering removal#363
dodeja merged 2 commits into
mainfrom
cursor/fix-mcp-live-eval-steering-58dc

Conversation

@dodeja

@dodeja dodeja commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

  • stop parsing and requiring runtime _agent_steering blocks in the live MCP eval
  • fail successful response checks if _agent_steering, presentation_guidance, suggested_follow_ups, or suggested_tools reappear at any JSON depth
  • update eval reporting and documentation for the public response contract
  • add focused scorer tests for allowed and forbidden responses

Testing

  • npm run test --workspace @terminal49/mcp -- --run (220 passed)
  • npm run build --workspace @terminal49/mcp
  • npm run lint --workspace @terminal49/mcp
  • npm run eval:check --workspace @terminal49/mcp
  • vp test run packages/mcp/eval/quality.test.ts (2 passed)
  • vp fmt --check packages/mcp/eval
  • npm run eval --workspace @terminal49/mcp (skipped as expected without live credentials)
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Sep 10, 2026 7:12pm UTC

Request Review

Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
@dodeja
dodeja marked this pull request as ready for review September 10, 2026 19:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T19:14:20.542622Z f18a0ee Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +86 to +88
const removedFields = findRemovedSteeringFields(
result.blocks.map((block) => block.json),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +49 to +54
const REMOVED_STEERING_FIELDS = new Set([
'_agent_steering',
'presentation_guidance',
'suggested_follow_ups',
'suggested_tools',
]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@dodeja
dodeja merged commit 5db92a4 into main Sep 10, 2026
23 of 24 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