Development

Choosing a Re-Record Cadence from Vendor Change Volume

Antonio Evans7 min read

A calendar page with four quarters marked.
Key points

Key points

  1. 1Count every additive and breaking entry in the vendor's changelog for one quarter, then set your re-record interval at twice that frequency.
  2. 2Six changes in a quarter means a monthly re-record; one change a year means a quarterly one, with nothing left to guess.
  3. 3Additive changes matter because a recorded fixture that omits a new field can still pass while hiding behavior your client will meet in production.
  4. 4Recorded fixtures are only as honest as their age, so the cadence belongs in your calendar and your CI config, not in someone's memory.

Why recorded fixtures drift in the first place

A recorded fixture is a snapshot of a request/response pair captured at one moment and replayed later from disk, which is exactly what the cassette model in libraries like vcrpy and its peers does: developers run real requests once, commit the recording next to the test, and CI replays it without touching the vendor. That is the whole value and the whole risk. The recording freezes a contract that the vendor is free to change whenever they like.

When the vendor adds a field, removes a parameter, or renames a key, your replay keeps returning the old shape. Tests pass. Production does not. Redocly's contract testing primer frames this as the failure that traditional testing misses: a subtle change in response format that no unit test notices. The practical answer for fixture-based suites is not to abandon recordings but to refresh them on a schedule derived from how much the vendor actually changes.

That schedule is what the rest of this article builds. It is a counting exercise, not a judgment call.

Counting changes in the vendor's changelog

Start with one quarter of the vendor's public changelog and classify every entry into one of three buckets. You only count two of them.

BucketExamplesCounts toward cadence
BreakingField removed, field renamed, type changed, endpoint deprecatedYes, weight 2
AdditiveNew optional field, new endpoint, new enum value, new error codeYes, weight 1
CosmeticDocs wording, typo fixes, dashboard UI tweaksNo

Why weight breaking changes double? Because a breaking change that lands in your fixture window does not just make the fixture stale, it makes the fixture wrong in a way that can silently corrupt a passing test. ACCELQ's write-up on contract testing describes the exact shape of that incident: a payment provider adds one field during a routine deploy, nothing is removed, nobody flags it as breaking, and a downstream reconciliation job fails silently for hours. A weighted count keeps you from under-scheduling when a vendor has a quiet quarter for additions and a loud one for removals.

Stripe is a useful example of what a well-labeled changelog looks like. Their release process announcement describes twice-yearly major releases that carry breaking changes plus monthly releases that add features without breaking anything, and their changelog marks entries explicitly as breaking and lets you filter to relevant changes only. That structure makes the count straightforward: major releases count double, monthly entries count once.

The count itself should be reproducible. A short script that pulls the changelog, tags entries, and prints a per-quarter weighted total keeps the cadence decision out of arguments:

entries = [
    {"q": "Q1", "kind": "breaking"},
    {"q": "Q1", "kind": "additive"},
    {"q": "Q2", "kind": "additive"},
]
weights = {"breaking": 2, "additive": 1}
totals = {}
for e in entries:
    totals[e["q"]] = totals.get(e["q"], 0) + weights.get(e["kind"], 0)
print(totals)  # {'Q1': 3, 'Q2': 1}

Track at least two consecutive quarters before you commit to a cadence. One quarter can be an outlier.

The doubling rule and how to apply it

The rule: take your weighted change count per quarter and double it to get re-records per quarter, then convert that to an interval.

Weighted changes per quarterRe-records per quarter (2x)Interval
12Every 6 weeks, treat as quarterly minimum
24Every 3 weeks
36Every 2 weeks
48Weekly
6 or more12 or moreTwice monthly or tighter

Two adjacent bands deserve a note. A vendor with a weighted count of 1 per quarter translates to two re-records per quarter, which is roughly every six weeks. In practice most teams round that down to quarterly because the recording cost is not zero and the marginal safety from the extra cycle is small. That is the "one change a year, go quarterly" case: you are deliberately slower than the formula because the vendor is slow.

The formula's real job is the other end of the table. A vendor at six weighted changes per quarter is changing roughly every two weeks, and if you re-record monthly you are guaranteed to run some tests against fixtures older than the changes they are meant to model.

Worked example: a busy vendor at six changes a quarter

Suppose the vendor's changelog shows six weighted changes in a recent quarter: three additive entries and one breaking entry would already be five under the weighting above, so add one more additive and you are at six.

Six weighted changes per quarter doubles to twelve re-records per quarter, or one every week. That is a lot of recording. Here is how to make it cheap enough to actually happen.

  1. Split the fixture set. Only re-record cassettes touched by the changelog entries you classified. A new optional field on one endpoint does not invalidate the other forty.
  2. Re-record on a branch, not main. Capture against the vendor sandbox, commit the new cassettes, and let the existing test suite run against them as a gate. Momentic's CI guidance makes the same point about gating merges on test results: a run that only reports is not a control.
  3. Use a sandbox, never production. Keploy's sandbox testing overview is blunt about why: the payment gateway costs money per call and the vendor will rate limit you, so recording has to run against an isolated environment with dedicated credentials.
  4. Treat a failed re-record as a contract failure. If the new recording does not match your assertions, that is the signal you built the cadence for.

A worked number on cost: if a full re-record takes twenty minutes of wall clock and fifteen of setup, weekly is roughly half a day per quarter of engineer time, which is cheaper than one silent production incident from a stale cassette.

Worked example: a slow vendor at one change a year

