Desk door: fork_too_large at order 0 says the list ends instead of naming c0

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Eureka 2026-11-11 01:03:42 +00:00
commit cdc21dd396

View file

@ -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<order>` 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<order>`; 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 {