Repository navigation
End MSVC's telemetry helper before the first Windows e2e test - #559
Merged
Merged
Conversation
vctip.exe outlives the build that started it and still names an exited linker as its parent. When Windows gives that pid to a pane's shell, the pinned Herdr counts the helper as the shell's child and refuses agent start there as busy. globalSetup now ends every vctip.exe after the run's last compile, confirms each exited, and prints the pids.
This was referenced Oct 5, 2026
yansfil
added a commit
that referenced
this pull request
Oct 6, 2026
…ms (#603) Refs #583 #538 #593 ## Summary Three Windows flakes failed the same way inside `startHerdr`: the first agent start waited ten seconds and Herdr kept answering `agent_pane_busy` for a shell that held the terminal alone. In each, the one "child" of the shell was `csrss.exe`: #583 shell 736 -> 748, #538 shell 728 -> 740, #593 shell 7768 -> 7784. `csrss.exe` names as its parent the `smss.exe` that started it and exited, Windows gave that pid to the pane's shell, and the pinned Herdr counts a shell's children by parent pid alone, so the pane refuses agents for as long as `csrss.exe` runs (until shutdown). `hide-children.exe` now prints each child's start time and whether it started before the parent, and `startHerdr` replaces its two panes once when a process older than a shell names it as parent. ## Review - **판단해 주세요**: the replacement is a resource swap on a detected state, not a wait or a retry of the start: it acts only on "a process that started before the shell names the shell's pid as parent" (start times, any name), at most once, logs one line, and a claimed replacement fails setup with each process's pid, start time and name. - **판단해 주세요 (product)**: a real Windows user whose pane shell gets such a pid has agent start refused in that pane the same way; Herdr's `agent start` takes no start time into account, so this is an upstream candidate. - **조심해서 볼 파일**: `web/e2e/herdr-fixture.ts` - the new workspace is opened while the claimed shells still hold their pids, so no new shell can be given one of them, and the claimed workspace is closed after; the two agent starts now come after both panes are ready instead of between them. - **조심해서 볼 파일**: `web/e2e/shims/hide-children.c` - `OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION)` and `GetProcessTimes`; a process Windows does not answer for is `unknown`, never `older`. ## Evidence - **확인한 것**: the three runs' logs ([37391023049](https://github.com/modakbul-gongbang/hide/actions/runs/37391023049), [37352769077](https://github.com/modakbul-gongbang/hide/actions/runs/37352769077), [37403137691](https://github.com/modakbul-gongbang/hide/actions/runs/37403137691)) each fail at `startAgentAtShell` called from `startHerdr` (herdr-fixture.ts:670) with `children of shell N: M csrss.exe`; the fourth case of this failure, #549, was `vctip.exe` and #559 already ends it. - **확인한 것**: `pnpm --dir web lint` (eslint and the e2e size budget) and `pnpm --dir desktop typecheck` (which compiles the web fixture through the desktop e2e) pass. - **확인하지 못한 것**: the replacement branch itself: it runs only when Windows hands a shell a claimed pid, which cannot be arranged on a runner. This run shows the check on every Windows `startHerdr` finding nothing to replace and the lanes passing; `hide-children.c` compiles only on Windows, in this run.
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.
Refs #549
Summary
Windows e2e에서
startAgentAtShell이 "the shell of pane w1:p2 never held the terminal alone before agent start"로 실패하던 원인을 없앱니다. e2e 실행이 첫 test 전에 MSVC 도구가 남긴 telemetry helper(vctip.exe)를 끝냅니다.vctip.exe를 남깁니다. 이 job의 cargo build 단계도 남겼고, runner가 job 끝에Terminate orphan process: pid (972) (vctip)로 정리했습니다. cargo만 도는 Windows job(windows check, os contract)도 같은 줄을 남깁니다.cmd.exe(pid 5828)가 그 pid를 받아,hide-children.exe가 shell의 자식으로972 vctip.exe를 보고했습니다.agent.start(available_pane_shell)는 shell의 자손을 부모 pid만으로 세고 생성 시각을 보지 않습니다. 그래서pane process-info가 shell 단독이라고 답하는 동안에도agent_pane_busy로 거절했고, helper가 사는 동안 계속 거절합니다.web/e2e/platform-fixture.tsendVctip: 이름이vctip인 process만 끝내고, 각각 끝났는지 handle로 기다려 확인합니다(5초 안에 끝나지 않으면 이름과 함께 실패). 끝낸 pid를 돌려줍니다.web/e2e/global-setup.ts: Windows에서 shim build 뒤에endVctip을 부르고 끝낸 pid를 log에 남깁니다. globalSetup은 job의 모든 compile(cargo build 단계, shim build) 뒤에 돌고 test는 compile하지 않으므로, 이 한 곳이 두 출처를 모두 덮습니다.docs/TESTING.md: Windows agent start 항목에 이유를 적었습니다.Review
vctip.exe를 끝냅니다. telemetry helper일 뿐이고 같은 pid 재사용 위험이 로컬에도 있어서 CI로 한정하지 않았습니다.SQM\OptIn=0)뿐이고vctip실행을 막는다는 말은 없습니다.VSCMD_SKIP_SENDTELEMETRY는 VsDevCmd script의 telemetry용입니다. 그래서 끄는 대신 끝냅니다.web/e2e/global-setup.ts- web과 desktop e2e의 공통 entry point입니다. Windows 밖에서는 동작이 바뀌지 않습니다.Evidence
agent_pane_busy답,children of shell 5828: 972 vctip.exe였습니다. 같은 job 끝 정리에서vctippid 972가 유일한 orphan이었습니다.src/platform/windows.rs의available_pane_shell_from_snapshot은descendant_entries가 비어 있을 때만 shell을 받고,descendant_entries는th32ParentProcessID로만 자식을 찾습니다.ended vctip.exe <pid> before the first test가 남는지로 확인합니다.