Skip to content

Windows 데스크톱 단위 테스트: 세 OS에서 같은 단언으로 돌리고 windows check를 필수로 - #334

Merged
yansfil merged 2 commits into
mainfrom
platform/desktop-win-tests
Oct 3, 2026
Merged

yansfil merged 2 commits into
mainfrom
platform/desktop-win-tests

Conversation

@yansfil

@yansfil yansfil commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Refs with-hide/hide-private#103

Summary

windows check는 데스크톱 단위 스위트를 continue-on-error로 돌렸고, desktop/src/main/의 6개 파일에서 20개가 Windows에서 실패했습니다.
같은 테스트가 세 OS에서 같은 동작을 확인하도록 고쳤고, 그중 셋은 제품이 실제로 틀린 것이라 제품을 고쳤습니다.
이제 windows check는 verify의 needs에 들어간 필수 lane입니다. Windows 컴파일이 이미 green이라, 컴파일 에러를 crate별로 모으던 진행 보고용 단계는 지웠습니다.

Review

  • 판단해 주세요: 테스트가 드러낸 제품 차이 셋을 제품에서 고쳤습니다.
    • PATH를 :로 나누면 C:\bin의 드라이브 문자가 잘립니다. 이제 path.delimiter로 나눕니다.
    • Windows에서 실행 파일은 hide.exe와 herdr.exe입니다. 이제 executableFile로 이름을 정합니다.
    • Windows에는 login shell이 없습니다(HAS_LOGIN_SHELL). 패키지된 앱이 /usr/bin/env로 셸을 부르지 않습니다.
  • 판단해 주세요: 시스템에 따라 갈리는 단언은 둘이고, 둘 다 테스트를 건너뛰지 않고 그 시스템의 동작을 확인합니다.
    • Windows에는 실행 비트가 없어서 .txt는 mode와 상관없이 문서로 열립니다.
    • detached 시작은 모든 시스템에서 "시작한 프로세스가 끝나도 살아남는다"로 확인합니다. Windows의 Node는 끝날 때 detach하지 않은 자식을 모두 끝내기 때문입니다. 그룹을 되읽는 확인은 ps가 있는 Unix에서만 합니다.
    • login shell 실제 호출 테스트는 Windows가 아닌 시스템에서만 돕니다. HAS_LOGIN_SHELL이 정확히 그 조건인지는 별도 단언으로 확인합니다.
  • 조심해서 볼 파일:
    • .github/workflows/pr.yml: 필수 lane이 하나 늘었습니다. timeout은 기존 50분을 유지했습니다(2026-10-03 warm cache 기준 4~8분, cold cache면 workspace를 처음부터 컴파일).
    • desktop/src/main/host.ts: macOS에서도 PATH 조립이 path.delimiter(:)를 지나갑니다. 값은 그대로입니다.
  • 원칙: 1(진행 보고용 요약·로그 업로드 단계와 continue-on-error 주석을 지움), 2(테스트 프로그램을 node 하나로), 4(Windows 컴파일 실패가 이제 lane을 실패시킴), 12(새 테스트는 더하지 않았습니다: 기존 PATH 순서 테스트가 Windows에서 구분자 버그를 이미 잡습니다), 13(구분자·실행 파일 이름을 호출자마다가 아니라 한 곳에서).

