test(ssot): derive concierge degraded-gate tool id from the delivery contract #3115

Merged
devops-engineer merged 1 commits from fix/ssot-degrade-gate-tool-from-contract into main 2026-06-21 09:44:13 +00:00
Owner

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_workspace independently of the delivery contract. That let the platform-agent template drift its server name to platform (runtime emitted mcp__platform__create_workspace) while the gate looked for molecule-platform — so the concierge read as degraded even with all platform tools loaded.

This pins the contract as the SSOT and ties the gate to it:

  • Add MCPServerName to MCPPluginDeliveryContract (already present in the contract JSON as mcp_server_name).
  • Pin mcp_server_name = molecule-platform in TestMCPPluginDeliveryContract_MatchesSSOT.
  • TestSSOT_DegradeGateToolDerivesFromContract asserts the gate tool id == 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.

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_workspace` independently of the delivery contract. That let the platform-agent template drift its server name to `platform` (runtime emitted `mcp__platform__create_workspace`) while the gate looked for `molecule-platform` — so the concierge read as `degraded` even with all platform tools loaded. This pins the contract as the SSOT and ties the gate to it: - Add `MCPServerName` to MCPPluginDeliveryContract (already present in the contract JSON as mcp_server_name). - Pin mcp_server_name = `molecule-platform` in TestMCPPluginDeliveryContract_MatchesSSOT. - TestSSOT_DegradeGateToolDerivesFromContract asserts the gate tool id == `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.
hongming added 1 commit 2026-06-21 09:23:32 +00:00
test(ssot): derive concierge degraded-gate tool id from the delivery contract
CI / Python Lint & Test (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 7s
sop-checklist / review-refire (pull_request_target) Has been skipped
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 8s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 13s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 13s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 16s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
reserved-path-review / reserved-path-review (pull_request_target) Successful in 11s
E2E Chat / detect-changes (pull_request) Successful in 18s
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 15s
CI / Detect changes (pull_request) Successful in 21s
PR Diff Guard / PR diff guard (pull_request) Successful in 18s
template-delivery-e2e / detect-changes (pull_request) Successful in 15s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
E2E Chat / E2E Chat (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 3s
template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request) Successful in 2s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 6s
CI / Canvas Deploy Status (pull_request) Successful in 1s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 34s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 35s
Harness Replays / Harness Replays (pull_request) Successful in 1m17s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m21s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 2m21s
CI / Platform (Go) (pull_request) Successful in 3m24s
CI / all-required (pull_request) Successful in 3s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge user_tasks (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Workspace Requests (core#2606) (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Creates Workspace (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge (compile+skip) (pull_request) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Platform Agent (pull_request) Has been cancelled
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 11s
security-review / approved (pull_request_review) Successful in 10s
audit-force-merge / audit (pull_request_target) Successful in 8s
20252250c3
The online/degraded gate hard-coded
conciergePlatformMCPCreateWorkspaceTool = "mcp__molecule-platform__create_workspace"
independently of the delivery contract's mcp_server_name. That let the
platform-agent template drift its MCP server name to "platform" (so the runtime
emitted mcp__platform__create_workspace) while the gate kept looking for
"molecule-platform" — marking every concierge degraded even with all platform
tools loaded.

Enforce the SSOT (contract mcp_server_name = "molecule-platform"):
- Add MCPServerName to MCPPluginDeliveryContract (already in the contract JSON).
- Pin mcp_server_name in TestMCPPluginDeliveryContract_MatchesSSOT.
- TestSSOT_DegradeGateToolDerivesFromContract asserts the gate's tool id ==
  "mcp__" + contract.mcp_server_name + "__create_workspace", so the gate and the
  contract can never silently diverge again.

Paired with molecule-ai-workspace-template-platform-agent#6, which aligns the
runtime mcp_servers.yaml server name to molecule-platform.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-21 09:41:29 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED on current head 20252250.

5-axis: correctness: adds mcp_server_name to the delivery contract model and a regression test that derives the degraded-gate create_workspace tool 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: adds `mcp_server_name` to the delivery contract model and a regression test that derives the degraded-gate `create_workspace` tool 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.
agent-researcher approved these changes 2026-06-21 09:43:32 +00:00
agent-researcher left a comment
Member

APPROVED on current head 20252250.

5-axis: correctness: the code adds mcp_server_name to the typed delivery contract and pins it to molecule-platform, then derives the degraded-gate expected tool id as mcp__<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.

APPROVED on current head 20252250. 5-axis: correctness: the code adds `mcp_server_name` to the typed delivery contract and pins it to `molecule-platform`, then derives the degraded-gate expected tool id as `mcp__<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.
devops-engineer merged commit b2cc4855ce into main 2026-06-21 09:44:13 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3115