Skip to content

test: add compatibility suite runner for V4 plugin features - #2

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

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

Conversation

@YOU54F

@YOU54F YOU54F commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a cucumber runner for the V4 plugin features to pact-ruby v2: compatibility-suite/run-plugins.sh and compatibility-suite/plugins/.

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.

PACT_COMPAT_SUITE=/path/to/pact-compatibility-suite compatibility-suite/run-plugins.sh

PACT_COMPAT_PATH_REPORT=<file> writes the DSL/FFI path counts for each feature as JSON.

Results

  • 48/48 pass against the pact-ffi gem 0.5.8. No lib/ changes. The existing plugin specs are unchanged.
  • 15 scenarios go through the DSL:
    • the matt HTTP mock server and passing HTTP verifications
    • message builds via with_plugin/with_plugin_contents
    • all 7 consumer transport scenarios via with_transport
  • The other 33 go through the FFI.

This is the first pact-ruby v2 compatibility runner. The core V1–V4 features aren't covered yet.

Limitations (none raised)

DSL gaps

  • Provider verifiers have no plugin-transport option (only gruf gRPC), and they return only pass/fail with no output.
  • with_plugin requires a version.
  • The HTTP plugin builder can't do response-only or mixed bodies, and can't write a pact without a mock server.
  • The sync and async builders always start a mock server.

Bugs

  • MockServer#cleanup_plugins/#free_pact_handle pass the port instead of the pact handle, so plugins are never released.
  • On a mismatch, the builders' ensure raises before cleanup. That leaks the mock server and the plugin.
  • mismatches_error_msg needs RSpec.current_example.
  • A plugin load failure is hidden by matched? on a nil mock server.

CI

.github/workflows/compat-plugins.yml checks out YOU54F/pact-compatibility-suite@feat/plugin-features (overridable with workflow_dispatch inputs suite-repository/suite-ref), installs matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0, and runs the 48 plugin scenarios with PACT_COMPAT_SUITE set. It has no PR base filter, unlike test.yml.

🤖 Generated with Claude Code

Runs the pact-compatibility-suite features/V4/plugins scenarios with
cucumber via compatibility-suite/run-plugins.sh (skips when
PACT_COMPAT_SUITE is unset). Each scenario uses the pact-ruby DSL where
it can express the scenario and falls back to the FFI bindings
otherwise; per-feature DSL/FFI counts are printed at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a workflow that checks out the suite branch with features/V4/plugins
(YOU54F/pact-compatibility-suite#1), installs the matt, csv, avro and
protobuf plugins with the Pact CLI, and runs
compatibility-suite/run-plugins.sh. It runs on PRs to any base.

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