Repository navigation
Conversation
Herdr 0.9.1 can answer a new pane's cwd with a folder above the one it was created in while a Linux machine is loaded, and sends no event when the cwd settles. One read after the event took that answer as final, so the tab stayed under the parent folder's project row. The replica now keeps, per unconfirmed pane, the last cwd it held and how many times it was read. A read that repeats the value before it (the event's, for the first read) confirms the pane; a different one is published and the pane is read again on the existing 250 ms coordinator tick, outside the runtime lock. After 8 reads the last answer stands and pane_cwd.unsettled is logged; at most 64 panes wait at once as before.
yansfil
added a commit
that referenced
this pull request
Oct 7, 2026
…ree (#705) Closes #699 ## Summary Linux에 부하가 걸리면 Herdr 0.9.1은 새 pane의 cwd를 잠깐 상위 폴더(`/`, `/tmp`, 프로젝트의 부모)로 답하고, 그 값이 바로잡힐 때 event를 보내지 않는다. #569/#665는 event 직후 `pane.get` 한 번을 확정으로 보았기 때문에, 그 한 번마저 상위 폴더를 답하면 탭이 부모 폴더의 project row에 남았다(`toHaveCount` 실패). 이제 replica의 미확인 cwd는 pane마다 직전 값과 읽은 횟수를 들고 있다. 읽은 값이 직전 값(처음에는 event 값)과 같을 때만 확정하고, 다르면 그 값을 publish한 뒤 기존 250 ms coordinator tick에서 runtime lock 밖에서 다시 읽는다. 8번 읽어도 같은 값이 두 번 이어지지 않으면 마지막 값으로 확정하고 `pane_cwd.unsettled`를 남긴다. 새 timer, sleep, 상태는 없다. ## Review - **판단해 주세요**: event 값과 첫 읽기가 같은 일시 값이면 그대로 확정된다. Herdr가 cwd 변화 event를 주지 않는 한 남는 한계다. - **조심해서 볼 파일**: `herdr-core/src/session_sync/replica.rs` - `unconfirmed_cwds`가 set에서 map(직전 값, 횟수, tick 경과)이 됐다. 첫 읽기는 event 직후 한 번, 다음 읽기는 한 tick이 지난 뒤부터. - **조심해서 볼 파일**: `herdr-core/src/session_sync/coordinator.rs` - operation tick에 `reread_pane_cwds`가 추가됐다(high-frequency path, Herdr 호출). 실패는 event 경로와 같이 replica를 다시 만든다. - **비용 검토**: 기다리는 pane이 없으면 tick당 추가 작업 0. 기다리는 pane당 tick마다 `pane.get` 하나, pane당 최대 8회(약 2초), 동시에 최대 64 pane(기존 cap). cwd가 바뀐 tick만 publish하고, lock 안 작업은 없다. ## Evidence - **확인한 것**: 결정적 core 재현 `a_pane_cwd_settles_when_two_answers_in_a_row_agree`(FakeHerdr). event `/tmp`, 읽기 `ROOT`, `ROOT/fixture`, `ROOT/fixture`. - **확인한 것**: 같은 테스트를 main(b8a495b) API로 돌리면 실패한다: `left: Some("/tmp/hde-root")`, `right: Some("/tmp/hde-root/fixture")`. 수정 후 통과. - **확인한 것**: 표의 네 행 모두 통과. 첫 읽기 확정(1회), 다른 값 뒤 확정(2회), 위 재현(3회), 상한 도달(8회 뒤 마지막 값, 9번째 읽기 없음). - **확인한 것**: event 직후 읽은 pane은 바로 다음 tick에 다시 읽지 않는다(Herdr 호출 수로 확인). - **확인한 것**: 로컬 `verify-cargo.sh nextest -p herdr-core` 1626/1626 통과, `fmt-check`, `clippy -p herdr-core --all-targets -D warnings` 통과. - **확인한 것**: 이 PR의 CI 전 lane 녹색(Linux web 4 shard, Windows web, rust workspace, os contract 포함). - **확인한 것**: TEMP 부하 반복(Linux, 모든 CPU busy loop, 해당 테스트 `--repeat-each 100 --retries 0`): after(이 PR, #704) 100/100 통과. - **확인하지 못한 것**: e2e에서의 수정 전 실패. 같은 조건의 before(main b8a495b, #703)도 100/100 통과해, 이 규모의 반복은 #699를 재현하지 못했다(새 탭 1500개). 수정 전후를 가르는 증거는 위 core 재현이다.
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.
증거 실행용 TEMP PR, 머지하지 않는다. web e2e Linux lane만, 'Selecting an Agent tab moves the title width to it' --repeat-each 100 --retries 0, 모든 CPU에 busy loop 부하(issue 699 probe 방식). 끝나면 닫고 브랜치를 지운다.