Skip to content

feat: add V4 plugin steps to the Rust compatibility suite runner - #18

Draft
YOU54F wants to merge 3 commits into
masterfrom
feat/compat-suite-rust-plugins
Draft

YOU54F wants to merge 3 commits into
masterfrom
feat/compat-suite-rust-plugins

Conversation

@YOU54F

@YOU54F YOU54F commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds the V4 plugin features to the Rust compatibility suite runner: compatibility-suite/tests/plugins.rs, a new plugins test target.

Depends on the suite branch feat/plugin-features (YOU54F/pact-compatibility-suite#1). Its features are read from PACT_COMPAT_SUITE, and the run is skipped when that is unset or has no features/V4/plugins. Needs plugins matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0 installed.

cd compatibility-suite
PACT_COMPAT_SUITE=/path/to/pact-compatibility-suite cargo test --test plugins

Results

48/48 pass locally.

CI

.github/workflows/compat-plugins.yml (job Rust plugins (ubuntu-latest)) checks out YOU54F/pact-compatibility-suite at feat/plugin-features (both overridable on workflow_dispatch), installs the four plugins with the Pact CLI and runs cargo test --test plugins with PACT_COMPAT_SUITE pointing at that checkout. Unlike test.yml, it runs on draft PRs, so it runs on this one. Linux only. test.yml's cargo test is unaffected until the subtree has the plugin features.

Limitations (pact_consumer gaps; no library changes made, none raised)

  • using_plugin panics when a plugin can't load. The lifecycle steps call the driver's load_plugin first to get the error.
  • Plugin mock servers report mismatches only by panicking on drop. The runner catches that panic and keeps its message.
  • Transport mock servers are started through the plugin driver (start_mock_server_v2, get_mock_server_results, shutdown_mock_server), not start_mock_server_async, because:
    • PluginMockServer::url() panics with EmptyHost on matt's address.
    • Its drop reads only the shutdown results. matt reports mismatches through get_mock_server_results, so they are missed.
    • It records the transport as the catalogue key (transport/matt), so the runner normalises it to the last segment.
  • The protobuf mock server listens on ::1 only, so the TCP/gRPC clients fall back from 127.0.0.1 to ::1. gRPC is driven with h2c framing through the h2 crate.

Core (non-plugin) gap: the Windows CRLF multipart bug pattern is still at compatibility-suite/tests/shared_steps/mod.rs:239. It's fixed in the FFI runner (6354c12).

🤖 Generated with Claude Code

Adds a `plugins` cucumber target covering the plugin lifecycle, HTTP,
message, synchronous message and transport features (48 scenarios, all
passing with the matt, csv, avro and protobuf plugins). The features are
read from PACT_COMPAT_SUITE until they reach the suite subtree; the
target skips itself when they are missing.

Transport mock servers are driven through the plugin driver directly, as
PluginMockServer::url() panics on matt's address and its drop does not
see matt's mismatches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YOU54F and others added 2 commits October 29, 2026 19:11
Checks out YOU54F/pact-compatibility-suite feat/plugin-features (overridable
on workflow_dispatch), installs the matt, csv, avro and protobuf plugins and
runs compatibility-suite's plugins test. Runs on draft PRs and PRs to any
base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
matt is not in the pact plugin repository index, so `pact plugin install
matt` exits 1 without output. Install it from the mefellows/pact-matt-plugin
v0.1.1 release instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant