Skip to content

feat(compat-ffi): run the V4 plugin features through the C API - #19

Draft
YOU54F wants to merge 4 commits into
feat/compat-suite-ffifrom
feat/compat-suite-ffi-plugins
Draft

YOU54F wants to merge 4 commits into
feat/compat-suite-ffifrom
feat/compat-suite-ffi-plugins

Conversation

@YOU54F

@YOU54F YOU54F commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #16, split out of it. compatibility-suite-ffi/tests/plugins.rs runs the V4 plugin features (48 scenarios) from the suite branch feat/plugin-features (YOU54F/pact-compatibility-suite#1):

  • They are read from PACT_COMPAT_SUITE, and skipped when that is unset or has no features/V4/plugins.
  • They need plugins matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0 installed.
cd compatibility-suite-ffi
PACT_COMPAT_SUITE=/path/to/pact-compatibility-suite cargo test --test plugins

Result: 48/48 against FFI 0.5.4 for lifecycle (5), HTTP (14), message (10), synchronous message (6) and transport (13).

Limitations

  • The FFI can't set an interaction's transport outside a mock server. The provider transport scenarios write transport straight into the pact file instead.
  • matt reports mismatches only through pactffi_mock_server_mismatches, not through the shutdown results.
  • gRPC is driven with the h2 crate directly (client and provider, h2c framing), and matt TCP with plain sockets.
  • The protobuf mock server listens on ::1 only, so clients fall back from 127.0.0.1.

CI

.github/workflows/compat-ffi-plugins.yml (job FFI plugins (ubuntu-latest)):

  • checks out YOU54F/pact-compatibility-suite at feat/plugin-features (both overridable on workflow_dispatch)
  • builds and installs pact_ffi with the CMake steps from ffi-examples.sh
  • installs the four plugins with the Pact CLI, then runs cargo test --test plugins with PACT_COMPAT_SUITE pointing at that checkout

Unlike test.yml, it runs on draft PRs and on PRs to any base, so it runs on this PR (base feat/compat-suite-ffi). Linux only.

Not yet verified

The plugin runner hasn't been run on Linux; this PR's CI is the first time.

Base is feat/compat-suite-ffi (#16); retarget to master once #16 merges.

🤖 Generated with Claude Code

YOU54F and others added 4 commits October 29, 2026 19:10
Adds pactffi_using_plugin, pactffi_interaction_contents, pactffi_cleanup_plugins and
pactffi_get_error_message wrappers, and a plugins test that reads the plugin features and
fixtures from the suite checkout in PACT_COMPAT_SUITE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…teps

All 48 plugin scenarios pass against pact_ffi 0.5.4 with the matt, csv,
avro and protobuf plugins. gRPC is driven with h2 directly and matt TCP
with plain sockets; provider transport pacts get their transport added to
the written file, as the FFI has no call to set it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checks out YOU54F/pact-compatibility-suite feat/plugin-features (overridable
on workflow_dispatch), installs the matt, csv, avro and protobuf plugins,
builds pact_ffi and runs compatibility-suite-ffi'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