propose

suspend fun propose(command: ByteArray): LogEntry

Proposes command with an auto-minted, monotonic requestId.

Suspends until a quorum commits the entry. On transport tear the Raft engine throws us.tractat.kuilt.raft.LeadershipLostException; callers can retry with the same requestId via the propose(command, requestId) overload.

Returns the committed LogEntry — guaranteed to appear in committed.


suspend fun propose(command: ByteArray, requestId: Long): LogEntry

Proposes command with a caller-pinned requestId for cross-crash exactly-once dedup.

The caller must persist requestId before invoking this method. A retry with the same requestId coalesces to the original committed entry via us.tractat.kuilt.raft.ClientSessionTable.shouldApply.