fix(core#3082): correct management-MCP verb SSOT to provision_workspace (not create_workspace) #3280
Reference in New Issue
Block a user
Delete Branch "fix/3082-mcp-verb-ssot-provision-workspace"
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?
Summary
The MCP-plugin delivery contract's
required_toolwas authored from a false premise and required a verb that has never shipped on the concierge's management surface. This corrects the SSOT so the #3082 online/degraded gate matches the deployed producer and the live concierge, unblocking the de-bake (the functional concierge will now holdonline).Root cause (the verb was inverted)
The concierge runs the platform MCP in
MOLECULE_MCP_MODE=management. In that mode@molecule-ai/mcp-server'screateServer()returns early after registering only the management tools and never callsregisterWorkspaceTools(wherecreate_workspacelives). So the lifecycle verb on the concierge's management surface isprovision_workspacein all published versions (1.1.1 → 1.6.1).create_workspaceis a workspace-mode tool that has never existed on the management surface — the live 1.6.1 concierge loadsprovision_workspaceand nocreate_workspace.The prior contract (merged via #3258) pinned
required_tool: create_workspace— a phantom verb. The #3082 gate therefore degraded a fully-functional concierge that correctly exposedprovision_workspace. This PR corrects the SSOT.Change (verb flip only — the derive-from-contract architecture is unchanged)
contracts/mcp-plugin-delivery.contract.json):required_toolcreate_workspace→provision_workspace(the single source of truth for the verb).platform_agent.go):conciergePlatformMCPRequiredTool→"provision_workspace". The full namespaced gate id is still composed frommcp__<server>__<verb>(the contract'smcp_server_name+required_tool) — there is no hand-typed verb and no standalone hardcoded tool id. RenamedconciergePlatformMCPCreateWorkspaceTool→conciergePlatformMCPProvisionWorkspaceTool(the old name was misleading) across all 7 referencing files.MatchesSSOTpin updated toprovision_workspace;TestSSOT_DegradeGateToolDerivesFromContractstill asserts the gate const == the contract-derived id (drift gate intact).provision_workspace.loaded_mcp_toolslacks the verb still degrades.TestConciergeCreatesWorkspace_Hermeticcovers both the stays-online (verb present) and degrades (verb absent) sub-cases;concierge_mcp_loaded_test.gocovers the grace-window + lookup-error paths.Deliberately untouched: the child-workspace creation path (
WorkspaceHandler.Create/ thecreate_workspaceNOT_CONFIGUREDprovider-pin) legitimately keepscreate_workspace— that is a different concept (the management tool the concierge invokes isprovision_workspace; the row it creates goes throughCreate).Local verification
go build ./...— PASSgo vet ./internal/handlers/... ./internal/models/...— PASSgofmt -l— all 10 touched files cleango test ./internal/handlers/(full package, minus the 2 runtime-sibling adaptor tests + network ref-pinning tests that fail-loud without themolecule-ai-workspace-runtimesibling / Gitea access — both pre-existing/environmental) — PASS, includingTestConciergeCreatesWorkspace_Hermetic,TestSSOT_DegradeGateToolDerivesFromContract, thePlatformManagementMCP*grace/degrade suite, andConciergeWarmup*.PREVENTION follow-ups (not in this PR — scoped for next PRs)
This PR fixes the SSOT value; the structural reason a phantom verb shipped is that nothing validated the contract against the real producer. Follow-ups:
@molecule-ai/mcp-serverthat asserts it exposes the contract'srequired_toolforMOLECULE_MCP_MODE=management, so a producer-side rename (or a mode-routing regression like the early-return that hidcreate_workspace) fails its own CI. Cross-language equivalent of a typed import: both sides validate against the shared contract.Closes the verb-SSOT half of the P0 guardrail (core task #87 / "SSOT-pin loaded_mcp_tools+verb contract"). Corrects #3258, which merged the wrong verb.
Review
Requesting 2 genuine pool reviews. Do not self-approve or merge.
🤖 Generated with Claude Code
APPROVED on head
f4dde2b9e1.5-axis/RCA review: the required management MCP verb is correctly changed from the phantom workspace-mode
create_workspaceto the producer-exposed management-modeprovision_workspace. I verified the producer side on molecule-mcp-server: management mode registersprovision_workspaceand does not registercreate_workspaceon that surface, so this fixes the #3258/#3082 verb SSOT error rather than repeating it. The degraded gate remains fail-closed: missing/empty/non-reported required tool still degrades after the grace logic, only the accepted verb is corrected. Tests and contract-derived constants were updated consistently, with no unrelated behavioral edits found.Status note:
CI / all-requiredis green on this head. There is non-BP gate/noise including contract-drift/SOP/approval contexts; merge ordering says this lands first.Reviewed head
f4dde2b9e1. APPROVED. The SSOT now requires provision_workspace, matching the management MCP producer verb; the full mcp__molecule-platform__provision_workspace gate and tests were updated, and the missing-loaded_mcp_tools / missing-required-tool fail-closed degradation remains intact. This correctly supersedes #3258's create_workspace mismatch. Merge first only after BP-required contexts are green.