Fix the golden-bytes lane to match by sequence, not assume frame 1

Found by a real failure on the Linux verification container: latest-only
coalesces on both the provider's outbox and the managed connector's own
receive-side inbox, so a single ReceiveAsync() call is not guaranteed to
land on the first frame broadcast — on a slower host it landed on sequence 3.
The C# test now also prints CULTMESH_GOLDEN_SEQUENCE, and the harness looks
up the TypeScript peer's logged encoding of that same sequence instead of
hardcoding sent === 1.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-23 15:21:03 +02:00
commit 92f2566d2c
2 changed files with 21 additions and 9 deletions

View file

@ -193,7 +193,14 @@ public sealed class CultMeshQuicRealtimeTransportTests
frame.BodyId.Should().NotBeNullOrWhiteSpace();
frame.Payload.Should().NotBeEmpty();
// Which frame this actually is is not pinned to the provider's
// first broadcast: latest-only coalesces on both the provider's
// outbox and this connector's own receive-side inbox, so a
// single ReceiveAsync() can land on whichever sequence was
// latest by the time it was called. The harness matches by
// sequence rather than assuming the first frame sent.
var hex = Convert.ToHexString(CultMeshRealtimeWireProtocol.EncodeFrame(frame));
TestContext.Out.WriteLine($"CULTMESH_GOLDEN_SEQUENCE={frame.Sequence}");
TestContext.Out.WriteLine($"CULTMESH_GOLDEN_HEX={hex}");
}
finally