How do you send a file perfectly over a line that loses packets? Send one, wait for ‘got it’, and if the acknowledgement never comes, send it again. Simple, and provably reliable: every packet arrives, in order, no matter how bad the channel. Slide the loss rate up and watch retransmission win anyway.
Each data packet carries a 1-bit sequence number; the receiver ACKs it and the sender will not advance until the matching ACK returns, retransmitting on timeout. Lost data and lost ACKs are both survived — a duplicate (from a lost ACK) is caught by the sequence bit and discarded. A fail-loud self-check runs 20 packets over a 40%-loss channel (seeded) and throws unless all 20 arrive exactly once and strictly in order — reliability manufactured on top of an unreliable link.
Stop-and-wait is correct but slow — one packet in flight at a time wastes the link on long paths (sliding-window / Go-Back-N fix the throughput, same idea). The loss model here is independent per-transmission; real losses are bursty. Delivery correctness is what the check proves.