joule-moq-ingest: the SRT test's burst of losses mid-stream, not where the publisher closes #548

Merged
dcharlot merged 1 commit from test/srt-burst-mid-stream into main 2026-10-30 09:02:54 -04:00
Owner

an_srt_publisher_reaches_a_relay_subscriber_with_every_receipt failed in main's run for #538's merge (afd1c246), in the conformance gate's joule-moq-ingest, every target job:

the last part ends the session as the publisher ended it: last=true ended=2

ended=2 is IDLE: the gateway ended the session on its 5 s idle timeout, so it never saw the publisher's shutdown. That one test took about 10 s, which is the close plus the 5 s idle timeout.

Why

The test's proxy drops datagrams by their index, using a seeded generator (3% each way). It also drops a fixed burst of six toward the gateway, at indices 200–205. The publisher sends three SHUTDOWNs back to back when it closes. I added a temporary, uncommitted counter and ran the test 20 times on Linux: the publisher closed after 211–215 datagrams every time, with no SHUTDOWN dropped.

The generator is deterministic per index, so the drop pattern can be computed exactly. Past index 190, the only three consecutive drops are the burst. When a host sends a few datagrams fewer before the close, so it closes at index 200–203, all three SHUTDOWNs fall in the burst and the gateway ends the session as idle.

The change

The burst moves to indices 100–105, mid-stream among the data, with a comment saying why. With it there:

  • no three consecutive indices from 106 to 399 are dropped, so a SHUTDOWN reaches the gateway wherever the close falls;
  • 19 datagrams are still dropped before index 211, against the test's floor of 10;
  • the test still counts the first sends of data the path lost (at least 2), and checks that each was recovered.

Checked

  • The failing commit, unchanged: the test passed 20 of 20 on the M3 Ultra and 20 of 20 on Linux (instrumented). It is rare, not systematic.
  • With this change, the whole contrib_srt test file (5 tests), 20 runs each on Linux and on the M3 Ultra: 40 of 40 passed (5 of 5 tests in each).

🤖 Generated with Claude Code

`an_srt_publisher_reaches_a_relay_subscriber_with_every_receipt` failed in main's run for #538's merge (`afd1c246`), in the conformance gate's `joule-moq-ingest, every target` job: ``` the last part ends the session as the publisher ended it: last=true ended=2 ``` `ended=2` is `IDLE`: the gateway ended the session on its 5 s idle timeout, so it never saw the publisher's shutdown. That one test took about 10 s, which is the close plus the 5 s idle timeout. ## Why The test's proxy drops datagrams by their index, using a seeded generator (3% each way). It also drops a fixed burst of six toward the gateway, at indices 200–205. The publisher sends three SHUTDOWNs back to back when it closes. I added a temporary, uncommitted counter and ran the test 20 times on Linux: the publisher closed after 211–215 datagrams every time, with no SHUTDOWN dropped. The generator is deterministic per index, so the drop pattern can be computed exactly. Past index 190, the only three consecutive drops are the burst. When a host sends a few datagrams fewer before the close, so it closes at index 200–203, all three SHUTDOWNs fall in the burst and the gateway ends the session as idle. ## The change The burst moves to indices 100–105, mid-stream among the data, with a comment saying why. With it there: - no three consecutive indices from 106 to 399 are dropped, so a SHUTDOWN reaches the gateway wherever the close falls; - 19 datagrams are still dropped before index 211, against the test's floor of 10; - the test still counts the first sends of data the path lost (at least 2), and checks that each was recovered. ## Checked - The failing commit, unchanged: the test passed 20 of 20 on the M3 Ultra and 20 of 20 on Linux (instrumented). It is rare, not systematic. - With this change, the whole `contrib_srt` test file (5 tests), 20 runs each on Linux and on the M3 Ultra: 40 of 40 passed (5 of 5 tests in each). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
joule-moq-ingest: the SRT test's burst of losses mid-stream, not where the publisher closes
All checks were successful
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 13s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 9s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Successful in 39s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m14s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 3m34s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 3m37s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Successful in 6m1s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 7m32s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m52s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 8m48s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 9m26s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 9m41s
6af626b700
an_srt_publisher_reaches_a_relay_subscriber_with_every_receipt failed on main
(afd1c246): the last part ended the session as idle (2), not by the
publisher's shutdown (1).

The proxy's losses are a function of the datagram's index, from a seeded
generator, plus a burst of six fixed indices toward the gateway, 200 to 205. The
publisher closes after 211 to 215 datagrams (20 runs on Linux, instrumented)
and sends its three SHUTDOWNs back to back. Past index 190, the burst is the
only run of three consecutive losses. A host that sends a few datagrams fewer
before the close puts all three SHUTDOWNs in it, and the gateway ends the
session by its 5 s idle timeout. The failing run took about 10 s, the close plus
that timeout.

The burst is now at 100 to 105, mid-stream among the data. With it there, no
three consecutive indices from 106 to 399 are lost, so a SHUTDOWN reaches the
gateway wherever the close falls. 19 datagrams are still lost before index 211,
and the test still finds and counts the first sends of data the path lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!548
No description provided.