Evidence

  • 확인한 것:
    • macOS에서 bash scripts/verify-web.sh 통과(web와 desktop의 typecheck, lint, test, build). 데스크톱 src/main은 84개 모두 통과.
    • 독립 리뷰의 Fix now를 고쳤습니다.
      • .exe 이름과 login shell 조건을 제품 상수로 기대값을 만들던 것: 테스트가 직접 적습니다.
      • Windows에서 detached 시작의 생존을 보지 않던 것.
      • 낡은 문구: PATH 레지스트리, 워크플로 헤더, 게이트의 로컬 명령.
    • 스크립트 스위트(python3 -m unittest discover -s scripts/tests) 32개 통과.
    • Windows 결과는 이 PR의 windows check가 처음 증명합니다. 실패하던 20개가 같은 단언으로 통과하는지 거기서 확인합니다.
  • 확인하지 못한 것:
    • Windows에서 패키지된 앱 자체는 실행하지 않았습니다. Windows용 패키지가 아직 없습니다.
    • 데스크톱 호스트가 페이지에 주는 경로 철자(wire 철자, #332의 모델)는 이 PR의 범위 밖입니다.
    • Windows 설치 위치(wellKnownDirs)는 Unix 목록을 그대로 둡니다.

…quire windows check

Three things the Windows run exposed were the product's, not the tests':
the desktop host split PATH on `:`, which cuts a drive letter off every
Windows entry; it looked for `hide` and a bundled `herdr` where Windows
has `hide.exe` and `herdr.exe`; and a packaged app would ask a login
shell through `/usr/bin/env`, which Windows does not have and does not
need. PATH now splits on the system's separator, executables carry the
system's file name, and Windows asks no login shell.

The tests now spell what the host builds the way the system does, run
Node itself as the child program instead of `/bin/sh` and `/bin/sleep`,
and read the temporary folder's physical spelling, so the same tests
pass on macOS, Linux and Windows. Two assertions depend on what a system
has: Windows keeps no execute bit, so a `.txt` there is a document, and
no tool there reads a process group back.

The desktop step's continue-on-error is gone, and with the workspace
compiling for Windows the compile step is a plain gate; the progress
summary that grouped compile errors by crate went with it. windows check
is in verify's needs.
…utlives its starter

The tests spelled `hide.exe` and `herdr.exe` through the product's own
helper and gated the real login shell on the product's own flag, so a
regression in either would have changed product and expectation
together. They now spell the names and the systems themselves.

The detached start is checked by a starter process that runs
`startDetached` and exits: on Windows Node ends every child it did not
detach when it exits, so the child surviving is the behaviour there;
Unix also reads the child's own group back. The runner's stop no longer
signals a child whose start failed (`kill EINVAL` on Windows), and the
PATH registry, the workflow header and the gate's local commands say
what Windows does.
@yansfil
yansfil force-pushed the platform/desktop-win-tests branch from 4bde106 to 7c8379f Compare October 3, 2026 08:28
@yansfil
yansfil merged commit 6921bdc into main Oct 3, 2026
21 checks passed
@yansfil
yansfil deleted the platform/desktop-win-tests branch October 3, 2026 10:47
yansfil added a commit that referenced this pull request Oct 3, 2026
Refs #293

## Summary

Windows는 지금까지 `HIDE_OPEN_COMMAND`(명시적 파일 열기 CLI)를 부팅 때 거절했습니다. Unix는 데몬이
죽어도 그 CLI의 프로세스 트리가 끝나도록 supervisor와 owner 소켓 쌍을 두는데, Windows에는 그 대응이
없었기 때문입니다.
이제 Windows에서는 그 CLI를 `OwnedChild`로만 실행합니다. job
object(`KILL_ON_JOB_CLOSE`)가 stop, 10초 timeout, Drop, 그리고 hided가 소멸자 없이
죽는 경우까지 트리 전체를 끝냅니다.
두 시스템이 `OwnedOpener` 하나와 handler의 실행 경로 하나를 같이 씁니다.
opener lifecycle 테스트는 테스트 바이너리 자신을 가짜 CLI로 씁니다(sh 또는 `.cmd` 두 줄 스크립트).
그래서 같은 테스트가 세 OS에서 돕니다. 이 테스트와 opener가 필요한 handshake 테스트를 `windows
check`가 실행합니다.
#332(경로 모델)와 #334(필수 `windows check`) 위로 rebase했습니다. opener는 이제 CLI에 경로를
wire 철자를 거쳐 넘깁니다. Windows에서 데몬이 canonicalize한 `\\?\C:\x`가 아니라 `C:\x`를
받습니다. `code.cmd` 같은 명령줄 프로그램은 `\\?\` 접두사를 읽지 못하기 때문입니다.

## Review

- **판단해 주세요**: Unix는 supervisor를 유지합니다(원칙 2를 따르지 못한 이유).
- 어떤 Unix도 소유자가 죽을 때 프로세스 그룹 전체를 끝내 주지 않습니다. Linux `PR_SET_PDEATHSIG`는
직계 자식 하나만, 그것도 스레드 기준으로 보고, macOS에는 아예 없습니다.
  - 그래서 한 모델로는 owner-death 보장을 지킬 수 없습니다.
- **판단해 주세요**: Windows에서 CLI가 직접 띄운 프로세스는 job 안에 남아 CLI가 끝날 때 같이 끝납니다.
  - 예: 편집기가 떠 있지 않을 때 `code.cmd`가 띄운 편집기도 같이 끝납니다.
  - 셸이나 이미 떠 있는 앱이 연 것은 job 밖이라 남습니다.
- Unix에서 `setsid`로 빠지는 경우와 다릅니다. job을 CLI 종료 때 끝낼지, timeout·종료·데몬 사망 때만
끝낼지 정해 주세요. 지금은 Unix의 "CLI가 끝나면 그룹을 끝낸다"에 맞췄습니다.
- **조심해서 볼 파일**:
- `hide-platform/src/process.rs`: 콘솔이 없는 소유자(분리된 데몬)일 때만 Windows
`OwnedChild`에 `CREATE_NO_WINDOW`를 더합니다. 그렇지 않으면 콘솔 프로그램(`.cmd` 포함)마다 보이는
창이 뜹니다. 콘솔이 있는 소유자는 예전처럼 자식과 콘솔을 나눕니다. 모든 자식에 더했더니 자식마다 conhost가 생겨
`measure_tree` 계약이 바뀌었고, os contract (windows)가 그것을 잡았습니다.
- `hided/src/env.rs`: Windows는 `.exe/.com/.bat/.cmd`만 받습니다. 그 밖의 파일은 부팅
때 거절합니다.
- `hided/src/spawn.rs`: failure path라서 봐야 합니다. kill이 실패하면 기다리지 않고, job의
마지막 handle이 닫힐 때 끝납니다.
- `hided/src/opener.rs`: `program_spelling`이 `to_wire` 뒤 `from_wire`로
프로그램에 줄 철자를 만듭니다. wire 철자가 없는 경로(UTF-8이 아닌 이름 등)는 받은 그대로 넘깁니다. 거절하지 않은
이유는 그 경로가 이미 boundary를 통과한 이 기계의 경로이기 때문입니다.
- **원칙**: 1(Windows 거절 분기, `cfg` 울타리, 낡은 문서를 지움), 2(한 타입, 한 실행 경로),
4(실행할 수 없는 CLI는 부팅 때 거절), 7(새 장치 없이 `OwnedChild` 재사용), 8(소유 모델을 플랫폼 계층에
둠), 12(lifecycle 테스트 하나를 세 OS가 공유하고, supervisor 고유 테스트만 Unix).

## Evidence

- **확인한 것**:
  - macOS에서 `verify-cargo.sh lint`와 `test` 전체 통과.
- `opener_lifecycle` 10개 통과(가짜 CLI와 자식이 stop, timeout, 종료 알림, 소유 프로세스
kill 뒤에 남지 않음).
- 새 테스트 `a_helper_is_handed_the_plain_spelling_of_a_canonical_path`:
`fs::canonicalize`한 경로로 열면 가짜 CLI가 `identity::canonical` 철자를 받습니다.
Windows에서는 `\\?\`가 빠진 것을 확인합니다.
- rebase 뒤 macOS `verify-cargo.sh lint`/`test` 전체(56 suites)와 Windows 대상
clippy를 다시 통과했습니다.
  - Windows 대상 `clippy --workspace --all-targets -D warnings` 통과.
  - 독립 리뷰의 Fix now 3건을 고쳤습니다: 콘솔 창, Windows에서 실행 불가 파일 허용, 낡은 문서 한 줄.
- **확인하지 못한 것**:
  - Windows 실행은 이 PR의 CI가 처음입니다.
  - 탐색기와 COM 핸드오프가 job 밖에서 앱을 띄우는 경우는 실기기로 보지 않았습니다.
- opener를 부르는 신뢰된 전송은 아직 없습니다(`open_external`은 브라우저 소켓에서 거절). 실제 제품 경로는
이 PR로 열리지 않습니다.
yansfil added a commit that referenced this pull request Oct 3, 2026
…335)

Refs #293

## Summary

원격 데몬을 위해 기기에서 도는 pane bootstrap 도우미(`hide-host-helper
workspace-bridge`)는 `UnixListener` 위에서 비차단 accept를 폴링했고, 그 기기의 `hide`는
Windows에서 브리지를 찾지 않았습니다(`Ok(None)`).
이제 브리지는 slice 5의 pane bootstrap과 같은 방식으로
`hide_platform::ipc::LocalListener`/`ListenerCloser` 위에 섭니다.
macOS/Linux에서는 Unix 소켓, Windows에서는 named pipe와 그 marker 파일입니다.
accept는 자기 스레드에서 막혀 기다리고, exec 채널의 입력이 끝나면 closer가 그것을 닫습니다.
클라이언트(`bootstrap_remote`)는 `LocalStream`으로 연결합니다.
그래서 Windows 기기도 원격 데몬의 브리지를 둘 수 있습니다. 원격 OS probe와 원격 kit 설치는 이 PR의 범위가
아닙니다.
#332(경로 모델), #334(필수 `windows check`), #333(Windows opener) 위로
rebase했습니다. 브리지의 줄이 기기의 경로를 wire 철자로 싣습니다.
  - 데몬의 첫 줄의 `bridge_dir`는 브리지가 `from_wire`로 읽습니다.
- 브리지가 답하는 endpoint(Windows에서는 marker 파일)와 reference는 `to_wire`로 씁니다.
기기의 `hide`는 reference를 `from_wire`로 읽습니다.
  - hided 자신의 pane bootstrap도 같은 reader를 지나므로 reference를 wire 철자로 답합니다.

## Review

- **판단해 주세요**: 리뷰가 찾은 Windows 보안 구멍을 `hide_platform::ipc`에서 한 번에 막았습니다.
- Windows pipe 이름은 전역이라, marker가 있는 비공개 폴더가 다른 계정이 그 이름의 pipe를 먼저 만드는 것을
막지 못합니다.
- 이제 Windows의 모든 `LocalStream::connect`가 연결한 pipe의 소유자가 이 계정인지 확인하고, 아니면
`PermissionDenied`로 거절합니다.
  - slice 5에서 들어온 hided 자신의 pane bootstrap도 같은 구멍이 있었고, 같이 막힙니다.
- **조심해서 볼 파일**:
- `hide-host/src/workspace_bridge.rs`: failure path라서 봐야 합니다. accept나
sweep이 스스로 멈추면 이제 `failed` 프레임을 쓰고 끝납니다. 예전에는 아무 말 없이 멈춰 route가 ready로
남았습니다. 데몬(`remote_bridge.rs`)은 그 이유를 기록하고 route를 끝냅니다.
- `hide-platform/src/ipc.rs`: 모든 Windows 클라이언트 연결(Herdr 클라이언트 포함)에 소유자
확인이 하나 늘었습니다. Herdr는 같은 계정으로 돌기 때문에 통과합니다.
- `hided/src/workspace_cli.rs`: Unix의 `is_socket` 확인이 "디렉터리·링크가 아님 + 이
계정 소유"로 바뀌었습니다. 살아 있는 listener인지는 connect가 판단합니다.
- **판단해 주세요**: 첫 줄의 `herdr_socket`은 wire 철자로 바꾸지 않았습니다. 기기의 Herdr가 보고한
값을 그 Herdr에게 되돌려 주는 것이라, #332의 `wire.rs`가 Herdr에게 Herdr의 철자로 보내는 것과 같은
규칙입니다. 데몬이 Mac에서 Windows 기기의 철자를 바꾸지 않는 것은 ARCHITECTURE의 "Not spelled
yet"에 그대로 남아 있습니다.
- **조심해서 볼 파일 (rebase 후)**: `hided/src/pane_auth.rs`: failure path라서 봐야
합니다. wire 철자가 없는 reference(UTF-8이 아닌 상태 경로)는 `reference_unavailable`로
거절하고, 전달하지 못한 reference처럼 회수합니다. macOS/Linux에서는 바이트 동일합니다.
- **판단해 주세요**: 첫 CI(run 37118299146)의 rust workspace를 실패시킨 잠금 테스트를
고쳤습니다(`hide-platform/tests/fs.rs`, `src/fs/lock.rs` 문서).
- 원인: Unix의 `flock`은 서술자가 아니라 열린 파일에 붙습니다. 같은 테스트 바이너리의 다른
테스트(`hold_in_another_process`, `mkfifo`)가 자식을 띄우면, 그 자식은 exec 전까지 잠금
서술자의 복사본을 쥡니다. 그 사이에 `drop(held)`가 일어나면 잠금은 자식이 exec할 때 풀립니다. 테스트는 drop
직후 `Duration::ZERO` 한 번만 시도했습니다.
- 확인: fork 뒤 exec 전에 멈추는 자식을 둔 작은 프로그램에서, drop 직후 재잠금이 실패하고 자식이 exec한
뒤에는 성공했습니다.
- 고침: drop 뒤 다시 잡는 세 곳만 최대 10초 기다립니다. 같은 파일의 다른 프로세스 잠금 테스트가 이미 쓰는
방식입니다. "drop하면 풀린다"와 "잡고 있는 동안 다른 잠금은 못 잡는다"는 그대로 단언합니다. 경로 공유는
없었습니다(테스트마다 자기 tempdir).
- **원칙**: 1(fd 수준 peer pid 도우미와 브리지 복사본을 지움), 2·7(새 장치 없이 slice 5의 패턴과
`ipc` 재사용), 4·10(브리지가 멈춘 이유를 채널 위로 올림), 13(pipe 소유자 확인을 호출자가 아니라
`ipc`에서).

## Evidence

- **확인한 것**:
  - macOS에서 `verify-cargo.sh lint`와 `test` 전체 통과(55 suites).
  - Windows 대상 `clippy --workspace --all-targets -D warnings` 통과.
- rebase 뒤 macOS `verify-cargo.sh lint`/`test` 전체와 Windows 대상 clippy를 다시
돌렸습니다.
- 새 테스트 `a_remote_bridge_answers_this_device_and_ends_with_its_channel`가
세 OS에서 실제 브리지와 클라이언트를 맞붙입니다.
- 브리지가 호출자의 pid를 보고, Herdr가 없는 소켓에서 `pane_unavailable`로 멈춥니다. pid를 못 봤다면
`caller_unavailable`가 먼저 나옵니다.
    - 채널이 끝나면 10초 안에 끝나고 endpoint가 사라집니다.
- 첫 줄을 wire 철자로 보내고, `ready`의 endpoint가 `from_wire`로 읽혀 그 폴더 아래에 있는지
봅니다. Windows에서는 네이티브 철자였다면 `from_wire`가 거절합니다.
    - `windows check`가 이 테스트와 브리지 단위 테스트를 돌립니다.
- 독립 리뷰의 Fix now 2건을 고쳤습니다(멈춘 브리지의 침묵, Windows pipe 선점). accept 큐 제한과
sweep 기아도 같이 고쳤습니다.
- **확인하지 못한 것**:
- 첫 CI의 web e2e linux 1/6 `checkout-owner.spec.ts:162` 실패는 원인을 확인하지 못해
재실행하지 않고 #288에 run id와 함께 남겼습니다. Herdr는 탭 둘(`w2:t1`, `w2:t2`)을 만들었는데
화면에는 하나만 올라왔습니다. 이 PR은 탭 생성과 projection 경로를 바꾸지 않습니다.
  - 다른 계정이 pipe를 선점하는 경우는 CI에서 재현할 수 없습니다. 같은 계정의 연결이 모두 통과하는 것만 확인됩니다.
- Windows를 실제 원격 기기로 붙이는 흐름은 아직 없습니다. OS probe(`uname`), POSIX 셸 명령, kit
설치가 Unix를 가정합니다(#293).
yansfil added a commit that referenced this pull request Oct 3, 2026
Related: #293, #332(경로 모델), #334(`windows check` 필수)

## Summary

데스크톱 호스트(`desktop/src/main/`)는 Windows에서 페이지에 native 철자(`C:\repo`)로 답하고
페이지의 경로를 native로 읽었습니다.
페이지는 #332의 wire 철자(`C:/repo`)로 경로를 잇고 비교하므로, Windows에서는 probe 답이 체크아웃
루트와 맞지 않았고 `\foo`도 절대 경로로 통과했습니다.
- `desktop/src/main/wirePath.ts`가 `hide_platform::path` 규칙을 TypeScript로
한 글자씩 옮긴 유일한 경계입니다. probe의 `real`과 폴더 피커 답은 `toPage`로 나가고,
reveal·open·probe 입력은 `fromPage`로 들어옵니다.
- Windows에서는 native `C:\x`, 드라이브 없는 `\x`, 드라이브 상대 `C:x`를 페이지 입력으로 받지
않습니다. 환경 변수의 경로도 드라이브가 있어야 하고, 드라이브 없는 PATH 항목은 Rust `find_program`처럼
건너뜁니다.
- Windows 설치 폴더는 각 설치 프로그램의 기본 폴더입니다: `~\.local\bin`(Claude Code),
Codex·Herdr의 `%LOCALAPPDATA%\Programs\...\bin`, Git for Windows(계정용·머신용
`Git\cmd`), `%APPDATA%\npm`, GitHub CLI, Node.js.
- PATH가 없는 자식은 `%SystemRoot%` 아래 기본 시스템 Path를 받습니다. 변수가 없는 폴더는 추측하지 않고
빼며, 시작할 때 `env.locations_missing`가 그 키를 남깁니다.
- 로그인 셸의 `/bin/zsh` 추측은 지웠습니다. 이제 `SHELL`, 없으면 계정 DB의 셸을 쓰고, 둘 다 없으면 그
단계를 건너뛰고 `no_shell`을 로그에 남깁니다. macOS에서 답은 그대로입니다(wire 철자 = native).

## Review

- **판단해 주세요**: Windows에서 `ComSpec`을 읽지 않습니다. 호스트는 Windows에서 셸을 시작하지
않습니다(로그인 셸 없음, `hide.exe` 직접 실행). 읽기만 하고 쓰지 않는 키는 env 레지스트리 규칙에 어긋납니다.
- **판단해 주세요**: 킷은 Windows에서도 `~\.local\bin`에 확장자 없는 `hide` 링크를 만들어, 검색이
찾지 못합니다. 킷이 `hide.exe`를 쓰게 하는 일은 킷 변경이라 이 PR에서 고치지 않았습니다.
- **조심해서 볼 파일**:
- `desktop/src/main/wirePath.ts`: 기기 사이 경로 계약입니다. Rust와 다르면 둘 중 하나가
버그입니다. 장치 이름은 ASCII만 대문자로 바꾸고 Unicode 공백을 잘라 내며, 그 경우를 양쪽 테스트에 넣었습니다.
- `desktop/src/main/host.ts`: failure path입니다. wire 철자가 없는 폴더를 고르면 이유와
함께 거절하고, 페이지 진단에 "folder picker failed"가 뜹니다.
- 적용한 원칙:
  - 1: `revealablePath`를 지웠습니다.
  - 2: 방향마다 변환 지점이 하나입니다.
  - 4: 추측 대신 거절하고 그 키를 이름으로 남깁니다.
  - 7: 새 규칙을 만들지 않고 Rust 규칙을 거울처럼 옮겼습니다.
  - 12: 기대값은 Rust 테스트와 설치 프로그램 소스에서 왔고, 심은 버그 5개가 모두 잡혔습니다.
  - 13: 드라이브 없는 경로를 페이지 입력, env, PATH, 기억된 CLI에서 같은 규칙으로 막습니다.

## Evidence

- **확인한 것**:
- macOS에서 `bash scripts/verify-web.sh` exit 0, desktop `src/main` 92
통과·3 건너뜀(Windows 전용).
- `cargo test -p hide-platform --lib path::` 7 통과(새 장치 이름 경우 포함), `cargo
fmt --check`, hide-platform clippy 통과.
  - Windows 규칙은 텍스트라 macOS에서도 검사합니다(`wirePath.test.ts`).
- 미리 예측하고 버그를 심었더니 모두 해당 테스트가 실패했습니다: 드라이브 대문자 누락, `fromPage` 변환 생략,
`C:` 루트 없이 허용, 옛 장치 이름 규칙, Windows 시뮬레이션에서 드라이브 없는 PATH 허용.
- 경로를 `path.win32`로 바꾸고 플랫폼을 흉내 내 순수 테스트만 돌렸습니다(파일을 쓰지 않음): resolver 9,
설치 폴더 1, env 2 통과.
- **확인하지 못한 것**:
  - 실제 Windows 실행은 이 PR의 `windows check`(desktop unit)가 처음입니다.
  - Windows 앱 UI는 패키지가 없어 확인하지 못했습니다(PR 4).
- macOS desktop e2e는 로컬에서 돌리지 않고 CI에 맡겼습니다. 디스크 사정과 macOS 동작 무변경이 이유입니다.
  - 설치 폴더는 공식 문서와 설치 스크립트 소스로 정했고, 실제 Windows에 설치해 보지는 않았습니다.
- 웹의 터미널 링크 탐지(`terminalLinks.ts`, `pathLookups`)는 아직 POSIX 전용이라,
Windows 터미널 링크는 웹 쪽 작업이 남았습니다.

Refs #293
yansfil added a commit that referenced this pull request Oct 29, 2026
## Summary

사이드바 내 차례가 운영자가 답해야 할 것을 빠뜨리거나 흐리게 보여 주던 문제를 고칩니다.
- 미션의 판단 대기는 Conductor 행의 질문(`판단 · …`)으로 내 차례에 들어오고, 미션 칩은 진행 수를 지킨 채
`!`만 더합니다. 맵에서 답하면 바로 빠집니다.
- 읽었지만 답하지 않은 질문은 다시 볼 것으로 옮기지 않고 내 차례에 흐리게(빈 `!`, `읽음`) 남습니다. 알림은 다시
울리지 않고, ☆는 다시 볼 것으로, `치우기`는 새 질문 전까지 치웁니다.
- 자식의 질문은 행의 `!N` 대신 루트의 질문으로 보이고, 여러 건이면 `외 N건`이 붙습니다. `!N`은 트리 팝오버에만
남습니다.
- 기다리는 행은 `대기` 대신 무엇을 기다리는지(`자식 기다림`, `CI 기다림 · PR #n`, `답장 기다림`, `백그라운드
기다림`) 말합니다.
- 라벨 프롬프트는 질문인지 끝남인지 애매하면 질문으로 봅니다(v24). 치운 질문과 끝남 뒤의 답은 id만 담은 진단으로
남깁니다.

![태스크 list
(dark)](https://github.com/yansfil/pr-assets/blob/main/hide/gen-prd-needs-you-cleanup/def38d8/session-panel-dark.png?raw=true)
갤러리 태스크 목록: 내 차례 넷째가 판단 행과 `! 미션 0/8`, 다섯째가 읽은 질문, 대기 아래 둘(`자식 기다림 · 자식
2개 작업 중`, `CI 기다림 · PR #1846`)이 원인을 말하는 대기 줄입니다.

## Review

- **판단해 주세요**: 읽은 질문의 흐림 정도(빈 `!`, 연한 줄, `읽음` 태그)가 "아직 내 차례"로 읽히는지.
- **판단해 주세요**: 맵에서 답했지만 전달이 확인되지 않은 판단도 행에서 빠집니다(맵 배너가 다시 보내기를 띄움). 행에
남겨야 하는지.
- **조심해서 볼 파일**: `herdr-core/src/runtime/plans.rs` - snapshot pull마다 도는
경로. core 질문 목록을 장부 편집 때만 다시 만들고, 같으면 행을 다시 깔지 않습니다.
- **조심해서 볼 파일**: `herdr-core/src/agent_state/turn.rs` - 루트의 선두 질문과 `외
N건` 계산, 폰 알림에서 읽은 질문을 Seen으로 보는 규칙.
- **조심해서 볼 파일**: `contracts/hided-ws.schema.json`,
`contracts/snapshot-wire-enums.json` - snapshot wire의
`ask_subject.cause`에 `mission_decision` 추가. 옛 서비스 워커는 원래 문장으로 대체합니다.
- **대기 행의 자리**: 앱에서 wait 원인이 있는 행은, 쉬는 중이면 대기 그룹에(`tasks.rs` state, 별표나
읽은 질문이 없을 때), 에이전트가 실제로 일하는 중이면 작업 중에 섭니다. 바뀐 줄은 대기 그룹 행에서 보입니다.
- **비용 검토**: Herdr 행 동기화마다 plan·mission 장부를 한 번 훑어 질문 목록을 만듭니다(장부 크기 비례,
행 수와 무관). 잠금 안 I/O 없음.
- **질문**: raised 자손 때문에만 내 차례에 있는 루트에 ☆를 누르면 지금은 별만 붙고 내 차례에 남습니다. 다시 볼
것으로 옮겨야 하는지 정해 주세요.

## Evidence

- **확인한 것**: 최종 head에서 `sasu implement verify` 통과(`verify-cargo.sh
test`, `lint`), `scripts/verify-web.sh` 통과(web 2,252개, desktop 294개).
- **확인한 것**: 미션 판단의 깔기·교체·맵 답·새 질문·해제·닫기와 동기화 직후 해제 경합을 core 테스트로 확인.
- **확인한 것**: 읽은 질문의 내 차례·폰 그룹·☆·치우기, 프로젝트 할 일에서 치운 기록 질문 제외, 선두 질문 순서와
`외 N건`, 읽은 질문 무알림을 core/hided 테스트로 확인.
- **확인한 것**: 서비스 워커가 `판단 · 줄`로 쓰고, 옛 페이지 단어나 모르는 원인은 원래 문장으로 대체함을 실제
`sw.js`로 확인.
- **확인한 것**: 부하(load 50~180) 중 verify 네 번이 이 브랜치와 무관한 테스트로 실패했고, 모두 단독
실행에서 통과해 hide-private #331-#334 quarantine으로 올렸습니다.
- **확인한 것**: 새 계약에 맞춘 Playwright 세 spec(`session-panel`, `mission-map`,
`mobile`)을 로컬 격리 Herdr로 실행해 통과.
- **확인하지 못한 것**: 격리된 후보 앱의 네이티브 화면 확인(스크린샷은 갤러리 데이터), 연결된 기기의 Conductor
행.
- **확인하지 못한 것**: 라벨 프롬프트 변경이 실제 판정에 주는 효과, `verdict.answer_after_done`
worker 단위 테스트, 데스크톱에서 판단이 한 번만 알리는지.
- **확인하지 못한 것**: 기기 행에서 ☆로 읽음 처리는 기기의 다음 동기화 때 반영됩니다(즉시 아님).

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

![태스크 list
(light)](https://github.com/yansfil/pr-assets/blob/main/hide/gen-prd-needs-you-cleanup/def38d8/session-panel-light.png?raw=true)
라이트 테마, 같은 갤러리 상태.

</details>

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

- PRD: `agents/prd/needs-you-cleanup/prd.md` (sha256
b2812e065e39a4effde7a242232e2d4c954c75ec269777e9618afa4e5e27beb3)
- Base d8da3e4 → head 3b50142, verified 2026-10-29T15:00:55.966Z: PASS
- Verification report:
`agents/runs/needs-you-cleanup/verification-report.json` and
`agents/runs/needs-you-cleanup/verification-report.md`; source
fingerprint
28ed3f64104feb33b697bca11cdfec8b1040f9f5096c50619ae3a86966059250
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity (77d2707, follow-ups on 119d783 and 70ddb04): Fix now
B3 decision answered from the map stayed in 내 차례 (fixed, 6f2032c) and
stale `! N` docs (fixed, 119d783); Follow-up ☆ on a root held only by
a raised descendant and phone/Overview without `외 N건` stand for the PRD
owner; 70ddb04, def38d8 (gallery) and 3b50142 (e2e expectations):
no Fix now; optional Follow-up: assert the Conductor row in the tree's
raised 내 차례 band and the first needs_you row by pane in e2e.
- Code (77d2707, follow-ups on 119d783 and 70ddb04): Fix now
put-away record ask still listed in 할 일 (fixed, bd989fc) and thin core
tests (added, 86887cb); Follow-up relay cost, laid-ask stamp, answered
decision, legacy date and diagnostics order fixed (6f2032c, bd989fc,
71cfa43); sync race found on follow-up fixed (70ddb04); 70ddb04
and def38d8 (gallery): no Fix now or Follow-up; 3b50142 (e2e
expectations): no Fix now, Follow-up: `session-panel.spec` no longer
pins which 내 차례 row sorts first (pin it in a `Tasks::settle` test).
- Evidence: 2 registered (2 screenshot); paths are local to the run
directory
  - agents/runs/needs-you-cleanup/screens/session-panel-dark.png
  - agents/runs/needs-you-cleanup/screens/session-panel-light.png
- Changed paths: 66 (see Files changed)
- Delivery: mode pr, branch `gen-prd/needs-you-cleanup`, base `main`

</details>
yansfil added a commit that referenced this pull request Oct 30, 2026
…s and a Windows Node warm-up (#1863)

Closes with-hide/hide-private#331
Closes with-hide/hide-private#332
Closes with-hide/hide-private#333
Closes with-hide/hide-private#338
Closes with-hide/hide-private#329

## Summary

Six flaky tests in five crates came from three causes, and each is fixed
once for its class.
- Tests read through a product time budget they are not about: Memory
reads were cut at the hook's 100 ms and returned no cards, and the usage
store's 250 ms step cut a 40,000-row prune.
A Memory read now has no deadline of its own (the 100 ms stays in the
hook alone), and the usage store's tests hold its clock still.
- Fixture `git` read the account's settings, so a commit failed whenever
the commit-signing agent did not answer; the fixtures now read no global
or system git file.
- The Windows Node test warmed Node with `--version`, which skips most
of Node's start, so the guarded run still paid the slow first start; the
warm-up now runs the same script.

Per issue:

| Issue | Handling |
| --- | --- |
| #331 usage store prune | Cause fixed: store budgets measured on an
injected clock; store tests open it on a still one |
| #332 herdr-core memory tests | Cause fixed: `MemoryStore::retrieve`
has no deadline; memory_hook tests use `answer_until` with a still clock
|
| #338 hide-memory store tests | Same cause as #332, same fix; the store
and hook tests in its latest comments read through
`retrieve_with_expiry`, which no longer adds a wall clock of its own |
| #333 hide-host fixture commit | Cause fixed:
`GIT_CONFIG_GLOBAL=/dev/null`, `GIT_CONFIG_NOSYSTEM=1`; four other
fixtures with the same inheritance too |
| #329 hide-kit Windows Node | Cause fixed: the first start runs the
guarded script, not `--version` |
| #334 omp observed false | Stays open by the lead's decision: the
helper's 1.2 s send budget is in another process; the failure now prints
the time, the recorded cause and the stand-in's calls |

The Windows process end (with-hide/hide-private#327) was in this pull
request and moved to a pull request of its own; its commits here are
taken back out, so `hide-platform`, `hide-ai`'s omp test and its
documentation are as on main.

스크린샷 없음: no screen changes.

## Review

- **조심해서 볼 파일**:
- `hide-memory/src/store.rs`, `hide-memory/src/hook.rs` -
`RetrievalQuery.deadline` is removed. The product's only Memory reader
is the hook (`hook::context_for` and `herdr_core::memory_hook::answer`,
both through `hide_memory::hook::within_hook_budget`, which adds the 100
ms); every `retrieve` call left is in a test.
- `herdr-core/src/usage_ledger/store.rs` - `Store` carries `clock: fn()
-> Instant`; `open` passes `Instant::now`, so product timing is
unchanged.
- `hide-host/src/worktrees.rs` and four test fixtures - git runs with no
global or system configuration file.
- **질문**: #329's readying pays Node's first full start before the 30 s
guard; the test is about the environment the kit hands Node (it aborts
without `SystemRoot`), not its start time. If a cold first start is ever
the operator's own concern, that is a separate product issue.

## Evidence

- **확인한 것**:
- Local macOS at load 30 to 84: `hide-memory --lib` 205/205 four times
(the parallel run that failed in #338), `hide-host --lib` 154/154,
`herdr-core --lib` usage_ledger, memory_hook, project_memory,
memory_analysis and real_agent_trust 135/135, `hide-agent-hooks`
adapter_contract and codex_binary 6/6.
- Windows CI on 7af7724 and 6fe4f39: every Rust suite of `windows
check` passed, including the hide-kit Node test (#329).
- `clippy --all-targets -D warnings` clean for hide-memory, herdr-core,
hide-host, hide-kit, hide-agent-hooks, hide-ai on macOS.
- **확인하지 못한 것**:
  - Windows tests run only on PR CI; this Mac cannot run them.
  - #334 is not fixed; it fails less silently.
- `windows check` failures seen on this branch were outside its diff:
two web unit tests timing out at 5 s together (open
with-hide/hide-private#354, commented there) and a web unit suite that
could not rename a fixture program another worker built (filed as
with-hide/hide-private#371).
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