cultmesh-rs: RUDP document server answers writes with write_admitted / error.v1 #60
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/rs-write-receipt-server"
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?
Rust server side of the write-receipt spec (#59, not yet merged; this PR branches from main and pins the spec's hashes in its own tests). Scope:
cultnet-rsframes andCultMeshRudpDocumentServer; no other runtime, no TS/C#/Python server.CultNetMessage::WriteAdmitted(cultnet.write_admitted.v0),CultNetMessage::ErrorV1(cultnet.error.v1, v0 +messageId),write_content_hash(SHA-256 of[operation, schemaId, recordKey, payload]).tests/write_receipt.rspins the four worked hashes fromwrite-receipt-vectors.jsonand round-trips both frames.write_admittedafter the sink accepts it (best effort: a receipt that cannot be queued is dropped, never turned into a refusal); a refusal is anerror.v1carrying the write's id; a resend of the same id and content is re-receipted without reaching the sink; the same id with other content is refusedmessage_invalid(detailsmessageId), never re-receipted. Other sessions are answered exactly as before.tests/rudp_document_server.rs(5 failed before the server change; the no-capability test passed because it pins today's behaviour). Mutants killed: reuse-with-other-content treated as resend, capability needing one frame instead of both (needed a new test), v0 error always, error without id, no dedupe memory. cultmesh-rs 32+28+12 and cultnet-rs suites pass.(session, messageId)and the table lives as long as the session (the spec's 10-minute retention is not met for sessions that expire sooner); a session remembers at most 1024 admitted writes and refuses new ones withPayloadBudgetFullrather than forget an id. Deletes are still refused (DeleteNotSupported) and now carry their id on a receipt-capable session.🤖 Generated with Claude Code