C#: SubmitDocumentAsync and the shard write forwarder complete on the result frame #58
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/cs-client-ack-finding"
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?
C#:
SubmitDocumentAsyncand the shard write forwarder (CultNetSchemaWriteForwarder.ForwardPutAsync/ForwardDeleteAsync) complete on the peer's result frame, not on the send returning. NewCultNetWriteCompletion.SendAndAwaitResultAsyncregisters the refusal handler before the send and waits a result window (500 ms default;CultMeshClientOptions.SubmitResultWindow,CultNetSchemaWriteForwarderOptions.ResultWindow). Acultnet.error.v0in the window rejects with the newCultNetWriteRefusedException(Code:write_not_authorized,message_invalid, ...) whatever its order against the send or transport ack. Peers send no success frame for an admitted write, so the window is the interim bound (no server code); the error frame carries no message id, so any refusal inside the window is attributed to this write.Caller exposure:
CultNetDatabaseServer.TryForwardPutAsync/DeleteAsync(:698/:718) returned true after a forward whose refusal it never read; a refused forward now throws from the forwarder, the same path as an unreachable primary (server code unchanged).Doc line 'fire-and-forget: an ack or a return is not admission; read the result frame' on the C#
ICultNetSchemaClient.SendCultNetandCultMeshSession.SendCultNet, PythonCultNetRawClient.sendand the RUDP/tcp transportsend, KotlinsendSchemaMessage/send/sendSchema.Tests: SubmitDocument and forwarder reject typed for write_not_authorized and message_invalid, immediate and after 150 ms; neither completes before the window. Mutants killed: refusal check removed, window zeroed, handler registered after the send. Mesh.Tests 346 and Networking.Tests 514 pass.
🤖 Generated with Claude Code