open-standards/joule-code/joule-code-rs/crates/joule-moq-room/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 7a188614b1 joule-moq-relay: count each author's audience inputs in its chain's order, not in arrival order
Each group of a member's events track rides a stream of its own, and the relay reads each
stream in a task of its own, so two inputs sent back to back reached the floor in either
order. The floor counted them as they came: with a limit of one, it could forward a member's
second input (seq 1) and refuse its first (seq 0), leaving subscribers with seq 1 and a gap at
seq 0, the opposite of what a verifier counting in chain order decides.

The floor now keeps each author's chain as it has received it (the first seq it lacks, the
seqs above it, and the inputs waiting) and decides an input once it holds every record of the
chain below it and no input below it waits. Floor::events_filter is async: an input ahead of a
gap waits, with the rest of its stream, until the gap fills or the floor's hold runs out
([floor] hold_ms, 2 000 by default). One whose hold runs out is refused input_out_of_order,
whichever object of its author's finds it so, and the chain is counted from the record after
it. An input that arrives after a later input of its author was forwarded is refused
input_out_of_order too. Floor::events_step is the synchronous step, tested with explicit
instants; Floor::waiting counts the inputs held.

Tests: tests/floor.rs sends a member's seq 1 first, waits until the relay holds it, then
sends seq 0: seq 0 forwarded, seq 1 refused input_over_limit; and seq 1 alone, refused
input_out_of_order no sooner than the hold, after which a late seq 0 is forwarded. Unit tests
cover a chat between two votes, an object whose records are out of seq order, the chain
counted from after a refused input, and an input whose stream is gone. The hardened test
from Train D is kept; its config gains `..FloorConfig::default()`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 03:56:05 -04:00
..
common WAI_RATING as a wire identifier, the CHANGELOG, SPEC §5, the READMEs, the example configuration and CI's path filters 2026-10-21 19:27:22 -04:00
age_admission.rs WAI_RATING as a wire identifier, the CHANGELOG, SPEC §5, the READMEs, the example configuration and CI's path filters 2026-10-21 19:27:22 -04:00
co_performance.rs joule-moq-relay: count each author's audience inputs in its chain's order, not in arrival order 2026-10-25 03:56:05 -04:00
room_service.rs joule-moq-web: the room page's co-watch mode and its end-to-end scenario; joule-moq-room: a watch room over HTTP and the relay 2026-10-22 03:31:07 -04:00