Repository navigation
Remove the desktop fixtures' removal retries by ending what holds the folder - #466
Merged
Merged
Conversation
… retrying the removal The fixture root, the device-kit bridge and the remote-workspace bridge were removed with a 10-try retry. The daemon keeps its bridge sockets until it exits, so each folder is now removed after that exit is confirmed, and on Windows the fixture root after the processes running from it are ended.
… test The test's child_process mock accepted only the compiler, so the Windows cleanup's process-ending call reached it as an unexpected command. The test now replaces that call at its own boundary, refuses any call but one with no owned processes on an existing folder, and asserts the root is the argument on Windows and that nothing is ended elsewhere or for a preserved home.
This was referenced Oct 5, 2026
# Conflicts: # desktop/e2e/fixture-cleanup.unit.ts
yansfil
added a commit
that referenced
this pull request
Oct 5, 2026
…ch removal (#483) Related: #466 (the same rule for the desktop fixtures) ## Summary The package smoke script removed its scratch folder with `rmSync(..., maxRetries: 5, retryDelay: 500)`, which waits for whatever still holds a file instead of knowing it ended. It now records the pid of every daemon it starts (`hide connect`, and the one that replaces it), and after `hide stop` and the existing `status` check waits up to ten seconds for those pids to be gone before the folder is removed. A daemon still running then fails the run with its pid; the removal itself has no retry. ## Review - **판단해 주세요**: the wait covers the daemons the run started, by pid (`process.kill(pid, 0)`); it does not enumerate other processes under the folder. - **질문**: #466's `endWindowsProcesses` is TypeScript with extensionless imports, which a `.mjs` script cannot load, so it is not reused here; say if you want the Windows tree end ported to a script both can import. ## Evidence - **확인한 것**: `node --check`, desktop lint; the wait helper run against a real process that exits (returns) and one that does not (named failure with its pid). - **확인하지 못한 것**: the script itself (it refuses macOS); the `package` lane on this PR runs it on Windows and Linux and is the check.
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
Oct 5, 2026
## Summary `desktop e2e` (macOS) is the longest job of a verify run and the last to finish in 16 of the last 25 successful runs, so it sets the time `verify` takes (job median 13.8 minutes). Its `Remote mailbox over private SSH` step took 2.1 minutes of that (median 126 s: about 57 s compiling the workspace again under the test's feature set, about 53 s for the one test). The macOS `@platform` web e2e job also holds a macOS runner, builds hided and fetches the pinned Herdr, and finishes earlier (median 9.0 minutes). This moves the lane there: `web-e2e.yml` takes a `remote-mailbox` input, which builds the CLI (`verify-cargo.sh cli`, every binary the lane starts) instead of `build -p hided` and runs the same nextest command after the suite; `pr.yml` sets it for the macOS lane and drops the step from `desktop e2e`. The OS contract's macOS leg stays in `desktop e2e`. ## Review - **판단해 주세요**: the lane now runs when `web-e2e-platform` is planned instead of `desktop-e2e`. On the last 80 merged pull requests that is 62 runs instead of 59 (table below); `ci-plan.py` gets a comment that a narrower `web-e2e-platform` rule would drop the lane. - **판단해 주세요**: the mailbox test resolves dependency features differently from the CLI build, so about 48 dependencies build a second variant that the macOS web e2e cache (saved from `build -p hided`) does not hold: about 25 s per run on this pull request's run. rust-cache saves only when its key changes, and the key hashes `Cargo.toml` and `Cargo.lock`, so main's first run after the next manifest change saves both builds; until then the 25 s stays. - **조심해서 볼 파일**: `.github/workflows/web-e2e.yml`, the reusable lane nightly and the Linux and Windows lanes also call; with the input unset (its default) their steps and cache keys are unchanged. ## Evidence - **확인한 것 (plan)**: `ci-plan.py` (main, after #490) over the file lists of the last 80 merged pull requests (#371-#492): | | before (in `desktop-e2e`) | after (in `web-e2e-platform`) | | --- | --- | --- | | pull requests running the mailbox lane | 59 | 62 | | lose it | | #462, #466, #487: only `desktop/` files, which the lane does not read | | gain it | | #381, #383, #429, #444, #447, #488: `web/e2e` specs tagged `@platform` | - **확인한 것 (catches)**: of 232 failed `pr.yml` runs since 2026-09-05, the mailbox step failed in 2 (#409 `prd/hcoord-retire`, #456 cargo `typify` bump); both plan every lane, so both still run it. - **확인한 것 (before)**: medians of the last 22 successful verify runs: `desktop e2e` 13.8 min, its mailbox step 126 s; `web e2e macos` 9.0 min (build 88 s, End-to-end 382 s). - **확인한 것 (after)**: this pull request's verify run [37288613490](https://github.com/modakbul-gongbang/hide/actions/runs/37288613490) (first commit; the second only removed a cache `key` line rust-cache ignores next to `shared-key`): | | before (median, n=22) | after (this run) | | --- | --- | --- | | `desktop e2e` | 13.8 min, mailbox step 126 s | 12.2 min, no mailbox step (its suite step took 518 s against a 494 s median) | | `web e2e macos` | 9.0 min | 11.3 min: CLI build 91 s (was `build -p hided` 88 s), suite 383 s, mailbox step 128 s (compile 82 s of which about 25 s dependency variants, test 43 s) | | macOS job-minutes for the two | 22.8 | 23.5 | Second run, on the squashed commit, [37290394720](https://github.com/modakbul-gongbang/hide/actions/runs/37290394720): `desktop e2e` 12.0 min, `web e2e macos` 12.6 min (CLI build 99 s, suite 386 s, mailbox step 170 s), `verify` 13.4 min. The two macOS jobs now end within a minute of each other (12.0-12.6 against 13.8 and 9.0), so the macOS ceiling of a run drops by about 1.5 minutes, and by about 25 s more once the cache holds the dependency variants. - **확인한 것**: `python3 -m unittest discover -s scripts/tests` passes (125 tests); both workflow files parse. - **확인하지 못한 것**: the warm steady state of the macOS web e2e job is seen only after main's first run saves the new cache; the first pull-request runs after merge are that measurement.
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: #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
fixture-cleanup.unit.ts5개 통과(macOS)./tmp와sh를 쓰는 Unix 전용 spec이라 Windows 변경은fixture.ts의 root 정리뿐이다. 이 PR의 Linux/macOS desktop e2e가 순서 변경을 확인한다.