2.7 KiB
Changelog
Unreleased (breaking; version 0.x, so the next minor)
-
CultNetDatabaseChangecarriescommit_idandcommit_count(commitId/commitCount; None outside a multi-record commit, as C# writes nil):from_wirerefuses an empty or non-string id and a count that is not an integer of at least 2,to_wirewrites them when set, and the publisheddatabase_change_rawschema lists both. Python applies no batch. Thesimulation_factdocument'sshard,frame,subjectandclaim_kindaliases areroles(many facts share each); the catalog bytes do not move. -
Decodes the write receipt frames of
contracts/cultnet/interop/write-receipt.md:parse_messagevalidatescultnet.write_admitted.v0andcultnet.error.v1against their closed schemas (unknown keys, empty or non-string ids, an unknown operation or code are refused;error.v1requiresmessageId, string or null;limit_reachediserror.v1only). AddedCULTNET_ERROR_V1_CODES,CULTNET_WRITE_RECEIPT_MESSAGE_VERSIONS,write_content_hashandhello_advertises_write_receipts;hellotakessupported_message_versions.tests/test_write_receipt.pyreplays the vectors'contentHash,wireandschemaInvalidsections. Not implemented here: the client write tracker (scenarios) and the server rules (dedupe,blankFields); this package has no receipt server and no write client. -
Added
message_invalidtoCULTNET_ERROR_CODESandmessage_invalid_error(field, reason), byte-identical to the C#ForMessageInvalid.cultmesh-pyrefuses a malformed put or delete with it instead of the out-of-schemamalformed_document_putandmalformed_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#CultNetRudpSocketTransportServerand held to its bytes bytests/vectors/rudp-multipeer-server/transcript.txt. The caller drives it (try_receive_once,poll_resends). Like the C# listener it never reaps idle peers.CultNetRudpSessiongainednext_sequence,withdraw_sendandend_with, andCultNetTransportStatsgainedsend_failures. -
Removed
resolve_document_and_schema_id_for_raw_recordfrom 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. Useresolve_document_for_raw_record(documents_by_schema_id, schema_id, record), which returns the document; take the schema id fromdocument.catalog_entry().schema_id. -
apply_raw_document_record,apply_raw_snapshotandapply_shard_log_responsereport and stamp the local schema id, also for a record that arrived under a compatible id or the schema name.