Bump the rtc pin to a1566b7 (send rejection + ordered default) - #131
Conversation
Moves the [patch.crates-io] rev from a10cd2c to a1566b7, picking up the two upstream data-channel fixes landed since: * webrtc-rs/rtc#138 — RTCDataChannel::send returned Ok(()) for a message the write path then discarded (channel connecting, or already closed), and charged outstanding_bytes that nothing would release. That counter is what the in-guest close drain polls to decide a channel has flushed. * webrtc-rs/rtc#140 — RTCDataChannelInit::ordered defaulted to false against its own docs and the W3C dictionary. Note #138 changes send's contract: a send on a connecting channel now returns ErrDataChannelNotOpen where it previously reported success.
|
CI matrix is red, but not from this change. Both runs failed on the same cell — Two reasons it can't be the pin:
What did carry signal: the only failing cell in both runs was that one pair — every Landing #116 should take this pair's flake rate down and make the matrix a useful gate again. |
|
Correction to my "Why it matters beyond the changelog" claim above: the Instrumented the wasip3 channel drain (
Unchanged — the difference is run-to-run noise, and neither approaches the 1 s The reason there was never a leak to fix here: That does not weaken the case for the bump: #138 still closes a real silent-loss hole for any consumer that doesn't gate sends the way this provider does, and #140 removes a latent trap for anyone using |
rtc 0.20.0 shipped on crates.io (2026-07-31) as a strict descendant of the pinned commit a1566b7, so all three fixes the [patch.crates-io] redirect existed for — the srflx source-address fix (webrtc-rs/rtc#136), send rejection on unwritable channels (#138), and the ordered default (#140) — are in the release, along with the earlier empty-message receive fix (#131). Drop the patch, bump the workspace rtc pin and the Wasmtime host's webrtc dependency from 0.20.0-rc.4 to 0.20.0. The 17 commits between the pin and the release are DTLS fingerprint/cipher-suite fixes, a TURN ICE-restart fix, the interceptor object-safety refactor (media path; no data-channel API change), docs, and an rkyv bump. Gates: just check, just test, examples::test-webrtc-composed, and the full conformance run (loopback + interop, 304 results, 0 failing, matrices unchanged) all pass. Closes #120.
Moves the
[patch.crates-io]rev froma10cd2ctoa1566b7— the two upstream data-channel fixes landed since our pin, both silent-data-loss bugs.What's in the bump
webrtc-rs/rtc#138 — reject sends the write path cannot carry out.
RTCDataChannel::sendonly checked that the channel was registered (true fromcreate_data_channelon). Whether its SCTP stream existed was checked later inhandle_write, on the pipeline's write pass, where anErris logged and discarded — so the caller gotOk(())for a message dropped on the floor. Now returnsErrDataChannelNotOpenwhileconnecting,ErrDataChannelClosedonce gone.webrtc-rs/rtc#140 —
ordereddefaults totrue.RTCDataChannelInitderivedDefault, soorderedcame outfalse, contradicting its doc comment and the W3C dictionary. We don't take that path (wasip3-implalways passesorderedexplicitly and defaults its own config totrue), so this is a latent-trap fix rather than a behavior change here.Why it matters beyond the changelog
#138 also stops a rejected send from charging
outstanding_bytes— bytes that never entered the SCTP pipeline, so nothing ever released them. That counter is exactly what the in-guest close drain polls (wasip3-impl/src/runtime.rs:397,channel_outstanding_bytes(id) == 0) to decide a channel has flushed. A leaked counter means the predicate can never go true and every close burns its full bounded window — which is the "every close pays the full grace even when nothing is queued" symptom described in #126. Worth re-measuring close latency against that issue once this lands.Risk
#138 changes
send's success contract: a send on aconnectingchannel now errors where it previously reported success. Upstream is explicit that this diverges from W3C (which prescribes buffering), calling it the smallest step that stops the silent loss. The exposed surface here is the wasip3 provider's error mapping and any test that sends before open —post-close-sendand the open/send-race shapes.Verification
Local, on this rev:
just clippy,just test,just examples::test-webrtc-composedgreen; both directrtcconsumers pass the full loopback corpus 37/37 (just conformance::wasip3,just conformance::wasmtime).Not covered locally: the interop pairs and the browser/Node targets — left to CI. Note the
reference-x-*channel-close-flushshapes are the known flake family (#117, #124), so a red matrix on those is not necessarily this bump.Sequencing
#116 also moves this pin — to
lann/rtcrev353a84a(= olda10cd2c+ thelann/rtc#1reset-reassembly cherry-pick, still not upstreamed). These two will conflict. Suggested order: land #116 first, then rebase its fork ontoa1566b7and rebase this away; or land this and re-cut the fork froma1566b7.Related: #120 (unwind the pin entirely) stays blocked — upstream's latest release is still
v0.20.0-rc.4, which predates even the old pin.