cultmesh-rs: send the capped frame's answer reliably and end the session once it is acknowledged #48
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/rs-capped-answer-reliable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up
capped-answer-delivery-ts-rs-cs, Rust; Python isfe73795d, TS is #47. The capped (8th) unreadable frame or refused delete was answered unreliable and unordered with the goodbye at once, so a lost datagram left the peer without the answer. Now it is queued like any response (reliable, ordered) and resent bymaintainuntil the peer acknowledges it; the session then ends with the goodbye (end_answered_sessions, run frommaintainand at the end ofpoll_once), or after a 2 s grace. Frames behind the capped one are not served meanwhile. If the reliable queue cannot take the answer, the session ends at once with the unreliable refusal, as before.Rust keeps its rule that a refusal acknowledges nothing: the answer, its resends and the poll that carried the capped frame zero their ack fields (Python acks the capped frame; not changed here).
Not merged: it changes how the refused-delete / unreadable cap delivers its refusal, next to the write-authority path. Decisions and refusal contents are unchanged. For Heimdall.
Tests: three new (raw UDP peer: a lost answer is resent, acknowledges nothing, and the goodbye waits for its ack; an unacknowledged answer ends after the grace, not before; nothing behind the cap is served) and the two existing cap tests now drive the server through the goodbye. 11 hand mutants under prlimit as=4GiB cpu=300 (grace 0, grace 60 s, end without ack wait, end on ack only, end on deadline only, resend ack not zeroed, answer ack not zeroed, trailing ack sent, serve behind the cap, answer unreliable, no end check at poll tail): all killed (one survived until the trailing-ack assertion was added). cargo test -j1 under ulimit -v 8GB: all pass.
🤖 Generated with Claude Code
b2077fa2: Pong in the grace acknowledges nothing (ack fields zeroed on every reply while ending); deadline saturates. New tests: pong-in-grace fails without the fix; end-of-clock test kills a wrapping deadline. cargo -j1 all green. Merging on this fix per Heimdall.