| Filename | Latest commit message | Latest commit date |
|---|---|---|
RudpCultNetSchemaServer decoded each schema frame outside its per-message backstop, so a malformed payload (0xc1) or a well-formed message with an unknown schemaVersion threw MessagePackSerializationException out of PollAvailableAsync and PollOnceAsync. The drain aborted: a good peer's request in the same drain went unserved, a consumer loop that did not catch died, and the bad frame was already acknowledged while its peer stayed connected. Decoding now runs inside the backstop. A peer whose message cannot be decoded or handled has its session ended: the transport's new EndRefusedPeer sends the refusal goodbye under the gate, counts the drop in PacketsDropped, drops that peer's frames still queued, forgets the peer and raises PeerDisconnected. A session that already ended (replaced by a new Connect, or ended by a send failure) gets no goodbye, since the endpoint may belong to a new session. Other peers in the drain are still served. Ending the session matches cultmesh-py's server, where one peer's bad message ends that peer; runtime parity is the reason. The log names the fault's type only and never its message, because the decoder's message quotes the peer's input (the unknown schemaVersion). The dispatch-backstop test now asserts that rule instead of the handler message it used to require. Tests, each failing on the pre-fix code: a malformed payload and an unknown schemaVersion each leave the good peer served without Poll throwing (also through PollOnceAsync); the bad peer's session ends, counted and told; the log carries the type and not the canary value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .. | ||
| CultCachePublicationIsolationTests.cs | ||
| CultNetCanonicalNumberTests.cs | ||
| CultNetDocumentBindingResolverTests.cs | ||
| CultNetDocumentRegistryVariantTests.cs | ||
| CultNetJournalTests.cs | ||
| CultNetOperationServerTests.cs | ||
| CultNetPublicationOrderTests.cs | ||
| CultNetPublishesCommitsTests.cs | ||
| CultNetRudpConnectGenerationTests.cs | ||
| CultNetRudpOrderedDeliveryTests.cs | ||
| CultNetRudpSchemaServerPeerInputTests.cs | ||
| CultNetRudpSendFailureTests.cs | ||
| CultNetRudpSessionEndingTests.cs | ||
| CultNetSchemaContractTests.cs | ||
| CultNetSchemaServerGroupTests.cs | ||
| CultNetSelectionEvaluatorTests.cs | ||
| CultNetSelectionFixBatchTests.cs | ||
| CultNetSelectionPageTests.cs | ||
| CultNetSelectionSurvivorTests.cs | ||
| GameCult.Networking.Tests.csproj | ||
| MiniJsonSchemaValidator.cs | ||
| NetworkingTests.cs | ||
| README.md | ||
| SelectionParityVectorTests.cs | ||
| SelectionWireParityTests.cs | ||
| SoulP4cProbeTests.cs | ||
| SoulP4dProbeTests.cs | ||
| SoulP4ProbeTests.cs | ||
| SoulPub3Tests.cs | ||
GameCult.Networking.Tests
GameCult.Networking.Tests contains NUnit tests for the networking library.
Scope
The tests currently cover:
- AES-GCM encrypt/decrypt round-trips in
Secret - signed session-token validation
- signed session-token tamper detection
- signed session-token expiry handling
Run
dotnet test tests\GameCult.Networking.Tests\GameCult.Networking.Tests.csproj
Adding New Tests
Typical future areas to expand include:
- client reconnect and verify flows
- login and registration integration tests
- malformed message handling
- rate-limiting behavior under concurrency