GameCult.Networking: resend the capped frame's answer until acknowledged, then end the session #49

Merged
libby merged 1 commit from libby/cs-capped-answer-reliable into main 2026-11-08 11:10:54 +00:00
Member

Follow-up capped-answer-delivery-ts-rs-cs, C#; Python is fe73795d, TS is #47, Rust #48. RudpCultNetSchemaServer sent the 8th undecodable frame's message_invalid (already on the reliable channel) and called EndPeerSession in the same breath; ending clears the session's pending reliable packets, so a lost datagram was never resent. Now EndPeerSessionWhenAnswered marks the peer, and CultNetRudpSocketTransportServer.EndAnsweredPeers (run from TryReceiveOnce and PollResends) ends it with the same goodbye once the peer has acknowledged every packet or after a 2 s grace. Frames behind the capped one are not dispatched, and the peer's queued ones are dropped.

Touches no gate: the C# schema server has no write-authority path; the diff is the cap's ending only. The refusal frame and its content are unchanged.

Tests (three new, real UDP raw client): a lost capped answer is resent by PollResends and the goodbye comes only after the ack; an unacknowledged one ends after the grace; nothing behind the cap is dispatched. The existing cap test now acknowledges before the session ends. Nine hand mutants under prlimit cpu=300 and DOTNET_GCHeapHardLimit=4GiB: grace 0, grace 60 s, end without waiting (always / deadline only / ack only), no dispatch guard, end at once as before, no end check in TryReceiveOnce, none in PollResends; all killed (the 60 s one survived until the test stopped reading the grace constant it was meant to pin; the tenth pattern did not match). Networking tests: 508 pass, 4 skipped.

🤖 Generated with Claude Code

Follow-up `capped-answer-delivery-ts-rs-cs`, C#; Python is fe73795d, TS is #47, Rust #48. `RudpCultNetSchemaServer` sent the 8th undecodable frame's `message_invalid` (already on the reliable channel) and called `EndPeerSession` in the same breath; ending clears the session's pending reliable packets, so a lost datagram was never resent. Now `EndPeerSessionWhenAnswered` marks the peer, and `CultNetRudpSocketTransportServer.EndAnsweredPeers` (run from `TryReceiveOnce` and `PollResends`) ends it with the same goodbye once the peer has acknowledged every packet or after a 2 s grace. Frames behind the capped one are not dispatched, and the peer's queued ones are dropped. Touches no gate: the C# schema server has no write-authority path; the diff is the cap's ending only. The refusal frame and its content are unchanged. Tests (three new, real UDP raw client): a lost capped answer is resent by `PollResends` and the goodbye comes only after the ack; an unacknowledged one ends after the grace; nothing behind the cap is dispatched. The existing cap test now acknowledges before the session ends. Nine hand mutants under prlimit cpu=300 and DOTNET_GCHeapHardLimit=4GiB: grace 0, grace 60 s, end without waiting (always / deadline only / ack only), no dispatch guard, end at once as before, no end check in `TryReceiveOnce`, none in `PollResends`; all killed (the 60 s one survived until the test stopped reading the grace constant it was meant to pin; the tenth pattern did not match). Networking tests: 508 pass, 4 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
GameCult.Networking: resend the capped frame's answer until acknowledged, then end the session
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 8m47s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m13s
0b1a468ddd
The schema server answered the 8th undecodable frame and ended the peer's session in the same
call; ending clears the session's pending reliable packets, so a lost datagram was never
resent. The session now stays until the peer has acknowledged every answer (a lost one is
resent by PollResends) or a 2 s grace runs out, serves nothing after the capped frame
meanwhile, and then sends the goodbye.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 3915a4e5f5 into main 2026-11-08 11:10:54 +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!49
No description provided.