Repository navigation
Close an earlier spawn attempt's pane only while it runs the terminal that attempt recorded - #876
Merged
Merged
Conversation
… that attempt recorded A spawn retry closed every earlier attempt's idle pane matched by pane id alone. Herdr hands pane ids out again once its server is replaced, so a record written before that could name an unrelated idle shell. The spawn record now keeps the Herdr terminal id its pane ran when the spawn recorded the pane, and an earlier pane is closed only while pane.get still reports that terminal. A pane id running another terminal, and a record written before terminals were recorded, are logged and left open. Fixes #874
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.
Fixes #874
Summary
spawn 재시도는 같은 parent/name/machine의 앞 시도 중 agent가 뜨지 않은 빈 pane을 닫습니다(#870). 그 pane은 spawn record의 pane id로만 찾았는데, Herdr는 서버가 바뀌면 pane id를 다시 내주므로 운영자가 연 무관한 빈 셸이 닫힐 수 있었습니다.
terminal_id(pane.get)를 함께 기록합니다(SpawnRecord.terminal, 같은Advance한 번).pane.get이 지금도 그 terminal을 답할 때만 닫습니다. 다른 terminal이면pane_replaced, terminal이 없는 예전 record면pane_identity_unrecorded로spawn/unstarted_attempt.close에 남기고 열어 둡니다.agent_not_started, 시작 실패)는 그대로입니다. 나이 기준, 지연, 이름 추정은 없습니다.Review
herdr-core/src/coordination/executor.rs- failure path: pane을 기록하던 두 갈래(기존 worktree, 새 worktree)를 하나로 모아pane.get뒤Advance한 번.pane.get실패는 spawn 실패로 올라가고, 같은 intent 재시도는hide:<spawn>tab label로 그 pane을 다시 찾습니다.herdr-core/src/coordination/mod.rs- delivery ledger 필드 추가(#[serde(default)], ledger version 1 유지).Advance는 저장된 terminal과 다른 값이 오면 다른 필드처럼intent_conflict.pane.get1회, 재시도마다 앞 시도 pane당pane.get1회. 고빈도 경로 아님, lock 밖.Evidence
w1:p1)에 새 terminal id를 받음(위). Herdr v0.9.3 소스도 terminal마다, 복원 때도TerminalId::alloc().["w2:p1","w2:p2","w2:p3"]가 닫혀 실패함을 확인.device-terminal이 기록됨을 확인.herdr-core+hidednextest 2,255 passed,verify-cargo.sh lintpass.check-core-touches-no-machine.py,check-no-workstation-identity.sh,check-capability-readers-off-lock.sh,check-no-attribution.pypass.