From a1c363c8402b9b7040b07d1d4e925df8c023603b Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 31 Oct 2026 01:15:42 -0500 Subject: [PATCH] devstack front door: a read's test fails only on bytes that came early a_read_is_seen_before_it_is_passed_on asked that the far end hold every byte passed on before each read. A sender may hold small writes while an ACK is out (CI held 36 KB, #783's check), so it failed with bytes late, not early. It now fails only when the far end holds more than was seen: what the property is, and what the bug of #748 does (checked by passing on before seeing: it fails at once). Co-Authored-By: Claude Opus 5.5 --- crates/devstack/src/front.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/devstack/src/front.rs b/crates/devstack/src/front.rs index 8e138e286..f9d6b7eb4 100644 --- a/crates/devstack/src/front.rs +++ b/crates/devstack/src/front.rs @@ -325,10 +325,12 @@ mod tests { } /// Each read is seen before it is passed on: whenever `seen` runs, the - /// far end has had every byte before that read, and none of it. So a - /// request is recorded before the runtime can answer it (Alex's review - /// of #748: a fast answer to a request not yet recorded was dropped, - /// the next answers each said as the request before's). + /// far end has none of that read. So a request is recorded before the + /// runtime can answer it (Alex's review of #748: a fast answer to a + /// request not yet recorded was dropped, the next answers each said as + /// the request before's). Bytes passed on before may still be on their + /// way (the sender holds small writes while an ACK is out: CI's runners + /// held 36 KB once), so only bytes past those seen are early. #[test] fn a_read_is_seen_before_it_is_passed_on() { let (mut client, from) = pair(); @@ -338,7 +340,7 @@ mod tests { let (mut passed, mut arrived, mut early) = (0, 0, Vec::new()); copy(from, to, |bytes| { arrived += drain(&mut far); - if arrived != passed { + if arrived > passed { early.push((passed, arrived)); } passed += bytes.len();