Skip to content

Add the hided daemon, hide CLI, and the first web shell (S1) - #130

Merged
yansfil merged 29 commits into
mainfrom
prd/web-shell-pivot-s1
Sep 21, 2026
Merged

yansfil merged 29 commits into
mainfrom
prd/web-shell-pivot-s1

Conversation

@yansfil

@yansfil yansfil commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Related: follows #129 (S0) · PRD agents/prd/web-shell-pivot-s1/prd.md

Summary

  • First product web shell: hided daemon + hide CLI + React app (sidebar + one xterm.js pane), the core linked through a new pub Rust API beside the C ABI.
  • Loopback WS with token, Origin, schema 2 and a cap of eight clients; HTTP is /, /assets, /health only; a release hided embeds web/dist.
  • Swift coexistence is decided per socket: only an attach to the socket the Swift shell holds prompts (or refuses without a TTY); an isolated socket never does.
  • hided resolves the herdr binary (HERDR_BIN_PATH, then PATH) so pane terminals attach; the previous head passed none and could not show any terminal.
  • A reconnecting client resumes from its cursors: a delta when the core can serve them, a self-contained snapshot when it dropped chunks or the daemon restarted, and the pane re-requests its view after every snapshot.
  • Design tokens live in design/tokens.json; CSS and HideTheme stay in lockstep.

Isolated Herdr e2e: two fake claude rows in core order, Agent one focused, typed marker and 한글 echoed by the pane

Review

  • 판단해 주세요: B17 live UX-01 on the operator session after closing Swift (user-run; commands in the Evidence section).
  • 판단해 주세요: the e2e/measurement seam window.__hideProbe exists only with ?probe=1; it reads the WebGL-drawn buffer, which nothing else can.
  • 판단해 주세요: B12 was measured on the live driven pipeline (pane printing every 8 ms) rather than the spike's in-page replay, so no spike code entered the product.
  • 조심해서 볼 파일: hided/src/coexist.rs - reads another process's environment from the kernel; the Unknown case refuses without a TTY.
  • 조심해서 볼 파일: hided/build.rs + hided/src/server.rs - release embed fails the build without web/dist; exact-key lookup, no traversal path.
  • 조심해서 볼 파일: herdr-core/src/ffi.rs - owner thread and snapshot latch behind the new Rust API.
  • 조심해서 볼 파일: hided/src/server.rs classify_frame - the resume rule against snapshot_delta.rs (rest gated by revision, future cursor read as zero, chunks_dropped); a wrong branch here shows as a pane that stays blank after a reconnect.
  • 조심해서 볼 파일: web/src/terminal.tsx - viewport then resize, chunks off the store, writer registered before the view request, probe writer only when armed.
  • 질문: Is mapping socket_missing to 소켓 없음 and stale to 무응답 the right B6 split?

