From 211f15559dcac3fa2a21e9abdb38d7784c3b0f56 Mon Sep 17 00:00:00 2001 From: Eureka Date: Sat, 14 Nov 2026 02:10:33 +0000 Subject: [PATCH] docs: dropped_note keeps its doc comment; desk door doc names the listing gate Co-Authored-By: Claude Sonnet 5.5 --- crates/huginn-daemon/src/daemon.rs | 6 +++--- crates/huginn-daemon/src/desk_door.rs | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/huginn-daemon/src/daemon.rs b/crates/huginn-daemon/src/daemon.rs index ec0fbfc..1be6aae 100644 --- a/crates/huginn-daemon/src/daemon.rs +++ b/crates/huginn-daemon/src/daemon.rs @@ -109,9 +109,6 @@ impl Handled { } } -/// What the log says of the hits the mind held no document for: how many, and -/// the first few by name (a restored mind can leave hundreds), or nothing when -/// the mind held them all. /// The door checks an account id; the Mind's desk calls take it as the text it is. fn short_id(id: AccountId) -> Short { Short(id.0) @@ -121,6 +118,9 @@ fn short_ids(ids: &[AccountId]) -> Vec { ids.iter().map(|id| Short(id.0.clone())).collect() } +/// What the log says of the hits the mind held no document for: how many, and +/// the first few by name (a restored mind can leave hundreds), or nothing when +/// the mind held them all. fn dropped_note(dropped: &[PipelineRef]) -> Option { if dropped.is_empty() { return None; diff --git a/crates/huginn-daemon/src/desk_door.rs b/crates/huginn-daemon/src/desk_door.rs index 8cf5f98..b26d442 100644 --- a/crates/huginn-daemon/src/desk_door.rs +++ b/crates/huginn-daemon/src/desk_door.rs @@ -20,6 +20,13 @@ //! gets `deciders` empty, `answerer` nil and the counts instead. The reads carry no `authority` (a //! payload that names one is refused whole), and the door has no other way to ask who is reading. //! +//! The listing gate: a reader who is not a decider sees a fork only while a `desk_listing` for it is +//! in force, and a fork it may not see reads `fork_unknown`, the same bytes as a missing one, on +//! every desk operation, a replay of a stored answer included. The door never writes a listing; it +//! arrives by the RUDP Admit door only. Unlisting is a `Withdrawn` resolution on the listing, and +//! admitting the listing again after that returns `AlreadyAdmitted` and the fork stays hidden: +//! relisting is withdrawing the withdrawal, not a second admission. +//! //! It owns no rule. Which Mind method answers is `Daemon::handle_desk`'s; when the door is //! served is `serve::run`'s, once per pass in the thread that owns the Mind. A peer that is //! slow costs the loop at most `DESK_ACCEPTS_PER_PASS` connections of `DESK_CONNECTION_DEADLINE`