diff --git a/crates/ledger-cli/tests/book_open_close.rs b/crates/ledger-cli/tests/book_open_close.rs index 933d73fc..b04db0b9 100644 --- a/crates/ledger-cli/tests/book_open_close.rs +++ b/crates/ledger-cli/tests/book_open_close.rs @@ -1459,7 +1459,12 @@ fn a_slow_upload_that_finishes_within_the_grace_is_not_cut() { /// A call whose body is whole and that is running when the grace runs out /// is not cut: it ends, is answered and recorded as having run, and only -/// then is the close answered. +/// then is the close answered. What this proves is that the close waits for +/// the call and does not kill it; that a body read to its end is never cut +/// (the line of INVARIANT 15) is proved at its seat, by +/// `local::tests::a_body_read_to_its_end_is_never_cut_and_one_not_yet_is`: +/// this test passes even with a cut that marks every request inside (the +/// call runs in the session's task, past the handler's own check for a cut). #[cfg(unix)] #[test] fn a_running_call_is_never_cut_when_the_grace_runs_out() { diff --git a/crates/ledger-store/src/backup.rs b/crates/ledger-store/src/backup.rs index e994ab3b..6fafa93b 100644 --- a/crates/ledger-store/src/backup.rs +++ b/crates/ledger-store/src/backup.rs @@ -189,12 +189,15 @@ pub struct LockNote { pub why: &'static str, } +/// A watcher of a verification's phases ([`Git::with_phase_watch`]). +pub type PhaseWatch = std::sync::Arc; + /// What a caller may watch of a git's work, and look at after it (tests, /// and the server's record of a backup). #[derive(Clone, Default)] struct Watch { /// Told the name of each phase of a verification as it begins. - phase: Option>, + phase: Option, /// The lock files dealt with since the caller last took them. notes: std::sync::Arc>>, } @@ -285,7 +288,7 @@ impl Git { /// that makes a drill slow: `watch` may wait, but must give up when /// the cancel flag is set). #[must_use] - pub fn with_phase_watch(mut self, watch: std::sync::Arc) -> Self { + pub fn with_phase_watch(mut self, watch: PhaseWatch) -> Self { self.watch.phase = Some(watch); self }