GameCult.Networking: answer an undecodable RUDP frame message_invalid and end the session at 8 in a row #46

Merged
libby merged 1 commit from libby/cs-refused-frames-cap into main 2026-11-08 09:47:22 +00:00
Member

Heimdall's parity ruling (2026-11-08), C# side; Rust #43 (4828c416), TS #44, Python #45. C# is the odd one out: RudpCultNetSchemaServer ended the session on the first undecodable frame. It now answers message_invalid (details.field = "message") and keeps the session; RudpCultNetSchemaServer.MaxConsecutiveRefusedFrames = 8 consecutive undecodable frames end it after the 8th is answered. Any decoded frame resets the run. Handler faults still end the session at once (unchanged).

No write-authority decision is touched: the change is in the transport dispatch, below the database server. Not done here: the refused-delete half of the ruling. CultNetDatabaseServer.HandleDeleteAsync answers write_not_authorized inside the handler, where the dispatcher cannot count it or end a session; that needs a handler-to-dispatch signal (follow-up filed).

Tests: three changed (a bad frame is now answered and kept; a frame queued behind it is handled; the poll-input class doc) and EightConsecutiveUndecodableFramesEndTheSessionAfterTheEighthIsAnswered (cap pinned at 8, 6 more answered, a valid frame resets, 7 more answered, 8th answered then ended). Four hand mutants fail it (cap 7, cap 9, run never resets, run never counts). Mutants ran under prlimit --cpu=500 and DOTNET_GCHeapHardLimit=4GiB; prlimit --as was not used because the .NET runtime reserves far more address space than it uses. GameCult.Networking.Tests 505 pass, GameCult.Mesh.Tests 342 pass.

🤖 Generated with Claude Code

Heimdall's parity ruling (2026-11-08), C# side; Rust #43 (4828c416), TS #44, Python #45. C# is the odd one out: `RudpCultNetSchemaServer` **ended the session on the first undecodable frame**. It now answers `message_invalid` (`details.field = "message"`) and keeps the session; `RudpCultNetSchemaServer.MaxConsecutiveRefusedFrames = 8` consecutive undecodable frames end it after the 8th is answered. Any decoded frame resets the run. Handler faults still end the session at once (unchanged). No write-authority decision is touched: the change is in the transport dispatch, below the database server. **Not done here:** the refused-delete half of the ruling. `CultNetDatabaseServer.HandleDeleteAsync` answers `write_not_authorized` inside the handler, where the dispatcher cannot count it or end a session; that needs a handler-to-dispatch signal (follow-up filed). Tests: three changed (a bad frame is now answered and kept; a frame queued behind it is handled; the poll-input class doc) and `EightConsecutiveUndecodableFramesEndTheSessionAfterTheEighthIsAnswered` (cap pinned at 8, 6 more answered, a valid frame resets, 7 more answered, 8th answered then ended). Four hand mutants fail it (cap 7, cap 9, run never resets, run never counts). Mutants ran under `prlimit --cpu=500` and `DOTNET_GCHeapHardLimit=4GiB`; `prlimit --as` was not used because the .NET runtime reserves far more address space than it uses. GameCult.Networking.Tests 505 pass, GameCult.Mesh.Tests 342 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
GameCult.Networking: answer an undecodable RUDP frame message_invalid and end the session at 8 in a row
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 7m10s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m20s
89bbb277bd
Heimdall's parity ruling. The schema server ended a peer's session on the first
frame it could not decode. It now answers message_invalid (field "message") and
keeps the session; RudpCultNetSchemaServer.MaxConsecutiveRefusedFrames (8)
consecutive undecodable frames end it after the last is answered, and any
decoded frame resets the run. Handler faults still end the session at once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 51d2d0cf46 into main 2026-11-08 09:47:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!46
No description provided.