Skip to content

링크가 끊긴 순간 실패한 벨을 다시 연결된 뒤 한 번 더 울린다 - #896

Merged
yansfil merged 1 commit into
mainfrom
fix/remote-doorbell-after-892
Oct 9, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/remote-doorbell-after-892

Conversation

@yansfil

@yansfil yansfil commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

…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

yansfil commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Eight-repeat TEMP run of the remote mailbox test on main with this fix (#894): 8/8 passed; 3 of the 8 hit the same race (doorbell.failed herdr_call_failed as the SSH link dropped) and the letter rang after the reconnect. Before the fix, main failed exactly in the runs with that failure (1/4 in #894, 5/6 in the main and #892 runs).

@yansfil
yansfil merged commit 3ee6c5b into main Oct 9, 2026
20 checks passed
@yansfil
yansfil deleted the fix/remote-doorbell-after-892 branch October 9, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant