Repository navigation
Conversation
Adds compatibility-suite-ffi, a cucumber runner that drives the vendored compatibility suite through libpact_ffi instead of the Rust crates. Bindings are generated from pact.h and the library is loaded at run time, defaulting to the install from .github/scripts/ffi-examples.sh. The ffi CI job runs it on Linux, macOS and Windows after the C examples. One V4 matching scenario is skipped as a known failure: the mock server reads a 0-byte body as no body, so the notEmpty rule never sees it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roxmltree normalises line endings to LF, so skipping the CRLF conversion on Windows sent multipart bodies with bare LF, which fail to parse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
compatibility-suite-ffi/, a runner for the vendored compatibility suite that drives pact through thelibpact_ffiC API instead of the Rust crates. It runs the same copy of the suite ascompatibility-suite/(compatibility-suite/pact-compatibility-suite, at master), so this PR checks the FFI against the master suite. The V4 plugin features moved to the follow-up PR, feat/compat-suite-ffi-plugins.How it works
build.rsgenerates runtime-loaded bindings frompact.hwith bindgen.libpact_ffiis loaded with libloading, so one build of the runner can test any library..github/scripts/ffi-examples.shinstalls (rust/pact_ffi/build/install).PACT_FFI_HEADERandPACT_FFI_LIBoverride them.consumer,provider,matching,generatorsandmessage. Each scenario's FFI calls are written totarget/ffi-trace.Run FFI compatibility suitestep to theffijob, after the C examples, on Linux, macOS and Windows.Local result (macOS, released libpact_ffi)
Known failure (skipped)
V4
matching_rules.feature, "Supports a not empty matcher with binary data (negative case)". The mock server'sextract_bodyturns a 0-byte body intoOptionalBody::Empty, and the body matcher skips an empty actual body, so the expectedExpected [] (0 bytes) to not be emptymismatch never appears. It's listed inKNOWN_FAILURESintests/matching.rs.Not yet verified
The runner hasn't been run on Linux or Windows; this PR's CI is the first time.
🤖 Generated with Claude Code