Repository navigation
Observe terminal input and announce Windows fixture readiness - #372
Conversation
…inal-input-readiness
…adiness # Conflicts: # web/e2e/s2.spec.ts # web/e2e/s7.spec.ts
|
origin/main(#361/#377)을 |
Related: #299, #377 ## Summary - macOS의 순차 클릭 40회가 보류 요청의 기존 5초 제한을 넘겨, coalescing 대신 unknown 이후 동작을 검증했습니다. - 같은 20쌍의 실제 Chromium 마우스 입력을 순서대로 묶어 보내 브라우저 왕복 지연을 제거합니다. - 실제 전송된 포커스 변경의 코어 수락을 확인한 뒤 gate를 해제해, 마지막 진단과 시각에 의존하던 판정을 교체합니다. ## Review - **조심해서 볼 파일**: `web/e2e/pane-focus-ordering.spec.ts` - 입력은 CDP의 실제 mouse events이며 DOM 이벤트나 dispatch를 대체하지 않습니다. - **비용 검토**: burst당 120개 입력 명령, 관측 프레임 64개, CDP 세션은 `finally`에서 해제합니다. - 단일 요청 상한, 마지막 pane의 실제 키 입력, Herdr 최종 포커스, 외부 포커스 추종 검증은 유지합니다. - 클릭 횟수, timeout, retry, skip, quarantine을 변경하지 않습니다. ## Evidence - **원인 확인**: 세 macOS 실패의 hided 로그 모두에서 첫 요청이 5001~5002ms에 unknown으로 끝난 뒤 클릭이 계속됐습니다. - [#372 실패](https://github.com/modakbul-gongbang/hide/actions/runs/37179805703/job/111370084688), [#373 실패](https://github.com/modakbul-gongbang/hide/actions/runs/37179682304/job/111369954345), [#378 실패](https://github.com/modakbul-gongbang/hide/actions/runs/37179657967/job/111369590200)의 원본 로그와 artifacts를 보존했습니다. - **macOS 실제 동작**: 격리된 pinned Herdr/hided/Chromium에서 두 focus 사례가 통과했습니다. rapid 12.6s, unknown 14.4s. - held burst의 마지막 코어 수락은 첫 요청 후 251ms였고, 첫 요청은 526ms에 superseded, 최종 pane은 confirmed로 끝났습니다. - `scripts/verify-web.sh` PASS: web 904개, desktop 99개, hcoord unit 59개/e2e 36개와 typecheck/lint/build. - `scripts/verify-cargo.sh cli`, design contract, workstation identity, attribution 검사 PASS. 모든 격리 실행 프로세스를 정리했습니다. - **미실행**: Linux E2E, 전체 Rust suite, native QA. PR의 필수 `verify`는 CI에서 확인합니다. <details><summary>추가 증거</summary> - Base: `5286f6958df7af0ea52556451406733d6e2073f2`; tested/pushed head: `0b87fc5355300f6ebe249451356c2399b8729115`. - 실행: `pnpm --dir web exec playwright test e2e/pane-focus-ordering.spec.ts --workers=1 --max-failures=1 --trace=on`. - 기존 test 30s / assertion 5s 제한을 유지했으며, 두 사례의 trace와 입력 관측은 로컬 ignored run에 보존했습니다. - 이번 변경 경로는 위 테스트 파일 하나입니다. 제품 source와 Herdr pin은 변경하지 않았습니다. </details>
…adiness # Conflicts: # docs/VERIFICATION.md
|
|
|
Windows run37182930030의 S2 PASS/15PASS·2FAIL을 확인했고, 동일한 |
|
Focus failure triage for
Both hided logs show the original
The executed main macOS job at Current evidence confines the recurrence to this PR's execution; it does not identify a particular fixture hunk as causal or prove that main can never flake. No product focus defect is established. The next useful observation for the fixture owner is a timestamped gate receipt/release, CDP session creation / input completion / detach, and diagnostic snapshot receipt, distinguishing browser-driver delay from fixture scheduling. No expectations, deadlines, retries or skips changed. No new build/native phase was started. The unrun main-only observer proposal was withdrawn; no separate fix PR is opened. |
Related: #383 (the rapid-click wait fix the guide cites as its case), #372 (the Windows fixture work behind the operating-system rules) ## Summary How to write a test was spread across `VERIFICATION.md`, `CONTRIBUTING.md` and three package `AGENTS.md` files, and the rules learned from today's flaky failures were written nowhere. This adds `docs/TESTING.md` as the one guide for writing tests, split from running them: `TESTING.md` owns the layer choice, fixtures, deterministic waiting and ordering, the flaky policy and a review checklist; `VERIFICATION.md` keeps check selection, e2e run traps, native QA and device checks. The fixture section and the `@flaky` quarantine paragraph move verbatim and leave links behind; no code, test or CI file changes. ## Review - **Please judge**: the two flaky rules under "These rules are checked by the reviewer" are new policy (an added `@flaky` links an open issue with a recorded failure and names what ends it; a PR touching a quarantined test removes the tag or records why it stays). - **Please judge**: "Wait for state, not time" bans fixed waits for new tests only; `web/e2e` and `desktop/e2e` still have 54 `waitForTimeout` calls. - **Files to watch**: `CONTRIBUTING.md` - the two lane sentences about `@flaky` (shard 1 only, never the macOS `@platform` job; nightly blocking) moved into `TESTING.md#flaky-tests`; check they still match `pr.yml` and `web-e2e.yml`. - **Files to watch**: `docs/TESTING.md` "Operating-system differences" - the shared fixture helper is described as not on `main` yet; it names only files that exist. - **Follow-up, not in this PR**: a check script refusing new `waitForTimeout` in e2e specs, and one refusing a `@flaky` tag without an `issue` annotation. ## Evidence - **Confirmed**: the moved "Writing a fixture" section is byte-identical to the original (`diff` of the extracted sections). - **Confirmed**: the `@flaky` lane facts were read against `.github/workflows/pr.yml`, `web-e2e.yml` and `nightly.yml`; Playwright retries are not configured in either suite. - **Confirmed**: every file the guide names exists on `main` (`focusGate`, `s2.spec.ts`'s owner hash, `ownUntilWorkerExit`, `fixture.ts`'s `AggregateError`). - **Confirmed**: `check-no-workstation-identity.sh`, `check-no-attribution.py`, `check-harness-ignore-anchor.sh`, `check-herdr-pin-single-source.sh` pass. - **Not confirmed**: the stage timings in the rapid-click case (2.1 s detach, 0.9 s poll backoff, release at 4.4 s) come from the investigation behind #383, not re-measured here. - **Not confirmed**: the Windows `EACCES`, owner-hash and `EBUSY` failures come from the Windows fixture runs behind #372, not reproduced here. - **Not run**: Rust, web and e2e suites, since no code changed.
Related: #372, #381, #382 ## Summary The rapid pane-click test waited for CDP teardown while withholding a real Herdr focus response. Moving teardown exposed a second race: CDP ACKs arrived before the test observed the complete outgoing focus burst. Wait for all forty completed `terminal_click` frames on the same WebSocket before reading the final pane and accepted-focus count. Keep a separate CDP session per burst, with the first detach after gate release and confirmation. All original expectations, forty clicks, timeouts, retries and skip remain unchanged. ## Review - `web/e2e/pane-focus-ordering.spec.ts`: input completion and CDP lifetime only; Unix gate and unknown-result test are unchanged. - The passive observer adds one numeric click counter without retaining click payloads or changing the page's send. - The test has at most one live CDP session; `finally` closes it and protects original fixture cleanup on detach failure. - Existing 64 focus-record and 32 timing-stage bounds remain; polls read memory every 25ms with unchanged default timeouts. - This main-based branch excludes #372's Windows pipe and fixture changes. ## Evidence - [Measured macOS run](https://github.com/modakbul-gongbang/hide/actions/runs/37186268156/job/111388729537): 17 passed; detach took 2,083ms before gate release. - [macOS regression](https://github.com/modakbul-gongbang/hide/actions/runs/37187067939/job/111391165297): expected count froze at 6, actual acceptance reached 40. - [Linux 2/6 regression](https://github.com/modakbul-gongbang/hide/actions/runs/37187067939/job/111391386637): final-pane evidence was read before the last click arrived. - Source confirms mouseup emits `terminal_click` after focus on one socket; both are processed by the same passive observer. - Exact spec lint/syntax and source comparison pass; every original assertion and ordered input command is preserved. - Repaired-head runtime CI is unconfirmed; no local native build, execution, dependency install or server was added. - Linux 6/6 `tab-strip-fit.spec.ts:82` is outside this change and untouched.
|
08d9433: 사설 pinned Herdr로 main 3e14a35/#372의 focus spec --repeat-each 5가 각각 10/10 PASS(rapid 5/5, gate 해제 main 394-867ms/#372 540-787ms), 명시된 new-tab chord도 macOS에서 각각 1/1 PASS; 원본 macOS CI는 첫 진단 대기 3904ms+입력 ACK 2319ms로 5초 기한을 넘겼고 Linux는 w2:t2 생성 후 w1:p1 복귀가 확인됐으나 fixture 인과는 재현되지 않아 변경·push 없음, 원본 RED 미해결 유지, 소유 프로세스·비교 WT 정리 완료(다음 필요 증거: CI snapshot 송신/수신과 첫 진단·입력 단계의 시각 연결). |
Related: #293; merged prerequisites #372, #376 and #383. ## Summary The Windows required lane now runs the existing listener-attribution and checkout-in-use tests. A native read failure reaches `verify` with its actual reason, alongside the browser smoke result. `CONTRIBUTING.md` lists both commands. ## Review - `.github/workflows/pr.yml`: both tests run and either failure keeps the Windows job red. - `CONTRIBUTING.md`: the Windows gate description matches the executed commands. - Runtime, listeners, fixtures and smoke specs use merged main; no timeout, retry or quarantine policy changes. ## Evidence - Local workspace check, both listener tests, web/desktop types and lint, desktop units and CI script tests passed. - Current-head Windows smoke and required `verify` remain in progress in [CI](https://github.com/modakbul-gongbang/hide/actions/runs/37195702212). - Local listener proof is on macOS; native Windows and GUI behavior are not inferred from it. <details><summary>Verification record</summary> - Base: `316fa7d4be8c6bd80bd31ce5e5af572ebf92356b`; head: `e5595408620a076176352a6c5c69e494b8a063d4`. - `verify-cargo.sh check --workspace --all-targets`: passed. - Both existing core listener tests: one passed each, no skips. - `verify-web.sh`: web and desktop typecheck/lint passed; desktop units 99 passed, 3 existing skips. - CI Python tests: 9 passed. - Main listener/fixture/smoke/focus preservation: 12 matching blobs. - Owned command groups reaped; cold check 128.485s, cold listener compile/run 105.689s, warm alias test 0.538s. - [Windows required job](https://github.com/modakbul-gongbang/hide/actions/runs/37195702212/job/111416992651): in progress. </details>
## Summary Every PR ran Rust, the unit suites on three OSes and the full E2E, even a docs-only PR. The median time for the required checks to finish was 32.45 min (Orca 16.22, Paseo 20.65). Now a `plan` job reads the changed paths (`HEAD^1..HEAD` of the PR merge commit) and plans only the lanes the change needs. The same plan sets each job's `if:` and is what `verify` checks the results against. - `verify` passes only when every **planned** lane is `success` and every **unplanned** lane is `skipped`. A planned lane that was skipped, failed or cancelled fails `verify`, and so does a `needs` entry the plan doesn't know or a failed plan. - The Windows browser `@platform` smoke moves out of `windows check` into its own `windows e2e` lane, which calls `web-e2e.yml` the same way nightly does. Compile, unit tests and the OS contract stay in `windows check`. - `checks` is split into `policy` (on every plan), `web checks`, `desktop checks` and `hcoord`. - A main push, a comparison that fails (base missing, not a merge commit, diff parse failure, `cargo metadata` failure) and any unclassified path all run **every** lane. - Main pushes no longer cancel each other (`cancel-in-progress` is now PR-only). `design-contract.yml` also cancels only the same PR's previous run. - The rules live in one place, `scripts/ci-plan.py`; the table in `docs/TESTING.md`, "Which lanes a pull request runs", explains them. ## Review - **판단해 주세요**: whether it is acceptable that **main's full run is the safety net** for a lane wrongly left out. A wrongly skipped lane surfaces as a failure on main after the merge, not on the PR. - **판단해 주세요**: whether to keep the Windows smoke now skipping `@flaky` tests, as macOS already did. No `@platform` test is tagged `@flaky` today, so the behavior is the same for now. - **판단해 주세요**: web code shared with the desktop host (`SHARED_WEB`) also runs the desktop lanes and the macOS/Windows `@platform` lanes. That is broader than the brief's "desktop 연결까지"; I chose it because terminal, input and shortcut changes are Windows-impacting. - **조심해서 볼 파일**: `scripts/ci-plan.py` `READERS` and `SHARED_WEB`. These two hand-kept lists are where a lane can be dropped wrongly (the failure path). Review found five omissions from tests reading files across folders and they are fixed (below). - **조심해서 볼 파일**: the `verify` job in `.github/workflows/pr.yml` and `aggregate()`. This is the merge gate itself. - **질문**: `site/`, `tools/`, `spikes/`, `.github/*.md` and `agents/prd` currently fall under "unknown path → everything". Should a follow-up narrow them? ## Evidence **Plan replay over the last 20 merged PRs.** Each row runs the classifier on the merge commit's `^1..` diff: | PR | 경로 수 | 계획 | 생략되는 lane | Rust crate | | --- | ---: | --- | --- | --- | | #389 | 7 | 전체 (`scripts/web-shell-measure/run.sh`) | - | 전체 | | #388 | 6 | 부분 | desktop-checks, hcoord, os-contract, windows-check, windows-e2e, macOS-e2e, desktop-e2e | herdr-core | | #385 | 125 | 전체 (`.github/pull_request_template.md`) | - | 전체 | | #387 | 70 | 전체 (`contracts/hided-ws.schema.json`) | - | 전체 | | #386 | 61 | 전체 (`contracts/hided-ws.schema.json`) | - | 전체 | | #368 | 2 | 전체 (`.github/workflows/pr.yml`) | - | 전체 | | #372 | 23 | 전체 (`.github/workflows/nightly.yml`) | - | 전체 | | #382 | 3 | 부분 | web-checks, desktop-checks, hcoord | herdr-core, hide-host, hided | | #383 | 1 | 부분 | rust, desktop-checks, hcoord, os-contract, windows-check, desktop-e2e | - | | #384 | 8 | 부분 | web-checks, desktop-checks, hcoord, os-contract, windows-check, windows-e2e, web-e2e, macOS-e2e, desktop-e2e | herdr-core | | #380 | 2 | 부분 | web-checks, desktop-checks, hcoord | herdr-core, hided | | #381 | 1 | 부분 | rust, desktop-checks, hcoord, os-contract, windows-check, desktop-e2e | - | | #378 | 58 | 전체 (`.github/workflows/nightly.yml`) | - | 전체 | | #377 | 11 | 부분 | hcoord | herdr-core, hided | | #361 | 91 | 전체 (`agents/prd/three-column-panel/prd.md`) | - | 전체 | | #376 | 7 | 부분 | web-checks, desktop-checks, hcoord | herdr-core, hide-agent-hooks, hide-ai, hide-herdr-client, hide-host, hide-kit, hide-memory, hide-platform, hide-session, hided | | #367 | 27 | 부분 | hcoord | herdr-core, hide-host, hided | | #375 | 2 | 부분 | web-checks, desktop-checks, hcoord | herdr-core, hide-agent-hooks, hide-host, hide-kit, hide-memory, hided | | #366 | 8 | 전체 (`.github/workflows/release.yml`) | - | 전체 | | #362 | 153 | 전체 (`agents/prd/overview-request-view/prd.md`) | - | 전체 | - **줄어드는 lane**: - 11 of 20 PRs would run a partial plan; 9 run everything because they touch `.github/`, `contracts/`, `scripts/` or `agents/`. - A docs-only PR (#384) runs no E2E, Windows or macOS lane. It still runs `rust -p herdr-core`, because a herdr-core test reads the root `AGENTS.md`. - A web display change (#388) runs no Windows, macOS, desktop or OS-contract lane. - A Rust crate change tests only that crate and its reverse dependencies, from `cargo metadata`. For example #380 tests `herdr-core` and `hided` only. - **확인한 것**: - `scripts/tests/test_ci_plan.py` passes 19 cases. They cover: - Docs-only, which excludes Rust and E2E. - A pure web display change, which excludes the Windows smoke. - `hide-platform`, which includes Windows and the OS contract. - Shared web, a `@platform` spec, `desktop/src/main` and leaf-crate reverse dependencies. - Every `READERS` entry. - Unknown paths, lockfiles and workflows, a type change, an empty diff, a missing base, a non-merge HEAD and a missing crate graph, which all run everything. - The aggregate rejecting a skipped, failed or cancelled planned lane, an unplanned lane that ran, a missing or extra `needs` entry, a failed plan and an empty plan. - The full `python3 -m unittest discover -s scripts/tests` suite passes (108). That includes the check that every gate a workflow runs is a tracked script. - actionlint passes on every workflow. `check-herdr-pin-single-source`, `check-hide-design-enforcement`, `check-no-workstation-identity`, `check-harness-ignore-anchor` and `verify-cargo.sh fmt-check` all pass. - Running `plan` on #388 produced the expected `GITHUB_OUTPUT` (`lanes`, `full`, `rust-packages`) and the job-summary table. - Running `aggregate` with a fake `needs` passed when the results matched the plan and failed when a planned lane was skipped. - **리뷰 반영**: a code review and a fidelity review against the brief found these, now fixed: - Tests read files across folders, so these changes now plan the lanes that read them: the root `AGENTS.md` (herdr-core test), `web/src` and `hided/src` (herdr-core structure tests), `wirePath.ts` (imported by web e2e) and `design/tokens.json` (read by web tests). - Every crate change now runs `windows check`. - Main pushes no longer cancel each other. - `docs/PERFORMANCE_TESTING.md` no longer describes the old lanes. - **CI ([run 37214808511](https://github.com/modakbul-gongbang/hide/actions/runs/37214808511))**: - The plan was full (the change touches `.github/` and `scripts/`), and every lane ran, including the separate `windows e2e`. All passed. - The first attempt failed in Linux web e2e shard 2/6 on `home.spec.ts:82` (the location bar read `Home/hde-…` instead of `Home/~/hide`). This PR touches no web or test code. `verify` reported exactly `web-e2e: planned, expected success, got failure`. - One rerun of the failed jobs passed, and `verify` is green. - The `home.spec` failure is a flaky-test candidate; it belongs to the main-green work, not this PR. - **확인하지 못한 것**: - Partial plans have never run on Actions. A docs-only or web-only PR has not been tried; the first one after the merge will show it. - The cold-cache time of the `windows e2e` lane is unmeasured. It uses the same path as the nightly Windows lane. - Main runs now queue instead of cancelling, but GitHub keeps only one pending run per group. If three merges land in a row, the middle merge's full run can be dropped. - **안전망과 위험**: a lane that should have run but was skipped is the risk. Main's full run catches it after the merge; the fix is then a rule in `scripts/ci-plan.py` plus a test case. Does not include: a failure ledger or history, a quarantine registry, cache changes, a `max-parallel` experiment, or the `package.yml` `paths` trigger (all out of scope). If this and the main-green PR overlap in `pr.yml`, whichever merges later rebases.
Fixes #413 Refs #303, #400 ## Summary Agent 탭을 새 영역으로 드롭한 직후 첫 영역을 클릭해 입력하면, 입력한 줄의 일부가 다른 영역의 pane으로 갔습니다. CI에서 `desktop-group-live`가 `desktop-grouve`로 실행된 실패(`agent-tab-groups.spec.ts:40`)가 이 결함입니다. 원인은 core에 있었습니다. 드롭이 보낸 `tab.focus t2`에 대한 Herdr의 답이 클릭(`tab.focus t1`) 뒤에 도착했는데, core가 이를 외부 focus로 보고 따라갔습니다(`tab.focus.followed`). 그 결과 snapshot의 keyboard pane이 바뀌었고, `PaneView`가 입력 도중 DOM focus를 옮겼습니다. 이제 core는 더 새 요청으로 대체됐지만 Herdr가 아직 답하지 않은 탭 focus 요청을 기억합니다(`superseded_tab_focus`, 최대 16개, 3초). Herdr가 그런 탭으로 이동했다고 알리면 그 요청의 늦은 답으로 소비하고, 따라가지 않습니다. ``` 수정 전, 실패한 실행 (렌더러 시각, ms) 324 p1 focused 358 p3 focused -> 'p' '-' 가 p3로 전송 364 p1 focused 374 p3 focused 378 p1 focused p1: printf 'desktogroup-live\n' p3 프롬프트: p- ``` ## Review - **판단해 주세요**: Hide가 대체한 탭 요청은 3초 동안 그 탭에 대한 권리를 가집니다. 그 사이 Herdr 밖에서 같은 탭으로 진짜 이동해도 한 번은 따라가지 않습니다. 대신 이 일은 `tab.focus.late_answer`로 기록됩니다. - **판단해 주세요**: `desktop/e2e/terminal-input-observation.ts`(#372)를 지웠습니다. 이 관측기는 페이지가 shell로 이동하기 전에 설치돼서 아무것도 기록하지 못했고(`renderer-unavailable`), 쓰는 곳은 이 테스트뿐이었습니다. - **조심해서 볼 파일**: `herdr-core/src/runtime/session.rs` `reconcile_visible_tabs` - Herdr/core ownership. 외부 focus를 따라갈지 정하는 분기를 하나 추가했습니다. - **조심해서 볼 파일**: 같은 파일의 `FocusTab` 실패 처리 - failure path. 확정된 거절이면 기록을 지우고, 결과를 알 수 없으면(ambiguous) Herdr가 적용했을 수 있으니 만료까지 유지합니다. - **비용 검토**: 탭 전환 이벤트마다 상한 16개인 Vec에 push/retain을 한 번씩 하고, session reconcile마다 checkout당 한 번 선형 검색합니다. 만료는 기존 view-focus 만료 경로에서 처리하고, 상한을 넘기면 진단 로그를 남깁니다. ## Evidence - **확인한 것**: 결정적 core 테스트 `view_authority_a_late_answer_to_a_superseded_switch_is_not_followed`는 수정 전 CI와 같은 방식(t2로 이동)으로 실패하고, 수정 후 통과합니다. - **확인한 것**: 상한, 만료, 확정된 거절, ambiguous 실패를 검사하는 테스트를 추가했고 통과합니다. main 59d13d9 위로 rebase한 뒤 `herdr-core` 전체 1370개 통과, `verify-cargo.sh lint` 통과, desktop typecheck/lint 통과. - **확인한 것**: 로컬 macOS에서 debug hided와 pinned Herdr 0.9.1로, 14코어 중 4개에 부하를 걸고 원래 테스트 흐름을 반복했습니다. 수정 전 8회 중 1회 실패, 수정 후 16회 모두 통과. - **확인한 것**: 수정 후 16회에서 늦은 답은 7회 발생해 모두 따라가지 않았고, keyboard pane은 클릭마다 정확히 한 번만 바뀌었습니다. - **확인한 것**: 원래 테스트를 retry 0, 기존 deadline으로 통과했습니다. 두 그룹 각각 출력 줄이 정확히 한 번인지 검사하는 단계를 추가했습니다. - **확인하지 못한 것**: Linux와 Windows desktop, 그리고 CI의 전체 background suite 뒤 실행은 이 PR의 CI 결과로 확인합니다. 이 테스트는 PR A(#398)에서 격리되지 않았으므로 해제할 격리가 없습니다. - **확인하지 못한 것**: #400(새 탭 유실)의 실패 로그에도 오래된 focus를 Herdr 이동처럼 따라가는 단계가 있어서 Refs로 연결했습니다. 이 수정이 #400을 고치는지는 별도 비교로 확인합니다. - **확인하지 못한 것**: 탭 focus 요청은 요청마다 스레드 하나로 나가므로, Herdr가 순서를 바꿔 적용하면 Hide와 Herdr의 active 탭이 만료 전까지 어긋날 수 있습니다(코드에서 추론). pane focus처럼 직렬화하는 것은 후속 작업입니다. <details><summary>추가 증거</summary> - 로컬 재현의 사건 순서: Herdr `tab.focus t2`(드롭) 02.084, `tab.focus t1`(클릭) 02.158. core `tab.focus.followed` t1→t2 02.195, t2→t1 02.298. - core 테스트 중 `repository_clone` 1건이 전체 suite 부하에서 한 번 실패했습니다. fixture의 `git commit` 단계였고, 단독 실행과 재실행에서는 통과했습니다. 이 변경과는 무관합니다. </details>
…1870) Refs with-hide/hide-private#354 ## Summary Windows CI의 web unit suite에서 처음 도는 테스트 파일(MissionMap, PaneHeaderBand, SessionRecord)이 가끔 12-18초 멈춰 5초 timeout으로 실패했습니다. 관측: vitest는 테스트 파일마다 새 Node 프로세스를 띄우고, Windows runner의 Node는 느린 시스템 디스크(C:)에 있습니다. 첫 wave 프로세스들은 Node 실행 파일(83 MB)을 첫 테스트의 시간 제한 안에서 수천 번의 작은 읽기로 디스크에서 읽습니다. 이 PR(완화): vitest 자신의 프로세스가 worker를 띄우기 전에 Node 실행 파일을 한 번 통째로 읽어, 첫 wave의 그 차가운 읽기를 테스트 밖으로 뺍니다(`web/e2e/unit-node-binary.ts`). timeout과 retry는 그대로입니다. 미확정: 이 차가운 읽기가 12-18초 정지의 원인이라는 인과는 확인하지 못했습니다. 실패한 run의 정지 구간을 trace로 잡은 적이 없어서, #354는 열어 두고 이 PR 뒤 main에서 다시 나오면 trace로 그 구간의 대기를 잡습니다. 범위 밖: C:를 느리게 만드는 runner 자신의 유지보수(Defender 업데이트, Windows Update, VSS)는 with-hide/hide-private#372. ## Review - **판단해 주세요**: 모든 OS에서 web unit suite 전에 Node 실행 파일을 한 번 읽습니다. 메모리에 이미 있으면 12-23 ms, 차가운 Windows runner에서 약 0.5초, C:가 유지보수로 바쁜 job에서는 3.5초까지 걸렸습니다(trace t3). 어느 경우든 테스트의 시간 제한 밖입니다. - **판단해 주세요**: #372(runner의 Windows Update와 Defender 예약 업데이트를 job 동안 멈출지)는 보안 업데이트를 끄는 결정이라 운영자 판단으로 남겼습니다. - **조심해서 볼 파일**: `web/vite.config.ts` - `globalSetup`이 web unit suite 전체 앞에 실립니다. desktop suite(`desktop/vitest.config.ts`)는 그대로입니다. ## Evidence - **확인한 것**: main 실패 run 41001145069에서 세 worker가 같은 구간에 멈췄고 node 프로세스 누적 CPU는 약 5초(테스트 12-18초)였습니다. 무엇을 기다렸는지는 그 run에서 잡지 못했습니다. - **확인한 것**: 커널 trace(NT Kernel Logger, disk·file·hard fault)로 본 worker 시작 뒤 Node 실행 파일 디스크 읽기: base 3 job 980-2929번(30.6-86.8 MB), 고침 6 job 모두 0번. 고침 쪽은 그 읽기가 worker 전 한 번의 순차 읽기로 옮겨집니다. 이 trace들은 정지가 없던 run이라, 정지 구간의 대기와 직접 연결되지는 않습니다. - **확인한 것**: 반복 실행(windows check의 cargo 단계 뒤 같은 install/test 단계). 세 파일은 base 13 job, 고침 29 job 어디서도 실패하지 않았습니다. job마다 세 파일에서 가장 긴 테스트의 중앙값은 base 557 ms, 고침 552 ms이고, 가장 느린 job은 base 2536 ms, 고침 1122 ms입니다. - **확인한 것**: 반복 실행의 다른 실패는 이 PR 밖입니다. OverviewGraph overflow 3번은 #145(#1857로 merge됨), `bounded-child.unit.ts`의 `lld-link did not end` 2번(base 1, 고침 1)은 C: 유지보수 폭주로 #372. - **확인한 것**: 첫 Intl 생성 하나가 CPU 30 ms에 벽시계 0.5-1.7초를 기다렸고, Intl이 없는 module 수집이 14-50초 멈춘 job도 있었습니다. Intl만 예열해서는 덮이지 않습니다. - **확인한 것**: 아래 표(최소-최대). C:를 일부러 대량으로 읽어 느리게 만든 뒤에도 고침 쪽 숫자는 그대로였습니다. - **확인하지 못한 것**: 12-18초 정지 자체는 반복 실행에서 재현되지 않았습니다(main windows check 약 40 run 중 3번). 통과·실패 횟수는 해결의 증거가 아니고, 위 trace는 차가운 읽기 경로가 테스트 안에서 사라졌다는 것만 보입니다. - **확인하지 못한 것**: macOS와 Linux에서 한 번 읽기 비용은 따로 재지 않았습니다(같은 표준 fs 호출). | 방식 (Windows diag) | MissionMap 첫 테스트 | 테스트 안 Intl 대기 | SessionRecord 수집 | 한 번 드는 비용 | | --- | --- | --- | --- | --- | | main 그대로 (13) | 395-599 ms | 30-61 ms | 9.4-18.6 s | | | main, C:를 지치게 함 (5) | 473-1032 ms | 36-538 ms | 10.1-23.5 s | | | 파일마다 Intl 예열 (5) | 270-572 ms | 1 ms | 8.1-12.6 s | setup으로 43-823 ms 이동 | | main 프로세스에서 Intl 한 번 (5) | 339-647 ms | 30-49 ms | 8.2-10.9 s | 35-764 ms | | Node 실행 파일 한 번 읽기 (4) | 273-454 ms | 26-40 ms | 7.5-10.7 s | 12-531 ms | | Node 실행 파일 한 번 읽기, C:를 지치게 함 (5) | 272-380 ms | 23-37 ms | 6.9-9.1 s | 12-537 ms | | 반복 실행 | job | 통과 | 실패(원인) | | --- | --- | --- | --- | | base (고침 줄 삭제) | 13 | 12 | bounded-child lld-link 1 (#372) | | 고침 | 29 | 25 | OverviewGraph 3 (#145), bounded-child lld-link 1 (#372) | `windows check`는 `web/vite.config.ts` 변경으로 이 PR의 계획에 들어갑니다(`scripts/ci-plan.py`). 같은 커밋에서 다시 돌리려면 `gh run rerun <run> --job <windows check job id>`. <details><summary>Verification record</summary> - base `1e8355e40`, head `acd3ea806` (코드는 `bf41323a1`과 같고 주석과 문서 표현만 바뀜) - 로컬: `scripts/verify-web.sh web lint` 통과, `scripts/verify-web.sh web test` (MissionMap, PaneHeaderBand, SessionRecord 89 tests) 통과 - PR verify 41007907035 통과(windows check job 123906969308, 첫 wave 파일 2.2-5.1 s) - diag run: 41005002294, 41005568846, 41005960879, 41006191963, 41006614043 (브랜치 diag/windows-unit-stall, 버릴 것) - 반복 실행(브랜치 diag/windows-unit-stall-repeat, 버릴 것): 41007829725 (고침 10, base 10은 checkout 오류로 무효), 41009840527 (base 10, 고침 10, 고침 trace 3), 41011316116 (고침 trace 6), 41013119002 (base trace 3) </details>
Related: #303, #370. Depends on #368.
Summary
Review
terminal-input-observation.ts: canonical key fields, exact-once sends, caps and owned cleanup.agent-tab-groups.spec.ts: original drag, typing, Enter and both five-second polls are preserved.herdr-fixture.ts: provider/auth replies bypass readiness; short or failed readiness writes return failure.Evidence