Skip to content

fix(config): validate eval-level MCP server names and modes - #447

Open
karanb192 wants to merge 6 commits into
alibaba:mainfrom
karanb192:fix/validate-eval-mcp-servers
Open

karanb192 wants to merge 6 commits into
alibaba:mainfrom
karanb192:fix/validate-eval-mcp-servers

Conversation

@karanb192

@karanb192 karanb192 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An eval-level server with mode: mock passed validation and failed later during provisioning. Validation now reports the server index for a missing or unsupported mode, a blank name, or a duplicate name.

Changes

Eval-level servers accept real and mocked. A name must contain a non-whitespace character and be unique within the list. Case-level overrides keep their own validation rules.

Related issues

Refs #407.

Test plan

Table tests cover valid mixed modes, an empty list, blank and repeated names, and missing or misspelled modes. Entry-point regressions check a blank name and a named server with mode: mock through ValidateEvalConfig.

Local checks passed with make verify, go test -race ./... and the Codex plugin unit tests.

Case-level mcp.servers entries were checked for a name, duplicates and
mode, but the eval-level list was not. An empty or repeated name and a
missing or misspelled mode such as 'mock' passed validate. A duplicate
silently replaced the earlier server for cases without their own mcp
block and failed the merge for cases with one; a bad mode failed only
once a run started.
Treat a whitespace-only name as missing, as the case merge does, test
through ValidateEvalConfig, and describe duplicate handling per path.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T02:10:44.512217Z b2e1034 PR opened
ℹ️ 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.

@zpzjzj

zpzjzj commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks for moving eval-level MCP validation earlier. I traced both validate and run to the shared eval validator and confirmed that the accepted modes match provisioning, while case-level override rules stay unchanged. I found no blockers in this static review. One optional test improvement: add a mode: mock case through ValidateEvalConfig so the original regression is covered at the entry point as well as in the helper test. I did not run the tests locally.

This branch has not been deployed

No deployments
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