Skip to content

test(cdp-gate): stress_popup — the popup two-step N times under a held load - #26

Open
unohee wants to merge 4 commits into
masterfrom
fix/cdp-popup-stress
Open

unohee wants to merge 4 commits into
masterfrom
fix/cdp-popup-stress

Conversation

@unohee

@unohee unohee commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

무엇

scripts/verify_cdp_guard_e2e.py 에 opt-in 섹션 stress_popup 을 추가했다.

  • --stress-popup N --load-target L: popup two-step(window.open('about:blank'); w.location = AWAY)을 N 회 돌린다. 이 섹션만 실행한다.
  • 부하는 스크립트가 직접 띄운 int(L)+8 개의 busy 프로세스로 유지한다. 모두 항상 runnable 이므로 1분 평균이 L 이상으로 유지된다. 1분 평균이 L 에 도달할 때까지 기다린 뒤에 시작하고, run 마다 시작 시점의 load 를 기록한다. 목표 아래에서 시작한 run 이 있으면 LIMIT 줄로 보고한다. busy 프로세스는 이름이 아니라 띄운 핸들로 종료한다.
  • escape 는 가드의 자체 보고가 아니라 서버 기준으로 센다. AWAY GET /dest 가 서버에 도달하면 escape 다.
  • opt-in 섹션은 기본 실행 목록에 들어가지 않는다.

왜

PR #11 구현 중 headful patchright 에서, load 약 55 일 때 10회 중 2회 AWAY 가 서버에 도달한 적이 있다. 이 누출을 재현하거나, 재현 불가임을 N≥200 으로 입증해야 했다. 지금은 native 가 기본 드라이버라 cdp 가드가 기본 경로다.

검증 (2026-11-15, vela, 각 칸 N=200, 1분 load ≥ 50)

드라이버 모드 load min / median / max 목표 아래 run escape 생성기 커밋
patchright headless 50.2 / 69.3 / 78.5 0 0 1615770
patchright headful (xvfb) 77.5 / 80.3 / 85.4 0 0 0ed4113
native headless 50.3 / 71.7 / 85.6 0 0 0ed4113
native headful (xvfb) 51.2 / 104.6 / 125.0 0 0 이전 생성기
playwright headless 77.6 / 88.4 / 101.9 0 0 0ed4113
playwright headful (xvfb) 79.8 / 83.5 / 86.4 0 0 0ed4113

합계 1200 run, escape 0, 모든 run 이 load ≥ 50 에서 시작했다. 앞선 생성기 버전으로 목표 아래 run 이 섞였던 칸(native headless, patchright headful, playwright 두 칸)은 최종 생성기로 다시 돌렸다. 커밋 사이의 차이는 부하 생성기뿐이고 가드 코드(cdp_guard.py)는 같다. 측정 대상 코드는 origin/master(b107286) + 이 스크립트이며, #17 의 loss-window backstop 이 포함되어 있다. 이전 누출이 재현되지 않는 이유가 그 backstop 일 수 있다.

cdp_guard.py 는 바꾸지 않았다. 재현이 없었으므로 회귀 테스트도 추가하지 않았다.

남은 것

  • 이 결과를 근거로 Config.guard_backend 기본값(Playwright 드라이버에서의 route→cdp)을 바꿀지는 별도 결정 이슈로 올려야 한다.
  • 스크립트는 공유 호스트에 load 50 이상을 수 분 동안 건다. 다른 작업과 동시에 돌리지 말 것.

…held load average

--stress-popup N --load-target L runs only the opt-in stress_popup section:
busy processes of the script's own hold the 1-minute load average at L, and
every run of window.open('about:blank'); w.location = AWAY is judged on the
server (an AWAY GET /dest that arrived is an escape). Each run records the
load it started at. Opt-in sections never join the default run.

This branch has not been deployed

No deployments
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