Repository navigation
Run fake gh, tailscale and usage provider as Node scripts on Windows - #436
Merged
Merged
Conversation
yansfil
marked this pull request as draft
October 5, 2026 02:04
yansfil
added a commit
that referenced
this pull request
Oct 5, 2026
## Summary Rust 테스트 몇 개가 상태 대신 wall-clock 추측을 기다려서 부하에서 거짓 실패했습니다. CI에서 3회 실패한 `process.rs` 테스트의 기한을 고치고, router, usage, pane control 테스트는 sleep 대신 채널, gate, 로그 이벤트를 기다리게 바꿨습니다. 제품 코드는 바뀌지 않았고, 새 `@flaky`나 `ignore`도 없습니다. - `hide-platform/tests/process.rs`: 속도를 검사하지 않는 launch 테스트(`repeated_guarded_work...`, `only_a_guarded_launch...`, `guarded_capture_keeps_stdin...`, `capture_reports_the_callers_byte_limit...`, 자식 안의 `guarded_owner`)의 기한 1850ms가 test binary 기동 시간까지 물었습니다. 이 다섯 곳을 `HANG_LIMIT`(30초, 자식 기동을 기다리는 `ready_number`와 같은 기준)으로 바꾸고, 기한을 그대로 다시 단정하던 `elapsed < 1850ms` 한 줄은 지웠습니다. 기한 계약을 검사하는 두 테스트(300ms 파이프 기한, 200ms 비협조 launch)는 그대로입니다. - `hide-platform/tests/ipc.rs`: #401이 고친 `a_burst_of_clients...`에 남아 있던 macOS `ignore`(닫힌 #396)를 지웠습니다. #401 본문이 "나중에 머지되는 쪽이 ignore를 지운다"고 했는데 PR A가 뒤에 머지되며 남았습니다. - `hide-ai/src/router.rs`: leader를 `Held` backend와 `Gate`로 붙잡고, joiner가 붙었다는 `ai.request.joined` 로그를 condvar로 기다립니다. 쓰지 않게 된 `Scripted.delay`를 지웠습니다. 같은 모양인 `concurrent_duplicates_share_one_provider_call`도 함께 바꿨습니다. - `herdr-core/src/usage.rs`: worker가 시작과 응답 시점을 채널로 알리고, 테스트가 응답을 놓아 줍니다(60ms sleep 제거). - `herdr-core/src/live.rs`: pane control spawn 테스트는 Herdr가 답을 붙잡고 있는 동안 spawn이 돌아오는지를 봅니다(500ms 지연과 100ms 상한 제거). ## Review - **판단해 주세요**: `process.rs`의 1850ms를 30초로 바꾼 것이 "기한을 늘려 통과시키기"가 아니라고 보는지. 이 테스트의 oracle은 자식 수이고 기한은 멈춘 자식을 끝내는 용도입니다. - **판단해 주세요**: `live.rs` `next_wheel...`의 `recv_timeout` 50ms를 1초로 넓혔습니다. 터미널 frame을 보내지 않으므로 wheel이 도착하는 것 자체가 "frame을 기다리지 않음"의 증명이지만, 1초 미만 timer가 생기는 회귀는 이제 못 잡습니다. - **조심해서 볼 파일**: `hide-ai/src/router.rs` - 테스트 helper(`Gate`, `Held`, `Recorder::wait_for_events`)가 새로 생겼고, 각 대기에는 실패 경로로만 쓰는 30초 한도가 있습니다. - **고쳐지지 않은 항목은 아래 "확인하지 못한 것"에 이유와 함께 있습니다.** ## Evidence - **확인한 것**: - `process.rs`: 자식 기동을 2초 늦춘 임시 패치(커밋 안 함)에서 수정 전 launch 테스트 4개 모두 실패, 수정 후 모두 통과. - `ipc.rs`: ignore 없이 부하(`taskpolicy -b` + `yes` 4개) 하에서 150회, 같은 테스트를 `--ignored`로 300회 통과. - `process.rs`: `taskpolicy -b`와 `yes` 4개 부하(살아 있음을 매 회 확인)에서 수정 전 실패 CI와 같은 `Deadline` 오류가 재현됐습니다. 수정 전 5/100 (그 전에 부하가 더 높았던 구간은 8/20), 수정 후 2/120. 주변 부하에 따라 크게 흔들려서 이 수치는 방향만 보여 줍니다. 수정 후 남은 실패는 아래 "확인하지 못한 것"의 hang입니다. - `scripts/verify-cargo.sh`로 `fmt-check`, `clippy -D warnings`(hide-ai, herdr-core, hide-platform), `hide-ai --lib` 44개, `herdr-core --lib` 1368개, `hide-platform --test process` 32개 통과. - 새 `std::thread::sleep`은 추가하지 않았습니다. - **확인하지 못한 것**: - **남은 실패는 기한이 아니라 제품의 hang입니다.** 부하에서 자식이 결과를 출력한 뒤 `OwnerWatch` drop의 `reader.join()`에서 11초 넘게 멈춥니다(상태 `SN`, CPU 0.01초, reader는 `recvfrom`). 30초 기한으로도 같은 곳에서 실패하고, #436 macOS job의 `only_a_guarded_launch...` 실패(출력에 `GUARDED true`가 있음)도 이 모양이라 이 PR은 그 실패를 고치지 못합니다. 주변 부하가 내려가자 재현이 사라져(0/520) 원인(shutdown과 25ms 수신 타임아웃이 둘 다 reader를 못 깨우는 이유)은 확정하지 못했습니다. issue 초안은 로컬에 있고 등록 전 확인을 기다립니다. - router, usage, live, handshake, watch, session_sync는 같은 부하에서 수정 전에도 0/30~120으로 흔들림이 재현되지 않았습니다. router, usage, live는 읽기로 판단한 위험이고, 순서를 테스트가 정하게 바꾼 것이라 근거를 읽기에 둡니다. - 수정하지 않은 항목: - `hided/tests/handshake.rs:1083` (750ms): watcher가 준비됐다는 제품 신호가 없어서 결정적으로 고치려면 신호를 제품에 추가해야 합니다(설계 판단). - `hided/tests/real_herdr.rs:440` (2초): 셸이 키를 읽을 준비가 됐다는 신호가 없습니다. 이 테스트는 `#[ignore]`이고 고정 Herdr 바이너리가 필요해서 이 세션에서는 돌리지 못했습니다. - `hide-platform/tests/watch.rs`: 부하에서 재현되지 않았습니다(15회). `QUIET`/`ARRIVES`는 OS 감시 이벤트 타이밍이라 결정적으로 만들 수 없는 범위입니다. - `herdr-core/src/github.rs:2282`: gh 기한 3초가 제품의 기한 계약을 검사하는 테스트라서 건드리지 않았습니다. 1초 가짜 `gh`는 이미 `FIXTURE_DEADLINE` 10초로 바뀌어 있습니다. - `herdr-core/src/session_sync/tests.rs`의 `wait_until` 3초 세 곳: 재현되지 않았고, 고치려면 기한을 늘리는 것뿐이라 두지 않았습니다. - `labels/generator.rs:213`은 시계 대기가 아니라 fork가 lock 파일을 물고 있던 문제이고 1032f883으로 이미 고쳐졌습니다. - Linux와 Windows CI는 이 세션에서 돌리지 못했고, 로컬 macOS 기준입니다.
…y system The fakes were /bin/sh scripts, which Windows cannot run, and their PATH was joined with ':', which splits a drive letter, so the daemon found no gh and showed empty pull requests, issues and usage. One compiled launcher now runs the script that shares its name.
…ng the fake tailscale folder
yansfil
force-pushed
the
ci/windows-e2e-fake-programs
branch
from
October 5, 2026 04:54
8440069 to
a346527
Compare
yansfil
marked this pull request as ready for review
October 5, 2026 04:54
This was referenced Oct 5, 2026
yansfil
added a commit
that referenced
this pull request
Oct 5, 2026
… folder (#466) Related: #436 리뷰의 후속(같은 원칙: 소유한 것을 끝낸 뒤 정리, 맹목 재시도 금지). ## Summary desktop e2e fixture의 `fs.rmSync(..., maxRetries: 10, retryDelay: 100)` 3곳을 없앤다. 재시도 대신 폴더를 붙들고 있는 것을 끝낸 뒤 지운다. - `fixture.ts` 격리 root: Windows는 `endWindowsProcesses([], root)`로 root 아래 실행 파일로 뜬 프로세스를 끝낸 뒤 지운다(`hide stop`이 이미 확인된 뒤다). - `device-kit.spec.ts`, `remote-workspace.spec.ts`의 bridge 폴더: daemon이 종료 전까지 bridge 소켓을 붙들고 있다. 새 `endChild`(SIGTERM 뒤 exit 확인, 10초 안에 안 끝나면 pid를 적어 실패)로 daemon 종료를 확인하고, device/local fixture를 멈춘 뒤 지운다. 기존에는 daemon 종료 전에 지웠다. ## Review - **조심해서 볼 파일**: `desktop/e2e/fixture.ts` - `endChild`와 정리 순서(daemon 종료 확인, fixture stop, 폴더 삭제). `endChild`가 실패하면 폴더를 지우지 않고(소유자가 안 끝났다) fixture는 `finally`로 멈춘다. - **질문**: `desktop/scripts/smoke-package.mjs:320`에도 `maxRetries: 5`가 있다. 패키지 smoke의 scratch 폴더라 이번 범위(e2e fixture)에서 뺐다. 같이 고칠까? ## Evidence - **확인한 것**: desktop typecheck, lint(크기 검사 포함: remote-workspace test는 줄 수가 늘지 않아 기준선 그대로), `fixture-cleanup.unit.ts` 5개 통과(macOS). - **확인하지 못한 것**: Windows 실행. device-kit과 remote-workspace는 `/tmp`와 `sh`를 쓰는 Unix 전용 spec이라 Windows 변경은 `fixture.ts`의 root 정리뿐이다. 이 PR의 Linux/macOS desktop e2e가 순서 변경을 확인한다. - **확인하지 못한 것**: 리뷰 subagent는 돌리지 않았다(작은 변경, 검토자 리뷰로 대신).
yansfil
added a commit
that referenced
this pull request
Oct 5, 2026
…ult (#490) Related: the unclassified-paths table (reviewer decision), #486 (separate branch; both touch `ci-plan.py`'s neighbours, the second to merge resolves a small conflict in `test_ci_plan.py` and `TESTING.md`) ## Summary `ci-plan.py` sent every path no rule claimed to every lane, so 42 of the last 80 merged pull requests (52%) ran all ten. This names the paths whose readers are known and leaves every other path on "every lane": `POLICY_ONLY` (no lane reads it: `agents/`, `site/`, `tools/`, `spikes/`, `.gitignore` files, PR template, workflows `pr.yml` does not call, `scripts/tests/`, the policy, design, release and measurement scripts, Markdown below an unclaimed folder) plans `policy` alone, and `NAMED_LANES` (fixtures, Playwright, eslint and vitest configs, `web/scripts`, `desktop/scripts`) plans the lanes that read it. A path that is not named, including any new one, still plans every lane. ## Review - **판단해 주세요**: `web/e2e` files that are not specs plan `web-checks`, `web-e2e`, `web-e2e-platform`, `windows-e2e`, `desktop-checks`, `desktop-e2e`, `windows-check` (desktop suites import them, `desktop/e2e` unit tests run in `windows-check`); they drop `rust` and `os-contract` only. - **판단해 주세요**: `scripts/ci-plan.py` stays on every lane although the table listed it as `policy`: it decides the plan for every later pull request, and `policy` runs its tests but not what a wrong rule would skip. - **판단해 주세요**: lockfiles, `package.json`, `Cargo.lock`, `contracts/`, `verify-*.sh`, `ci-flaky-report.py` and the three workflows lanes use stay full (the table's class where full is right). - **조심해서 볼 파일**: `scripts/ci-plan.py` (`POLICY_ONLY`, `NAMED_LANES`, `named_lanes`) and `scripts/tests/test_ci_plan.py` (`NamedPaths`, including a check that no `POLICY_ONLY` script is named by a lane's workflow job or the scripts those jobs run). ## Evidence - **확인한 것**: `scripts/tests` suite passes (27 plan tests; a case per named path, one that every unnamed and shared path is still full, one that a named path does not narrow a plan with another reason, and the reader check). - **확인한 것**: the changed plan run on the file lists of the last 80 merged pull requests (#355-#483) against main's plan: | | before | after | | --- | --- | --- | | pull requests planning every lane | 42 | 19 | | pull requests whose plan changed | | 20 | | lane runs (sum over the 80) | 683 | 585 (-14%) | | lane | PRs running it before -> after | | --- | --- | | policy | 80 -> 80 | | rust | 76 -> 59 | | web-checks | 63 -> 51 | | desktop-checks | 47 -> 39 | | os-contract | 65 -> 48 | | windows-check | 65 -> 58 | | windows-e2e | 71 -> 61 | | web-e2e | 78 -> 68 | | web-e2e-platform | 71 -> 61 | | desktop-e2e | 67 -> 60 | No pull request gained a lane. - **확인한 것**: lanes that caught a failure keep it. Of the 300 most recent `pr.yml` pull-request runs, 73 failed; 72 had a failing lane (the other failed in `verify` only). Each run's failing lane was checked against the new plan for that pull request's file list (the run's own diff where the pull request is still open, the final file list for merged ones, so earlier pushes can differ). The lane stays planned in 68 of 72. The four that would not run it, and why they are not catches: - #466 (2 runs): `windows-e2e` failed on `s2.spec.ts:55` and `less`, a main failure (#475, #424) that the pull request, which touched four `desktop/e2e` files, did not cause. The new plan runs `desktop-checks`, `desktop-e2e`, `windows-check`. - #366: `rust` and `windows-check` failed in `hided` and disk tests before nextest retries (#463) on a pull request that changed release scripts and docs only. - #369: README and SECURITY only; `windows-check` failed before path selection existed, and the current plan does not run it for those files either. The failures that were this pull request's own (#474 desktop-e2e, #436 windows-e2e, #439 web-e2e-platform, #385, #364) keep their lane. - **확인하지 못한 것**: the narrowing is judged on file lists, not by re-running CI; a pull request that changes a named file in a way that needs a lane left out is caught by main's full run, as before. <details><summary>CI 크기 (D3)</summary> `ci-plan.py` +77 lines (two tables and `named_lanes`), `test_ci_plan.py` +97, `TESTING.md` +5; no workflow changed. </details>
yansfil
added a commit
that referenced
this pull request
Nov 2, 2026
…#2015) ## Summary 미션 worker는 지금까지 미션 프로젝트가 있는 기기에서만 시작할 수 있었습니다. 이제 Conductor가 `--machine`으로 다른 연결된 기기에 worker나 checker를 띄울 수 있습니다. 조건은 두 가지입니다. 그 기기에 미션과 같은 GitHub 저장소의 프로젝트가 있어야 하고(GitHub repository id로 비교), 노드가 `delivery: pr`인 change 노드여야 합니다. direct 노드는 결과 브랜치가 그 기기에 남으므로 거절합니다. research와 verify 노드도 미션 기기에서만 돕니다. 그 기기 worker의 `check` 줄은 그 기기 checkout에서 기록됩니다. 그 기기가 연결되어 있는 동안에만 그 checkout의 head로 유지 여부를 판단하고, 연결이 끊기면 열린 상태로 보입니다. 거절은 원인별로 나뉩니다. spawn과, 다른 기기 에이전트를 노드에 새로 붙이는 `hide mission node --agent-id|--reviewer|--verifier`가 같은 규칙 함수(`admit_elsewhere`) 하나를 씁니다. ``` mission_machine_node_refused (노드 key) pr change가 아닌 노드: direct, research, verify mission_machine_unavailable 연결되지 않은 기기 mission_projects_loading 그 기기의 프로젝트 목록을 아직 읽는 중 mission_machine_no_repository 같은 GitHub 저장소의 프로젝트가 그 기기에 없음(GitHub 읽기 대기 포함) ``` 화면은 바꾸지 않았습니다(web/ 변경 없음). ## Review - **판단해 주세요**: 노드가 이미 붙들고 있는 다른 기기 에이전트는 다시 판단하지 않습니다. 그래서 기기가 잠시 끊겨도 같은 바인딩이나 무관한 replan은 막히지 않습니다. replan은 그 노드를 pr change가 아니게 바꿀 때만 거절합니다. - **판단해 주세요**: 미션 프로젝트 자신의 repository id를 GitHub가 아직 답하지 않았으면 `mission_machine_no_repository`로 거절하고, 안내문이 GitHub 읽기를 기다리라고 말합니다. - **조심해서 볼 파일**: `herdr-core/src/missions.rs` - 저장 형식. 미션 기기의 check는 지금처럼 `folder`에 저장합니다. 다른 기기의 check는 이전 빌드가 모르는 `remote_folder`(기기와 경로 한 쌍)에만 저장하고 `folder`는 비웁니다. 그래서 이전 빌드는 그 check를 열린 상태로 읽고, 그 빌드가 한 번 저장한 뒤에도 열린 상태로 남습니다. schema 버전은 그대로입니다. - **조심해서 볼 파일**: `herdr-core/src/runtime/missions.rs` - `admit_elsewhere`, 그리고 plan/node 명령의 판단. 모두 runtime lock 아래에서 메모리 속 기록만 읽으며, 하위 프로세스나 I/O는 없습니다. - **조심해서 볼 파일**: `herdr-core/src/runtime/projects.rs` - 기기별 GitHub 답 조회 `github_on` 하나를 두고, 단건 조회(`github_project_on`)와 전체 조회(`github_projects_on`)가 둘 다 이것을 씁니다. worktree 목록 조회와 `projects_loading`도 같은 곳에 있습니다. ## Evidence - **확인한 것**: 규칙마다 core 시험을 하나씩 두었습니다. - spawn: 거절 4종과, 같은 저장소일 때 허용(checker intent 포함). 다른 저장소(R_2)와 미션 저장소 id를 모를 때는 거절됩니다. - 바인딩: 미션 밖 다른 기기 에이전트도 spawn과 같은 규칙으로 거절됩니다. 이미 붙은 에이전트는 기기가 끊겨도 유지되고, direct로 바꾸는 replan은 거절됩니다. - check 유지: 그 기기 checkout의 head를 따라갑니다. 미션 기기의 같은 경로 checkout의 head가 바뀌어도 영향이 없습니다. 끊기면 open, 같은 head로 재연결되면 pass, 새 head면 open입니다. - 저장 호환: 이전 빌드 모양으로 읽고 저장한 뒤 다시 읽으면, 원격 check는 open이고 미션 기기 check는 pass가 유지됩니다. - **확인한 것**: 결함을 심어 시험이 잡는지 봤습니다. 심은 결함은 4가지입니다: 원격 경로를 `folder`에 씀, 끊긴 기기의 head를 씀, 바인딩 규칙 무시, replan 검사 제거. 결함마다 해당 시험이 실패했고, 나머지 미션 시험은 통과했습니다. - **확인한 것**: `9f99195e9`에서 미션 check 명령을 돌렸고 lint는 통과했습니다. 시험은 `memory_analysis::a_forked_session_counts_only_what_the_operator_said_after_the_fork` 하나만 실패했습니다(with-hide/hide-private#436). 이 시험은 시험만 바꾼 다른 브랜치에서도 2026-11-02 10:47Z부터 같은 값 `[3, 1]`로 실패하고, 이 diff는 그 모듈을 건드리지 않습니다. 그 시험 하나만 빼고 같은 명령을 다시 돌리면 7315개 통과, 실패 0개입니다. - **확인한 것**: 제품 코드 diff(시험, 문서, contract 제외)는 +241 / −56입니다. 시험은 +457입니다. - **확인하지 못한 것**: 실제 연결된 Mac/Linux 기기에서 미션 worker를 끝까지 돌려 보지 않았습니다. hided의 연결 노드 시험도 쓰지 않았습니다. 같은 저장소 판단이 GitHub repository id 읽기에 기대기 때문입니다. 원격 기기를 흉내 낸 core 시험으로 대신했고, `docs/INSTALL.md`에 "실제 미션 한 번으로 닫힘"이라고 남겼습니다. - **확인하지 못한 것**: Windows는 기기 노드가 없어 지원하지 않습니다(`docs/INSTALL.md` 지원표 줄). <details><summary>Verification record</summary> - base: `9305a846b` - head: `9f99195e9` - 미션 check 명령: lint 통과. test는 #436 한 개 실패. 그 하나를 빼면 7315 passed / 0 failed - 문서: `docs/delivery.md`(Missions의 spawn과 바인딩 규칙, Finish lines의 check 폴더), `hided/assets/mission/help.md`, `docs/INSTALL.md`(What each system supports에 한 줄) </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #432(머지됨, 이 PR의
fixtureProgram이 쓰는 worker당 1회 컴파일이 거기 있다). nightly Windows web e2e 실패 G1e.Summary
Windows에서 가짜
gh,tailscale, 사용량 provider가 실행되지 않아 PR, 이슈, 사용량, 모바일 화면이 비던 12건 중 9건의 원인을 고친다. 제품 코드는 바뀌지 않는다.#!/bin/sh스크립트라 Windows가 이름으로 실행하지 못하고,PATH를:로 이어 드라이브 문자(C:)가 갈라졌다. 그래서 daemon이gh를 못 찾았다.fixtureProgram(web/e2e/platform-fixture.ts): 가짜마다 Node 스크립트 하나. Windows는compileFixtureC로 worker당 한 번 컴파일한 런처 하나를name.exe로 복사해 같은 이름의name.js를 실행한다. 가짜마다 C를 따로 쓰지 않는다.checkout-pr,sidebar-pr-start,cmdk,overview,overview-prs,weekly-usage,mobile의 가짜를 옮겼고PATH는path.delimiter로 잇는다.Review
web/e2e/platform-fixture.ts- C 런처(인자 전달, 종료 코드, 경로 따옴표). Windows에서 컴파일해 본 적은 CI뿐이다./usage환경 문제를 제품 결함으로 볼지.Evidence
fixtureProgram이 만든 가짜가 인자를 받고 종료 코드를 돌려주는 것을 실행해 확인. 옮긴 스크립트는 지운 sh와 줄 단위로 대조 리뷰했다.@platform태그가 없어 PR의 Windows lane이 돌리지 않는다. Windows web e2e 전체는 required가 아니고, Linux/macOS 무회귀는 이 PR의 lane이 확인한다.weekly-usage는/usage자식이HOME PATH USER LOGNAME TMPDIR만 받아(hide-ai/src/claude.rsUSAGE_ENVIRONMENT) Windows의 node가SystemRoot없이 시작하지 못할 수 있다. 진짜 Claude CLI도 Node라 같은 위험이 제품에 있다. CI 결과로 확인하고, 실패하면 별도 결정으로 올린다.start-panel,agent-sleep,s8은 셸 스크립트와 무관하다(s8은 session 행 label에 nativeC:\경로, 앞의 둘은 agent 시작/잠들기가 Windows에서 안 됨). 이 PR 범위 밖이고 원인은 따로 조사한다.worktree-removing-menu.spec.ts의#!/bin/sh가짜git은 G1e 목록에 없어 그대로 둔다.