Commit graph CultLib/packages/cultnet-ts/test/cultnet.test.ts
Author SHA1 Message 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
Meta Vens
8cb3b7282b Publish the non-Rust packages and make the licensing uniform
Rust consumers pin a CultLib revision through cargo git dependencies, which is
how Ghostlight, Epiphany, CodexConnector and Odin already consume the core
stack. npm and pip cannot take a package from a subdirectory of a git repo at
all, which is why the TypeScript and Python consumers vendored forks instead:
there was nothing else to depend on. This gives them a versioned artifact.

Tagging cultcache-ts-v* or cultcache-py-v* builds, tests and publishes. The tag
version must match the manifest version or the workflow refuses rather than
shipping a mislabelled artifact. PyPI uses trusted publishing, so no long-lived
token is stored; npm needs an NPM_TOKEN secret.

cultcache-ts is now @gamecult/cultcache-ts. The scope is not cosmetic: it makes
the package unambiguously org-owned on a public registry, and it is what lets
CultLib hold the name rather than racing for an unscoped one. CultLib's own
cultmesh-ts and cultnet-ts and their imports move with it; all three packages
typecheck and cultcache-ts passes 12 of 13 tests, the exception being the
cross-runtime store test that shells out to Python, which cannot run on this
machine because its Python has no msgpack.

Licensing was inconsistent with the repo. cultcache-py declared itself "Private
GameCult infrastructure" and cultcache-rs and cultmesh-rs declared nothing,
inside a repo whose LICENSE is MIT and whose every other package says MIT. All
three now say MIT. That was load-bearing here: a package that calls itself
private is not one to push to a public registry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 04:41:44 +02:00
Meta Vens
0736ae4824 Separate RUDP reliable and lossy sequence domains 2026-09-04 00:33:16 +02:00
Meta Vens
334e60f192 Recover authority-bound CultMesh and atomic generations 2026-08-26 19:01:24 +02:00
Meta Vens
75c180782a Acknowledge retransmits across RUDP horizons 2026-08-23 19:15:22 +02:00
Meta Vens
fda51fad50 Acknowledge reliable RUDP windows cumulatively 2026-08-23 19:00:33 +02:00
Meta Vens
f4dabfefb0 Bound RUDP reliable transmission windows 2026-08-23 18:35:49 +02:00
Meta Vens
f622ee1b24 Authenticate CultMesh authority routes and replay operations 2026-08-18 19:02:46 +02:00
Meta Vens
6c848bd6c0 Bind CultMesh authority identity to physical routes 2026-08-18 17:21:58 +02:00
Meta Vens
d563a1ac64 Discover browser providers through Odin 2026-08-18 00:34:44 +02:00
Meta Vens
8eb89e38ec Add real browser CultMesh transport proof 2026-08-18 00:05:57 +02:00
Meta Vens
3fe2e9be1b Publish browser subscription wire contracts 2026-08-17 23:26:51 +02:00
Meta Vens
5c075bc212 Fence provider RUDP connection generations 2026-07-19 00:50:20 +01:00
Meta Vens
ddb5418e04 Add CultNet RUDP operation service host 2026-07-10 11:20:51 +01:00
Meta Vens
2272aeff08 Add CultNet operation service envelopes 2026-07-10 11:11:28 +01:00
Meta Vens
340df225d4 Align TypeScript RUDP acknowledgement sequencing 2026-07-10 06:56:49 +01:00
Meta Vens
94a8c5b104 Resolve TS shard discovery filters by schema alias 2026-06-27 21:57:54 +01:00
Meta Vens
aeb7a96bd3 Resolve TS typed document messages by schema alias 2026-06-27 21:56:02 +01:00
Meta Vens
2738f4c2db Resolve TS snapshot filters by schema alias 2026-06-27 21:46:05 +01:00
Meta Vens
af2bd4a82d Resolve TS snapshot aliases by payload shape 2026-06-27 21:17:07 +01:00
Meta Vens
7711edf930 Advertise TS shard catalog schemas 2026-06-16 15:12:12 +01:00
Meta Vens
8bc505f0c1 Add TypeScript shard catalog sync helpers 2026-06-16 13:53:12 +01:00
Meta Vens
30934fc776 Add TypeScript schema catalog sync helpers 2026-06-16 13:36:34 +01:00
Meta Vens
4335ab10bd Fix RUDP ordered control sequence parity 2026-06-16 13:18:39 +01:00
Meta Vens
805539384e Add TypeScript TCP peer helper 2026-06-16 12:15:23 +01:00
Meta Vens
3805352dbb Add TypeScript RUDP reconnect loop 2026-06-16 05:58:28 +01:00
Meta Vens
4a54966b10 Add portable reconnect controllers 2026-06-16 05:29:45 +01:00
Meta Vens
9e97d94796 Advertise RUDP reconnect policy in profiles 2026-06-16 04:01:41 +01:00
Meta Vens
b3be836115 Add portable reconnect policy helpers 2026-06-16 03:07:31 +01:00
Meta Vens
48135703e8 Preserve Libby persona state and database preverify flow 2026-06-15 19:45:34 +01:00
Meta Vens
c85b5fb561 Add RUDP reliable queue bounds across runtimes 2026-06-15 15:24:11 +01:00
Meta Vens
8287926921 Add RUDP ping timeout parity 2026-06-15 03:26:40 +01:00
Meta Vens
743f580f9b Add RUDP fragmentation in TypeScript and Python 2026-06-15 01:54:53 +01:00
Meta Vens
7335435255 Add TypeScript RUDP socket transport 2026-06-14 23:03:29 +01:00
Meta Vens
105f564e76 Add TypeScript RUDP reliability core 2026-06-14 22:28:54 +01:00
Meta Vens
0bcfe1af8d Add TypeScript RUDP packet fixture 2026-06-14 22:06:09 +01:00
Meta Vens
48d2a0bc0d Add TypeScript CultNet transport port 2026-06-14 21:28:23 +01:00
Meta Vens
a2bc9aeab4 Advertise CultNet transport profiles 2026-06-14 21:20:52 +01:00
Meta Vens
94e9b4b2b4 Add CultNet transport profile contract 2026-06-14 20:32:25 +01:00
Meta Vens
bad0ff9408 Align TS session tokens with Python parity 2026-06-14 19:57:35 +01:00
Meta Vens
5c69bfc581 Bring language packages into CultLib monorepo 2026-05-30 00:39:39 +01:00