The SDK has two public output contracts: the exported API surface (types plus named exports) and the wire requests it sends to B2. The API-surface half is already tracked by #52 (API-surface / SemVer gate). The wire half is not pinned anywhere: the simulator asserts behavior (round-trips), but nothing locks the exact request shape RawClient emits per endpoint, so an accidental change to a header name, an encoding, or a JSON field can pass the whole suite unnoticed.
Proposal: add snapshot tests that capture, for each RawClient native endpoint, the exact outbound request: method, URL path, header set (names plus encoding, with auth tokens redacted), and the serialized body. Drive them through a recording transport (or the simulator's request hook) so no network is needed.
This makes the wire contract reviewable: any diff to a snapshot shows up in code review, so a protocol-affecting change is intentional rather than silent.
Acceptance criteria:
- A snapshot test per
RawClient endpoint covering method, path, headers (redacted), and body.
- Snapshots are deterministic across runtimes (stable ordering, no timestamps/nonces leaking in) and run in the standard suite.
- A short CONTRIBUTING note on when regenerating these snapshots is expected.
Related: #52 covers the complementary API-surface / SemVer contract; this issue is strictly the on-the-wire request shape.
The SDK has two public output contracts: the exported API surface (types plus named exports) and the wire requests it sends to B2. The API-surface half is already tracked by #52 (API-surface / SemVer gate). The wire half is not pinned anywhere: the simulator asserts behavior (round-trips), but nothing locks the exact request shape
RawClientemits per endpoint, so an accidental change to a header name, an encoding, or a JSON field can pass the whole suite unnoticed.Proposal: add snapshot tests that capture, for each
RawClientnative endpoint, the exact outbound request: method, URL path, header set (names plus encoding, with auth tokens redacted), and the serialized body. Drive them through a recording transport (or the simulator's request hook) so no network is needed.This makes the wire contract reviewable: any diff to a snapshot shows up in code review, so a protocol-affecting change is intentional rather than silent.
Acceptance criteria:
RawClientendpoint covering method, path, headers (redacted), and body.Related: #52 covers the complementary API-surface / SemVer contract; this issue is strictly the on-the-wire request shape.