| Filename | Latest commit message | Latest commit date |
|---|---|---|
CultNetErrorMessage is a MessagePack-CSharp map-mode object, so every declared key is written on the wire, nil included - the same fact R-S already established for the raw document header. cultnet.error.schema.json was missing routingHint entirely and typed code/details as always-present non-null values; Soul's P7 found real bytes failing it on exactly this. routingHint, code and details are now `required`, with nullable types matching CultNetErrorMessage/CultNetErrorDetails. A new test decodes real bytes for all four refusal codes (selection_invalid, cursor_stale, cursor_invalid, reference_outside_target) against the schema. MiniJsonSchemaValidator: - implements minimum, maximum, maxLength and maxItems, which were declared in committed schemas (fieldPredicate's number pattern, selection.limit, ...) but silently never checked; - anchors `pattern` to a full match (Index==0 && Length==value.Length) instead of Regex.IsMatch's "search anywhere", so .NET's `$` (which, unlike ECMA-262's, matches immediately before one trailing newline even without RegexOptions.Multiline) can no longer let e.g. "5\n" pass a schema author wrote as "exactly one digit"; - refuses a schema node that uses a keyword this validator gives no constraint semantics to, instead of silently ignoring it. Running every committed contracts/cultnet/*.schema.json schema through this found 12 such uses, none reached by any existing test: `allOf`/`if`/`then`/`else` in cultnet.database-change-raw.schema.json, and `uniqueItems` (six places) plus one `anyOf` in the cultmesh.verse-catalog-*.schema.json pair. contentEncoding, $schema/$id/$defs/title/description/default and the x-cult-runtime-type vendor extension are treated as metadata with no constraint semantics to implement, not refused. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
| .. | ||
| CultNetCanonicalNumberTests.cs | ||
| CultNetDocumentBindingResolverTests.cs | ||
| CultNetOperationServerTests.cs | ||
| CultNetSchemaContractTests.cs | ||
| CultNetSchemaServerGroupTests.cs | ||
| CultNetSelectionEvaluatorTests.cs | ||
| CultNetSelectionFixBatchTests.cs | ||
| CultNetSelectionPageTests.cs | ||
| GameCult.Networking.Tests.csproj | ||
| MiniJsonSchemaValidator.cs | ||
| NetworkingTests.cs | ||
| README.md | ||
| SelectionParityVectorTests.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