chore(tests): add read-only VCR cassette episode-diff diagnostic - #28795
chore(tests): add read-only VCR cassette episode-diff diagnostic#28795mateo-berri wants to merge 1 commit into
Conversation
Dumps cassettes from the cassette Redis and diffs the episodes of each leaking cassette field-by-field (boundary token, multipart fields like model/prompt/image[]) to pinpoint what varies between record and replay. Used to root-cause why the async image-edit gpt-image-1 cassettes accumulate dead episodes. Strictly read-only (SCAN/GET/TTL/STRLEN). https://claude.ai/code/session_01FmWLPEiWJDzQt7hMsMKN8c
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🚅 Hi, thanks for the PR! I'm Agent Shin, the automated triage bot for this repository. What's this and why am I getting it? I read the description against our contribution rubric. Here's how it lined up: What you got right:
What's still missing:
If the description isn't updated in the next 24 hours, I'll auto-close this PR. That's not us saying we don't care about the change; we want the open-PR list to mirror what a maintainer can act on right now, so contributors don't get lost in a backlog. A closed PR is a soft "park this for later," not a rejection. Take your time; everything below still works after the close. During the grace period: just update the PR description with the missing pieces. No need to ping me; I'll re-check on the next sweep and skip the auto-close if it now passes. See what counts as QA proof for the full rubric (a linked issue alone isn't enough; it covers context, not proof). If the PR does get auto-closed in 24 hours, you still have easy recovery paths:
Internal BerriAI contributors: this rubric doesn't apply to you; ping a maintainer. (I'm an LLM, so I'm not infallible. If you think I got this wrong, ping a maintainer; they'll override me.) |
Summary
Investigating why CI keeps spending on live
gpt-image-1calls. This adds a read-only diagnostic that dumps VCR cassettes from the cassette Redis and diffs each cassette's episodes field-by-field, to root-cause why the async image-edit cassettes (tests/image_gen_tests/test_image_edits/*) accumulate dead episodes despite #28110's boundary-pinning fix.The script (
scripts/diff_vcr_cassette_episodes.py):litellm:vcr:cassette:tests/image_gen_tests/test_image_edits/*(glob overridable via argv)(method, path)and prints per-episode body length + shaboundary token,model,prompt,image[]bytes…), flagging the field that<-- VARIESacross episodesSCAN/GET/TTL/STRLENonly — never writes or deletes, safe against production cassette RedisContext
The async image-edit cassettes carry many dead episodes (e.g.
entries=15/30with onlyplayed=1/2). They're currently stable HITs, so today's CI logs only show iteration noise — they don't reveal what originally varied. The per-episode body-hash diagnostic that would have answered this was added then reverted in #28110. This script inspects the saved cassettes directly so we can pinpoint the non-determinism (boundary token vs. re-encodedimage[]payload) without a CI round-trip.Test plan
test_image_edits/*cassettes and prints field-level variation<-- VARIESfield matches the suspected non-determinism sourcehttps://claude.ai/code/session_01FmWLPEiWJDzQt7hMsMKN8c
Generated by Claude Code