ci(3082): cross-repo published mcp-server manifest check (verb-SSOT prevention, Layer 2) #3281
Reference in New Issue
Block a user
Delete Branch "feat/3082-published-manifest-check"
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?
What
The cross-repo durable prevention layer for the MCP tool-verb SSOT contract (core#3082). It resolves the ACTUAL tool manifest of the PUBLISHED
@molecule-ai/mcp-serverbuild (the build a concierge is actually delivered) and asserts it satisfies the contract's accepted verb union (required_tools ∪ transitional_tool_aliases). This is the layer that would have caught the staging stale-published-build degrade — a published build skewed away from the contract fails HERE, in core CI, BEFORE any tenant provisions a concierge against it.It complements the in-repo Go contract test (checks core's own hand-written verb) and the producer-binding test in
@molecule-ai/mcp-server(checks the producer SOURCE). Neither of those sees the PUBLISHED artifact; this does.New files (no existing files modified)
scripts/mcp-verb-manifest-check/check-published-mcp-manifest.mjs— loads an already-installed published build via an in-tree child harness that patches the ESMMcpServer.prototype.toolto record registered tool names, builds the management-mode server, and asserts ⊇ contract. FAIL when no accepted verb is present (the staging degrade); WARN (non-fatal) when only a transitional alias carries the gate. Readsrequired_tools(+transitional_tool_aliases); falls back to legacyrequired_tool..gitea/workflows/mcp-verb-published-manifest.yml— installs the published package from the Gitea npm registry and runs the checker. Standalone soak-then-promote workflow (mirrors the contract-drift gate); a daily cron catches a newly-published skew even with no commit (the stale-build failure mode is time-, not commit-, dependent).Does NOT touch
contracts/mcp-plugin-delivery.contract.json,platform_agent.go, orregistry.go— the verb-SSOT PR owns those.New CI secret required
MCP_SERVER_READPKG_TOKEN— a Gitea token with read:package scope for the molecule-ai npm registry (the workflow installs the published package). Fail-closed on trusted contexts; soft-skip on fork PRs. Please provision this org/repo secret before promoting the workflow into branch protection.Heads-up: this check FAILS against today's
main— by designRun against current
origin/main(legacyrequired_tool: create_workspace) the check FAILS, because the published management build exposesprovision_workspace, nevercreate_workspace— i.e. it immediately surfaces the live contract↔producer mismatch core#3082 is fixing. It goes green once the contract is corrected toprovision_workspace(the core verb-SSOT PR) OR a build exposingcreate_workspaceis published. This is the gate doing its job, not a flake.Enforcement proven locally (vs the real published 1.6.1 build, 41-tool manifest)
required=[provision_workspace](corrected)required=[create_workspace]onlyrequired=[create_workspace]+provision_workspacealias::warningorigin/mainlegacyrequired_tool=create_workspaceDependency
Depends on the core verb-SSOT PR (
feat/3082-mcp-verb-ssot-contract) landingrequired_tools: ["provision_workspace"](+ optionaltransitional_tool_aliases) in the contract. The checker's legacy fallback keeps it safe to land before/after.Review
Requesting 2 genuine pool reviews before merge. Do not merge until the core verb-SSOT PR corrects the contract (otherwise it lands red against main, as noted above) and
MCP_SERVER_READPKG_TOKENis provisioned.🤖 Generated with Claude Code
APPROVED on head
7619a72205.5-axis/RCA review: this adds the missing published-artifact guard rather than another source-only check. The workflow installs the published
@molecule-ai/mcp-serverpackage from Gitea npm with a read:package token, runs a local harness in management mode, records the actual registered tool names, and fails if the published manifest exposes none of the contract-accepted verbs. The script fails closed on missing contract fields, zero-tool introspection, server-name mismatch, and no accepted verb; it warns but does not fail when only a transitional alias is present, which matches the staged deprecation model. Secret handling is appropriate for this CI context: the read-package token is only in.npmrcin a temp dir and is required only on trusted contexts; fork PRs soft-skip because they cannot receive the secret.Status note: the manifest check is expected to be red against current main/published state until #3280/producer publication sequencing catches up, and the missing
MCP_SERVER_READPKG_TOKENis an ops prerequisite. Code is sound on merits.Reviewed head
7619a72205. APPROVED on code merits. The published-manifest checker resolves the real published mcp-server package, captures registered management-mode tools via SDK monkeypatching, and validates the contract verbs; it supports both plural required_tools and legacy singular required_tool. Trusted missing MCP_SERVER_READPKG_TOKEN fail-closes, fork/no-secret paths soft-skip without exposing tokens. Expected red until #3280 and the read:package secret are in place.