Evidence

  • 확인한 것: B8 echo on the product release hided (embedded web/dist, head f715105; the commits since touch no per-chunk write path, so the numbers stand for this head) on an isolated pinned herdr 0.9.1 cat pane, Chrome 153 via CDP: three trials x 50 markers, t0 = herdr pane send-text CLI return, t1 = xterm write completion with the marker in the parsed buffer; trial p95 1.186 / 1.061 / 0.847 ms, median 1.061 ms vs threshold 11.228 ms (S0 Swift 6.228 + 5, reused); 0 negative samples; load averages 24-26.
  • 확인한 것: B12 frames on the same setup: one 120.0 s window, pane printing a line every 8 ms, 14400 rAF frames, 0 over 16.7 ms (0.0%), max dt 9.5 ms, 6741 WS delta frames received during the window.
  • 확인한 것: B5 reproduced both ways with the Swift app running: isolated HERDR_SOCKET_PATH + hide serve --keep-alive without a TTY starts and writes its state file; default socket without a TTY refuses naming the Swift pid and socket. 10 coexist tests including a live child-environment read.
  • 확인한 것: CI verify green on 8d6e998 (rust workspace, swift shell, repository invariants, static-design, web shell with the e2e on the fetched pinned herdr); the web lane had never reached its tests before: the lockfile lacked @types/node, and the runner's bash login shell never printed the fixture prompt until the fixture named SHELL=/bin/zsh.
  • 확인한 것: Playwright Chromium, 3 tests: missing-socket row, refused-token copy, and sidebar click -> [data-terminal-pane] switches -> typed echo-two-… then echo-one-… 한글 echo in each pane on an isolated pinned herdr with two compiled fake claude agents.
  • 확인한 것: release hided from a cwd without web/dist serves / and /assets/*.js from the binary, /assets/../../hided.json and /anything are 404; 10 hided handshake tests (a resumed cursor gets a delta without rest, a cursor from the future gets a snapshot with rest, the daemon exits and removes its state file after its last client leaves), 3 server unit tests, 11 coexist tests, 14 vitest cases, sealed cargo test / swift test / cargo lint PASS on 8d6e998, design contract and repository gates locally.
  • 확인하지 못한 것: B17 real-session UX-01 (user). 10-minute idle-exit wall clock (the integration test runs it at 1 s). Korean IME composition on the product page under a real input method (S0 human PASS; Playwright types composed text). kitty CSI 13;2u branch of B9. hide dev Vite proxy end to end.
  • 생성물: web/src/tokens.css and web/src/generated/hided-ws.ts from generators.

Follow-up: hide dev should start Vite itself through the one spawn helper (today it only sets the allowlist and expects pnpm -C web dev); kitty keyboard negotiation for Shift+Enter (CSI 13;2u) waits for the core to expose the pane's kitty state; the probe module should leave the production bundle (import.meta.env.PROD); the web diagnostics list has no sink yet (capped at 200 with the overflow counted); a future-revision resync reads the core twice.

AI tooling: 대부분 AI 도구. Measurement numbers, the B5 reproduction, the release embed curl checks and the Playwright run were executed locally and read by hand against the report.

Verification record
  • PRD: agents/prd/web-shell-pivot-s1/prd.md (sha256 2a9e6eadb34c273f4fb6cb7e698e5c896d32dc056040a9ad5ba7805b67c905cb)
  • Base 66fd2dd → head 8d6e998, verified 2026-09-21T13:39:52.312Z: PASS
  • Verification report: agents/runs/web-shell-pivot-s1/verification-report.json and agents/runs/web-shell-pivot-s1/verification-report.md; source fingerprint a83b2fef38aad4c8ffae825f17f7079acafe6710240f125776b39bc268c0fdee
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-swift.sh test (exit 0)
    • S3: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews: Fidelity (head e1390ef, re-review after the 61f795e round): Fix now none; the three 61f795e findings were fixed in 90b2cef, b411ab0, 9b514b7 and e1390ef (first frame read from the client cursors with a resync on a gap, integration tests for a resumed cursor / a future cursor / the idle exit, the B5 decision as a pure coexist::decide). Follow-ups: the double read on a future-revision resync, a stubbed-stdin test for confirm_coexist. Code (head e1390ef): Fix now none; the three 61f795e findings (startHided inside the try, probe hook gated once per connection, prompt polling instead of a fixed sleep) fixed in b411ab0 and e1390ef. Follow-ups applied in 3df10ee (dead pending chunk queue removed, dist watch only in a release build); still open: diagnosticsDropped has no sink, the mount effect sends one extra viewport request, the token length short-circuit. Security (head 61f795e full, e1390ef delta): Fix now none; follow-ups: compare on a fixed-size buffer instead of a length gate, the resolved-binary log line joins the path-disclosure follow-up, probe out of the production bundle, embed guard against sourcemaps. Code+Fidelity delta (head 3df10ee): Fix now none, no follow-ups; the dropped-chunk claim was traced through terminal_frames_need_full for initial load, pane switch and reconnect. Code+Security delta (head 8d6e998): Fix now none, no follow-ups; the lockfile diff is the declared @types/node and its peer re-keying, onlyBuiltDependencies sits at the workspace root, and SHELL=/bin/zsh stays inside the private fixture env on the macos-15 runner.
  • Evidence: 11 registered (2 screenshot, 3 log, 6 file); paths are local to the run directory
    • agents/runs/web-shell-pivot-s1/screenshots/s1-sidebar-pane.png
    • agents/runs/web-shell-pivot-s1/measure/attempt2/identity.txt
    • agents/runs/web-shell-pivot-s1/measure/attempt2/run.log
    • agents/runs/web-shell-pivot-s1/measure/attempt2/echo-summary.json
    • agents/runs/web-shell-pivot-s1/measure/attempt2/frames-summary.json
    • agents/runs/web-shell-pivot-s1/measure/attempt2/echo-1.json
    • agents/runs/web-shell-pivot-s1/measure/attempt2/echo-2.json
    • agents/runs/web-shell-pivot-s1/measure/attempt2/echo-3.json
    • agents/runs/web-shell-pivot-s1/measure/attempt2/frames.json
    • agents/runs/web-shell-pivot-s1/screenshots/s1-click-flow.png
    • agents/runs/web-shell-pivot-s1/e2e/playwright-takeover.log
  • Changed paths: 78 (see Files changed)

hided links the core without FFI. create, dispatch, snapshot_delta,
and on_change stay on the owner thread and still clear the change
latch before taking the snapshot lock. schemars dumps the snapshot
delta document for TypeScript generation.
The daemon binds 127.0.0.1, gates WebSocket clients on token, Origin,
schema version, and a cap of eight, and serves /health plus static
files. HTTP never dispatches core events. hide owns the instance lock,
state file mode 0600, idle exit, and the single spawn helper.
Static JavaScript must be text/javascript or Chromium refuses the
module. The daemon also looks for web/dist from HIDED_UI_DIR so
Playwright can attach without inheriting the operator Herdr socket.
The generator writes web CSS variables and checks HideTheme.swift
against the same values so the Swift app and the web shell stay in
lockstep during coexistence.
The Vite app draws core agent rows, feeds xterm.js outside the store,
maps Swift modifier keys, and reconnects with a one-line badge.
Playwright drives hided on a missing Herdr socket.
Repository layout, architecture, build output, and contributing
commands now name hided and web. The verify workflow runs typecheck,
lint, vitest, and Playwright.
herdr_core_snapshot now forwards to Core::snapshot_delta, which still
drops the runtime guard before serialize_snapshot_delta. The source
test reads that method.
POST /health is not a core mutation path; the contract is that unknown
HTTP routes cannot dispatch. Probe /dispatch instead of /health.
A GET catch-all made POST look like 405. Serve only / and /assets
plus /health and /ws, and fall back to 404 so HTTP cannot dispatch.
WebSocket Origin is checked after upgrade with close 4002. Token,
schema, origin, and client-limit closes stop reconnecting and show
the refused line. Static files stay under the UI directory. Health
reports remaining idle time. The focused pane sends terminal_viewport
with new_view after a sidebar click.
…socket

Viewport still updates the frame guard. Resize is what attaches the PTY.
hide uses ~/.config/herdr/herdr.sock when HERDR_SOCKET_PATH is unset and
the file exists. Detached hided inherits null stdio. A lagged notify
resyncs instead of dropping the socket.
A closed WebSocket must not throw from key or resize handlers.
Sidebar maps socket_missing to 소켓 없음 and stale to 무응답.
hide dev binds 127.0.0.1:9876 so Vite can proxy. Pane switches
drop queued deltas and wait for a new_view frame.
…re the web token lane

The web job cached on web/pnpm-lock.yaml, which does not exist because the
lock lives at the workspace root. The design fixture copied every checker
but check-web-tokens.mjs, so the staged-hook test failed on a missing module.
confirm_coexist read any set HERDR_SOCKET_PATH as "Swift is attached" and
refused every isolated run without a TTY. The Swift shell's socket is now
read from its own environment (KERN_PROCARGS2, the same rule the shell
applies), and only an attach to that exact socket prompts or refuses.
The core spawns `herdr terminal session control` for every pane attach and
refuses without a binary; hided passed none, so no product pane could ever
show its terminal. HERDR_BIN_PATH, the variable Herdr sets in its panes,
wins; the first herdr on PATH follows; with neither the daemon logs it.
A release binary carries the web shell so hide runs from one file (PRD
D-03); its build fails without web/dist rather than shipping the UI-not-built
page. Debug builds keep the on-disk lookup so a pnpm build shows up without
a cargo rebuild.
xterm draws through WebGL, so neither Playwright nor a CDP driver can read
the screen from the DOM. With probe=1 in the URL the page exposes the parsed
buffer and resolves an armed marker at xterm write completion, the S0 echo
boundary; without it the writer path is unchanged.
The e2e starts the pinned herdr on a private socket with two panes running
a compiled stdin-to-stdout `claude`, attaches hided to it, clicks each row,
and reads the echoed text through the probe. The web CI job fetches the
pinned binary the way the invariants job already does.
scripts/web-shell-measure drives the product release hided on an isolated
pinned Herdr through Chrome's CDP: three 50-sample echo trials with t0 at
the send-text CLI return and t1 at xterm write completion (the S0 boundary),
then a 120 s driven window sampling every rAF dt. The probe gains arm,
waitArmed and an arrival counter for it.
confirm_coexist mixed the B5 rule with terminal I/O, so the rule could not
be tested without a TTY. coexist::decide maps a classified outcome and
whether stdin is a terminal to Proceed, Refuse or Ask, and the CLI only
prints the prompt and reads the answer.
startHided leaked its state directory and, when it failed in the click-flow
test, the Herdr fixture it was started after; both now stop through one
handle inside the try. The fixture and the measurement harness wait for the
fixed 'fixture %' prompt in each pane instead of sleeping one second before
agent start.
The first frame after a handshake read from (0, 0) regardless of the cursors
the client sent, so every reconnect replaced the whole client state with a
full snapshot. The daemon now reads from the client's have_revision and
have_terminal_sequence, sends a delta when the core could serve them, and
re-reads from zero as a self-contained snapshot when the core dropped chunks
or the client's revision is ahead of the core's. The web shell counts
snapshots and re-requests its terminal view after each one so a resync
redraws the pane; its diagnostics list is capped at 200 entries with the
overflow counted.

Integration tests cover a resumed cursor, a cursor from the future, and the
idle exit after the last client leaves. The token comparison is constant in
the token's length (subtle, already in the lock file).
… new dist

A key sent while the socket was not open vanished silently; it is now a
diagnostic entry. The probe arrival hook is decided once per connection
instead of per frame. The embed script also watches the dist directories,
so a file added by a web rebuild re-runs it, and hided logs the herdr
binary it resolved at startup.
feedChunks queued chunks for a pane without a writer and nothing ever
drained the queue; the writer is registered before the view is requested
and that request brings a full frame, so the queue was dead weight. The
embed script's directory watch now sits inside the release branch, so a
debug build no longer recompiles hided after every web build.
…t the workspace root

The web lane installs with --frozen-lockfile and the committed lockfile
predated the @types/node dev dependency, so CI never reached the tests.
pnpm 10 reads onlyBuiltDependencies from the workspace root and warned
that the member package.json entry had no effect.
Herdr starts a pane's shell from SHELL, and the CI runner's login shell is
bash, which never reads the fixture's .zshrc; the prompt the fixture waits
for never appeared and the click-flow e2e timed out. The e2e fixture and
the measurement environment now set SHELL=/bin/zsh alongside the private
HOME they already own.
@yansfil
yansfil merged commit 3eaf2f1 into main Sep 21, 2026
6 checks passed
@yansfil
yansfil deleted the prd/web-shell-pivot-s1 branch September 21, 2026 14:12
yansfil added a commit that referenced this pull request Sep 22, 2026
… the web shell (#132)

Related: PRD `agents/prd/web-shell-pivot-s2/prd.md` · follows #130 (S1)

## Summary

S1의 웹 셸은 pane 하나만 그렸다. S2는 브라우저 페이지에서 탭·분할·줌, 프로젝트/체크아웃 전환, 단축키, 워크스페이스
등록, pane 스크롤까지 Swift 셸과 같은 동작을 낸다.
스냅샷의 `pane_layouts`를 그대로 그리고, attach 상태인 탭의 pane은 보이지 않아도 xterm 인스턴스를 살려
두어 탭을 돌아오면 마지막 화면이 즉시 보인다(첫 실사용에서 잡힌 "탭 전환마다 새로 렌더링"의 수정, PRD 개정 1).
분할선 드래그·탭 드래그·닫기 확인·최근 순환 오버레이·휠 스크롤이 코어 이벤트 하나씩으로 나가고, 줌된 pane은 캔버스 전체를
차지한다(실사용에서 잡힌 "특정 영역만 확대"의 수정).
pane 안의 단일 클릭은 Swift와 같은 규칙으로 `terminal_click` 하나가 되어 코어가 프로그램에 마우스 보고를
넣고(실사용에서 잡힌 "Claude Code 창에서 클릭이 안 됨"의 수정, PRD 개정 2), 드래그 선택의 복사는 xterm
대신 셸이 조립해 행 끝 패딩을 잘라내고 소프트랩 행을 다시 이으며, 줄들이 공유하는 앞 여백은 상대 들여쓰기를 남기고
걷어낸다("복사하면 trimming", "앞에서 trim까지"의 수정, PRD 개정 3). 클릭 셀은 호스트 요소가 아니라
xterm의 `.xterm-screen` 격자에서 읽는다(실사용 2차 보고 "여전히 클릭이 안 됨": 호스트 사각형은 아래
가장자리에서 한 행 어긋나 Claude Code의 "Jump to bottom (click)" 행을 비껴갔다). 시트·찾기·순환을
닫는 Escape는 더 이상 pane에 ESC 바이트로 가지 않는다.
단축키는 명령 -> {browser, electron} 한 표(`web/src/shortcuts.ts`)에서 나오고,
Chrome이 잡는 ⌘T/⌘W/⌘⇧T/⌃Tab/⌘⇧N은 ⌥ 계열로 옮겨 ⌘/ 시트에 "moved for Chrome"으로
표시된다.
워크스페이스 등록은 hided가 `$HOME` 경계 하나로 막는다: 로컬 디렉터리 목록(`remote_file_list`,
`target_id: local`)과 `create_workspace` 경로는 홈 밖이면 `path_refused` 사유 코드로
거절되고 코어에 닿지 않는다.

![두 번 분할한 탭: 활성 탭의 pane 세 개가 각각 xterm 인스턴스를 갖고, 헤더가 포커스 pane을
표시한다](https://github.com/yansfil/pr-assets/blob/main/hide/web-shell-pivot-s2/abe5a24/two-splits.png?raw=true)

![⌘/ 시트: 한 표에서 생성되고 Chrome 예약 키에서 옮긴 명령은 이전 조합을 함께
보여준다](https://github.com/yansfil/pr-assets/blob/main/hide/web-shell-pivot-s2/abe5a24/shortcut-sheet.png?raw=true)

![홈 밖 경로 등록 시도: 이벤트가 나가기 전에 셸이 한 줄로
거절한다](https://github.com/yansfil/pr-assets/blob/main/hide/web-shell-pivot-s2/abe5a24/registration-refused.png?raw=true)

![⌘⌥↩ 줌: 줌된 pane이 캔버스 전체를 차지하고 Herdr가 넓힌 PTY와 같은 폭으로 그려진다(수정
후)](https://github.com/yansfil/pr-assets/blob/main/hide/web-shell-pivot-s2/c31b377/zoomed-full-canvas.png?raw=true)

## Review

- **판단해 주세요**: 경계는 파일시스템에 홈 안의 경로만 묻는다. 홈 밖 경로와 홈 밖을 가리키는 심볼릭 링크는 존재 여부와
무관하게 `outside_home` 하나로 답하고, 홈 안을 가리키는 외부 링크도 거절된다. 이 엄격함을 받아들일지.
- **판단해 주세요**: attach 상태 pane 9개의 인스턴스를 숨긴 채 계속 먹이는 비용(렌더러 RSS 167~226
MB, hided 19 MB, 120 s 구동 후에도 증가 없음)을 받아들일지. D-05의 재검토 조건은 이 숫자가 B15
게이트를 넘을 때다.
- **판단해 주세요**: Chrome 예약 단축키를 ⌥T/⌥W/⌥⇧T/⌥`/⌥⇧N로 옮긴 배치와 시트의 "moved for
Chrome (⌘T)" 문구.
- **판단해 주세요**: 복사의 소프트랩 판정은 "마지막 셀이 비어 있지 않은 행은 다음 행으로 이어진다"는 전폭 행
휴리스틱이다. Herdr의 `terminal.frame`
레코드(seq·encoding·width·height·full·bytes)에는 이어짐 플래그가 없어 폭을 정확히 채운 하드 라인도
합쳐진다. 이 정도를 받아들일지, Herdr에 플래그를 요청할지.
- **판단해 주세요**: 복사의 dedent는 드래그 시작 열이 0보다 크면 잘린 첫 줄을 여백 계산에서 빼고 나머지 줄로
여백을 정한다(단독 줄이면 그 줄의 앞 공백 전부). 이 규칙을 받아들일지.
- **판단해 주세요**: 코어의 포커스 규칙 - Herdr가 이전 요청의 확인을 다음 요청 뒤에 보내면 코어가 그 확인을 따라
포커스를 잠깐 이전 pane으로 되돌린다(CI 러너에서 ~200 ms). 이 PR은 e2e가 `herdr pane
current`를 기다리도록만 했고 코어(herdr-core)는 범위 밖이라 그대로다. 후속으로 다룰지.
- **판단해 주세요**: 로컬 목록이 코어의 `remote_file_list`를 빌려 쓰는 결정(hided가
`target_id: local`만 가로채 `directory_list`로 답하고, 다른 target은 손대지 않고 전달).
- **조심해서 볼 파일**: `web/src/terminals.ts` - 고빈도 경로이자 ownership. 숨긴 탭의 청크도
파싱하고, 인스턴스 해제는 코어의 released·소멸에만 따른다(`retainTerminals`). 휠·클릭·복사는 각각 주인이
하나다: capture 리스너가 xterm보다 먼저 이벤트를 받아 애니메이션 프레임당 `terminal_scroll` 하나,
드래그하지 않은 누름-놓음당 `terminal_click` 하나를 내고, 복사 텍스트는 xterm의 것을 막고
`selection.ts`가 만든다. Herdr 프레임은 마우스 모드를 싣지 않으므로 xterm 자체 마우스 보고는 켜질 수
없다(격리 서버에서 프레임 바이트로 확인). 키보드 포커스 보고자도 하나다: 스냅샷을 따라 `term.focus()`를 부르는
동안(`followingSnapshot`) textarea focus 리스너는 `focus_pane`을 내지 않는다(CI에서 잡힌
셸↔코어 포커스 핑퐁의 수정).
- **조심해서 볼 파일**: `hided/src/boundary.rs` - 경계 그 자체. 홈부터 컴포넌트 하나씩 내려가며
심볼릭 링크 대상을 쓰인 그대로 홈과 비교한 뒤에야 따라간다. 리뷰 4라운드에서 세 번 조여졌다.
- **조심해서 볼 파일**: `hided/src/server.rs` `apply_boundary` - dispatch 경로의
유일한 필터. 여기서 빠지는 kind는 코어로 그대로 간다.
- **조심해서 볼 파일**: `web/src/PaneGrid.tsx` - 줌이면 줌된 pane 노드만 루트로 그린다; 분할선
놓을 때 `resize_pane` 한 번; 기하는 Herdr가 확정한 뒤 스냅샷으로 돌아온다.
- **조심해서 볼 파일**: `web/src/store.ts` - 델타마다 `rest` 구조 공유 walk가 붙는 고빈도 경로.
- **조심해서 볼 파일**: `.github/workflows/pr.yml` - e2e 실패 시 격리 fixture의
로그(hided, Herdr 서버, 각 에이전트 pane의 PTY 입력)와 Playwright 결과를 artifact로 올린다.
모두 fixture 전용 HOME 아래 것이고 저장소에는 들어가지 않는다.
- **조심해서 볼 파일**: `contracts/hided-ws.schema.json` - 서버 프레임에
`directory_list`, `path_refused`, `error` 셋이 늘었다(wire 계약).
- **질문**: 등록 필드의 최근 경로 5개를 localStorage에 두는 것으로 충분한지, 아니면 코어
`workspace_registrations`만으로 갈지.

## Evidence

- **확인한 것**: B15 응답성(인스턴스 9개 유지, head 9ad830a; 이후 커밋은 인스턴스 해제 경로만 건드림) -
4분할 + 5탭 시나리오에서 echo p95 0.635/0.716/0.93 ms(중앙값 0.716 ms, 게이트 11.228
ms), 120 s 구동 창 14401 프레임 중 16.7 ms 초과 0, 최대 14.6 ms. 격리 herdr 0.9.1,
릴리스 hided, 한 번 측정. 메모리는 정착 후와 구동 후 두 번: 렌더러 167~226 MB, hided 18~19 MB,
JS 힙 13→12 MB, 살아 있는 인스턴스 9개 그대로.
- **확인한 것**: e2e 5건(격리 herdr, headless Chromium) - 체크아웃 2개·탭 3개·분할
2개·줌(줌된 pane의 박스 = 캔버스 박스; 이 단언은 이전 렌더러에서 실패해 사용자 보고를 재현했다)·`seq 1 100`
뒤 휠 올림 → `terminal_scroll {up, lines>1}` 1건과 viewport 이동, 휠 내림 → 복귀, ⌥+휠
무시, 셸과 `less`(대체 화면) 모두에서 휠로 `key` 이벤트 0건(xterm의 커서키 변환 차단; 실사용 2차 보고의
수정)·분할선 드래그·탭 드래그·닫기·⌘/ 시트 25행·⌘F·재접속·탭을 떠났다 돌아올 때 클릭과 같은 tick에 마지막 화면
존재(`new_view: false`)·보이는 pane을 닫으면 인스턴스와 주차 요소가 사라짐·에이전트 pane의 (4,2) 셀
클릭 → `focus_pane` 뒤 `terminal_click {column 4, row 2, modifiers 0}` 1건,
그 pane의 PTY가 받은 바이트는 정확히 `ESC[<0;5;3M ESC[<0;5;3m`뿐(raw 모드 shim이 stdin을
파일로 기록)이고 `key` 이벤트 0건·드래그 선택은 클릭 0건이고 `paneSelection`과
`navigator.clipboard`가 모두 `'w'×(cols+7) + '\nshort\n'`(랩 행 합침, 패딩 제거, 빈
행 유지)·` in`/` deeper` 두 줄 드래그의 클립보드가 `in\n deeper`(공유 여백 제거, 상대 들여쓰기
유지)·클릭 셀 계산의 호스트 대 화면 격자 차이를 매 실행 출력(로컬: 호스트 494×659 대 화면 488×656, 61×41
격자에서 마지막 행의 중심을 호스트로 읽으면 40행)·⌘/ 시트를 Escape로 닫을 때 `key` 0건·사이드바 숨긴 채
⌥⇧N, 등록 1건 성공, 홈 밖·`..`·중복 거절. s2.spec은 Escape 수정 뒤 로컬 18회 연속 통과. CI의
web 레인은 67fae10·20f8516에서 붉었다: artifact로 올린 wire trace(20f8516)가 셸이 스냅샷의
포커스 pane을 다시 `focus_pane`으로 보고하는 핑퐁을 보여 주어 보고자를 하나로 줄였고(6daad15), 그 뒤 남은
한 번의 실패는 Herdr가 이전 요청의 확인을 늦게 보내 포커스가 잠깐 되돌아가는 것이어서 e2e가 5회 연속 같은 pane을
볼 때까지 기다린다(bdb3ace). d65a584에서 CI 6개 체크 통과와 web job 재실행 3회 모두 성공.
- **확인한 것**: 실제 Claude Code 2.1.278로 격리 pane에서 - PTY 원시 캡처로 요청 모드는
`?1000h ?1002h ?1003h ?1006h`(SGR)이고, `herdr terminal session control`로
넣은 ESC 바이트는 걸러지지 않으며 press+release를 한 번의 write로 보내도 받는다: 휠을 올려 21행에
"Jump to bottom (click) ↓"가 뜬 상태에서 `terminal.input` 한 번(`ESC[<0;37;22M
ESC[<0;37;22m`)으로 사라졌다(두 번 재현,
`agents/runs/web-shell-pivot-s2/click-probe/transcript.txt`). 즉 전달 경로는
맞고 남은 원인은 셀 계산의 한 행 어긋남이었다.
- **확인한 것**: 경계 공격 - 홈 밖 심볼릭 링크(직접·중첩·끊긴 링크·상대 `..` 링크·41단 체인·루프), `..`,
`%2e%2e`, 파일 경로, 숨김 디렉터리, 홈 자체, 접두사 형제, 상대·빈·NUL 경로, 8000바이트 경로, 비문자열
JSON 필드, 대소문자 표기, `HOME`이 심볼릭 링크인 경우를 단위 테스트와 실제 WS 클라이언트로 쳤고 모두 거절 또는
무해. 홈 밖 경로의 존재 여부는 어떤 사유 코드로도 새지 않는다.
- **확인한 것**: 원격 target의 `remote_file_list`는 경계를 거치지 않고 코어에 닿는다(핸드셰이크
테스트가 코어의 `remote.files.unknown_target` 진단으로 확인).
- **확인한 것**: `cargo test` 워크스페이스·`verify-swift test`·clippy, web
typecheck/lint/vitest 63건, `check-design-contract`, 구조 검사 스크립트 전부 통과.
- **확인하지 못한 것**: B18 하루 실사용 - 사용자의 실사용이 다섯 가지(탭 전환 지연, 줌 클리핑, 휠이 입력 이력을
넘김, 클릭 무반응, 복사 패딩)를 잡았고 이 PR이 고쳤지만, 고친 빌드(화면 격자 셀 계산)의 실사용 클릭 관찰은 아직 사용자
몫이다; 격리 pane의 실제 Claude Code에서는 바이트가 닿았다. 코어의 클릭 라우팅(감지된 Claude 에이전트에만
SGR)은 바꾸지 않았다. 실제 원격 기기의 목록 왕복도 미검증(코어 진단까지만 확인).
- **확인하지 못한 것**: 경계 검사와 코어의 `git init` 사이 TOCTOU(디렉터리를 심볼릭 링크로 바꿔치기)는
208k 요청의 실시간 경합에서 재현되지 않았고 fd 고정(openat) 걷기는 후속으로 남겼다.
- **확인하지 못한 것**: Electron 열은 비어 있고(등록만), 한국어 IME 조합 중 단축키 무시는
`isComposing` 분기와 단위 테스트로만 확인했다. 측정은 한 기계 한 번이며 다른 pane은 유휴 상태였다.

**AI tooling**: 대부분 AI 도구. PRD 결정 9개와 동작 20개를 코드·문서와 대조했고,
Fidelity/Code/Security 리뷰(경계 4라운드 + B18 수정 5라운드)의 Fix now를 모두 반영한 뒤
verify를 다시 돌렸다.

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

- PRD: `agents/prd/web-shell-pivot-s2/prd.md` (sha256
7ecf1ff0bbfa423089092ca8b919c814a70613ee8213512154dcabd14cba194a)
- Base 2b6f452 → head 84cee6b, verified 2026-09-22T04:19:06.833Z: PASS
- Verification report:
`agents/runs/web-shell-pivot-s2/verification-report.json` and
`agents/runs/web-shell-pivot-s2/verification-report.md`; source
fingerprint
541118bffe2754dd9e297bc3924c2724c84e51a2ab58a2a87e32cb5cb60ff4bc
- Amendment 1 (human, 2026-09-22, recorded through `sasu implement
amend`): D-05 instances stay alive for attached tabs, B5 reworded, B19
added (pane scrolling, zoom geometry); the earlier snapshot is archived
as `amendments/prd-1-superseded.md`.
- Amendment 2 (human, 2026-09-22, recorded through `sasu implement
amend`): B20 added (pane click routing, selection copy, consumed
Escape); the earlier snapshot is archived as
`amendments/prd-2-superseded.md`.
- Amendment 3 (human, 2026-09-22, recorded through `sasu implement
amend`): B20 refined (dedented copy keeping relative indentation, click
cell read from the xterm screen grid); the earlier snapshot is archived
as `amendments/prd-3-superseded.md`.
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-swift.sh test` (exit 0)
  - S3: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews (advisory, fifteen heads, all native subagents):
- Fidelity: 38eab30 Fix now none (follow-ups: non-local listing
boundary, drag guide on reconnect, cycle overlay cap, ⌘⌫ wording);
be4296f none; 0f4453a none; abe5a24 none, disposition: all 18 behaviors
met, B18 left to the user by the PRD's own text.
- Code: 38eab30 Fix now (1) non-local `remote_file_list` forced through
the local boundary, fixed fc6ae6e; (2) registration field re-requested a
listing on a stale answer, fixed be4296f. be4296f none (follow-ups:
spawn_blocking for boundary I/O, overlay flag on a dropped dispatch, no
test for the hidden-sidebar path, added 0f4453a). 0f4453a none
(follow-up: depth cap before the walk). abe5a24 none (follow-ups: final
canonicalize error mapping, queue growth note, normalize comment).
- Security: 38eab30 Fix now (1) same scoping bug, fixed fc6ae6e; (2)
canonicalize before containment leaked existence of any path on disk,
fixed fc6ae6e (lexical test first). be4296f Fix now: existence leaked
past an escaping symlink when the tail stops resolving, fixed 0f4453a.
0f4453a Fix now: a dangling symlink under home to an outside target
leaked existence (ancestor walk only saw the parent), fixed abe5a24
(component walk from home, target tested as written). abe5a24 none; 208k
live requests racing a dir/symlink swap produced no leak; follow-ups:
fd-anchored walk (openat) for the TOCTOU class, case-insensitive
spelling over-refuses, log volume.
- 8d97a42 (fixture home `/Users/me` -> `/home/me` after CI's
workstation-identity check): Code Fix now none; Fidelity and Security
surfaces unchanged by a test constant, their abe5a24 dispositions stand.
- 9ad830a (B18 fixes, amendment 1): Fidelity none (follow-ups: memory
gate is informational, sign-convention comment); Security none
(follow-ups: clamp lines to u16, int-cast the port; both done in
c31b377); Code Fix now: a pane closed while shown was parked forever
because retainTerminals ran before the view unmounted, fixed c31b377
(the park checks the attached list itself, one disposal path, e2e
asserts the instance is gone).
- c31b377: Code none (follow-ups: pass the observed rest through instead
of re-reading the store; a reconnect snapshot that omits a pane disposes
its instance and rebuilds it on reattach). Fidelity and Security
surfaces unchanged by that delta.
- fbd83d7 (B18 round 2: a wheel in a full-screen program also walked its
input history because xterm turned the wheel into cursor-key bytes; the
capture listener now stops the event before xterm): Code none, Fidelity
none; Security surface unchanged (fewer bytes reach the PTY).
- c46a91f (B18 round 3, amendment 2: a click in a pane now goes out as
one terminal_click after focus_pane, mirroring the Swift pointer
routing; a drag selection copies trimmed and unwrapped text assembled
from the buffer cells; an Escape the shell answers stops at the window
capture listener; hided logs ws.snapshot_failed): Fidelity none
(follow-ups: rowContinues reads only the last cell, snapshot-failure log
unthrottled, modifiers read at release); Code none (follow-ups: no unit
test for log_snapshot_failure, press state cleared only by the next
mousedown when released outside the pane); Security none (follow-ups:
the core does not clamp column/row to the pane grid, a comment pinning
that ws.snapshot_failed never carries pane content, a parked pane's
stale selection is unreachable while hidden).
- 67fae10 (e2e only: the click and the refocus wait for `herdr pane
current` before typing, after CI's slower runner saw Herdr's late focus
confirmation flip keyboard focus mid-command): Code none (follow-ups:
the same wait at the first focus after ⌘D, a comment on the exempt
sites, move the helper into the fixture); Fidelity and Security surfaces
unchanged by a test wait.
- 20f8516 (CI only: the web job keeps the daemon, Herdr server and PTY
input logs and uploads them on failure, and HIDE_E2E_TRACE narrates the
wire, after a second runner failure at the same step showed only screen
text): Code none (follow-ups: the trace's focused_pane_id match reads
the first tab layout in a frame, artifact retention is the repo
default); Fidelity and Security surfaces unchanged.
- 6daad15 (the shell reported keyboard focus back to the core when it
only followed a snapshot, which the CI wire trace showed as a focus
ping-pong between the two panes; the textarea focus listener now stays
quiet while `focusTerminal` runs): Code none (follow-ups: the store
guard compares against `terminal.pane_id` rather than the layout focus;
a module flag would need rework if focusTerminal ever became async);
Fidelity and Security surfaces unchanged.
- d65a584 (B18 round 4: the click cell is read from xterm's
`.xterm-screen` rect instead of the host element, which drifted a row at
the bottom edge; the shell reports keyboard focus once, not again when
it follows a snapshot; the copy is dedented; e2e waits for a settled
focus; amendment 3): Fidelity none (follow-ups: the click-probe
transcript lives only in the run directory, the host-vs-screen delta is
printed not asserted); Code Fix now: dedent no-oped when the drag
started past column 0 because the cut first line contributed an empty
margin, fixed c9f4b9a (the cut line stays out of the margin unless
alone, three vitest cases); Code follow-ups: cache the screen element at
open, the null guard is unreachable; Security none (follow-ups: the
workflow comment promised Playwright traces the config does not write,
corrected c9f4b9a; a comment on why the auth frame never reaches the
wire trace; assert HIDE_E2E_SCREENSHOT_DIR is absolute).
- c9f4b9a: Code Fix now: the workflow comment now claimed screenshots
under test-results that the Playwright config never writes, corrected
84cee6b; follow-up: a vitest case for a cut first row that continues,
added 84cee6b.
- 84cee6b: Code Fix now none, no follow-ups (the artifact comment
matches Playwright 1.63 defaults; the joined-cut case hand-traced to its
expectation).
- Evidence: 29 registered (10 file, 9 screenshot, 10 log); paths are
local to the run directory
  - agents/runs/web-shell-pivot-s2/measure/1/echo-summary.json
  - agents/runs/web-shell-pivot-s2/measure/1/frames-summary.json
  - agents/runs/web-shell-pivot-s2/measure/1/page.json
  - agents/runs/web-shell-pivot-s2/measure/1/identity.txt
  - agents/runs/web-shell-pivot-s2/e2e/s2-projects-two-checkouts.png
  - agents/runs/web-shell-pivot-s2/e2e/s2-two-splits.png
  - agents/runs/web-shell-pivot-s2/e2e/s2-zoomed.png
  - agents/runs/web-shell-pivot-s2/e2e/s2-shortcut-sheet.png
-
agents/runs/web-shell-pivot-s2/e2e/s2-registration-refused-outside-home.png
  - agents/runs/web-shell-pivot-s2/e2e/s2-registration-alpha.png
  - agents/runs/web-shell-pivot-s2/e2e/s2-after-reconnect.png
  - agents/runs/web-shell-pivot-s2/transcripts/web-unit.txt
  - agents/runs/web-shell-pivot-s2/transcripts/web-e2e.txt
  - agents/runs/web-shell-pivot-s2/e2e-2/web-e2e.txt
  - agents/runs/web-shell-pivot-s2/e2e-2/web-unit.txt
  - agents/runs/web-shell-pivot-s2/e2e-3/web-e2e.txt
  - agents/runs/web-shell-pivot-s2/e2e-3/web-unit.txt
  - agents/runs/web-shell-pivot-s2/measure/2/echo-summary.json
  - agents/runs/web-shell-pivot-s2/measure/2/frames-summary.json
  - agents/runs/web-shell-pivot-s2/measure/2/memory-settled.json
  - agents/runs/web-shell-pivot-s2/measure/2/memory-after-frames.json
  - agents/runs/web-shell-pivot-s2/measure/2/page.json
  - agents/runs/web-shell-pivot-s2/measure/2/identity.txt
  - agents/runs/web-shell-pivot-s2/e2e-4/web-e2e.txt
  - agents/runs/web-shell-pivot-s2/e2e-4/web-unit.txt
  - agents/runs/web-shell-pivot-s2/e2e-4/s2-zoomed.png
  - agents/runs/web-shell-pivot-s2/e2e-4/s2-two-splits.png
  - agents/runs/web-shell-pivot-s2/e2e-5/playwright-transcript.txt
  - agents/runs/web-shell-pivot-s2/click-probe/transcript.txt
- Changed paths: 57 (see Files changed)

</details>
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 9, 2026
…ide#2221)

Closes with-hide/hide-private#291

Refs with-hide/hide-private#130 (남은 증상이 있어 열어 둠), Refs
with-hide/hide-private#537 (제품 경합은 with-hide/hide-private#722), #515는 코어
라벨 적용 문제로 따로 남김 (with-hide/hide-private#515)

## Summary

데스크톱 e2e 여섯 개가 실패하면 `AggregateError: ... fixture or teardown failed` 한
줄만 남아서, 이슈 네 개가 몇 주 동안 원인을 적지 못했습니다.
실제 원인은 job 로그 안쪽에 있었고 서로 달랐습니다.

- 실패 보고: 첫 실패를 테스트의 실패로 그대로 올리고, 정리 단계가 실패하면 단계 이름(`close the app`,
`stop the stack`)과 함께 그 아래에 붙입니다. 이슈에 원인이 바로 적힙니다.
- with-hide#291: 앱이 처음 `fetch`를 쓸 때 로드가 던지면 처리되지 않은 거절이 되어 테스트가 실패했습니다. 이제 로그 한
줄로만 남습니다.
- with-hide#130: 기록된 run 9개 중 `agent_pane_required` 3개를 고쳤습니다. 부모 에이전트가 자식을 띄우기
전에 코어가 부모를 호출자로 알아볼 때까지 기다립니다. 나머지 6개(macOS 4, Windows 1 포함)는 다른 증상이라
이슈를 열어 둡니다.
- with-hide#537: 테스트가 분할이 확정된 뒤에 닫기를 보내게 했습니다. 분할 직후 닫으면 대기열을 건너뛰는 제품 쪽 경합은 그대로이고
with-hide/hide-private#722로 따로 남겼습니다.
- with-hide#515: 고치지 못했습니다. 이제 실패하면 부모와 자식 행을 덤프해 원인을 보여 줍니다. 자식 행에 문구가 있는데 부모의
요청에만 실리지 않는 것을 확인했습니다.

## Review

- **판단해 주세요**: #515는 이 PR에서 닫지 않습니다. 10회 반복에서 `session-workflow`가 4번
실패했고, 실패마다 자식 행의 문구(`record_summary`)는 있는데 부모의 raised ask `what`이 null이며
30초가 지나도 바뀌지 않습니다(지연이 아니라 고정된 상태). 코어의 라벨
적용(`hide-core/src/labels/overlay.rs`, `label.proves`)을 의심하지만 확정하지 못했습니다.
제품 수정은 별도 PR로 가야 합니다.
- **알아 두세요**: #537의 제품 경합(`hide-core/src/runtime/operations.rs`의
`queue_pane_close`는 `several`을 엔진이 확정한 레이아웃으로 정해, 분할이 확정되기 전에 원래 pane을
닫으면 대기열을 건너뜀)은 이 PR에서 바꾸지 않았고 with-hide/hide-private#722에서 다룹니다.
- **조심해서 볼 파일**: `desktop/src/main/host.ts` - 호스트의 failure path입니다. 요청을
`inBackground`로 보내도 로그 이름과 필드는 그대로입니다.
- **조심해서 볼 파일**: `web/e2e/daemon-actions.ts` - `splitPane`은 web e2e 세
스펙과 데스크톱 세 스펙이 함께 씁니다. 탭의 지오메트리 작업이 비는 것을 기다립니다.
- **조심해서 볼 파일**: `web/e2e/engine-fixture.ts` - 가족 픽스처가 `hide agent show
here`를 폴링합니다. 읽기 전용 호출이고 스폰은 한 번만 보냅니다.

## Evidence

- **확인한 것**: 네 이슈의 CI 로그와 아티팩트를 읽어 안쪽 첫 실패를 찾았습니다. with-hide#515 네 run 모두 같은
`Stopped at a permission request`, with-hide#291 `markResourceTiming`, with-hide#537 분할 확정
전에 나간 닫기입니다. #130은 기록된 run 9개 중 3개가 `agent_pane_required`(Windows 2,
macOS 1)이고, macOS 4개는 `session-work-ledger.spec.ts:44` `hover()` 다음 클릭이
"element is not visible"로 시간 초과, Windows 1개는 `launchShell` relaunch 시간
초과입니다. 뒤의 두 증상은 이 PR이 고치지 않았습니다.
- **확인한 것**: 데스크톱 타입체크, 린트, 단위 테스트(30개 파일, 315개 통과)와 웹 타입체크, 린트가 통과했습니다.
새 단위 테스트는 `finishNative` 5개, `inBackground` 3개입니다.
- **확인한 것**: CI 전체가 통과했습니다(desktop e2e macos 1/2, 2/2 포함).
- **확인한 것**: 임시 ref에서 macOS 반복 실행(`--repeat-each 10 --retries 0`, 스펙
7개)을 돌렸습니다. 6개 스펙(agent-handoff, agent-spawn, session-work-ledger,
usage, usage-history, restoration)은 10번 모두 통과했습니다. `session-workflow`는
6/10이고 실패 4번은 모두 #515의 증상입니다.
- **확인하지 못한 것**: #515의 원인. 이 Mac mini에는 빌드가 없고 부하가 커서 e2e를 로컬에서 돌리지
못했습니다.
- **확인하지 못한 것**: #537의 로그는 Herdr 엔진 시절 것이고 Herdr 제거(2026-11-05) 뒤 재발은
없습니다. 같은 경합이 코어 코드에 남아 있어 픽스처만 고쳤고, 현재 엔진에서 재현하지는 못했습니다.

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

- base: main `a558c20dd`, head: 이 PR의 head
- `bash scripts/verify-web.sh desktop typecheck|lint|test`, `web
typecheck|lint` 통과
- `python3 scripts/merge-order.py --branch fix/flaky-desktop-fixture`:
겹치는 열린 PR 없음, Stay as you are

</details>
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
…#2364)

Closes with-hide/hide-private#807
Closes with-hide/hide-private#515
Closes with-hide/hide-private#537
Refs with-hide/hide-private#130

## Summary

데스크톱 "태스크 목록" 테스트(`session-workflow`)가 main에서 거의 매번 두 번 다 실패했습니다.
자식 에이전트가 권한 요청 화면에서 멈추는 순간, 라벨 워커가 "멈춘 에이전트가 다시 멈췄으니 그 사이 한 턴이 돌았다"고 보고
방금 읽은 라벨 줄을 지웁니다(문서화된 동작).
분석 결과가 그 변화보다 먼저 들어오면 줄이 사라지고, 같은 턴은 다시 분석하지 않으므로 부모의 ask에 글이 영원히 비어 30초
뒤 시간 초과였습니다.
제품은 맞고 테스트가 현실과 달랐습니다. 이제 자식의 권한 요청은 자기 턴으로 transcript에 이어 쓰고, 첫 라벨이 반영된
뒤에 멈춥니다.
`closePane`도 `splitPane`처럼 탭의 지오메트리 대기열이 빌 때까지 기다립니다(#537의 닫기 대기와 같은 종류의
순서 문제).

스크린샷 없음: 화면 코드(`web/src`)는 바꾸지 않았고 e2e 픽스처와 문서만 바뀝니다.

## Review

- **판단해 주세요**: #130은 별도 PR이 맡습니다. 이 PR은 그 테스트를 고치지 않습니다.
- **판단해 주세요**: 라벨 워커의 "다시 멈춤 = 턴이 돌았다" 규칙은 그대로 둡니다. 실제 에이전트에서는 새 턴이
transcript에 생기므로 맞는 동작입니다.
- **조심해서 볼 파일**: `web/e2e/daemon-actions.ts` - 모든 `closePane` 호출이 이제
지오메트리 정리를 기다립니다. 공용 헬퍼라 다른 스펙의 시간이 조금 늘 수 있습니다.
- **조심해서 볼 파일**: `web/e2e/session-work-fixture.ts` - `askPermission`이 첫
라벨 반영(행의 이름이 목표로 바뀜)을 보고서 다음 턴을 씁니다. 지연이나 재시도는 없습니다.

## Evidence

- **확인한 것**: 실패한 main run 42753201887의 자식 행에서 `request.line`과 `end`만 비고
`recent_turns`에는 줄이 남아 있는 것을 확인했습니다(라벨이 분석된 뒤 지워진 상태).
- **확인한 것**: 최근 main push run 5개 중 4개에서 `session-workflow`만 두 번 다 실패했고,
`session-work-ledger`와 `restoration`은 모두 통과했습니다.
- **확인한 것**: macOS desktop e2e에서 세 테스트를 `--repeat-each 10 --retries 0`으로
CI에서 반복했습니다. 30개 모두 통과했습니다(테스트당 10회, 재시도 없음):
https://github.com/with-hide/hide/actions/runs/42782291670/job/129715320336
- **확인하지 못한 것**: with-hide#130(`session-work-ledger`)은 이 PR이 닫지 않습니다. 이 PR의 반복
실행에서 통과했을 뿐 원인은 확정하지 못했고, 별도 PR이 맡습니다.
- **확인하지 못한 것**: 로컬에서는 돌리지 않았습니다(기계 부하가 높고 데스크톱 e2e는 반복을 CI에 맡기는 규칙).

<details><summary>추가 증거</summary>

- 반복용 임시 커밋(`eea4802da`)은 같은 PR의 다음 커밋이 되돌렸습니다. 영구 장치는 추가하지 않았습니다.

</details>

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

- base `9f4a08525`, head `fa9c6b3a1` (the head reverts the temporary
repeat commit `eea4802da`; the code is `4d7badcff`).
- repeat run: macOS desktop e2e shard 1, `--retries 0 --repeat-each 10`,
three tests, 30 passed in 15.2 min:
https://github.com/with-hide/hide/actions/runs/42782291670/job/129715320336
- final head: `verify` run 42788013658 success.
- local native run: none (machine load; repetition is left to CI by
docs/VERIFICATION.md).
- changed paths: `desktop/e2e/session-workflow.spec.ts`,
`web/e2e/session-work-fixture.ts`, `web/e2e/daemon-actions.ts`,
`docs/TESTING.md`.

</details>
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
Closes with-hide/hide-private#526
Closes with-hide/hide-private#599
Refs with-hide/hide-private#395, with-hide/hide-private#530,
with-hide/hide-private#117, with-hide/hide-private#586
Refs with-hide/hide-private#832

## Summary

- Start the checkout PR flow on Main after its setup has focused another
workspace.
- Prevent Windows test browsers from losing local page or resource
requests during shell startup.
- Retain the failed row and pointer state for a separate, unreproduced
late card-hover failure.

## Review

- **Risky files**: browser-launch.cjs merges installed runner defaults;
the desktop preload extends effective flags.
- **Risky files**: checkout-pr.spec.ts retains discovery's connection,
then resets first-run selection before Main.
- **Risky files**: desktop browser.spec.ts uses the shared arguments for
its plain Chromium launch and checks the applied features through CDP.
- **Decide**: The narrow upstream fix uses the locked runner's internal
argument API; a changed shape fails startup.
- An entire runner upgrade would also replace the browser revision and
is outside this stabilization change.
- **Cost**: The hover observer exists only for one test phase, retains
32 transitions, and is removed on every exit.
- **Cost**: Splitting the plain-browser notice from the native-view
lifecycle adds one isolated fixture start so Windows CI checks that
launcher too; its existing notice assertions are retained.
- [Windows run
41016473655](https://github.com/with-hide/hide/actions/runs/41016473655/job/123933953907),
tracked by [private
with-hide#130](with-hide/hide-private#130), records the
same document-load error.
- [with-hide#832](with-hide/hide-private#832) tracks
one later card-hover failure; this PR does not claim its cause is fixed.

## Tests

- **Layer**: Unit feature merging; real browser startup and desktop
recovery cross the actual host launch boundary.
- The desktop plain-browser case checks the effective final
disabled-feature list, retained runner defaults and the Windows loopback
fix before opening the shell.
- It passed its first Windows CI attempt on the final head in [the
desktop
lane](https://github.com/with-hide/hide/actions/runs/42860546110/job/129985854339).
- Units cannot observe which feature list the launched browser applies;
the startup check reads that applied state.
- **Catches**: Removing the Windows feature fix failed two merge checks;
restoring it passed all three.
- **Repeat**: Linux/macOS: five flows x20, [100 passed
each](https://github.com/with-hide/hide/actions/runs/42832076296).
- Desktop recovery/relaunch: each x10 on macOS/Windows, retries 0, [40
passed](https://github.com/with-hide/hide/actions/runs/42831271844).
- Final Windows: five flows x20, retries 0, [100
passed](https://github.com/with-hide/hide/actions/runs/42844846265/job/129929485236).
- **Waits**: No new wait, delay, retry, timeout or threshold; the
existing Main assertion follows explicit state setup.

## Evidence

- **Verified**: Local startup/checkout flows, desktop recovery/relaunch,
unit 3, lint, types, builds and policy checks.
- **Verified**: The split desktop plain-browser and native-view flows
passed locally without retries; desktop lint and typecheck passed.
- **Verified**: A controlled trigger replacement preserved the original
failure and captured mounts=2 before teardown.
- **Verified**: [Required
CI](https://github.com/with-hide/hide/actions/runs/42860546110) and
independent review passed on final head c532660.
- **Not verified**: The historical reference-only causes and the late
hover cause.

<details><summary>Failure evidence and review boundaries</summary>

- with-hide#526's run 42780431716 drew Workspace while the test expected Main
after setup focused its agents.
- with-hide#599's run 42080456072 had an unmounted shell, a successful document
and a failed entry script with ERR_NO_BUFFER_SPACE.
- Private with-hide#130 is handled separately by public PR with-hide#2372; its Windows
host log recorded window.load_failed ERR_NO_BUFFER_SPACE after a normal
daemon start.
- The test-only startup fix follows [the upstream
fix](microsoft/playwright#43605) and [the
browser defect](https://issues.chromium.org/issues/572515601).
- The locked runner 1.63 lacks that fix.
The helper reads its installed defaults rather than copying a
version-specific list.
- with-hide#395's run 42140863283 attached its daemon before its shell wait
failed, with no page-side or failed-load signature for that exact wait.
Its initial report used the retired fixture startup path; neither
identifies this PR's connection cause.
- with-hide#530's original failure drew Main with a failed sidebar boundary.
A controlled stylesheet abort reproduced that screen and a missing
CSS-token diagnostic, but the original artifact retained no
asset-failure signature.
- with-hide#117's latest retained record has only a whole-test timeout.
  Its historical lost step remains unidentified.
- with-hide#586's run 42359435922 explicitly reports the loopback error, but its
initial whole-test timeout and its separate focus flow were not resolved
by the targeted repetitions.
- For those next failures, inspect pageSide screen/project state,
request status, failed requests, renderFailures and renderDiagnostics.
The dump now retains failed regions and the newest eight relevant render
diagnostics.
Each reference-only issue has a comment with its confirmed facts,
remaining gaps and next dump.
- with-hide#536 was closed separately because commit 8be1505 deleted its Home
collision test.
  The current no-project startup spec does not replace that behavior.
- The first Windows repetition had 99/100 passes:
checkout-pr.spec.ts:273 failed at the final light-theme hover after the
shell, row, PR glyph and browser display had already drawn.
- A diagnostic-only repeat at 5eefccb passed 100/100: all 20 checkout
attempts retained one trigger mount, had PR facts ready and hit that row
with the pointer.
  The card opened after its normal hover delay.
  This did not reproduce or establish the cause of the earlier failure.
- The replacement diagnostic captures the failing state inside that
step, before teardown can add a disconnected banner and move the row.
It records the checkout key, mounts, pointer hit, geometry, focus,
visibility, drag marks and tooltip state, preserves the original error,
and reports independent cleanup failures.
- The old conversation-date fixture also caused automatic sleep of the
Main setup agent in the failed run.
A current-clock proposal removes that sleep locally, but its
relationship to the hover failure is unconfirmed.
  It remains an uncommitted local patch documented in with-hide#832.
- No product input, runtime mutex, snapshot wire or rendering path
changes.
  The operator's installed application was untouched.

</details>

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

- Final head: c532660.
- Startup repeat candidate 4231d60:
Linux/macOS each five flows x20, no retry.
- Desktop repeat candidate ce0dffe:
JSON reports on each OS show expected=20, unexpected=0, skipped=0,
flaky=0, repeatEach=10 and retries=0.
- Diagnostic-only Windows candidate
5eefccb: run 42838637529, five flows
x20, no retry, 100 passed.
  The temporary early observer and trace flag were reverted.
- Final Windows repeat candidate
49b560a: run 42844846265, five flows
x20, retries=0, 100 passed; job log confirms the exact tested commit.
- All temporary workflow changes are reverted.
The repeated specs, shared startup fixtures and guide match the final
Windows repeat candidate; the later desktop browser.spec.ts regression
and its smaller size baseline are the only differences in those test
trees.
- Head 1933d66 is a source-identical verification commit after
f45c106, added to regenerate the synthetic merge against the corrected
base.
- Review follow-up c532660 applies the shared launch settings to the
desktop plain browser and separates that existing notice contract into a
Windows-covered case.
- Local current source: checkout hover flow passed without retries; a
controlled browser replacement captured the original failure and two
mounts; web lint and test-size budget passed.
- Earlier unchanged-source checks: web build; web/desktop lint; desktop
typecheck; startup/checkout 3; desktop recovery/relaunch 2; merge unit
3; design contract and policy checks passed.
- Manual repeat dispatches that skipped every test and draft-only verify
failures are excluded from verification evidence.
- Independent review and required CI 42860546110 passed on
c532660.
- Ready run 42849933157 checked synthetic merge
83a0f35 against base
8284fb6, which predates with-hide#2398.
- That merge still waited on the retired status.herdr field; current
main uses status.engine.
  All hard web failures were at that restart boundary.
  One required failed-job rerun was started.
- The regenerated merge f4ed9d1
includes the corrected status.engine wait.
- Final run 42860546110 tests merge
6b977ba containing c532660; completed
job logs confirm that checkout.
- Its Linux suite has 412 passes and eight Windows-only skips, the
retry-free changed-spec repeat has 80 passes, Windows web has 85 passes,
and Windows desktop has 24 passes and one existing platform skip.
The new plain-browser startup case passed its first attempt in 6.9
seconds.

</details>
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