mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
a_slow_stream_outlives_its_idle_timeout proved that the idle window resets per message by having a thread sleep 60ms between sends and trusting that to stay under a 150ms timeout. That is a 90ms margin against the OS scheduler, and the darwin CI job lost the bet. It also tested the wrong thing: whether recv_timeout fires after the deadline is the standard library's contract, not ours. What is ours is that the loop restarts the window on every message rather than budgeting the whole stream. Make the one blocking call injectable and script it. Both timing tests now feed drain_git_stream a fixed sequence -- no threads, no sleeps, no wall clock -- and the pair runs in microseconds. The queue-budget tests keep their real channel, which is what they are about. Rename the second test to say which property it holds.