Repository navigation
End what a fixture's Windows processes started after they were listed - #607
Merged
Merged
Conversation
A fixture lists hided's and Herdr's process tree while they run, kills them, then ends the listed processes and anything run from its root. A child the owner started after the listing was missed: hided starts a provider suspended and puts it in its kill-on-close job before resuming it, so one started as the daemon was killed stays suspended outside any job, keeps the fixture's claude.exe locked, and the root could not be removed (EPERM). endWindowsProcesses now also ends every process an owned one started, found by parent pid and start time after the owner is gone, and stops what is left on every pass.
This was referenced Oct 6, 2026
yansfil
added a commit
that referenced
this pull request
Oct 8, 2026
Related: yansfil/sasu#30 (`/ship merge`가 이 검사를 매 머지마다 돌리고 출력을 보여 주게 하는 쪽) ## Summary Hide와 GitHub은 PR과 이슈를 `Closes #N` 같은 closing keyword로만 잇는데, 10-06~07에 이슈를 끝낸 PR 7개(#607 #612 #614 #622 #631 #634 #712)가 이 줄 없이 머지됐고 이슈는 손으로 닫혀 연결이 남지 않았습니다. 이제 `scripts/premerge-check.py`가 닫는 이슈가 없는 PR에 머지 명령 바로 위에서 알림을 한 줄 찍습니다. 막지는 않습니다. 이슈 없이 시작한 PR(PRD 작업, CI·문서 변경)도 많기 때문입니다. ``` note: #454 closes no issue. If it finishes one, put `Closes #<issue>` on the body's Closes line before merging (editing the body does not rerun `verify`); with no issue, merge as it is. #454 may merge now: gh pr merge 454 --merge --match-head-commit a1eda76... ``` ## Review - **판단해 주세요**: 알림만 하고 막지 않는 수준이 맞는지. 막으려면 "이슈 없음"을 PR 본문에 명시하는 규칙이 따로 필요합니다. ## Evidence - **확인한 것**: 실제 PR로 실행. 이슈를 닫는 #781에는 알림 없음, 닫는 이슈가 없는 #454에는 위 알림이 찍히고 머지 가능 판정은 그대로. - **확인한 것**: `test_premerge_check.py`에 알림 유무 테스트 1개 추가, `scripts/tests` 206개 통과, `check-no-attribution` 통과. - **확인하지 못한 것**: PR을 만드는 순간의 알림은 없습니다. 머지 직전에만 알려서, 그때 본문을 고치는 흐름입니다.
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 #581
Summary
In #581's first attempt,
herdr.stop()ended Herdr's tree and everything run from the fixture root, confirmed none was left, and 0.8 s after the server exitedrmSyncfailed withEPERM unlink ...\bin\claude.exe: something still had the fixture'sclaude.exeloaded.The fixture lists a process tree while its owner runs, kills the owner, then ends the listed processes; a child the owner starts after the listing is in no list.
hided starts each provider child suspended, puts it in a kill-on-close job, then resumes it (
OwnedChild::spawn); killed between the start and the job, the child stays suspended outside any job for good, holdingclaude.exe. The restarted daemon's log ends on a usage probe of the provider list (codex, then claude) as the test stopped it.endWindowsProcessesnow also ends every process an owned one started, found by parent pid and start time after the owner is gone, and stops what is left on every pass, not only the first.Review
web/e2e/platform-fixture.ts- a child is taken for an owned process's when it names that pid and started after it, unless a live process holding that pid started before the child (then that one is its parent): this keeps the PowerShell running the check, which can be given a just-freed owned pid, and its console host out of the kill.OwnedChild::spawnhas the same window (an owner killed betweenCreateProcessandAssignProcessToJobObjectleaves a suspended child); in the product the owner is hided itself, killed only by a crash or a forced stop. Worth its own issue?Evidence
herdr exitingat 00:08:29.65, the test failed at 00:08:30.50 afterendWindowsProcessesreturned clean; the fixture'sclaude.exeruns as the two agents (Herdr's tree) and as hided's provider (hided's tree, and the root path check); hided's log for that attempt ends onprovider_usage codex credentials_missing, the probe that runs just before claude's.desktop/e2e/windows-processes.unit.tsstartscmd.exerunningping, lists onlycmd.exe, kills it, and requiresendWindowsProcessesto end thepingit started; it runs in the Windows check lane (desktop test) and is skipped elsewhere. The old function ended only the listed processes and those run from a root, sopingwould have run on (read from the code, not run).pnpm --dir desktop lint,pnpm --dir desktop typecheckandpnpm --dir web lintpass locally; the PowerShell runs only on Windows, in this run.claude.exe. The change ends any process an owned one started, which covers it whatever its state.