Compare commits
150
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ea36371f5 | ||
|
|
9b0f474bc8 | ||
|
|
97ba055d77 | ||
|
|
54b2f26c69 | ||
|
|
6d23f75229 | ||
|
|
beff30e822 | ||
|
|
1382a83540 | ||
|
|
299fc9f5da | ||
|
|
fe5cb50ed3 | ||
|
|
2d1bc68b26 | ||
|
|
3b594b85ed | ||
|
|
8d1356cb69 | ||
|
|
0a5961270a | ||
|
|
07b7b74e08 | ||
|
|
710ee498ba | ||
|
|
9883d3f455 | ||
|
|
7c79ba1ed4 | ||
|
|
fc10e257ca | ||
|
|
78277565f5 | ||
|
|
0a0d0d689d | ||
|
|
ff02f112fe | ||
|
|
016eccab9e | ||
|
|
db5c7ef565 | ||
|
|
5459a6b59e | ||
|
|
483f9af50a | ||
|
|
1d33f56100 | ||
|
|
966e2d6a8b | ||
|
|
d13a9442c5 | ||
|
|
2effeb1594 | ||
|
|
05420d83ce | ||
|
|
03d18c853d | ||
|
|
23b17c33ef | ||
|
|
3f56ac2e69 | ||
|
|
8621f0a5d6 | ||
|
|
9956adc386 | ||
|
|
72997c957c | ||
|
|
bd853bc040 | ||
|
|
7a0d55f4ce | ||
|
|
d867282c99 | ||
|
|
302af97575 | ||
|
|
47725170de | ||
|
|
d56ea298b4 | ||
|
|
e88e664a50 | ||
|
|
bacf03ad21 | ||
|
|
9357e790b3 | ||
|
|
1466ac6433 | ||
|
|
bf5c6dabb3 | ||
|
|
e992255d38 | ||
|
|
8049df3c33 | ||
|
|
e4edf5f81f | ||
|
|
7a094c3bbc | ||
|
|
7272ea8f64 | ||
|
|
a70f2fecaf | ||
|
|
65f7580182 | ||
|
|
4933f8cdba | ||
|
|
bfb67e0c2c | ||
|
|
2022ecf32a | ||
|
|
5ae6833299 | ||
|
|
a90dadc204 | ||
|
|
210161d9b6 | ||
|
|
1542fede01 | ||
|
|
5426744bc6 | ||
|
|
973927fdb7 | ||
|
|
071cf8d697 | ||
|
|
7af5b84954 | ||
|
|
a18e967675 | ||
|
|
64dc8d3476 | ||
|
|
bd46760313 | ||
|
|
2283d40198 | ||
|
|
012fc862ef | ||
|
|
8c7e413b68 | ||
|
|
bbf4019940 | ||
|
|
4e1f2ecf40 | ||
|
|
6f9b87c860 | ||
|
|
a072aa22b8 | ||
|
|
328ed0738e | ||
|
|
6200bc29ed | ||
|
|
b05741f538 | ||
|
|
95c7e156ac | ||
|
|
620f969655 | ||
|
|
adf96a2b15 | ||
|
|
2167538130 | ||
|
|
440bbb36e6 | ||
|
|
2f153c76ff | ||
|
|
fbceeafb65 | ||
|
|
b09d620930 | ||
|
|
776c00afe2 | ||
|
|
ba5b51cf91 | ||
|
|
14c24347c5 | ||
|
|
99c7fc93aa | ||
|
|
a61465b2be | ||
|
|
47536b5e64 | ||
|
|
4f95aa3797 | ||
|
|
6a60dcebb7 | ||
|
|
7927e30679 | ||
|
|
bf2a3c33b0 | ||
|
|
03d96a7baa | ||
|
|
7db28e4611 | ||
|
|
f76240893e | ||
|
|
d5c0e410de | ||
|
|
422e675b86 | ||
|
|
1c7bcf9dee | ||
|
|
84fd375562 | ||
|
|
d596ee81c8 | ||
|
|
66d5090a0b | ||
|
|
3a1dc8df9b | ||
|
|
5b87926543 | ||
|
|
b396e055ce | ||
|
|
68bb2b8e8f | ||
|
|
c14f2b1e9a | ||
|
|
bfedd53850 | ||
|
|
e868714339 | ||
|
|
36ecd11e99 | ||
|
|
80672c69a3 | ||
|
|
a21e1decb9 | ||
|
|
ecf384a923 | ||
|
|
a8cc2c842e | ||
|
|
5da874d67f | ||
|
|
f3e3ce164d | ||
|
|
2329dc6c1c | ||
|
|
52e520dd92 | ||
|
|
73c070ebb1 | ||
|
|
1d564f5732 | ||
|
|
6f25adc2e5 | ||
|
|
cd062e2c59 | ||
|
|
5a617dd899 | ||
|
|
793ea3d191 | ||
|
|
154a9de475 | ||
|
|
8c92c764b7 | ||
|
|
000fa7a3ad | ||
|
|
6a5b7e014a | ||
|
|
b78c5bb67c | ||
|
|
228576009b | ||
|
|
bc816cb1ae | ||
|
|
7ef736ca73 | ||
|
|
d6f5c884b4 | ||
|
|
cbd9f5db5b | ||
|
|
183219ce18 | ||
|
|
5c66186464 | ||
|
|
7ddb451af7 | ||
|
|
98d9a799f6 | ||
|
|
f9221ae3c2 | ||
|
|
41f7bec7a7 | ||
|
|
56b33a7740 | ||
|
|
fef0bc5ea7 | ||
|
|
2bc12eb80b | ||
|
|
ff2123ef58 | ||
|
|
5402da4d80 | ||
|
|
c23612e295 | ||
|
|
11b9e08b1a |
No files matched your search
@@ -1,5 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question or general discussion
|
||||
url: https://github.com/oss-invisible/playwright/discussions
|
||||
url: https://github.com/feder-cr/invisible_playwright/discussions
|
||||
about: Usage questions, ideas, chat. Bugs and features still go in issues.
|
||||
@@ -1,206 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# compositor-visible-hunt.yml - HUNT ONLY, never merged. Nothing of the product is changed. Starts on its own paths only (the hunts running on this branch are
|
||||
# not restarted by it, and it is not restarted by them).
|
||||
#
|
||||
# Can a PAGE tell software compositing ("WebRender (Software)") from our hardware path? Earlier rAF data showed 60 fps in one arm and 50-53 in another: why?
|
||||
# Four arms, one browser each, ~20 s each, windows-2022, two rounds (alternating, so a drift of the runner is seen): ours, ours_vmretail (the prefs of
|
||||
# hunt_vmretail.py build: retail's VM decisions), stockheaded, and retail 159.0 launched by hand (Mozilla's installer, checked against SHA256SUMS; the page runs
|
||||
# the probe and posts its result to the local server). In the page (scripts/hunt_compositor_probe.js): requestAnimationFrame alone (interval p5/p50/p95, fps,
|
||||
# dropped frames), with a CSS animation, with a WebGL animation; a smooth scrollTo of a long page (scroll events per second, time to finish); canvas 2D getImageData
|
||||
# on 1024x1024 after drawing and WebGL readPixels timings; matchMedia (update: fast), screen refresh hints, the resolution of performance.now().
|
||||
# `facts` reads, per arm, what Troubleshoot exposes (graphics.monitors[].refreshRate, the layer manager, layout.frame_rate, gfx.vsync.*) and PowerShell's
|
||||
# Win32_VideoController.CurrentRefreshRate. The table marks every difference between ours / ours_vmretail and retail as TIMING-ONLY or VALUE.
|
||||
# The code that decides the rAF rate: gfx/thebes/gfxWindowsPlatform.cpp D3DVsyncSource (rate from DwmGetCompositionTimingInfo, loop on WaitForVBlank, software
|
||||
# vsync when it returns in under 1 ms or fails) and gfx/thebes/gfxPlatform.cpp:3462-3516 (layout.frame_rate, 60 Hz default): see the docstring of
|
||||
# scripts/hunt_compositor_visible.py.
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: compositor visible hunt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_compositor_visible.py
|
||||
- scripts/hunt_compositor_probe.js
|
||||
- .github/workflows/compositor-visible-hunt.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: compositor-visible-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, what a page reads of the compositor: ours, ours_vmretail, stockheaded, retail)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 90
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper, psutil, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: Where the prefs of ours_vmretail are written
|
||||
run: echo "HUNT_VMRETAIL_PREFS=$RUNNER_TEMP/cv/vmretail/prefs.json" >> "$GITHUB_ENV"
|
||||
- name: "Retail Firefox 159.0 (Mozilla's installer, checked against SHA256SUMS, unpacked with 7-Zip)"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py fetch-retail --out "$RUNNER_TEMP/cv/retail"
|
||||
- name: "Build ours_vmretail (the declared table of ours, the decisions of stock, the prefs)"
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_vmretail.py build --binary "$FF" --out "$RUNNER_TEMP/cv/vmretail" | tee "$RUNNER_TEMP/cv/vmretail-build.txt"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
|
||||
# ---------------------------------------------------------------------------------------- the facts (once per arm)
|
||||
- name: "Facts, arm ours (Troubleshoot, effective prefs)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py facts --arm ours --binary "$FF" --out "$RUNNER_TEMP/cv/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm ours_vmretail (Troubleshoot, effective prefs)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py facts --arm ours_vmretail --binary "$FF" --out "$RUNNER_TEMP/cv/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm stockheaded (Troubleshoot, effective prefs)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py facts --arm stockheaded --out "$RUNNER_TEMP/cv/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm retail (Troubleshoot, effective prefs)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py facts --arm retail --retail-from "$RUNNER_TEMP/cv/retail" --out "$RUNNER_TEMP/cv/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
|
||||
# ---------------------------------------------------------------------------------------- the measurement, two rounds
|
||||
- name: "Round 1, arm ours (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/cv/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm retail (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm retail --retail-from "$RUNNER_TEMP/cv/retail" --out "$RUNNER_TEMP/cv/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm ours_vmretail (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm ours_vmretail --binary "$FF" --out "$RUNNER_TEMP/cv/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm stockheaded (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm stockheaded --out "$RUNNER_TEMP/cv/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1: table, what differs between ours / ours_vmretail and retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cp -r "$RUNNER_TEMP/cv/r0/"*-facts "$RUNNER_TEMP/cv/r1/" 2>/dev/null || true
|
||||
python -u scripts/hunt_compositor_visible.py table "$RUNNER_TEMP/cv/r1" | tee "$RUNNER_TEMP/cv/r1/table.txt"
|
||||
- name: "Round 2, arm stockheaded (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm stockheaded --out "$RUNNER_TEMP/cv/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours_vmretail (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm ours_vmretail --binary "$FF" --out "$RUNNER_TEMP/cv/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm retail (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm retail --retail-from "$RUNNER_TEMP/cv/retail" --out "$RUNNER_TEMP/cv/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours (one browser, ~20 s in the page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_compositor_visible.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/cv/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2: table, what differs between ours / ours_vmretail and retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cp -r "$RUNNER_TEMP/cv/r0/"*-facts "$RUNNER_TEMP/cv/r2/" 2>/dev/null || true
|
||||
python -u scripts/hunt_compositor_visible.py table "$RUNNER_TEMP/cv/r2" | tee "$RUNNER_TEMP/cv/r2/table.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: compositor-visible-hunt-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/cv/r0
|
||||
${{ runner.temp }}/cv/r1
|
||||
${{ runner.temp }}/cv/r2
|
||||
${{ runner.temp }}/cv/vmretail
|
||||
${{ runner.temp }}/cv/vmretail-build.txt
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -1,312 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# cpu-render-path-hunt-vm.yml - HUNT ONLY, never merged: second round of cpu-render-path-hunt.yml. Nothing of the product is changed: every pref goes
|
||||
# through the hunt scripts (extra_prefs, the pytest plugin) and this workflow.
|
||||
#
|
||||
# What the first round found: on the Windows VM runner (adapter Microsoft Hyper-V Video) stock Firefox's GfxInfo blocks D3D11 compositing and WebRender
|
||||
# with FEATURE_FAILURE_VM_VENDOR and falls back to WebRender (Software); ours declares OK for those features (the core's declaration, answered by
|
||||
# the engine before any blocklist) and takes the hardware path: a GPU process, D3D11 compositing, and ~6x the CPU.
|
||||
#
|
||||
# This round, one windows-2022 job, in this order:
|
||||
# 0. scripts/hunt_vmretail.py build: the arm `ours_vmretail` = ours made to take retail's VM decisions. It reads ours's DECLARED table
|
||||
# (zoom.stealth.gfx.feature_status) and stock's own decision for every feature (nsIGfxInfo.getFeatureStatusStr), prints both side by side for
|
||||
# every feature, and writes the extra_prefs: the declared table with only the compositing features replaced by stock's decision, plus
|
||||
# gfx.webrender.software=true, gfx.webrender.software.d3d11=false (WebRender (Software), not Software D3D11) and webgl.angle.force-warp=true (WebGL on
|
||||
# ANGLE with an explicit WARP device). The WebGL, media and every other feature keep what the persona declares: renderer, vendor and extensions stay
|
||||
# as declared. The list is printed there, and read back from the effective prefs and Troubleshoot by the next steps.
|
||||
# 1. `support` for ours, stockheaded and ours_vmretail: effective prefs, feature decisions, Troubleshoot's windowLayerManagerType and
|
||||
# windowLayerManagerRemote, WebRender/D3D11/WARP lines. Did the prefs take effect?
|
||||
# 2. scripts/hunt_cpu_baseline.py: one browser, 20 s, arms stockheaded, ours, ours_swwr, ours_vmretail: CPU per process type and per thread name, and
|
||||
# WHERE COMPOSITING RUNS (the Compositor, Renderer, RenderBackend, WRWorker ... threads: in the parent or in the GPU process).
|
||||
# 3. scripts/hunt_page_bytes.py: every page-readable value (canvas 2D, WebGL 1/2, text, strings; 2 launches per arm), ours against ours_vmretail.
|
||||
# 4. The CPU per process type of the 4-browser, 10-scene loop (hunt_cpu_per_browser.py): ours, stockheaded, ours_vmretail, 2 rounds, alternating.
|
||||
# 5. A profile of OUR GPU process with NO thread filter (MOZ_PROFILER_STARTUP_FILTERS=*), small buffer, 3 rounds: every thread of the GPU process with
|
||||
# its self weight by module, and the weight of the unnamed threads by module (are they d3d10warp.dll?).
|
||||
# 6. The wrapper's own byte suites (canvas_*, webgl_*, ...) under ours and under ours_vmretail (scripts/hunt_extra_prefs_plugin.py), outcome per test.
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: cpu render path hunt vm
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_vmretail.py
|
||||
- scripts/hunt_cpu_render_path.py
|
||||
- scripts/hunt_cpu_per_browser.py
|
||||
- scripts/hunt_cpu_baseline.py
|
||||
- scripts/hunt_page_bytes.py
|
||||
- scripts/hunt_page_bytes_probe.js
|
||||
- scripts/hunt_extra_prefs_plugin.py
|
||||
- scripts/hunt_profile_summary.py
|
||||
- scripts/hunt_fetch_symbols.py
|
||||
- .github/workflows/cpu-render-path-hunt-vm.yml
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
symbols_run:
|
||||
description: "Run id of the engine's release.yml whose symbols-win-x86_64 artifact matches the binary (empty: look through the recent runs)"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: cpu-render-path-hunt-vm-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, ours_vmretail - retail's VM decisions, where compositing runs, page bytes, GPU process profile)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 200
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper, psutil, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: Where the prefs of ours_vmretail are written
|
||||
run: echo "HUNT_VMRETAIL_PREFS=$RUNNER_TEMP/vm/vmretail/prefs.json" >> "$GITHUB_ENV"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 0. the arm ours_vmretail
|
||||
- name: "0. Build ours_vmretail (the declared table of ours, the decisions of stock, the prefs)"
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_vmretail.py build --binary "$FF" --out "$RUNNER_TEMP/vm/vmretail" | tee "$RUNNER_TEMP/vm/vmretail-build.txt"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 1. did the prefs take effect, where does it composite
|
||||
- name: "1. Compositing facts, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm ours --binary "$FF" --out "$RUNNER_TEMP/vm/support"
|
||||
- name: "1. Compositing facts, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm stockheaded --out "$RUNNER_TEMP/vm/support"
|
||||
- name: "1. Compositing facts, arm ours_vmretail (the prefs read back)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm ours_vmretail --binary "$FF" --out "$RUNNER_TEMP/vm/support"
|
||||
- name: "1. Graphics diff, ours_vmretail against stockheaded (is it the same compositing as stock now?)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mkdir -p "$RUNNER_TEMP/vm/support-vm"
|
||||
rm -rf "$RUNNER_TEMP/vm/support-vm/ours" "$RUNNER_TEMP/vm/support-vm/stockheaded"
|
||||
cp -r "$RUNNER_TEMP/vm/support/ours_vmretail" "$RUNNER_TEMP/vm/support-vm/ours"
|
||||
cp -r "$RUNNER_TEMP/vm/support/stockheaded" "$RUNNER_TEMP/vm/support-vm/stockheaded"
|
||||
python -u scripts/hunt_cpu_render_path.py diff "$RUNNER_TEMP/vm/support-vm" | tee "$RUNNER_TEMP/vm/support-vm/diff.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 2. one browser, 20 s: CPU by process and thread
|
||||
- name: "2. Baseline, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm stockheaded --out "$RUNNER_TEMP/vm/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Baseline, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm ours --binary "$FF" --out "$RUNNER_TEMP/vm/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Baseline, arm ours_vmretail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm ours_vmretail --binary "$FF" --out "$RUNNER_TEMP/vm/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Baseline, arm ours_swwr"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm ours_swwr --binary "$FF" --out "$RUNNER_TEMP/vm/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Baseline comparison and where compositing runs"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python scripts/hunt_cpu_baseline.py --compare "$RUNNER_TEMP/vm/baseline" | tee "$RUNNER_TEMP/vm/baseline/compare.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 3. page-readable bytes
|
||||
- name: "3. Page-readable bytes, arm ours (2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours --binary "$FF" --launches 2 --out "$RUNNER_TEMP/vm/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. Page-readable bytes, arm ours_vmretail (2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours_vmretail --binary "$FF" --launches 2 --out "$RUNNER_TEMP/vm/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. Page-readable bytes, ours against ours_vmretail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_page_bytes.py diff "$RUNNER_TEMP/vm/pagebytes" --a ours --b ours_vmretail | tee "$RUNNER_TEMP/vm/pagebytes/diff.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 4. CPU of the 4-browser loop
|
||||
- name: "4. CPU by process type, ours, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours --binary "$FF" --round 1 --out "$RUNNER_TEMP/vm/cpu/ours-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. CPU by process type, stockheaded, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm stockheaded --round 1 --out "$RUNNER_TEMP/vm/cpu/stockheaded-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. CPU by process type, ours_vmretail, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours_vmretail --binary "$FF" --round 1 --out "$RUNNER_TEMP/vm/cpu/ours_vmretail-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. CPU by process type, ours, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours --binary "$FF" --round 2 --out "$RUNNER_TEMP/vm/cpu/ours-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. CPU by process type, stockheaded, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm stockheaded --round 2 --out "$RUNNER_TEMP/vm/cpu/stockheaded-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. CPU by process type, ours_vmretail, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours_vmretail --binary "$FF" --round 2 --out "$RUNNER_TEMP/vm/cpu/ours_vmretail-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. Comparison table"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python scripts/hunt_cpu_per_browser.py --compare "$RUNNER_TEMP/vm/cpu" | tee "$RUNNER_TEMP/vm/cpu/compare.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 5. our GPU process, every thread
|
||||
- name: "5. Gecko profile of our GPU process, NO thread filter (MOZ_PROFILER_STARTUP_FILTERS=*), small buffer, 3 rounds"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py profile --arm ours --binary "$FF" --gpu --filters '*' --out "$RUNNER_TEMP/vm/profiles-gpu-all"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "5. Symbols of our engine (artifact symbols-win-x86_64 of the engine's release.yml)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
P="$RUNNER_TEMP/vm/profiles-gpu-all"
|
||||
ID="$(python scripts/hunt_profile_summary.py "$P/ours" --ids | awk '$3=="xul.dll"{print $2}' | head -1)"
|
||||
echo "breakpad id of our xul.dll in the profile: '$ID'"
|
||||
if [ -z "$ID" ]; then echo "SYMBOLS: none (no id: no parent profile of ours)"; exit 0; fi
|
||||
python scripts/hunt_fetch_symbols.py --id "$ID" --run "${{ inputs.symbols_run }}" --out "$RUNNER_TEMP/vm/symbols" | tee "$RUNNER_TEMP/vm/symbols.log"
|
||||
- name: "5. Summary of the GPU process: every thread, its self weight by module, the unnamed threads, the top functions"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
P="$RUNNER_TEMP/vm/profiles-gpu-all/ours"
|
||||
SYM=$(ls "$RUNNER_TEMP"/vm/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
python -u scripts/hunt_profile_summary.py "$P" ${SYM:+--symbols "$SYM"} --only gpu --detail 2 --thread-table --threads 8 --top 20 | tee "$P/summary-gpu-all.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ 6. the wrapper's byte suites
|
||||
- name: "6. The wrapper's byte suites, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 35
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}/scripts
|
||||
INVPW_BINARY_PATH: ${{ env.FF }}
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog-suites.log
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
D="$RUNNER_TEMP/vm/suites"; mkdir -p "$D"
|
||||
FILES=$(ls tests/test_canvas_*.py tests/test_webgl_*.py tests/test_a_declared_webgl_extension_survives_its_use_e2e.py \
|
||||
tests/test_fingerprint_surface.py tests/test_fingerprint_consistency.py tests/test_system_fonts_and_colors_are_windows_e2e.py \
|
||||
tests/test_css_calc_is_windows_e2e.py tests/test_screenshot_of_text_returns_linux_e2e.py | sort -u)
|
||||
echo "$FILES" > "$D/files.txt"; echo "$FILES" | wc -l
|
||||
python -u -m pytest $FILES -o addopts= -p no:cacheprovider -p hunt_extra_prefs_plugin -q -rs --junitxml="$D/ours.xml" 2>&1 | tee "$D/ours.log" | tail -60
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "6. The wrapper's byte suites, arm ours_vmretail (HUNT_EXTRA_PREFS = the prefs of hunt_vmretail.py build)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 35
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}/scripts
|
||||
INVPW_BINARY_PATH: ${{ env.FF }}
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog-suites.log
|
||||
HUNT_EXTRA_PREFS_LOG: ${{ runner.temp }}/vm/suites/ours_vmretail-prefs.log
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
D="$RUNNER_TEMP/vm/suites"; mkdir -p "$D"
|
||||
export HUNT_EXTRA_PREFS="$(python scripts/hunt_vmretail.py prefs-json "$HUNT_VMRETAIL_PREFS")"
|
||||
echo "HUNT_EXTRA_PREFS has $(echo -n "$HUNT_EXTRA_PREFS" | wc -c) characters"
|
||||
FILES=$(cat "$D/files.txt" 2>/dev/null || true)
|
||||
[ -n "$FILES" ] || FILES=$(ls tests/test_canvas_*.py tests/test_webgl_*.py)
|
||||
python -u -m pytest $FILES -o addopts= -p no:cacheprovider -p hunt_extra_prefs_plugin -q -rs --junitxml="$D/ours_vmretail.xml" 2>&1 | tee "$D/ours_vmretail.log" | tail -60
|
||||
echo "browsers constructed with the prefs: $(wc -l < "$D/ours_vmretail-prefs.log" 2>/dev/null || echo 0)"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "6. The wrapper's byte suites, outcome per test in both arms"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
D="$RUNNER_TEMP/vm/suites"
|
||||
python scripts/hunt_page_bytes.py suites "$D/ours.xml" "$D/ours_vmretail.xml" --b-name ours_vmretail | tee "$D/suites-diff.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: cpu-render-path-hunt-vm-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/vm
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -1,330 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# cpu-render-path-hunt.yml - HUNT ONLY, never merged: why does our Firefox use ~6x the CPU of stock Firefox 159 with a window, on Windows?
|
||||
# (measured per browser: parent 8.8 s against 1.7, GPU process 4.9 against 0.03, tab 0.84 against 0.58.) Nothing of the product is changed.
|
||||
#
|
||||
# Two arms, as in cpu-per-browser-hunt: `ours` = invisible_playwright, headless=True (on Windows: headed Firefox on a hidden desktop) and
|
||||
# `stockheaded` = stock Playwright, firefox.launch(headless=False). One job, windows-2022, in this order:
|
||||
# 1. scripts/hunt_cpu_render_path.py support, then diff: the full about:support text of each browser (page.goto("about:support") through
|
||||
# the wire; if that is refused, Troubleshoot.snapshot() through Marionette in chrome scope, and the job says which route worked), the
|
||||
# effective prefs, the profile's prefs.js and user.js, the parent's environment, and the diff of the Graphics section (compositing,
|
||||
# WebRender hardware/software, D3D11/WARP, GPU process, the feature decisions and their reasons, the differing gfx.* / layers.* prefs).
|
||||
# 3. the CPU by process type of hunt_cpu_per_browser.py, ours and stockheaded, 2 rounds each, alternating (the sanity check).
|
||||
# 2. scripts/hunt_cpu_render_path.py profile: the same 4-browser, 10-scene loop with the Gecko profiler on from startup in every process
|
||||
# (MOZ_PROFILER_STARTUP, STARTUP_FEATURES, MOZ_PROFILER_SHUTDOWN=<dir>/profile-%p.json: one file per process). It runs AFTER the CPU
|
||||
# rounds because the profiler slows the browsers. scripts/hunt_profile_summary.py prints, for the busiest parent and GPU process of each
|
||||
# arm, the CPU by thread, by module and by function. Symbols: for ours, the Breakpad symbols of the artifact symbols-win-x86_64 of a
|
||||
# recent release.yml run of the engine's repository, if one still exists and its xul.pdb id matches the binary (scripts/
|
||||
# hunt_fetch_symbols.py; a candidate's are kept 2 days, a release's 14); for every module the zips do not have, Mozilla's symbol server.
|
||||
# Where a module cannot be symbolicated the summary says so and prints module+offset; the raw profiles are always in the artifact.
|
||||
# 4. (second round of the hunt) the baseline of the parent: scripts/hunt_cpu_baseline.py, ONE browser for 20 s, three arms: `retail` (Mozilla's own
|
||||
# Firefox installer of the stable release, unpacked with 7-Zip and launched by hand with subprocess, -no-remote, a fresh profile, the scene
|
||||
# URL, no automation, no Playwright; if it cannot be had the step falls back to Playwright's firefox-1572 and says so), `ours`, and
|
||||
# `ours_reused` (ours twice on the same persistent profile, profile_dir=). CPU per process type (the sampler) and per thread name (psutil
|
||||
# threads + GetThreadDescription) in the whole window and in its last 10 s; the command line of every short-lived process.
|
||||
# 5. `ours_swwr` = ours with gfx.webrender.software=true, passed ONLY by the hunt through extra_prefs: its compositing facts (support), its CPU
|
||||
# per process type next to ours and stockheaded (step 3 gains two rounds of it), and whether ANY byte a page reads differs from ours:
|
||||
# scripts/hunt_page_bytes.py (canvas 2D, WebGL 1/2, text, strings, in both arms, launched twice each, diffed) and the wrapper's own byte
|
||||
# suites (canvas_*, webgl_*, canvas text, fingerprint_*, system fonts, css calc) under both arms through scripts/hunt_extra_prefs_plugin.py.
|
||||
# 6. A readable profile of OUR GPU process only (profile --gpu): the profiler's thread filter limited to the GPU process's threads, a small buffer,
|
||||
# 3 rounds, and the run waits for every process to exit before reading the files (the first GPU profile came back truncated).
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: cpu render path hunt
|
||||
|
||||
# Dispatch only since the second round: its scripts are shared with cpu-render-path-hunt-vm.yml and encoding-stability-hunt.yml, which start on push
|
||||
# to this branch, and a 2 h Windows run must not start again on every push that touches a shared script.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
symbols_run:
|
||||
description: "Run id of the engine's release.yml whose symbols-win-x86_64 artifact matches the binary (empty: look through the recent runs)"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: cpu-render-path-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Engine and GeoIP downloads go through the release API with this token (as in e2e.yml).
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, ours vs stock headed vs retail - about:support, CPU by process type, baseline, software WebRender, Gecko profiles)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 170
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper, psutil, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
|
||||
# ------------------------------------------------------------------------------------------------- 1. about:support
|
||||
- name: "1. about:support, prefs and environment, arm ours"
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm ours --binary "$FF" --out "$RUNNER_TEMP/render-hunt/support"
|
||||
- name: "1. about:support, prefs and environment, arm stockheaded"
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm stockheaded --out "$RUNNER_TEMP/render-hunt/support"
|
||||
- name: "1. Graphics diff, ours against stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_cpu_render_path.py diff "$RUNNER_TEMP/render-hunt/support" | tee "$RUNNER_TEMP/render-hunt/support/diff.txt"
|
||||
|
||||
- name: "5. Compositing facts of ours_swwr (does gfx.webrender.software=true from the hunt really take effect?)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py support --arm ours_swwr --binary "$FF" --out "$RUNNER_TEMP/render-hunt/support"
|
||||
|
||||
# --------------------------------------------------------------------------------- 4. the baseline of the parent (one browser, 20 s)
|
||||
- name: "4. Baseline, arm retail (Mozilla's Firefox, launched by hand, no automation)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm retail --out "$RUNNER_TEMP/render-hunt/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. Baseline, arm ours (fresh temporary profile)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm ours --binary "$FF" --out "$RUNNER_TEMP/render-hunt/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. Baseline, arm ours_reused (the same persistent profile twice; the second launch is measured)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_baseline.py --arm ours_reused --binary "$FF" --out "$RUNNER_TEMP/render-hunt/baseline"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "4. Baseline comparison table"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python scripts/hunt_cpu_baseline.py --compare "$RUNNER_TEMP/render-hunt/baseline" | tee "$RUNNER_TEMP/render-hunt/baseline/compare.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------- 3. CPU by process type (sanity)
|
||||
- name: "3. CPU by process type, ours, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours --binary "$FF" --round 1 --out "$RUNNER_TEMP/render-hunt/cpu/ours-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. CPU by process type, stockheaded, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm stockheaded --round 1 --out "$RUNNER_TEMP/render-hunt/cpu/stockheaded-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. CPU by process type, ours_swwr, round 1"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours_swwr --binary "$FF" --round 1 --out "$RUNNER_TEMP/render-hunt/cpu/ours_swwr-1.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. CPU by process type, ours, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours --binary "$FF" --round 2 --out "$RUNNER_TEMP/render-hunt/cpu/ours-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. CPU by process type, stockheaded, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm stockheaded --round 2 --out "$RUNNER_TEMP/render-hunt/cpu/stockheaded-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. CPU by process type, ours_swwr, round 2"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_per_browser.py --arm ours_swwr --binary "$FF" --round 2 --out "$RUNNER_TEMP/render-hunt/cpu/ours_swwr-2.json"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "3. Comparison table"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python scripts/hunt_cpu_per_browser.py --compare "$RUNNER_TEMP/render-hunt/cpu" | tee "$RUNNER_TEMP/render-hunt/cpu/compare.txt"
|
||||
|
||||
# ------------------------------------------------------------------------- 5. does any byte a page reads change with software WebRender?
|
||||
- name: "5. Page-readable bytes, arm ours (canvas 2D, WebGL 1/2, text, strings; 2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours --binary "$FF" --launches 2 --out "$RUNNER_TEMP/render-hunt/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "5. Page-readable bytes, arm ours_swwr (2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours_swwr --binary "$FF" --launches 2 --out "$RUNNER_TEMP/render-hunt/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "5. Page-readable bytes, ours against ours_swwr"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_page_bytes.py diff "$RUNNER_TEMP/render-hunt/pagebytes" | tee "$RUNNER_TEMP/render-hunt/pagebytes/diff.txt"
|
||||
|
||||
# -------------------------------------------------------------------------------------------- 2. the Gecko profiles
|
||||
- name: "2. Gecko profiles of the 10-scene loop, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py profile --arm ours --binary "$FF" --out "$RUNNER_TEMP/render-hunt/profiles"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Gecko profiles of the 10-scene loop, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py profile --arm stockheaded --out "$RUNNER_TEMP/render-hunt/profiles"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Symbols of our engine (artifact symbols-win-x86_64 of the engine's release.yml)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
P="$RUNNER_TEMP/render-hunt/profiles"
|
||||
ID="$(python scripts/hunt_profile_summary.py "$P/ours" --ids | awk '$3=="xul.dll"{print $2}' | head -1)"
|
||||
echo "breakpad id of our xul.dll in the profile: '$ID'"
|
||||
if [ -z "$ID" ]; then echo "SYMBOLS: none (no id: no parent profile of ours)"; exit 0; fi
|
||||
python scripts/hunt_fetch_symbols.py --id "$ID" --run "${{ inputs.symbols_run }}" --out "$RUNNER_TEMP/render-hunt/symbols" | tee "$RUNNER_TEMP/render-hunt/symbols.log"
|
||||
- name: "2. Profile summary, ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
P="$RUNNER_TEMP/render-hunt/profiles"
|
||||
SYM=$(ls "$RUNNER_TEMP"/render-hunt/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
python -u scripts/hunt_profile_summary.py "$P/ours" ${SYM:+--symbols "$SYM"} | tee "$P/summary-ours.txt"
|
||||
- name: "2. Profile summary, stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
P="$RUNNER_TEMP/render-hunt/profiles"
|
||||
python -u scripts/hunt_profile_summary.py "$P/stockheaded" | tee "$P/summary-stockheaded.txt"
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------- 6. a readable profile of OUR GPU process
|
||||
- name: "6. Gecko profile of our GPU process only (filtered threads, small buffer, 3 rounds)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_cpu_render_path.py profile --arm ours --binary "$FF" --gpu --out "$RUNNER_TEMP/render-hunt/profiles-gpu"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "6. Summary of the GPU process: self time by module and the top functions"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
P="$RUNNER_TEMP/render-hunt/profiles-gpu/ours"
|
||||
SYM=$(ls "$RUNNER_TEMP"/render-hunt/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
if [ -z "$SYM" ]; then
|
||||
ID="$(python scripts/hunt_profile_summary.py "$P" --ids | awk '$3=="xul.dll"{print $2}' | head -1)"
|
||||
echo "no symbols from step 2; breakpad id of our xul.dll in the GPU run: '$ID'"
|
||||
if [ -n "$ID" ]; then python scripts/hunt_fetch_symbols.py --id "$ID" --run "${{ inputs.symbols_run }}" --out "$RUNNER_TEMP/render-hunt/symbols" | tee "$RUNNER_TEMP/render-hunt/symbols-gpu.log"; fi
|
||||
SYM=$(ls "$RUNNER_TEMP"/render-hunt/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
fi
|
||||
python -u scripts/hunt_profile_summary.py "$P" ${SYM:+--symbols "$SYM"} --only gpu --detail 2 --threads 6 --top 20 | tee "$P/summary-gpu.txt"
|
||||
|
||||
# ----------------------------------------------------- 5b. the wrapper's own byte suites under both arms (the pref goes in through a plugin)
|
||||
- name: "5. The wrapper's byte suites, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
PYTHONPATH: ${{ github.workspace }}/scripts
|
||||
INVPW_BINARY_PATH: ${{ env.FF }}
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog-suites.log
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
D="$RUNNER_TEMP/render-hunt/suites"; mkdir -p "$D"
|
||||
FILES=$(ls tests/test_canvas_*.py tests/test_webgl_*.py tests/test_a_declared_webgl_extension_survives_its_use_e2e.py \
|
||||
tests/test_fingerprint_surface.py tests/test_fingerprint_consistency.py tests/test_system_fonts_and_colors_are_windows_e2e.py \
|
||||
tests/test_css_calc_is_windows_e2e.py tests/test_screenshot_of_text_returns_linux_e2e.py | sort -u)
|
||||
echo "$FILES" > "$D/files.txt"; echo "$FILES" | wc -l
|
||||
python -u -m pytest $FILES -o addopts= -p no:cacheprovider -p hunt_extra_prefs_plugin -q -rs --junitxml="$D/ours.xml" 2>&1 | tee "$D/ours.log" | tail -60
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "5. The wrapper's byte suites, arm ours_swwr (HUNT_EXTRA_PREFS gfx.webrender.software=true)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
PYTHONPATH: ${{ github.workspace }}/scripts
|
||||
INVPW_BINARY_PATH: ${{ env.FF }}
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog-suites.log
|
||||
HUNT_EXTRA_PREFS: '{"gfx.webrender.software": true}'
|
||||
HUNT_EXTRA_PREFS_LOG: ${{ runner.temp }}/render-hunt/suites/ours_swwr-prefs.log
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
D="$RUNNER_TEMP/render-hunt/suites"; mkdir -p "$D"
|
||||
FILES=$(cat "$D/files.txt" 2>/dev/null || true)
|
||||
[ -n "$FILES" ] || FILES=$(ls tests/test_canvas_*.py tests/test_webgl_*.py)
|
||||
python -u -m pytest $FILES -o addopts= -p no:cacheprovider -p hunt_extra_prefs_plugin -q -rs --junitxml="$D/ours_swwr.xml" 2>&1 | tee "$D/ours_swwr.log" | tail -60
|
||||
echo "browsers constructed with the pref: $(wc -l < "$D/ours_swwr-prefs.log" 2>/dev/null || echo 0)"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "5. The wrapper's byte suites, outcome per test in both arms"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
D="$RUNNER_TEMP/render-hunt/suites"
|
||||
python scripts/hunt_page_bytes.py suites "$D/ours.xml" "$D/ours_swwr.xml" | tee "$D/suites-diff.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results (about:support, prefs, CPU numbers, summaries, raw gzipped profiles)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: cpu-render-path-hunt-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/render-hunt/support
|
||||
${{ runner.temp }}/render-hunt/cpu
|
||||
${{ runner.temp }}/render-hunt/profiles
|
||||
${{ runner.temp }}/render-hunt/profiles-gpu
|
||||
${{ runner.temp }}/render-hunt/baseline
|
||||
${{ runner.temp }}/render-hunt/pagebytes
|
||||
${{ runner.temp }}/render-hunt/suites
|
||||
${{ runner.temp }}/render-hunt/symbols.log
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
+5
-173
@@ -6,7 +6,8 @@
|
||||
# launched Firefox in true HEADLESS mode, which is content-process unstable on
|
||||
# the hosted runners (eval-CSP / context-destroyed). The stealth wrapper instead
|
||||
# launches Firefox HEADED on a real display; under `xvfb-run` (a virtual X
|
||||
# server) that's exactly what we get on a headless CI box - stable.
|
||||
# server) that's exactly what we get on a headless CI box - stable, and the same
|
||||
# thing webrtc-e2e.yml already relies on.
|
||||
#
|
||||
# Secret-free, so it's safe in public CI: the binary is the PUBLIC firefox-9
|
||||
# release (no token), and the webrtc e2e fake a local TCP-only SOCKS. The proxy
|
||||
@@ -124,14 +125,7 @@ jobs:
|
||||
# The generator moved into the core with the module it writes (0.30.0),
|
||||
# so the check runs against the core this package installs.
|
||||
run: python -m invisible_core.juggler._gen_protocol --check --binary "$(dirname "$FF")"
|
||||
# The GeoIP database is made by the repository (scripts/ci_lab_geoip.py: the same bytes on every run, the sha256 in ci/geoip.json), never a
|
||||
# site and never a licensed file: without STEALTHFOX_GEOIP_MMDB the core asks GitHub which database is the latest on every call
|
||||
# (run 43211837926). The variable reaches every later step of the job.
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
shell: bash
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
|
||||
- name: Run the full e2e suite under a virtual display, without the root ones
|
||||
- name: Run the full e2e suite under a virtual display
|
||||
# PYTHONUNBUFFERED, and it is not a nicety. Without it Python block-buffers
|
||||
# stdout when it is a pipe, and this step printed NOTHING for 39 minutes
|
||||
# before the 40-minute timeout killed it on 2026-08-04: a run with no
|
||||
@@ -147,94 +141,9 @@ jobs:
|
||||
# the descriptors at the system level: whatever is captured is lost
|
||||
# when the process is killed, which is exactly the case it exists for.
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog.log
|
||||
ROOT_FILES: tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py
|
||||
ROOT_NODES: tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick
|
||||
SANDBOX_FILES: tests/test_the_socket_process_is_sandboxed_e2e.py
|
||||
# The root ones are left out by name and run in the step below, as root: here, as the runner user, they errored. The sandbox one is left out
|
||||
# by name too and runs in its own step after them: it is red on a runner whose AppArmor refuses user namespaces to a normal user.
|
||||
run: |
|
||||
IGNORE=(); for f in $ROOT_FILES $SANDBOX_FILES; do IGNORE+=("--ignore=$f"); done
|
||||
DESELECT=(); for n in $ROOT_NODES; do DESELECT+=("--deselect=$n"); done
|
||||
xvfb-run -a python -u scripts/run_e2e.py "$FF" "${IGNORE[@]}" "${DESELECT[@]}"
|
||||
run: xvfb-run -a python -u scripts/run_e2e.py "$FF"
|
||||
|
||||
# THE ROOT SUITE, AS THE GATE RUNS IT (wrapper.e2e.udp.exit in ci/required-suites.json). Seven e2e need root: the exit of the lab is a documentation
|
||||
# address (198.51.100.9) added to `lo` with `ip addr add`. Collected here as the runner user they ERRORED (run 43262636367: "cannot hold 198.51.100.9
|
||||
# on lo (needs root and iproute2 on Linux)"), so the run above leaves them out by name (ROOT_FILES / ROOT_NODES) and this step runs them, and only
|
||||
# them, the way the gate does: the engine copied to /opt/ff (the socket process execs inside a new user namespace, where the runner's 750 home is not
|
||||
# readable), `sudo -H -E env -u XDG_RUNTIME_DIR` (Firefox refuses to run as root in a regular user's session), no rerun plugin. Nothing is skipped
|
||||
# silently: the step reads its own junit and refuses anything but exactly that many tests, all passed.
|
||||
# AFTER the run of the runner user, never before it (run 43271443150 of PR 483: with this step first, every launch of the run that followed
|
||||
# waited for the browser's readiness line until its timeout, and the job was cancelled at 40 minutes; the same head without the step had 748
|
||||
# green). Whatever root leaves behind (files under the runner's home or /tmp, /etc/resolv.conf, an address on lo) cannot reach a launch of the
|
||||
# runner user any more; the step after this one prints what it left, and decides nothing.
|
||||
# tests/test_the_root_e2e_run_in_the_root_step_and_nowhere_else.py holds the two lists, this step and the run above to the suite's list, and the order.
|
||||
- name: The root e2e (wrapper.e2e.udp.exit), as root, as the gate runs them
|
||||
if: success() || failure()
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
ROOT_FILES: tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py
|
||||
ROOT_NODES: tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick
|
||||
ROOT_TESTS: "7"
|
||||
run: |
|
||||
sudo rm -rf /opt/ff
|
||||
sudo cp -a "$(dirname "$FF")" /opt/ff
|
||||
sudo chown -R root:root /opt/ff
|
||||
sudo chmod -R go+rX /opt/ff
|
||||
ROOT_FF="/opt/ff/$(basename "$FF")"
|
||||
JUNIT="${RUNNER_TEMP}/root-e2e.xml"
|
||||
sudo -H -E env -u PYTEST_ADDOPTS -u XDG_RUNTIME_DIR INVPW_REQUIRE_TRAP=1 "PATH=$PATH" INVPW_BINARY_PATH="$ROOT_FF" STEALTHFOX_E2E_BINARY="$ROOT_FF" python -m pytest $ROOT_FILES $ROOT_NODES -m e2e -o addopts='' -o junit_family=xunit2 -q -p no:cacheprovider -p no:rerunfailures -rs --junitxml="$JUNIT" || true
|
||||
python - <<'PY'
|
||||
import os, sys, xml.etree.ElementTree as ET
|
||||
root = ET.parse(os.path.join(os.environ["RUNNER_TEMP"], "root-e2e.xml")).getroot()
|
||||
suite = root if root.tag == "testsuite" else root.find("testsuite")
|
||||
counts = {k: int(suite.get(k, 0)) for k in ("tests", "failures", "errors", "skipped")}
|
||||
print("root e2e:", counts)
|
||||
if counts["tests"] != int(os.environ["ROOT_TESTS"]) or counts["failures"] or counts["errors"] or counts["skipped"]:
|
||||
sys.exit("the root e2e must be exactly %s tests, all passed: %s" % (os.environ["ROOT_TESTS"], counts))
|
||||
PY
|
||||
# THE SANDBOX E2E (wrapper.e2e.udp.sandbox), as the gate runs its first file: the browser WITH its sandbox, run by the runner user. On this runner AppArmor
|
||||
# refuses user namespaces to a normal user (kernel.apparmor_restrict_unprivileged_userns=1), so the browser of every other step starts WITHOUT the sandbox
|
||||
# of its socket and content processes, and tests/test_the_socket_process_is_sandboxed_e2e.py (which fails unless both have a seccomp filter) can only
|
||||
# be green after the restriction is turned off. It is left out of the run above by name (SANDBOX_FILES) so that it cannot fail on a runner without the
|
||||
# sysctl, and it runs here, after the run and the root step (whatever the sysctl changes cannot reach a launch of the run), as the runner user. Nothing
|
||||
# is skipped silently: the step reads its own junit and refuses anything but exactly that many tests, all passed.
|
||||
# tests/test_the_sandbox_e2e_runs_where_user_namespaces_are_on.py holds this step, the exclusion above and the order.
|
||||
- name: The sandbox e2e (wrapper.e2e.udp.sandbox), with unprivileged user namespaces on
|
||||
if: success() || failure()
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
SANDBOX_FILES: tests/test_the_socket_process_is_sandboxed_e2e.py
|
||||
SANDBOX_TESTS: "1"
|
||||
run: |
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
JUNIT="${RUNNER_TEMP}/sandbox-e2e.xml"
|
||||
xvfb-run -a env -u PYTEST_ADDOPTS INVPW_BINARY_PATH="$FF" STEALTHFOX_E2E_BINARY="$FF" python -m pytest $SANDBOX_FILES -m e2e -o addopts='' -o junit_family=xunit2 -q -p no:cacheprovider -p no:rerunfailures -rs --junitxml="$JUNIT" || true
|
||||
python - <<'PY'
|
||||
import os, sys, xml.etree.ElementTree as ET
|
||||
root = ET.parse(os.path.join(os.environ["RUNNER_TEMP"], "sandbox-e2e.xml")).getroot()
|
||||
suite = root if root.tag == "testsuite" else root.find("testsuite")
|
||||
counts = {k: int(suite.get(k, 0)) for k in ("tests", "failures", "errors", "skipped")}
|
||||
print("sandbox e2e:", counts)
|
||||
if counts["tests"] != int(os.environ["SANDBOX_TESTS"]) or counts["failures"] or counts["errors"] or counts["skipped"]:
|
||||
sys.exit("the sandbox e2e must be exactly %s tests, all passed: %s" % (os.environ["SANDBOX_TESTS"], counts))
|
||||
PY
|
||||
- name: What the root step left behind (diagnostic, decides nothing)
|
||||
if: always()
|
||||
run: |
|
||||
echo "-- files owned by root under the runner's home and /tmp"; sudo find /home/runner /tmp -maxdepth 3 -user root 2>/dev/null | head -40 || true
|
||||
echo "-- /etc/resolv.conf"; cat /etc/resolv.conf || true
|
||||
echo "-- lo"; ip -4 addr show lo || true
|
||||
|
||||
# The leg ran with the pinned database, and the core never went past it to GitHub (tests/geoip_used.py wrote what it did).
|
||||
- name: The leg ran with the pinned GeoIP database
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
python scripts/ci_lab_geoip.py evidence --out "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" > /dev/null
|
||||
python scripts/ci_lab_geoip.py verify --evidence "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" --used "$GEOIP_USED_OUT"
|
||||
|
||||
|
||||
# Runs ONLY if the full run above fails, and before 2026-08-13 it could not
|
||||
# Runs ONLY if the step above fails, and before 2026-08-13 it could not
|
||||
# exist: the hang was killed by the 40-minute ceiling, so the job came out
|
||||
# `cancelled` and the following steps did not start at all. With
|
||||
# `--timeout 420 --timeout-method thread` the process dies at 7 minutes and the
|
||||
@@ -302,80 +211,3 @@ jobs:
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
run: INVPW_BINARY_PATH="$FF" python -u -m pytest -m e2e -p no:cacheprovider -v tests/test_control_a_selects_all_in_a_field_e2e.py
|
||||
|
||||
# THE SAME e2e ON WINDOWS (Federico, 12/11: every test of the product runs on Linux AND Windows; where Windows behaves
|
||||
# differently the test adapts to the system). Before this, 562 of the 808 e2e had never run on Windows in any round. The census
|
||||
# of 12/11 (run 43307193708) took ~50 minutes in one job, so the files are split in four parts (the sorted list, every fourth
|
||||
# file: a split that does not move when a file is added elsewhere). Left out, by name, are the suites ci/required-suites.json
|
||||
# declares `linux_only` (the reason is on the row); tests/test_every_suite_runs_on_linux_and_windows.py holds both together.
|
||||
e2e-windows:
|
||||
name: e2e (windows, part ${{ matrix.part }})
|
||||
needs: core-on-index
|
||||
if: needs.core-on-index.outputs.available == 'true' && inputs.only != 'windows-control-a'
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
part: [1, 2, 3, 4]
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install wrapper + test deps (+ Playwright ONLY as a system tool)
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]"
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
# The GeoIP database made by the repository, as on the Linux run (no download, the same bytes every run).
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: The files of this part, without the linux_only suites
|
||||
run: |
|
||||
set -e
|
||||
python -m pytest --collect-only -q -m e2e -o addopts= -p no:cacheprovider 2>/dev/null | grep "::" | cut -d: -f1 | sort -u > "$RUNNER_TEMP/e2e_files.txt"
|
||||
python - "${{ matrix.part }}" "$RUNNER_TEMP" <<'PY'
|
||||
import json, os, sys
|
||||
part, tmp = int(sys.argv[1]), sys.argv[2]
|
||||
rows = json.load(open("ci/required-suites.json", encoding="utf-8"))
|
||||
left_out = [t for r in rows if r.get("linux_only") for t in r["tests"]]
|
||||
files = [l.strip() for l in open(os.path.join(tmp, "e2e_files.txt")) if l.strip()]
|
||||
files = [f for f in files if f not in left_out]
|
||||
mine = [f for i, f in enumerate(files) if i % 4 == part - 1]
|
||||
nodes = [t for t in left_out if "::" in t and t.split("::")[0] in mine]
|
||||
open(os.path.join(tmp, "e2e_args.txt"), "w").write("\n".join(mine + ["--deselect=" + n for n in nodes]) + "\n")
|
||||
print("%d e2e files, %d left out as linux_only, %d in part %d, %d node(s) deselected"
|
||||
% (len(files) + len([t for t in left_out if "::" not in t]), len(left_out), len(mine), part, len(nodes)))
|
||||
PY
|
||||
- name: Run this part of the e2e
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog.log
|
||||
run: |
|
||||
mapfile -t ARGS < <(tr -d '\r' < "$RUNNER_TEMP/e2e_args.txt")
|
||||
python -u scripts/run_e2e.py "$FF" "${ARGS[@]}"
|
||||
- name: The leg ran with the pinned GeoIP database
|
||||
if: always()
|
||||
run: |
|
||||
python scripts/ci_lab_geoip.py evidence --out "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" > /dev/null
|
||||
python scripts/ci_lab_geoip.py verify --evidence "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" --used "$GEOIP_USED_OUT"
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the hang evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: e2e-watchdog-windows-${{ matrix.part }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: ${{ runner.temp }}/e2e-watchdog.log
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -1,177 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# encoding-stability-hunt.yml - HUNT ONLY, never merged: "same seed, same bytes" for the PNG of the canvas. Nothing of the product is changed.
|
||||
#
|
||||
# In scripts/hunt_page_bytes.py (seed 42, two launches of the same arm) 11 keys were not stable: the PNG (toDataURL, toBlob, convertToBlob) of the 2D
|
||||
# scenes shapes, composite, image and text, of the OffscreenCanvas and of the WebGL 1 and 2 triangle. Their pixels (getImageData, readPixels), JPEG and
|
||||
# WebP were stable. Questions, per key:
|
||||
# - do the PIXELS differ, or only the encoding? (the probe's ENCODING MODE puts the pixels of the draw, the raw bytes of three toDataURL and three toBlob
|
||||
# in one page, and the pixels the browser decodes from the first PNG; scripts/hunt_encoding.py reads the PNG chunks, inflates and unfilters the IDATs)
|
||||
# - is the difference between two launches on one runner, and also between two runners? (a 2-leg matrix, windows-2022, max-parallel 2; the job
|
||||
# `compare` reads both legs)
|
||||
# - does it happen with the published invisible-playwright 0.52.0 (its own venv, its own binary), and with stock Playwright's firefox (headed and
|
||||
# headless)?
|
||||
# - is the probe at fault? (anything time-, random- or order-dependent in what it draws: three calls on the same canvas in the same page say so)
|
||||
# The arms: ours (this checkout's wrapper with the published binary of the job), ours_pypi052, stockheaded, stockheadless and, from the second run,
|
||||
# `retail` (Mozilla's Firefox 159.0 installer, checked against its SHA256SUMS, launched by hand: subprocess, -no-remote, a fresh profile, no automation);
|
||||
# two launches each.
|
||||
#
|
||||
# FINDING OF THE FIRST RUN (43652292507), read again with a parser that checks the PNG against the specification: the pixels, the filter and the deflate
|
||||
# stream of every PNG are identical between two launches, between two runners, in every arm. The ONE difference is a 16-byte ancillary chunk `deBG` after the
|
||||
# IDATs (16 hex characters, plus its CRC): upstream Mozilla's nsPNGEncoder::MaybeAddCustomMetadata (image/encoders/png/nsPNGEncoder.cpp, the four letters
|
||||
# are set one by one, which is why `git grep deBG` finds nothing), keyed by the session's fingerprinting randomization key. The core turns
|
||||
# privacy.baselineFingerprintingProtection on to match retail 151 (invisible_core/prefs.py). What this run adds: does retail 159 write it, and with a
|
||||
# different value in every launch?
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: encoding stability hunt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_encoding.py
|
||||
- scripts/hunt_page_bytes_probe.js
|
||||
- .github/workflows/encoding-stability-hunt.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
concurrency:
|
||||
group: encoding-stability-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, leg ${{ matrix.leg }} - PNG stability: ours, PyPI 0.52.0, stock headed and headless)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
leg: [A, B]
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper of this checkout, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: The PNG parser against PNGs whose chunks are known
|
||||
run: python scripts/hunt_encoding.py selftest
|
||||
- name: "Retail Firefox 159.0 (Mozilla's installer, checked against SHA256SUMS, unpacked with 7-Zip)"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py fetch-retail --out "$RUNNER_TEMP/retail"
|
||||
- name: Install the PUBLISHED invisible-playwright 0.52.0 in its own venv, and fetch its own binary
|
||||
continue-on-error: true
|
||||
run: |
|
||||
python -m venv "$RUNNER_TEMP/pypi052"
|
||||
"$RUNNER_TEMP/pypi052/Scripts/python" -m pip install --upgrade pip
|
||||
"$RUNNER_TEMP/pypi052/Scripts/python" -m pip install "invisible-playwright==0.52.0"
|
||||
"$RUNNER_TEMP/pypi052/Scripts/python" -m pip list 2>/dev/null | grep -i -E "invisible|playwright"
|
||||
echo "FF052=$(cd "$RUNNER_TEMP" && "$RUNNER_TEMP/pypi052/Scripts/python" -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: "Arm ours (this checkout's wrapper, the job's binary), 2 launches"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_encoding.py collect --client ours --label ours --binary "$FF" --out "$RUNNER_TEMP/enc/${{ matrix.leg }}"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Arm ours_pypi052 (invisible-playwright 0.52.0 from PyPI, its own binary), 2 launches"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
echo "binary of 0.52.0: ${FF052:-<none>}"
|
||||
"$RUNNER_TEMP/pypi052/Scripts/python" -u scripts/hunt_encoding.py collect --client ours --label ours_pypi052 ${FF052:+--binary "$FF052"} --out "$RUNNER_TEMP/enc/${{ matrix.leg }}"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Arm stockheaded (stock Playwright firefox, headless=False), 2 launches"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_encoding.py collect --client stock --label stockheaded --out "$RUNNER_TEMP/enc/${{ matrix.leg }}"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Arm stockheadless (stock Playwright firefox, headless=True), 2 launches"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_encoding.py collect --client stock --label stockheadless --headless --out "$RUNNER_TEMP/enc/${{ matrix.leg }}"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Arm retail (Mozilla's Firefox 159.0 launched by hand, no automation), 2 launches"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_encoding.py collect --client retail --label retail --retail-from "$RUNNER_TEMP/retail" --out "$RUNNER_TEMP/enc/${{ matrix.leg }}"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Per-key table of this runner (two launches, three calls in one page)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_encoding.py table "$RUNNER_TEMP/enc/${{ matrix.leg }}" | tee "$RUNNER_TEMP/enc/${{ matrix.leg }}/table.txt"
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the raw probe results of this runner
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: encoding-stability-${{ matrix.leg }}
|
||||
path: ${{ runner.temp }}/enc/${{ matrix.leg }}
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
compare:
|
||||
name: "hunt (compare the two runners)"
|
||||
needs: hunt
|
||||
if: always()
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: The PNG parser against PNGs whose chunks are known
|
||||
run: python scripts/hunt_encoding.py selftest
|
||||
- name: Download both legs
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
for leg in A B; do
|
||||
gh run download "${{ github.run_id }}" --repo "${{ github.repository }}" -n "encoding-stability-$leg" -D "enc/$leg" || echo "leg $leg: no artifact"
|
||||
done
|
||||
ls -R enc | head -40
|
||||
- name: "Per-key table: same runner and across the two runners"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_encoding.py table enc/A enc/B | tee enc/table-two-runners.txt
|
||||
- name: Upload the table
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: encoding-stability-table
|
||||
path: enc/table-two-runners.txt
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -1,175 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# first-run-hunt.yml - HUNT ONLY, never merged. Nothing of the product is changed. Starts on its own paths only: the two other hunts running on this
|
||||
# branch (cpu-render-path-hunt-vm.yml, encoding-stability-hunt.yml) are not restarted by it, and it is not restarted by them.
|
||||
#
|
||||
# In ours with a fresh profile the parent shows a ~15 s CPU burst between +8 and +50 s after the launch, with these downloads: remote settings 18.9 MB,
|
||||
# CRLite 6 MB, safebrowsing 8.5 MB, Widevine 23 MB, the newtab xpi; after that it drops to zero.
|
||||
# Part 1 (scripts/hunt_first_run.py census): does retail Firefox 159.0 (Mozilla's installer, verified against its SHA256SUMS, launched by hand with
|
||||
# subprocess: -no-remote, a fresh profile, an idle local page, no automation, no Playwright) show the same burst, with the same duration and the
|
||||
# same downloads? 80 s, slices of 10 s: the parent's CPU, the parent's CPU per thread name, the files written in the profile (path and size; the
|
||||
# directories gmp-*, security_state, safebrowsing, settings, features listed), the bytes the network interfaces received and sent. Ours (fresh
|
||||
# profile) in the same table.
|
||||
# Part 2 (scripts/hunt_first_run.py probe): what can a PAGE read of that state? ours with a fresh profile, ours with a used one, retail fresh, retail
|
||||
# used (launched a second time on the profile of part 1), probed at +5, +20, +40 and +90 s: requestMediaKeySystemAccess for Widevine, ClearKey and
|
||||
# PlayReady (outcome, time to resolve, the configuration returned), MediaCapabilities for encrypted and WebRTC H.264 configurations, the WebRTC codec
|
||||
# lists (OpenH264 is a downloaded GMP), canPlayType, mediaDevices, plugins, permissions, storage, and whether three hosts are reachable/blocked.
|
||||
# Each arm runs twice: `seq` (the four moments in one launch) and `late` (only +90 s: asking early may start a download).
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: first run hunt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_first_run.py
|
||||
- scripts/hunt_first_run_probe.js
|
||||
- .github/workflows/first-run-hunt.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: first-run-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, first 80 s of a new profile: retail against ours; what a page reads of it)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 150
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper and psutil
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: "Retail Firefox 159.0 (Mozilla's installer, checked against SHA256SUMS, unpacked with 7-Zip), once"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py fetch-retail --out "$RUNNER_TEMP/fr/retail"
|
||||
|
||||
# ----------------------------------------------------------------------------------------------- part 1: the first 80 s of a new profile
|
||||
- name: "1. Census, retail (fresh profile, 80 s; the profile is kept for part 2)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py census --arm retail --retail-from "$RUNNER_TEMP/fr/retail" --keep-profile "$RUNNER_TEMP/fr/profile-retail" --out "$RUNNER_TEMP/fr/census"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "1. Census, ours (fresh profile, 80 s)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py census --arm ours --binary "$FF" --out "$RUNNER_TEMP/fr/census"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "1. Table: retail and ours, slice by slice"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py census-table "$RUNNER_TEMP/fr/census" | tee "$RUNNER_TEMP/fr/census/table.txt"
|
||||
|
||||
# ----------------------------------------------------------------------------------------------- part 2: what a page reads
|
||||
- name: "2. Probe, ours_fresh, seq"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm ours_fresh --mode seq --binary "$FF" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, ours_fresh, late"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm ours_fresh --mode late --binary "$FF" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, ours_used, seq"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm ours_used --mode seq --binary "$FF" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, ours_used, late"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm ours_used --mode late --binary "$FF" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, retail_fresh, seq"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm retail_fresh --mode seq --retail-from "$RUNNER_TEMP/fr/retail" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, retail_fresh, late"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm retail_fresh --mode late --retail-from "$RUNNER_TEMP/fr/retail" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, retail_used, seq"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm retail_used --mode seq --retail-from "$RUNNER_TEMP/fr/retail" --profile "$RUNNER_TEMP/fr/profile-retail" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Probe, retail_used, late"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_first_run.py probe --arm retail_used --mode late --retail-from "$RUNNER_TEMP/fr/retail" --profile "$RUNNER_TEMP/fr/profile-retail" --out "$RUNNER_TEMP/fr/probe"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "2. Tables: per probe and moment, fresh against used, ours and retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py probe-table "$RUNNER_TEMP/fr/probe" | tee "$RUNNER_TEMP/fr/probe/table.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: first-run-hunt-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/fr/census
|
||||
${{ runner.temp }}/fr/probe
|
||||
${{ runner.temp }}/fr/retail/retail.json
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -1,213 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# msaa-hunt.yml - HUNT ONLY, never merged. Nothing of the product is changed: the prefs of the arm ours_nomsaa go through extra_prefs, from the hunt.
|
||||
# Starts on its own paths only (the hunts running on this branch are not restarted by it, and it is not restarted by them).
|
||||
#
|
||||
# Measured: WebGL readPixels of 1024x1024 takes ~400 ms (p50) in ours and in ours_vmretail against ~89 ms in stock and in retail 159.
|
||||
# Hypothesis: the multisample we force. GLContext.cpp:783-787 marks framebuffer_multisample unsupported on the Microsoft Basic Render Driver; the engine's hook at
|
||||
# GLContext.cpp:799 (StealthDeclaredMultisample) turns it back on when webgl.msaa-samples > 0; the core sets webgl.msaa-samples=4 and webgl.msaa-force=true on Windows
|
||||
# (invisible_core/prefs.py:1263-1264); so every readPixels of the default framebuffer resolves MSAA in software.
|
||||
# Arms: ours, ours_nomsaa (webgl.msaa-samples=0, webgl.msaa-force=false from the hunt), stockheaded, retail 159.0 launched by hand (Mozilla's installer, checked against
|
||||
# SHA256SUMS). Measured in each browser, in the page (scripts/hunt_msaa_probe.js): readPixels 1024x1024 (first, repeat p50, draw then 1 pixel) and toDataURL with
|
||||
# antialias:true AND antialias:false in the same browser; a 256x256 scene with diagonal edges read back with readPixels and toDataURL, the edge pixels hashed apart from the
|
||||
# interior ones, the antialiased pixels counted; getContextAttributes().antialias, SAMPLES, SAMPLE_BUFFERS, MAX_SAMPLES. Two rounds in reversed order. `facts` reads the
|
||||
# multisample prefs back. Then the page-readable bytes of scripts/hunt_page_bytes.py (the 86-key diff), ours against ours_nomsaa.
|
||||
# What retail does, from the sources, is in the docstring of scripts/hunt_msaa.py.
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: msaa hunt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_msaa.py
|
||||
- scripts/hunt_msaa_probe.js
|
||||
- .github/workflows/msaa-hunt.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: msaa-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, MSAA and readPixels: ours, ours_nomsaa, stockheaded, retail)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 60
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper, psutil, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: "Retail Firefox 159.0 (Mozilla's installer, checked against SHA256SUMS, unpacked with 7-Zip)"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py fetch-retail --out "$RUNNER_TEMP/ms/retail"
|
||||
|
||||
# ------------------------------------------------------------------------------------------ the multisample prefs, read back (once per arm)
|
||||
- name: "Facts, arm ours (effective webgl.msaa-* prefs, Troubleshoot)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py facts --arm ours --binary "$FF" --out "$RUNNER_TEMP/ms/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm ours_nomsaa (effective webgl.msaa-* prefs, Troubleshoot)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py facts --arm ours_nomsaa --binary "$FF" --out "$RUNNER_TEMP/ms/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm stockheaded (effective webgl.msaa-* prefs, Troubleshoot)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py facts --arm stockheaded --out "$RUNNER_TEMP/ms/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm retail (effective webgl.msaa-* prefs, Troubleshoot)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py facts --arm retail --retail-from "$RUNNER_TEMP/ms/retail" --out "$RUNNER_TEMP/ms/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
|
||||
# ------------------------------------------------------------------------------------------ readPixels timing and the edges, two rounds
|
||||
- name: "Round 1, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/ms/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm retail --retail-from "$RUNNER_TEMP/ms/retail" --out "$RUNNER_TEMP/ms/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm ours_nomsaa"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm ours_nomsaa --binary "$FF" --out "$RUNNER_TEMP/ms/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm stockheaded --out "$RUNNER_TEMP/ms/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm stockheaded --out "$RUNNER_TEMP/ms/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours_nomsaa"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm ours_nomsaa --binary "$FF" --out "$RUNNER_TEMP/ms/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm retail --retail-from "$RUNNER_TEMP/ms/retail" --out "$RUNNER_TEMP/ms/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 6
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_msaa.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/ms/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Table: timing, values, the edges pixel by pixel, what differs"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cp -r "$RUNNER_TEMP/ms/r0/"*-facts "$RUNNER_TEMP/ms/r1/" 2>/dev/null || true
|
||||
python -u scripts/hunt_msaa.py table "$RUNNER_TEMP/ms/r1" "$RUNNER_TEMP/ms/r2" | tee "$RUNNER_TEMP/ms/table.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------ the page-readable bytes, ours against ours_nomsaa
|
||||
- name: "Page-readable bytes, arm ours (2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours --binary "$FF" --launches 2 --out "$RUNNER_TEMP/ms/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Page-readable bytes, arm ours_nomsaa (2 launches)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_page_bytes.py collect --arm ours_nomsaa --binary "$FF" --launches 2 --out "$RUNNER_TEMP/ms/pagebytes"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Page-readable bytes, ours against ours_nomsaa"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_page_bytes.py diff "$RUNNER_TEMP/ms/pagebytes" --a ours --b ours_nomsaa | tee "$RUNNER_TEMP/ms/pagebytes/diff.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: msaa-hunt-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/ms/r0
|
||||
${{ runner.temp }}/ms/r1
|
||||
${{ runner.temp }}/ms/r2
|
||||
${{ runner.temp }}/ms/table.txt
|
||||
${{ runner.temp }}/ms/pagebytes
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -15,7 +15,7 @@ name: publish
|
||||
# convention.
|
||||
#
|
||||
# BEFORE THE FIRST RUN, on PyPI: Manage project -> Publishing -> add a GitHub
|
||||
# publisher with owner `oss-invisible`, repository `playwright`, workflow
|
||||
# publisher with owner `feder-cr`, repository `invisible_playwright`, workflow
|
||||
# `publish.yml`, environment `pypi`. Until that exists the upload fails with
|
||||
# `invalid-publisher`, which is the correct failure: nothing has said this
|
||||
# workflow may speak for this project. Revoke the long-lived token AFTER the
|
||||
@@ -196,27 +196,8 @@ jobs:
|
||||
# code no job has run.
|
||||
run: python -m pytest -q
|
||||
|
||||
# The three checks on the REAL GeoIP database, and only here (the release): the legs of the pull requests and of the gates launch with the database that
|
||||
# scripts/ci_lab_geoip.py makes (a few networks, the same bytes every run, no download), so what only the real one can show is looked at once per release:
|
||||
# the product's own road (no variable, cold cache, the latest database downloaded), the lab database against it for the six exits, and every
|
||||
# time_zone of the database known to the runner's tz database. See the docstring of scripts/ci_real_geoip_check.py.
|
||||
real-geoip-database:
|
||||
needs: already-published
|
||||
if: needs.already-published.outputs.present != 'yes'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install the wrapper (its core comes from the index)
|
||||
run: python -m pip install -e . maxminddb
|
||||
- name: The real GeoIP database - the product's road, the lab database against it, every zone known
|
||||
run: python scripts/ci_real_geoip_check.py
|
||||
|
||||
upload:
|
||||
needs: [already-published, gate, real-geoip-database]
|
||||
needs: [already-published, gate]
|
||||
if: needs.already-published.outputs.present != 'yes'
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi # the trust relationship lives HERE, behind the gate
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# readback-hunt.yml - HUNT ONLY, never merged. Nothing of the product is changed: the pref of the arm ours_noproj goes through extra_prefs, from the hunt.
|
||||
# Starts on its own paths only (the hunts running on this branch are not restarted by it, and it is not restarted by them).
|
||||
#
|
||||
# Measured (43656857973): WebGL readPixels 1024x1024 repeat p50 is ~250-290 ms in ours, with or without MSAA, against 5-9 ms in stock and retail 159; toDataURL 1024 ~140-170 ms
|
||||
# against 12-18. MSAA is not the cause. Suspect: the read-time canvas projection of the engine (the engine source tree): gfx/2d/StealthCanvasProjection.cpp StealthProjectPixels, applied to WebGL and
|
||||
# WebGPU reads only (never to a 2D canvas), on when zoom.stealth.fpp.hw_seed > 0 and zoom.stealth.canvas.substitute_pixels is true (gfx/thebes/StealthDeclarationGate.h:54-62). Its cost is
|
||||
# data-dependent: a pixel with a differing 4-neighbour builds a 3x3 neighbourhood and runs OnOneSegment (StealthCanvasProjection.cpp:89-129); the probes so far drew a ramp in which EVERY pixel is such an edge.
|
||||
# Arms: ours, ours_noproj (zoom.stealth.canvas.substitute_pixels=false from the hunt), stockheaded, retail 159.0 launched by hand (Mozilla's installer, checked against SHA256SUMS).
|
||||
# - timing, per content (flat, halves, triangle, gradient, noise), 1024x1024, antialias:false: WebGL readPixels and toDataURL, canvas 2D getImageData and toDataURL (the 2D canvas is never
|
||||
# projected: if it is slow too, the cause is elsewhere); ms per MB; a hash of the bytes; two rounds in reversed order;
|
||||
# - the 256x256 diagonal-edge scene with antialias:false, pixel by pixel: is the 1-level difference of ours against retail the projection (ours_noproj against retail)?
|
||||
# - a Gecko profile with symbols of EVERY process and thread (MOZ_PROFILER_STARTUP_FILTERS=*) during 20 readPixels and 20 toDataURL of the gradient canvas, for ours and for ours_noproj:
|
||||
# which process reads (content or GPU) and the top functions by self time (hunt_profile_summary.py, symbols as in hunt_fetch_symbols.py).
|
||||
# Every step is continue-on-error: a hunt must give whatever it got.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: readback hunt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [hunt/cpu-render-path]
|
||||
paths:
|
||||
- scripts/hunt_readback.py
|
||||
- scripts/hunt_readback_probe.js
|
||||
- .github/workflows/readback-hunt.yml
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
symbols_run:
|
||||
description: "Run id of the engine's release.yml whose symbols-win-x86_64 artifact matches the binary (empty: look through the recent runs)"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: readback-hunt-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
hunt:
|
||||
name: "hunt (windows-2022, readPixels and toDataURL cost: ours, ours_noproj, stockheaded, retail; profile with symbols)"
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 60
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
PYTHONUNBUFFERED: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with: { fetch-depth: 1 }
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with: { python-version: '3.11' }
|
||||
- name: Install the wrapper, psutil, and stock Playwright with its firefox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install ".[dev]" psutil
|
||||
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
|
||||
python -m playwright install firefox
|
||||
- name: Fetch the published firefox binary
|
||||
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
- name: "Retail Firefox 159.0 (Mozilla's installer, checked against SHA256SUMS, unpacked with 7-Zip)"
|
||||
continue-on-error: true
|
||||
run: python -u scripts/hunt_first_run.py fetch-retail --out "$RUNNER_TEMP/rb/retail"
|
||||
|
||||
# ------------------------------------------------------------------------------------------ the prefs, read back
|
||||
- name: "Facts, arm ours (effective zoom.stealth.canvas.* and fpp.hw_seed)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py facts --arm ours --binary "$FF" --out "$RUNNER_TEMP/rb/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Facts, arm ours_noproj (effective zoom.stealth.canvas.* and fpp.hw_seed)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py facts --arm ours_noproj --binary "$FF" --out "$RUNNER_TEMP/rb/r0"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
|
||||
# ------------------------------------------------------------------------------------------ timing per content, two rounds
|
||||
- name: "Round 1, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/rb/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm retail --retail-from "$RUNNER_TEMP/rb/retail" --out "$RUNNER_TEMP/rb/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm ours_noproj"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm ours_noproj --binary "$FF" --out "$RUNNER_TEMP/rb/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 1, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm stockheaded --out "$RUNNER_TEMP/rb/r1"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm stockheaded"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm stockheaded --out "$RUNNER_TEMP/rb/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours_noproj"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm ours_noproj --binary "$FF" --out "$RUNNER_TEMP/rb/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm retail"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm retail --retail-from "$RUNNER_TEMP/rb/retail" --out "$RUNNER_TEMP/rb/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Round 2, arm ours"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py run --arm ours --binary "$FF" --out "$RUNNER_TEMP/rb/r2"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Table: cost per content and per MB, the 2D control, the bytes, the edge scene"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cp -r "$RUNNER_TEMP/rb/r0/"*-facts "$RUNNER_TEMP/rb/r1/" 2>/dev/null || true
|
||||
python -u scripts/hunt_readback.py table "$RUNNER_TEMP/rb/r1" "$RUNNER_TEMP/rb/r2" | tee "$RUNNER_TEMP/rb/table.txt"
|
||||
|
||||
# ------------------------------------------------------------------------------------------ the Gecko profile, with symbols
|
||||
- name: "Profile, arm ours (20 readPixels + 20 toDataURL of the gradient canvas, every process and thread)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py profile --arm ours --binary "$FF" --out "$RUNNER_TEMP/rb/profiles"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Profile, arm ours_noproj (the same, projection off)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
python -u scripts/hunt_readback.py profile --arm ours_noproj --binary "$FF" --out "$RUNNER_TEMP/rb/profiles"
|
||||
taskkill //F //IM firefox.exe //T > /dev/null 2>&1 || true
|
||||
- name: "Symbols of our engine (artifact symbols-win-x86_64 of the engine's release.yml)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
P="$RUNNER_TEMP/rb/profiles"
|
||||
ID="$(python scripts/hunt_profile_summary.py "$P/ours" --ids | awk '$3=="xul.dll"{print $2}' | head -1)"
|
||||
echo "breakpad id of our xul.dll in the profile: '$ID'"
|
||||
if [ -z "$ID" ]; then echo "SYMBOLS: none (no id: no parent profile of ours)"; exit 0; fi
|
||||
python scripts/hunt_fetch_symbols.py --id "$ID" --run "${{ inputs.symbols_run }}" --out "$RUNNER_TEMP/rb/symbols" | tee "$RUNNER_TEMP/rb/symbols.log"
|
||||
- name: "Profile summary, ours: which process reads, top 20 functions by self time (content and GPU processes, every thread)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
P="$RUNNER_TEMP/rb/profiles/ours"
|
||||
SYM=$(ls "$RUNNER_TEMP"/rb/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
python -u scripts/hunt_profile_summary.py "$P" ${SYM:+--symbols "$SYM"} --only tab,gpu --detail 3 --thread-table --threads 3 --top 20 | tee "$P/summary.txt"
|
||||
- name: "Profile summary, ours_noproj (what is left when the projection is off)"
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
P="$RUNNER_TEMP/rb/profiles/ours_noproj"
|
||||
SYM=$(ls "$RUNNER_TEMP"/rb/symbols/symbols-*.zip 2>/dev/null | head -1 || true)
|
||||
python -u scripts/hunt_profile_summary.py "$P" ${SYM:+--symbols "$SYM"} --only tab,gpu --detail 3 --threads 3 --top 20 | tee "$P/summary.txt"
|
||||
|
||||
- name: Close every Firefox left
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-Process firefox -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
"left: " + @(Get-Process firefox -ErrorAction SilentlyContinue).Count
|
||||
- name: Upload the results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: readback-hunt-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: |
|
||||
${{ runner.temp }}/rb/r0
|
||||
${{ runner.temp }}/rb/r1
|
||||
${{ runner.temp }}/rb/r2
|
||||
${{ runner.temp }}/rb/table.txt
|
||||
${{ runner.temp }}/rb/profiles
|
||||
${{ runner.temp }}/rb/symbols.log
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
@@ -173,15 +173,15 @@ jobs:
|
||||
# untested until 2026-08-01, and the user who opened issue #51 was on
|
||||
# 3.14. test_marker_vocabulary.py compares this list to the floor.
|
||||
python: ["3.11", "3.12", "3.13", "3.14"]
|
||||
# The FULL Python range on ubuntu; Windows on the two ends of the range,
|
||||
# 3.11 and 3.14 (Federico, 12/11: every test on Linux AND Windows; the
|
||||
# ends are where a version-specific difference shows first). The runners
|
||||
# are free for this public repository; the account runs 20 jobs at once.
|
||||
# The python LIST above stays complete so test_marker_vocabulary still
|
||||
# sees every version.
|
||||
# Windows runners are the scarce, 2x-cost, slow-to-schedule ones, and a
|
||||
# burst of pushes queues them for a long time. Run the FULL Python range
|
||||
# on ubuntu (cheap, fast) and cover Windows on 3.12 only - this is a
|
||||
# pure-Python package, the OS-specific surface is tiny. The python LIST
|
||||
# above stays complete so test_marker_vocabulary still sees every version.
|
||||
exclude:
|
||||
- { os: windows-latest, python: "3.12" }
|
||||
- { os: windows-latest, python: "3.11" }
|
||||
- { os: windows-latest, python: "3.13" }
|
||||
- { os: windows-latest, python: "3.14" }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -222,27 +222,12 @@ jobs:
|
||||
run: |
|
||||
python -m ruff check --select F821,F811,F601 --no-cache --output-format concise .
|
||||
|
||||
# The GeoIP database is made by the repository (scripts/ci_lab_geoip.py: the same bytes on every run, the sha256 in ci/geoip.json), never a
|
||||
# site and never a licensed file: without STEALTHFOX_GEOIP_MMDB the core asks GitHub which database is the latest on every call
|
||||
# (run 43211837926). The variable reaches every later step of the job.
|
||||
- name: The GeoIP database (made by the repository, same bytes every run)
|
||||
shell: bash
|
||||
run: python scripts/ci_lab_geoip.py build
|
||||
|
||||
- name: Run pytest
|
||||
shell: bash
|
||||
run: |
|
||||
set -o pipefail # or tee would swallow pytest's exit code
|
||||
pytest tests/ -v --tb=short -rs | tee tests-report.txt
|
||||
|
||||
# The leg ran with the pinned database, and the core never went past it to GitHub (tests/geoip_used.py wrote what it did).
|
||||
- name: The leg ran with the pinned GeoIP database
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
python scripts/ci_lab_geoip.py evidence --out "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" > /dev/null
|
||||
python scripts/ci_lab_geoip.py verify --evidence "$(dirname "$GEOIP_USED_OUT")/geoip-evidence.json" --used "$GEOIP_USED_OUT"
|
||||
|
||||
# This repo has the largest suite of the three and was the only one with
|
||||
# no floor. pytest's exit code cannot distinguish "everything passed"
|
||||
# from "the marker expression deselected everything", and `addopts`
|
||||
|
||||
@@ -94,12 +94,12 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
with: { python-version: '3.11' }
|
||||
|
||||
# Only what the TEST needs (and `uv`, for the wait below to ask uv, which the release test installs the package with). The package under test is installed by the
|
||||
# Only what the TEST needs. The package under test is installed by the
|
||||
# test itself, into a venv it creates, from the index - installing it
|
||||
# here as well would put a second copy on the path and the assertions
|
||||
# would be reading the wrong one.
|
||||
- name: Test harness only
|
||||
run: python -m pip install --upgrade pip pytest packaging uv
|
||||
run: python -m pip install --upgrade pip pytest packaging
|
||||
|
||||
# PyPI does not serve a new version to pip the instant twine finishes, and
|
||||
# this workflow runs on the ledger pull request, which the publish run
|
||||
@@ -115,11 +115,9 @@ jobs:
|
||||
# started later, was green). Those are three different pages of the index, and
|
||||
# the job only needs the one pip installs from.
|
||||
#
|
||||
# So the question asked here is the INSTALLERS' own, both: the upgrade test installs with pip, the release test with uv (the README's
|
||||
# way in), so each round asks `pip download invisible-playwright==X` AND `uv pip compile` of it (no cache, nothing installed), and the
|
||||
# job goes on only after three rounds in a row in which both said yes, 15 s apart (one yes proves that one request saw the version, not
|
||||
# that the next is served by the same node of the index); a no restarts the count and a call that does not answer in two minutes is
|
||||
# a no. Bounded at ten minutes: a forgotten publish still fails, and it fails HERE, saying that the index does not have the
|
||||
# So the question asked here is pip's own: `pip download invisible-playwright==X`,
|
||||
# the same client, the same index, no cache. Bounded at ten minutes: a forgotten
|
||||
# publish still fails, and it fails HERE, saying that the index does not have the
|
||||
# version, instead of three steps later as a test that compares two versions.
|
||||
#
|
||||
# Only on the ledger pull request. A scheduled or dispatched run is not
|
||||
@@ -136,40 +134,21 @@ jobs:
|
||||
deadline = time.monotonic() + 600
|
||||
deadline = min(deadline, time.monotonic() + float(os.environ.get("INDEX_WAIT_SECONDS", "600")))
|
||||
poll = float(os.environ.get("INDEX_WAIT_POLL", "15"))
|
||||
need = int(os.environ.get("INDEX_WAIT_CONFIRMATIONS", "3"))
|
||||
call_limit = float(os.environ.get("INDEX_WAIT_CALL_SECONDS", "120"))
|
||||
asks = [
|
||||
("pip", [sys.executable, "-m", "pip", "download", "--no-deps", "--no-cache-dir", "--disable-pip-version-check", "--quiet",
|
||||
"-d", tempfile.mkdtemp(), f"{dist}=={version}"], None),
|
||||
("uv", [sys.executable, "-m", "uv", "pip", "compile", "-", "--no-deps", "--no-cache", "--quiet"], f"{dist}=={version}\n"),
|
||||
]
|
||||
|
||||
|
||||
def round_says():
|
||||
"""An empty string when every installer resolves the version, else what the first that did not said."""
|
||||
for tool, command, stdin in asks:
|
||||
try:
|
||||
r = subprocess.run(command, input=stdin, capture_output=True, text=True, timeout=call_limit)
|
||||
except subprocess.TimeoutExpired:
|
||||
return f"{tool} did not answer within {call_limit:.0f} s"
|
||||
if r.returncode != 0:
|
||||
return f"{tool} said: " + ((r.stderr.strip().splitlines() or [""])[-1])
|
||||
return ""
|
||||
|
||||
|
||||
n = streak = 0
|
||||
n = 0
|
||||
said = ""
|
||||
while True:
|
||||
n += 1
|
||||
said = round_says()
|
||||
streak = 0 if said else streak + 1
|
||||
if streak >= need:
|
||||
print(f"::notice::pip and uv resolve {dist} {version} from the index, {need} rounds in a row (attempt {n})")
|
||||
r = subprocess.run([sys.executable, "-m", "pip", "download", "--no-deps", "--no-cache-dir",
|
||||
"--disable-pip-version-check", "--quiet", "-d", tempfile.mkdtemp(),
|
||||
f"{dist}=={version}"], capture_output=True, text=True)
|
||||
if r.returncode == 0:
|
||||
print(f"::notice::pip downloads {dist} {version} from the index (attempt {n})")
|
||||
sys.exit(0)
|
||||
said = (r.stderr.strip().splitlines() or [""])[-1]
|
||||
if time.monotonic() >= deadline:
|
||||
minutes = int(float(os.environ.get("INDEX_WAIT_SECONDS", "600")) // 60) or 1
|
||||
print(f"::error::the index does not have {dist} {version} yet, after {minutes} minutes "
|
||||
f"and {n} attempts, {streak} of {need} rounds in a row ({said})")
|
||||
f"and {n} attempts (pip said: {said})")
|
||||
sys.exit(1)
|
||||
time.sleep(poll)
|
||||
PY
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
name: webrtc-e2e
|
||||
|
||||
# Live WebRTC realness check against the shipped patched binary.
|
||||
#
|
||||
# Manual (workflow_dispatch) on purpose: it needs a firefox-N binary that
|
||||
# carries the WebRTC fixes (synthetic srflx in genuine nICEr form + the
|
||||
# default-route fallback behind a proxy). Run it after publishing such a
|
||||
# binary - it is the release gate for "WebRTC looks real behind a proxy".
|
||||
# On this Linux runner an engine older than firefox-35 never gets the synthetic
|
||||
# srflx behind a SOCKS proxy (the wildcard default-route probe, fixed in
|
||||
# firefox-35): test_not_blocked_behind_tcp_only_socks skips on it, naming that
|
||||
# defect, and the floor below turns the skip red. From firefox-35 on, a
|
||||
# missing srflx fails the test itself.
|
||||
#
|
||||
# No external proxy provider, no credentials: the "behind a proxy" condition is faked by an
|
||||
# in-process TCP-only SOCKS5 server (refuses UDP ASSOCIATE) and the egress IP
|
||||
# is injected as an RFC 5737 TEST-NET address. Fully self-contained.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# Engine and GeoIP downloads go through the release API with this token.
|
||||
# Anonymous requests share a 60-an-hour limit per runner address and are the
|
||||
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
|
||||
# unauthenticated users failed the gates three times). user-install.yml stays
|
||||
# anonymous on purpose: it is the user's path.
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
# `pip install -e ".[dev]"` below resolves `invisible-core==N.M.0` from the
|
||||
# package index, and the core is published BEFORE this package. This gate
|
||||
# answers whether it is there yet; during that window the realness job is
|
||||
# SKIPPED with the reason in the run summary rather than faked green, and
|
||||
# once the core is up it runs unchanged. See
|
||||
# .github/workflows/core-on-index.yml.
|
||||
core-on-index:
|
||||
uses: ./.github/workflows/core-on-index.yml
|
||||
|
||||
webrtc-e2e:
|
||||
name: webrtc realness (ubuntu, py3.12)
|
||||
needs: core-on-index
|
||||
if: needs.core-on-index.outputs.available == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
|
||||
- name: Install package + dev extras
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Fetch the patched Firefox binary and expose its path
|
||||
shell: bash
|
||||
run: |
|
||||
# NOT `echo "VAR=$(cmd)" >> $GITHUB_ENV`. echo exits 0 whatever the
|
||||
# substitution did, so `set -e` never sees a failure and an EMPTY
|
||||
# value lands in the environment. Both tests below then hit
|
||||
# `pytest.skip("no patched binary")`, pytest exits 0, and the job is
|
||||
# green having verified nothing - which is exactly what run #1 did.
|
||||
set -euo pipefail
|
||||
FETCH_OUTPUT="$(python -m invisible_playwright fetch)"
|
||||
printf '%s\n' "$FETCH_OUTPUT"
|
||||
BIN="$(printf '%s\n' "$FETCH_OUTPUT" | tail -n 1)"
|
||||
if [ -z "$BIN" ] || [ ! -e "$BIN" ]; then
|
||||
echo "invisible_playwright fetch returned '$BIN', which is not a" >&2
|
||||
echo "file. Refusing to run a suite that would skip itself green." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "STEALTHFOX_E2E_BINARY=$BIN" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run WebRTC realness e2e (xvfb for the headless Firefox)
|
||||
run: |
|
||||
set -o pipefail
|
||||
sudo apt-get update && sudo apt-get install -y xvfb
|
||||
xvfb-run -a pytest tests/test_webrtc_realness.py -m e2e -o addopts="" -v -rs | tee webrtc-report.txt
|
||||
|
||||
# Run #1 was GREEN with the headline assertion skipped: "1 passed, 1
|
||||
# skipped", and the skipped one is the test this workflow's own header
|
||||
# calls the point of the gate. pytest's exit code cannot tell that from a
|
||||
# pass, and this file was the only one of four without a floor.
|
||||
- name: Refuse a run whose main assertion did not execute
|
||||
shell: bash
|
||||
run: |
|
||||
python - <<'PY'
|
||||
import pathlib, re, sys
|
||||
text = pathlib.Path("webrtc-report.txt").read_text(encoding="utf-8", errors="ignore")
|
||||
passed = int((re.search(r"(\d+) passed", text) or [0, 0])[1] or 0)
|
||||
skipped = int((re.search(r"(\d+) skipped", text) or [0, 0])[1] or 0)
|
||||
if skipped:
|
||||
print("these tests SKIPPED, so the gate verified less than it "
|
||||
"claims:", file=sys.stderr)
|
||||
for line in text.splitlines():
|
||||
if line.startswith("SKIPPED"):
|
||||
print(" " + line, file=sys.stderr)
|
||||
if passed < 2 or skipped:
|
||||
print(f"{passed} passed / {skipped} skipped - this gate exists for "
|
||||
f"the synthetic-srflx assertion; a run that skips it is not "
|
||||
f"a pass.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
print(f"{passed} tests ran, none skipped")
|
||||
PY
|
||||
+29
-84
@@ -6,92 +6,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.52.0] - 2026-11-14
|
||||
|
||||
### Changed
|
||||
- Pins invisible-core 64.71.0 and with it the engine firefox-64. A request a page causes now leaves in the context of that
|
||||
page, by that context's proxy and resolver: the name of a TURN server over TCP, the OCSP request of a certificate, the TLS
|
||||
over a tunnel, the Safe Browsing completion of a page load. Nothing of a context with a proxy goes out DIRECT when a proxy
|
||||
lookup fails or the context has just closed. On Linux the profile lock no longer looks up the machine's host name.
|
||||
- Typing: each key is sent at its planned time measured from the start of the action, so a late reply no longer shifts the
|
||||
keys after it, and the engine delivers each key at once with its event born the declared latency in the past. Measured
|
||||
against stock Playwright Firefox, 20 runs per cell, slip of the last key against the plan (median): Windows 635 ms before,
|
||||
6 ms now (stock 122); Linux 554 ms before, -5 ms now (stock 91).
|
||||
|
||||
### Fixed
|
||||
- Screencast: a frame that arrives while the start of the screencast is being answered is held and acknowledged,
|
||||
not dropped, so the stream no longer dies from its first frame (the engine keeps one frame in flight and waits for its
|
||||
acknowledgement).
|
||||
- No thread is started on the engine connection's reader any more (the adoption of a new page and the file chooser hand
|
||||
their work to one long-lived starter). On Windows under load a Thread.start there held every event behind it; without
|
||||
instrumentation, goto(..., wait_until="networkidle") on pages that replace themselves missed 1 in 1200 instead of 4.
|
||||
|
||||
### Tests
|
||||
- The suites "nothing of a context leaves but through its proxy" (a witness of every direct arrival, the engine's resolver
|
||||
log as the sink of native lookups), on Linux and Windows, including two contexts with their own proxies at once and a
|
||||
PeerConnection of a torn-down window.
|
||||
- Windows: the isolated-page test moves the page when the test says so instead of on a 500 ms timer; the sandbox test
|
||||
reads again a process that is still starting.
|
||||
|
||||
|
||||
## [0.51.1] - 2026-11-13
|
||||
|
||||
### Changed
|
||||
- Pins invisible-core 63.68.0 (core fixes on the same firefox-63 engine: two sessions starting together on Windows no longer fail on the shared font-manifest cache; no MOZ_*, GL or toolkit variable of the host reaches the engine; GitHub is asked for the latest GeoIP database once a day, not on every launch; mouse moves carry the pressed buttons; a CORS preflight does not count for networkidle).
|
||||
- The project moved to the oss-invisible GitHub organization: every GitHub link, the issue templates and the package URLs point to github.com/oss-invisible/playwright. The PyPI name and the import name do not change; the old addresses redirect.
|
||||
|
||||
### Fixed
|
||||
- A popup (a `window.open` or a `target=_blank` link) could be handed to the client at `about:blank`, with the blank page's `load`, when it
|
||||
was opened with no route on the context: the commit of its address, or its `DOMContentLoaded` and `load`, arrived while the page was being
|
||||
handed from its buffer to its dispatcher and was told to nobody (`page.url` stayed `about:blank`, or `wait_for_load_state("load")` timed
|
||||
out). Measured on Windows with the library's client in the same process, `test_popups_reach_the_client_e2e.py` x20 on 4 workers: 3 runs
|
||||
red with the published firefox-62 engine and 11 with firefox-63. The page is now handed over in one step: what the client was not told is
|
||||
said once, in order, and nothing the engine sent in that period is lost.
|
||||
- The same hand-over dropped every event that is not a request: a `console` message, a `pageError`, a `dialog` (an `alert()` that opened
|
||||
while the popup was being built blocked its page for good, because no client had been told of it and none could answer it), a `crash`, a file chooser. All
|
||||
of them are given back now, in the order they arrived. The only bound left is the memory of the buffer (512 events): an event beyond it is
|
||||
lost and a `RuntimeWarning` says how many, once per page.
|
||||
- The hand-over holds when the engine's reader, the adoption and a close run at the same time: a `load` is told to the client once (not twice,
|
||||
so `page.on("load")` runs once); an event the engine sends while the held ones are being given back waits for them (a response is never handled
|
||||
before its request); a document committed at the same address as the previous one is told; a page closed while it was being adopted is not given
|
||||
frames, and is not announced, after its `__dispose__`; one frame never gets two dispatchers.
|
||||
- A popup could still be handed to the client at `about:blank` (or with its navigation pending again, and "Execution context was destroyed" in its
|
||||
first evaluate) when the destination committed while the events the page had missed were being replayed to it: the engine's reader went on
|
||||
delivering the live events to the lifecycle, and the replay then brought older ones after them. The page now subscribes its readers and is
|
||||
handed the missed events in one step, with the delivery of the sessions' events held, so a live event never overtakes the replay.
|
||||
With the three corrections together, on Windows with the library's client in the same process, under load: 680/680 and 256/256 popup cases
|
||||
green (run 43261858525).
|
||||
- `Control+A` selects all in an `<input>` and a `<textarea>` on Windows, on the published engine and the core this package pins: a new end-to-end
|
||||
test (five ways to press the shortcut, in-process and served to the stock client), run by `e2e.yml` on Windows, 20/20 green (run 43262320744).
|
||||
- Tests only: the e2e tests of the test servers take their ports from one sequence (no two servers draw the same one); the two tests that read a
|
||||
consecutive pair of host ports run alone, after the parallel tests; the sandbox e2e (the browser's seccomp filter) runs in a step of its own that
|
||||
turns unprivileged user namespaces on, and is left out of the normal run; every leg launches with a GeoIP database the repository builds (same
|
||||
bytes every run, no download); the CodeQL alerts of the test code are fixed; the install job waits for the package index through both installers;
|
||||
the raw Juggler tests wait for `Page.ready` and the main frame instead of a fixed time.
|
||||
|
||||
## [0.51.0] - 2026-11-12
|
||||
|
||||
### Changed
|
||||
- Engine firefox-63 through invisible-core 63.67.0, which this version pins (63.67.0 is 63.66.0 with the protocol mirror regenerated from the published engine; the mirror of 63.66.0 differed from it). Behind a proxy: names are resolved by the browser's own
|
||||
- Engine firefox-63 through invisible-core 63.66.0, which this version pins. Behind a proxy: names are resolved by the browser's own
|
||||
DNS-over-HTTPS through the proxy (not by the machine's resolver; checked with a resolver trap on Linux), WebRTC and HTTP/3 send
|
||||
their UDP through the proxy's relay when its UDP was measured to leave from the same address as its TCP, and a proxy whose UDP
|
||||
does not hold (including one whose UDP leaves from another address) is treated as a router that drops it (HTTP/3 falls back to
|
||||
HTTP/2, ICE gathers no server-reflexive candidate). A proxy given to a context declares its own measured UDP exit. The interface
|
||||
list WebRTC gathers is the network the session declares.
|
||||
- Behind a SOCKS5 proxy the proxy now receives addresses, not names (the names are resolved by the DNS-over-HTTPS through it); a proxy
|
||||
that cannot carry HTTPS to mozilla.cloudflare-dns.com resolves no name.
|
||||
- A STUN server list can be given at launch (`udp_stun_servers`) for the measurement of the proxy's UDP.
|
||||
- Every context carries the position the core declares for the session (the geolocation override of the context).
|
||||
- The package's launcher and server refuse the two prefs that govern the launch counter, `invisible_firefox.usage_ping.enabled` and
|
||||
`invisible_firefox.usage_ping.url`, in `extra_prefs` (and in the `firefoxUserPrefs` of a served launch). The engine counts launches with
|
||||
an anonymous GET to the `usage-counter` release of the engine's repository (`oss-invisible/firefox_antidetect_patch`).
|
||||
an anonymous GET to the `usage-counter` release of the engine's repository (`feder-cr/firefox_antidetect_patch`).
|
||||
|
||||
### Added
|
||||
- `preload_newtab=False` turns off the preloaded New Tab page, on request only (`InvisiblePlaywright`,
|
||||
`invisible_playwright.async_api.InvisiblePlaywright` and `launch_server`): by default the browser keeps it, as a retail Firefox does.
|
||||
A retail Firefox keeps the New Tab page ready in a content process of its own; with the option it is not started. `None` writes
|
||||
nothing, `True` says the retail value aloud, and a `browser.newtab.preload` in `extra_prefs` wins over it. Needs invisible-core
|
||||
63.66.0 or later. Measured on Windows (run 43211271731), on an engine build of the firefox-63 candidate line (not the published engine), one
|
||||
63.66.0. Measured on Windows (run 43211271731), on an engine build of the firefox-63 candidate line (not the published engine), one
|
||||
page of a site, five alternating runs: the browser's processes together take 448-454 MB as shipped and 231-239 MB with the option
|
||||
(private memory 301-307 against 158-171 MB).
|
||||
|
||||
@@ -120,6 +55,16 @@ comparison run is saved). The result of a `window.open` (`null` or a window) is
|
||||
`extra_prefs={"dom.disable_open_during_load": False}` for the session, knowing that a page then sees a browser that differs from a
|
||||
retail Firefox.
|
||||
|
||||
### Known issues
|
||||
- **A popup opened without a route can be announced while it is still on `about:blank`.** A popup opened with no route on the context
|
||||
(a `target=_blank` link, or `window.open` from a click) can be announced to the client while it is still on `about:blank`; its `url`
|
||||
then stays `about:blank`, or its `load` never arrives. Seen on a Windows runner with the library's client in the same process and four
|
||||
workers running the popup tests in parallel (`test_popups_reach_the_client_e2e.py`, 20 runs): with the firefox-63 engine 17 cases of 640
|
||||
in 12 of 20 runs; with the published firefox-62 engine (so also with 0.50.1) 15 cases of 640. On Linux (the firefox-63 engine) 0 red in
|
||||
20 runs. In the last two runs with Playwright's own client over a served browser none was red. The defect is in the hand-over of the popup's page in this
|
||||
package, not in the engine; the correction is in 0.51.1. Not measured: a served launch with numbers of its own, other machines, a run
|
||||
without parallel workers, macOS.
|
||||
|
||||
## [0.50.1] - 2026-11-12
|
||||
|
||||
0.50.0 was tagged and never published: its end-to-end gate was red on two tests that counted processes.
|
||||
@@ -1288,7 +1233,7 @@ browser reads that decision.
|
||||
`new_context` failed with `NS_ERROR_NOT_AVAILABLE`.
|
||||
- **A routed request carries its body.** `request.post_data`,
|
||||
`post_data_json` and `post_data_buffer` were None for every POST, in a route
|
||||
handler and on the `request` event alike (oss-invisible/core#90). The
|
||||
handler and on the `request` event alike (feder-cr/invisible_core#90). The
|
||||
body is there whenever a route is set on the page or its context; without a
|
||||
route it stays None, which keeps the engine from copying every POST body.
|
||||
- **`go_back()` goes back over a page the script left without a gesture**,
|
||||
@@ -2898,10 +2843,10 @@ browser reads that decision.
|
||||
## [0.3.1] - 2026-07-13
|
||||
|
||||
### Fixed
|
||||
- [#48](https://github.com/oss-invisible/playwright/issues/48): Playwright 1.61 adds an `isMobile` field to the `Browser.setDefaultViewport` Juggler command that the FF150 binary does not accept, which kills the session. The range narrows from `>=1.40,<1.61` to the CI-tested 1.55.x (`>=1.55,<1.56`, single-sourced from `scripts/playwright_pin.txt`) so a fresh install always gets a compatible client. Widened again in 0.3.2, once `firefox-18` rebased onto Firefox 151.
|
||||
- [#48](https://github.com/feder-cr/invisible_playwright/issues/48): Playwright 1.61 adds an `isMobile` field to the `Browser.setDefaultViewport` Juggler command that the FF150 binary does not accept, which kills the session. The range narrows from `>=1.40,<1.61` to the CI-tested 1.55.x (`>=1.55,<1.56`, single-sourced from `scripts/playwright_pin.txt`) so a fresh install always gets a compatible client. Widened again in 0.3.2, once `firefox-18` rebased onto Firefox 151.
|
||||
|
||||
### Changed
|
||||
- The patched-Firefox source repo is now `oss-invisible/firefox_antidetect_patch` (it was `feder-cr/invisible_firefox`, a name the profile manager took over). Release notes, CI references and the release URLs the download tests mock all point at the new name; the binaries themselves are unchanged.
|
||||
- The patched-Firefox source repo is now `feder-cr/firefox_antidetect_patch` (it was `feder-cr/invisible_firefox`, a name the profile manager took over). Release notes, CI references and the release URLs the download tests mock all point at the new name; the binaries themselves are unchanged.
|
||||
- The wrapper no longer injects the font-list / system-UI environment variables at launch: the binary ships its own font bundle and is self-contained on that front. The integration tests were adapted and the font-sampling tests dropped.
|
||||
|
||||
### Added
|
||||
@@ -2951,7 +2896,7 @@ browser reads that decision.
|
||||
## [0.1.8] - 2026-05-23
|
||||
|
||||
### Fixed
|
||||
- [#20](https://github.com/oss-invisible/playwright/issues/20): cross-origin iframes were unreachable from Playwright. `element_handle.content_frame()` returned `None`, `frame.evaluate()` threw cross-origin SOP errors, and `frame_locator(...).click()` timed out even with `force=True`. Root cause: FF150 defaults `fission.webContentIsolationStrategy=1` (`IsolateEverything`), which site-isolates every cross-origin iframe into a separate `webIsolated` content process even when `fission.autostart=False`. The parent's Juggler FrameTree then has a Frame placeholder with no docShell and no URL - every protocol op that needs to enter the iframe fails. Fix: pin `fission.webContentIsolationStrategy=0` (`IsolateNothing`) in the baseline prefs. The setting can be flipped back per session via `extra_prefs={"fission.webContentIsolationStrategy": 1}`.
|
||||
- [#20](https://github.com/feder-cr/invisible_playwright/issues/20): cross-origin iframes were unreachable from Playwright. `element_handle.content_frame()` returned `None`, `frame.evaluate()` threw cross-origin SOP errors, and `frame_locator(...).click()` timed out even with `force=True`. Root cause: FF150 defaults `fission.webContentIsolationStrategy=1` (`IsolateEverything`), which site-isolates every cross-origin iframe into a separate `webIsolated` content process even when `fission.autostart=False`. The parent's Juggler FrameTree then has a Frame placeholder with no docShell and no URL - every protocol op that needs to enter the iframe fails. Fix: pin `fission.webContentIsolationStrategy=0` (`IsolateNothing`) in the baseline prefs. The setting can be flipped back per session via `extra_prefs={"fission.webContentIsolationStrategy": 1}`.
|
||||
|
||||
### Added
|
||||
- `tests/test_cross_origin_iframe.py`: 4 unit + 5 e2e regression sentinels for cross-origin iframe interaction. The e2e layer runs entirely offline against two local HTTP servers on `127.0.0.1` (two ports = two SOP origins) and covers `page.frames` URL tracking, `content_frame()`, `frame.evaluate()`, `frame_locator(...).locator(...)`, and end-to-end `dispatch_event("click")` for plain, sandboxed and titled iframes. A future FF upgrade or fingerprint A/B that flips the pref back to `1` will fail the suite before shipping.
|
||||
@@ -2962,7 +2907,7 @@ browser reads that decision.
|
||||
## [0.1.7] - 2026-05-21
|
||||
|
||||
### Fixed
|
||||
- [#18](https://github.com/oss-invisible/playwright/issues/18): Tab crash when running with `headless=True` on Windows on pages that trigger cross-process navigation. Two separate bugs that only manifested together: (1) the Chromium content sandbox at default level 6 puts content processes on `kAlternateWinstation`, but the wrapper hides the browser window on its own alt-desktop (`CreateDesktop` for headless on Windows). Mismatched desktops → cross-process navigations couldn't reparent windows → content process exits cleanly and Playwright fires `page.on('crash')`. (2) The canvas2d `getImageData` stealth spoof wrote to a read-only mapped `DataSourceSurface`. On GPU-backed canvases that memory is write-protected → segfault during the final `getImageData` at page unload. Wrapper now sets `security.sandbox.content.level=4` in the alt-desktop workaround set, and `firefox-7` ships the source fix that moves the noise to the JS array's writable backing buffer.
|
||||
- [#18](https://github.com/feder-cr/invisible_playwright/issues/18): Tab crash when running with `headless=True` on Windows on pages that trigger cross-process navigation. Two separate bugs that only manifested together: (1) the Chromium content sandbox at default level 6 puts content processes on `kAlternateWinstation`, but the wrapper hides the browser window on its own alt-desktop (`CreateDesktop` for headless on Windows). Mismatched desktops → cross-process navigations couldn't reparent windows → content process exits cleanly and Playwright fires `page.on('crash')`. (2) The canvas2d `getImageData` stealth spoof wrote to a read-only mapped `DataSourceSurface`. On GPU-backed canvases that memory is write-protected → segfault during the final `getImageData` at page unload. Wrapper now sets `security.sandbox.content.level=4` in the alt-desktop workaround set, and `firefox-7` ships the source fix that moves the noise to the JS array's writable backing buffer.
|
||||
|
||||
### Changed
|
||||
- `BINARY_VERSION` bumped from `firefox-5` to `firefox-7`. `firefox-6` was rolled back when its partial fix turned out to be wrong (the iframe-burst hypothesis was a dead end; bisection in the evening found the real two-bug cause documented above).
|
||||
@@ -2981,12 +2926,12 @@ browser reads that decision.
|
||||
## [0.1.5] - 2026-05-20
|
||||
|
||||
### Fixed
|
||||
- [#15](https://github.com/oss-invisible/playwright/pull/15): `python -m invisible_playwright fetch` raised `RuntimeError: no SHA256 for firefox-150.0.1-stealth-linux-x86_64.tar.gz in checksums.txt` for every user because the parser kept the `*` binary-mode prefix that `sha256sum` writes in front of filenames. Now `.lstrip("*")` is applied to the key. Reporter + patch: [@LostBoxArt](https://github.com/LostBoxArt). Unrelated to the `firefox-N` binary; existing caches still work, only first-time fetches were broken.
|
||||
- [#15](https://github.com/feder-cr/invisible_playwright/pull/15): `python -m invisible_playwright fetch` raised `RuntimeError: no SHA256 for firefox-150.0.1-stealth-linux-x86_64.tar.gz in checksums.txt` for every user because the parser kept the `*` binary-mode prefix that `sha256sum` writes in front of filenames. Now `.lstrip("*")` is applied to the key. Reporter + patch: [@LostBoxArt](https://github.com/LostBoxArt). Unrelated to the `firefox-N` binary; existing caches still work, only first-time fetches were broken.
|
||||
|
||||
## [0.1.4] - 2026-05-20
|
||||
|
||||
### Fixed
|
||||
- [#13](https://github.com/oss-invisible/playwright/issues/13): every page that threw an uncaught JS error (e.g. bunny.net) crashed the Playwright client with `TypeError: Cannot read properties of undefined (reading 'url')`. Root cause: upstream Playwright Juggler added a required `location` field to the `Page.uncaughtError` event in the 2026-05-07 roll ([microsoft/playwright@c8604ec](https://github.com/microsoft/playwright/commit/c8604ecd97)); our fork was carrying the pre-roll schema in every `firefox-N` build. Fix matches upstream - Runtime.js builds the `errorLocation`, PageAgent.js forwards it on both worker and runtime error paths, Protocol.js declares the schema field. Reporter: [@dionorgua](https://github.com/dionorgua).
|
||||
- [#13](https://github.com/feder-cr/invisible_playwright/issues/13): every page that threw an uncaught JS error (e.g. bunny.net) crashed the Playwright client with `TypeError: Cannot read properties of undefined (reading 'url')`. Root cause: upstream Playwright Juggler added a required `location` field to the `Page.uncaughtError` event in the 2026-05-07 roll ([microsoft/playwright@c8604ec](https://github.com/microsoft/playwright/commit/c8604ecd97)); our fork was carrying the pre-roll schema in every `firefox-N` build. Fix matches upstream - Runtime.js builds the `errorLocation`, PageAgent.js forwards it on both worker and runtime error paths, Protocol.js declares the schema field. Reporter: [@dionorgua](https://github.com/dionorgua).
|
||||
|
||||
### Changed
|
||||
- `BINARY_VERSION` bumped from `firefox-3` to `firefox-4`. JS-only change inside `chrome/juggler/`; `xul.dll` and `firefox.exe` are byte-identical to `firefox-3`.
|
||||
@@ -2994,7 +2939,7 @@ browser reads that decision.
|
||||
## [0.1.3] - 2026-05-19
|
||||
|
||||
### Changed
|
||||
- `BINARY_VERSION` bumped from `firefox-2` to `firefox-3`. The new archives on both Windows and Linux are built from a clean clone of [oss-invisible/firefox_antidetect_patch#stealth/150](https://github.com/oss-invisible/firefox_antidetect_patch/tree/stealth/150) - the consolidated source-of-truth fork (renamed from `feder-cr/firefox`; the companion `feder-cr/firefox-stealth` patches repo was deleted, all patches now live as commits on top of `mozilla-firefox/firefox`).
|
||||
- `BINARY_VERSION` bumped from `firefox-2` to `firefox-3`. The new archives on both Windows and Linux are built from a clean clone of [feder-cr/firefox_antidetect_patch#stealth/150](https://github.com/feder-cr/firefox_antidetect_patch/tree/stealth/150) - the consolidated source-of-truth fork (renamed from `feder-cr/firefox`; the companion `feder-cr/firefox-stealth` patches repo was deleted, all patches now live as commits on top of `mozilla-firefox/firefox`).
|
||||
- The patched Firefox archive now ships the **proper C++ implementation** of `windowUtils.jugglerSendMouseEvent`, replacing the JS shim from 0.1.2.
|
||||
|
||||
### C++ fixes landed in this release
|
||||
@@ -3005,7 +2950,7 @@ browser reads that decision.
|
||||
- **C7 (partial)**: storage stub for `nsIDocShell.languageOverride`. Workaround `InvisiblePlaywright(locale="")` recommended until full BC FIELD port lands.
|
||||
|
||||
### Verified
|
||||
- Both archives built from same source: oss-invisible/firefox_antidetect_patch commit `68906f1f9c55`.
|
||||
- Both archives built from same source: feder-cr/firefox_antidetect_patch commit `68906f1f9c55`.
|
||||
- Windows + Linux smoke suite green: launch, `ctx.new_page()`, `page.mouse.{move,down,up,click,wheel}`, `navigator.webdriver=false`, sannysoft 32/33 PASS.
|
||||
- SHA256 published in `checksums.txt` on the `firefox-3` release.
|
||||
|
||||
@@ -3024,7 +2969,7 @@ browser reads that decision.
|
||||
## [0.1.1] - 2026-05-18
|
||||
|
||||
### Fixed
|
||||
- **Critical**: every `page.mouse.*`, `page.click(selector)`, `locator.click()`, `page.hover()`, `mouse.wheel()` failed on the patched Firefox 150 binary with `win.windowUtils.jugglerSendMouseEvent is not a function`. The Juggler JS was porting calls to a Playwright-specific C++ method that was never landed in the FF146→FF150 port; replaced with the Mozilla chrome-scope `win.synthesizeMouseEvent` helper which is present in FF150. Six call sites patched across `juggler/protocol/PageHandler.js` and `juggler/content/PageAgent.js`. Reporter: [@trob9](https://github.com/trob9) - [#9](https://github.com/oss-invisible/playwright/issues/9).
|
||||
- **Critical**: every `page.mouse.*`, `page.click(selector)`, `locator.click()`, `page.hover()`, `mouse.wheel()` failed on the patched Firefox 150 binary with `win.windowUtils.jugglerSendMouseEvent is not a function`. The Juggler JS was porting calls to a Playwright-specific C++ method that was never landed in the FF146→FF150 port; replaced with the Mozilla chrome-scope `win.synthesizeMouseEvent` helper which is present in FF150. Six call sites patched across `juggler/protocol/PageHandler.js` and `juggler/content/PageAgent.js`. Reporter: [@trob9](https://github.com/trob9) - [#9](https://github.com/feder-cr/invisible_playwright/issues/9).
|
||||
- `_linkedBrowser.scrollRectIntoViewIfNeeded()` is now guarded at both call sites in `PageHandler.js` (`dispatchMouseEvent` and `dispatchWheelEvent`) - the method is not present on the shipped FF150 `<browser>` element, so the unguarded call threw before the mouse event was dispatched.
|
||||
|
||||
### Added
|
||||
@@ -3048,7 +2993,7 @@ browser reads that decision.
|
||||
- SOCKS5 / SOCKS4 / HTTP / HTTPS proxy support with auth.
|
||||
- Linux x86_64 and Windows x86_64 binary support.
|
||||
|
||||
[0.4.3]: https://github.com/oss-invisible/playwright/releases/tag/v0.4.3
|
||||
[0.4.3]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.3
|
||||
> The two oldest entries point at a COMMIT, not a tag: 0.1.0 and 0.1.1
|
||||
> predate arriving on PyPI (the index starts at 0.3.5) and never had
|
||||
> a tag. Creating one today is not harmless: `publish.yml` triggers
|
||||
@@ -3056,8 +3001,8 @@ browser reads that decision.
|
||||
> does not short-circuit, so a new tag could kick off a publish
|
||||
> attempt. The commit is the same information without that risk.
|
||||
|
||||
[0.1.1]: https://github.com/oss-invisible/playwright/compare/7a983e99c53fa1ec1a443651a4dd9de42258dc61...589c848e07a67c459969a2ddfb79851f48b10eff
|
||||
[0.1.0]: https://github.com/oss-invisible/playwright/commit/7a983e99c53fa1ec1a443651a4dd9de42258dc61
|
||||
[0.4.4]: https://github.com/oss-invisible/playwright/releases/tag/v0.4.4
|
||||
[0.4.5]: https://github.com/oss-invisible/playwright/releases/tag/v0.4.5
|
||||
[0.4.6]: https://github.com/oss-invisible/playwright/releases/tag/v0.4.6
|
||||
[0.1.1]: https://github.com/feder-cr/invisible_playwright/compare/7a983e99c53fa1ec1a443651a4dd9de42258dc61...589c848e07a67c459969a2ddfb79851f48b10eff
|
||||
[0.1.0]: https://github.com/feder-cr/invisible_playwright/commit/7a983e99c53fa1ec1a443651a4dd9de42258dc61
|
||||
[0.4.4]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.4
|
||||
[0.4.5]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.5
|
||||
[0.4.6]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.6
|
||||
+7
-7
@@ -4,9 +4,9 @@ Thanks for your interest in improving this project. Contributions are welcome vi
|
||||
|
||||
## Quick links
|
||||
|
||||
- **Bug or idea?** Open an [issue](https://github.com/oss-invisible/playwright/issues/new/choose).
|
||||
- **Bug or idea?** Open an [issue](https://github.com/feder-cr/invisible_playwright/issues/new/choose).
|
||||
- **Security issue?** Do **not** open a public issue - see [SECURITY.md](SECURITY.md).
|
||||
- **The C++ patches** live in the companion repo [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
|
||||
- **The C++ patches** live in the companion repo [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
|
||||
|
||||
## Scope
|
||||
|
||||
@@ -16,7 +16,7 @@ This repository ships the **Python wrapper** (`invisible_playwright`) around a p
|
||||
- The CLI (`invisible-playwright fetch`, `invisible-playwright version`)
|
||||
- Tests, docs, examples, packaging
|
||||
|
||||
The fingerprint, the engine download and the browser protocol client are shared by every wrapper and live in [invisible_core](https://github.com/oss-invisible/core).
|
||||
The fingerprint, the engine download and the browser protocol client are shared by every wrapper and live in [invisible_core](https://github.com/feder-cr/invisible_core).
|
||||
|
||||
Out of scope (belongs in `firefox_antidetect_patch`):
|
||||
|
||||
@@ -30,8 +30,8 @@ To *use* the package you do not need any of this: see [Install](README.md#instal
|
||||
The steps below are for working on the code, with [uv](https://docs.astral.sh/uv/).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/oss-invisible/playwright.git
|
||||
cd playwright
|
||||
git clone https://github.com/feder-cr/invisible_playwright.git
|
||||
cd invisible_playwright
|
||||
uv venv
|
||||
source .venv/bin/activate # Windows: .venv\Scripts\activate
|
||||
uv pip install -e ".[dev]"
|
||||
@@ -66,9 +66,9 @@ CI must be green before merge.
|
||||
|
||||
Before opening, please:
|
||||
|
||||
- Search [existing issues](https://github.com/oss-invisible/playwright/issues) - the bug may already be tracked.
|
||||
- Search [existing issues](https://github.com/feder-cr/invisible_playwright/issues) - the bug may already be tracked.
|
||||
- Reproduce on the **latest release** if possible.
|
||||
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `oss-invisible/firefox_antidetect_patch` instead.
|
||||
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `feder-cr/firefox_antidetect_patch` instead.
|
||||
|
||||
Include:
|
||||
|
||||
|
||||
-1762
File diff suppressed because it is too large.
Load diff
@@ -1,22 +1,22 @@
|
||||
<div align="center">
|
||||
<picture>
|
||||
<source media="(max-width: 374px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-small-dark.gif">
|
||||
<source media="(max-width: 374px)" srcset="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-small-light.gif">
|
||||
<source media="(max-width: 1239px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-phone-dark.gif">
|
||||
<source media="(max-width: 1239px)" srcset="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-phone-light.gif">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-dark.gif">
|
||||
<img alt="invisible_playwright, Playwright on an anti-detect Firefox. An animation: the two-line switch from Playwright, the fingerprint set inside the engine, a mouse that moves like a hand, and the bot tests it passes." src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-light.gif" width="100%">
|
||||
<source media="(max-width: 374px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-small-dark.gif">
|
||||
<source media="(max-width: 374px)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-small-light.gif">
|
||||
<source media="(max-width: 1239px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-phone-dark.gif">
|
||||
<source media="(max-width: 1239px)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-phone-light.gif">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-dark.gif">
|
||||
<img alt="invisible_playwright, Playwright on an anti-detect Firefox. An animation: the two-line switch from Playwright, the fingerprint set inside the engine, a mouse that moves like a hand, and the bot tests it passes." src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-light.gif" width="100%">
|
||||
</picture>
|
||||
<p align="center">
|
||||
<a href="https://github.com/oss-invisible/playwright/blob/badges/counters/launches_daily.csv"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Foss-invisible%2Fplaywright%2Fbadges%2Fdocs%2Fbadges%2Flaunches.json&style=for-the-badge" alt="browser launches"></a>
|
||||
<a href="https://github.com/oss-invisible/firefox_antidetect_patch/releases"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Foss-invisible%2Fplaywright%2Fbadges%2Fdocs%2Fbadges%2Fdownloads.json&style=for-the-badge" alt="engine downloads"></a>
|
||||
<a href="https://github.com/oss-invisible/playwright/stargazers"><img src="https://img.shields.io/github/stars/oss-invisible/playwright?style=for-the-badge&logo=github&color=e8a317" alt="GitHub stars"></a>
|
||||
<a href="https://github.com/feder-cr/invisible_playwright/blob/badges/counters/launches_daily.csv"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffeder-cr%2Finvisible_playwright%2Fbadges%2Fdocs%2Fbadges%2Flaunches.json&style=for-the-badge" alt="browser launches"></a>
|
||||
<a href="https://github.com/feder-cr/firefox_antidetect_patch/releases"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffeder-cr%2Finvisible_playwright%2Fbadges%2Fdocs%2Fbadges%2Fdownloads.json&style=for-the-badge" alt="engine downloads"></a>
|
||||
<a href="https://github.com/feder-cr/invisible_playwright/stargazers"><img src="https://img.shields.io/github/stars/feder-cr/invisible_playwright?style=for-the-badge&logo=github&color=e8a317" alt="GitHub stars"></a>
|
||||
</p>
|
||||
<h3 align="center">Playwright gets caught by anti-bots and captchas.<br>
|
||||
This one runs on an anti-detect Firefox with an undetected fingerprint, compatible with your existing Playwright code.</h3>
|
||||
</div>
|
||||
|
||||

|
||||

|
||||
|
||||
## How it works
|
||||
|
||||
@@ -217,7 +217,7 @@ Full list of pinnable keys, how pinning interacts with the Bayesian sampler, and
|
||||
|
||||
### Launch counter
|
||||
|
||||
The engine counts launches with an anonymous GET to the `usage-counter` release of the engine's repository (`oss-invisible/firefox_antidetect_patch`) on GitHub. This package's launcher and server refuse the two prefs that govern it, `invisible_firefox.usage_ping.enabled` and `invisible_firefox.usage_ping.url`, in `extra_prefs`.
|
||||
The engine counts launches with an anonymous GET to the `usage-counter` release of the engine's repository (`feder-cr/firefox_antidetect_patch`) on GitHub. This package's launcher and server refuse the two prefs that govern it, `invisible_firefox.usage_ping.enabled` and `invisible_firefox.usage_ping.url`, in `extra_prefs`.
|
||||
|
||||
---
|
||||
|
||||
@@ -239,14 +239,14 @@ invisible-playwright version # wrapper, core and engine versions, and where the
|
||||
library. Two ways to use it without writing code, both one line: from an MCP client
|
||||
you already have (Claude Code, Claude Desktop, Cursor),
|
||||
`claude mcp add stealth -- uvx invisible-playwright-mcp`, see
|
||||
[the MCP server page](https://github.com/oss-invisible/playwright_mcp/wiki/mcp-server); or with an
|
||||
[the MCP server page](https://github.com/feder-cr/invisible_playwright_mcp/wiki/mcp-server); or with an
|
||||
interface and a model included, needing only an OpenRouter key,
|
||||
`uvx invisible-playwright-mcp ui --openrouter-key sk-or-...`, see
|
||||
[invisible_playwright_mcp](https://github.com/oss-invisible/playwright_mcp). Same engine underneath, and the second
|
||||
[invisible_playwright_mcp](https://github.com/feder-cr/invisible_playwright_mcp). Same engine underneath, and the second
|
||||
is a client of the first.
|
||||
|
||||
All of it reads better, and is searchable, in
|
||||
**[the wiki](https://github.com/oss-invisible/playwright/wiki)**,
|
||||
**[the wiki](https://github.com/feder-cr/invisible_playwright/wiki)**,
|
||||
organised into four sections instead of one flat list:
|
||||
|
||||
- **[Documentation](docs/documentation.md)** -
|
||||
@@ -284,9 +284,9 @@ read from its own documentation or from confirmed reverse engineering:
|
||||
**The other pieces of this one.** The engine is the middle of three, and the
|
||||
two around it are how most people reach it:
|
||||
|
||||
- **[invisible_core](https://github.com/oss-invisible/core)** - seed to
|
||||
- **[invisible_core](https://github.com/feder-cr/invisible_core)** - seed to
|
||||
fingerprint to preferences, plus proxy and geolocation. This package pins it.
|
||||
- **[invisible_playwright_mcp](https://github.com/oss-invisible/playwright_mcp)** - this engine as an MCP
|
||||
- **[invisible_playwright_mcp](https://github.com/feder-cr/invisible_playwright_mcp)** - this engine as an MCP
|
||||
server (`uvx invisible-playwright-mcp`, for any client that brings its own
|
||||
model) and, in the same package, an interface with a model included, from
|
||||
one command. The interface is a client of the server, with no private path
|
||||
@@ -324,7 +324,7 @@ Two rules hold across everything below. Every value is decided **before a page c
|
||||
ask**, inside the browser, so there is no JavaScript shim to find. And every value
|
||||
comes from **one profile**, so no two surfaces contradict each other, which is how a
|
||||
spoofed browser is usually caught. Source:
|
||||
[oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch).
|
||||
[feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
|
||||
|
||||
**Identity**
|
||||
- `navigator`, the user agent and the client hints are derived together, so they cannot disagree: [does Playwright set navigator.webdriver](docs/does-playwright-set-navigator-webdriver.md), [client hints and Sec-Fetch](docs/client-hints-sec-fetch.md).
|
||||
@@ -357,7 +357,7 @@ spoofed browser is usually caught. Source:
|
||||
|
||||
## License
|
||||
|
||||
MIT - see [LICENSE](https://github.com/oss-invisible/playwright/blob/main/LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch).
|
||||
MIT - see [LICENSE](https://github.com/feder-cr/invisible_playwright/blob/main/LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
|
||||
|
||||
---
|
||||
|
||||
@@ -369,12 +369,12 @@ This project is for educational purposes only. It is provided as-is, with no war
|
||||
|
||||
<p align="center">
|
||||
Built by <a href="https://it.linkedin.com/in/federico-elia-5199951b6">Federico Elia</a>
|
||||
<a href="https://it.linkedin.com/in/federico-elia-5199951b6"><img src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/badges/linkedin.svg" alt="LinkedIn"></a>
|
||||
<a href="https://it.linkedin.com/in/federico-elia-5199951b6"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/linkedin.svg" alt="LinkedIn"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/oss-invisible/playwright/actions/workflows/tests.yml"><img src="https://github.com/oss-invisible/playwright/actions/workflows/tests.yml/badge.svg" alt="tests"></a>
|
||||
<a href="https://github.com/oss-invisible/playwright/blob/main/LICENSE"><img src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/badges/license.svg" alt="License: MIT"></a>
|
||||
<a href="https://www.python.org/downloads/"><img src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/badges/python.svg" alt="Python 3.11+"></a>
|
||||
<a href="https://github.com/oss-invisible/firefox_antidetect_patch/releases"><img src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/badges/firefox.svg" alt="Firefox 159.0"></a>
|
||||
<a href="https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml"><img src="https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml/badge.svg" alt="tests"></a>
|
||||
<a href="https://github.com/feder-cr/invisible_playwright/blob/main/LICENSE"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/license.svg" alt="License: MIT"></a>
|
||||
<a href="https://www.python.org/downloads/"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/python.svg" alt="Python 3.11+"></a>
|
||||
<a href="https://github.com/feder-cr/firefox_antidetect_patch/releases"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/firefox.svg" alt="Firefox 159.0"></a>
|
||||
</p>
|
||||
+1
-1
@@ -36,7 +36,7 @@ In scope:
|
||||
|
||||
Out of scope:
|
||||
|
||||
- Vulnerabilities in the patched Firefox source - report to [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch/security/advisories/new)
|
||||
- Vulnerabilities in the patched Firefox source - report to [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch/security/advisories/new)
|
||||
- Upstream Firefox / mozilla-central - report to Mozilla directly
|
||||
- Third-party dependencies - report to those projects
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"comment": "The GeoIP database every CI leg launches with (STEALTHFOX_GEOIP_MMDB): made by scripts/ci_lab_geoip.py, the same bytes on every run, no download and no licensed data. One record answers every public address that is not one of the lab's networks and not reserved (the runner's own egress address is not known in advance). To change it (a network, a field): change the table of the script and mmdb_sha256 here in one commit; `build` refuses to go on when they differ.",
|
||||
"generator": "scripts/ci_lab_geoip.py",
|
||||
"mmdb": "geoip-aio-all.mmdb",
|
||||
"mmdb_sha256": "d02825fd0336afa72ad7b7573769f1d9efddea447133f99ae3008c56d5308929",
|
||||
"mmdb_bytes": 2706
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
[
|
||||
{"id": "wrapper.e2e.udp", "giro": "G2", "os": ["linux", "windows"], "min_tests": 43, "exact": true, "tests": ["tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_declared_host_network_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all"], "marker": "e2e", "needs_root": false, "note": "Needs the candidate binary (STEALTHFOX_E2E_BINARY) and the engine that carries the UDP line. 57 = 1+7+6+1+21 from the five files + 21 from the 10 UDP-line tests of test_webrtc_realness.py (parametrized). The chain by name is here in its variant with the lab's exit on loopback (127.0.0.2) and the pref `media.peerconnection.ice.loopback`, on Linux and Windows: the exit of the lab is loopback, and a loopback mapped address is thrown away by nICEr unless the ICE context allows it. The variant without the pref (an exit that is not loopback) is the suite wrapper.e2e.udp.exit, Linux only; the address added to the interface of the Windows runner is work of the release after firefox-63. The preload_newtab test (2) is here: seen green on Linux as root (Docker) and on Windows 10 runs of 10 (windows-2022, round 5 engine); it reads the engine's own process log."},
|
||||
{"id": "wrapper.e2e.udp.exit", "giro": "G2", "os": ["linux"], "min_tests": 7, "exact": true, "tests": ["tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick", "tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux only, and not collected on Windows: the exit of the lab is a documentation address (198.51.100.9) added to lo with `ip addr add`, which needs root and iproute2; a mapped address in 127/8 would be thrown away by nICEr as bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) and the pref that allows it is off in a product. The page reads a srflx equal to the gateway exit and the relay of the TURN server, the TURN name resolved by the DoH through the proxy, in the tick of 2 s. On the Windows runner of GitHub (administrator, the network of the runner) it could run too: not yet. A skipped test would turn the verdict red, hence a suite of its own. Its twin with the lab's exit on loopback and the pref stays in wrapper.e2e.udp on both systems, so that Windows keeps the walk of the chain by name.", "linux_only": "The lab's exit is a documentation address the host must hold besides its loopback (nICEr throws away a mapped address in 127/8). Linux holds it on lo as root; Windows takes no extra address on its loopback pseudo-interface, and adding it to the runner's adapter took the runner off the network (runs 43314251547 and 43334169682 died in the test step). A Windows twin waits for a way that leaves the runner's network alone."},
|
||||
{"id": "wrapper.e2e.udp.sandbox", "giro": "G2", "os": ["linux"], "min_tests": 13, "exact": true, "tests": ["tests/test_the_socket_process_is_sandboxed_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"], "marker": "e2e", "needs_root": false, "note": "The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed.", "linux_only": "It reads the seccomp filter of the socket and tab processes in /proc. The Windows twin reads the sandbox token of the same processes (integrity level, restrictions) and needs a measurement of the retail Firefox's tokens first; until then Linux only."},
|
||||
{"id": "wrapper.e2e.udp.exit", "giro": "G2", "os": ["linux"], "min_tests": 7, "exact": true, "tests": ["tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick", "tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux only, and not collected on Windows: the exit of the lab is a documentation address (198.51.100.9) added to lo with `ip addr add`, which needs root and iproute2; a mapped address in 127/8 would be thrown away by nICEr as bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) and the pref that allows it is off in a product. The page reads a srflx equal to the gateway exit and the relay of the TURN server, the TURN name resolved by the DoH through the proxy, in the tick of 2 s. On the Windows runner of GitHub (administrator, the network of the runner) it could run too: not yet. A skipped test would turn the verdict red, hence a suite of its own. Its twin with the lab's exit on loopback and the pref stays in wrapper.e2e.udp on both systems, so that Windows keeps the walk of the chain by name."},
|
||||
{"id": "wrapper.e2e.udp.sandbox", "giro": "G2", "os": ["linux"], "min_tests": 13, "exact": true, "tests": ["tests/test_the_socket_process_is_sandboxed_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"], "marker": "e2e", "needs_root": false, "note": "The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed."},
|
||||
{"id": "wrapper.e2e.web", "giro": "G2", "os": ["linux", "windows"], "min_tests": 27, "exact": true, "tests": ["tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_http3_through_the_proxy_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The networkidle e2e with routes and the HTTP/3 e2e, split from wrapper.e2e.udp (about 260 s of 500 on Linux; the whole suite did not fit the 15 minutes of Windows)."},
|
||||
{"id": "wrapper.e2e.doh", "giro": "G2", "os": ["linux", "windows"], "min_tests": 19, "exact": true, "tests": ["tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_ice_names_by_the_context_proxy_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux needs root: the resolver trap of the file (ResolverTrap) points /etc/resolv.conf at a counting resolver on port 53. Su Windows il resolver trap non gira: l'asserzione sul resolver di sistema è l'unica omessa. Run it without xdist (port 53 is one per host). On the Linux leg the gate exports INVPW_REQUIRE_TRAP=1: a trap that cannot run or bind port 53 is a failure, not a skipped assertion."},
|
||||
{"id": "wrapper.e2e.context.egress", "giro": "G2", "os": ["linux", "windows"], "min_tests": 14, "exact": true, "tests": ["tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Taken from the minimal-engine port (branch tests/minimal-port) unchanged but for the removed engine gate: 12 = 6 kinds of page work (hints, image/fetch/WebSocket/EventSource, WebRTC STUN and TURN-udp by name, geolocation, a service worker with push, a page still loading when its context closes) x 2 schemes (no proxy at launch and a gateway on the context; a launch gateway and a different one on the context), and 2 = the TURN server named over TCP in those two schemes. EXPECTED RED on the published firefox-63: the 2 TURN-by-name cases (the lookup of the TCP socket takes user context 0; fixed by commits ac0214bff4 and 058edd6cc6 of firefox-64). The 12 have not run on any engine yet. Like wrapper.e2e.doh: the Linux leg runs as root for the resolver trap (INVPW_REQUIRE_TRAP=1); on Windows the DoH log and the gateway's CONNECTs are the sink."},
|
||||
{"id": "wrapper.e2e.context.sink", "giro": "G2", "os": ["linux", "windows"], "min_tests": 35, "exact": true, "tests": ["tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "The behavioural half of the class gate 'nothing of a context leaves but through its proxy', with a witness at an address of this host (no root, no address on lo) and the engine's own resolver log as the native-lookup sink. 35 = 31 + the 4 OCSP cases; the 31 are 19 probes (fetch, WebSocket, stun, turn over UDP, turn and turns over TCP, each by name, by IP and by a .local name, behind SOCKS5 and behind an HTTP proxy where the road differs) + 3 controls (the same probe by IP with no proxy IS heard by the witness) + 1 control of the native sink. + 4 PeerConnections built from a torn-down window (a detached iframe, a closed popup; behind SOCKS5 and behind HTTP; defect B3: EXPECTED RED on firefox-63, green on firefox-64) + 2 controls of them (the same PeerConnection from an attached iframe, green on both). + 2 cases of two contexts alive at once (each with its own proxy and DoH, a TURN server over TCP by a different name in each; behind SOCKS5 EXPECTED RED on firefox-63 like turn_tcp-name-socks5, behind HTTP green on both). EXPECTED RED on firefox-63: turn_tcp-name-socks5, turns_tcp-name-socks5 (user context 0, fixed in firefox-64) and the three .local cases fetch-local-socks5, stun-local-socks5, stun-local-http (audit B4, also red on firefox-64 until decided). The Linux leg runs as root so the resolver trap is a second sink. Windows reads the same engine log (its getaddrinfo lines are in the parent process file under the sandbox: run 43574494194), with the no-proxy native control as its positive control. THE OCSP CASES (4): a TLS page whose leaf, signed by a lab CA the engine trusts (put in the profile by the engine's xpcshell, no ignore_https_errors), names its OCSP responder by a NAME (ocsp-<nonce>.lab.test) and by an IP; a context behind the gateway loads it and the request must go through the gateway, never be looked up natively, in user context 0, or reach the responder (2 cases, EXPECTED RED on firefox-63, green on firefox-64); the same page in a context with no proxy IS asked of the responder (control); a page of an issuer the engine does not trust makes no OCSP request (negative control)."},
|
||||
{"id": "wrapper.e2e.realness", "giro": "G2", "os": ["linux", "windows"], "min_tests": 32, "exact": true, "tests": ["tests/test_realness_behind_a_declared_exit_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "The realness check without a real proxy: six declared exits, the values a page reads, and the roads. Linux runs as root without xdist like the DoH suite (the resolver trap); on Windows the trap does not exist and the assertion on the system resolver is the only one omitted."},
|
||||
{"id": "wrapper.unit.udp", "giro": "G1", "os": ["linux", "windows"], "min_tests": 249, "exact": true, "tests": ["tests/test_the_server_says_nothing_about_the_launch_counter.py", "tests/test_the_witness_picks_a_port_both_sockets_bind.py", "tests/test_preload_newtab_reaches_the_core_only_when_asked.py", "tests/test_the_resolver_trap_counts_its_own_users.py", "tests/test_the_doh_e2e_launch_on_a_virtual_display.py", "tests/test_the_realness_helpers.py", "tests/test_the_h3_line_helpers.py", "tests/test_the_fake_doh_delays_and_refuses.py", "tests/test_the_host_address_helper.py", "tests/test_the_udp_chain_helper.py", "tests/test_the_fake_doh_answers.py", "tests/test_doh_session_prefs_unit.py", "tests/test_the_leak_watcher_sees_a_direct_connection.py", "tests/test_the_http_proxy_helper_asks_for_credentials.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_the_network_declaration_reaches_the_engine.py", "tests/test_the_resolver_trap_is_required_by_the_gate.py", "tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py", "tests/test_the_witness_hears_a_direct_send.py", "tests/test_the_egress_sink_helpers.py", "tests/test_the_lab_ca_and_its_ocsp_leaf.py"], "marker": "unit", "needs_root": false, "note": "92 = 6+32+21+7+8+3+9+6. The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added. The sink of the egress gate (tests/test_the_egress_sink_helpers.py, 20): the engine's log (the same on Linux and Windows) and the witness read on known inputs, and a blind log that must raise, never answer 'nothing'. The lab CA of its OCSP case (tests/test_the_lab_ca_and_its_ocsp_leaf.py, 17; tests/test_the_fake_doh_answers.py +1, the DoH serving a lab-CA leaf): the leaf's AIA, trusted and untrusted issuers, the responder, the xpcshell step."},
|
||||
{"id": "wrapper.unit.udp", "giro": "G1", "os": ["linux", "windows"], "min_tests": 221, "exact": true, "tests": ["tests/test_a_served_launch_cannot_turn_the_launch_counter_off.py", "tests/test_the_witness_picks_a_port_both_sockets_bind.py", "tests/test_preload_newtab_reaches_the_core_only_when_asked.py", "tests/test_the_resolver_trap_counts_its_own_users.py", "tests/test_the_doh_e2e_launch_on_a_virtual_display.py", "tests/test_the_realness_helpers.py", "tests/test_the_h3_line_helpers.py", "tests/test_the_fake_doh_delays_and_refuses.py", "tests/test_the_host_address_helper.py", "tests/test_the_udp_chain_helper.py", "tests/test_the_fake_doh_answers.py", "tests/test_doh_session_prefs_unit.py", "tests/test_the_leak_watcher_sees_a_direct_connection.py", "tests/test_the_http_proxy_helper_asks_for_credentials.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_the_network_declaration_reaches_the_engine.py", "tests/test_the_resolver_trap_is_required_by_the_gate.py", "tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py", "tests/test_the_witness_hears_a_direct_send.py"], "marker": "unit", "needs_root": false, "note": "92 = 6+32+21+7+8+3+9+6. The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added."},
|
||||
{"id": "wrapper.e2e.page", "giro": "G2", "os": ["linux", "windows"], "min_tests": 115, "exact": true, "tests": ["tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_popup_destinations_e2e.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_route_superseded_e2e.py"], "marker": "e2e", "needs_root": false, "note": "114 = 100 + the 14 of test_a_page_that_moves_on_e2e.py (a navigation the page overtook with location.replace ends; the engine fix 860ef8a6d9 is proved by it). 100 counted at the collection; was 96 = 10+32+16+34+4 before the popup tests of 6200bc2). A page is handed over when the engine says Page.ready; a popup reaches the client (link, noopener, window.open; own site and another; with and without a route; in-process and over launch_server) as Playwright's does; a superseded route. Needs the candidate binary, and the stock Playwright client of the dev extra."},
|
||||
{"id": "wrapper.unit.page", "giro": "G1", "os": ["linux", "windows"], "min_tests": 72, "exact": true, "tests": ["tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_page_number_follows_the_call.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_the_hand_over_of_a_popup_holds_under_concurrency.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py"], "marker": "unit", "needs_root": false, "note": "72 = 44 + 3+9+5+1+10 of the popup hand-over (24 counted at the collection before; was 20 = 3+8+1+8 before 6200bc2). The page dispatcher's wait for Page.ready and what it hands over; the drive gate goes through the core (the engine waits for the session's road)."}
|
||||
{"id": "wrapper.unit.page", "giro": "G1", "os": ["linux", "windows"], "min_tests": 44, "exact": true, "tests": ["tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_page_number_follows_the_call.py"], "marker": "unit", "needs_root": false, "note": "24 (counted at the collection; was 20 = 3+8+1+8 before 6200bc2). The page dispatcher's wait for Page.ready and what it hands over; the drive gate goes through the core (the engine waits for the session's road)."}
|
||||
]
|
||||
+1
-1
@@ -9,7 +9,7 @@ sitemap: false
|
||||
# docs/ source folder
|
||||
|
||||
This folder is the source the wiki is rendered from. Read it with search and
|
||||
navigation in **[the wiki](https://github.com/oss-invisible/playwright/wiki)**.
|
||||
navigation in **[the wiki](https://github.com/feder-cr/invisible_playwright/wiki)**.
|
||||
|
||||
`index.md` is what the site root actually serves. This file exists so the folder
|
||||
still shows something sensible when browsed directly on github.com.
|
||||
@@ -276,6 +276,6 @@ not neutral; it is a shape no ordinary browser has, so assert presence, not abse
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. Every candidate line in
|
||||
this page is one I have read off about:webrtc while chasing a leak that a badge missed.*
|
||||
@@ -244,7 +244,7 @@ limits, or behaviour and timing, which you still have to supply.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The sensor surface
|
||||
is the easy kind of honest: the correct answer is to report nothing, and the only
|
||||
way to fail is to invent data a real desktop would never send.*
|
||||
@@ -218,6 +218,6 @@ slightly unusual.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The header and the array
|
||||
come from one preference, which is exactly what an injection-only spoof gets wrong.*
|
||||
@@ -12,7 +12,7 @@ nav_order: 17
|
||||
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
|
||||
lives:
|
||||
|
||||
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/oss-invisible/playwright_mcp/wiki/agent-retry-loops-rate-limits)**
|
||||
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/feder-cr/invisible_playwright_mcp/wiki/agent-retry-loops-rate-limits)**
|
||||
|
||||
The one-paragraph version: an agent that retries and re-plans multiplies its
|
||||
requests, and volume is scored server-side against your address and account.
|
||||
|
||||
@@ -12,7 +12,7 @@ nav_order: 10
|
||||
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
|
||||
lives:
|
||||
|
||||
**[The timing signal AI agents give off](https://github.com/oss-invisible/playwright_mcp/wiki/ai-agent-timing-signal)**
|
||||
**[The timing signal AI agents give off](https://github.com/feder-cr/invisible_playwright_mcp/wiki/ai-agent-timing-signal)**
|
||||
|
||||
The short version it still owes you here: a think-act loop pauses for model
|
||||
latency, and that pause repeats with a regularity no human produces. The
|
||||
|
||||
@@ -274,6 +274,6 @@ identity.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. This page exists because eight separate articles all
|
||||
concluding "does not fit" would have been worse for you than one that says why.*
|
||||
@@ -246,7 +246,7 @@ for where a JavaScript-collected fingerprint sits among the other layers.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The Camoufox issue above is someone else's bug
|
||||
tracker and someone else's engine build; it is quoted here because it is the clearest
|
||||
public evidence that this whole approach narrows a gap rather than closing one, and that
|
||||
|
||||
@@ -124,7 +124,7 @@ for the flag every CDP-driven fork inherits alike.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level, precisely because a Chromium fork does not
|
||||
change the automation protocol underneath it. The page recommends switching
|
||||
engines rather than skins for that reason, and says so plainly rather than
|
||||
|
||||
@@ -77,7 +77,7 @@ This is the one detector in this whole corpus where the honest answer is: engine
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright), a Firefox
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
|
||||
patched at the C++ level. Anubis is the one detector here this project can actually read the source of, and
|
||||
the honest conclusion is that engine-level realness has almost nothing to do with passing it: the puzzle
|
||||
tests JavaScript execution speed, not fingerprint fidelity, and any real browser clears it the same way.*
|
||||
@@ -77,7 +77,7 @@ The **puzzle itself is a different kind of gate entirely**, the same structural
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright), a Firefox
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
|
||||
patched at the C++ level. Arkose's own materials stop at category-level claims about its risk engine,
|
||||
and this page stops there too for anything not independently corroborated. It does not describe, and
|
||||
this project does not build, a way to solve FunCaptcha's puzzles for you.*
|
||||
@@ -206,6 +206,6 @@ when every browser check comes back green.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The browser layer is the
|
||||
part we can make perfect; the IP is the part only you can keep clean.*
|
||||
@@ -222,7 +222,7 @@ surfaces, and [how CreepJS decides you are lying](creepjs-explained.md).
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The two scores above are our own A/B, on one
|
||||
machine and one identity, with the audio noise as the only variable. The feature they
|
||||
killed was one we wrote.*
|
||||
@@ -221,6 +221,6 @@ the audio device sits in the order you should debug.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The audio device is one of
|
||||
the machine tells no page-level plugin can reach, which is why it is solved in the engine.*
|
||||
@@ -281,7 +281,7 @@ for the same total-budget thinking applied to a poll loop instead of a request r
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The code arriving is the easy part; keeping the
|
||||
browser that asked for it and the one that spends it as the same machine is the part
|
||||
worth writing down.*
|
||||
@@ -143,6 +143,6 @@ checks when there is no way to avoid running it.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level, on why the safest login is usually the one that
|
||||
never runs as automation at all.*
|
||||
@@ -266,7 +266,7 @@ session-reuse pattern this flow feeds into once the 2FA step is past.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. Generating a code from a secret you already
|
||||
hold is arithmetic, not automation trickery; the browser's realness has nothing to
|
||||
do with whether the math is correct, and the whole flow is worthless without a
|
||||
|
||||
@@ -89,7 +89,7 @@ Several rule families sit entirely outside what any browser engine can affect. `
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright), a Firefox
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
|
||||
patched at the C++ level. AWS documents its Bot Control rules more specifically, by name and by
|
||||
default action, than almost any other vendor in this corpus, which is why this page quotes rule
|
||||
names directly rather than reconstructing them from outside reverse engineering.*
|
||||
@@ -222,6 +222,6 @@ for the order to debug in once something flags you.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The engine swap is the easy
|
||||
half; the pacing and the exit are the half that decides the session.*
|
||||
@@ -94,7 +94,7 @@ Firefox build.
|
||||

|
||||
values.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/battery-api-fingerprint-firefox-values.png)
|
||||
|
||||
`navigator.getBattery` is `undefined`, which is the answer to the title, and the bundled
|
||||
Firefox returns the same thing.
|
||||
@@ -211,7 +211,7 @@ and [how navigator.webdriver actually reads](navigator-webdriver-explained.md).
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The most robust fingerprint
|
||||
field is the one a real browser genuinely produces, and sometimes the one it genuinely does
|
||||
not.*
|
||||
@@ -204,7 +204,7 @@ challenge layer that sits beside, not instead of, everything on this page.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. It answers the
|
||||
browser-identity layer honestly; it does not touch a rate limit, an IP block, a
|
||||
honeypot your own code walks into, or a site's decision to block a traffic category
|
||||
|
||||
@@ -184,6 +184,6 @@ for where behavioural signals sit in the wider picture.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The preference exists because the timeout described
|
||||
above is real, and a test suite that hits it deserves a way back to the old behaviour.*
|
||||
@@ -256,6 +256,6 @@ for the compare-against-stock method this page leans on.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The protocol under
|
||||
the driver is an implementation detail; the leaks were never on the wire.*
|
||||
@@ -218,6 +218,6 @@ human is worth more than the seconds you save.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The speed is stock
|
||||
Playwright; the tell is the part the speed guides leave out.*
|
||||
@@ -170,6 +170,6 @@ which takes the consistency idea considerably further.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright).
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
|
||||
We gate every release on BotD, so the detector names and the compared values above
|
||||
come out of its source and not out of memory.*
|
||||
@@ -67,7 +67,7 @@ tool you picked.
|
||||
|
||||
## Where this project sits
|
||||
|
||||
[invisible_playwright](https://github.com/oss-invisible/playwright) is
|
||||
[invisible_playwright](https://github.com/feder-cr/invisible_playwright) is
|
||||
not a fifth entry on the list above competing for the same job. It answers a
|
||||
different question: given that you have already picked Playwright's API
|
||||
(unchanged, same code you would write against any Playwright browser), what
|
||||
@@ -117,7 +117,7 @@ and [Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidet
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
which is not a competitor to any of the four tools above - it sits underneath
|
||||
one of them. The page is organized around picking the right testing tool
|
||||
first, because that decision is independent of the engine question it exists
|
||||
|
||||
@@ -179,6 +179,6 @@ layer an extension lives at has a ceiling.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. This page exists because someone asked in our
|
||||
discussions and got an answer about a different kind of extension entirely.*
|
||||
@@ -259,7 +259,7 @@ for the compare-against-a-stock-browser method that keeps these numbers honest.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The three numbers on this
|
||||
page get conflated because they all look like a percentage; none of them are the same
|
||||
percentage.*
|
||||
@@ -12,7 +12,7 @@ nav_order: 2
|
||||
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
|
||||
lives:
|
||||
|
||||
**[browser-use getting blocked: what you can and cannot change](https://github.com/oss-invisible/playwright_mcp/wiki/browser-use-getting-blocked)**
|
||||
**[browser-use getting blocked: what you can and cannot change](https://github.com/feder-cr/invisible_playwright_mcp/wiki/browser-use-getting-blocked)**
|
||||
|
||||
The unchanged short answer: browser-use exposes a real set of levers
|
||||
(`executable_path`, `user_data_dir`, `proxy`, `headless`, `args`), all of
|
||||
|
||||
@@ -239,6 +239,6 @@ signature is the pixels, the renderer string is a reported value, and both have
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The two hashes above are
|
||||
real measurements, reproduced to the byte on two operating systems from one seed.*
|
||||
@@ -245,6 +245,6 @@ datacenter. You want a stable, hardware-shaped, unique value, not a popular one.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The seed makes every surface
|
||||
reproducible, so the two-read stability check above is a test rather than a guess.*
|
||||
@@ -239,6 +239,6 @@ different hardware.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level, including three separate font backends convinced not
|
||||
to ask their host anything.*
|
||||
@@ -232,7 +232,7 @@ for the compare-against-stock method that catches a VM tell a verdict hides.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. It presents one coherent
|
||||
real-hardware persona to the browser-visible layer; the IP, the timing floor and the
|
||||
pacing are still yours to supply.*
|
||||
@@ -251,6 +251,6 @@ handle.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The clipboard opens for it
|
||||
because the gesture is genuinely trusted, not because a value was faked.*
|
||||
@@ -85,7 +85,7 @@ Linux container, because they are presented by the browser rather than read from
|
||||
|
||||

|
||||
both.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/can-a-website-tell-you-are-on-a-server-values.png)
|
||||
|
||||
Three values from one page served from `127.0.0.1`. The audio sample rate is `48000 Hz`
|
||||
in both browsers and the platform string is `Win32` in both, so neither of those two is
|
||||
@@ -230,6 +230,6 @@ and the pacing still depend on where and how you run it.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. It fixes the machine tells a
|
||||
server leaks in JavaScript; the datacenter IP and the pacing are still yours to supply.*
|
||||
@@ -196,7 +196,7 @@ for the end-to-end version of this.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The seed-and-directory
|
||||
pairing rule is one I wrote down after debugging a profile whose machine changed
|
||||
overnight.*
|
||||
@@ -196,6 +196,6 @@ and [when the timezone does not match the proxy](timezone-proxy-mismatch.md).
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The anonymity-set framing
|
||||
is the one that keeps me from "fixing" a shared fingerprint that was doing its job.*
|
||||
@@ -187,6 +187,6 @@ still on a distrusted IP.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The browser half is
|
||||
what the patch does; the IP half is the one honest thing it cannot do for you.*
|
||||
@@ -201,6 +201,6 @@ rather than reading the score.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The honest boundary in the
|
||||
last section is the one I most wish more of these pages drew.*
|
||||
@@ -85,7 +85,7 @@ promised no leftover state, and it delivers that.
|
||||

|
||||
panels.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/can-you-be-fingerprinted-in-incognito-mode-values.png)
|
||||
|
||||
Three values, read from one page served from `127.0.0.1`. `localStorage` is available in
|
||||
both, which is the point of the section above: private mode is about state, and this
|
||||
@@ -218,7 +218,7 @@ and [the TLS handshake no browsing mode can hide](ja3-ja4-tls-fingerprint.md).
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. Private mode clears what a
|
||||
site stored on you; this project changes what the browser is, which is the axis private
|
||||
mode leaves alone.*
|
||||
@@ -208,6 +208,6 @@ signals no stealth layer touches.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The weight that keeps it out
|
||||
of a small function is the same weight that makes it look real.*
|
||||
@@ -208,7 +208,7 @@ and behaviour layers are not in those tests at all.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. It is built to look like
|
||||
a real browser, which is why it passes most checks and why it will never claim to make
|
||||
you invisible.*
|
||||
@@ -141,6 +141,6 @@ fingerprinting surface](measuretext-textmetrics-fingerprinting.md).
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. A canvas hash was never
|
||||
really about the canvas; it was always about everything underneath it.*
|
||||
@@ -130,7 +130,7 @@ right value directly.
|
||||
a seed report different canvas and WebGL readback hashes and even a different device
|
||||
pixel ratio, while two sessions launched with the same seed report identical hashes and
|
||||
identical
|
||||
pixels.](https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/img/canvas-seed-vs-no-seed.png)
|
||||
pixels.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/canvas-seed-vs-no-seed.png)
|
||||
|
||||
Four sessions above, one page served from `127.0.0.1`, hashes computed inside the page
|
||||
so the numbers and the picture come from the same run. The two unseeded sessions
|
||||
@@ -289,7 +289,7 @@ last step is to pin the identity so a failure is reproducible.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The seed is the same
|
||||
lever whether you are hiding rotation or reproducing a bug: pin it and the machine
|
||||
stops moving.*
|
||||
@@ -137,7 +137,7 @@ instead of staying bounded.
|
||||
|
||||

|
||||
report that the screen and the viewport differ.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/canvas-fingerprint-noise-values.png)
|
||||
|
||||
One page served from `127.0.0.1`, three values, two browsers. The canvas pixel hash
|
||||
moves and the text width does not: `measureText` returns `115.65 px` in both.
|
||||
@@ -224,6 +224,6 @@ canvas-in-iframe rows are a consistency test rather than a fingerprint test, and
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The solid-fill guard exists because we shipped
|
||||
without it.*
|
||||
@@ -1,20 +1,17 @@
|
||||
---
|
||||
title: "Canvas and WebGL fingerprints across OSes"
|
||||
description: "Canvas and WebGL fingerprints across Windows and Linux: 2D canvas is drawn on the CPU, noise is projected only when WebGL and WebGPU pixels are read back, and it depends only on the seed."
|
||||
title: "Canvas and WebGL fingerprints, identical across OSes"
|
||||
description: "Canvas and WebGL fingerprints identical across Windows and Linux: intercept readback, not the render, so one seed produces a byte-identical hash on every OS."
|
||||
parent: "Canvas, WebGL, Fonts and Audio"
|
||||
grand_parent: "Guides"
|
||||
nav_order: 9
|
||||
---
|
||||
|
||||
|
||||
# Canvas and WebGL fingerprints across OSes
|
||||
# Canvas and WebGL fingerprints, identical across OSes
|
||||
|
||||
A GPU-backed render surface can't be read from or written to directly and safely, so
|
||||
the fix intercepts the one place JavaScript can actually see the result instead - the
|
||||
same seed then gives the same noise on Windows and Linux. 2D canvas is drawn on the CPU, so it
|
||||
does not depend on the GPU; the noise is projected only when WebGL and WebGPU pixels are read back.
|
||||
Text and GPU raster can still differ slightly between the two OSes, and the PNG container is left
|
||||
as a stock Firefox writes it.
|
||||
same seed then produces a byte-identical canvas and WebGL hash on Windows and Linux.
|
||||
|
||||
[Why headless browsers render different fonts](headless-fonts-differ.md) and
|
||||
[how to make Linux and macOS report real Windows fonts](bundled-fonts-cross-platform.md)
|
||||
@@ -95,18 +92,17 @@ for the same reason: nothing about it resembles noise added on top of a real sig
|
||||
| Additive per-call noise | Perturbs a fraction of pixels on top of the real render | Two reads in one page differ; the real render's font/GPU signature still shows through; the noise has a high-frequency shape a single read can flag |
|
||||
| Full substitution | Replaces pixels with a pure function of the seed and the pixel position, with zero input from the render underneath | Must leave low-entropy buffers untouched so it does not break legitimate canvas reads |
|
||||
|
||||
## What was checked, and what was not
|
||||
## The proof: byte-identical hashes, not just "looks similar"
|
||||
|
||||
Rendered the same seed's canvas (text plus a gradient) and WebGL scene (a
|
||||
high-entropy draw) on Windows and on Linux, hashed both in-page, and ran a commercial
|
||||
fingerprint scanner across multiple seeds. What holds: the noise is a pure function of
|
||||
the seed and of the pixels it is applied to, so two reads of the same bytes give the same
|
||||
result, and the 2D path does not depend on the GPU.
|
||||
high-entropy draw) on Windows and on Linux, hashed both in-page. The hashes matched
|
||||
byte for byte on both platforms. Run against a commercial fingerprint scanner across
|
||||
multiple seeds, zero failures on either OS.
|
||||
|
||||
What is not claimed: that every byte matches between a Windows and a Linux host. Text
|
||||
pixels follow the host's rasteriser on Linux, and GPU raster can differ by one level
|
||||
between drivers. Whether two profiles with the same font can be linked by the way they
|
||||
rasterise has not been measured.
|
||||
That is a stronger claim than "produces a plausible fingerprint." It's the same
|
||||
identity, provably, regardless of which OS is actually running underneath - which is
|
||||
what makes a seed a real, portable identity instead of a value that happens to look
|
||||
right on the machine it was tested on.
|
||||
|
||||
## What this generalises to, and where the edges still are
|
||||
|
||||
@@ -125,8 +121,8 @@ a fact that becomes true once and stays true.
|
||||
The render was never the reachable surface. Content only ever sees a canvas or a
|
||||
WebGL scene through a handful of readback calls, and putting the substitution there
|
||||
instead of in the renderer is what makes a seed portable: the same identity produces
|
||||
the same noise on Windows and on Linux, because the noise comes from the seed and not from
|
||||
the host's rendering pipeline.
|
||||
the same bytes on Windows and on Linux, because nothing about either host's actual
|
||||
rendering pipeline reaches the output.
|
||||
|
||||
The tradeoff is honest rather than free - the fix covers only the readback paths it
|
||||
enumerates, and a masking-safe design still has to leave genuinely low-entropy canvas
|
||||
@@ -135,10 +131,10 @@ fingerprinting.
|
||||
|
||||
## Short answers to the questions that lead here
|
||||
|
||||
**Can canvas and WebGL fingerprints be made the same across operating systems?** The
|
||||
noise can: it is applied where content can read the result, from the seed, rather than at
|
||||
the render itself, which can't be touched directly on a GPU-backed surface. The pixels
|
||||
underneath still differ slightly between hosts for text and GPU raster.
|
||||
**Can canvas and WebGL fingerprints be made identical across operating systems?** Yes,
|
||||
if the interception happens at every point content can read the result rather
|
||||
than at the render itself, which is the part that can't be touched directly on a
|
||||
GPU-backed surface.
|
||||
|
||||
**Why substitution instead of adding noise to the real render?** Noise on top of a
|
||||
real image still carries the host's own rendering signature underneath it.
|
||||
@@ -166,7 +162,7 @@ content can observe, not at the source - applied to a different surface.
|
||||
retrieved 2026-08-28, the enumerable set of readback calls this page's interception
|
||||
point covers.
|
||||
- This project's own render-readback interception work and its cross-platform
|
||||
validation (same-seed hashes on Windows and Linux, multi-seed
|
||||
validation (same-seed byte-identical hashes on Windows and Linux, multi-seed
|
||||
results against a commercial fingerprint scanner).
|
||||
|
||||
**See also:** [canvas fingerprint noise](canvas-fingerprint-noise.md), for why
|
||||
@@ -179,7 +175,7 @@ for what that hash actually measures.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The same-seed check here once passed while the
|
||||
render was actually broken: a Linux canvas with text came back holding 11994 distinct
|
||||
colours where Windows gave 16, and identical bytes for two different strings.*
|
||||
@@ -200,6 +200,6 @@ layer has to be built differently rather than patched afterwards.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. Firefox-based, so `cdc_` was never our problem,
|
||||
but the general shape of it is everybody's.*
|
||||
@@ -110,7 +110,7 @@ and [WebRTC leak with a proxy](webrtc-leak-proxy.md).
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The table above
|
||||
exists because "the proxy isn't working" and "the site is blocking me" get
|
||||
treated as the same sentence far more often than they are the same problem.*
|
||||
@@ -254,6 +254,6 @@ in both directions.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. This is the argument for the engine choice that we
|
||||
find most convincing, and it is the one most comparisons leave out.*
|
||||
@@ -209,7 +209,7 @@ the same argument from the other end,
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. Running a real Firefox means the Client Hints
|
||||
question answers itself, which is the kind of advantage you only get by not lying in the
|
||||
first place.*
|
||||
@@ -183,6 +183,6 @@ and [waiting for a specific API response](wait-for-specific-api-response-playwri
|
||||
|
||||
---
|
||||
|
||||
*From [invisible_playwright](https://github.com/oss-invisible/playwright).
|
||||
*From [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
|
||||
The three-arm table is our own run and the test page is printed above so you
|
||||
can reproduce it rather than take our word for it.*
|
||||
@@ -80,7 +80,7 @@ This is worth being direct about, because it is a genuinely different kind of me
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright), a Firefox
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
|
||||
patched at the C++ level. This mechanism has nothing to do with browser fingerprinting, so this page has
|
||||
nothing to claim about engine realness one way or the other, honestly: a scraper that respects a site's
|
||||
crawl preferences and does not chase invisible links never triggers it in the first place.*
|
||||
@@ -233,7 +233,7 @@ each other.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level and driven by stock Playwright. Bot Management's actual
|
||||
score never reaches the client that earned it; what this page can speak to is the half of
|
||||
the pipeline a real browser engine touches, and it stops exactly where that half stops.*
|
||||
@@ -248,7 +248,7 @@ detail.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level and driven by stock Playwright. This page describes
|
||||
a mechanism, not a workaround: the product does not solve captchas or click Turnstile's
|
||||
interactive tier for you, and any tool that claims to defeat Cloudflare wholesale is
|
||||
|
||||
@@ -193,7 +193,7 @@ and [Playwright in Docker](playwright-docker-detection.md), which are the rest o
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The joint sampling is the same decision made for
|
||||
audio, storage quota and antialiasing, and for the same reason: independently sampled
|
||||
dimensions contradict each other.*
|
||||
@@ -209,7 +209,7 @@ and [screen sizes that give a headless machine away](screen-size-headless-tells.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The color-gamut and
|
||||
colorDepth disagreement is one I would rather find in my own diff than have a page find
|
||||
for me.*
|
||||
@@ -205,7 +205,7 @@ for reading the JSON the page already fetches.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The browser is for the
|
||||
fingerprint-gated fetches, httpx is for the unguarded bulk, and telling them apart is the
|
||||
whole job.*
|
||||
@@ -12,7 +12,7 @@ nav_order: 6
|
||||
This page moved to the invisible_playwright_mcp wiki, retargeted at the question people
|
||||
actually search:
|
||||
|
||||
**[Claude computer use detected as a bot](https://github.com/oss-invisible/playwright_mcp/wiki/claude-computer-use-detected-as-bot)**
|
||||
**[Claude computer use detected as a bot](https://github.com/feder-cr/invisible_playwright_mcp/wiki/claude-computer-use-detected-as-bot)**
|
||||
|
||||
The core of it, kept here in brief: a coordinate-clicking agent never
|
||||
generates the DOM-automation tells, so `navigator.webdriver` advice mostly
|
||||
|
||||
@@ -200,6 +200,6 @@ rather than a free pass.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. CSP enforcement is the
|
||||
browser's own security layer, unaffected by fingerprint patching in either direction.*
|
||||
@@ -188,6 +188,6 @@ seam looks like, and
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. We would rather document the missing field than
|
||||
publish an integration guide for a seam that is not there.*
|
||||
@@ -168,6 +168,6 @@ JavaScript layer there is no override to find and no seam to detect.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright).
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
|
||||
CreepJS is a release gate here. The lie names above are quoted from its source and
|
||||
not paraphrased, because the exact strings are what you will see in a report.*
|
||||
@@ -139,6 +139,6 @@ for the reproduction discipline that caught the two wrong fixes here.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level, on a bug that took two wrong committed fixes before
|
||||
the actual cause was reproduced.*
|
||||
@@ -223,6 +223,6 @@ platform tell that no script controls, and
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The system-colour palette is pinned here because a
|
||||
commercial detector was hashing it and catching the host operating system through it.*
|
||||
@@ -298,7 +298,7 @@ and [the checklist for when one site detects you](playwright-detected-as-bot.md)
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright).
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
|
||||
DataDome does not publish its scoring model or the full list of what its
|
||||
collector checks, so this page draws a line between DataDome's own
|
||||
documentation and outside reverse engineering everywhere that line exists,
|
||||
|
||||
@@ -225,7 +225,7 @@ driver layer is the one this page is about.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. All four fixes are in this project's engine and
|
||||
driver, and the fourth one was found by controlled experiment after the first three did
|
||||
not fully close it.*
|
||||
@@ -66,7 +66,7 @@ families against two different fallbacks. Segoe UI, Calibri, Cambria and Tahoma
|
||||
present against both fallbacks. Consolas reads absent against the monospace fallback
|
||||
and present against the serif one. An invented control family reads absent
|
||||
everywhere. All three browsers return the same
|
||||
answer.](https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/img/font-presence-probe-three-arms.png)
|
||||
answer.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/font-presence-probe-three-arms.png)
|
||||
|
||||
Run that exact function over ten families with `monospace` as the fallback, on Windows,
|
||||
and Consolas comes back **absent**. Consolas is installed. It is also what `monospace`
|
||||
@@ -293,7 +293,7 @@ and [why headless browsers render a different font set](headless-fonts-differ.md
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The font set is the
|
||||
same on every host by construction, which is the only reason this probe answers
|
||||
the same way whether the process runs on a laptop or a container.*
|
||||
@@ -194,6 +194,6 @@ pass the number as text, `"1.25"`, not as a bare float.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The dead dpr write in this
|
||||
page is one we shipped ourselves, and only caught by reading the value back.*
|
||||
@@ -95,7 +95,7 @@ because shaping is the same in-tree library on both. None of that is Selenium
|
||||
or Playwright; it is what the engine and the machine underneath either of them
|
||||
report. Choosing between the two frameworks does not move any of those 58
|
||||
families. This project exists because of that gap:
|
||||
[invisible_playwright](https://github.com/oss-invisible/playwright) is
|
||||
[invisible_playwright](https://github.com/feder-cr/invisible_playwright) is
|
||||
Playwright's own API, unchanged, driving a Firefox patched at the C++ source
|
||||
rather than the stock build - same protocol and auto-waiting Playwright always
|
||||
had, different browser underneath. It does not touch Selenium's side of this
|
||||
@@ -151,7 +151,7 @@ for the engine question once you have picked a framework.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. This page compares
|
||||
frameworks, not engines - the engine question is a separate page, linked above,
|
||||
because conflating them is the most common mistake in this comparison.*
|
||||
@@ -227,6 +227,6 @@ cannot substitute for them.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The engine layer
|
||||
is the part I can hand you; the clean IP is the part you still have to bring.*
|
||||
@@ -208,6 +208,6 @@ and [testing detection without fooling yourself with a verdict](how-to-test-bot-
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. It hides that a script is
|
||||
present; the pacing is still yours to get right.*
|
||||
@@ -249,7 +249,7 @@ closed.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The default that keeps DNS and
|
||||
the connection exiting together is the whole point of this page; the reputation of the exit is
|
||||
still yours to bring.*
|
||||
@@ -248,6 +248,6 @@ the network layer neither a VPN nor a fingerprint fix reaches from JavaScript.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The fingerprint half is
|
||||
what it controls; the clean IP and the human pacing are still yours to supply.*
|
||||
@@ -203,7 +203,7 @@ pacing and quotas you respect.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The browser is built to
|
||||
look real; the exit IP is still yours to choose, and a chain changes who can trace it,
|
||||
not what the site scores.*
|
||||
@@ -205,7 +205,7 @@ the layer that no amount of cookie clearing or JavaScript ever reaches.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. Every session gets a
|
||||
distinct, self-consistent fingerprint from its seed, which is the thing a cookie clear
|
||||
was always trying and failing to be.*
|
||||
@@ -190,6 +190,6 @@ and [keeping canvas and WebGL consistent across platforms](canvas-webgl-cross-pl
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The server-OS mismatch in
|
||||
this page is a mistake I shipped before I built the thing that fixes it.*
|
||||
@@ -200,7 +200,7 @@ for the layer just above it.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The handshake is
|
||||
real because the browser is real; the exit and the pacing are still yours to get
|
||||
right.*
|
||||
@@ -240,6 +240,6 @@ and [how to test whether your browser is detected](how-to-test-bot-detection.md)
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The DOM check above is one
|
||||
I run against a real session before repeating any claim about what a page can see.*
|
||||
@@ -212,6 +212,6 @@ and [the checklist for being detected on one site](playwright-detected-as-bot.md
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The flag reads false
|
||||
because the browser's own code returns false, not because a script overwrote it.*
|
||||
@@ -208,7 +208,7 @@ depends on.
|
||||
|
||||
---
|
||||
|
||||
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level. The honest answer here is a persistent profile and
|
||||
a handful of old GitHub issues, not a launch flag, and pretending otherwise would just
|
||||
cost someone an afternoon finding that out the hard way.*
|
||||
@@ -202,7 +202,7 @@ documented upstream.
|
||||
|
||||
---
|
||||
|
||||
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
|
||||
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
|
||||
a Firefox patched at the C++ level driven by stock Playwright. The split it is built
|
||||
on is the whole point of this page: keep the driver ordinary, put the disguise in
|
||||
the browser.*
|
||||
Loaded 100 of 592 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user