Pair the golden sequence and hex lines instead of matching independently

Found by a second real failure, this time on Windows: `dotnet test --logger
"console;verbosity=detailed"` prints a passed test's TestContext.Out lines
twice (live-streamed, then again under "Standard Output Messages:"), and
matching CULTMESH_GOLDEN_SEQUENCE and CULTMESH_GOLDEN_HEX with two
independent regexes let the harness pair a sequence from one copy with a hex
from the other, producing a spurious mismatch even though the C# and
TypeScript sides agreed. One regex now requires them adjacent, exactly as
the C# test's two back-to-back WriteLine calls print them. All four QUIC
interop lanes now pass on Windows (real dotnet test run, native connector
lane included).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-23 15:24:21 +02:00
commit fd2a701bb2

View file

@ -548,12 +548,16 @@ test("CultMesh QUIC realtime: TypeScript provider and C# managed connector, with
assert.match(stdout, /Passed:\s*1/, `expected exactly one passed test.\n${stdout}`);
assert.doesNotMatch(stdout, /Skipped:\s*1/, `the env var should have made the test run, not skip.\n${stdout}`);
const goldenHexMatch = /CULTMESH_GOLDEN_HEX=([0-9A-Fa-f]+)/.exec(stdout);
const goldenSequenceMatch = /CULTMESH_GOLDEN_SEQUENCE=(\d+)/.exec(stdout);
assert.ok(goldenHexMatch, `expected the C# test to print its golden hex line.\n${stdout}`);
assert.ok(goldenSequenceMatch, `expected the C# test to print which sequence it received.\n${stdout}`);
const csharpHex = goldenHexMatch![1].toLowerCase();
const csharpSequence = Number(goldenSequenceMatch![1]);
// `dotnet test --logger "console;verbosity=detailed"` prints a passed
// test's TestContext.Out lines twice (once live-streamed, once again under
// "Standard Output Messages:"), so matching SEQUENCE and HEX independently
// risks pairing a sequence from one copy with a hex from the other. The C#
// test writes them as one WriteLine call each, back to back; requiring them
// adjacent guarantees whichever pair matches first is self-consistent.
const goldenMatch = /CULTMESH_GOLDEN_SEQUENCE=(\d+)\s*\r?\n\s*CULTMESH_GOLDEN_HEX=([0-9A-Fa-f]+)/.exec(stdout);
assert.ok(goldenMatch, `expected the C# test to print its golden sequence and hex lines together.\n${stdout}`);
const csharpSequence = Number(goldenMatch![1]);
const csharpHex = goldenMatch![2].toLowerCase();
// Which frame the managed connector's single ReceiveAsync() call actually
// got is not pinned to frame 1: latest-only coalesces on both the