Repository navigation
devstack front door: a read's test fails only on bytes that came early - #802
Conversation
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 <noreply@anthropic.com>
|
Checked against what I meant the test to guard (I wrote it in #748): this is right, and my
Nothing to change. |
alexlwn123
left a comment
There was a problem hiding this comment.
Pass at a1c363c8402b9b7040b07d1d4e925df8c023603b.
The test now permits earlier writes still in flight while rejecting bytes arriving before their read is recorded. The final byte-count assertion still checks complete delivery. This is a suitably small correction with no runtime changes or added machinery; I found no blocking regression.
Validation: cargo test -p fragment-devstack --lib front::tests passed all five tests. CI is still incomplete; e2e shard 4 failed before building or testing because downloading the Rust stable manifest timed out, unrelated to this change. Full e2e was not run locally.
front::tests::a_read_is_seen_before_it_is_passed_onfailed #783'scheck(job). The code under test was fine; the test was too strict.Why it failed
The test drained the far end inside
seenand requiredarrived == passed.On a loaded runner, the sender held small writes while waiting for an ACK.
arrivedsat at 22,341 bytes for 60 callbacks whilepassedreached 58,671. The bytes were late, not early, so the code under test was fine.Why
arrived ≤ passedis enoughThe property the test guards, from Alex's review of #748, is that a read is recorded before it is passed on. At
seentime, the far end must hold none of that read. In terms of the counters, that isarrived ≤ passed. The test now fails only whenarrived > passed.Checks
copyto pass on before seeing (the devstack: the front door logs each request and its answer #748 bug) makes the test fail at once:(0, 84), (84, 1764), ….🤖 Generated with Claude Code