feat: add python-sdk as a built-in SDK runner target (#329)
* feat: add python-sdk as a built-in SDK runner target Wire modelcontextprotocol/python-sdk into the `conformance sdk` runner alongside typescript-sdk and go-sdk, using the SDK's existing conformance fixtures for both client and server modes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: target python-sdk v1.x on spec 2025-11-25 Convert the built-in python-sdk entry from v2/main to python-sdk-v1, mirroring typescript-sdk-v1: clone the v1.x branch, default specVersion to 2025-11-25 so draft-only scenarios/checks are excluded, and point at the SDK's own expected-failures baseline. v2/main is mid-refactor and noisy; v1.x is the stable published line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: default sdk-runner server mode to the `active` suite Server runs previously fell through to the underlying `server` command's default; make it explicit and consistent with tiering, which runs the `active` suite (excludes pending/draft). Avoids surfacing intentionally -deferred `pending` scenarios (e.g. json-schema-2020-12, server-sse -polling) as failures. Runner-wide default for all SDKs; callers can still override with --suite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
70b17b3945
commit
28f83384ef
3 changed files with 37 additions and 1 deletions
|
|
@ -273,7 +273,10 @@ export function createSdkCommand(): Command {
|
|||
serverUrl,
|
||||
...passThrough({
|
||||
scenario: options.scenario,
|
||||
suite: options.suite,
|
||||
// Default to the `active` suite (excludes pending/draft) — the same
|
||||
// suite tiering runs, and the most reasonable default to avoid
|
||||
// surfacing intentionally-deferred `pending` scenarios.
|
||||
suite: options.suite ?? 'active',
|
||||
verbose: options.verbose,
|
||||
output,
|
||||
specVersion
|
||||
|
|
|
|||
|
|
@ -45,6 +45,29 @@ export const KNOWN_SDKS: Record<string, SdkConfig> = {
|
|||
command: './.conformance-server -http=:3000',
|
||||
url: 'http://localhost:3000'
|
||||
}
|
||||
},
|
||||
// v1.x — the stable, published line of the python-sdk, analogous to
|
||||
// typescript-sdk-v1 (v2/main is mid-refactor and noisy). Clones the
|
||||
// python-sdk repo, defaulting to the `v1.x` branch, and targets the latest
|
||||
// dated spec so draft-only scenarios/checks are excluded by default. uv
|
||||
// workspace: the `mcp` (client) and `mcp-everything-server` (server) packages
|
||||
// are both members, so one `uv sync --all-packages` covers both modes.
|
||||
// Fixtures live in the python-sdk repo (.github/actions/conformance/ and
|
||||
// examples/servers/everything-server). `--port 3000` matches the url and the
|
||||
// 3000 convention used above; the server's own default is 3001.
|
||||
'python-sdk-v1': {
|
||||
repo: 'python-sdk',
|
||||
defaultRef: 'v1.x',
|
||||
specVersion: '2025-11-25',
|
||||
build: 'uv sync --frozen --all-extras --all-packages',
|
||||
client: {
|
||||
command: 'uv run --frozen python .github/actions/conformance/client.py'
|
||||
},
|
||||
server: {
|
||||
command: 'uv run --frozen mcp-everything-server --port 3000',
|
||||
url: 'http://localhost:3000/mcp'
|
||||
},
|
||||
expectedFailures: '.github/actions/conformance/expected-failures.yml'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,16 @@ describe('lookupBuiltinConfig', () => {
|
|||
expect(lookupBuiltinConfig('rust-sdk')).toBeNull();
|
||||
});
|
||||
|
||||
it('exposes python-sdk-v1 with repo + defaultRef + specVersion and both commands', () => {
|
||||
const py = lookupBuiltinConfig('python-sdk-v1');
|
||||
expect(py?.repo).toBe('python-sdk');
|
||||
expect(py?.defaultRef).toBe('v1.x');
|
||||
expect(py?.specVersion).toBe('2025-11-25');
|
||||
expect(py?.client?.command).toContain('client.py');
|
||||
expect(py?.server?.command).toContain('mcp-everything-server');
|
||||
expect(py?.server?.url).toBe('http://localhost:3000/mcp');
|
||||
});
|
||||
|
||||
it('exposes the typescript-sdk-v1 alias with repo + defaultRef', () => {
|
||||
const v1 = lookupBuiltinConfig('typescript-sdk-v1');
|
||||
expect(v1?.repo).toBe('typescript-sdk');
|
||||
|
|
|
|||
Loading…
Reference in a new issue