Repository navigation
test(wasm): pace the read case's publisher by its reader - #5827
Conversation
|
Outcome: cause found. The REAL_TIME (zero) budget drops a group superseded mid-read, and a 50 ms timer outruns a loaded runner, on lite-02 as well as IETF. Fixed by pacing the fixture's publisher by the reader. The bound is back and stricter: exactly two consecutive whole groups. Interleaved A/B on a loaded host: the old bound failed 4 of 12 runs, this PR 0 of 12. It's a draft for one maintainer decision (reader pacing vs. a wasm latency-budget API vs. a weaker assertion); see the description. (Written by Claude Opus 5.5) |
The fixture published a 128 KiB group every 50 ms into a subscription with the default REAL_TIME budget, which gives up on a group still arriving once a newer one lands. On a loaded runner the browser and relay deliver a group slower than that, so every group was superseded mid-read and the case read none whole. This hit lite-02 as well as IETF; the stall-then-burst in the IETF logs is the same delivery lag, not an IETF code path. The publisher now appends the next group only when the reader asks, so the case reads exactly two consecutive whole groups again and any skip fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dd58a27 to
b1aa995
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge summary: rebased on main (one conflict in the epic README's Required list; resolved by keeping main's entries and removing this quest's). The decision is settled: the maintainer chose the reader-paced fixture (option 1). CI is green, including the WASM job. Codex reviewed (Written by Claude Opus 5.5) |
Completes
/quest/m1/test-flakes-2/wasm-ietf-read.md(reopened after #5650).Cause
The fixture published a 128 KiB group every 50 ms (2.6 MB/s). The wasm subscription uses the default
Latency::REAL_TIMEbudget (max_delay0; the binding hard-codessubscribe(None)). Under that budget, a reader that parks for more bytes after a newer group has landed getsold(model/group.rspoll_expired_if_blocked,model/track.rssuperseded). On a loaded runner the browser and relay deliver a group slower than 50 ms. With TRACE on, the relay took ~150 ms to forward one group, so every group is superseded mid-read and none arrives whole.This isn't IETF-specific:
setup(lite-02) failed the same way on 2026-09-29 (run 36504066809,read 1 whole groups in 8 attempts). Its log has the same shape: group 0, an 890 ms gap, then groups 1-7 within 6 ms.oldskips on all three flavours.The earlier
unsupportedsignature (2026-10-09 to 10-12) was a relayREQUEST_ERRORon SUBSCRIBE from TRACK_STATUS. It last appeared before #5409 and #5468 merged and hasn't recurred.Change
advance(). No group is ever superseded while it is being read.expectGroupsreads exactlycountgroups and requires consecutive sequences. Any skip or short group fails. This restores the bound, stricter thancount * 4: the cause leaves no legal skip.isOld,GROUP_INTERVAL_MS, andsleep. The README case description now matches what the case does.Public API: none. Wire: none.
Evidence
Interleaved A/B on a loaded shared host (load average ~36 on 32 cores), Nix Chromium 155, the suite pinned with
tasksetalongside competing busy loops. A ismainwith the oldcount * 4bound restored; B is this PR.setup: read 0 whole groups in 8 attempts)just checkpasses.Decision
Settled by the maintainer (2026-10-17): land option 1, the reader-paced fixture. The alternatives were a latency-budget parameter on
@moq/wasmsubscribe(public API, and any finite budget can still be outrun) or asserting only what REAL_TIME promises (drops "whole groups").Follow-ups
libglib. An env override for the browser'sexecutablePathintest/wasm/driver.tswould let local runs reproduce (test: let real-time wasm reads skip freely #5650 couldn't).🤖 Generated with Claude Code
(Written by Claude Opus 5.5)