2da1885975
The previous run pinned the production failure to "82/100 frames at 20 ms cadence two-users, all 18 trailing groups lost; publisher.send returned true for every frame". To narrow the cause the next run needs to vary one dimension at a time and dump rich per-frame data, so we can attribute the loss to: - QUIC stream-credit (RTT-bound) vs absolute count cap - Per-stream-creation cost vs per-byte cost - Listener-side buffer overflow vs relay-side drop - Steady-state vs initial-burst behaviour - Shared end-of-stream FIN flush race vs prod-only loss SendTraceScenario.kt: shared per-frame instrumented pump driver. Records publisher.send Boolean per frame, send latency, endGroup exceptions, arrivals per subscriber with wall-clock timing, missing-objectId run lengths, send-latency p50/p99/max + count of >1ms sends. Verbose logging (InteropDebug.checkpoint) emits one line per tx and one per rx so the JUnit XML system-out doubles as a timing trace. Sweep methods (mirrored prod-mode and harness-mode): - baseline 100×20ms (reproduce known cliff) - cadence sweep: 5 / 10 / 40 / 80 / 200 ms (RTT-dependent?) - burst (no cadence) 100 frames (max inflight) - frame-count sweep: 50 / 200 / 400 - payload sweep: 1 KB / 4 KB / 16 KB - frames-per-group: 5 / 20 / 100 (uni-stream vs bytes) - late subscribe at frame 25, frame 50 (from-latest semantics) - mid-pump 5 s pause after frame 50 - 2-, 3-subscriber fan-out - 50 ms slow-consumer listener (per-subscription buffer overflow) - long-run 30 s and 120 s (steady-state) Each test method is a one-line Scenario literal; setup helpers withProdSpeakerAndListeners / withHarnessSpeakerAndListeners build publisher + N listeners, run the scenario, and tear down in order. Smoke-tested against the local kixelated/moq reference relay: every scenario except framesPerGroup=100 reproduces the same trailing-frame artifact (received=99/100, missing=[99]) the original test surfaced. framesPerGroup=100 receives every frame, confirming the local issue is specifically per-uni-stream FIN flushing — independent of the production 82/100 cliff.