Skip to content

Move the web end-to-end to Linux, keep @platform tests on macOS, run the whole suite there nightly - #294

Merged
yansfil merged 4 commits into
mainfrom
ci/web-e2e-linux
Oct 1, 2026
Merged

yansfil merged 4 commits into
mainfrom
ci/web-e2e-linux

Conversation

@yansfil

@yansfil yansfil commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Related: Refs with-hide/hide-private#103, #299 (분리한 제품 race), with-hide/hide-private#104 (flaky 정리)

Summary

verify 한 번이 macOS job 5개(web e2e 4 shard + desktop e2e)를 쓰는데 org의 macOS 동시 실행이 5개라서, 둘째 실행이 첫 job을 시작하기까지 13~45분을 기다렸습니다.
web shell은 세 OS에서 같은 코드이므로 web e2e 전체를 Linux 8 shard로 옮기고, macOS에는 desktop e2e와 @platform 태그 12개만 남겨 실행당 macOS job을 2개로 줄였습니다.
macOS 전체 실행은 nightly.yml(03:00 KST)로 옮기고, 실패하면 bug 이슈 하나를 열거나 이미 열린 이슈에 댓글을 답니다.
Linux에서 실패하던 spec은 원인별로 spec, fixture, 제품 CSS 한 곳에서 고쳤습니다. 숨기거나 격리한 테스트는 없습니다.

Linux 실패 원인 고친 곳
새 workspace가 prompt에 닿지 않음 (3 spec) Ubuntu의 /etc/zsh/zshrc compinit가 멈춘다. fixture가 .zshenv로 우회했는데 세 spec이 그 파일을 덮어씀 skip_global_compinit를 fixture 환경 변수로
클립보드가 빔, 편집기 커서가 안 감 Playwright의 편집 명령(copy, 문서 처음으로)은 호스트 OS의 chord에 묶임. Meta+C는 macOS에서만 복사 ControlOrMeta+Home, Linux에서는 브라우저 copy 명령, PR glyph는 ControlOrMeta 클릭
메뉴가 20 px 밀림 스크롤바가 아니라 글꼴 폭. 가장자리에 붙은 메뉴는 화면 안에 들 만큼만 왼쪽으로 움직이고, 메뉴 폭은 글꼴에 따라 다름 기대 위치를 min(pointer, viewport - menu)로
1024 px에서 문서가 가로로 스크롤 세션 상세 헤더 한 줄이 넓은 글꼴에서 pane보다 1.5 px 넓음 ProjectSessions.tsx 헤더가 wrap
Enter가 에이전트를 시작하지 않음 모델 메뉴가 닫힌 뒤 focus를 트리거로 돌려주는 시점이 spec의 입력보다 늦음 트리거 focus를 기다림
⌘F 입력에 마우스 보고가 섞임, 연달은 focus 요청이 뒤집힘 PTY 도착과 Herdr 적용이 클릭보다 늦음 도착/적용을 기다림. 뒤집힘의 제품 쪽 원인은 #299

터미널 control 소켓 Broken pipe는 Linux에서 재현되지 않았습니다. 아래 Evidence에 적었습니다.

Review

  • 판단해 주세요: @platform 12개와 각 이유 주석이 macOS에서만 증명할 것을 고르는가 (rg -n "@platform" web/e2e).
  • 판단해 주세요: nightly는 닫힌 이슈를 다시 열지 않고 새로 엽니다. 연 이슈는 수동으로 닫습니다.
  • 판단해 주세요: s2.spec.ts는 Linux에서 ⌘C 대신 document.execCommand("copy")를 씁니다. pane의 copy 핸들러는 같은 이벤트로 검증되고, ⌘C chord는 macOS @platform job이 누릅니다.
  • 조심해서 볼 파일: .github/workflows/web-e2e.yml - 세 lane이 공유하는 재사용 workflow. 입력은 모두 env로 받고, verify는 호출한 job 결과도 success만 통과시킵니다.
  • 조심해서 볼 파일: .github/workflows/nightly.yml - issues: write를 가진 유일한 job. 제목이 같은 열린 bug 이슈를 찾아 댓글, 없으면 생성.
  • 조심해서 볼 파일: web/src/ProjectSessions.tsx - 이 PR의 유일한 제품 변경(헤더 wrap), 일반 폭에서 순서가 그대로여야 합니다.
  • 질문: shard 8개가 맞는지. 측정은 아래에 있고 6개면 shard당 약 +50 s입니다.

