fix(spf): frame INCLUDE_PROPERTIES as a bare uint8 for moq-relay 0.17.0

Merged
MM
2mo ago
+28-28

Closes #58

Why

moq-relay 0.17.0 (moq-dev/moq#4610) decodes the INCLUDE_PROPERTIES subscribe parameter (0x35) as Option<bool>, which on draft-17+ is a single raw byte. Earlier relays (≤0.15.8) wrapped it in a length prefix by the odd-type parity rule, and our codec matched that. mux.global now runs 0.17.0, so a subscription that sets includeProperties, or a relay forwarding the opt-out to the publisher, would hit a protocol error.

Draft-20 §10.2.21 also calls the value a uint8, so this brings the codec in line with both the spec and the relay.

Change

  • collectParameterEntries / decodeMessageParameters: 0x35 is now one byte; values other than 0/1 are still rejected.
  • Tests pin the 0.17.0 wire bytes (01 35 00) and update the parameter-alignment vector after LARGEST_OBJECT.
  • .agents/plans/moq-transport-20-migration.md: replaced the "keep it length-prefixed" notes.

There's no fallback for older relays: one byte can't reliably tell you which framing the peer used. Nothing in the player or publisher sets includeProperties today, so existing sessions don't change.

Verification

  • pnpm -F @videojs/spf test: 136 files / 2399 tests pass.
  • Checked against rs/moq-net/src/ietf/{subscribe,parameters}.rs at moq-relay-v0.17.0 (bool param = raw byte from draft-17).

🤖 Generated with Claude Code


Summary by cubic

Changes the INCLUDE_PROPERTIES (0x35) subscribe parameter to encode and decode as a bare uint8 instead of a length-prefixed byte, matching moq-relay 0.17.0 (moq-dev/moq#4610) and draft-20 §10.2.21. Values other than 0/1 are still rejected.

  • No fallback for older relays is possible since a single byte can't reveal the framing.
  • Nothing in the player or publisher sets includeProperties, so existing sessions are unaffected.
  • Tests pin the 0.17.0 wire bytes for both 0 and 1, and the migration plan marks the parity framing historical.

Closes #58.