Problem
When Mirascope's internal implementation changes, HTTP requests sent to LLM providers may change slightly. This causes VCR cassettes to become "stale" - they no longer match the actual requests being made.
Current pain points:
- Tests fail with
CannotOverwriteExistingCassetteException
- Developers must manually identify and delete stale cassettes one by one
- Alternative is deleting ALL cassettes and regenerating (slow, costly API usage)
- No way to selectively regenerate only stale cassettes
Proposed Solution
Implement a pytest plugin that automatically detects stale cassettes during test runs and regenerates them.
- Detects stale cassettes by catching
CannotOverwriteExistingCassetteException
- Only regenerates stale cassettes, not all of them
- Shows which cassettes were regenerated
Question
- How exactly do I make this work alongside
--hard-refresh (snapshots) and --fix (inline-snapshot). Currently I'm still trying to wrap my head around this. will ask questions on discord if any of them pops up
Problem
When Mirascope's internal implementation changes, HTTP requests sent to LLM providers may change slightly. This causes VCR cassettes to become "stale" - they no longer match the actual requests being made.
Current pain points:
CannotOverwriteExistingCassetteExceptionProposed Solution
Implement a pytest plugin that automatically detects stale cassettes during test runs and regenerates them.
CannotOverwriteExistingCassetteExceptionQuestion
--hard-refresh(snapshots) and--fix(inline-snapshot). Currently I'm still trying to wrap my head around this. will ask questions on discord if any of them pops up