cultmesh-ts: end a RUDP session after 8 consecutive unreadable frames or authority-refused deletes #44

Merged
libby merged 2 commits from libby/ts-refused-frames-cap into main 2026-11-08 09:52:27 +00:00
Member

Heimdall's parity ruling (2026-11-08), TS side; the Rust side is #43 (4828c416). createRudpDocumentServer already answers an unreadable frame and keeps the session; it had no cap. Adds the exported CULTMESH_RUDP_DOCUMENT_SERVER_MAX_CONSECUTIVE_REFUSED_FRAMES = 8: the 8th consecutive undecodable frame, or 8th consecutive delete the write authority refuses, is answered and then ends that peer's session (goodbye as for a refused packet). A decoded frame resets the undecodable run; a decoded frame that is not a refused delete (a granted delete, a put, ...) resets the delete run.

Touches the write-authority path (writeRefused callers count its outcome); the authority's decision itself and the refusals sent are unchanged. Left unmerged for Heimdall.

Tests: two new tests (7 answered, reset, 7 more, 8th answered then session ended; same for deletes) and one pinning the constant at 8. Six hand mutants fail them (cap 7, cap 9, unreadable never resets, non-delete never resets the delete run, granted delete never resets, delete never counts). cultmesh-ts suite 183 pass.

🤖 Generated with Claude Code

Heimdall's parity ruling (2026-11-08), TS side; the Rust side is #43 (4828c416). `createRudpDocumentServer` already answers an unreadable frame and keeps the session; it had no cap. Adds the exported `CULTMESH_RUDP_DOCUMENT_SERVER_MAX_CONSECUTIVE_REFUSED_FRAMES = 8`: the 8th consecutive undecodable frame, or 8th consecutive delete the write authority refuses, is answered and then ends that peer's session (goodbye as for a refused packet). A decoded frame resets the undecodable run; a decoded frame that is not a refused delete (a granted delete, a put, ...) resets the delete run. **Touches the write-authority path** (`writeRefused` callers count its outcome); the authority's decision itself and the refusals sent are unchanged. Left unmerged for Heimdall. Tests: two new tests (7 answered, reset, 7 more, 8th answered then session ended; same for deletes) and one pinning the constant at 8. Six hand mutants fail them (cap 7, cap 9, unreadable never resets, non-delete never resets the delete run, granted delete never resets, delete never counts). cultmesh-ts suite 183 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultmesh-ts: end a RUDP session after 8 consecutive unreadable frames or authority-refused deletes
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 QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Has been cancelled
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
621e05d552
Heimdall's parity ruling. The refusal is still answered and the session kept
below the cap; the frame that reaches CULTMESH_RUDP_DOCUMENT_SERVER_MAX_CONSECUTIVE_REFUSED_FRAMES
is answered too, then the session ends. The write-authority decision is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cultmesh-ts: count and answer a frame that decodes but is no message the parser takes
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 6m9s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m17s
23c7ce3738
A map with an unknown schemaVersion was rethrown: unanswered, uncounted toward the
session cap. It is now answered message_invalid, reported, and counted like any other
unreadable frame, so the cap holds for it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit b1d6ec098d into main 2026-11-08 09:52:27 +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!44
No description provided.