Skip to content

test: pin old and new wire payloads - #75

Merged
wavekat-eason merged 2 commits into
mainfrom
test/wire-compat
Oct 18, 2026
Merged

wavekat-eason merged 2 commits into
mainfrom
test/wire-compat

Conversation

@wavekat-eason

Copy link
Copy Markdown
Contributor

Old consumer builds stay installed for months and the platform deploys first, so the wire types have to read both older and newer payloads. This adds tests for that (companion to #74).

  • tests/wire_compat.rs plus fixtures under tests/fixtures//.json: payloads in the shape earlier releases used (e.g. a call record before deleted_at, a heartbeat before the fleet fields). They must parse with later fields left None, and again with an unknown field injected into every object. Types a client sends are round-tripped to check unset optionals are omitted, never sent as null. Fixtures are add-only, as the header comment says.
  • fix: ShareStateResponse is returned by a public method but was not exported from the crate root, so consumers could not name it. Additive.

No other code changed. Open points, not changed here because they would break consumers:

  • Closed enums (call direction, disposition, end reason, codec, flow outcome, share visibility, party masking, transcript channel, prompt format/preset) fail the whole response on an unknown value. Only VoiceTransport has a fallback. Adding one is a breaking change for exhaustive matches unless the enums are made non_exhaustive first.
  • DeletionPreview counts are required, so a payload from before accounts/labelSets were added no longer parses.

@wavekat-eason
wavekat-eason merged commit e901434 into main Oct 18, 2026
1 check passed
@wavekat-eason
wavekat-eason deleted the test/wire-compat branch October 18, 2026 01:00
@github-actions github-actions Bot mentioned this pull request Oct 18, 2026
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