fix(spf): align publisher framing and tests with relay 0.14.17

Merged
MM
2mo ago
+210-92

Refs #45
Related subscriber PR: #47
Fill-serving follow-up: #46

Summary

Once a track has content, the publisher includes LARGEST_OBJECT in SUBSCRIBE_OK and REQUEST_OK. Its old length prefix is incompatible with moq-relay 0.14.17. Encode and decode Locations as two bare varints, and update the relay test hub to exercise the new upstream pull.

Changes

  • Pin fixed wire vectors for Locations and response messages, including trailing parameters/properties and truncation. INCLUDE_PROPERTIES remains length-prefixed.
  • Model relay 0.14.17's Next Object + FILL_PARAMETERS StartGroup=1 pull, including the observed subscriber priority.
  • Observe fill headers through reset/FIN and test pulls before and after content exists, followed by live delivery. The zero-buffer test transport exposes commit because writes resolve only after the peer reads them.
  • Update stale comments and migration notes, including the coordinated relay cutover.

Known limitation, tracked separately in #46: the existing publisher rejects nonempty fills when the browser lacks writer.commit(). This PR covers the framing fix and the existing reliable-reset path; it does not implement browser-compatible fill serving. Older relays' length-prefixed Locations remain incompatible, so coordinate deployment with the relay upgrade.

Testing

  • Network, playback behavior, and publisher suites: 836 tests passed.
  • Four browser cross-engine tests passed.
  • Relay-hub suite passed after updating the observed upstream priority.
  • SPF build, SPF project type check, changed-file lint/format checks, and pnpm check:workspace passed.
  • Live WebTransport pass with #47 against moqdev/moq-relay:0.14.17: initial delivery and a late subscriber receiving Largest Object {255,128} plus 129 cached objects succeeded.
  • Live publisher re-subscription after viewer cancellation reached the new fill request but was rejected with NOT_SUPPORTED: fill requires reliable stream reset in Chromium 147.0.7727.15 / Playwright 1.59.1, including with experimental web-platform features. Full live publisher re-subscription remains unverified until #46 is addressed; the protocol test used synthetic payloads.

Summary by cubic

Fixes the LARGEST_OBJECT framing mismatch from #45: the publisher now encodes and decodes it as two bare varints in SUBSCRIBE_OK and REQUEST_OK, matching moq-relay 0.14.17. Older relays' length-prefixed Locations remain incompatible, so deploy this with the relay upgrade.

Changes

  • Pins fixed wire vectors for SUBSCRIBE_OK, REQUEST_OK, trailing parameters/properties, and truncation; INCLUDE_PROPERTIES stays length-prefixed.
  • Updates the relay test hub to model 0.14.17's upstream pull: Next Object plus FILL_PARAMETERS StartGroup=1, with subscriber priority 255.
  • Adds hub tests for pulls before and after content exists, covering fill header reset and live delivery after the fill.
  • Browser-based fill serving remains blocked on writer.commit() (#46); this PR keeps the existing reliable-reset path.