cultmesh-ts: write authority for the RUDP document server #37

Merged
libby merged 4 commits from libby/cultmesh-ts-write-authority into main 2026-11-07 20:21:27 +00:00
Member

Port of the C#/Python remote write authority to cultmesh-ts (PR B; PR A is #36).

  • createRudpDocumentServer takes writeAuthority; without one every peer put and delete is refused with the typed write_not_authorized (pinned bytes). CultMeshGrantAllWrites is the explicit opt-in.
  • The gate runs before the put is sized, resolved or decoded; the authority sees the canonical schema id and the datagram's peer. A throwing/rejecting authority or any decision other than granted:true refuses.
  • A put with wrong-typed shardId/shardEpoch is refused before the gate.
  • New document_delete case and onDocumentDeleteRaw.
  • 16 existing server tests opt in to grant-all; new test/remote-write-authority.test.ts ports the Python cases (no forwarding).
  • Each guard removed once: all 9 mutants fail the new tests.
  • CHANGELOG Breaking note. No tag, no publish.

Full cultmesh-ts suite: 231 tests, 173 pass, 0 fail, 52 skipped.

🤖 Generated with Claude Code

Port of the C#/Python remote write authority to cultmesh-ts (PR B; PR A is #36). - createRudpDocumentServer takes writeAuthority; without one every peer put and delete is refused with the typed write_not_authorized (pinned bytes). CultMeshGrantAllWrites is the explicit opt-in. - The gate runs before the put is sized, resolved or decoded; the authority sees the canonical schema id and the datagram's peer. A throwing/rejecting authority or any decision other than granted:true refuses. - A put with wrong-typed shardId/shardEpoch is refused before the gate. - New document_delete case and onDocumentDeleteRaw. - 16 existing server tests opt in to grant-all; new test/remote-write-authority.test.ts ports the Python cases (no forwarding). - Each guard removed once: all 9 mutants fail the new tests. - CHANGELOG Breaking note. No tag, no publish. Full cultmesh-ts suite: 231 tests, 173 pass, 0 fail, 52 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultmesh-ts: document server asks a write authority before applying a peer put or delete
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) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Has been cancelled
1bc05d7b06
Deny by default with a grant-all opt-in; the gate runs before the put is sized,
resolved or decoded; refusal is the typed write_not_authorized. Adds
onDocumentDeleteRaw, refuses wrong-typed shard fields before the gate, grants
all writes in the existing server tests, and ports the cultmesh-py
remote-write-authority tests (no forwarding).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cultmesh-ts: gate unreadable writes, malformed refusals, payload tests
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 5m22s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m5s
1689b62597
A frame that fails to decode or parse is judged as the write it looks like, so
an ungranted peer gets write_not_authorized instead of silence; a granted peer
gets onError and a malformed_document_put/delete refusal. Adds raw-frame tests
(int, 2**70, oversized claimed length, non-decoding, non-map document) and
the timing residual note.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cultmesh-ts: gate before shard refusal, bound the refusal, harden tests
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 5m2s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 36s
ada30be84e
A put with wrong-typed shard fields is judged with null shard fields first, then
refused as malformed once granted. The refusal's record key and reason are
clipped so it fits maxPayloadBytes. The allocation test watches transient
allocations; catch-path and delete tests assert ids, operation, reply count,
onError and handlers. README/CHANGELOG no longer claim the schema is resolved
after the gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 250d616f8f into main 2026-11-07 20:21: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!37
No description provided.