From dcd36fccb99ee6d0fbf454c0fbec9b47b4be84cf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 16:48:12 +0200 Subject: [PATCH] Odin: say what a refused put promises An acknowledged put is always on disk. A put refused because its write failed may still become durable and be served: it stays in the working set, and the next write lands it, or the failed write had already replaced the file. Puts are latest-value per type and key, so that is sound; the promise is written down at accept_raw_document. Soul finding 3. Co-Authored-By: Claude Opus 5.5 --- crates/odin-daemon/src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/odin-daemon/src/main.rs b/crates/odin-daemon/src/main.rs index 5b54c42..8ce0896 100644 --- a/crates/odin-daemon/src/main.rs +++ b/crates/odin-daemon/src/main.rs @@ -318,6 +318,14 @@ impl RuntimeState { /// once the store holding the put is on disk. The write is the one `flush`, /// so it carries everything else that changed too. A write that fails /// refuses the put. + /// + /// The promise runs one way only. An acknowledged put is always on disk. One + /// refused because its write failed may still be: it stays in the working set, so the catalog + /// serves it and the next write lands it (or the failed write had already + /// replaced the file). That is sound because a put is the latest value for + /// its type and key, not an event: a publisher that retries a refused put + /// stores the same value, and one that does not has lost nothing it was + /// promised. fn accept_raw_document(&mut self, receipt: CultMeshRudpRawDocumentReceipt) -> Result<()> { ensure!( self.activated(),