From afb643c47895652a0cc545d4e04c1935235632fb Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Mon, 16 Nov 2026 23:01:34 -0600 Subject: [PATCH] mcpx conformance: harness daemons run with writePolicy allow (#8922) --- pkgs/mcpx/internal/conformance/officialclient/main.go | 7 ++++++- pkgs/mcpx/scripts/conformance.sh | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/mcpx/internal/conformance/officialclient/main.go b/pkgs/mcpx/internal/conformance/officialclient/main.go index 8429607143..ae608da808 100644 --- a/pkgs/mcpx/internal/conformance/officialclient/main.go +++ b/pkgs/mcpx/internal/conformance/officialclient/main.go @@ -102,9 +102,14 @@ func run(url, scenario string) error { if version >= modernFloor { protocol = "force-discover" } + // writePolicy allow: the daemon's write-policy gate asks a human to confirm every + // write-classified call, and this adapter's empty elicitation answers read as + // refusals at that gate, so no scenario call ever reached the server under test + // (#8922). The gate is covered by the daemon's unit tests; this harness measures + // protocol conformance, so its daemon does not ask. cfg := map[string]any{"mcpServers": map[string]any{*namespace: map[string]any{ "url": url, "transport": "http", "protocol": protocol, - "mcpx": map[string]any{"sharing": "shared", "scope": "global"}, + "mcpx": map[string]any{"sharing": "shared", "scope": "global", "writePolicy": "allow"}, }}} b, _ := json.MarshalIndent(cfg, "", " ") cfgPath := filepath.Join(dir, ".mcpx.json") diff --git a/pkgs/mcpx/scripts/conformance.sh b/pkgs/mcpx/scripts/conformance.sh index fdb80f6125..7daab51538 100755 --- a/pkgs/mcpx/scripts/conformance.sh +++ b/pkgs/mcpx/scripts/conformance.sh @@ -117,7 +117,14 @@ start_daemon() { # era port dir [mcp-spec] [ "$era" = legacy ] && protocol=force-initialize [ -n "${FIXTURE_PID:-}" ] || start_fixture mkdir -p "$WORK/$dir" - printf '{"mcpServers":{"demo":{"url":"http://127.0.0.1:%s/mcp","protocol":"%s","mcpx":{"sharing":"shared","scope":"global"}},"tasks":{"command":"%s","mcpx":{"sharing":"shared","scope":"global"}}}}\n' \ + # writePolicy allow on both servers: the daemon's write-policy gate (policy.write=ask) + # asks a human to confirm every write-classified call, and a conformance run has no + # human -- in server legs the suite client cannot answer a broker question at all, so + # every tools/call waited out the ask and died as a scenario timeout, and in client + # legs the adapter's empty answers read as refusals (#8922). The gate is product + # behaviour for interactive use and is covered by the daemon's unit tests; this + # harness measures protocol conformance, so its daemons do not ask. + printf '{"mcpServers":{"demo":{"url":"http://127.0.0.1:%s/mcp","protocol":"%s","mcpx":{"sharing":"shared","scope":"global","writePolicy":"allow"}},"tasks":{"command":"%s","mcpx":{"sharing":"shared","scope":"global","writePolicy":"allow"}}}}\n' \ "$FIXTURE_PORT" "$protocol" "$WORK/taskmcp" >"$WORK/$dir/.mcpx.json" MCPX_CONFIG=$WORK/$dir/.mcpx.json MCPX_STATE_DIR=$WORK/$dir/state MCPX_CACHE_DIR=$WORK/$dir/cache \ MCPX_REGISTRY_URL=http://127.0.0.1:1/ \