Skip to content

chore: stabilize VCR cassette output to reduce regeneration noise#1429

Merged
jaceksan merged 1 commit intomasterfrom
jacek/stabilize-vcr-cassettes
Mar 16, 2026
Merged

chore: stabilize VCR cassette output to reduce regeneration noise#1429
jaceksan merged 1 commit intomasterfrom
jacek/stabilize-vcr-cassettes

Conversation

@jaceksan
Copy link
Copy Markdown
Contributor

Summary

  • Add X-GDC-CANCEL-TOKEN to NON_STATIC_HEADERS so its random UUID values are replaced with PLACEHOLDER (matching existing handling of DATE and X-GDC-TRACE-ID)
  • Switch yaml.dump sort_keys from False to True so all dictionary keys (including request/response bodies) are serialized in deterministic alphabetical order, eliminating key reordering diffs on cassette regeneration

Note

The first cassette regeneration after this merge will produce a one-time diff (key reordering + cancel tokens becoming PLACEHOLDER). Subsequent regenerations will be stable.

Test plan

  • Verify existing tests pass with current cassettes (no functional change to deserialization)
  • Regenerate a cassette twice and confirm the output is identical both times

🤖 Generated with Claude Code

Add X-GDC-CANCEL-TOKEN to NON_STATIC_HEADERS so its random UUID
values are replaced with PLACEHOLDER, matching DATE and X-GDC-TRACE-ID.

Switch yaml.dump sort_keys from False to True so all dictionary keys
(including request/response bodies) are serialized in deterministic
alphabetical order, eliminating key reordering diffs on regeneration.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
risk: low
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.36%. Comparing base (1cf96b9) to head (f89dd33).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1429   +/-   ##
=======================================
  Coverage   77.36%   77.36%           
=======================================
  Files         228      228           
  Lines       14775    14775           
=======================================
  Hits        11430    11430           
  Misses       3345     3345           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jaceksan jaceksan merged commit e650ab3 into master Mar 16, 2026
12 checks passed
@jaceksan jaceksan deleted the jacek/stabilize-vcr-cassettes branch March 16, 2026 20:17
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.

2 participants