Skip to content

Record the gRPC target on cassette interactions - #9

Open
davinat0r wants to merge 1 commit into
tboser:mainfrom
davinat0r:add-target-tracking
Open

Record the gRPC target on cassette interactions#9
davinat0r wants to merge 1 commit into
tboser:mainfrom
davinat0r:add-target-tracking

Conversation

@davinat0r

Copy link
Copy Markdown

Adds a target field to cassette interactions, capturing the gRPC server address (host:port) each request was recorded against.

RecordingChannel/AsyncRecordingChannel set it automatically from their target constructor argument; a pre-seeded Cassette.target takes precedence (first-write-wins) if already set.

Also adds a TargetMatcher for projects that record against multiple hosts and need playback to distinguish interactions
by target.

This is purely additive and backward-compatible — cassette YAMLs recorded before this change simply omit target, load unchanged, and default matching (MethodMatcher) is unaffected.

Checklist

Before Review

  • Code has been manually reviewed (if AI-generated)
  • make format and make typecheck pass
  • PR title is suitable for release notes

Before Merge

  • Tests added/updated (100% coverage required)
  • Documentation updated (if adding new features)

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