cultnet-ts: drop unset optional keys from createDocumentPutMessage #13

Merged
libby merged 1 commit from libby/cultnet-ts-put-nil-keys into main 2026-11-07 11:26:57 +00:00
Member

createDocumentPutMessage set sourceRuntimeId/sourceAgentId/sourceRole/tags to undefined when unset; MessagePack encodes that as nil and the peer rejects the document. Absent keys are now omitted. New test asserts the key set and that the decoded wire holds no nil.

npm test in packages/cultnet-ts: 255 tests, 254 pass, 1 fail. The failure is esbuild bundles dist/content.js with platform 'browser' and is environmental: esbuild walks up parent dirs for package.json and hit a 0-byte /var/lib/mind-libby-self/package.json (../../../../package.json:1:0: ERROR: Unexpected end of file in JSON). Not a repo defect. The run completes in ~4.4s here; I could not reproduce a hang.

🤖 Generated with Claude Code

`createDocumentPutMessage` set `sourceRuntimeId`/`sourceAgentId`/`sourceRole`/`tags` to `undefined` when unset; MessagePack encodes that as nil and the peer rejects the document. Absent keys are now omitted. New test asserts the key set and that the decoded wire holds no nil. `npm test` in packages/cultnet-ts: 255 tests, 254 pass, 1 fail. The failure is `esbuild bundles dist/content.js with platform 'browser'` and is environmental: esbuild walks up parent dirs for package.json and hit a 0-byte `/var/lib/mind-libby-self/package.json` (`../../../../package.json:1:0: ERROR: Unexpected end of file in JSON`). Not a repo defect. The run completes in ~4.4s here; I could not reproduce a hang. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultnet-ts: drop unset optional keys from createDocumentPutMessage
Some checks failed
CultMesh portability and performance / windows-latest one-command multiplayer onboarding (pull_request) Waiting to run
CultMesh portability and performance / windows-latest reactive semantics and leases (pull_request) Waiting to run
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 one-command multiplayer onboarding (pull_request) Failing after 41s
CultNet cross-runtime interop / C# / TypeScript / Rust / Python / Kotlin (pull_request) Has been cancelled
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) Failing after 5m58s
3a98eef12f
MessagePack encodes undefined as nil, and the peer rejects a document whose
sourceRuntimeId/sourceAgentId/sourceRole/tags are nil. Omit absent keys; test
that the encoded message carries none.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 4f4c65d847 into main 2026-11-07 11:26:57 +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!13
No description provided.