test(ssot): derive concierge degraded-gate tool id from the delivery contract #3115
Reference in New Issue
Block a user
Delete Branch "fix/ssot-degrade-gate-tool-from-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SSOT enforcement (molecule-core side) for the platform MCP server name. Pairs with molecule-ai-workspace-template-platform-agent#6.
The online/degraded gate hard-coded conciergePlatformMCPCreateWorkspaceTool =
mcp__molecule-platform__create_workspaceindependently of the delivery contract. That let the platform-agent template drift its server name toplatform(runtime emittedmcp__platform__create_workspace) while the gate looked formolecule-platform— so the concierge read asdegradedeven with all platform tools loaded.This pins the contract as the SSOT and ties the gate to it:
MCPServerNameto MCPPluginDeliveryContract (already present in the contract JSON as mcp_server_name).molecule-platformin TestMCPPluginDeliveryContract_MatchesSSOT.mcp__+ contract.mcp_server_name +__create_workspace, so the gate and the contract can never silently diverge again.Verified locally: both SSOT tests PASS. (The pre-existing TestMCPPluginDeliveryContract_MCPServerAdaptorWritesMcpServers fails ONLY on my Windows box — it needs the molecule-ai-workspace-runtime checkout + python; it fails identically on clean main here and runs green in CI.)
Generated with Claude Code.
APPROVED on current head
20252250.5-axis: correctness: adds
mcp_server_nameto the delivery contract model and a regression test that derives the degraded-gatecreate_workspacetool id from that contract value, preventing drift between the platform MCP server name and the concierge gate. Robustness: the test fails closed on empty contract value or constant drift, which is the right guard for this SSOT contract. Security: no runtime behavior or secret surface change. Performance: test-only/struct-field change, no runtime cost. Readability: comments explain the contract relationship and prior failure mode clearly.Not merge-ready from this review alone: this is CR2's first current-head approval; needs the second genuine approval and normal gates before merge.
APPROVED on current head
20252250.5-axis: correctness: the code adds
mcp_server_nameto the typed delivery contract and pins it tomolecule-platform, then derives the degraded-gate expected tool id asmcp__<contract.mcp_server_name>__create_workspace. That directly guards the SSOT drift class where the runtime emits one MCP server name while the concierge gate looks for another. Robustness: the test fails on either an empty contract server name or a future constant/contract divergence, so silent drift is caught. Security: no new secrets or runtime permissions. Performance: test-only assertion plus JSON field decode, no meaningful runtime cost. Readability: comments clearly explain the contract/gate/tool-id relationship.Merge note: CR2 approval 12972 is present. I will only merge after the live required-check/branch-protection state confirms it is merge-safe; advisory staging failures alone are not a code-review blocker.