docs(start): tested CultNet first-call snippets (C#, TypeScript, Rust, Python) #11
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/start-cultnet-cells"
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?
Fills the four CultNet cells in the docs/start language x package matrix. Each runtime defines a typed document, sends it as a
cultnet.document_put_raw.v0message over a loopback pipe (TCP loopback for C#, TypeScript and Rust; a socket pair for Python) and applies it to a second cache. A second test in each file fails if docs/start/README.md stops showing the snippet verbatim.Run by:
dotnet test tests/GameCult.Networking.Tests --filter CultNetFirstCallTests(2 passed)npm testin packages/cultnet-ts, afternpm run buildin packages/cultcache-ts;node --test dist-test/test/first-call.test.jsruns just this file (2 passed)cargo test --test first_callin packages/cultnet-rs (2 passed)python -m unittest tests.test_first_callin packages/cultnet-py withsrcand../cultcache-py/srcon PYTHONPATH and msgpack installed (2 passed)Found while writing the TypeScript one:
CultNetDocumentRegistry.createDocumentPutMessageleavessourceRuntimeId,sourceAgentId,sourceRoleandtagsas undefined, which MessagePack encodes as nil, so the receiving peer'sparseCultNetMessagerejects the message (/document/sourceRuntimeId: must be string ...). The TypeScript snippet therefore uses the raw put. Not fixed here.🤖 Generated with Claude Code