Skip to content

test: stabilize shell startup in shared fixtures - #2391

Merged
yansfil merged 17 commits into
mainfrom
fix/shell-or-project-row-draw
Nov 10, 2026
Merged

yansfil merged 17 commits into
mainfrom
fix/shell-or-project-row-draw

Conversation

@yansfil

@yansfil yansfil commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes with-hide/hide-private#526
Closes with-hide/hide-private#599
Refs with-hide/hide-private#395, with-hide/hide-private#530, with-hide/hide-private#117, with-hide/hide-private#586
Refs with-hide/hide-private#832

Summary

  • Start the checkout PR flow on Main after its setup has focused another workspace.
  • Prevent Windows test browsers from losing local page or resource requests during shell startup.
  • Retain the failed row and pointer state for a separate, unreproduced late card-hover failure.

Review

  • Risky files: browser-launch.cjs merges installed runner defaults; the desktop preload extends effective flags.
  • Risky files: checkout-pr.spec.ts retains discovery's connection, then resets first-run selection before Main.
  • Risky files: desktop browser.spec.ts uses the shared arguments for its plain Chromium launch and checks the applied features through CDP.
  • Decide: The narrow upstream fix uses the locked runner's internal argument API; a changed shape fails startup.
  • An entire runner upgrade would also replace the browser revision and is outside this stabilization change.
  • Cost: The hover observer exists only for one test phase, retains 32 transitions, and is removed on every exit.
  • Cost: Splitting the plain-browser notice from the native-view lifecycle adds one isolated fixture start so Windows CI checks that launcher too; its existing notice assertions are retained.
  • Windows run 41016473655, tracked by private #130, records the same document-load error.
  • #832 tracks one later card-hover failure; this PR does not claim its cause is fixed.

Tests

  • Layer: Unit feature merging; real browser startup and desktop recovery cross the actual host launch boundary.
  • The desktop plain-browser case checks the effective final disabled-feature list, retained runner defaults and the Windows loopback fix before opening the shell.
  • It passed its first Windows CI attempt on the final head in the desktop lane.
  • Units cannot observe which feature list the launched browser applies; the startup check reads that applied state.
  • Catches: Removing the Windows feature fix failed two merge checks; restoring it passed all three.
  • Repeat: Linux/macOS: five flows x20, 100 passed each.
  • Desktop recovery/relaunch: each x10 on macOS/Windows, retries 0, 40 passed.
  • Final Windows: five flows x20, retries 0, 100 passed.
  • Waits: No new wait, delay, retry, timeout or threshold; the existing Main assertion follows explicit state setup.

Evidence

  • Verified: Local startup/checkout flows, desktop recovery/relaunch, unit 3, lint, types, builds and policy checks.
  • Verified: The split desktop plain-browser and native-view flows passed locally without retries; desktop lint and typecheck passed.
  • Verified: A controlled trigger replacement preserved the original failure and captured mounts=2 before teardown.
  • Verified: Required CI and independent review passed on final head c532660.
  • Not verified: The historical reference-only causes and the late hover cause.
Failure evidence and review boundaries
Verification record
  • Final head: c532660.
  • Startup repeat candidate 4231d60: Linux/macOS each five flows x20, no retry.
  • Desktop repeat candidate ce0dffe: JSON reports on each OS show expected=20, unexpected=0, skipped=0, flaky=0, repeatEach=10 and retries=0.
  • Diagnostic-only Windows candidate 5eefccb: run 42838637529, five flows x20, no retry, 100 passed.
    The temporary early observer and trace flag were reverted.
  • Final Windows repeat candidate 49b560a: run 42844846265, five flows x20, retries=0, 100 passed; job log confirms the exact tested commit.
  • All temporary workflow changes are reverted.
    The repeated specs, shared startup fixtures and guide match the final Windows repeat candidate; the later desktop browser.spec.ts regression and its smaller size baseline are the only differences in those test trees.
  • Head 1933d66 is a source-identical verification commit after f45c106, added to regenerate the synthetic merge against the corrected base.
  • Review follow-up c532660 applies the shared launch settings to the desktop plain browser and separates that existing notice contract into a Windows-covered case.
  • Local current source: checkout hover flow passed without retries; a controlled browser replacement captured the original failure and two mounts; web lint and test-size budget passed.
  • Earlier unchanged-source checks: web build; web/desktop lint; desktop typecheck; startup/checkout 3; desktop recovery/relaunch 2; merge unit 3; design contract and policy checks passed.
  • Manual repeat dispatches that skipped every test and draft-only verify failures are excluded from verification evidence.
  • Independent review and required CI 42860546110 passed on c532660.
  • Ready run 42849933157 checked synthetic merge 83a0f35 against base 8284fb6, which predates fix: read the engine state under its current name in the restart wait #2398.
  • That merge still waited on the retired status.herdr field; current main uses status.engine.
    All hard web failures were at that restart boundary.
    One required failed-job rerun was started.
  • The regenerated merge f4ed9d1 includes the corrected status.engine wait.
  • Final run 42860546110 tests merge 6b977ba containing c532660; completed job logs confirm that checkout.
  • Its Linux suite has 412 passes and eight Windows-only skips, the retry-free changed-spec repeat has 80 passes, Windows web has 85 passes, and Windows desktop has 24 passes and one existing platform skip.
    The new plain-browser startup case passed its first attempt in 6.9 seconds.