Now the other vendor. Their changelog shows four entries in a year, three of them documentation, one a new optional response field. Weighted, that is 1 per year, or 0.25 per quarter.

Doubling gives 0.5 re-records per quarter. You cannot re-record half a time, so round to the minimum defensible interval: quarterly. That gives you four cycles a year against one real change, which is enough headroom to catch the change within a quarter and cheap enough that nobody argues about the calendar block.

The trap for slow vendors is assuming slow means safe. It does not. DigitalAPI's contract testing guide gives the concrete example: a weather API that documents temperature as a number and starts returning it as text. That is one change, and it breaks every fixture recorded before it. Quarterly captures it inside a quarter. Annual captures it inside a year, if you remember.

One extra control for slow vendors: add a cheap live smoke test that hits the real endpoint on every deploy, in addition to the fixture-based suite. The Smithy smoke test specification describes these as small tests that ensure a client can connect to a live service and get the right kind of response, which is exactly the right scope for catching a slow vendor's rare change without paying the full re-record cost monthly.

Where re-recording belongs in the pipeline

The cadence is a calendar decision, but the enforcement is a pipeline decision. Wire it so that a stale or failing re-record cannot merge.

TestCollab's quality gate documentation spells out the exit code contract that makes this work: zero means the criteria passed, one means the gate evaluated results and a criterion failed, two means the gate could not evaluate at all. All nonzero outcomes block the pipeline. That last distinction matters for re-records: if your recording job fails to reach the vendor sandbox, that is a two, and it should not silently pass.

Re-record triggerWhen it runsBlocking?
Scheduled cadence (weekly, monthly, quarterly)Nightly job, opens a PR with new cassettesYes, merge gated on tests
Changelog entry detectedWebhook or poll against the vendor changelogYes
Manual, after an incidentEngineer-triggeredYes
Live smoke testEvery deployYes, narrower check

Keep the re-record job separate from the test job. The re-record writes new cassettes; the test job replays them and asserts. Mixing the two means a flaky network during recording looks like a test failure, which trains people to ignore the check.

Common mistakes that make the cadence useless

Recording against production. The recorded response then reflects live customer data and real side effects. GoReplay's record and replay guide is careful to distinguish HTTP response fixtures served from a mock server from raw traffic replay against a live backend, and notes that a capture only represents the traffic observed during its window. Record read-only endpoints or dedicated sandbox accounts.

Re-recording everything every cycle. It inflates the diff and hides the one cassette that actually changed. Scope to touched endpoints.

Not committing the cassettes. A recording that lives on one engineer's laptop is not a fixture, it is a rumor. Commit it next to the test, as the cassette model in vcr-style libraries assumes.

Ignoring additive changes. This is the most expensive mistake. A new field is easy to dismiss, but a fixture recorded before it will not exercise code paths that now run. The example in ACCELQ's incident write-up is precisely an additive change that passed every functional test and still broke a downstream job.

Setting the cadence once and never revisiting it. Recount every quarter. A vendor that doubles its release rate should move you up the table, and a vendor that stabilizes should let you back off.

If your fixtures span several vendors and model providers, the counting gets tedious. Pointing everything at a single API surface cuts the number of changelogs you have to watch, which is what Quanta Inference offers: text, image, video, audio and embedding models through one OpenAI-compatible API, so the re-record calendar tracks one changelog instead of six.

FAQ

FAQ

How many changelog entries do I need before the count means anything?

Two consecutive quarters is the minimum to see a trend, four is better. A single quarter can be dominated by one major release and push you to an interval you cannot sustain. If you must start now, start with the formula's output for your most recent quarter and revisit after the next one.

Should I count deprecations as breaking changes?

Yes. A deprecation announcement gives you a deadline, and a fixture recorded after the deprecation may already be exercising a path the vendor intends to remove. Stripe's changelog marks these explicitly, which makes them easy to classify. Weight them like any other breaking entry.

What if the vendor has no public changelog?

Fall back to diffing the vendor's published schema or API reference between snapshots. Pactflow's schema-based contract testing write-up describes semantic comparison of schemas to detect backwards-incompatible changes, which is the same signal you would have read from a changelog. Run the diff on the calendar you would have used for the count, and treat a schema change as one entry.

Does a monthly re-record mean a monthly test run?

No. Your fixture-based tests should run on every commit; re-recording only refreshes the data those tests replay. The cadence governs how often you recapture from the vendor, not how often CI executes the suite. Keeping these separate is what lets you gate merges on tests without paying the recording cost each time.

How do I know the new recording is better than the old one?

Let your existing assertions decide. If the new cassette passes the same tests the old one passed, you have refreshed without regression. If it fails, you have found the change the cadence was designed to surface, and the fix (code, schema, or test) is now explicit rather than latent. Record the outcome in the PR so the next cycle has a written baseline.

Sources

Sources

  1. HTTP Recording in Tests - Jeremy Nauta
  2. API Contract Testing 101: Benefits, challenges, and when ...
  3. API Contract Testing: Techniques, Tools, and Best Practices
  4. Introducing Stripe's new API release process
  5. Changelog
  6. CI/CD Pipeline Testing: Run, Gate and Alert on E2E Tests
  7. What Is Sandbox Testing? Types, Benefits & Best Practices
  8. API Contract Testing: Definition, Benefits, and Best Practices
  9. Smoke Tests, Smithy 2.0
  10. Quality Gates in CI/CD: Fail a Pipeline on Test Results with ...
  11. Record and Replay Testing for HTTP APIs with GoReplay
  12. Using Pactflow for Schema-Based Contract Testing
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles