refactor(actionagent): spell the MCP constants with the MCP acronym - #368
Merged
Conversation
The catalog's constant now uses the acronym spelling its name is built from, registered through the engine's INFLECTION_OVERRIDES so every host autoloads it the same way regardless of its own inflections. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MCPController, MCPServersController, MCPRecordingMiddleware and PlaywrightMCPClient join MCPCatalog in INFLECTION_OVERRIDES. The const_missing shim gains the reverse bridge the controller renames require: a plain-inflection host's router camelizes the mcp_* files to Mcp* names, which DEFAULT_SPELLINGS resolves to the acronym constants — and the same bridge keeps caller code written against the pre-acronym names working. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TonsOfFun
marked this pull request as ready for review
August 19, 2026 04:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the engine's MCP-named constants to the acronym spelling their names are built from:
ActionAgent::McpCatalogActionAgent::MCPCatalogActionAgent::Api::McpControllerActionAgent::Api::MCPControllerActionAgent::Api::McpServersControllerActionAgent::Api::MCPServersControllerActionAgent::McpRecordingMiddlewareActionAgent::MCPRecordingMiddlewareActionAgent::PlaywrightMcpClientActionAgent::PlaywrightMCPClientFiles keep their
mcp_*.rbnames;INFLECTION_OVERRIDES(added in v1.2.2 for exactly this case) gains the five entries, so Zeitwerk autoloads the acronym constants identically in every host — plain-inflection hosts and hosts that registerAPI/MCPacronyms alike.The controller renames need one new mechanism: a plain-inflection host's router camelizes
action_agent/api/mcp_serverstoApi::McpServersController, which no longer exists. Theconst_missingshim gains the reverse bridge (DEFAULT_SPELLINGS, derived from the overrides): a missing constant matching an override's default spelling resolves to the acronym constant. The same bridge keeps caller code written against the pre-acronym names (ActionAgent::McpCatalog,PlaywrightMcpClient, …) resolving, so the rename is not a breaking change.Covered by a new engine test asserting each default spelling resolves to its acronym constant, plus the existing route-mapping and eager-load tests, which exercise both directions in the dummy (plain-inflection) host.
Out of scope, deliberately:
Api/ApiKeykeep their default spellings (the existing shim already serves acronym hosts there), and the test-suite-localMcp*class names intest/are not autoloaded constants.Verified mounted inside Sparkle (a host that registers both
APIandMCPacronyms) against actionagent 1.2.2 + activeagent 1.3.0: the Tools and MCP Services views render and trace ingest works.