@yansfil
yansfil marked this pull request as draft November 10, 2026 14:52
@yansfil
yansfil marked this pull request as ready for review November 10, 2026 15:58

@yansfil yansfil left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

첫 기록 리뷰. 검토 head: 1933d6617de965b9b1bcd8956755e51a27f33063, merge-base 880187d9f67f43c00300aad27f29f90c15dd3659.
f45c1061413415567dbc845486a79a4322972ecd와 tree가 같은 빈 검증 커밋임을 확인했습니다.
판정: fail, ordinary 1개.

  • ordinary · Fragmentation / Tests · desktop/e2e/browser.spec.ts:532와 web/e2e/browser-launch.cjs:13: 같은 Windows 로컬 페이지 시작 경로가 하나 빠졌습니다. desktop browser spec은 chromium.launch()로 별도 브라우저를 만들고 곧바로 plain.goto(status.url)로 같은 daemon의 로컬 페이지를 엽니다. 이 직접 호출은 web/playwright.config.ts의 launchOptions를 상속하지 않고 Electron도 아니므로 focus-guard.cjs도 적용되지 않습니다. 고정된 1.63의 기본 인자는 이 PR이 추가하는 TcpPortRandomizationWin 설정이 없어 같은 document/script 요청 실패 경로를 남깁니다. 현재 Windows 기본 lane의 @platform 선택에서 제외돼 있어도 테스트 자체의 Windows 실행 경로는 남아 있습니다. 이 호출에도 기존 testBrowserArgs를 적용하고, 직접 실행 경로의 유효 인자에 수정이 전달됨을 검증해 주세요. 새 helper나 기다림을 추가할 필요는 없습니다. 이는 mission의 같은 원인에 대한 sibling 경로 수정 요건과 engineering 원칙 7·13에 해당합니다.