Evidence

  • 확인한 것: Linux 8 shard가 112개 중 @flaky 제외 전체를 통과 (run 36872454135, attempt 2). shard의 e2e step 124236 s, job 5.47.1 min (rust cache가 main에서만 저장되어 hided 빌드가 shard마다 약 110 s인 상태).
  • 확인한 것: macOS @platform job 1개가 12개를 통과 (e2e 249 s, job 7 min). 이전에는 macOS web shard 4개가 각 9.511 min, 대기 1326 min, desktop e2e 대기 45 min (run 36860287467).
  • 확인한 것: 고친 spec을 Linux에서 단독 반복 실행: s6 24회, start-panel/checkout-owner 8회, s2/s7/s8 8회, session-search 8회 모두 통과 (고치기 전 s6는 8회 중 2회 실패).
  • 확인한 것: Linux에서 Broken pipe로 멈춘 셸은 이번 112개 실행 어디에도 없었습니다. hided 로그의 Error: Os { code: 32, kind: BrokenPipe }는 daemon을 끝낸 직후 herdr terminal session 자식이 닫힌 파이프에 쓰고 내는 한 줄이고, 테스트와 무관했습니다. 2026-09-28 시도에서 본 셸 멈춤은 같은 날 fixture가 prompt에 닿지 못한 것과 #285의 inotify 폭주가 겹친 결과로 보이지만 확인하지 못했습니다.
  • 확인하지 못한 것: nightly.yml은 default branch에 올라가야 dispatch할 수 있어 실행하지 못했습니다. 보고 job의 이슈 조회와 본문 조립만 실제 저장소로 dry-run했습니다. merge 직후 수동 실행이 필요합니다.
  • 확인하지 못한 것: 첫 실행의 shard 1이 agent-close-contract.spec.ts:13에서 한 번 실패했고(#231에 macOS 실패로 이미 있음) 재실행에서 통과했습니다. checkout-owner.spec.ts:37(UI가 Herdr보다 탭이 하나 적음)과 session-search-performance.spec.ts(90 s 안에 인덱싱 끝나지 않음)는 각각 한 번 실패했고 반복 8회로 재현하지 못했습니다.
  • 확인하지 못한 것: desktop e2e가 첫 시도에서 browser.spec.ts:655(#284의 native area cycle)로 한 번 실패했습니다. 이 PR이 건드리지 않는 파일이고 재실행 결과는 아래 verify를 보세요.
  • 확인하지 못한 것: 화면 증거는 없습니다. 헤더 wrap은 1024 px spec(s8.spec.ts)이 통과하는 것으로만 확인했습니다.
추가 증거

@yansfil
yansfil force-pushed the ci/rust-linux-four-shards branch from e426c48 to 49b1ea2 Compare October 1, 2026 12:12
Base automatically changed from ci/rust-linux-four-shards to main October 1, 2026 13:07
… and key bindings

The suite passed on macOS by luck of timing or by the host's chord table; on
Linux the same specs failed, each for a cause in the spec or its fixture:

- The fixture's skip_global_compinit rode a .zshenv that three specs
  overwrite to put the fake agent first on PATH, so their second workspace
  never reached a prompt behind Ubuntu's compinit. It is now a variable in the
  fixture's environment, which no spec rewrites.
- Playwright binds its editing commands to the host's chord: Meta+C copies
  and Meta+ArrowUp goes to the start of the document only on macOS. Editor
  presses use ControlOrMeta+Home, the pane copy runs the browser's own copy
  command off macOS, and a Ctrl-click on the PR glyph is the external-open
  gesture off macOS.
- A menu opened near the window's edge moves left as far as it needs to stay
  whole, and how far depends on the system's fonts; the spec now expects
  the menu where the edge allows rather than 2 px from the pointer.
- The model menu hands the keyboard back to its trigger after the spec had
  already typed, so the next Enter reopened the menu instead of starting the
  agent; the spec waits for the trigger to hold focus.
- A click on an agent pane reaches its PTY as a mouse report after the click
  returns, and the next press counted it as input; the spec counts the report
  first.
- Two sidebar focus requests in flight can be applied by Herdr in either
  order, and the later one then reads as Herdr's own move; the spec waits for
  Herdr to hold the first before asking for the second.
…ndow

At the narrowest supported window (1024 px) the header row of an open
session was wider than its pane by a few pixels in a font wider than the
design's, pushing the whole document into a horizontal scroll. The checkout
name, the time and the reading mark now share the free width, with the name
truncating first, and the row wraps when what cannot shrink no longer fits.
… with @platform

Twelve tests cover what differs by system rather than what the web shell
draws: terminal input and echo through the platform's Herdr, the pane flow
with its copy chord, saving and watching files, Trash, linked worktree paths
and their deletion, process ownership, disk cleanup, the command-key chords
and Korean input. Each carries a comment naming what it covers; a pull request
runs them on macOS as well as Linux.
…nd run the whole suite on macOS nightly

A verify run held five macOS jobs (four web end-to-end shards and the
Electron end-to-end) in an organization that runs five at a time, so a
second run waited 13 to 45 minutes for its first slot. The web shell is the
same code on every system, so the suite now runs once on Linux in eight
shards, and macOS keeps only the Electron end-to-end and one job for the
tests tagged @platform: two macOS jobs per run.

- web-e2e.yml is the lane the pull request's Linux shards, its macOS job and
  the nightly run share: build hided, fetch the pinned Herdr asset for the
  runner, deal the tests out to the shards, keep the logs of a failure and
  run the @flaky quarantine in shard 1.
- nightly.yml runs the whole suite on macOS at 03:00 in Seoul and, when it
  fails, opens one bug issue or comments on the one already open.
- CONTRIBUTING.md, the performance guide and the Playwright config say where
  each lane runs.
@yansfil yansfil changed the title Run the web end-to-end on Linux Move the web end-to-end to Linux, keep @platform tests on macOS, run the whole suite there nightly Oct 1, 2026
@yansfil
yansfil marked this pull request as ready for review October 1, 2026 14:34
@yansfil
yansfil merged commit 621a38c into main Oct 1, 2026
54 of 61 checks passed
@yansfil
yansfil deleted the ci/web-e2e-linux branch October 1, 2026 14:46
yansfil added a commit that referenced this pull request Oct 1, 2026
…quests (#291)

Related: PRD `agents/prd/cmdk-navigation/prd.md` · 선행 #283 (device rail)

## Summary

- ⌘K가 명령 팔레트에서 이동 팔레트로 바뀝니다: 에이전트·프로젝트·checkout·기기·PR·이슈를 이름이나 `#번호`로
찾아갑니다.
- 입력이 비어 있으면 앞에 있는 것과 이어진 것을 Overview 방식으로 보여 줍니다: 이슈, checkout 그룹의 PR과
에이전트 계보, 다른 checkout의 부모는 `↑ 부모` 한 줄.
- 오른쪽 상세가 고른 행의 사실과 관계를 말하고, `GitHub에서 "…" 검색` 행만 코어의 새 `github_search`를
한 번 부릅니다. 입력 중에는 GitHub를 부르지 않습니다.
- ⌘K의 명령은 `에이전트 시작…`만 남습니다. ⌘P는 ⌘↵로 옆에 열고, Area 포커스·크기 조절은 기본 키 없는 레지스트리
명령이 됩니다(BINDINGS_CAP 32).

![에이전트 앞에서 빈 ⌘K: 이슈, checkout 그룹의 PR과 에이전트 계보, 오른쪽
상세](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/01-agent-relations-light.png?raw=true)

![GitHub에서 검색 결과
(다크)](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/08-github-results-dark.png?raw=true)

![좁은 창:
목록만](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/10-narrow-light.png?raw=true)

## Review

- **판단해 주세요**: #284가 ⌘K에 넣은 순환 명령(최근 탭·패널)은 PRD B22대로 ⌘K에서 빠집니다. 키 없이 쓰던
전역 Recent Panels는 Settings에서 키를 지정하거나 데스크톱 메뉴로 실행합니다(overview e2e를 그렇게
바꿨고, 쓰던 곳이 없어진 `commandRequest`는 지웠습니다).
- **판단해 주세요**: 빈 ⌘K에서 `여기` 행이 목록 맨 앞이 아니라 계보 안에 놓이는 배치가 읽기 좋은지(첫 이미지).
- **판단해 주세요**: GitHub 검색이 `gh search` 두 번(`--repo` 반복, 질문은 단어별 인자)이라 한
저장소가 깨지면 전체가 실패하는 트레이드오프.
- **조심해서 볼 파일**: `herdr-core/src/github.rs` - `run_gh` 허용 목록의 가변 길이
모양(`is_search_call`)과 저장소 해석(`gh repo view`)이 외부 호출 경계.
- **조심해서 볼 파일**: `herdr-core/src/runtime/issues.rs` - 검색 워커 슬롯(최신 요청 하나만
대기, 오래된 답 버림, panic도 실패로 끝남).
- **조심해서 볼 파일**: `web/src/SearchPalette.tsx`, `web/src/relations.ts` - 열
때 한 번 읽는 앞 상태와 계보 그룹 구성.
- **질문**: 읽지 않은 프로젝트의 저장소 해석 결과를 실행 동안 기억할까요? 지금은 검색마다 `gh repo view`를
다시 부릅니다(후속으로 남김).

## Evidence

- **확인한 것**: `sasu implement verify` PASS(cargo test 전체 + lint, 머리
`28773a3`). `github::tests`와 `runtime::tests::issues`(허용 목록, 저장소 해석, 슬롯
수명)가 포함됩니다.
- **확인한 것**: web tsc·eslint·vitest 758개, desktop tsc·vitest, 디자인 계약 검사,
Playwright cmdk(3)·palette·s2/s3/s6/s7
일부·start-panel·home·sidebar-shell, 데스크톱 attach/browser/session-labels.
- **확인한 것**: 갤러리 장면(`/gallery?scene=search-palette`)으로 상태별 캡처를 밝은/어두운
테마로 떴습니다: 앞 에이전트, 짧은 관계, 입력 하나, 입력 결과, #이슈, #PR, GitHub 검색 중·결과·실패, 좁은
창.
- **확인하지 못한 것**: 열 때의 한 번 읽기(스피너, ⚠) e2e, device-home e2e, 전체 e2e 스위트.
읽지 않은 프로젝트의 저장소 해석은 단위 테스트만 있고 실제 gh로 돌려 보지 않았습니다.
- **확인한 것**: 재기반 뒤 데스크톱 e2e 전체 31개 중 26개 통과, 실패 하나(browser 스펙)는 고쳐 다시
통과. CI에서 실패한 `agent-tab-groups.spec.ts:8`은 새 명령이 기본 키가 없어(`browser:
null, electron: null`) 키 입력을 가로챌 수 없고, 로컬 전체 실행에서 통과해 이 변경과 무관한 입력 유실로
봅니다.
- **확인하지 못한 것**: 설치된 앱에서의 실사용 확인. `/Applications/hide.app`은 건드리지 않았습니다.
- **생성물**: `design/hide-screens.pen`은 `scripts/pen-screens.mjs`가 만든 파일이며
Palette 시트만 바뀝니다.

<details><summary>Verification record</summary>

- PRD: `agents/prd/cmdk-navigation/prd.md` (sha256
9394ddc7400fa8208e638ccbdb780f4f709092740da38d8a1c472c37f1feb1f1)
- Base e246d00 → head 28773a3, verified 2026-10-01T16:20:00.427Z: PASS
- Verification report:
`agents/runs/cmdk-navigation/verification-report.json` and
`agents/runs/cmdk-navigation/verification-report.md`; source fingerprint
32ef9a7a3e1a791cedc08f4c2ba224cc83486c7d8cb4e9e3e2932d22280751fb
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews: Fidelity와 Code 리뷰를 머리 `2469f2e6`에, 수정분 `054502db`에 후속 리뷰를
했습니다. REVIEW_UNAVAILABLE 아님.
- Fix now(고침): 읽지 않은 프로젝트를 건너뛰던 GitHub 검색, 여러 단어가 한 문구로 가던 질문, 저장소마다
호출하던 구조(2번 호출로), 좁은 창 기준 800px, 관계 줄 줄바꿈, ⌘↵의 IME 조합과 옆자리 없음 이유, 링크
호스트(github.com만).
- 후속 리뷰 뒤 `2b67b65`: GitHub 원격이 없는 프로젝트는 건너뛰고, 그 외 해석 실패는 검색 실패로 끝냅니다. 이
커밋은 따로 재리뷰하지 않았습니다.
- origin/main(#282, #290, #289)에 다시 올린 뒤: 충돌은 e2e 한 곳(격리 태그 유지)이었고, 데스크톱
browser 스펙의 패널 펼치기를 툴바 위치 메뉴로 고쳤습니다(내 변경이 부른 실패).
- CI 첫 실행의 두 실패: web e2e `cmdk.spec.ts`는 ⌘K로 에이전트를 고른 직후 ⌘K를 다시 열어 입력하면
첫 글자들이 사라졌습니다(CI 트레이스: 입력칸에 `t`만 남음). 코어 답이 늦게 도착해 `PaneView`가 터미널로 포커스를
가져간 것이 원인이라 제품 쪽을 고쳤습니다: 팔레트가 키보드를 쥐고 있으면 늦은 포커스가 가져가지 않고, 팔레트가 닫힐 때
`restoreFocus`가 돌려줍니다. 테스트는 기다리지 않고 바로 다시 열어 입력 전체를 단언합니다. 로컬에서는 재현하지
못했습니다(트레이스와 코드 경로로 추정).
- 두 번째 재기반(origin/main `e668d1ee`, #284 등): 충돌은
`search.ts`·`Palette.tsx`(#284의 순환 명령을 ⌘K에서 뺌), `menu.ts`,
`shortcuts.test.ts`, 문서, `palette`/`s2` e2e였고 양쪽을 살려 풀었습니다(편집 가능한 명령
21개, 단축키 시트 42줄).
- 병합 뒤 CI의 데스크톱 e2e 실패(`browser.spec.ts:655` area cycle native)는 flake가
아니라 이 PR이 만든 실패였습니다: #284에서 들어온 그 스펙이 ⌘K의 `Expand side panel` 명령을 눌렀고 이
PR이 그 명령을 없앴습니다. 툴바 위치 메뉴로 패널을 펼치게 고쳐 로컬에서 통과했고, 다른 `command:` 행·⌘K 명령
사용은 없는지 web/desktop e2e 전체를 검색했습니다(남은 것은 `command:start-agent`와 팔레트
열기·닫기뿐).
- #294·#304 병합 뒤 `origin/main`을 merge해(rerun 아님) 새 CI 배치로 올렸습니다. 같은 패턴이
#282에서 들어온 sign-in popup 스펙에도 하나 더 있어 같은 방식으로 고쳤고, 두 스펙과 첫 browser 스펙 모두
로컬에서 통과했습니다(area cycle native는 `@needs-focus`라 화면을 다른 앱이 쥐면 한 번 실패했고
재실행에서 통과). 로컬 데스크톱 e2e는 `web/dist`와 `target/debug/hided`를 다시 빌드한 뒤 돌려야
합니다: 병합 전 빌드로 돌리면 #282의 새 탭 배치가 보이지 않아 popup 스펙이 거짓으로 실패했습니다.
- `verify`의 cargo 스위트가 부하 중 두 번
`github::tests::gh_boundary_is_read_only_…`(`gh timed out after 1000
ms`, 이 PR이 건드리지 않은 1초 제한 테스트)로 실패했고 다시 돌리면 통과했습니다.
- 데스크톱 e2e `session-labels.spec.ts:22`(`page.reload` net::ERR_ABORTED)는
이 PR이 건드리지 않은 main의 알려진 불안정 테스트입니다(#289).
- Follow-up improvements(남김): 읽지 않은 프로젝트 해석을 기억하기, 상한을 해석 뒤에 적용하기, 시작 패널
포커스 경합(드물게 ⌘K Enter 뒤 텍스트 칸이 포커스를 못 받음), 계보에서 조부모 부모 표기와 다른 checkout 아래
후손 누락, 이슈 id에 프로젝트 없음, ⌘K 열기가 프로젝트를 주기 폴링에 등록함, `DETAIL_MIN_WIDTH` 토큰화,
열 때 읽기 실패 ⚠가 ⌘K가 부르지 않은 읽기까지 보임.
- Evidence: none registered separately.
- Changed paths: 146 (see Files changed)

</details>
yansfil added a commit that referenced this pull request Oct 1, 2026
… six Linux shards (#305)

Related: #294 (Linux web e2e lane), #302 (windows check, same `pr.yml`)

## Summary

#294 이후 verify 한 번이 약 14개 job이고, 조직 한도가 동시 20 job이라 run 두 개만 겹쳐도 Linux
shard가 대기열에 쌓였습니다.
shard 8개가 매번 같은 준비를 반복하고 있었습니다: cargo로 `hided` 빌드 1.5~2.4분, `zsh` 설치
1.1~1.6분, Chromium 시스템 라이브러리 apt 설치 최대 5.5분.
이 PR은 `hided`를 lane당 한 번만 빌드해 shard에 넘기고, `zsh`도 한 번만 받아 넘기고, apt가 필요 없는
Chromium 설치로 바꿔 shard를 6개로 줄입니다.
테스트 내용, `@flaky` 격리 step, 실패 artifact, `verify` 하나가 필수 검사라는 점은 그대로입니다.

| (main run 36878932819 -> 이 PR run 36896943318) | 전 | 후 |
| --- | --- | --- |
| Linux web e2e lane job-분 (plan, build, zsh, shard 합) | 56.5 | 31.4 |
| 그중 shard 합 | 56.5 (8개) | 29.3 (6개) |
| shard 하나의 준비 시간 | zsh 65~97 s + cargo 92~145 s + Chromium 17~335 s | 약
1분 (hided 내려받기 7 s, zsh 2 s, Chromium 9 s) |
| Linux lane wall | 11.4분 (shard 4가 Chromium apt에서 335 s) | 9.4분 (runner
대기 최대 2.4분 포함, 대기 제외 7.7분) |
| macOS `@platform` job | 6.5 | 5.6 |
| run 전체 job-분 | 78.7 (14 job) | 54.1 (15 job) |
| run 전체 wall | 13.2분 | 9.7분 |

run 전체 숫자에는 이 PR과 무관한 차이가 섞여 있습니다: 뒤 run에는 #302의 windows check 2.4분이 있고,
desktop e2e는 9.2분(실패)에서 6.1분으로 달랐습니다.
lane 안의 비교(56.5에서 31.4, 25.1 job-분 절감)가 깨끗한 값입니다.
같은 구조의 다음 run(36898497112, 주석만 바뀐 head)도 Linux lane이 31.9 job-분, wall
9.4분, shard 6개 모두 통과였습니다.
앞 run의 Linux 나머지 7개 shard는 5.2~8.1분이었고, lane wall 11.4분은 apt에 막힌 shard
하나가 정했습니다.

## Review

- **판단해 주세요**: Chromium을 `--with-deps` 없이 설치합니다. runner 이미지가 이미 가진
라이브러리로 Chromium이 뜨고 suite가 통과했지만, `--with-deps`가 깔던 글꼴(CJK
`fonts-wqy-zenhei`, `fonts-freefont-ttf`, `fonts-unifont`,
`fonts-ipafont-gothic`)은 이제 이미지 글꼴로 대체됩니다. Linux CI의 글자 모양만 달라질 수 있고,
텍스트 폭에 걸린 단언은 모두 통과했습니다.
- **판단해 주세요**: shard 6개. 테스트 시간 합이 약 20 job-분이고 shard마다 준비가 약 1분이라, 6개는
약 31 job-분에 7.7분(대기 제외), 8개는 약 34 job-분에 더 짧지 않은 wall, 4개는 약 25 job-분에 약
10분(추정)입니다. 근거 숫자는 `pr.yml`의 설정 위 주석에 있습니다.
- **조심해서 볼 파일**: `.github/workflows/web-e2e.yml` - shard의 `if`가
`build`/`zsh`의 `skipped`를 통과시키되 실패와 취소는 막아야 합니다. 단일 shard lane(macOS)은
제자리 빌드를 유지하고 build/zsh job은 건너뜁니다.
- **조심해서 볼 파일**: `.github/workflows/pr.yml` - 줄 수를 최소로 했습니다(`shards: 6`,
주석, 머리말의 "eight"). #302와 겹치지 않도록 그 외는 건드리지 않았습니다.
- **질문**: 없습니다.

## Evidence

- **확인한 것**: 전체 verify가 녹색이었습니다(run 36896943318, rebase 전): Linux 6
shard, macOS `@platform`, desktop e2e, rust, checks, windows check,
`verify`.
- **확인한 것**: 모든 setup step에 timeout을 달았습니다(측정 길이의 수 배: checkout 3~7 s에
5분, web 빌드 19 s에 5분, 빌드 job의 cargo 20분 등). 정체된 apt가 40분 job timeout 대신
step 이름으로 분 단위에 실패합니다. 실제로 run 36894561307의 shard 2가 `Install zsh and
Chromium's system libraries`에서 10분 만에 그 이름으로 실패했습니다.
- **확인한 것**: apt가 원인입니다. `azure.archive.ubuntu.com`이 56.6 kB/s로 응답해 zsh
4985 kB가 88초, Chromium 라이브러리 32 MB가 3분(최대 5.5분)이 걸렸고, 한 번은 10분을 넘겼습니다.
`man-db` 트리거는 원인이 아니었습니다(`auto-update`가 이미 꺼져 있음). 이미지에는 Chromium이 요구하는
패키지 중 10개(글꼴, `libwayland-server0`, `xfonts-*`)가 없고 4개(Mesa, `libgbm1`)는
더 낮은 버전이지만, 그것 없이도 Chromium이 실행됩니다: `install-deps` 없이 run 36896943318이
통과했고 Playwright의 "missing dependencies" 메시지는 로그에 없습니다.
- **확인한 것**: 중간에 시험한 apt `.deb` cache는 첫 miss가 같은 느린 mirror를 타서 문제를 못
풀었기에 쓰지 않고, 최종 구조(`zsh` job이 run당 한 번 받아 artifact로 전달)에는 cache가 없습니다.
- **확인한 것**: 같은 내용을 main 최신(5ac9136) 위로 rebase하고 커밋 둘로 정리한
head(f866d9e)의 run은 36901042547이고, 결과는 아래 체크가 보여 줍니다. 위 표의 숫자는 rebase 전
두 run(36896943318, 36898497112)에서 쟀습니다.
- **확인하지 못한 것**: 중간 run에서 서로 다른 Linux 테스트 두 개가 한 번씩
실패했습니다(`projects-sidebar.spec.ts:97`, `sidebar-menus.spec.ts:79`). 둘 다
자기 Herdr와 hided를 띄우는 spec이라 shard 구성과 무관해 보이고, 이 PR 이전 main에도
`agent-tab-groups.spec.ts:236`이 한 번 졌습니다. 최종 head의 run에서는 재현되지 않았지만
flake 자체는 이 PR이 고치지 않습니다.
- **확인하지 못한 것**: nightly macOS lane(shard 4개)은 이제 build job을 거칩니다. 아직
실행되지 않았고 첫 nightly에서 확인됩니다.
- **확인하지 못한 것**: 6 shard의 wall은 runner 대기 시간에 따라 흔들립니다(이 run은 shard 시작
대기가 0.3~2.4분). 숫자는 run 하나씩의 비교입니다.
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 9, 2026
A test's own sshd chose its port by binding port 0 and letting it go, and
reported itself ready when any listener answered on that port. Another test's
sshd took the port first, the test's sshd exited with "Address already in
use", and the daemon signed in to the other server and stopped at
host_key_changed (with-hide/hide-private#210). A server is now ready only when
its own log says it listens, and one that lost the bind is started again on
another port.

The device pane asker asked the node for a credential as soon as its program
started, before the holder wrote the pane's record as running, and was
refused once with no retry (with-hide#503). The test now releases the asker after the
node's proof of the pane, and a failed wait shows the asker's screen.

The node's caller cap probe wrote its request to a connection the node had
already answered and ended (with-hide#149), and the setup renderer's receipt wait gave
up after 64 frames of a busy daemon (with-hide#294); one now only listens, the other
waits by time.

The remote hook's miss and the relay's non-binary frame (with-hide#173, with-hide#457) now say
which stage ran out and which message arrived. The remote mailbox lane can be
repeated by hand on a branch (repeat input).
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 9, 2026
Closes with-hide/hide-private#210
Closes with-hide/hide-private#503
Closes with-hide/hide-private#149
Closes with-hide/hide-private#294
Related: with-hide/hide-private#718 with-hide#719 (제품 쪽 후속), with-hide#173 (hook 시간 초과는 원인
미확정, 진단만 추가), with-hide#457 (relay, 진단만 추가), with-hide#339 with-hide#398 (WSL, 이슈에 원인과 남은 일을 적음)

## Summary

기기 연결 테스트가 가끔 실패하던 원인 넷을 고쳤습니다. 제품 코드는 바뀌지 않고 테스트 보조 코드와 CI 입구만 바뀝니다.

- with-hide#210: 테스트용 sshd가 고른 포트를 다른 테스트의 sshd가 먼저 잡아도 "준비됨"으로 통과해서, 데몬이 남의 서버에
붙고 `host_key_changed`로 끝났습니다. 이제 자기 sshd가 "listening"을 로그에 쓸 때까지 기다리고,
포트를 잃었으면 다른 포트로 다시 시작합니다.
- with-hide#503: 질문하는 프로그램이 holder가 pane 기록을 `running`으로 쓰기 전에 물어서 한 번 거절당했습니다.
테스트가 노드의 증명을 확인한 뒤에 풀어 주게 순서를 고정했습니다.
- with-hide#149: 거절 순서 문제는 `133b05fe9`가 이미 고쳤고, 남은 BrokenPipe는 상한 확인용 연결이 이미 닫힌
연결에 요청을 쓰던 테스트 경쟁이라 듣기만 하게 바꿨습니다.
- with-hide#294: 설정용 renderer가 프레임 64개에서 포기하던 것을 시간 상한으로 바꿨습니다. 이슈 본문의 첫 증상인
doorbell 시간 초과는 with-hide#173 댓글대로 10월 28일 뒤 재발이 없어, frame 상한을 고친 이 PR로 닫습니다.
- remote mailbox 레인을 브랜치에서 손으로 N번 반복할 수 있습니다: `gh workflow run
remote-mailbox.yml --ref <branch> -f repeat=10`.

## Review

- **판단해 주세요**: 반복 실행을 새 workflow가 아니라 `remote-mailbox.yml`의
`workflow_dispatch` + `repeat` 입력으로 둔 것. `test_vt_cache.py`가 vt-cache 사용
workflow 목록을 고정해서 새 파일은 정책 검사에 걸립니다.
- **조심해서 볼 파일**: `hided/tests/it/support/sshd.rs` - 준비 판정을 연결 성공에서 자기
로그의 "Server listening ... port N."으로 바꾼 곳(macOS sshd로 문구 확인).
재시작(`online(false)` 뒤 `online(true)`)은 로그가 이어 쓰이므로 spawn 뒤에 쓰인 부분만 읽고,
같은 포트를 잃으면 이유를 말하며 실패합니다. `system_ssh`에 이 경로를 확인하는 시험을 더했습니다.
- **조심해서 볼 파일**: `hided/tests/it/device_own_engine.rs` - asker가 파일이 생길
때까지 기다리는 셸 반복. 상태를 기다리는 것이고 시간을 기다리지 않습니다.
- **질문**: #173의 11월 7일 실패는 hook이 제품 예산(`INTAKE_BUDGET` 1.65초) 안에 답을 못 받은
것입니다. 부하 때문에 예산을 못 지키는 경우를 테스트가 어떻게 다룰지(병렬도를 줄일지) 정하지 못해 이번엔 진단만 넣었습니다.

- **후속 이슈**: #149의 남은 틈(노드가 연결을 닫은 뒤에 자리를 돌려주는 것)은 제품 쪽이라 #718에, #503의
제품 쪽 경쟁(holder 기록이 Running이 되기 전의 첫 `hide` 호출 거절)은 #719에 적었습니다. 테스트 쪽
원인은 이 PR이 고쳤습니다.
- 반복 실행은 `--retries 0`으로 돌아, 한 번의 실패가 job의 실패입니다.

## Evidence

- **확인한 것**: `cargo check`와 `clippy -D warnings`(hided, hide-relay 테스트)가
통과합니다. 포트 충돌 메시지(`Bind to port N on 127.0.0.1 failed: Address already in
use`)와 listening 문구는 이 Mac의 sshd에서 직접 확인했습니다.
- **확인한 것**: with-hide#210 원인은 실패한 CI 실행(42085737360)의 보관된 sshd 로그에 `Address
already in use`와 데몬의 `host_key_changed`가 함께 있는 것으로 확인했습니다.
- **확인하지 못한 것**: #503의 원인은 코드 읽기로 좁힌 것입니다(`hide-holder/src/holder.rs`의
spawn 뒤 `running` 기록 사이). 실패한 CI에는 asker 화면이 없었고, 이번 변경이 다음 실패 때 그 화면을
남깁니다.
- **확인한 것**: remote mailbox 레인(Linux)을 이 브랜치에서 `repeat=10`으로 돌려 10회 모두
통과했고(33개 x 10, 재시도 0번, `FLAKY` 줄 없음)
https://github.com/with-hide/hide/actions/runs/42386421651 에서 볼 수 있습니다.
- **확인한 것**: 재시작 경로를 고친 head 6817f7c09에서 `--retries 0`으로 다시 `repeat=10`을
돌려 10회 모두 통과했습니다(33개 x 10, `no flaky test`)
https://github.com/with-hide/hide/actions/runs/42429757957
- **확인하지 못한 것**: 고치기 전 실패율은 이슈별로 며칠에 한두 번이라 10회 통과가 재발 없음을 증명하지는 않습니다. 이
Mac에서는 레인을 돌리지 않았습니다.
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