RFC: Pact MkII — a ground-up redesign of the Pact framework - #146
Open
rholshausen wants to merge 2 commits into
Open
RFC: Pact MkII — a ground-up redesign of the Pact framework#146rholshausen wants to merge 2 commits into
rholshausen wants to merge 2 commits into
Conversation
Proposes a single-engine architecture with thin generated SDKs, declarative interactions compiled to inspectable matching plans, components/plugins as the core design, a shape language with variant testing for optional and polymorphic values, provider shapes with a subsumption check, and scriptable lifecycle hooks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rholshausen
marked this pull request as ready for review
July 30, 2026 06:13
Member
|
good read, will take some time to mull over. sounds really promising |
Author
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.

This RFC is a thought experiment made concrete: if we designed Pact from scratch today, what would we keep, change, and throw away? It proposes Pact MkII (working title), built on five pillars:
pact explain), building on the v2 matching engine prototyped in pact-reference.optional,oneOf,anyOfand cardinality, made safe by variant testing (every declared variation is actually exercised and replayed), plus provider-published shapes with a subsumption check to catch response variance the consumer never declared.The consumer-driven workflow, the pact file as artifact, and the broker/
can-i-deployworkflow are all retained. v1–v4 pact files remain verifiable and apact upgradetool is proposed. Deterministic verification remains the foundation; AI assistance (SDK maintenance, mismatch diagnosis, agentic orchestration) is strictly optional.Backwards compatibility is explicitly not a constraint for this exercise, though a migration path is sketched. Feedback is welcome on any part, but the unresolved questions section lists the areas where community input would help most: naming/versioning, the day-one scope of the component model, variant sampling defaults, and subsumption policy.
🤖 Generated with Claude Code