확인한 근거와 비차단 범위:

  • #526 실패 artifact는 Main을 기다리는 동안 feature/pr-card Workspace가 이미 그려진 것을 보여 줍니다. 기존 discovery 연결을 유지해 준비를 마친 뒤 about:blank로 떠나 공유 asFirstRun을 적용하는 순서는 테스트의 초기 상태를 명시하며, 기존 Main assertion·한도는 유지합니다.
  • #599의 실제 job은 document 200, unmounted shell, index script status 0와 ERR_NO_BUFFER_SPACE를 기록합니다. upstream 수정은 Windows의 같은 연결 실패에 해당 기능을 끕니다. 새 helper는 설치된 runner의 기본 목록과 호출자의 목록을 합치며, 내부 API 형태 변경 시 시작을 실패시킵니다. WebGL opt-in 세 곳과 Electron preload도 같은 구현을 사용합니다. 위 직접 launch 외 추가 우회 경로는 찾지 못했습니다.
  • 로컬 보관 로그에서 Windows 기능을 제거한 변이의 unit 2 failed/1 passed와 복구 후 3 passed를 확인했습니다. 실제 브라우저 startup spec은 실행된 인자를 CDP로 읽고, desktop missing-CLI spec은 Electron이 적용한 값을 읽습니다. 제가 로컬에서 다시 실행한 결과는 아닙니다.
  • 실제 CI 로그를 각각 확인했습니다. Linux·macOS run 42832076296의 jobs 129884457641, 129884458467은 head 4231d604f에서 각 5개×20=100 passed, retries 0입니다. 최종 Windows job은 head 49b560aab에서 동일한 5개×20=100 passed, retries 0입니다. 최종 head와 이 Windows head의 영구 web·desktop·guide 소스는 같습니다.
  • desktop run 42831271844의 jobs 129881645880, 129881645979은 head ce0dffeab에서 missing-CLI와 lifetime/relaunch 각각 10회씩, 두 OS 합계 40 passed, retries 0입니다. 관련 desktop와 시작 helper는 이후 바뀌지 않았습니다.
  • 추가 hover observer는 32개 기록과 WeakSet으로 유지되며, assertion 실패 원본을 보존하고 observer·listener·handle 정리를 수행합니다. 마지막 hover 실패를 원인 해결로 주장하지 않고 #832로 분리한 것은 명시적 범위 결정으로 확인했습니다. Linux/macOS 반복 이후 추가된 것은 이 진단이며, 최종 Windows 반복에는 포함됐습니다.
  • 최종 PR diff에 임시 workflow는 없고 git diff --check 통과했습니다. Closes #526/#599, Refs #395/#530/#117/#586/#832와 확인 범위가 최신 c3에 맞습니다. 화면 제품 코드, Runtime 잠금, snapshot 계약은 변경하지 않습니다. 최종 전체 CI 성공 여부는 별도입니다.

정확성·공통화·단순성·모듈 경계·소유권과 한도·테스트를 검토했으며, 위 누락된 직접 실행 경로 외 추가 차단 의견은 없습니다.

@yansfil yansfil left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

재리뷰 1/2. 검토 head: c53266087232f1834cb2169ad0f31fad5980c704.
범위: 1933d6617de965b9b1bcd8956755e51a27f33063..c53266087232f1834cb2169ad0f31fad5980c704와 관련 검증·본문 변경.
판정: pass. 기존 ordinary 1건 해소, 새 차단 의견 없습니다.

  • Fragmentation / Tests 해소: desktop/e2e/browser.spec.ts의 직접 chromium.launch가 기존 testBrowserArgs를 사용합니다. 실행한 브라우저의 CDP command line에서 마지막 disabled-feature 목록을 읽어 기본 기능과 Windows TcpPortRandomizationWin을 확인하므로, 설정 함수 호출만 검사하는 수준을 넘습니다. 병렬 helper 없이 누락된 같은 시작 경로를 고쳐 engineering 원칙 7·13에 부합합니다.
  • plain-browser 안내 검증 두 개를 독립 @platform 사례로 옮겼습니다. native-view의 기존 lifecycle 검증은 유지되고, 새 사례도 같은 daemon의 실제 display를 열어 안내와 외부 열기 버튼을 확인합니다. Windows 기본 CI 선택에 포함됩니다. 새 fixture 시작 하나의 비용은 본문에 명시했고, 원래 긴 테스트의 기준선은 212→194행, 56→54검증으로 낮췄습니다.
  • 추가 timeout·sleep·retry·threshold 변경은 없습니다. CDP 세션은 finally에서 detach하고 별도 Chromium도 finally에서 close합니다. 앱과 fixture는 기존 afterEach에서 정리합니다.
  • 작업자의 최종 plain-browser 1 passed/9.5s 및 기존 native-view 1 passed/15.3s 로그와 desktop lint·typecheck 완료 로그를 확인했습니다. 이는 작업자의 로컬 결과이며 제가 앱을 실행한 것은 아닙니다. git diff --check 통과했습니다.
  • 이전에 확인한 반복 대상 specs와 공유 시작 설정은 이번 diff에서 바뀌지 않았습니다. 웹 세 OS 각 100회와 desktop recovery/relaunch 총 40회 증거는 그 대상들에 대해 유효합니다. 새로 분리한 직접 실행 사례의 Windows CI 통과까지 확인했다고 주장하지 않으며, 최종 전체 CI와 함께 별도 ci 줄에서 확인해야 합니다.

본문의 이슈 범위와 이전 리뷰의 나머지 판단은 유지합니다.

@yansfil
yansfil added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 0029bab Nov 10, 2026
67 checks passed
@yansfil
yansfil deleted the fix/shell-or-project-row-draw branch November 10, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant