Skip to content

test: end-to-end test with a Go-parity fixture #9

Closed

Description

@erikist

Part of #2. An end-to-end test of a generated server over real MCP and gRPC, the counterpart of Go's examples/gen/example/v1/e2e_test.go at 9e072f9. It adds a cross-implementation parity fixture.

Do

  • Harness:
    • A fake VibeService tonic server that records the requests it receives. Run it in-process on 127.0.0.1:0 or over an in-memory channel.
    • The generated VibeServiceMcpServer in front of it.
    • An rmcp client connected over an in-memory transport (e.g. tokio::io::duplex).
    • Keep rmcp types inside the harness. The tests work on plain JSON from tools/list and tools/call, as Go's do.
  • Port every Go e2e test:
    • TestToolsList, TestCallSetVibe, TestCallGetVibe, TestCallSetVibeDetails, TestCallSetVibeArray, TestCallSetVibeObjects
    • TestCallSetVibe_GRPCError, TestCallSetVibe_InvalidArgumentType, TestCallSetVibe_UnknownField
    • Keep the same inputs, and assert what the backend received and what the client got back.
  • Parity fixture:
    • Commit examples/tests/parity/go-v0.3.0-tools.json: Go 0.3.0's tools/list result for the example service. Capture it by running Go's mcp-vibe at 9e072f9 (go run ./cmd/mcp-vibe and send initialize + tools/list over stdio), or by extracting Name, Description and InputSchema from its committed example_mcp.pb.go. Say in the PR which you did.
    • Assert the Rust server's tools/list is JSON-equal to it.
    • Also capture Go's tools/call result text for TestCallSetVibeDetails's input, and assert the Rust result is JSON-equal to it.

Acceptance criteria

  • All ported e2e tests and both parity assertions pass in cargo test, with no network access beyond loopback.
  • A mutation check described in the PR: break one schema rule in the generator, or one handler step, and show which test catches it.
  • The checks in AGENTS.md pass.

Activity

  1. erikist commented on Oct 10, 2026

    @erikist
    ContributorAuthor

    🤖 Factory: picked up by dispatcher; working on branch factory/9-test-end-to-end-test-with.

  2. erikist commented on Oct 10, 2026

    @erikist
    ContributorAuthor

    🤖 Factory: opened PR #26 (branch factory/9-test-end-to-end-test-with).

    Ported all nine Go e2e tests to examples/tests/e2e.rs (fake VibeService behind a real in-process tonic server, the generated VibeServiceMcpServer in front, an rmcp client over an in-memory tokio::io::duplex), plus the cross-implementation parity fixture examples/tests/parity/go-v0.3.0-tools.json (extracted from Go's committed example_mcp.pb.go — no Go toolchain was available to run mcp-vibe directly; see examples/tests/parity/README.md) and both parity assertions (tools/list and SetVibeDetails's tools/call result).

    cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo build --workspace and cargo test --workspace all pass. Mutation check (breaking additionalProperties: false in the schema generator) is caught by both the existing unit tests and the new end-to-end tests — details in the PR.

    See PR #26 for full details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    factory:in-progressAn sf-factory worker is on itfactory:readyReady for the sf-factory to pick up

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions