From cdc21dd396c90991457c7427a9410bd86f5e46bb Mon Sep 17 00:00:00 2001 From: Eureka Date: Wed, 11 Nov 2026 01:03:42 +0000 Subject: [PATCH] Desk door: fork_too_large at order 0 says the list ends instead of naming c0 Co-Authored-By: Claude Sonnet 5.5 --- crates/huginn-mind/src/desk_wire.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/huginn-mind/src/desk_wire.rs b/crates/huginn-mind/src/desk_wire.rs index 94e2946..53525f6 100644 --- a/crates/huginn-mind/src/desk_wire.rs +++ b/crates/huginn-mind/src/desk_wire.rs @@ -383,10 +383,11 @@ fn fork_unknown() -> ForkRefusal { fork_refusal(ForkRefusalCode::ForkUnknown, "fork_unknown: no such fork".into()) } -/// A list page whose first entry alone is past the page budget: names that fork and its `order`; a -/// client continues with the cursor `c` and has reached the end at order 0. +/// A list page whose first entry alone is past the page budget: names that fork and its `order`. A +/// client continues with the cursor `c`; at order 0 there is no such cursor and the list ends. fn fork_too_large(fork: &str, order: u64) -> ForkRefusal { - fork_refusal(ForkRefusalCode::ForkTooLarge, format!("fork_too_large: fork {fork} at order {order} is past the page budget by itself; continue with cursor c{order}")) + let onward = if order == 0 { "this is the end of the list".to_string() } else { format!("continue with cursor c{order}") }; + fork_refusal(ForkRefusalCode::ForkTooLarge, format!("fork_too_large: fork {fork} at order {order} is past the page budget by itself; {onward}")) } fn body_invalid(field: &str) -> ForkRefusal {