CultLib/packages
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 2041a0e0ed Bound the TypeScript fragment reassembly map
cultnet-ts removed a fragment buffer only on successful reassembly, with
no cap, no eviction and no timeout. A fragment set that loses one
fragment was stranded for the life of the session, so the map grew
without bound under any loss on a fragmenting channel. cultnet-rs at
least fails closed at 64 pending sets; TypeScript just consumes memory.

This is live, not theoretical. Ghostlight sends Heimdall sealed envelopes
over CultMesh RUDP with max_fragment_bytes = 2048
(Ghostlight/crates/ghostlight-dungeon/src/heimdall.rs:697), and Heimdall's
private command plane reassembles them through this path. Every lost
fragment on that link left a buffer nothing would ever collect, on a
long-running auth service.

Caps pending sets at 64 to match cultnet-rs's max_pending_fragment_sets,
and evicts the oldest stranded set rather than refusing the payload:
a receiver that stops accepting fragmented traffic after a bounded number
of losses is a denial of service delivered by the network. Map iteration
is insertion-ordered, so the first key is the oldest. fragmentSetsEvicted
and pendingFragmentSetCount make it observable.

Found by the Muninn media load test, which hit the Rust half of the same
defect; cultcache-py has the same unbounded map and is not touched here.

  npm run test --workspace=packages/cultnet-ts -> pass 54, fail 0

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 11:42:13 +02:00
..
cultcache-py Publish the non-Rust packages and make the licensing uniform 2026-09-04 04:41:44 +02:00
cultcache-rs Publish the non-Rust packages and make the licensing uniform 2026-09-04 04:41:44 +02:00
cultcache-ts Promote the swarm document catalog into cultcache-ts 2026-09-06 19:40:37 +02:00
cultmath Clarify CultMath and CultGeometry ownership 2026-08-26 17:47:06 +02:00
cultmesh-browser Harden CultMesh route fallback and secure onboarding 2026-08-18 19:41:03 +02:00
cultmesh-kotlin Finish the sequence-domain split in Python and Kotlin 2026-09-04 00:40:05 +02:00
cultmesh-rs Let a caller choose what the media channel does 2026-09-10 01:08:31 +02:00
cultmesh-ts Publish the non-Rust packages and make the licensing uniform 2026-09-04 04:41:44 +02:00
cultnet-rs Merge the media stream contract into CultLib 2026-09-10 02:32:21 +02:00
cultnet-ts Bound the TypeScript fragment reassembly map 2026-09-10 11:42:13 +02:00