joule-moq-relay: reset a stream its lane was killed under; eoc-meter: wait on the child's CPU #531
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/flake-fixes-relay-energy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two tests failed intermittently on loaded CI hosts. One of them was a relay bug.
joule-moq-relay (age_rising.rs:138, linux-arm64). A rise of a rating ends the
subscriber's groups (end_groups -> kill). kill() resets the lane's stream only
when it is in the lane, but while a write is in flight the write holds it. That
write then returned it to the dead lane, the lane was removed, and a stream
dropped unreset is finished whole. So a group blocked on flow control when the
rise was held reached a viewer below the threshold whole. That breaks WAI
age-assurance §5.5 ("forwards none of that group's objects"); cancel() has the
same gap against §3.1.2's "MUST reset any open streams". on_done now resets a
returned stream whose lane died meanwhile, with the lane's code, and cancel()
records its code for that.
Reproduced on the Linux build host, 200 runs eight at a time: 14 and 11
failures before (all ten groups whole, the relay sent the slow viewer no
RESET_STREAM), 0 after (it sends four to seven). The crate's whole suite passes.
eoc-meter (process_energy.rs:229, macOS). The child test stopped
yesonce itscounter read 0.5 J and 300 ms of wall time had passed, then required 150 ms of
reaped CPU. On the loaded Studio, 300 ms of wall time gave it 130 ms. The loop
now waits on the child's own CPU (rusage, as it reads the energy) to 300 ms,
for at most 10 s, and the reaped CPU is at least that. 30 of 30 runs pass on the
Studio five at a time; clippy (-D warnings, as CI lints eoc-meter) is clean.
Public-name check: clean.
🤖 Generated with Claude Code
Two tests failed intermittently on loaded CI hosts. One of them was a relay bug. joule-moq-relay (age_rising.rs:138, linux-arm64). A rise of a rating ends the subscriber's groups (end_groups -> kill). kill() resets the lane's stream only when it is in the lane, but while a write is in flight the write holds it. That write then returned it to the dead lane, the lane was removed, and a stream dropped unreset is finished whole. So a group blocked on flow control when the rise was held reached a viewer below the threshold whole. That breaks WAI age-assurance §5.5 ("forwards none of that group's objects"); cancel() has the same gap against §3.1.2's "MUST reset any open streams". on_done now resets a returned stream whose lane died meanwhile, with the lane's code, and cancel() records its code for that. Reproduced on the Linux build host, 200 runs eight at a time: 14 and 11 failures before (all ten groups whole, the relay sent the slow viewer no RESET_STREAM), 0 after (it sends four to seven). The crate's whole suite passes. eoc-meter (process_energy.rs:229, macOS). The child test stopped `yes` once its counter read 0.5 J and 300 ms of wall time had passed, then required 150 ms of reaped CPU. On the loaded Studio, 300 ms of wall time gave it 130 ms. The loop now waits on the child's own CPU (rusage, as it reads the energy) to 300 ms, for at most 10 s, and the reaped CPU is at least that. 30 of 30 runs pass on the Studio five at a time; clippy (-D warnings, as CI lints eoc-meter) is clean. Co-Authored-By: Claude Opus 5.5 <[email protected]>