Repository navigation
fix: release the runtime lock before recording a stale bell - #2392
Merged
Merged
Conversation
yansfil
marked this pull request as ready for review
November 10, 2026 14:38
yansfil
marked this pull request as draft
November 10, 2026 14:44
yansfil
marked this pull request as ready for review
November 10, 2026 15:27
yansfil
commented
Nov 10, 2026
yansfil
left a comment
Contributor
Author
There was a problem hiding this comment.
첫 리뷰. head f78492feed12258788d0a86803e0b33815d5b45b, 실제 merge-base 10723b6412b857261ba0cb7df43fc780b6799eb8.
판정: pass. 운영자가 확정한 잠금 수정 범위에서 차단 의견 없습니다. #173 전체 해결 판정은 아닙니다.
- 정확성·경계:
reserve의delivery_bell_current는 참조가 없는Result<(), Hold>를 반환합니다. 별도 let 문의 세미콜론에서 임시 Runtime guard가 해제되므로 뒤의held -> record -> Client::submit이 같은 잠금을 필요로 하는 writer를 기다려도 Runtime을 붙잡지 않습니다. 기존 if-let은 거절 분기 실행 동안 guard를 유지해 writer의 처리·발행을 막고 5초 저장 응답 한도에 도달할 수 있었습니다. 제품의 잠금 범위를 고쳤으며 원격 테스트의 기대값이나 hook 예산을 완화하지 않았습니다. - 공통화·단순성: 새 벨의
deliver와 잃어버린 벨의 Enter를 처리하는after_lost모두reserve를 사용합니다.record_brief,resubmit_brief,type_answer, composer 읽기와 호출 경로도 확인했습니다. 앞의 둘은 and_then 내부로 guard를 소비해 반환 전에 해제하며, 나머지도 외부 호출 전에 guard 범위를 끝냅니다. 이 주변에서 같은 결함을 추가로 찾지 못했습니다. 별도 helper나 writer를 만들지 않았습니다. engineering 원칙 7·13과 저장소의 Runtime 잠금 아래 blocking I/O 금지 규칙에 부합합니다. - 소유권·비용: 새 상시 작업·큐·타이머·알림 발행이 없고 기존 writer와 정리를 유지합니다. 기존 저장·hook 시간 한도, 재시도와 중복 전달 정책은 바뀌지 않았습니다. 문서도 판정과 기록의 잠금 경계를 설명합니다.
- 회귀 검사: 기존 Bell fixture에서 durable 예약이 보인 다음 key 전이를 한 번 주입합니다. 수정 없이는 거절 기록이
delivery_timeout으로 실패하는 경로를 고정하고, 수정 후에는 입력 미전송·예약 종료·편지 Pending·정확한input_after_verdict와maybe_typed=false를 확인합니다. 작업자의 보관 로그에서 수정 전 1 failed/5.29s, 수정 후 관련 63 passed, 최종 head 회귀 1 passed/0.27s를 확인했습니다. 제가 로컬에서 재실행한 결과로 표현하지 않습니다. - 실제 CI: ARM job 129894979444의 checkout SHA가 검토 head와 일치하고
REPEAT=20,--stress-count및--retries 0을 확인했습니다. 대상connected_remote_panes_receive_once_and_disconnect_keeps_the_same_letter_pending는 1/20부터 20/20까지 20 PASS, 0 FAIL입니다. nextest Summary는 18 passed, 2 failed iterations이고, 실패한 검사는node_contract::a_device_s_pane_socket_lives_with_its_link와remote_delivery::a_spawn_with_machine_starts_the_agent_on_the_device_under_its_caller입니다. 실행의 녹색 표시를 전체 통과 증거로 사용하지 않았습니다. - 범위·본문: 최신 c1-c3에 따라 #173을 닫지 않고 Refs #173/#831/#823을 명시했습니다. 저장 1,926ms 때문에 hook 1,248ms 예산을 넘는 별도 문제는 #831에 남으며 이 변경으로 해결됐다고 판단하지 않습니다. 이는 최초 Closes 요구 대신 적용하는 명시적 운영자 범위 결정입니다. 템플릿과 attribution 제한도 충족합니다.
- 최종 diff는 제품 코드·그 안의 회귀 검사와 전달 문서 2개 파일뿐입니다. 임시 계측과 workflow 변경은 남지 않았고
git diff --check통과했습니다. 최종 전체 CI 성공은 별도 ci 줄에서 확인해야 합니다. 앱 조작이나 코드 변경은 하지 않았습니다.
yansfil
enabled auto-merge
November 10, 2026 15:33
Contributor
Author
auto-merge was automatically disabled
November 10, 2026 15:58
Pull request was closed
yansfil
enabled auto-merge
November 10, 2026 15:59
auto-merge was automatically disabled
November 10, 2026 19:20
Pull request was closed
yansfil
enabled auto-merge
November 10, 2026 19:20
This was referenced Nov 14, 2026
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.
Summary
알림을 준비하는 사이 수신자의 상태가 바뀌면, 거절 기록과 편지 읽기가 서로 기다리던 문제를 고칩니다.
거절 판정과 그 기록을 분리해 다른 편지 요청도 계속 처리합니다.
이 PR은 잠금 문제만 수정합니다.
읽기가 디스크 저장을 기다리다 시간 초과되는 문제는 별도 이슈로 남기며 #173은 열린 채로 유지합니다.
Refs with-hide/hide-private#173
Refs with-hide/hide-private#831
Refs with-hide/hide-private#823
Review
hide-core/src/delivery/doorbell.rs, 예약 이후 거절 경로가Mutex<Runtime> 아래 blocking I/O 금지규칙을 지키도록 판정 값을 먼저 꺼내 잠금을 해제합니다. 새 벨과 잃어버린 벨의 Enter 처리가 같은 수정 경로를 씁니다.Evidence
doorbell.transaction_failed: delivery_timeout으로 실패했습니다. 수정 후 관련 벨 처리 검사 63개와 최종 커밋의 회귀 검사 1개가 통과했고, 관련 정적 검사와 전체 포맷 검사가 통과했습니다.connected_remote_panes_receive_once_and_disconnect_keeps_the_same_letter_pending는 재시도 0으로 20 PASS, 0 FAIL입니다. 전체 nextest 요약은20/20 stress run iterations: 18 passed, 2 failed이며 실패 목록은 다른 두 검사입니다. #823 때문에 실행 색은 증거로 쓰지 않습니다.Verification record
10723b6412b857261ba0cb7df43fc780b6799eb8.f78492feed12258788d0a86803e0b33815d5b45b.delivery_timeout, 5.29s.scripts/verify-cargo.sh clippy -p hide-core --lib --tests -- -D warnings: exit 0.scripts/verify-cargo.sh fmt-check: exit 0.node_contract::a_device_s_pane_socket_lives_with_its_link와remote_delivery::a_spawn_with_machine_starts_the_agent_on_the_device_under_its_caller입니다.rd-6UCRRp는 상태 검사 완료 후 저장 1,926ms,rd-ukmkNU는 상태 재검사 진입 후 미완료로 두 원인을 보여줍니다.330094332f0d5c446102e9d24d0a12dd4313d926(fix: read the engine state under its current name in the restart wait #2398). 본문 갱신으로 새 CI를 요청하며 실제 checkout SHA와 포함 관계를 확인합니다.