Skip to content

test(mcp): use generic example names in MCP server fixtures - #50

Merged
chihsuan merged 7 commits into
mainfrom
auto/RSM-3711
May 21, 2026
Merged

test(mcp): use generic example names in MCP server fixtures#50
chihsuan merged 7 commits into
mainfrom
auto/RSM-3711

Conversation

@chihsuan

@chihsuan chihsuan commented May 21, 2026

Copy link
Copy Markdown
Member

Context

MCP-server tests hard-coded the internal context.a8c / context-a8c provider name as a generic placeholder, leaking org-internal naming into the public test suite.

TL;DR

Rename context.a8c / context-a8c in MCP-server test fixtures to generic example.server / example-server placeholders.

Summary

  • Use example.server in agent_mcp_test.exs to keep the dotted/quoted-TOML-key branch of AgentMcp.codex_server_toml_block/2 covered.
  • Use example-server consistently across codex_mcp_config_test.exs, workspace_and_config_test.exs, and app_server_test.exs for allowlist and rendered-config assertions.
  • Update the example args path /srv/context-a8c/server.js to /srv/example-server/server.js to match.
  • Tests-only change; no production code or behavior changes.

Alternatives

  • Leave the internal name in test fixtures - rejected because it leaks Automattic-internal naming and the name is doing no specific work a generic placeholder couldn't do.
  • Pick different generic names per file - rejected; one name per spelling is easier to skim across the suite.

Test Plan

  • make all
  • rg -n "a8c" test/ returns no remaining matches in renamed fixtures

chihsuan and others added 7 commits May 21, 2026 16:28
Replace `context.a8c` / `context-a8c` placeholders in MCP-server test
fixtures with generic `example.server` / `example-server` names so the
public test suite no longer leaks the internal Automattic context
provider's name. The dotted form continues to exercise the quoted-TOML-key
branch in `AgentMcp.codex_server_toml_block/2`; the hyphenated form keeps
covering allowlist and rendered-config assertions across the workspace,
codex, and app-server tests. The `/srv/context-a8c/server.js` args path
is updated to `/srv/example-server/server.js` to match.
@chihsuan
chihsuan merged commit 02de083 into main May 21, 2026
1 of 3 checks passed
@chihsuan
chihsuan deleted the auto/RSM-3711 branch May 25, 2026 06:00
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.

1 participant