From c15e81d699f36c0630d6d235c4d5b81ba376b4d0 Mon Sep 17 00:00:00 2001 From: QQ Date: Sat, 14 Nov 2026 14:42:44 +0800 Subject: [PATCH] Import fixtures/protocol/v1/README.md --- fixtures/protocol/v1/README.md | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 fixtures/protocol/v1/README.md diff --git a/fixtures/protocol/v1/README.md b/fixtures/protocol/v1/README.md new file mode 100644 index 0000000..40dde45 --- /dev/null +++ b/fixtures/protocol/v1/README.md @@ -0,0 +1,35 @@ +# Protocol v1 Conformance Fixtures + +These fixtures define stable protocol examples for all implementations. + +`manifest.json` lists each fixture suite. Consumers must reject unknown fixture format versions. + +Each case has a unique name, an operation, an input, and an expected result. + +An accepted case can include `value`. Consumers must compare that value after normalization. + +A rejected case does not define an implementation-specific error message. + +All identifiers, timestamps, keys, and tokens are synthetic. Do not add production data. + +Fixture files must remain valid JSON. Do not use comments or language-specific numeric values. + +## Operations + +- `parseControlFrame` validates one Control frame. +- `selectProtocolVersion` selects the highest common protocol version. +- `selectCapabilities` selects supported capabilities in supported-list order. +- `acceptNegotiatedCapabilities` validates the Server capability selection. +- `parseDeviceRegistrationRequest` validates an account or owned-role registration request. +- `parseHostRegistrationCodeRequest` validates a Host registration-code request. +- `parseDeviceRefreshRequest` validates a device token refresh request. +- `parseDeviceTokenPair` validates device access and refresh credentials. +- `parseBrowserAuthorizationExchangeRequest` validates a Browser credential exchange request. +- `parseBrowserAuthorizationExchangeResponse` validates Browser device credentials and account data. +- `parseRpcErrorPayload` validates one Remote RPC error payload. +- `encodeControlFrameWithLimits` validates and encodes a Control frame with negotiated limits. +- `decodeControlFrameWithLimits` decodes a Control frame with negotiated limits. + +`selected: null` represents no common protocol version. + +An omitted `negotiated` field represents a legacy Server without a capability list.