Skip to content

fix: name a gh too old for Hide's GitHub reads and keep the repository when the PR list fails - #2164

Merged
yansfil merged 1 commit into
mainfrom
fix/gh-version-independent-reads
Nov 6, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/gh-version-independent-reads

Conversation

@yansfil

@yansfil yansfil commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

맥북의 gh 2.58.0이 Hide가 요청하는 PR 필드(closingIssuesReferences)를 몰라서, 그 맥북의 PR 읽기가 매번 실패했습니다.
실패할 때 저장소 id까지 함께 버려져서, 미션이 다른 기기 워커를 이유를 말하지 않고 거부했습니다.

  • Hide가 쓰는 최소 gh 버전(2.72.0)을 한 곳(MINIMUM_VERSION)에 정했습니다. GitHub를 읽을 때마다 버전을 먼저 확인하고, 기준보다 낮으면 "gh가 오래됐어요. 업데이트하세요"라고 알립니다.
  • CI가 그 최소 버전 gh로 Hide가 보내는 명령 줄 전부를 네트워크 없이 검사합니다. 더 새 gh에만 있는 필드를 추가하면 최소 버전을 같이 올려야 CI를 통과합니다.
  • PR 목록이 실패해도, 함께 읽은 이슈와 저장소 id는 유지합니다.
  • 미션이 다른 기기 워커를 거부할 때, GitHub 읽기가 실패한 이유와 고칠 방법을 함께 알려 줍니다.

PR list when gh is older than 2.72.0
PR 목록에서 gh가 2.72.0보다 오래됐을 때 보이는 줄(한국어, 다크). 설정의 GitHub 줄과 폰 PR 화면도 같은 문구를 씁니다.

Review

  • 판단해 주세요: 문구 "gh가 오래됐어요. 업데이트하세요". 버전 숫자는 화면 문구에 넣지 않았습니다(기준이 Rust 상수 한 곳에만 있도록). 숫자는 진단 로그와 미션 거부 메시지에 나옵니다.
  • 판단해 주세요: 버전을 읽지 못한 경우(--version 실패, DEV 빌드)에는 막지 않습니다. 진단만 남기고 기존처럼 auth status가 판정합니다. e2e의 가짜 gh 15개가 --version을 모르는 것도 이 덕분에 그대로 통과합니다.
  • 조심해서 볼 파일: herdr-core/src/github.rs read_project - failure path. PR 목록이 실패하면 이제 issues_read=true와 저장소 id를 싣습니다. 이전 PR 목록을 오래된 값으로 남기는 처리는 기존 keep_previous_reads가 합니다.
  • 조심해서 볼 파일: contracts/snapshot-wire-enums.json, web/src/snapshot.ts - snapshot wire. GithubFailureCategory와 BacklogFailure에 outdated가 추가됩니다.
  • 조심해서 볼 파일: .github/workflows/pr.yml, scripts/fetch-gh.sh - rust lane에 gh 2.72.0을 받아(고정 digest) 검사하는 단계가 추가됩니다. hide-host가 계획될 때만 돕니다.
  • 질문: 미션 거부 메시지에 이유를 붙인 것을 with-hide/hide-private의 missions.md에도 반영해야 할까요? 공개 쪽 hided/assets/mission/help.md에는 반영했습니다.

Evidence

  • 확인한 것: gh 릴리스를 이분 탐색해 최소 버전을 측정했습니다. 2.58.0과 2.67.0, 2.71.0은 closingIssuesReferences를 모르고, 2.72.0, 2.73.0, 2.76.0, 2.95.0은 Hide의 모든 필드를 압니다.
  • 확인한 것: 새 CI 테스트를 gh 2.72.0(macOS arm64)으로 실행해 통과했습니다. 명령 줄 35개가 모두 GitHub에 요청하기 직전, 막힌 프록시에서 멈췄습니다.
  • 확인한 것: Rust 단위 테스트를 추가했습니다(버전 파싱, 오래된 gh는 PR 목록을 보내기 전에 거부, 버전을 모르면 auth status로 넘김, 실패한 PR 목록에서 저장소 id 유지, 미션 거부 이유). 모두 통과했습니다.
  • 확인한 것: hide-node-link, hide-host, herdr-core, hided 전체 nextest를 로컬에서 돌렸습니다. 5,049개 중 5,046개가 통과했습니다.
  • 확인한 것: 웹 typecheck, lint, 단위 테스트 291개 파일 2,664개, 디자인 계약 검사, test_ci_plan 94개, 정책 검사(workstation identity, harness anchor, readers off lock, attribution)가 통과했습니다.
  • 확인하지 못한 것: 실제 gh 2.58.0이 설치된 기기에서 앱을 띄워 화면을 확인하지는 않았습니다. 화면은 갤러리(scene=pr-list&gh=outdated)에서 실제 컴포넌트로 캡처했습니다.
  • 확인하지 못한 것: 로컬 Mac(Darwin 24.1)에서 이 PR이 건드리지 않은 파일의 테스트 4개가 실패했습니다. Linux CI 결과로 판단합니다.
    • worktree_control.rs의 테스트 2개: pid 4294967294를 읽지 못함(invalid input parameter).
    • hide-host/src/kit.rs의 테스트 2개: current_runs, !folder.exists().
추가 증거

PR list when gh is older than 2.72.0, English light
같은 상태(영어, 라이트).

Verification record

…y when the PR list fails

Hide asks gh for fields only newer releases know: gh 2.58.0 refused
closingIssuesReferences, every pull request read on that machine failed,
the repository's identity was dropped with it, and a mission then refused
a worker on another machine without saying why.

- hide_node_link::gh::MINIMUM_VERSION (2.72.0) is the oldest gh whose
  fields and flags cover every allowed command line. Each read pass asks
  gh --version before auth status and refuses an older release as the
  new `outdated` failure category, which the GitHub row, the PR list,
  the phone, Memory and the backlog name as "update gh".
- The rust lane runs every allowed command line against that release
  offline (scripts/fetch-gh.sh, hide-host gh tests), so a field a newer
  gh added fails CI until the minimum moves with it.
- A failed pull request list keeps the issues and the repository identity
  read beside it.
- mission_machine_no_repository names what to fix when GitHub's read failed.
@yansfil
yansfil added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 09abc4c Nov 6, 2026
112 of 114 checks passed
@yansfil
yansfil deleted the fix/gh-version-independent-reads branch November 6, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant