CultLib/packages/cultnet-py/CHANGELOG.md
Libby 8f71bff69c cultnet error contract: one message_invalid code replaces malformed_document_put/delete
Q6-A of docs/cultnet-error-contract-cut.md. message_invalid joins the closed
cultnet.error.v0 code enum (both schema copies), with details.field naming the
request field at fault ("message" when the whole frame cannot be read).
C# ForMessageInvalid, Rust CultNetErrorCode::MessageInvalid, TS
cultNetMessageInvalidError and Python message_invalid_error all write the same
captured bytes (error-vectors.json plus the C# and Rust cases). cultmesh-py and
cultmesh-ts refuse malformed puts and deletes with it; the C# subscription
servers use it for the missing subscriptionId.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 09:14:12 +00:00

1.4 KiB

Changelog

Unreleased (breaking; version 0.x, so the next minor)

  • Added message_invalid to CULTNET_ERROR_CODES and message_invalid_error(field, reason), byte-identical to the C# ForMessageInvalid. cultmesh-py refuses a malformed put or delete with it instead of the out-of-schema malformed_document_put and malformed_document_delete, which are removed.

  • Added CultNetRudpSocketTransportServer (cultnet_py.rudp_server): one UDP socket serving many RUDP peers, one session per remote endpoint, ported from the C# CultNetRudpSocketTransportServer and held to its bytes by tests/vectors/rudp-multipeer-server/transcript.txt. The caller drives it (try_receive_once, poll_resends). Like the C# listener it never reaps idle peers. CultNetRudpSession gained next_sequence, withdraw_send and end_with, and CultNetTransportStats gained send_failures.

  • Removed resolve_document_and_schema_id_for_raw_record from the package exports. A raw record resolves to one local schema id, the one its document registers, so there is no wire id to return. Use resolve_document_for_raw_record(documents_by_schema_id, schema_id, record), which returns the document; take the schema id from document.catalog_entry().schema_id.

  • apply_raw_document_record, apply_raw_snapshot and apply_shard_log_response report and stamp the local schema id, also for a record that arrived under a compatible id or the schema name.