cultcache-py: MessagePack is the default payload; PayloadCodec; convert (py-msgpack-default) #179
Loading…
Reference in a new issue
No description provided.
Delete branch "hands/py-msgpack-default-r2"
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?
Lands
cultlib-gaps:ruling:py-msgpack-defaultand follow_upspy-msgpack-default-version-bumpandpy-default-payload-json. Port oforigin/hands/py-msgpack-default(20 commits, tipd9f73281, ~1234 behind main) as one squash onto current main.What it does
define_document_typereads and writes MessagePack by default. A definition'spayload_codec(PayloadCodec;MESSAGEPACK_PAYLOAD_CODEC,JSON_PAYLOAD_CODEC,PayloadCodecFault,CultCachePayloadFormatError) owns the format and replaces thepayload_encoder/payload_decoderfields and parameters.convert(source, destination, definitions)writes a new store from a 0.3 JSON store, never touching the source.Reconciled with main (main wins)
read_payload_treestays the one payload read: depth first, a tail is refused by count as a plainValueErrorwith main's text (pinned bytest_union_parityand cultnet). The branch had made a tail a typedCultCachePayloadFormatError(not_one_value); that is dropped, so a 0.3 JSON object read as MessagePack now fails with the tail message. Branch tests re-pinned to it.read_payload_treegained an optionaldepth_faultsargument; its default decoder is still plain msgpack.commit_store_file, stamps,_encode_snapshot,StoreUnreadableError) kept; the store reader now uses the codec's map-key reader._file_bytesis a static helper on both file stores, used byconvert. Main's catalog-publish refusal text kept over the branch's._infer_schema_version_from_payloadkept; cultnet test adapted toresolve_document_for_raw_record(main has no..._and_schema_id_...).Version: pyproject stays 0.4.0. 0.4.0 is declared but untagged (last tag cultcache-py-v0.3.0) and main's Unreleased section is already its breaking minor; this change is the same minor over 0.3.0, so no further bump. CHANGELOG entry added. Tagging
cultcache-py-v0.4.0is the merger's.Dependency on #176:
convertand its README section raiseCultCacheError, importable today fromcultcache_py.cache. Root export is left to #176 (hands/cultcache-py-closeout); the README names the class only, so nothing here duplicates it. If #176 merges first, nothing to change.Tests (py 3.13, venv in packages/cultcache-py, cultnet-py and cultmesh-py installed editable): cultcache-py 369 passed, 2 skipped; cultnet-py 177 passed; cultmesh-py 161 passed. Not run: Brokkr's bridge update named in the ruling; not admitted to Huginn.
🤖 Generated with Claude Code
Soul pass follow-ups (second commit): convert carries the source's store header (v3 stays v3; pinned by
v3-base.msgpack, mutation-checked); README states the one-digit JSON exception and the untyped-slot byte difference; CHANGELOG records entry-type codec inheritance (bin-keyed main-era entries now fail to load), the doubled tree walk (left in place) and the roughly 2x codec cost; store-reader docstring/test name corrected; stale references fixed. Accepted by Self: the JSON codec'sdepth_faults=(RecursionError,)typed refusal resolves deferredcut-union-bounds-py.s2.depth-typed-refusal-lostfor the JSON codec only.