Repository navigation
fix: read an SSH device's pull requests with this machine's login - #2008
Merged
Merged
Conversation
A device the core dials over SSH never had its checkouts' pull requests read: only a node that dials in and a WSL distribution got this machine's gh login on their coordinator, and their answers alone were kept. Every device's coordinator now takes the login, and a dialed device's answer lands, so its checkouts carry their pull requests and its Project names its repository for the link record. Its issues, source and PRs tab stay as before.
This was referenced Nov 2, 2026
yansfil
added a commit
that referenced
this pull request
Nov 2, 2026
…#2012) Related: #2008 ## Summary #2008 이후 mini 같은 SSH 장치 프로젝트의 PR 목록은 읽히는데, 같은 읽기 안의 `gh repo view`가 실패해서 읽기 전체가 실패로 남았습니다. `gh repo view`는 `GH_REPO`를 무시하고 현재 폴더의 git remote를 읽기 때문입니다(gh 2.76). 장치 체크아웃은 이 Mac에 폴더가 없으니 `not a git repository`로 끝납니다. 이제 gh 실행기가 저장소 이름이 있는 호출에서는 `repo view`에 그 이름을 인자로 붙입니다. ``` pull_requests.failed project=/Users/grab/projects/modakbul pull_requests=75 message="failed to run git: fatal: not a git repository (or any of the parent directories): .git" ``` ## Review - **조심해서 볼 파일**: `hide-host/src/gh.rs` - 허용 목록 검사는 원래 인자로 하고, 실행할 때만 저장소 이름을 넣습니다. ## Evidence - **확인한 것**: 설치한 1.1.1-main.73732d2f에서 core 로그에 mini 프로젝트 3개의 읽기가 위 메시지로 실패하는 것을 봤습니다. - **확인한 것**: `cd / && GH_REPO=with-hide/hide gh repo view --json nameWithOwner`는 같은 메시지로 실패하고, `issue list`와 `pr list`는 성공합니다. - **확인한 것**: 새 테스트 `a_repository_view_named_by_its_repository_needs_no_checkout`는 고치기 전에는 실패하고 고친 뒤에는 통과합니다. hide-host 275개 통과, clippy 깨끗. - **확인하지 못한 것**: 고친 빌드로 mini 읽기가 성공하는지는 아직 보지 못했습니다. 머지 후 재설치해서 확인합니다.
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
SSH로 연결한 장치(예: mini)의 프로젝트는 GitHub를 한 번도 읽지 않았습니다.
이 Mac의
gh로그인을 장치 쪽 동기화에 넘겨주는 일이 이 core에 접속해 오는 노드와 WSL에만 있었고, 읽어 온 답도 그 둘의 것만 받아들였기 때문입니다.이제 모든 장치가 이 Mac의 로그인으로 저장소 이름에 따라 읽히고, 그 답이 반영됩니다: 체크아웃에 PR이 붙고, 링크 기록(
links.sqlite3)의 Project에 저장소가 채워집니다.SSH 장치의 이슈, 소스, PRs 탭은 D-29대로 지금처럼 꺼진 채입니다. 장치에서
gh가 도는 일은 없습니다.스크린샷 없음: core만 바뀌었고
web/src는 그대로입니다. 체크아웃 행에 PR 표시가 붙는 것은 지금 있는 표시 그대로입니다.Review
herdr-core/src/session_sync.rs- 이제remote()가 login을 반드시 받으므로, login 없이 장치 동기화를 만들 수 없습니다(원인이 다시 생기지 않게 막은 자리).herdr-core/src/runtime/projects.rsingest_device_github- origin 검사 대신 등록된 장치인지만 봅니다. 그래서 지운 장치에 늦게 도착한 답은 버려집니다.gh읽기가 늘어납니다. 저장소마다 한 번 읽고 그다음 5분마다 읽으며,GITHUB_PROJECT_LIMIT가 상한입니다. 락 밖의 리더 스레드에서 돌고, 락 안에서는 요청을 만들고 답을 반영하는 일만 합니다(노드와 같은 경로).Evidence
ssh_alias등록(Dialed)이었고,core*.jsonl에 mini 경로의pull_requests.*줄은 0건이었습니다. 이는devices.rs가reports_own_facts()일 때만 login을 넘기는 것과 맞습니다.a_device_this_core_dials_has_its_pull_requests_read_with_this_machine_s_login은 고치기 전pull_requestNone으로 실패했고, 고친 뒤 통과합니다. 요청에는acme/app이 담기고, 체크아웃 PR Bump swift-actions/setup-swift from 2.4.0 to 3 #7, 링크 fact의 repository, 이슈가 비어 있는 상태를 확인합니다.verify-cargo.sh nextest -p herdr-core는 3920개 통과, 실패 0개입니다.clippy -p herdr-core --all-targets도 경고가 없습니다.links.sqlite3의 minirepo와 로그의 minipull_requests.read로 확인할 수 있습니다.remote()의 필수 인자).Verification record