Skip to content

[codex] use server-specific cassette names - #36

Merged
k-kinzal merged 1 commit into
mainfrom
codex/use-server-specific-cassette-names
Jul 4, 2026
Merged

[codex] use server-specific cassette names#36
k-kinzal merged 1 commit into
mainfrom
codex/use-server-specific-cassette-names

Conversation

@k-kinzal

@k-kinzal k-kinzal commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes RECORD/REPLAY cassette collisions by removing the hardcoded cassette file name from server-created interceptors.

Root Cause

Interceptor::initCassette() always used recording, so multiple fake servers sharing a cassette directory wrote to and replayed from the same file.

Changes

  • Add cassette name support to Interceptor, ServerOptions, and InterceptorFactory.
  • Add Server::withCassetteName() and protected static $CASSETTE_NAME.
  • Derive a stable default cassette name from the server class when no explicit name is configured.
  • Add OAS_FAKE_CASSETTE_NAME override support.
  • Document the new configuration and add regression coverage for default and configured cassette names.

Validation

  • composer test
  • composer lint

@k-kinzal
k-kinzal marked this pull request as ready for review July 4, 2026 16:18
@k-kinzal
k-kinzal merged commit 2cc2e30 into main Jul 4, 2026
57 checks passed
@k-kinzal
k-kinzal deleted the codex/use-server-specific-cassette-names branch July 4, 2026 16:18
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.

1 participant