Repository navigation
Conversation
…ect (do not merge)
…ent away and came back A ring that failed with a Herdr call waited for the pane to move, since the bell might have been typed. When the failure came from the device's link dropping, the pane came back idle at the same state sequence, never moved, and the letter was never rung again. Losing the link now ends that wait.
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
Related: #892 (main turned red in the remote mailbox lane after it merged) ## Summary - `remote_delivery::connected_remote_panes_receive_once_and_disconnect_keeps_the_same_letter_pending` timed out waiting for the bell of the letter sent just before the device disconnects. - Cause: the doorbell tried that letter in the moment the SSH link dropped, the Herdr call failed, and a failed ring waits for the pane to move (the bell might have been typed). The device came back with the pane idle at the same state sequence, so it never moved and the letter was never rung again. - Fix: when the pane or its device's link goes away after a failed ring (`pane_unavailable`), that wait ends, and the letter is tried again once the link is back. A bell that had started a turn would have moved the pane, so this cannot type a second bell into a turn the first one started. - #892 did not add the bug; it changed timing so the doorbell now reaches that letter before the disconnect more often (traced below). ## Review - **조심해서 볼 파일**: `herdr-core/src/delivery/doorbell.rs` - failure path of the bell: when a failed ring may be retried decides whether a bell can be typed twice. - **질문**: is "the link went away and came back with the pane unmoved" a safe enough signal that the first bell never landed, or should the retry also require a new state sequence from Herdr? ## Evidence - **확인한 것**: a new doorbell test drives the fake Herdr through a ring that fails as the link drops, the link going away (`pane_unavailable`), and the link coming back: with the fix the letter is rung once; with `link_lost` disabled nothing is typed (the CI symptom). herdr-core and hided: 2302 tests pass. - **확인한 것**: TEMP trace runs (#894 on main, #895 on the commit before #892, coordinator and doorbell logged, every run directory kept): pre-#892 4/4 passed with no `doorbell.failed`; main 3/4, and the one failure is the only run with `doorbell.failed herdr_call_failed` for that letter, after which the reconnected coordinator connected and published but the letter was never tried again. - **확인한 것**: the remote mailbox test passed 6/6 locally on macOS before the fix (the race needs the CI runner's timing). - **확인하지 못한 것**: why #892 moved the doorbell's first look at the letter earlier was not isolated; the fix removes the dependency on that timing. The eight-repeat TEMP run with this fix is linked in a comment when it finishes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporary evidence run for the remote mailbox reconnect failure after #892: runs only the remote mailbox lane, repeats one test four times, keeps every run directory, and logs the session-sync coordinator. Will be closed without merging.