From cf68ffe125f611e99b5ecf1e5635ec0d99835951 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 22 Nov 2026 17:22:11 -0700 Subject: [PATCH] test(cli): the upload-in-flight close test gives its upload a grace a loaded machine can meet The test asked for a 500 ms answer grace, then slept 300 ms and polled before finishing its upload. On a loaded Mac the grace ran out first, and the server cut the half-sent upload, as it is meant to at the grace. The cut has its own test; this one is about an upload that finishes in time, so it gets 60 s, as its sibling does. Co-Authored-By: Claude Fable 5.2 --- crates/ledger-cli/tests/book_open_close.rs | 8 +++++++- docs/delegation-log.md | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ledger-cli/tests/book_open_close.rs b/crates/ledger-cli/tests/book_open_close.rs index ca195dca..b3a5841c 100644 --- a/crates/ledger-cli/tests/book_open_close.rs +++ b/crates/ledger-cli/tests/book_open_close.rs @@ -1369,7 +1369,13 @@ fn half_sent_upload(home: &Home, w: &mut Wire, book: &str, bytes: &[u8]) -> (Str #[test] fn an_upload_in_flight_finishes_before_the_close_is_answered() { let home = Home::new("close-upload"); - let server = Server::start_with(&home, &["--answer-grace", "500", "--timers", "10"]); + // The grace is counted from the start of the close, and a request not + // whole when it runs out is cut (that is what + // `an_upload_still_arriving_when_the_grace_runs_out_is_cut_however_active_it_is` + // shows). This test is about an upload that is finished in time, so the + // grace is far longer than the 300 ms wait below plus any slowness of + // the machine: a short one made a slow runner cut the upload. + let server = Server::start_with(&home, &["--answer-grace", "60000", "--timers", "10"]); home.create(A, "USD"); let mut w = Wire::new(&home, A); w.initialize("uploader"); diff --git a/docs/delegation-log.md b/docs/delegation-log.md index a756359e..e533a7d2 100644 --- a/docs/delegation-log.md +++ b/docs/delegation-log.md @@ -97,3 +97,4 @@ Columns: date | type (scout, run/verify, implement, refactor, debug, review) | p - 2026-11-21 | debug 3 | sonnet (high) | two Windows-only failures (authority list change detection; the assistant pictures) | accepted: rerun after merge; the Windows hash was reproduced on Linux with the dock held back - 2026-11-22 | impl-multi 2 | sonnet | the relay's setup kit for a Vultr machine; CAA at the relay's own name so its certificate renews | accepted: hunk read, relay tests rerun - 2026-11-22 | read 2 + impl 2 | sonnet | a late review of the app's server rechecked on main; the lost-race start, the 90 s close deadline, a panicked close's notice | accepted after one send-back: a closing holder is waited for, missing info never counts +- 2026-11-22 | debug 3 | sonnet | a Mac-only failure: an upload in flight cut at the close | accepted: the test's 500 ms grace was too short for a loaded machine; the cut at the grace is by design