joule-moq speaks draft-ietf-moq-transport-23 (2 November 2026) beside -22, -18 and -16, in a codec module of its own (draft23) with a bridge to the -22 model the rest of the crate is written in, which made the smaller diff. -23 is offered and chosen first. Each change of -23's §A.1 is implemented and tabled in the README with how the bridge carries it: the varint control-message Length and MAX_CONTROL_MESSAGE_SIZE, FETCH answered by REQUEST_OK, REQUEST_ERROR's Error Details, NAMESPACE's parameters, PAUSED for FORWARD, SUBSCRIBE_TRACKS_ID, the counted FILL_PARAMETERS and the new parameter lists, non-empty Track Names, GOAWAY from a request's receiver only, the fetch stream's new encoding (Object ID Delta + 2, delta-coded End of Range, End of Gone Range, End of Group, End of Track), property scope and repetition, grease outside the Mandatory range, and the session codes that replace PROTOCOL_VIOLATION. The -23 corpus holds 119 vectors; moqt23_check.py, a second decoder written from -23's text, reads all of them, and its 66 negative vectors (the planted faults, each -22 form a -23 endpoint meets among them) are each refused with -23's code; joule-code-conformance runs it. The relay bridges -23 sessions over QUIC, WebTransport and the WebSocket binding, allows a -23 session overlapping namespace subscriptions, closes one whose requester sends GOAWAY on its own request stream, and records each session's real draft in its summary. The interop client, the ingest gateway (`[relay] draft`) and the browser client (`setDraft`, `moqt=23`) speak -23; local.sh runs every draft and pair on a relay bound to port 0, and counts a tampered run as refused only on the client's own verdict. joule-moq and joule-moq-relay are clippy-clean. Co-Authored-By: Claude Opus 5.5 <[email protected]>
57 lines
2.5 KiB
Shell
Executable file
57 lines
2.5 KiB
Shell
Executable file
#!/bin/bash
|
|
# joule-moq-interop against joule-moq-relay on this host: every test at each draft, and
|
|
# wai-receipts across drafts. No network beyond loopback.
|
|
# scripts/local.sh <target-dir>
|
|
# The relay binds a port the system chooses (127.0.0.1:0) and logs the address it bound,
|
|
# which this script reads; it and its files are gone before this script is.
|
|
set -u
|
|
T=${1:-target}
|
|
for b in wai-relay joule-moq-interop; do
|
|
[ -x "$T/debug/$b" ] || { echo "no $T/debug/$b: build it first (cargo build -p joule-moq-relay -p joule-moq-interop)"; exit 2; }
|
|
done
|
|
W=$(mktemp -d)
|
|
printf 'quic_listen = "127.0.0.1:0"\n' > "$W/relay.toml"
|
|
"$T/debug/wai-relay" --config "$W/relay.toml" > "$W/relay.log" 2>&1 &
|
|
R=$!
|
|
trap 'kill $R 2>/dev/null; wait $R 2>/dev/null; rm -rf "$W"' EXIT
|
|
ADDR=
|
|
for _ in $(seq 1 100); do
|
|
ADDR=$(sed -n 's/.*WebTransport (h3) on udp \([0-9.:]*\),.*/\1/p' "$W/relay.log" | head -1)
|
|
[ -n "$ADDR" ] && break
|
|
kill -0 $R 2>/dev/null || { cat "$W/relay.log"; echo "the relay did not start"; exit 1; }
|
|
sleep 0.1
|
|
done
|
|
[ -n "$ADDR" ] || { cat "$W/relay.log"; echo "the relay logged no address in 10 s"; exit 1; }
|
|
URL=moqt://$ADDR/moq
|
|
echo "relay on $ADDR"
|
|
rc=0
|
|
for d in 23 22 18 16; do
|
|
echo "== draft $d"
|
|
"$T/debug/joule-moq-interop" --relay $URL --draft $d --tls-disable-verify || rc=1
|
|
"$T/debug/joule-moq-interop" --relay $URL --draft $d --tls-disable-verify --test wai-receipts || rc=1
|
|
done
|
|
# The same relay over WebTransport, offering one draft at a time.
|
|
for d in 23 22 18 16; do
|
|
echo "== draft $d over WebTransport"
|
|
"$T/debug/joule-moq-interop" --relay https://$ADDR/moq --draft $d --tls-disable-verify --test wai-receipts || rc=1
|
|
done
|
|
for pair in "23 22" "22 23" "23 18" "16 23" "16 22" "22 16" "18 16" "16 18"; do
|
|
set -- $pair
|
|
echo "== wai-receipts publisher $1, subscriber $2"
|
|
"$T/debug/joule-moq-interop" --relay $URL --draft $1 --sub-draft $2 --tls-disable-verify --test wai-receipts || rc=1
|
|
done
|
|
# The check must fail when the receipts or the objects are not what was signed.
|
|
for d in 23 18; do
|
|
for t in payload receipt in-flight; do
|
|
echo "== wai-receipts at draft $d, tamper $t (must fail)"
|
|
"$T/debug/joule-moq-interop" --relay $URL --draft $d --tls-disable-verify --test wai-receipts --tamper $t
|
|
got=$?
|
|
# 1 is the client's own verdict, a test that failed; anything else is not a refusal.
|
|
if [ $got -eq 1 ]; then
|
|
echo "tamper $t at $d: refused, as it must be"
|
|
else
|
|
echo "FALSIFICATION FAILED: tamper $t at $d exited $got"; rc=1
|
|
fi
|
|
done
|
|
done
|
|
exit $rc
|