579ca81b2753fa8fc0c23fcd4ecf73de54178da1
Measured on an ATtiny13A with the link folded onto PB3 and the FTDI's TX reaching it through 1 k: a knock aimed at a loader already in session loses its second byte every time, 8 runs of 8, never intermittently. The first byte draws a prompt while the second is still going out and the device's push-pull ack wins the line against the resistor, so that byte is destroyed rather than delayed — which is what the README predicted and the sim bridge cannot show, since it arbitrates the line by queueing. The recovery for it existed and could not run. Two defects: OneWirePort.write read its echo with read_exact, whose contract is to raise, so the "one-wire echo missing — is the adapter's RX tied to the line?" message was unreachable on any line that simply fell quiet, and a bare "timeout: got 0 of 1 bytes" surfaced in its place. The one message the class exists to produce could never be produced. The read is speculative and is now read_available. And any raise from write aborted _handshake before the retry loop that exists to absorb exactly this, whose docstring already claimed it "converges into an already-live session" — true on a pty, impossible on real wiring. The knock is now the one write marked blind: a missing echo there is a property of the shared line, counted and reported under -v rather than raised. Every other write is ack-paced and cannot collide, so a missing echo there still means an RX that is not on the line, and still raises. Both gates green on Windows (31/31 m328p, 16/16 t13a); on hardware the reconnect now converges on the first knock, the surviving prompt being all the handshake needs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
Languages
C++
100%