Repository navigation
Ring the letter doorbell on agent panes started by hand - #747
Merged
Merged
Conversation
Herdr reports readiness only for an agent it launched itself and omits a false flag, so a pane where the operator typed the agent's program carries no interactive_ready at all. The doorbell read that absence as not ready, logged the refusal as changed_before_input and never tried the letter again in the same pane episode, so letters to hand-started leads waited unseen until they expired. Readiness is now three-valued at the wire boundary: only launch_pending or an explicit interactive_ready false refuses, and unreported readiness is decided by the verdict's own facts. Each refusal between the verdict and the input names its own hold reason, a refused letter is retried on a capped backoff without spending a reservation, and a letter held until its deadline is logged once with its last reason.
yansfil
added a commit
that referenced
this pull request
Oct 7, 2026
…whose pane is gone (#753) Related: #747, #749 ## Summary 수신자 자신의 ack를 모든 kind의 수령 증명으로 기록하고 해당 report watch를 끝냅니다. 예전 빌드의 acknowledged·미수령(false) 편지도 재ack로 복구하며, 기한이 지난 미수령은 unknown(null)으로 종료합니다. 호스트의 확실한 pane 읽기에서 사라진 등록을 delivery store가 끝내되, resync·단절·도달 불가 상태에서는 판단하지 않습니다. 영구 삭제한 device의 pane 캐시를 해제하고 늦게 도착한 retired coordinator의 읽기도 거부합니다. ## Review - **판단해 주세요**: 오래된 acknowledged/null은 모름 상태로 보존하며 false 미수령과 동일하게 복구하지 않습니다. - **판단해 주세요**: 탭 이동으로 pane ID가 바뀌면 이전 등록·watch를 끝내며 새 ID로 다시 묶는 작업은 후속입니다. - **조심해서 볼 파일**: `runtime/delivery.rs`의 lock 안 pane 비교와 snapshot 등록 floor, host/device/Factory 범위입니다. - **조심해서 볼 파일**: `delivery/mailbox.rs`의 수신자 identity 검사와 durable intake, matching report watch, 재ack replay입니다. - **조심해서 볼 파일**: `delivery/worker.rs`의 저장 실패 재시도와 `runtime/events.rs`의 영구 device 삭제 경계입니다. - **비용 검토**: publish마다 빌린 pane set을 만들고 변경된 읽기만 최대 2048개 등록을 순회하며 lock 안 새 I/O는 없습니다. - **비용 검토**: 원격 읽기마다 등록 device를 O(d)로 확인하고 삭제 시 소유 캐시를 해제하지만 현재 device·pane 수의 숫자 상한은 없습니다. ## Evidence - **확인한 것**: 최종 통합본의 Code/Fidelity·독립 Security 리뷰에서 scoped Fix now 0입니다. - **확인한 것**: 저장·재로드한 legacy 재ack와 device 삭제 회귀를 포함해 로컬 workspace 3213 passed·0 failed·17 ignored입니다. - **확인한 것**: 검증본과 최종 통합본의 Rust 입력 510개·소유 소스 5개가 같고, 최종 design contract도 통과했습니다. - **확인한 것**: 최종 SHA의 required verify·Design contract와 Linux E2E 220개·Windows E2E 36개가 통과했습니다. - **확인하지 못한 것**: live handoff, 실제 등록된 agent를 사용하는 후보 앱, 실제 원격 device 끊김·재연결은 미검증입니다. <details><summary>추가 근거와 실행 범위</summary> 최종 후보는 `9b7a68543c9343ef2211697ebe1c3afb04e5329f`이며 `main`의 #749 merge `148b0e0b`를 통합했습니다. Code/Fidelity·독립 Security 최종 리뷰는 이 SHA의 깨끗한 소스와 저장된 원본 실행 로그를 확인했습니다. `d5fb2d32`는 legacy ack intake, `dac044b2`는 영구 삭제 device의 캐시 수명 수정입니다. 후속 커밋은 회귀 fixture의 초기 ledger와 assertion 형식을 바로잡았습니다. 로컬 `scripts/verify-cargo.sh lint`와 `test`는 `09bf6f2f2d3081faaedfdba71c29897cb9171fdf`에서 exit 0입니다. workspace는 85개 suite에서 3213 passed, 0 failed, 17 ignored이며 core는 1743 passed, 7 ignored입니다. 최종 통합본의 Rust·manifest·contract·toolchain 입력 510개와 소유 소스 5개의 해시를 실제 비교해 차이 0을 확인했습니다. 통합으로 들어온 13개 경로는 이 PR의 소유 소스와 겹치지 않습니다. 로컬 전체 suite를 통합 SHA에서 다시 실행한 것으로 표기하지 않습니다. 최종 SHA의 [verify 37660855128](https://github.com/modakbul-gongbang/hide/actions/runs/37660855128)는 성공했습니다. [Design contract 37660854731](https://github.com/modakbul-gongbang/hide/actions/runs/37660854731)는 성공했습니다. CI Rust workspace는 2063 passed·11 skipped, 별도 remote mailbox는 1 passed·0 skipped입니다. Linux E2E 네 shard는 각각 55·53·56·56 passed이며 Windows E2E는 36 passed입니다. Rust·remote mailbox·Windows 검사·Windows E2E·Linux E2E 네 shard의 flaky report 8개가 모두 `no flaky test in this run`입니다. macOS OS contract·desktop E2E·package lane은 실행되지 않았습니다. 재ack 회귀는 실제 저장·재로드 뒤 receipt true, pull 제외, capacity 회복, matching watch 종료 및 무관한 watch 보존을 확인하도록 구성했습니다. confirmed replay 뒤 새로 건 watch를 유지하는지도 검사합니다. null은 expiry 전의 legacy 레코드일 수도 있으며 모델과 계약 모두 pull에서 제외하므로 false 복구와 구분합니다. cache 회귀는 실제 register/remove 이벤트로 역사적 ID 8개를 순환하고 local·남은 device의 캐시와 전체 ledger·pending end 상태를 보존하는지 확인합니다. 삭제 뒤 늦은 begin/publication 각각의 재생성도 검사합니다. 일반 disconnect/retry에는 영구 삭제의 캐시 제거를 적용하지 않습니다. `9acee99f`의 green fixture에서 네 가지 단일 변경 mutant가 receipt·캐시 삭제·늦은 begin·늦은 publication의 의도한 assertion으로 실패했습니다. 각 실행은 원래 소스 bytes로 복구하고 HEAD와 소스 청결을 확인했습니다. 이전 세 cache mutant는 fixture 초기화에서 실패했으므로 회귀 증거에서 제외했습니다. 17개 ignored 항목에는 실제 CLI 로그인·원격 fixture·pinned Herdr를 요구하는 외부 lane과 subprocess용 진입점이 있습니다. CI의 원격 mailbox fixture 성공은 실제 등록된 원격 device의 재연결을 증명하지 않습니다. 이전 `dc6fbda1`의 verify [37651853773](https://github.com/modakbul-gongbang/hide/actions/runs/37651853773)는 성공했습니다. 그 실행의 성공은 새 수정 후보의 성공이 아닙니다. 이전 작업자는 격리된 pinned Herdr 재시작 시 첫 snapshot이 같은 pane ID를 복원하는 것을 관찰했지만 live handoff는 실행하지 않았습니다. 운영 ledger 사본의 replay도 이전 작업의 제한된 근거이며 실제 후보 앱의 등록·배달·종료 동작을 증명하지 않습니다. 새 UI는 없고 네이티브 창 검증도 수행하지 않았습니다. </details>
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
운영자가 Herdr 셸에 프로그램을 직접 쳐서 띄운 에이전트 패널(보통 lead)은 편지 doorbell이 한 번도 울리지 않았습니다.
Herdr는
herdr agent start로 직접 띄운 에이전트에만interactive_ready/launch_pending을 보내고, false는 필드를 생략합니다.hide는 생략을 "준비 안 됨"으로 읽어 매번 거절했고, 거절은 catch-all
changed_before_input으로 한 번 기록된 뒤 패널 episode가 바뀔 때까지 다시 시도되지 않아 60분 만료까지 묻혔습니다.wire::Readiness):launch_pending: true와 명시적interactive_ready: false만 거절하고, 보고 없음은 hide가 가진 사실(30초 idle/done, 같은 이름·종류·native session, draft·최근 키 없음)로 결정합니다.launch_pending,not_ready,identity_changed,sequence_moved,input_after_verdict,letter_changed.changed_before_input은 없어졌습니다.doorbell.expired로 한 번 기록됩니다.Review
Pending,Blocked단계) 항상launch_pending: true를 보내고, 이 값은 여전히 거절됩니다.interactive_ready가 없는 경우는 Herdr가 관리하지 않는 에이전트뿐입니다(upstreamsrc/terminal/state.rsmanaged_agent_*,src/api/schema/agents.rs의skip_serializing_if = is_false). 그 위에 verdict는 여전히 positive native session과 30초 휴지를 요구합니다.herdr-core/src/delivery/doorbell.rs- high-frequency path(250 ms 루프)이자 pane에 쓰는 유일한 경로. 실패한 Herdr 호출(doorbell.failed)은 재시도 일정에 넣지 않았습니다. 벨이 이미 쳐졌을 수 있어서 이전처럼 패널이 움직일 때까지 기다립니다.herdr-core/src/wire.rs- Herdr contract 경계. 생성 타입은 그대로 private이고Readiness는 plain-value입니다.agent.get한 번이 lock 밖에서 5초부터 2분 상한으로 줄어드는 간격으로 늘어납니다(20분에 14번, 이전에는 episode당 한 번). pass당 Herdr에 가는 편지는 기존WORK_PER_PASS8 그대로입니다.Mutex<Runtime>안의 일은 늘지 않았고, 맵 세 개는 매 pass 열린 편지(≤1024)로 잘립니다. 예약(편지당 3회)은 첫 Herdr 확인을 통과한 뒤에만 잡히므로 Herdr가 계속 거절하는 편지는 예약을 쓰지 않습니다.Evidence
FakeHerdr(고정 스키마 검증)로 doorbell 루프 한 pass를 돌리는 테스트 4개 추가. 손으로 띄운 패널(플래그 없음)과interactive_ready: true패널 모두pane.send_input으로BELL_PROMPT가 한 번 쳐지고 예약 1회.interactive_ready: false는not_ready,launch_pending: true(단독, 그리고interactive_ready: true와 함께)는launch_pending으로 막히고 예약 0회, 만료 시 그 사유로doorbell.expired한 번.agent.get14번, 사유 로그 한 번, 예약 0회.Readiness를 고정.verify-cargo.sh lint,verify-cargo.sh test, 정책 검사(capability readers off lock, workstation identity, core touches no machine, herdr pin single source) 통과.claude,codex패널을 손으로 띄워 보는 live 확인은 하지 않았습니다. 운영자 앱은 건드리지 않았고, 증명은 단위·runtime 테스트입니다.codex패널은 진단 때도 관찰된 적이 없습니다. 이름·session 일치 조건은 코드상claude패널과 같은 경로(name없으면pane_id, session은 같은 digest)입니다.verify-cargo.sh test에서a_pane_reports_each_running_process_once_and_never_the_systems_pids1건 실패(실제 프로세스 표를 읽는 테스트, 부하 중 pid 3개 추가). 단독 3회 통과, 이 diff와 무관.human.channels_failed(편지 978, 1220, 1227)는 이 PR 범위 밖이고 원인은 조사하지 않았습니다.