Regenerate Pact contract from consumer specs (full coverage + error paths)#25
Draft
BJClark wants to merge 1 commit into
Draft
Regenerate Pact contract from consumer specs (full coverage + error paths)#25BJClark wants to merge 1 commit into
BJClark wants to merge 1 commit into
Conversation
…aths) - Fix VCR load failure on Ruby 4 (CGI.parse removed in 4.0) by bumping vcr 6.2 -> 6.4, which unblocks the pact consumer + adapter specs. - Expand pact consumer specs to send all declared request fields, assert all declared response fields with type matchers, add 4xx error-path interactions, and cover PATCH /api/accounts/:key plus the feature resolve routes. - Add PATCH delegation to the HTTP adapter (required for the new route). - Regenerate the committed pact from the passing specs (7 -> 21 interactions). Brings contract operation coverage to 100% and error-path coverage to 100%, depth 72.1% -> 92.6% per `mise run spec:coverage`. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Regenerates the committed Pact contract (
spec/pacts/kickplansdk-kickplanapi.json) from passing consumer specs — not hand-edited JSON.Why it was stuck
.rspecforcesspec_helper, whichrequires VCR; VCR 6.2.0 callsCGI.parseat load time, andCGI.parsewas removed in Ruby 4.0 — so every spec (including pact consumer specs) died at load. Fixed by bumpingvcr 6.2 → 6.4(within the existing~> 6.0constraint).Changes
Gemfile.lock).PATCH /api/accounts/:key+ the feature resolve routes.patchdelegation to the HTTP adapter (needed for the new route).Result (
mise run spec:coverage)Not yet done / QA
Draft:
mise run pact:verifywas not run against a live provider (needs the full stack + broker). Interactions are spec-generated but not provider-verified. Seeworkspace/thoughts/shared/research/2026-06-14-spec-coverage-followups.md.🤖 Generated with Claude Code