cultnet-py: decode write_admitted.v0 and error.v1 against the write-receipt vectors #66

Merged
libby merged 4 commits from libby/write-receipt-py-interop into main 2026-11-09 14:16:00 +00:00
Member

Python decoder side of the write receipt (spec: contracts/cultnet/interop/write-receipt.md). Stacked on #64; the diff is only the Python runtime.

  • parse_message validates cultnet.write_admitted.v0 and cultnet.error.v1 as closed schemas; error.v1 shares the v0 shape rules plus required messageId and limit_reached; v0 stays closed.
  • write_content_hash, hello_advertises_write_receipts, CULTNET_ERROR_V1_CODES, CULTNET_WRITE_RECEIPT_MESSAGE_VERSIONS; hello(supported_message_versions=...).
  • tests/test_write_receipt.py replays contentHash (4), wire (7, decode + byte-identical re-encode), schemaInvalid (7).
  • Not done, by design: scenarios (client WriteTracker; python has no write client), dedupe and blankFields (server rules; no receipt server in cultnet-py). Interop schemas are read in place from contracts/cultnet/interop.
  • Mutants (mutmut, messages.py): the 164 in the new functions, 163 caught; 1 survivor is equivalent (use_bin_type is msgpack's default).

🤖 Generated with Claude Code

Python decoder side of the write receipt (spec: contracts/cultnet/interop/write-receipt.md). Stacked on #64; the diff is only the Python runtime. - `parse_message` validates `cultnet.write_admitted.v0` and `cultnet.error.v1` as closed schemas; `error.v1` shares the v0 shape rules plus required `messageId` and `limit_reached`; v0 stays closed. - `write_content_hash`, `hello_advertises_write_receipts`, `CULTNET_ERROR_V1_CODES`, `CULTNET_WRITE_RECEIPT_MESSAGE_VERSIONS`; `hello(supported_message_versions=...)`. - `tests/test_write_receipt.py` replays `contentHash` (4), `wire` (7, decode + byte-identical re-encode), `schemaInvalid` (7). - Not done, by design: `scenarios` (client WriteTracker; python has no write client), `dedupe` and `blankFields` (server rules; no receipt server in cultnet-py). Interop schemas are read in place from contracts/cultnet/interop. - Mutants (mutmut, messages.py): the 164 in the new functions, 163 caught; 1 survivor is equivalent (`use_bin_type` is msgpack's default). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultnet-py: decode cultnet.write_admitted.v0 and cultnet.error.v1 against the write-receipt vectors
Some checks failed
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 reactive semantics and leases (pull_request) Failing after 5m36s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 31s
f6c61b1ebf
Strict closed-schema decode, content hash helper, hello capability; vectors contentHash, wire and schemaInvalid replayed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge write-receipt-text-blank-rules (3b1b7697) into libby/write-receipt-py-interop
Some checks failed
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 reactive semantics and leases (pull_request) Failing after 7m32s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 46s
ec8ecd2fb0
cultnet-py: the write-receipt vector sections include the file's counts
Some checks failed
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 reactive semantics and leases (pull_request) Failing after 7m35s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 51s
8c31933e10
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby changed target branch from libby/write-receipt-text-blank-rules to main 2026-11-09 14:15:59 +00:00
libby merged commit e4f550ef78 into main 2026-11-09 14:16:00 +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!66
No description provided.