Repository navigation
fix: open a file a node pane prints from the node's own checkout - #1320
Merged
Merged
Conversation
A window on a node resolves a terminal link against its own machine's checkouts, which the core lists in the node's session. The core looked for the checkout in its navigator alone and refused the reveal as not registered, so the click opened nothing. The reveal now finds the checkout in the catalog, and a checkout of a device's session is revealed only while it is in front there, moving no focus of the core's. The window names the node in the event so hided leaves the path to that node instead of the core machine's roots.
…st them The link record, the PRs list and the Work list already carry a node's projects, but four lookups read only this machine's navigator: the PR card's link panel, the project hide links scopes to, the minute clock that judges the PRs list, and the minute re-read of running checks. They now read the catalog, and the re-read asks for a node's repository through the node's read. The duplicate catalog walk in links.rs goes.
# Conflicts: # docs/ARCHITECTURE.md # herdr-core/src/runtime/links.rs
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
core를 Mac mini로 옮긴 뒤 MacBook 창에서, MacBook pane이 찍은 자기 checkout의 파일 경로를 눌러도 아무것도 열리지 않았습니다.
core가 그 checkout을 자기 기계 목록(navigator)에서만 찾아서, node 세션에 있는 MacBook의 checkout을 "등록되지 않음"으로 버렸기 때문입니다.
이제 core는 node와 기기의 checkout도 catalog에서 찾고, 창은 그 경로가 node의 것임을 이벤트에 적어 보냅니다.
Overview에서 누른 경로처럼 그 checkout이 node에서 앞에 있지 않으면, node의 Herdr에 그 checkout을 앞으로 가져오게 하고 도착하면 파일을 엽니다. 이 기계의 checkout을 눌렀을 때와 같은 결과입니다.
그 기다림은 요청이 살아 있는 동안만 이어집니다. node가 거절하거나 답을 잃거나, 다른 선택이 오거나, 기기가 빠지거나, node의 앞 checkout이 다른 곳으로 가거나, 답이 5초 안에 오지 않거나, 수락 뒤 15초 안에 도착하지 않으면 버립니다. 그래서 나중에 운영자가 직접 그 checkout을 열어도 예전 클릭의 파일이 열리지 않습니다.
같은 기다림에 실리는 Memory 이동도 이제 같은 규칙으로 만료됩니다. 의도한 변경입니다: 전에는 수락된 Memory 이동이 기한 없이 기다려, 한참 뒤 운영자가 그 checkout을 열면 Memory가 열렸습니다.
같은 실수가 있던 곳도 고쳤습니다: node 프로젝트 PR 카드의 연결 기록, node PR의 1분 시계와 CI 재확인.
docs/status-model.md의 "기기 행은 PR을 잇지 않는다" 문장은 실제 동작(기기 행은 CI를 기다리지 않고, node PR은 연결 기록과 PR 카드로만 이어짐)에 맞게 고쳐 썼습니다. 동작은 바뀌지 않았습니다.스크린샷 없음: 바뀐 화면 모양이 없습니다. 웹 변경은 terminal link 클릭이 보내는 이벤트에
device_id를 더하는 것뿐이고, 결과(파일이 열림)는 core 테스트가 확인합니다.Review
focus_device: true인FocusWorkspace요청으로 node를 앞으로 가져오고, 기다리는 Workspace 선택(PendingChoice::reveal)에 reveal을 실어 두었다가 sync가 도착을 보면 엽니다. View 영역이 없는 runtime(제품 hided는 늘 있음)에서만 예전처럼reveal.not_in_front로 거절합니다.PendingChoice)에 수명을 줬습니다.FocusWorkspace는 추적되는 remote operation이 아니라expire_remote_operations가 보지 못하므로, 선택이 스스로 기한을 가집니다: 답에CLOSE_STAGE_TIMEOUT_MS(5초, PRD D-08의 단계 기한과 같음), node가 수락하면 도착에CHOICE_LANDING_TIMEOUT_MS(15초). 도착은 node Herdr의 포커스 변경과 node 세션의 publish를 기다리고, 느린 tailnet에서는 5초를 넘을 수 있어 넓혔습니다. 요청 때 node의 앞 checkout을 기억해 두고, 그것도 요청한 checkout도 아닌 곳으로 앞이 옮겨 가면 버립니다. 이 규칙은 reveal, Memory 이동, D-11의 "고른 Workspace" 기억에 모두 적용됩니다. 수락 뒤 15초 넘게 늦게 도착한 앞은 운영자의 선택으로 기억되지 않고 실린 것도 돌지 않습니다.workspace.choice_expired, 앞 이동은workspace.choice_dropped). 운영자가 할 수 있는 일이 없는 실패라 화면에 올리지 않습니다(설계 원칙 Move live and remote Herdr parsing to the typed boundary #13). 그 결과 15초를 넘긴 클릭은 화면에서 조용히 아무 일도 하지 않습니다.links.rs의link_projects_print,link_projects, 부모 표(~318/354/454)는 main에서도 이미 기기 세션을 훑었고(link_lineage_workspaces), 이 PR은 같은 일을 하는catalog_workspaces로 이름만 바꿨습니다. 기기 프로젝트의 PR은device_github에서만 오고, 그 표는 스스로 사실을 보고하는 node만 채웁니다(projects.rs,LinkOrigin::reports_own_facts). 그래서 새로 열린 동작(open_links, 1분 시계, 재확인)은 실제로 node에만 닿고, SSH 기기 프로젝트에는 PR이 없습니다.lay_checks는 이 기계 pane만 놓으니 기기 행은 계속 CI를 기다리지 않습니다.tick_work_clock)은 node 프로젝트에만 PR이 있어도 이제refresh_agent_scopes_at을 1분에 한 번 돌립니다. 이 함수는 이미 이벤트 처리 47곳에서 부르는 lock 안의 행 순회(I/O 없음)이고, scope cache가 결과를 비교해 바뀐 것이 없으면 publish하지 않습니다. 더해지는 것은 1분에 순회 한 번입니다. 재확인은 CI가 도는 node 프로젝트 수만큼, 이 기계 프로젝트와 같은 상한입니다.herdr-core/src/runtime/session.rs- reveal이 catalog에서 checkout을 찾고, 기기 세션의 checkout이면 core 포커스를 옮기지 않으며, 뒤에 있으면 기기의 Herdr에 맡깁니다(reveal_when_in_front, Herdr/core ownership).herdr-core/src/runtime/workspace_view.rs-PendingChoice가 reveal을 들고, 도착한 sync에서 메모리 표시 다음에 reveal을 돌립니다. 기한, 앞 checkout 기준, 버리는 규칙도 여기 있습니다(runtime mutex 안, I/O 없음; 선택이 기다리는 동안 sync마다 그 기기 세션의 checkout을 한 번 훑습니다).herdr-core/src/runtime/agents.rs,operations.rs- 수락 답이 도착 단계 기한을 새로 걸고(acknowledge_choice, 전acknowledge_memory_navigation), tick이 기한을 봅니다(failure path).herdr-core/src/runtime/request_view.rs- 1분 tick 경로(high-frequency path): 판단 대상이 catalog 전체로 넓어졌습니다.web/src/actions.ts- node checkout의file_open/reveal_path가device_id를 실어 hided가 core 기계의 root로 경로를 판단하지 않게 합니다(failure path).Evidence
reveal.unknown_checkout), 수정 뒤 통과합니다.reveal.not_in_front로 실패하고, 지금 통과합니다. 클릭 직후에는 아무것도 읽지 않고 기기의 Herdr에FocusWorkspace가 기록되며, node의 front가 바뀐 sync 뒤에 파일이 node 채널로 읽힙니다.Call::OpenDocument)로 갔는지 확인합니다.a_reveal_waiting_on_a_node_dies_with_the_request가 일곱 경우(거절, 연결과 함께 잃은 답, 다른 선택, 기기 이탈, 앞이 다른 checkout으로 감, 답 없이 5초 지남, 수락 뒤 5초가 지나도 기다리고 15초 지나면 버림)마다 나중에 운영자가 같은 checkout을 열어도 아무것도 읽지 않고 열지 않음을 확인합니다. 기한 검사를 빼거나 앞 이동 규칙을 빼면 해당 경우가 "the old click opened"로 실패하고, 도착 단계를 5초로 되돌리면 "an accepted request waits for its front"로 실패합니다.a_remote_memory_visit_whose_front_never_landed_in_time_opens_nothing_later: 수락된 Memory 이동이 기한 안에 도착하지 않으면 나중 방문에 Memory를 열지 않고 기기를 앞으로 가져오지 않습니다. 기한 검사를 빼면 실패합니다.panel.pr의 연결 기록이 열림)도 확인합니다.scripts/verify-cargo.sh test-scoped -p herdr-core: 2633 passed, 0 failed, 9 ignored.scripts/verify-cargo.sh lint(fmt, workspace clippy-D warnings) 통과.scripts/verify-web.sh web typecheck|lint|test통과(199 files, 1753 passed, 1 skipped). 새 웹 테스트는 수정 전 코드에서 node 창의reveal_path에device_id가 없어 실패합니다. 리뷰 수정에는 웹 변경이 없습니다.navigator만 읽는 core 조회 점검
session.rsreveal_path(보고된 버그). 뒤에 있는 node checkout은 node를 앞으로 가져온 뒤 엽니다.links.rsopen_links- node 프로젝트 PR 카드의 연결 기록 패널이 열리지 않았습니다.links.rslinks_scope(fix: find new files and links from a device pane #1308). 합치면서 지운 중복 함수 대신catalog_workspaces를 부르게 했습니다.request_view.rstick_work_clock- node 프로젝트에만 PR이 있으면 1분 판단이 돌지 않았습니다.request_view.rsreread_pending_checks의 Work 목록 부분 - node PR의 CI가 1분마다 다시 읽히지 않았습니다.links.rs의link_lineage_workspaces는catalog_workspaces와 같은 일이라 지우고,link_github_project를catalog_github_project로 이름 바꿔 함께 씁니다.request_view.rslay_local_requests와checks_wait.rslay_checks의 장소 표 - 이 기계 행의 PR만 잇습니다. 기기 행은lay_remote_requests가 PR 없이 놓고,docs/status-model.md가 기기 행은 CI를 기다리지 않는다고 정합니다.reread_pending_checks의 행 PR과 checks 대기 부분 - 위와 같은 계약으로 이 기계 행만 있습니다.focus_checkout,CreateTab,FocusTab,local_tab_host- 기기 checkout의 포커스와 탭은 그 기기의 Herdr가remote_control로 다룹니다.Verification record
9acf24362d19(origin/main at the last merge), headac69637e8.scripts/verify-cargo.sh lint: pass at head.scripts/verify-cargo.sh test-scoped -p herdr-core: 2633 passed, 0 failed, 9 ignored at head.expire_pending_choicein the tick, the reveal test fails on "no answer in time: the old click opened" and the Memory test fails; without the front-moved drop, it fails on "the device's front moved elsewhere: the old click opened"; with the landing stage back at 5 s, it fails on "an accepted request waits for its front".scripts/verify-cargo.sh nextest -p herdr-corewith the new tests on the code before the fix: failed; after: passed. The behind-checkout reveal test failed ona96db77d6withreveal.not_in_front.scripts/verify-web.sh web typecheck,lint,test: pass (199 files, 1753 passed, 1 skipped); the newactions.test.tscase failed before the fix.scripts/check-no-workstation-identity.sh,scripts/check-core-touches-no-machine.py,scripts/check-no-attribution.py --range origin/main..HEAD: pass.docs/{ARCHITECTURE,UI_BEHAVIOR,status-model}.md,herdr-core/src/runtime/{agents,documents,events,links,operations,request_view,session,workspace_view}.rs,herdr-core/src/runtime/tests/{agent_scopes,documents,labels,links,project_settings,workspace_view}.rs,web/src/actions.ts,web/src/actions.test.ts.