Compare commits

..
Author SHA1 Message Date
feder-crandClaude Sonnet 5.5 c8842355fb e2e: the dot() reads a zero's sign as the GPU does (zeros of both signs in the vectors, the comparison keeps the sign)
The comparison treated -0 and +0 as equal, which hid a fma whose product and sum are both -0 coming back +0. The model's fma now gives IEEE's sign of a zero result, with a unit test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 17:20:40 +01:00
feder-crandClaude Sonnet 5.5 e9c888d8e8 e2e: a WebGL dot() gives the bits of the GPU family the persona declares (from firefox-60)
tests/test_webgl_dot_has_the_declared_gpu_s_bits_e2e.py reads back dot() of two, three and
four components through a float-bits shader and compares the bytes with the NVIDIA fma
chain computed in exact arithmetic, for alu_class 1 and 2; class 0 is the control. The model
runs as a unit test everywhere; the browser tests are Windows only and guarded by
engine_at_least("firefox-60"). The engine's gate lists it by name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 14:05:35 +01:00
Federico EliaandClaude Sonnet 5.5 c7c7285557 e2e: tagged images read back on a canvas as retail Windows Firefox reads them (from firefox-60) (#425)
* tests: the canvas ICC readback reference (retail Firefox 159.0 on Windows, default prefs)

refs.json holds the SHA-256 of the 72 probes of tests/data/canvas_icc_ref/index.html as
retail Firefox 159.0 (build 20261022150525) gave them on a PC whose monitor profile is the
stock "sRGB Color Space Profile.icm": ten generated tagged images drawn four ways, 22 fill
colours, the canvas colorSpace probe, nine environment values. 27 probes depend on the
profile (qcms converts tagged images to it); for those the hash without the conversion
(force_srgb=true, same machine) is kept too. gen_images.py writes the images and ICC
profiles with the standard library, byte for byte what the measurement used, so the
repository holds no binary file. scripts/build_canvas_icc_refs.py rebuilds refs.json from
the run files; the unit test checks the structure, the 72 probes and the 27 profile
dependent ones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* e2e: tagged images read back on a canvas as retail Windows Firefox reads them (from firefox-60)

The test builds the ten tagged test images with gen_images.py, serves them with the probe
page on localhost, runs the 72 probes on the engine and compares the SHA-256 of each
getImageData read with refs.json (retail Firefox 159.0 on Windows, default prefs, monitor
profile "sRGB Color Space Profile.icm"). Every differing probe is listed with the expected
and the obtained hash, and marked when the engine gave the value without the conversion.
On an engine that skips the conversion (firefox-58, firefox-59) 27 probes differ.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 13:15:14 +01:00
Federico EliaandClaude Haiku 5.5 da503f254a tests: webgl getParameter flake reports the reason (gl null, context lost, drift) (#424)
The test returned a bare false, so a CI failure could not tell a null
getContext('webgl') from a parameter that changed between reads. The
page now returns the reason: gl null (with webgl2 availability), context
lost, or drift with the round, parameter, and first differing vs
reference values.

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-09 12:45:33 +01:00
Federico EliaandClaude Sonnet 5 43a3197d89 e2e: WebCodecs software decode ignores a page's hardwareAcceleration request (#423)
* e2e: WebCodecs software decode ignores a page's hardwareAcceleration request

Firefox-60 checklist goal 6b. REA (invisible_WebCodecs/notes/
nv12-rgb-conversion.md) found the D3D11/DXVA hardware path doing its
NV12->RGB conversion in the GPU (ID3D11VideoContext::VideoProcessorBlt),
a host dependency. Companion to the engine fix
(ShouldPreferSoftwareDecoder in dom/media/webcodecs/DecoderTemplate.cpp,
branch media-webcodecs-software-only): with the engine on, decode must
stay on the software path (libyuv) no matter what the page asks for.

Same 96-frame 1080p B-frame clip and access-unit split as
test_webcodecs_h264_bframe_pts_order_e2e.py, but the page's VideoDecoder
config explicitly asks for hardwareAcceleration: "prefer-hardware", and
every output frame's copyTo({format: "RGBA"}) is hashed and compared
against the software reference (captures/h264-1080p-bframes/retail-win/
result.json - Firefox 159.0 retail Windows, headless, DXVA off per its
own meta.json), vendored at
tests/data/webcodecs_h264_1080p_bframes_rgba_sha256.json so the test does
not depend on the private study repo being checked out beside this one.

Needs no GPU to run: on a VM without one there is no hardware path to
force into software, so a pass only confirms libyuv has not drifted: the
guard is against a future regression that gives the engine a real
hardware path again while leaving the page's request wired straight
through.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Translate the Italian checklist quote in the e2e docstring to English

The pre-push hook's own English-only check refused on this (the goal
6b line, 'dalla, della'), which is why test_the_pre_push_hook_gates_release_tags
also failed: the hook's self-test run hit the refusal before the
gate-wiring assertion could see a clean pass. Not two separate bugs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-09 12:44:59 +01:00
Federico EliaandClaude Sonnet 5.5 ce79a51417 tests: the blending e2e runs on Linux only until ANGLE's translator does the blend (#422)
On Windows the blend is done by the host's Direct3D 11: a runner without a GPU uses WARP, which
rounds up to 2 off (4090 of 207956 results on the firefox-60 candidate). The Mesa patch that makes
blending exact fixes Linux only. The test skips on Windows with that reason and returns there when
the blending goes through the translator (objective 5).

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:26:08 +01:00
Federico EliaandClaude Sonnet 5 d9c21dd67b e2e: WebCodecs VideoFrame.timestamp order on a real H.264 B-frame stream (#421)
Companion to the engine fix in FFmpegVideoDecoder.cpp (branch
media-h264-bframe-pts, goal 6 of the firefox-60 checklist): ff_h264_decoder
doesn't set FF_CODEC_CAP_SETS_FRAME_PROPS, so without the engine's own
reorder buffer the pts ffmpeg attaches to each decoded frame is the most
recently sent packet's, not the one that produced it. A page reading
VideoFrame.timestamp from WebCodecs sees that reordering directly on any
B-frame stream.

Same schema as test_webcodecs_h264_without_host_libavcodec_linux_e2e.py:
decodes the vendored 96-frame 1080p clip (has_b_frames 2, same one measured
in invisible_WebCodecs) with the access units split client-side exactly like
the browser-side probe that produced the retail-win reference capture, and
checks the output order against that capture's own dense, strictly
increasing sequence.

Needs a firefox-60 (or later) build with the fix, which does not exist yet:
collects and skips cleanly today (no cached/pointed binary), same as the
fixture's documented contract.


(cherry picked from commit 2a025dc97f5d2f5ed9254395fc8facc8e411c59f)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-09 11:24:26 +01:00
Federico Elia 64f76b2d94 e2e: the system fonts and colours are Windows retail's, and a missing declaration refuses the launch (from firefox-60) (#420)
* Add an e2e that compares the system fonts and colours with Windows retail

* Compare the system-ui family too

The e2e needs engine_at_least, so it is merged after PR #416.

* Add an e2e that a launch missing a system theme pref is refused

Needs engine_at_least, so it is merged after PR #416.
2026-11-09 11:16:09 +01:00
Federico EliaandClaude Sonnet 5.5 808c8f8c97 e2e: canvas 2D text equals retail Windows on every OS (from firefox-60) (#419)
* Test: canvas 2D text equals retail Windows on every OS

240 canvas text cases (five Windows fonts, six sizes, a transform, fill and stroke, synthetic
italic and bold) hashed from getImageData and compared with the hashes retail Firefox 159
gave. The run's hashes can be written out, and scripts/compare_canvas_text_runs.py names the
cases two runs (Debian 12 and Ubuntu 24.04) draw differently. Gated on firefox-61.

* Test: the canvas text reference is made with the bundled fonts, gated on firefox-60

refs.json carries the bundle file and sha256 of each font and the retail machine's
ClearType state; the test checks the engine's fonts against them and declares that
state as the persona.

* Test: the canvas text reference covers alpha false, COLR v0 emoji, large sizes and a variable face

refs.json now holds 330 cases in seven groups, merged by id from the two
measurements of retail Firefox 159.0 by scripts/build_canvas_text_refs.py;
the page draws them on getContext('2d', {alpha: false}) where the reference
did, frees each large canvas after its hash, and the test names the
differing cases group by group and checks the Twemoji Mozilla and
Bahnschrift font hashes too.

* Test: the canvas text reference covers Segoe UI Variable at three weights

Group 6 draws the bundled seguivar2_03.ttf (wght 300-700, opsz 5-36) through @font-face
font-weight 300 700 at weight 300, 400 and 700 and sizes 9, 12.5, 16 and 33: 12 cases, the
three weights hashing differently at every size. The hashes are retail Firefox 159.0's on
Windows (the official installer's firefox.exe, sha256 d8b5ed82...), measured by running this
page itself with the bundled font files; the same run redrew the 330 existing cases and
every width, height and hash equals the reference already in the repository, so the new
cases come from the same machine and the same code. refs.json keeps its existing cases and
field order and gains the 12 cases, the font entry and its load status.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:16:04 +01:00
Federico EliaandClaude Sonnet 5 a42d863e48 Add e2e: WebCodecs decodes H.264 without a host libavcodec/libavutil (#418)
Same schema as test_webgl2_exists_without_host_mesa_linux_e2e.py: the
engine ships its own ffvpx, so VideoDecoder must decode webcodecs/h264.annexb
(10 frames, 320x240, vendored from web-platform-tests) on a Linux host that
has no system libavcodec/libavutil to fall back on. Skips on firefox-59 and
earlier (engine_at_least("firefox-60")), on non-Linux, and on a host that
still has a libavcodec (the check proves nothing there).


(cherry picked from commit 47f26b376ba8c5e7de070c1ae6e2c3a5105fe3db)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-09 07:08:33 +01:00
Federico EliaandClaude Sonnet 5.5 f62bf3f6dc e2e: WebGL blending rounds once and mediump runs at 32 bit (from firefox-60) (#417)
* e2e: no browser process reads the host's fontconfig (Linux)

The engine's gtest of the empty fontconfig configuration looks only at
the final state, so it would also pass if GTK, Pango or the first
FcInit() had loaded the host's configuration before the hook replaced
it. This test runs the browser under strace -f, through a tree of links
to the engine whose executable execs the real one, draws a page with
text and fails on any call, in the parent or a content process, that
names /etc/fonts, ~/.config/fontconfig, ~/.fonts.conf, /usr/share/fonts,
FONTCONFIG_FILE or FONTCONFIG_PATH.

Measured on ubuntu:24.04 under xvfb-run with invisible-core 58.56.0,
invisible-playwright 0.47.1 and firefox-58 (build 20261108115355): it
fails. The parent makes 1127 such calls over 503 paths, two content
processes 366 over 69, starting with access/openat of
/etc/fonts/fonts.conf and conf.d.

* e2e: Math.sin, Math.cos and Math.tan give ucrtbase's bytes in every JIT tier

Math.sin(Math.PI / 4) is 0.7071067811865476 on Windows Firefox (ucrtbase) and was
0.7071067811865475 on Linux (fdlibm, or glibc with the pref off). The test reads
the result bits of 4,516 hard inputs, every one where fdlibm or glibc 2.43 differ
from ucrtbase among 30,372 measured on Windows 11, plus every 8th of the others,
for twelve rounds in the same functions so the interpreter, the baseline JIT and
the optimizing JIT all answer. Fails on the Linux engine until it carries
libxul's own sin/cos/tan and Windows' value of
javascript.options.use_fdlibm_for_sin_cos_tan.

* e2e: the sin/cos/tan loop runs for a measured time, and the counts agree

No API a page can read tells which JIT tier ran a call, so the test no longer
claims every tier: each function now runs over its inputs for at least three
seconds and twelve rounds, and every round must equal ucrtbase. The docstring and
the data's header give the same counts, over the 30,372 distinct inputs: fdlibm
441, glibc 2.43 651 (653 counted duplicates), one or both 832, 4,516 lines kept.

* tests: engine_at_least skips a test on an engine older than the one that promises the property

* tests: calc() equals ucrtbase's text, and a screenshot of text returns

* tests: calc() cases read word-spacing, where a zero is 0px and not normal

* tests: engine_at_least compares the number only and fails on a seal with none

* tests: the fontconfig stand-in is killed as a group, the data checks are unit, the screenshot is wall-clock

* Test that WebGL blending is done unquantized and rounded once

On Windows the engine draws through ANGLE on Direct3D 11: the fragment
shader's float output goes into the blender as it is, the blend is
computed at float precision and the result is rounded once, to the
target's format. On Linux the engine's own llvmpipe quantized the shader
output to the target's 8 bits first and blended in 8-bit arithmetic, so
a page read back values up to one step off (two for SUBTRACT): SRC_ALPHA
/ ONE_MINUS_SRC_ALPHA over a destination of 100 with a source of 200 and
an alpha of 1/255 gave 101, where D3D11 gives round(100.392) = 100.

The test sweeps the source alpha over the common factor pairs and the
ADD, SUBTRACT, REVERSE_SUBTRACT, MIN and MAX equations, with straight,
premultiplied and non-8-bit-exact sources, onto RGBA8, RGB10_A2, RGBA4
and (with EXT_texture_norm16) RGBA16 and R16 targets, in one evaluate,
and compares every channel with the exact blend computed in double,
rounded half up (near-ties skipped). Maximum error must be 0. It runs on
every OS: it is the rule the Windows engine already follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that a mediump WebGL shader computes at 32 bit, as on Windows

On Windows the engine draws through ANGLE on Direct3D 11, which runs
mediump and lowp at full 32-bit precision. On Linux the engine's own
llvmpipe ran them as fp16, so an 8-bit texel read through a sampler of
default precision came back up to ~0.12 of a step off texel/255, and
arithmetic lost every bit past 11: 2049.0 + 1.0 gave 2048.

Three shaders with `precision mediump float;` write the bits of their
floats into an RGBA32UI target: texelFetch on an RGBA8 texture holding
all 256 byte values per channel (default sampler precision, and with
`precision mediump sampler2D;`), which must read back as float32(byte/
255) to one ulp, and single correctly rounded operations whose float32
result fp16 cannot hold (2049.0 + u, 0.1 * u, 1.0 + u * 2^-12, 32.0 + u
* 2^-10), which must be exact. Runs on every OS: the rule is the one the
Windows engine already follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tests: WebGL blending and mediump precision hold from firefox-60

Both read pixels a page reads back. firefox-59's llvmpipe still blends in 8
bits and runs mediump in fp16, so the two tests declare firefox-60 with
engine_at_least; older engines skip them with that reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that WebGL2 exists on a Linux host that has no Mesa

A page tells a host with no GL from one with a Mesa by getContext("webgl2")
returning null. On firefox-59 the host's glxtest blocked WebGL on a host with
GTK and no Mesa (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS); the engine's WebGL
draws on the GL it ships, so the host must not decide. The test asks for WebGL2
and WebGL1 and reads a cleared pixel, from firefox-60 (engine_at_least), and
skips on a host that has a Mesa since it proves nothing there. The series gate
removes every Mesa library from its Linux legs and fails if one is left.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 00:18:27 +01:00
Federico Elia eadf95b90a e2e: engine-gated tests for the empty fontconfig, ucrt math, calc() and text screenshots (#416)
* e2e: no browser process reads the host's fontconfig (Linux)

The engine's gtest of the empty fontconfig configuration looks only at
the final state, so it would also pass if GTK, Pango or the first
FcInit() had loaded the host's configuration before the hook replaced
it. This test runs the browser under strace -f, through a tree of links
to the engine whose executable execs the real one, draws a page with
text and fails on any call, in the parent or a content process, that
names /etc/fonts, ~/.config/fontconfig, ~/.fonts.conf, /usr/share/fonts,
FONTCONFIG_FILE or FONTCONFIG_PATH.

Measured on ubuntu:24.04 under xvfb-run with invisible-core 58.56.0,
invisible-playwright 0.47.1 and firefox-58 (build 20261108115355): it
fails. The parent makes 1127 such calls over 503 paths, two content
processes 366 over 69, starting with access/openat of
/etc/fonts/fonts.conf and conf.d.

* e2e: Math.sin, Math.cos and Math.tan give ucrtbase's bytes in every JIT tier

Math.sin(Math.PI / 4) is 0.7071067811865476 on Windows Firefox (ucrtbase) and was
0.7071067811865475 on Linux (fdlibm, or glibc with the pref off). The test reads
the result bits of 4,516 hard inputs, every one where fdlibm or glibc 2.43 differ
from ucrtbase among 30,372 measured on Windows 11, plus every 8th of the others,
for twelve rounds in the same functions so the interpreter, the baseline JIT and
the optimizing JIT all answer. Fails on the Linux engine until it carries
libxul's own sin/cos/tan and Windows' value of
javascript.options.use_fdlibm_for_sin_cos_tan.

* e2e: the sin/cos/tan loop runs for a measured time, and the counts agree

No API a page can read tells which JIT tier ran a call, so the test no longer
claims every tier: each function now runs over its inputs for at least three
seconds and twelve rounds, and every round must equal ucrtbase. The docstring and
the data's header give the same counts, over the 30,372 distinct inputs: fdlibm
441, glibc 2.43 651 (653 counted duplicates), one or both 832, 4,516 lines kept.

* tests: engine_at_least skips a test on an engine older than the one that promises the property

* tests: calc() equals ucrtbase's text, and a screenshot of text returns

* tests: calc() cases read word-spacing, where a zero is 0px and not normal

* tests: engine_at_least compares the number only and fails on a seal with none

* tests: the fontconfig stand-in is killed as a group, the data checks are unit, the screenshot is wall-clock
2026-11-08 23:57:25 +01:00
Federico Elia b81f1561c5 Merge pull request #415 from feder-cr/clean-install-timeout
The tests that install from the index get their own deadline
2026-11-08 21:07:05 +01:00
Federico Elia 61d2ee29d5 Merge pull request #414 from feder-cr/gate-second-linux
Host gate: two Linux legs are held to each other; text.* narrowed to what is open
2026-11-08 21:07:02 +01:00
feder-crandClaude Opus 5.5 882c0f3a0e Host gate: the Linux GL defect is excused on both Linux legs
The Debian leg draws WebGL with the same Mesa delta 1 from Windows as the
Ubuntu one (and identical to it, same-OS comparison), and the exception
named only linux-x86_64: 12 failures on the re-gate of firefox-59. A test
holds every Linux-scoped known defect to all Linux legs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:22:00 +01:00
feder-crandClaude Opus 5.5 dde60415d7 The tests that install from the index get their own deadline
The module installs the README's block once, in the clean_venv fixture,
and pytest-timeout counts that setup in the first test that requests it.
With PyPI slow the install took 517 s, over run_e2e.py's 420 s per-test
deadline, and the guard killed the worker on a slow test, not a stuck one.
Each test that takes clean_venv now carries 900 s, under the block's own
1800 s cap; a test asserts it and fails without the marks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:01:18 +01:00
feder-crandClaude Opus 5.5 be60e4d7e4 Host gate: two Linux legs are held to each other, and text.* is narrowed to what is open
A known defect excused a key on every non-Windows leg, so a difference
between two Linux hosts passed unseen. compare() now holds the legs of one
OS to the first of them wherever the identity does not change the value,
known defects included: they excuse the difference from Windows only.
The text.* block becomes the surfaces that differ on the firefox-59 dumps
(glyph pixels, advances, ink extents, serif/monospace fallback widths);
text.adjust, text.fonts, text.rect, text.units and the vertical metrics
are now held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:55:31 +01:00
Federico Elia 8c2dcbf570 Merge pull request #412 from feder-cr/ledger/0.47.1
record 0.47.1 as published
2026-11-08 18:29:05 +01:00
feder-cr 4fddee2d46 record 0.47.1 as published 2026-11-08 17:12:11 +00:00
Federico Elia 87f48c9b8a Merge pull request #411 from feder-cr/release/0.47.1
0.47.1: pin invisible-core 58.56.0, the keyboards Windows installs with the language
2026-11-08 17:57:28 +01:00
feder-crandClaude Opus 5.5 7d702fb188 0.47.1: pin invisible-core 58.56.0, the keyboards Windows installs with the language
The keyboard pref carries Windows' own form (LANGID:KLID joined by
semicolons), declared by the core; the server's fallback, when a caller
wrote its prefs without it, uses the same form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:27:42 +01:00
Federico Elia 42cbc45da2 Merge pull request #410 from feder-cr/own-gl-e2e
e2e: on Linux WebGL draws on the engine's own GL, also under X11
2026-11-08 16:18:44 +01:00
Federico Elia 97faaa84f2 Merge pull request #409 from feder-cr/ledger/0.47.0
record 0.47.0 as published
2026-11-08 16:06:31 +01:00
feder-crandClaude Opus 5.5 e5cb8934a2 e2e: on Linux WebGL draws on the engine's own GL, also under X11, and every declared extension answers as on Windows
Skipped where the package has no llvmpipe/ (engines before firefox-59).
On candidate 42484125583 both fail: no WebGL under Xvfb, the surfaceless
display asked for with the X11 display.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:51:56 +01:00
feder-cr 16abec2c09 record 0.47.0 as published 2026-11-08 14:49:58 +00:00
Federico Elia 742281ec3a Merge pull request #407 from feder-cr/engine/firefox-58
0.47.0: pin invisible-core 58.55.0, the firefox-58 engine (Firefox 159)
2026-11-08 15:36:08 +01:00
feder-cr c5e89a85d2 Merge remote-tracking branch 'origin/main' into engine/firefox-58 2026-11-08 14:51:13 +01:00
Federico Elia a8da4b117f Merge pull request #408 from feder-cr/ci-github-token
CI downloads the engine with the job token; the user path stays anonymous
2026-11-08 14:07:58 +01:00
feder-crandClaude Opus 5.5 4ba1cefcdd CI downloads the engine with the job token; the user path stays anonymous
On 2026-11-08 GitHub had timeouts for unauthenticated users and the gates failed
three times on the engine download, because the jobs called the release API
anonymously (also limited to 60 requests an hour per runner address). The core
uses GITHUB_TOKEN when it is set, so each workflow that runs tests declares it
once at the top. user-install.yml stays anonymous: it is the user's path.

Test: test_ci_downloads_are_authenticated fails on the old workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:32:50 +01:00
Federico Elia 3378b8f3e2 Merge pull request #406 from feder-cr/ledger/0.46.4
record 0.46.4 as published
2026-11-08 13:19:11 +01:00
feder-crandClaude Opus 5.5 07a03e41e9 Keyboard: the persona's keyboards are the core's declaration, read here
invisible-core 58.55.0 declares the keyboards with the language and
country (prefs._apply_locale) and owns the pref's name; the session no
longer writes a second copy, and the server imports the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:10:09 +01:00
feder-crandClaude Opus 5.5 22a098843a 0.47.0: pin invisible-core 58.55.0, the firefox-58 engine (Firefox 159)
The persona's keyboards (the language's and the second one Windows
installs with it, switched with left Alt + left Shift), the engine's own
scrollIntoViewIfNeeded (op_scroll_into_view hands a rect on), and the
engine's fixes for refused navigations, held requests and cookies.
test_frame_dispatch's hand-built InjectedScript gets the condition the
core's __init__ now makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:03:53 +01:00
feder-crandClaude Opus 5.5 e76c63a6cb e2e: the switch to English is pressed, left Alt and left Shift, before KeyX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:58:15 +01:00
feder-crandClaude Opus 5.5 caae1ea0aa Keyboard: the persona's keyboards, the language's and the second one Windows installs with it
The server-only keyboard pref carries layouts_for (KLIDs joined by
commas, the language's first), so a Russian or Greek persona types a
Latin letter on English (US) with its key events instead of answering
press("x") with "unknown key: 'x'". Needs the core with layouts_for.

The four keyboard e2e tests name the US keyboard (locale="en-US"): the
persona's keyboard follows the session's language, which the runner's
address decides, and run 42453174270 met a non-Latin one. New e2e: a
Russian persona presses x as KeyX, a Greek one types "cafe" with its
keys, a Nepali (India) one, whose Windows has no Latin keyboard, gets
the letter inserted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:58:15 +01:00
feder-cr acb073dda7 record 0.46.4 as published 2026-11-08 11:55:48 +00:00
Federico Elia 081b3a1aa0 Merge pull request #404 from feder-cr/release/0.46.4
0.46.4: pin invisible-core 57.54.0, release files through the API route first
2026-11-08 12:25:27 +01:00
feder-crandClaude Opus 5.5 9460e8eb86 0.46.4: pin invisible-core 57.54.0, release files through the API route first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 11:57:06 +01:00
Federico Elia 3abd710393 Merge pull request #401 from feder-cr/counters-on-actions
Launch counter: the daily snapshot and the badges run on GitHub Actions
2026-11-08 10:17:04 +01:00
github-actions[bot]andfeder-cr 80034c9c84 record 0.46.3 as published (#403)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-11-08 09:52:15 +01:00
Federico Elia 820d88e8eb Merge pull request #402 from feder-cr/engine/firefox-57
0.46.3: pin invisible-core 57.53.0, the firefox-57 engine (Firefox 159)
2026-11-08 09:16:52 +01:00
feder-crandClaude Opus 5.5 558a402fa9 0.46.3: pin invisible-core 57.53.0, the firefox-57 engine (Firefox 159)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 08:59:58 +01:00
feder-crandClaude Opus 5.5 2b3cbe0795 Launch counter: the daily snapshot and the badges run on GitHub Actions
GitHub keeps only the running total of the counter asset, so a day's launches
exist only if the total is recorded that day. The snapshot ran from a scheduled
task on one PC with a token file beside it; when that task went, the badge
stopped on 2026-11-04 and the days after it were never recorded.

counters.yml runs every day at 00:10 UTC on the built-in token, appends the
counters to counters/history.csv on the badges branch, derives
counters/launches_daily.csv, and redraws launches.svg and stars.svg with the
same sum and the same bytes as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:03:26 +01:00
Federico Elia 3dd1424a0a Merge pull request #400 from feder-cr/host-gate-goto-timeout
Host gate: the navigation has the page's budget, not goto's default 30 s
2026-11-07 22:46:50 +01:00
feder-crandClaude Opus 5.5 5847dfe87a Host gate: the navigation has the page's budget, not goto's default 30 s
Candidate 42410156024 failed the Windows host gate on its first visit: the
page reached domcontentloaded but not load within goto's default 30 s on a
cold GitHub runner, while the wait right after it has 180 s. The same binary
passed 6/6 locally. goto now takes timeout_ms like the wait.

Test: test_the_navigation_has_the_page_s_budget_not_goto_s_default (fails on
the previous script).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 22:31:31 +01:00
Federico Elia 622b6e82a7 Merge pull request #399 from feder-cr/enumeration-test-inside-engine
e2e: the enumeration's host check reads the engine's log, not a clock beside a loaded runner
2026-11-07 21:33:00 +01:00
feder-crandClaude Opus 5.5 4355274838 e2e: the enumeration's host check reads the engine's log, not a clock beside a loaded runner
The upper bound ("nothing on top of the declared time") compared the page's
clock against a runner whose load delays the parent's main thread by 150-200
ms; it failed twice on 2026-11-07 (741 and 702 against 543 + 143), green on
rerun. The load-proof checks stay (the first call waits at least the declared
time, the second is fast). Whether the host's speakers were asked is now read
from inside the engine: with MOZ_LOG=StealthMediaEnumeration:4 the engine
logs the declared wait it dispatched and "host speakers asked: yes|no"
(firefox_antidetect_patch a00ba45). That test runs from firefox-57.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:17:49 +01:00
Federico Elia 97f8663ec6 Merge pull request #398 from feder-cr/ledger/0.46.2
record 0.46.2 as published
2026-11-07 20:49:11 +01:00
feder-cr ce68aea668 record 0.46.2 as published 2026-11-07 19:16:16 +00:00
Federico Elia dab71bd637 Merge pull request #397 from feder-cr/keyboard-country
0.46.2: the persona's keyboard from its language and country (core 56.53.0)
2026-11-07 20:01:47 +01:00
feder-crandClaude Opus 5.5 0c043d580e test: take the profile generator from the core's public API, not the _fpforge shim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:46:23 +01:00
Federico Elia 0421f95adf Merge pull request #396 from feder-cr/ledger/0.46.1
record 0.46.1 as published
2026-11-07 19:40:21 +01:00
feder-cr 284a840ebe record 0.46.1 as published 2026-11-07 18:24:35 +00:00
feder-crandClaude Opus 5.5 eb8b415635 0.46.2: the persona's keyboard from its language and country (core 56.53.0)
The session decides the keyboard with the core (keyboard.layout_for on
SessionLocale.languages and .region) and hands it to the server in a
server-only pref (invisible.server.keyboard_layout), taken out before the
profile is written; without it the language alone decides. German in
Switzerland now types on the Swiss keyboard. Pins invisible-core 56.53.0.

Test: tests/test_the_keyboard_follows_the_session_language.py (KLIDs, and
the language-and-country case).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:14:21 +01:00
Federico Elia e508c10e9d Merge pull request #395 from feder-cr/fix-pyproject-driver-comment
0.46.1: pin core 56.52.0 (typing hand by key); pyproject comment names the real server
2026-11-07 19:08:09 +01:00
feder-crandClaude Opus 5.5 7a4e7c4d0a 0.46.1: pin invisible-core 56.52.0 (typing hand by key)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:40:29 +01:00
feder-crandClaude Opus 5.5 3824a2e03e pyproject: the dependency comment names the server that exists, not a Node driver
The comment said the Node driver lives in src/invisible_playwright/_driver/,
which does not exist; the server is _juggler/. Test: every src path the
pyproject names is a folder of this tree (fails on the previous comment).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:22:10 +01:00
Federico Elia fb5c3a403c Merge pull request #394 from feder-cr/ledger/0.46.0
record 0.46.0 as published
2026-11-07 14:13:08 +01:00
feder-cr eb2be0e88d record 0.46.0 as published 2026-11-07 12:56:39 +00:00
Federico Elia 621a396def Merge pull request #391 from feder-cr/remove-font-gate
0.46.0: dialogs answered after a reader's pause, the persona's keyboard, the WebGL test; the font gate removed
2026-11-07 13:42:30 +01:00
feder-crandClaude Fable 5.1 2afb1cc349 The dialog's answer always goes out: the seed is the browser's, and a failed plan is a warning
0.46.0's first CI run hung three e2e tests for 30 s: the pause read the
session seed from the transport (`self.server`) instead of the browser
(`self.browser.session_seed`), the AttributeError swallowed Page.handleDialog,
and the open dialog blocked every evaluate on the page. The unit test had
mirrored the wrong path; it now models the real one (server knows no seed,
the page reaches the browser through its context), fails on the previous
server, and a new case proves the answer goes out even when planning raises.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 13:12:57 +01:00
feder-crandClaude Fable 5.1 b0dc24031c 0.46.0: pin invisible-core 56.51.0, the firefox-56 engine (Firefox 159)
The engine carries the WebGL declared-extension hooks (a declared extension
can be called without killing the browser); this version adds the reader's
pause on dialogs, the persona's keyboard by language, and the WebGL e2e test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 12:39:42 +01:00
feder-crandClaude Fable 5.1 d87cc4e3b6 The persona's keyboard follows the language the launcher decided
The server reads `intl.accept_languages` from the launch prefs and hands the
matching layout (invisible_core.juggler.keyboard.layout_for) to every page's
hands: an Italian persona types on an Italian keyboard. Until now every session
typed on one US table with Chromium's key codes. Pins invisible-core 55.51.0,
which carries the tables and the keyboard.

Test: tests/test_the_keyboard_follows_the_session_language.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 08:53:46 +01:00
feder-crandClaude Fable 5.1 8eb28c2ada Test: a WebGL extension the persona declares can be called without killing the browser
Read with symbols on 2026-11-07 (Linux, firefox-55): one provokingVertexWEBGL()
call on an extension the host had refused by policy hit MOZ_RELEASE_ASSERT and
took the main process down. The hooks ship in the engine (firefox_antidetect_patch
14feb6a, fingerprint/webgl/parameters); this test calls the six entry points on
both context kinds and asks the page a question after. Skipped on engines before
firefox-56, where it would not fail but kill the browser.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 08:33:02 +01:00
feder-crandClaude Fable 5.1 09eeb004d1 Answer a dialog after a reader's pause, not in the millisecond it opened
Page.handleDialog left as soon as Page.dialogOpened arrived, whoever
answered: the client's auto-dismiss or a handler's accept(). A page timing
alert()'s return saw single-digit milliseconds. The pause is drawn from the
session's seed and the dialog's text (reaction + per-word reading, clamped,
one draw per dialog); only the remainder is waited, in the worker; no seed
means no pause, as for every other rhythm.

Test fails on the previous server (two cases: the answer did not wait, and
two dialogs of a page took the same zero time) and passes on this one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 07:58:03 +01:00
feder-crandClaude Opus 5.5 632490aa50 CI: remove the font gate, the host gate covers the font list
scripts/ci_font_gate.py asked one case (is the font list the persona's?) of
the host gate's question (is anything a page reads the host's?). It was kept
until the host gate ran green on a release: it did on firefox-55. The engine's
gate.yml no longer runs it (firefox_antidetect_patch 709404e).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:43:58 +01:00
Federico Elia 6c0cfdb610 Merge pull request #390 from feder-cr/drop-linux-arm64
Linux arm64 is no longer supported from firefox-56
2026-11-04 17:17:58 +01:00
feder-crandClaude Opus 5.5 9a98c0060b Linux arm64 is no longer supported from firefox-56
No engine is built for it from firefox-56 on; firefox-55 is the last one
with a Linux arm64 build. The README, the installation page, the arm64
guide, CONTRIBUTING and the release notes now name Linux x86_64 and Windows
x86_64 only, and the README says Linux arm64 is no longer supported. The
host gate drops its arm64-only known defects. The README check treats
linux-arm64 as retired, like macOS, and a new test fails on a page that
still lists it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:58:08 +01:00
Federico Elia 4b9e28a879 Merge pull request #389 from feder-cr/ledger/0.45.0
record 0.45.0 as published
2026-11-04 05:49:01 +01:00
feder-cr 6383f21dbb record 0.45.0 as published 2026-11-04 04:34:26 +00:00
Federico Elia 6080c06bd9 Merge pull request #388 from feder-cr/engine/firefox-55
0.45.0: invisible-core 55.50.0, the firefox-55 engine
2026-11-04 05:20:08 +01:00
feder-crandClaude Opus 5.5 ae947139d8 e2e: the tests that start the engine without the core bring the first-run declaration
Since firefox-55 the engine leaves Mozilla's first-run lines and the core declares
them. These two tests start the engine directly, so a second tab failed
Browser.newPage ("Unexpected number of tabs in the new window: 2"), run 41769630744.
The values come from the core, so they cannot drift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 05:04:24 +01:00
feder-crandClaude Opus 5.5 e1f1659776 0.45.0: pin invisible-core 55.50.0, the firefox-55 engine (Firefox 159)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 04:49:31 +01:00
feder-crandClaude Opus 5.5 02bd688896 Host gate: WebGPU's null on linux-arm64 is that leg's known defect
The leg ships without our Vulkan driver, so requestAdapter answers null there
by design, never the host's driver; arm64 is not a priority. Scoped to that
leg: on Windows and linux-x86_64 the adapter stays held to retail. Run
41402916724's dumps compare with 0 failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:46:48 +01:00
feder-crandClaude Opus 5.5 c6dca80401 Tests follow invisible-core's gfx contract: no webgl.force-enabled, gpu.device not pinnable
The core dropped webgl.force-enabled (the engine answers the blocklist from
zoom.stealth.gfx.feature_status, WEBGL2 = 1) and its GPU profile gained
`device`, the real GPU drawn from the renderer's bucket. The renderer is the
knob; the device follows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:39:54 +07:00
feder-crandClaude Opus 5.5 f03164e7e0 Drive gate: the first run is declared in the profile, as the core declares it
Since firefox-55 the engine leaves Mozilla's first-run lines and invisible-core
declares the state (terms of use accepted, pre-onboarding off). The drive gate
runs upstream Playwright only, whose defaults travel in Browser.enable, which
the engine refuses, so nothing declared it. Run 41388672849: Windows showed the
terms-of-use modal (no mouse event reached the page), Linux opened Mozilla's
privacy page in a second tab ("Unexpected number of tabs in the new window").

FIRST_RUN, a copy of the core's three prefs, goes into user.js and the gate
drives a persistent context, as the font gate does. On that run's packages:
Windows --click and --full OK, Linux --click and --full OK.
tests/test_ci_drive_gate_first_run.py ties the copy to the core (fails on the
previous gate).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:39:54 +07:00
feder-crandClaude Opus 5.5 0236afb11d Host gate: each visit pins its DPR in the persona
Every (dpr, seed) visit forced layout.css.devPixelsPerPx over whatever
persona the seed drew. A 100% persona at 1.5 read innerWidth 1920 inside an
outerWidth of 1291, and a 150% persona at 1.0 an outerWidth of 1942 on a
1280 screen (run 41325657085): identities no machine has. The DPR is now
pinned (screen.dpr), so the core declares a screen, work area and window
made at that scale; the engine refuses a scale that contradicts them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:01:54 +07:00
feder-crandClaude Opus 5.5 af932640b8 Host gate reference: retail 159 in fullscreen and back
state.normal, state.fullscreen and state.after_fullscreen measured on the
official Firefox 159 for Windows at DPR 1.0 and 1.5: headed, a profile past
the first-run onboarding (which otherwise keeps focus and input away from
the page), real OS-level input for the fullscreen gesture. Every invariant
of the gate holds on retail. Only state.* keys are added; no existing value
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 23:11:47 +07:00
feder-crandClaude Opus 5.5 fd22249b65 Host gate: the window in fullscreen and back, held to invariants
A defect escaped every check: after requestFullscreen() the engine kept
declaring the maximized window (outer 1936x1048 under a 1920x1080 viewport,
screenX/Y -8/-8, mozInnerScreenY and every mouse event's screenY - clientY
at 85 instead of 0). No visit entered fullscreen, since it needs a user
gesture, and every value was checked alone against retail, never against
the others.

The dump now drives each visit through three states with real input
(drive_states): normal, fullscreen entered by a Playwright click on a page
button whose handler calls requestFullscreen(), and back through
exitFullscreen(). Each state records the window and screen geometry,
display-mode, fullscreenElement, window.fullScreen and the screen - client
offsets of real mouse events, under state.normal, state.fullscreen and
state.after_fullscreen. A transition that ends in a timeout or
fullscreenerror is recorded, never waited on.

compare() holds every leg and every visit to INVARIANTS, one table with
the reason of each: outer holds inner; in fullscreen outer == inner ==
screen, screenX/Y and mozInnerScreenX/Y at 0, display-mode and
fullscreenElement set; outside it neither; every event's screen - client
equals mozInnerScreenX/Y (exact, or within 1 px when mozInnerScreen is
fractional); the screen does not change; the return restores the normal
state. No exception and no reference applies to them.

The retail reference has no state.* yet: until it records them, those
values are held to host-independence and the invariants only, and compare
notes it. REFERENCE_PENDING says what the reference session must add.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 22:07:31 +07:00
feder-crandClaude Opus 5.5 c84c8c32a5 Host gate: the textarea is fixed, arm64-only differences are scoped to arm64
The textarea width at fractional DPRs now matches Windows on Linux (engine:
DirectWrite's average character width on FreeType), and the gate reported
the exception as no longer seen. The differences left on linux-arm64 only
(Skia's NEON composite, pattern and shadow; the offline audio FFT) are known
defects of that leg, which is not a priority. Run 41305135645's dumps
compare with 0 failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:42:58 +07:00
feder-crandClaude Opus 5.5 a5ad308e4a Host gate: the page tells why a host has no WebGL2 or MSAA, never compared
The Windows runner answers getContext('webgl2') with null and gives WebGL1
no multisampling; Linux does not. The page now records under diag.webgl,
for webgl and webgl2, with and without failIfMajorPerformanceCaveat:
whether getContext returned null, the statusMessage of every
webglcontextcreationerror (listener on a fresh canvas before getContext),
the context attributes, VENDOR/RENDERER/VERSION/SHADING_LANGUAGE_VERSION,
the unmasked pair when exposed, SAMPLES, SAMPLE_BUFFERS and MAX_SAMPLES.
The block runs last, and each context is lost once read.

diag. keys are information: the legs legitimately differ on them and the
retail reference does not record them. compare() skips the prefix by name
(documented in the module docstring); dump() prints the leg's diag values
into the job log (all on the first visit, then only what changed), so a
run says why without downloading its artifacts.

Tests: diag keys differing per leg and per seed and absent from retail do
not fail; a known defect matched only by a diag key is still reported as
no longer seen; only the exact prefix is skipped; a non-diag key missing
on one leg still fails host and retail; the dump's diag report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:56:42 +07:00
feder-crandClaude Opus 5.5 c30e07ee9f Merge host-gate: the host gate runs on the next engine's candidates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:04:13 +07:00
feder-crandClaude Opus 5.5 85cc5d10e6 Host gate: measured like the reference, compared leaf by leaf, identity declared
The dump visits the page the way retail's reference was taken: over
http://127.0.0.1, en-US, the zone the reference reported, the DPR through
layout.css.devPixelsPerPx, no drawn cursor. The reference is retail Firefox
159.0 for Windows at DPR 1 and 1.5 (gzipped, 1.2 MB).

Values are compared leaf by leaf, so a field the identity decides does not
hide a wrong field of the same object, and the values the identity decides
are declared: with a few seeds, 16 cores or a 1920x1080 screen repeat by
chance. exceptions.json: identity, measurement (focus on the hidden desktop
retail ran on) and the known defects with the work that closes each.

On the 0.44.1 dumps of Windows and Linux it fails exactly the defects the
next candidate fixes (invalid WebGL enums, stencil masks, MAX_VIEWS_OVR, the
WebGPU adapter and importExternalTexture from the host, -moz-dialog), and
nothing else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 21:04:06 +07:00
feder-crandClaude Opus 5.5 7c23e4377d The host gate: what a page reads depends on the identity and Firefox, never the host
One rule, two properties, checked on whole API dumps rather than a list of keys:
the same identity on different hosts gives the same bytes (each leg against
the Windows leg, the platform the identity claims), and a value that does not
depend on the identity equals retail Firefox for Windows at the same DPR.
Which values depend on the identity is measured, not listed: three seeds per
DPR, and a value that changes with the seed is held to host-independence only.

The exceptions are three kinds with a reason each (noise that differs between
two retail launches, network-derived values, known open defects), and the
known-defect list only shrinks: an entry that hides nothing any more fails.

The comparison is here with its tests (tests/test_ci_host_gate.py, 8 cases on
synthetic dumps). The page, the retail reference and the CI wiring follow; the
gate then replaces ci_font_gate.py, which checks one surface of the same rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:31:37 +07:00
feder-crandClaude Opus 5.5 0418f37dbb Pin invisible-core 54.50.0 for the next engine's candidates
The candidate of the engine that declares the WebGPU adapter is gated with
the core branch that declares it (fix/codec-follows-gpu, 54.50.0). Not for
release as is: the version and the CHANGELOG follow when the engine does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:02:59 +07:00
Federico Elia 0dc42b6380 Merge pull request #386 from feder-cr/ledger/0.44.1
record 0.44.1 as published
2026-10-31 10:21:03 +07:00
feder-cr f4381155bd record 0.44.1 as published 2026-10-31 03:17:49 +00:00
Federico Elia bec6e5f835 Merge pull request #385 from feder-cr/fix/core-54.49.0
Pin invisible-core 54.49.0: WebRTC decodingInfo no longer reads the host GPU (0.44.1)
2026-10-31 10:00:31 +07:00
feder-crandClaude Opus 5.5 d9dca5b498 Pin invisible-core 54.49.0: WebRTC decodingInfo no longer reads the host GPU
invisible-core 54.49.0 declares VP8, VP9 and AV1 for the WebRTC branch of
decodingInfo, so powerEfficient is Firefox 159 for Windows's answer instead of
the host's hardware decoding. Same engine, firefox-54. Version 0.44.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:41:57 +07:00
Federico Elia 469e1692a7 Merge pull request #384 from feder-cr/ledger/0.44.0
record 0.44.0 as published
2026-10-31 08:29:45 +07:00
feder-cr 44a3eed971 record 0.44.0 as published 2026-10-31 01:17:58 +00:00
Federico Elia 77b192eba5 Merge pull request #383 from feder-cr/engine/firefox-159
firefox-54: Firefox 159, downloads, set_offline, scroll only when needed
2026-10-31 06:28:42 +07:00
feder-crandClaude Opus 5.5 49e4e3a133 The scroll test asserts the core's if-needed scroll, not the old centring
Core 54.48.0 (3735356) leaves an element in full view where it is and
centres only one that is not, as Chromium's scrollIntoViewIfNeeded does: the
helper runs before every click, and a click on a visible button used to move
the page under it. This test still asserted the old always-centre behaviour,
so the e2e suite went red on the 54.48.0 pin.

It now checks both halves on a page where the two behaviours differ: an
element low in the viewport but in full view leaves scrollY at 0 (red on the
old helper, which centred it), and one cut by the bottom edge is scrolled to
the centre of the viewport.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 06:14:15 +07:00
feder-crandClaude Opus 5.5 4a0bd76768 Show the engine's Firefox 159.0 on the README badge
The seal pinned by invisible_core 54.48.0 is upstream 159.0; the badge
and its alt text still said 151.0, which test_readme_claims catches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 05:55:26 +07:00
feder-crandClaude Opus 5.5 6de45423d1 0.44.0: pin invisible-core 54.48.0, the firefox-54 engine (Firefox 159)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:52:21 +07:00
feder-crandClaude Opus 5.5 20f8a43693 Send download options and surface downloads (Artifact/Stream, download event)
The Python server never sent Browser.setDownloadOptions, so the engine's
download interceptor stayed off: no download event, no saved file, and a goto
or click that ended in a download waited out its timeout. Contexts now get
download options at creation (accept -> saveToDisk, deny -> cancel) into a
per-session temp dir removed at shutdown. Browser.downloadCreated/Finished
become a page 'download' event with Artifact and Stream channel objects
(pathAfterFinished, saveAs, saveAsStream, stream, failure, cancel, delete).
The engine ends a navigation that became a download with no event, so the
lifecycle is fed an abort "Download is starting", as upstream's server does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:33:26 +07:00
feder-crandClaude Opus 5.5 00d8154ef8 e2e: a download is reported, saved, and ends the navigation that led to it
The engine registered Juggler's download interceptor and never called it, so no
downloadCreated or downloadFinished reached Playwright and a goto that ended in
a download hung. Two cases: a clicked attachment reaches expect_download and is
saved with its bytes; a goto to an attachment reports the download and ends.
Red on the 157/159 engines before the interceptor is dispatched (both time
out), to go green with the engine fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:05:02 +07:00
feder-crandClaude Opus 5.5 12d1cc7308 e2e: a click on an element in full view does not scroll the page
The core's scroll_into_view centred every time, so every click moved the page.
Three cases from scrollY 1000: an element in full view and one inside a
same-origin iframe stay where they are (red on the previous core); one below
the fold is centred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:36:39 +07:00
feder-crandClaude Opus 5.5 2e1b91b196 set_offline() sends Juggler's Browser.setOnlineOverride instead of refusing
The refusal said the engine had no offline command. It has one (new_context(offline=True) already sent it); what was missing was the engine honouring it: its HTTP channel asked a stub that always answered online. The engine now runs Mozilla's own code there (firefox_antidetect_patch 3087f02c56), so set_offline(True/False) maps to the override and leaves NO_ENGINE_COMMAND. tests/test_set_offline_e2e.py fails on an engine with the stub (the offline goto loads) and on a server that still refuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:18:29 +07:00
feder-crandClaude Opus 5.5 c11c04b30e The page sends a commit's navigated from the lifecycle's announcement, not from its own listener
Sent from `_on_juggler_event`, the `navigated` of a commit raced the answer of a wait the same commit ended: the lifecycle, which runs first, had already woken it. With click() now waiting for the commit of the navigation it planned, `page.click("#next")` returned with `page.url` on the page it had left (tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py, red on the 07cbaa9cea engine before this). The commit now goes up from `_on_lifecycle`, as `sameDocument` already did, and not once the page is closed (what `_deliver` guaranteed before). The unit doubles reach it the way the page does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 06:05:21 +07:00
feder-crandClaude Opus 5.5 29a5c7a516 click and press wait for the navigation they set off unless no_wait_after, as Playwright's do
From Firefox 157 a form submission is a planned navigation (the retail's dom.forms.submit_async_navigation): page.click() on a submit button returned 7 ms before the POST was announced, so a script that clicked and read its requests or URL saw the page it had left; 151 and Microsoft's client both had it. FrameDispatcher._waiting_after runs Playwright's waitForSignalsCreatedBy around click and press (not dblclick, tap, hover or check, as there), on invisible_core's Lifecycle.wait_for_action_signals, which the engine's Page.linkClicked now feeds.

tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py fails on a 157 engine without it (the click returned before its form's request) and checks no_wait_after still returns at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 03:26:04 +07:00
Federico Elia 00ad6d702f Merge pull request #382 from feder-cr/ledger/0.43.0
record 0.43.0 as published
2026-10-25 06:40:12 +07:00
feder-cr 9fb0f20dbc record 0.43.0 as published 2026-10-24 23:18:49 +00:00
Federico Elia 254b2dce1d Merge pull request #381 from feder-cr/engine/firefox-53
firefox-53: the font gate checks the artifact's manifest, e2e for a page that changes process
2026-10-25 06:03:43 +07:00
feder-crandClaude Opus 5.5 2ee9f100bf 0.43.0: pin invisible-core 53.48.0, the firefox-53 engine
Locators keep working after a page that runs in a process of its own sends
itself to one that does not: the engine's context ids are unique for the
session. The exposed fonts are the set of a clean Windows (67 families).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 05:39:50 +07:00
feder-crandClaude Opus 5.5 d5a50275ea Test fixtures name the import error instead of a TypeError
With a core whose version the wrapper's pin did not name, the package was not
importable and firefox_binary answered "argument of type 'NoneType' is not
iterable" (measured 2026-10-25); sample_profile would have answered
"'NoneType' object is not callable". _require_package() exists for this and
neither fixture called it. Both do now, and a test drives both bodies with the
import missing: it fails on the old conftest and passes now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 01:30:25 +07:00
feder-crandClaude Opus 5.5 b02c79f279 e2e: reads on a page in a process of its own, then on the page it sends itself to
A page served with Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy
runs in a process of its own; one read there, and every locator on the page it
sent itself to failed for good with "Cannot find object with id" (measured
2026-10-24 on firefox-52 with 0.42.0, where this test fails). Each round checks
that the first page really was isolated, so it cannot pass for the wrong
reason. Fixed by firefox-53, whose context ids are unique for the session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 01:30:25 +07:00
feder-crandClaude Opus 5.5 4a69d25254 Font gate: the binary declares exactly the clean Windows set, read from its own manifest
EXPECTED loses Leelawadee, Microsoft Uighur, Wingdings 2 and Wingdings 3, the
families the firefox-53 bundle drops because a clean Windows 11 has none of
them.

The gate now asks the allow-list question on the artifact itself: the engine
exposes exactly the families its manifest declares, and that manifest is
fonts/bundle-fonts.list beside the binary (Contents/Resources/fonts on macOS).
The families it declares must be EXPECTED and only those. The page probe can
only find names it asks about, so a family put back into the bundle was
invisible to it unless some list named it; now it is refused with no list
naming it.

Measured 2026-10-25 on real binaries: firefox-52 as published, where the
probe answers "detected 67 families (expected 67)", is refused with the four
families named; a copy carrying the firefox-53 font bundle passes the whole
gate. Unit tests cover exact, extra, missing, the macOS layout and no
manifest at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 01:30:24 +07:00
Federico Elia 7b783cf892 Merge pull request #380 from feder-cr/ledger/0.42.0
record 0.42.0 as published
2026-10-24 19:38:45 +07:00
feder-cr 455f0cf0e1 record 0.42.0 as published 2026-10-24 11:58:36 +00:00
Federico Elia 655d99020a Merge pull request #379 from feder-cr/canvas2d/read-as-drawn
0.42.0: pin invisible-core 52.48.0, a 2D canvas reads back as drawn
2026-10-24 18:41:37 +07:00
feder-cr 4b61bea3fa 0.42.0: pin invisible-core 52.48.0, a 2D canvas reads back as it was drawn 2026-10-24 18:13:30 +07:00
feder-crandClaude Opus 5.5 ffad787af9 A screenshot is measured in device pixels, at the persona's display scale
The core now draws 1920x1080 panels at 125% and 150% as often as the Windows
fleet does (invisible_core #170), and seed 4242 lands on 125%: the screenshot of
an 800x600 viewport is a 1000x750 image, exactly what a real Windows machine at
that scale gives. The tests asserted 1x sizes and pixel positions; they now read
window.devicePixelRatio and scale both, so they also prove the crop is right
when the scale is not 1. Passes at 1.25 (core main) and at 1 (0.41.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 15:52:43 +07:00
feder-crandClaude Opus 5.5 cc3bce2f58 A 2D canvas reads back as it was drawn, guarded at the e2e gate
The random-pixel test public fingerprinting pages run - 64 random opaque 1x1
fills read back - must come back byte for byte on a page canvas and on an
OffscreenCanvas 2D (invisible 0.41 changed 6 of 64, retail 151 changes 0); an
undrawn canvas reads zero; two seeds declaring the same display scale and
ClearType tuning draw the same text; and a toDataURL PNG on an http page carries
the 16-byte deBG chunk retail 151 writes after IDAT. Against the firefox-51
engine five of these fail, as they should; they pass from firefox-52 with the
core that turns baseline protection on (Linux and Windows, 2026-10-24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 15:52:43 +07:00
Federico Elia 33940459f7 Merge pull request #377 from feder-cr/ci/publish-one-at-a-time
The publish workflow serialises per repository
2026-10-21 13:36:28 -07:00
feder-cr dc9ff53e78 The publish workflow serialises per repository, so a dispatch on a branch and a push of the tag wait for each other 2026-10-21 22:15:13 +02:00
Federico Elia 4ad30e5079 Merge pull request #376 from feder-cr/ci/publish-concurrency
The publish workflow runs one at a time per ref
2026-10-21 07:37:41 -07:00
feder-cr e94863c79d The publish workflow runs one at a time per ref, so two runs of one tag cannot both upload 2026-10-21 16:09:10 +02:00
Federico Elia 151c314c05 Merge pull request #375 from feder-cr/ledger/0.41.0
record 0.41.0 as published
2026-10-21 06:18:38 -07:00
feder-cr 8bbc41162b record 0.41.0 as published 2026-10-21 12:52:37 +00:00
Federico Elia 58fd0c8d93 Merge pull request #374 from feder-cr/feat/core-51.48.0-pin
0.41.0: pin invisible-core 51.48.0, document font.system_text_quality
2026-10-21 04:28:18 -07:00
feder-cr edaf224417 The voices test declares the session it measures
It asserts the voice list measured on retail Windows Firefox for an en-US
session, and it left the locale and the time zone to the egress IP: green on
US runners, red from anywhere else. From Italy the session came out it-IT and
the list began with Microsoft Cosimo, which is right for that session and not
the one measured ([B364]). The session now declares locale en-US and time zone
America/New_York; the expected list and the assertion are unchanged. Measured
from an Italian egress: green on firefox-50 and on the form B engine.
2026-10-21 12:59:29 +02:00
feder-cr 07a55bfc85 A flat WebGL clear reads back exactly, and a realistic render varies per seed
test_high_entropy_webgl_still_noised_per_seed drew 64 scissor-cleared stripes
and asserted their readback differs between two seeds. A clear has no device
variation: the value is the clear colour quantised to 8 bits, the same on
every GPU, so noise on it is a tell a page can read by comparing with what it
cleared. The engine of form B leaves it exact, and the test asserted the tell.

The file now asserts the two things that hold: a triangle with a gradient and
antialiased edges reads back differently for seeds 1 and 2, and a flat clear
in v/255 colours reads back exactly v (an integer v, so no driver rounds it
differently). Measured: retail Firefox 151 reads the stripes exact (0 of 4096
moved); the form B engine passes both; firefox-50 passes the first and fails
the second on every pixel, both seeds.
2026-10-21 12:59:29 +02:00
feder-cr 1bac4b6f8b The required-keys list asks for edge_tolerance, the canvas pref the firefox-51 engine reads, not the retired noise_skip_mask 2026-10-21 12:28:52 +02:00
feder-cr 47dabed289 0.41.0: pin invisible-core 51.48.0, document font.system_text_quality 2026-10-21 12:20:44 +02:00
feder-cr a1312941eb Pin invisible-core==51.48.0 for the firefox-51 coupled release 2026-10-20 13:39:45 +02:00
github-actions[bot] 5b762bab65 record 0.40.0 as published (#373)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-19 00:36:04 -07:00
Federico Elia 920292760a The version gate installs the build backend it builds with (#372)
`invisible_core.release check --verify-index` builds the package without
isolation to compare it with the ledger, and the gate job installs only the
dev extra, which carries `build` and not `hatchling`. On the first tag that
ran the step (invisible-playwright v0.40.0) it stopped with exit 2, "gate
broken: Backend 'hatchling.build' is not available", and the upload was
skipped. The step installs `build hatchling` first, as the record step does.
2026-10-18 23:50:03 -07:00
Federico Elia 0afe5737fa 0.40.0: pin invisible-core 50.48.0, expect through the injected script, goto on the base URL (#371)
0.40.0 moves the pin to invisible-core 50.48.0, on the same firefox-50 engine, and brings the fixes that waited for it.

expect() reads every condition through the injected script's own expect, as Playwright's server does, instead of a Python rewrite that covered two families; a failed expect now carries its call log and reports an object value as the object (this was #368, renumbered from 0.39.0). page.goto follows the context's base_url, resolved by the engine's URL parser. evaluate, evaluate_handle and wait_for_function run the caller's text as a script and call it when it is a function, with the argument as a protocol value. The vendored client's README says what actually differs from upstream.

The client side of core 50.48.0: user-install runs on the ledger pull request instead of release: published, which never fired, and CI checks that with invisible_core.install_job; the release tests keep out of their venvs every variable the core's library reads; publish.yml checks the version and the ledger against the index before it uploads.

Eight older tests were red on fakes that did not know about the base URL or the new evaluate road; they are updated to check the same contract on the new code, and the seal-floor stub now copies the core modules pin.py imports instead of a hand list. Default suite: 762 passed.
2026-10-18 23:06:24 -07:00
github-actions[bot] 9a1501af7a record 0.39.0 as published (#370)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-18 14:40:44 -07:00
Federico Elia fb56fde88d 0.39.0: pin invisible-core 50.47.0, the firefox-50 engine (#369)
The pin moves to invisible-core 50.47.0, on the firefox-50 engine. From firefox-50 every realm, worker and worklet takes the session's zone from the engine's own override, so the core no longer writes TZ into the browser's environment and drops the IANA-to-POSIX table.

This package stops importing IANA_TO_POSIX_TZ and tz_env and stops passing a zone to the launch environment. The tests of the table go with it, and so does the probe of the guarded import that took those names; a core of any other version is still refused by the pin check before anything is imported from it.
2026-10-18 11:56:14 -07:00
github-actions[bot] 88d3f7a513 record 0.38.0 as published (#367)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-17 20:20:45 -07:00
Federico Elia 1504d95ed3 0.38.0: pin invisible-core 49.46.0, uv as the way in (#366)
The pin moves to invisible-core 49.46.0. The desktop settings a page can read (scrollbars, text scale, drag threshold, double-click selection, the system colours in both schemes, the refresh rate, the form-control font) are now declared by the persona instead of read from the machine it runs on.

The way in is uv: the README has one complete install block per system, and CI refuses an install instruction that is not uv. A remedy the package prints (a broken pin, an old core) is now the command for the environment it runs in, so a uv venv, which has no pip, is told the uv command.

The guides and the issue template move to uv too, and the release e2e runs the README block as written in a clean home. The tests that build prefs outside a session now declare a timezone, which 49.46.0 asks for.
2026-10-17 13:39:46 -07:00
Federico Elia 9927c974da The firefox-N release body points at the README's install block instead of restating it (#365)
The body of every firefox-N release carried its own `pip install invisible-playwright`, a second copy of the README's install command that nothing kept in step with it. It now links to the README's Install section, so a release always teaches what the README teaches.

scripts/gen_release_notes.py is run by the engine's publish workflow; tests/test_release_notes_install.py checks the body restates no install command and the README has the section it links to. No package change, no version bump.
2026-10-17 16:34:04 +02:00
github-actions[bot]andfeder-cr 632f023b8c record 0.37.0 as published (#364)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-17 13:56:39 +02:00
Federico Elia 0dd99b7638 0.37.0: the pin moves to invisible-core 49.44.0, on the firefox-49 engine (#363)
The pin moves to invisible-core 49.44.0, on the firefox-49 engine.

With it: your code's evaluate runs in a world of its own; the favicon no longer reaches routes or events; route.abort() with no code fails like Playwright's; a route that sends a navigation elsewhere lands there; a held request released after interception went off no longer stalls the browser; request.post_data is the body without a route; and the response names its certificate and its service worker.

Measured on the firefox-49 candidate: the full e2e and Playwright's own suite against the recorded reference, no regression. tests/gates/upstream_baseline.json is recorded again with a cause per entry; one correction to its commit message: test_scroll is pinned failed because of a scroll position two worlds read differently after scrollTo, not because of test order.
2026-10-17 13:19:57 +02:00
github-actions[bot]andfeder-cr 0433b18aa7 record 0.36.2 as published (#362)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-17 02:28:33 +02:00
Federico Elia b40535b344 0.36.2: the tests that time themselves run alone, and security_details() hands on the certificate (#361)
* response.security_details() hands on the certificate the engine sent

op_security_details answered None for every response, HTTPS included,
which a script reads as "not over TLS". It was written against an engine
that sent securityDetails: null; the engine after firefox-48 reports the
certificate as upstream does, and the response now keeps what the
responseReceived event carried. An engine that still sends null answers
None, as before.

Measured with Playwright's own suite through this client: on firefox-48
with the engine change, test_response_security_details,
test_response_security_details_none_without_https and
test_should_report_if_response_was_from_service_worker pass; on the
published firefox-48 the answers are unchanged.

* The e2e tests that measure time run alone, after the parallel tests

Tests whose verdict is an upper bound on a wall-clock duration ("refused
at once", "returns before the page loads", the device enumeration's
declared time) carry the new wall_clock marker. From invisible-core
48.42.0 the e2e run gives them the machine alone, one browser, after the
last parallel test has ended: four browsers at once cross those bounds
with nothing wrong in the engine. The pin moves to invisible-core 48.42.0.

* The changelog dates 0.36.2 by the day it is uploaded, UTC
2026-10-17 01:47:55 +02:00
github-actions[bot]andfeder-cr 3986b4ccce record 0.36.1 as published (#360)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-16 13:23:31 -07:00
Federico Elia bc3d777f59 0.36.1: wait_for_function ends on an element, and evaluate_handle handles work (#359)
* wait_for_function ends when the predicate returns an element

The predicate ran by value and Python judged the serialized result, so a predicate that returns a node, the most common wait there is, never ended: a node serializes to nothing truthy. Each turn is now invisible-core's poll_in_main: one run by reference, judged with js_truthy, and a truthy value is the handle the wait returns. Needs invisible-core 48.42.0.

* A handle of a main-world value runs where the value lives

Every handle evaluate_handle returned was unusable on 0.36.0: text_content, evaluate and json_value failed with 'Cannot find object', because a main-world objectId was made into a utility-world handle and only json_value read the handle's world. FrameDispatcher._handle_from_main is now the one place such a handle is made: a node is adopted into the utility world and its main objectId released, as add_script_tag already did; any other value, primitives included, stays in the main world, where dispose, evaluate, get_property, get_property_list and json_value run. evaluate_handle and wait_for_function both go through it; evaluate_handle reads the whole RemoteObject (invisible-core's evaluate_in_main_remote) to tell a node from anything else. The poll test now pins one run of the caller's code per turn. Needs invisible-core 48.42.0.

* 0.36.1: the pin moves to invisible-core 48.42.0

The core brings js_truthy and poll_in_main, which wait_for_function now
uses, evaluate_in_main_remote, which evaluate_handle uses, and a GeoIP
cache that is never read half-written. The CHANGELOG lists the three under
0.36.1.
2026-10-16 12:54:03 -07:00
github-actions[bot]andfeder-cr 6dd3e5af82 record 0.36.0 as published (#358)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-16 10:57:08 -07:00
Federico Elia f7cd0cc378 0.36.0: the pin moves to invisible-core 48.41.0, on the firefox-48 engine (#357)
* A persistent profile stays the same machine across launches

The seed came from secrets.randbits whenever none was passed, so a
profile_dir reopened without seed= showed its cookies on another machine.
It now comes from invisible_core.resolve_session_seed, which reads the
seed the profile recorded, and record_session_seed records it where the
profile directory is created.

* docs: the branding pin, the voices by language and the persistent seed

pinning.md lists branding among the top-level keys and says the voices follow the session's first language; the CHANGELOG says all three under Unreleased.

* docs: the branding pin takes a zip archive, as the engine serves it
2026-10-16 10:09:41 -07:00
Federico Elia 36003250a4 0.35.11: a closed page says nothing, and a close waits for the event being handled (#355)
A page's close and the delivery of its session's events were not serialized, so a late Network.responseReceived could create a Response under a request the client had already dropped with the page, and new_page() or a response listener raised 'dict' object has no attribute '_object'. Every event of a page now goes through PageDispatcher._deliver, under the close's own lock.
2026-10-16 06:02:24 -07:00
Federico Elia 47ee59da22 The enumeration test bounds what the engine does, not how loaded the runner is (#354)
The first enumeration was held within the declared time plus 110 ms and the
second under 50 ms. A CI run with four browsers crossed each once in the
release of 0.35.10 (656 against 543 + 110, then exactly 50), both green again
on the same SHA, and the second one stopped the publish.

The bounds now come from the properties. The declared time is waited, which
load can only add to. The list is kept, so a second call is well under the
declared time that a fresh ask would wait again. And nothing is added on top:
the second call is the same round trip without the wait, so first - second is
the declared time plus whatever the host added, with the load both calls share
cancelled out; the margin is half the smallest time the host's audio stack
used to add (287 ms). Under four browsers at once on Windows, 12 launches out
of 12 hold all three, the difference 8-49 ms over the declared time.
2026-10-15 16:13:24 -07:00
github-actions[bot]andfeder-cr eaa044fef7 record 0.35.10 as published (#353)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-15 05:45:54 -07:00
Federico Elia 82565e0c98 0.35.10: the pin moves to invisible-core 47.41.0 (#352)
The engine can live on a read-only disk (INVISIBLE_PLAYWRIGHT_ENGINE_DIR), and
an "auto" timezone that cannot be resolved fails the launch without a proxy
too, instead of falling back to the host's zone in silence.
2026-10-15 05:04:40 -07:00
github-actions[bot]andfeder-cr 3dac7702ba record 0.35.9 as published (#350)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-14 18:41:45 -07:00
Federico Elia 48770e590e 0.35.9: the pin moves to invisible-core 47.40.0 (#349)
A connection releases each pipe end once: closing a browser twice no longer
closes the pipe of another browser in the same process.
2026-10-14 18:09:56 -07:00
Federico Elia c1835182ed record 0.35.8 as published (#348)
Records 0.35.8, uploaded by hand on 2026-10-14 at 22:49 UTC on the owner's order to release before the e2e of the merge had finished. A manual upload skips the release tool, so the entry is recorded from the same tag export that was uploaded.
2026-10-14 16:01:40 -07:00
Federico Elia bf9af85830 0.35.8: the pin moves to invisible-core 46.39.0 (firefox-46) (#347)
The pin moves to invisible-core 47.39.0, which seals the firefox-47 engine.

- **A page can no longer tell that the engine carries the automation protocol (invisible_playwright #336).** Every engine until firefox-47 registered the protocol as a chrome package named `juggler`, and a page tells a registered package from an absent one with `new Worker("chrome://juggler/...")`: it returned on our engine and throws on Firefox. Captcha vendors started probing it in October 2026, which is why a challenge solved by hand was still refused. firefox-47 loads the protocol from `resource://gre/modules/juggler/`; of 65 chrome packages and resource substitutions probed from a page, none answers differently from Firefox 151.

- **A goto the page stops on its way no longer answers OK on the old page, nor waits out its timeout.** document.open() and window.stop() in the page being left stop the navigation; the engine dropped every such stop of the main frame, so goto answered OK on the previous page (4 times in 4 on 0.35.7 with the page held 1.5 s) or waited for its timeout. It now raises NS_BINDING_ABORTED at once, as Playwright does on Firefox.
- **Every way a page or the caller can stop or replace a goto is tested**: document.open, window.stop, location.replace and assign, a form submit, an iframe navigating the top, history.back, pushState, a meta refresh, nothing, and a second goto, each in one process and across a process swap, back to back, checked against upstream Playwright 1.63's answers on its own Firefox.
- **goto refuses a success the engine made up**: a commit attributed to its navigation that is not where that navigation's request went raises instead of answering OK.
- A goto the caller's next goto stops is "interrupted by another navigation", as upstream; goto(until="load") counts only its own document's load; the timeout message no longer contradicts itself.
- The wheel is born before the page sees it, as keys and moves are since 0.35.7.

e2e on firefox-46 with core 46.39.0's source: Windows 389 passed, 5 skipped; Linux 390 passed, 4 skipped; no reruns.
2026-10-14 15:40:54 -07:00
github-actions[bot] a61169c830 record 0.35.7 as published (#346)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-13 13:31:36 -07:00
Federico 1839425da6 0.35.7: the pin moves to invisible-core 45.39.0 (firefox-45) (#345)
The pin moves to invisible-core 45.39.0, which seals the firefox-45 engine.

- **A key or a mouse move is born before the page sees it.** The engine stamped every input event at the instant it reached the page, so `event.timeStamp` equalled `performance.now()` in the handler, and a script that keeps only the events with `timeStamp < now` dropped most of our keys. Each event is now born a few milliseconds earlier, drawn per event from the session. The new e2e test checks every key and mouse move in the handler; measured on firefox-45, all of them arrive 4 to 22 ms after they were born, where retail Firefox with a real keyboard and mouse is at 3 to 18.
- **The first `enumerateDevices()` of a session takes the same time on Windows and on Linux**, a time the seed fixes between 240 and 640 ms, instead of the host's audio stack time (15 to 40 ms on Linux). The device list is unchanged. The new e2e test reads the declared time from the core's profile.

e2e on firefox-45 with core 45.39.0's source: Windows 378 passed, 5 skipped; Linux 379 passed, 4 skipped; no reruns.
2026-10-13 13:06:23 -07:00
github-actions[bot] 2aa4292458 record 0.35.6 as published (#344)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-13 10:48:18 -07:00
Federico 102913d5bf 0.35.6: the pin moves to invisible-core 44.39.0 (firefox-44) (#343)
The pin moves to invisible-core 44.39.0, which seals the firefox-44 engine.

- **Stopping a screencast no longer freezes the browser on Windows.** The engine stopped its window capture on the thread that owns the window while the capture was waiting for that thread to draw it. The new e2e test starts and stops a screencast fifty times at the rates the API is asked for; one browser froze at the ninth stop on firefox-43, and a probe of the same thing ran 1200 stops out of 1200 on firefox-44.
- **Text with a character the US layout has no key for is typed**: `page.type("#i", "café")`, `locator.type` and `keyboard.type` raised. The keys that exist are pressed and the character is inserted in its place, as Playwright does.
- **On Linux, the line endings a page reads are Windows'** (`Blob` / `File` with `endings: "native"`, and the text of a selection across two blocks).
- **`speechSynthesis.getVoices()` is Windows' list**, in its order, none of them the default.
- `scripts/run_e2e.py` is now the entry to the core's single e2e runner: a worker that dies at its deadline ends the run red, with the test's name and every thread's stack on the log, instead of waiting forever.

e2e on firefox-44 with core 44.39.0: Windows 376 passed, 5 skipped; Linux 377 passed, 4 skipped; no reruns.
2026-10-13 10:17:22 -07:00
github-actions[bot] 49e4d73de2 record 0.35.5 as published (#342)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-13 03:29:09 -07:00
Federico 857de63b48 0.35.5: firefox-43 (invisible-core 43.39.0) (#341)
The pin moves to invisible-core 43.39.0, which seals the firefox-43 engine.

- **A page's frames stay in `page.frames` after a few navigations in one tab.** The engine reported the iframes of the page being loaded as detached once the back-forward cache let an older page of the tab go, so `page.frames` missed them and a `frame_locator` into them waited until its timeout. The new e2e test (five pages in a row, then a page with nested frames) fails on firefox-42 with no child frames and passes on firefox-43 with all three.
- **On Linux, AAC is answered as on Windows** (the declaration is in the core): `canPlayType` and `MediaSource.isTypeSupported` for audio/mp4, audio/aac, audio/x-m4a and video/mp4 with mp4a.40.2 used to drop to "" after about 300 ms on a host without its own AAC decoder.

e2e on firefox-43 with core 43.39.0: Windows 373 passed, 5 skipped; Linux 374 passed, 4 skipped; no reruns.
2026-10-13 02:59:07 -07:00
github-actions[bot] 70285c5bc3 record 0.35.4 as published (#340)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-10-13 01:34:51 -07:00
Federico be0620f2ee 0.35.4: firefox-42 (invisible-core 42.39.0) (#339)
The pin moves to invisible-core 42.39.0, which seals the firefox-42 engine.

What users get from it:

- A page that navigates or reloads itself no longer loses its main world now and then (a read in the page's world used to wait 30 s and fail).
- A session keeps the focus when another one starts beside it. Two sessions on one hidden Windows desktop: the first lost the focus in 4 runs of 6 before, 0 of 6 now.
- In a visible session the real cursor moving over the window can no longer turn a click on a link into a native drag.
- `evaluate` of a function that rejects with a plain object or an Event raises instead of answering `None`.

On the firefox-42 build with this branch and core 42.39.0: e2e Windows 372 passed, 5 skipped, no reruns; Linux 373 passed, 4 skipped in four full runs of five, the fifth with one drag test that saw a native pointer move from the hidden display (it passed 16 times alone and is tracked on its own).
2026-10-13 01:07:01 -07:00
github-actions[bot]andfeder-cr 91ea73bb54 record 0.35.3 as published (#338)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-13 06:28:49 +02:00
Federico 7d86ba00bd 0.35.3: go_back and go_forward to a same-document entry answer None at once, and the test servers are threaded (#337)
go_back and go_forward to a same-document entry (a hash, a pushState) waited
for a navigation id that a same-document navigation never has, and raised
TimeoutError at the timeout. Measured on 0.35.2: 8.0 s for
go_back(timeout=8000). Playwright answers null at once. _history now takes
Lifecycle.mark before the command (invisible-core 41.39.0), which also counts
same-document navigations.

The e2e of tests/test_navigation_response.py had left this arm out on the
word of B185, which said the engine answered Page.goBack and then did nothing.
B185 was closed a month ago and the comment stayed. The arm is back, with
go_back and go_forward on a hash entry.

The core no longer gives a protocol command a 10 s bound of its own: inside an
action it waits for what is left of the action's timeout.

Tests: 35 single-threaded servers in 18 files are now tests/_servers.py's
LocalServer, threaded with daemon threads. A connection the browser opened and
left could hold a single-threaded server's only thread, and shutdown() with
it. That is a candidate for the Windows e2e worker that stopped for 420 s on
the screencast test.

The pin moves to invisible-core 41.39.0.

Two fixes to the test servers' conversion came after: the import of LocalServer in test_detectors_e2e.py had landed in its docstring, and LocalServer gives server_name and server_port as HTTPServer does.
2026-10-13 05:44:32 +02:00
github-actions[bot]andfeder-cr a279231512 record 0.35.2 as published (#335)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-13 00:37:29 +02:00
Federico 35951a1420 0.35.2: the caller's code runs once when its page navigates while it waits (#334)
* 0.35.2: the caller's code runs once when its page navigates while it waits

A script passed to page.evaluate, evaluate_handle or eval_on_selector_all
that was waiting on a promise when its page navigated was sent again into the
page that replaced it, and ran twice: Juggler sends a message still waiting
for its answer again to the new document, which refuses it in the same words
as a script that never ran, and from core 41.36.0 that refusal made the code
again. Core 41.38.0 sends the page world's code once; eval_on_selector_all
passes repeatable=False for the caller's function; wait_for_function goes on
polling through a world that went, as Playwright's does. The pin moves to
invisible-core 41.38.0.

* all_inner_texts and all_text_contents are the server's read, not the caller's $$eval

The fork's Locator asks readAll for them; upstream's client sends them
through evalOnSelectorAll with a fixed function, which the server cannot tell
from a caller's and now sends once (B285). readAll is the core's read_all,
made again on the page that replaced the one it went to (B282), which is what
the MCP's read_text reads right after a navigation. test_a_page_that_moves_on
reads both on every page, and evaluate there answers or raises Playwright's
navigation error.

* CHANGELOG: the library's reads keep answering with the new page

* page.evaluate_read: the door for a read its caller declares free of effects

Not in Playwright. page.evaluate sends the caller's code once and raises
Playwright's navigation error when the page moves under it (B285);
evaluate_read sends evaluateExpression with repeatable=True and is made again
on the page that replaced the one it went to. It exists for the MCP's snapshot
and read_html, fixed reads that inherited that robustness from core 41.36.0
through page.evaluate. Only a real True from the fork's client counts.

* CHANGELOG: page.evaluate_read
2026-10-13 00:10:28 +02:00
github-actions[bot]andfeder-cr e164432db0 record 0.35.1 as published (#333)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-12 22:02:37 +02:00
Federico 51b6602526 0.35.1: the pin moves to invisible-core 41.37.0 (#332)
A browser that closes or crashes now ends every wait on an event at once
with a closed-target error, including the waits a caller asked to have no
limit: the core's connection tells its close listeners, and the lifecycle's
waits listen.
2026-10-12 21:34:46 +02:00
github-actions[bot]andfeder-cr e93d16fd4b record 0.35.0 as published (#331)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-12 07:00:53 +02:00
Federico b03fa50a1a 0.35.0: invisible-core 41.36.0, pages that move on, goto that answers, reads that wait, expect that works (#330)
The pin moves to invisible-core 41.36.0.

- A page that replaces itself right after it loads no longer breaks the next call: a read right after `goto` failed with "Failed to find execution context", and `goto(..., "networkidle")` timed out.
- A `goto` the browser abandons for the previous page's own redirect raises at once with Playwright's "is interrupted by another navigation to" instead of waiting for its timeout.
- `page.frames` lists the frames the page has; it used to grow by a stale iframe and a repeated main frame at every cross-process navigation.
- Selector reads wait for the element as in Playwright, and find and read in one command.
- `expect(locator)` works: every `to_be_*` and `to_have_count` used to fail with an empty AssertionError.

`tests/test_a_page_that_moves_on_e2e.py` runs pages that redirect from the `<head>` and 0, 50 and 300 ms after `load`, same site and cross site, five rounds each, on a real engine.
2026-10-12 06:36:55 +02:00
github-actions[bot]andfeder-cr 93acb6cb13 record 0.34.0 as published (#328)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-12 00:35:42 +02:00
Federico 65dfbd5957 0.34.0: invisible-core 41.35.0, bypass_csp reaches the page, and a launch has one deadline (#327)
* A launch has one deadline, and a timeout reaches the caller as TimeoutError

On the firefox-41 gate, Linux under load, launch() failed with "the engine
refused the proxy, so the browser was closed": the proxy command had 10 s of
its own, went unanswered for 10 s, and the caller's 60 s still had time.

The core's launch now sets the proxy and keeps one deadline for the startup;
this side passes the caller's timeout (0 is no limit, as in Playwright, where
it used to become 60 s) and the proxy, sends Browser.enable through
startup_send, and closes the browser if building its object fails.

Every TimeoutError goes out named TimeoutError, whatever its subclass, because
the client picks its class by that name: a click on an element that never
became actionable (the core's ElementNotActionable) and a wait_for_function
that never became true reached the caller as a plain Error, so except
TimeoutError caught neither. Both checked on the firefox-41 binary.

Commands Playwright gives no timeout lose the bounds of their own (#321 did
newPage): context creation and its options, cookies, permissions and the
other context calls, Page.close, removeBrowserContext, the file chooser
subscription, Heap.collectGarbage, and the page commands, where screenshot
takes the caller's timeout.

Tests: tests/test_a_launch_has_one_deadline.py, six mutants each killed; the
fakes that stand for a connection gain startup_send. Proxy and bypass_csp e2e
pass on firefox-41 on Windows and Linux, and a 1 ms launch raises
TimeoutError and leaves no browser process.

* timeout=0 is no limit, read in one place (B278)

The server read a timeout as params.get("timeout") or 30000 in four places,
so the 0 the Playwright client sends for timeout=0 became 30 s for an action,
a wait or a navigation. _caller_timeout reads it once (0 is None, absent is
the operation's default) for actions, goto, history and launch, and
wait_for_function waits on the core's Deadline.

Tests: tests/test_timeout_zero_is_no_limit.py; the two tests that move the
actions' clock now move the deadline's too. On the firefox-41 binary,
click(timeout=0) on a button a page adds after 32 s clicks it at 32.5 s.

* The first-launch test runs the engine from a path of its own

The launcher state is per executable path, and the e2e workers all launch the
binary under test from the same path. This test deleted that path's values and
launched, while a neighbour's launch could find a Launcher timestamp without a
Browser one, read it as a crashed launcher and turn the launcher off for the
path: on firefox-41 under -n 4 the test failed once with no Launcher timestamp,
and 5 times in 8 with two other processes launching the same path (all 36 of
their launches succeeded, without the launcher).

The test now copies the engine tree, as hard links where the volume allows, to
a temporary path no Firefox has run from, which is the state it is about, and
removes that path's values afterwards. 8 in 8 under the same concurrent
launches.

* 0.34.0: invisible-core 41.35.0, bypass_csp reaches the page, and a launch has one deadline

The pin moves to invisible-core 41.35.0, which seals firefox-41: bypass_csp
lifts the page's header and meta policies (#295), a screencast keeps the rate
it was asked for, and on Linux a window covered by another one is not reported
as hidden. tests/test_bypass_csp_e2e.py checks both halves against the engine:
with the option inline script, eval and add_script_tag run; without it, in
several fresh contexts, they stay blocked.
2026-10-12 00:10:02 +02:00
Rayen Mlayeh 5925cecdf5 A launch that fails before the browser starts stops the hidden display (#326)
Composing the prefs, the proxy and the environment sat outside the try whose handler calls _teardown(), so a launch that failed there (a proxy the engine cannot express, a font manifest it does not carry) left the Xvfb or the hidden desktop running. They move inside it, in the same order. The version moves to 0.34.0 with its changelog entry.
2026-10-11 22:04:41 +02:00
github-actions[bot]andfeder-cr 06f06d5cec record 0.33.1 as published (#325)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-11 12:58:22 +02:00
ce97476fa8 A request's resource_type comes from Juggler's cause name (#305)
* fix(network): a request's resource_type comes from Juggler's cause name

Juggler sends `cause` and `internalCause` as nsIContentPolicy constant
names (TYPE_DOCUMENT, TYPE_XMLHTTPREQUEST, TYPE_FETCH). The table they were
looked up in was keyed by document / xmlhttprequest / fetch, so nothing
matched and every request's resource_type was "other": a page load, a
fetch and an XHR were indistinguishable on the request event.

Use the Playwright driver's own table (ffNetworkManager), internalCause
first for eventsource, so resource_type agrees with the driver transport.

* 0.27.1: a request's resource_type says what it is

* tests: each kind of request is named by the engine, end to end

The unit test proves the table maps the strings it is given; the defect lived
in which strings ARRIVE, so a real page now makes a document, stylesheet,
script, image, fetch and XHR request and the names come from the engine. Green
on firefox-40; red when the lookup goes back to lowercased keys.

---------

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-11 12:22:19 +02:00
Federico ac98613882 A new page waits for the engine's answer as long as the caller does (#324)
op_new_page gave Browser.newPage a fixed 30 s, a bound of its own on a call
Playwright gives none. The caller's bound is the one that means something (a
navigation that opens the page, an MCP tool call), and on a loaded host the
first page after a slow launch failed at 31 s while the navigation that asked
for it still had time: 5 such failures in 773 page calls of a real audit, each
loading normally when repeated.

The reply is now waited for without a bound: it ends when the engine answers,
or when the pipe closes and the connection raises TargetClosedError at once.
The adoption wait after the reply keeps its bound, which guards a protocol
contract (a reply with no attached target), not the engine's speed.
2026-10-11 11:53:56 +02:00
github-actions[bot]andfeder-cr b817217d2e record 0.33.0 as published (#323)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-11 11:09:55 +02:00
Federico 8c33d56c58 0.33.0: invisible-core 40.35.0, the shutdown pings leave by the session's proxy (#322)
0.33.0: invisible-core 40.35.0, the shutdown pings leave by the session's proxy
2026-10-11 10:22:15 +02:00
feder-cr 992ad3dff2 0.33.0: invisible-core 40.35.0, the shutdown pings leave by the session's proxy
The pin moves to invisible-core 40.35.0, which seals the firefox-40 engine: the
shutdown pings go through the engine's own background task by the session's
road instead of pingsender[.exe] from the machine's address, and the session's
last process is let finish them before the session's files are removed.
2026-10-11 10:06:51 +02:00
github-actions[bot]andfeder-cr 0819cd4e23 record 0.32.0 as published (#320)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-10 22:30:10 +02:00
Federico fa7ccba296 0.32.0: invisible-core 39.35.0, the session ends with its last process, and the hand presses Shift and waits before it clicks (#319)
0.32.0: invisible-core 39.35.0, the session ends with its last process, and the hand presses Shift and waits before it clicks
2026-10-10 21:57:25 +02:00
feder-cr 51fbe23431 tests: build Actions through its constructor, and pin the persona fields by count
With invisible-core 39.35.0 two tests broke on a property that still held.
test_drag_motion.py assembled an Actions with __new__ and set its fields by
hand, so the field the core added (pointer_persona, read before a press) raised
AttributeError on every drag; it is built through the constructor now, which
draws the motion from the same sub_seed(seed, "server:drag") stream. And
test_a_field_is_typed_after_a_pause.py pinned "all fields but the last", which
the Shift timing appended after the spread turned into a different set; it pins
the first ten, the ones 0.25.8 drew.
2026-10-10 21:20:57 +02:00
feder-cr a22d34b423 0.32.0: invisible-core 39.35.0, the session ends with its last process, and the hand presses Shift and waits before it clicks
The pin moves to invisible-core 39.35.0, which carries SessionFiles (used here
by the commit below), Shift around the characters that only exist with it, and
the pause between the pointer arriving and the press.
2026-10-10 20:59:45 +02:00
feder-cr 17baf3c6a8 A session's directories are the core's SessionFiles, removed after the session's last process
On Windows a session longer than a minute left its invisible_profile_* behind,
holding an empty saved-telemetry-pings; one machine had 6,091 of them. Two causes,
measured in that order:

- The profile removal was a shutdown hook registered after conn.close, and the
  hooks run in reverse, so it ran first, with the browser still up (the comment
  beside it said the opposite). The upload directory, created after the launch,
  went before the browser too, and a launch that failed or a proxy the engine
  refused returned before the removal was registered at all.
- With the order fixed the directory still stayed: at exit the browser starts
  pingsender.exe, a child that outlives it holding the ping file inside the
  profile, so the removal failed on that file and the child then deleted it.

The profile and the browser's temporary directory are the core's SessionFiles
now, made the moment the launch is asked for and handed to Server.after_shutdown,
which runs once every hook has: conn.close has waited for the browser, and
SessionFiles.remove ends whatever still carries the session's token before it
removes anything. The upload directory goes the same way. Nothing changes on
the network: the launcher's last step ended those processes anyway, a moment
later.

The browser's temporary directory (TMP, TEMP and TMPDIR, inside this process's)
is SessionFiles' too: Firefox's cleanup in the system one was cut off by short
sessions, and a 70 s session left two 4 MB Remote Settings bundles in %TEMP%.

Measured with this branch on firefox-39: two 70 s sessions, and the private TEMP
they ran with was empty afterwards.

- tests/test_juggler_transport.py: the profile is still there when the browser
  is closed and gone after, on the normal path, a failed launch and a refused
  proxy; the temporary directory lives and ends with the session. What
  SessionFiles.remove does about the children that outlive the browser is the
  core's to test.
2026-10-10 14:04:03 +02:00
github-actions[bot]andfeder-cr cbf061a28d record 0.31.0 as published (#318)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-10 05:35:28 +02:00
Federico 9d1635bdc5 0.31.0: firefox-39, a pointer call answers once the page has handled its event (#317)
With invisible-core 39.34.0 and the firefox-39 engine, page.mouse and every
element action return after the page's listeners have run, so the next call
cannot reach the page first; a right click no longer waits out an
acknowledgement that never came.

- tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py asks the
  contract deterministically (a handler that keeps the page busy for 300 ms):
  red on firefox-38, green on firefox-39; and a click that opens a dialog still
  answers.
- Two fakes follow the protocol: the landing comes back with the dispatch.
2026-10-10 05:12:55 +02:00
Federico 40dad414f1 tests: every Juggler protocol name the server writes is in the mirror (#314)
The core checks its client against the protocol mirror, and invisible-selenium
and invisible-puppeteer check their own code; the Playwright server, which writes
more protocol names than any of them, had no such test. It passes today; the
known-bad input is the command the engine dropped, written back into a send.
2026-10-09 20:04:30 +02:00
Federico 92184c6834 tests: the client's browser tests run in both pointer modes, the rest is the core's (#313)
test_juggler_actions.py keeps the tests that need the engine, and each now
runs twice: with the approach drawn by the client (this package's mode) and
by the engine (engine_approach=True, the mode invisible-selenium and
invisible-puppeteer use). Those two packages carried a copy of this file each
and drop it; the tests without a browser moved to invisible-core with the
client they test.
2026-10-09 19:08:06 +02:00
github-actions[bot]andfeder-cr fad3d56cba record 0.30.0 as published (#312)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-09 17:24:57 +02:00
Federico 0683e74e45 0.30.0: the Juggler client comes from invisible-core 38.34.0 (#311)
The pipe, the protocol mirror, the frame lifecycle, the injected script, the
input actions, the keyboard and the human rhythm leave this package for
invisible_core.juggler, the one copy invisible-selenium and
invisible-puppeteer now share too. _juggler/ keeps the Playwright server.

- Imports use the core's public names only (the package re-exports them);
  tests/test_juggler_lives_in_the_core.py refuses a core module copied back.
- user.js is written by invisible_core.launch.write_user_js, the one writer:
  a firefoxUserPrefs value Firefox has no pref type for is refused.
- The unit tests of the moved modules, and the injected-script page-surface
  gate, are the core's now; the browser tests stay here, where the e2e job
  has the engine (test_juggler_lifecycle_e2e.py brings back the lifecycle's).
- The e2e job checks the mirror against the engine with
  python -m invisible_core.juggler._gen_protocol --check.
2026-10-09 16:58:58 +02:00
github-actions[bot]andfeder-cr b02cde7ffb record 0.29.0 as published (#310)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-09 12:09:25 +02:00
Federico d4df15396d 0.29.0: the window Windows Firefox draws, firefox-38 (core 38.33.0) (#309)
- A maximized window answers screenX -8 and an outerWidth 16 wider than screen.availWidth at 100%, as Windows Firefox does, and its content starts where retail's does at every display scale (mozInnerScreenY 85.6 at 125%). A popup answers its own size, frame and position, and one opened without a position is placed where Windows Firefox places it. The frame is measured on Windows Firefox 151 at the four display scales the personas use.
- The default viewport and the tests follow the core's per-scale frame; docs/pinning.md drops the four window pins the core no longer accepts.
- The pins screen.chrome_w, screen.chrome_h, screen.window_x and screen.window_y are gone; screen.dpr takes 1, 1.25, 1.5 or 2.
2026-10-09 11:36:02 +02:00
Federico d606c4ee4b README: the animation reads at the size GitHub draws it, with a third version for narrow phones (#308)
GitHub draws the 1280px animation in an 838px column (0.655) and the 720px phone one 254-472px wide (0.35-0.66), so their smallest text reached a visitor at 9-11.8px. Every text is now at least 19px in the wide animation, 28px in the phone one, and 35px in a new one for phones up to 374px (banner-small-{light,dark}.gif); the scene titles are larger and the line under them semibold. Same scenes and timing.

Measured with Playwright on seventeen device profiles, from 320px phones to 1920px desktops, in light and dark, through a local copy of the README laid out with the column github.com gives each width: the smallest text is 12px or more on every one, and each loads the GIF of its own theme.
2026-10-09 03:24:35 +02:00
github-actions[bot]andfeder-cr b7458ba3e0 record 0.28.0 as published (#307)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-09 02:49:56 +02:00
FedericoandRichard Powell 0aed66de2f 0.28.0: firefox-37, service workers blocked in the engine, the screen in CSS pixels (core 37.33.0) (#306)
- `service_workers="block"` on `new_context()` and `launch_persistent_context()` turns service workers off for that context inside the engine (`Browser.setServiceWorkersBlocked`, firefox-37), before the context is handed out: no page script, no global preference, and `route()` still sees every page request. On a persistent profile the block removes the service workers that profile had saved. A context whose options fail is removed, and a persistent launch whose context fails closes the browser. Adopted from #299 by Richard Powell, without the engine probe: the pinned engine always has the command.
- The screen a page reads is in CSS pixels, and the default viewport with it, from the core's `context_geometry()` (a 1920x1080 panel at 125% reads 1536x864).
- On Linux the Xvfb display keeps X access control on, with a private cookie per session (core 37.33.0).
- An empty request header survives a route (firefox-37). New e2e tests read the raw HTTP/1.1 header block with and without a route, and check that a reloaded page is controlled by its service worker.
- A glide to where the pointer already is sends nothing instead of raising.
- `docs/differences-from-playwright.md` lists every place this package deliberately differs from Playwright.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-09 02:26:09 +02:00
Federico c279fb1632 README: the banner is an animation, as invisible_dots' is (#304)
It opens on the name and the logo, shows four scenes of what this package does, each taken from this README, and comes back to the logo, so the loop has no seam. A phone version, with nothing under 28px, takes over up to 1239px, where GitHub's README column is under 800px; both come in light and dark, on GitHub's own page colour, so no box shows around them.

The last scene is the five results of docs/screenshots/hero.gif. docs/banner-light.png and banner-dark.png stay: the README of the release on PyPI loads them from main.
2026-10-08 15:47:49 +02:00
Federico a310439f1f README: one banner for the four browser repositories, and a narrow one for phones (#302)
invisible_playwright, invisible_playwright_mcp, invisible_selenium and invisible_puppeteer now share one banner: the same title size (the one invisible_playwright's banner had), the same height, logos of the same weight and the same spacing, with only the width following the name.

On a phone the wide banner shrank to about 45px high and its title to body-text size. A narrow version, the logo above the title, now replaces it where github.com's README column is under about 520px: viewports up to 600px, and 768-880px, where the sidebar narrows the column. Every narrow banner is the same size, so the title is one size on a phone in all four.
2026-10-08 03:42:27 +02:00
github-actions[bot]andfeder-cr 9fc1d25b37 record 0.27.0 as published (#301)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-06 08:22:29 +02:00
Federico f6f4377685 0.27.0: the language of a session is the real Firefox of its egress country (core 36.33.0) (#300)
Requires invisible-core 36.33.0 (exact, as before).

- locale="auto" declares the real Firefox of the egress country, by share:
  each country carries the Firefox builds people there run and their share
  (Mozilla's Firefox Public Data Report), and the egress IP picks one. The
  same address always gets the same language. A country used to map to one
  country tag (de-DE) that no Firefox build has.
- An explicit locale is navigator.language: locale="en-AU" reports
  "en-AU, en-US, en" (it reported "en-US, en"). The test that pinned the old
  answer now pins the new one.
2026-10-06 07:55:44 +02:00
github-actions[bot]andfeder-cr 7c48af1fcf record 0.26.1 as published (#298)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-05 20:29:31 +02:00
FedericoandRichard Powell 4fa406fc45 0.26.1: add_script_tag and add_style_tag answer on the Frame channel (#297)
Lands #296.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-05 20:04:12 +02:00
github-actions[bot]andfeder-cr 0bacbdf066 record 0.26.0 as published (#294)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-05 18:49:04 +02:00
FedericoandRichard Powell 13766fe836 0.26.0: firefox-36, and the session language is the core's decision (#293)
Lands #277.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-05 03:48:49 +02:00
github-actions[bot]andfeder-cr 878794f099 record 0.25.13 as published (#292)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-04 15:43:30 +02:00
Federico b29531d643 A page's number in the session follows the call, not the engine (#291) 2026-10-04 14:47:08 +02:00
FedericoandRichard Powell b35a837c50 0.25.13: routes intercept, or refuse when they cannot (#290)
Lands #274.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-04 14:18:38 +02:00
github-actions[bot]andfeder-cr 30c0bf4044 record 0.25.12 as published (#289)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-04 13:29:44 +02:00
Federico 2c4913a122 0.25.12: no pause helper in the public API; set_input_files takes the pause itself (#288)
invisible_playwright.hesitation() was the one addition this package made to Playwright's public contract, and the package adds nothing to it. Its only use was the pause before answering a file chooser; set_input_files, and so FileChooser.set_files, now hands the files over after two of the session's hesitations (finding the file, confirming it), once per upload and bounded by the action's timeout, the way fill already pauses before its first key. With humanising off nothing changes. The helper is removed.
2026-10-04 13:08:10 +02:00
Federico 54dd95b151 The hidden-desktop e2e counts only its own session's windows (#286)
The hidden-desktop e2e counted every Mozilla window on the desktop, so any other Firefox open on the machine made a correct build fail with "a headless=True session put a window on the interactive desktop": 5 foreign windows, the same red on firefox-35 and on the build under test. A window now counts when its process carries the session's token, the stamp the reaper already reads, and the headed control arm still has to see its own window, so a headless window that lands on the visible desktop is still caught.
2026-10-04 04:51:44 +02:00
github-actions[bot]andfeder-cr 1d730d1275 record 0.25.11 as published (#285)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-04 04:15:19 +02:00
Federicoandpaulthesocket 91c1b3c92f 0.25.11: a page the site opens is a Page (#284)
Builds on #281 by @paulthesocket, whose commit is the base of this branch.

A page the site opens, with window.open or a target=_blank link after a real click, never became a Page: no page or popup event, and context.pages stayed at one. Pages are now adopted from attachedToTarget, the same single path every page takes, so all nine opening shapes tried (plain, with features, named, noopener, from a timer inside the click, target=_blank, rel=opener, a popup that closes itself, one closed by its opener) give one page event, one popup event and the right opener. On top of the original commit: the popup's own document now reaches context.on("request"/"response"), which matters for a PDF opened in a new tab; a page's end is cleaned up in one place instead of five; only targets of type page are adopted and a late target for a closed context is refused. Nothing the popup can read changed: opener, name, bars, size, focus, userActivation and webdriver are identical, and the popup blocker still blocks what retail Firefox blocks.

Co-authored-by: paulthesocket <paulthesocket@users.noreply.github.com>
2026-10-04 03:48:54 +02:00
github-actions[bot]andfeder-cr de4ed775bd record 0.25.10 as published (#283)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-04 02:31:46 +02:00
FedericoandRichard Powell 9da47ce395 networkidle is one load state, and every wait sees it (#282)
Builds on #280 by @richardpowellus, whose commit is the base of this branch.

After a goto, the old page's silence could satisfy wait_until="networkidle" before the new document had loaded (#280). Looking at it, networkidle had two definitions and the client never received the state at all: wait_for_load_state("networkidle"), wait_for_url and expect_navigation with networkidle always timed out. networkidle is now a load state like the others, born once in the lifecycle when the current document has loaded and the network has been quiet for half a second, reset with the next document, and sent to the client from that one place, so goto and every client wait read the same definition. A goto to a fragment of the same page now answers after its navigated event, as upstream does, so page.url already has the fragment.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-04 02:07:56 +02:00
Richard PowellandRichard Powell 27f7deb309 0.25.10: eval_on_selector and eval_on_selector_all pass arg (#278)
The argument was dropped, so an expression passed to eval_on_selector or eval_on_selector_all that read it failed with "a is undefined". The wrapper that turns the caller's expression into a call was written out by hand in four places, which is how two of them came to forget the argument; it is now built in one place (_marshal._invocation), and a test keeps it that way. The script that runs in the page is byte-for-byte the same.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-04 01:44:10 +02:00
github-actions[bot]andfeder-cr 460caeccae record 0.25.9 as published (#275)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-03 05:36:43 +02:00
Federico d94b0350de 0.25.9: the firefox-35 engine, with values committed through Firefox's own user paths (#273)
The wrapper speaks the firefox-35 engine and pins the core that seals it (invisible-core 35.32.0).

select_option, and fill on a field whose value is picked rather than typed (date, time, color, range), now let the engine commit the value through Firefox's own user path (Page.selectOptions, Page.setUserInput), so Firefox fires input and change itself with a user's flags, and nothing when a select did not change; a select or date field inside a shadow root can be set at all. On a page with a saved zoom a click lands where it was asked. On Linux behind a SOCKS proxy real sites see WebRTC working, and the check that used to skip that case now fails if the srflx is missing.

This version does not run on firefox-34, and earlier versions do not run on firefox-35. Verified on the published firefox-35: full e2e on Windows and Linux, transport parity with retail Firefox 151, and the canonical WebRTC/geo sites through a real proxy on both.
2026-10-03 05:13:29 +02:00
Federico ca4c55ac55 The two-tab rhythm e2e judges a timeline that load cannot rewrite (#272)
The e2e that checks two tabs of one session type with two rhythms failed on loaded CI runners with a correct build. It typed "hello", whose two plans differ by about 0.4 s over four intervals, while four browsers on four CPUs delay a single key by up to 480 ms: the tab with the faster plan then sat nearer the other one. Measured on Linux, no tab ever got the other tab's page number (0 of 440).\n\nIt now types "helloworld", whose plans differ by about 5 s, judges the pause and the intervals as one timeline with the median offset taken out, and requires the plans to differ by more than twice the worst delay measured. Under the same load: 12 of 12 green, and the defect it exists for (every page numbered from 0) caught 12 of 12.
2026-10-02 21:13:26 +02:00
github-actions[bot]andfeder-cr bb336142f2 record 0.25.8 as published (#271)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-10-02 19:05:58 +02:00
Federico 6288d90719 The pin moves to core 34.32.0: a Linux headless session starts on its own display (#270)
On Linux a headless session could land on another session's virtual display, or on an Xvfb that had died opening its sockets, because the display counted as ready as soon as its lockfile existed; the browser then failed with cannot open display. invisible-core 34.32.0 waits for Xvfb's own report and keeps the display off the network. Same engine (firefox-34).
2026-10-02 18:05:28 +02:00
Federico 6d9b01a0ce A typist's pause before the first key, a rhythm per tab, and delay on every key path (#269)
Three things a page can measure about how this package types, fixed where they happen.

fill and press_sequentially focused the field and pressed the first key a few milliseconds later, which no hand does, and a page that answers the focus a moment later wrote over the text that was arriving. With humanising on, the session's typist now pauses for one of its hesitations after the focus, starting again whenever the field changes, for no longer than the action's timeout. The spread of a hesitation is one field of the typing persona, and invisible_playwright.hesitation() exposes the pause for acts the package does not perform itself, so a caller no longer imports private names.

The counters behind the pause, the key intervals, the click hold and the drag lived on each page and started again on every new one, so with one seed the first field of every tab was typed the same way. They now belong to the session: page number plus a count per page, as the client cursor already did.

delay on page.type, locator.type, press_sequentially and press was accepted and dropped (locator.type("abcd", delay=150) went out 6, 10 and 22 ms apart); one reader now takes it off the wire for every key operation.

The keystroke timing guide said the rhythm is not seeded; it is, within one call, and the page now says so.
2026-10-02 16:07:22 +02:00
Richard PowellandRichard Powell c61e4d73a9 Nested frames, document navigations, fill('') and hidden inputs work (#263)
Four fixes that touch the same server code, landed together:

- Nested and cross-origin frames: inner_text, bounding_box, select_option, scroll_into_view and wait_for_selector read the frame the locator resolved to instead of the top one; parent_frame and frame_element() work. A humanized click inside a nested frame or a shadow root no longer lands on the exact centre every time: the landing point is checked in the element's own document, through one hit test.
- expect_navigation() and wait_for_url() no longer crash on a new document: the navigated event omits a request it does not have instead of sending null, and goto stops emitting a second navigated of its own. A same-document navigation (pushState, hash change) now reaches the client, so page.url follows it and wait_for_url wakes up.
- fill('') and clear() empty the field with a Delete keystroke, as upstream does, instead of selecting the text and leaving it there.
- set_input_files, focus, blur and dispatch_event act on an element with display:none instead of timing out on a missing box, and set_input_files uploads an in-memory payload instead of clearing the input.

Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
2026-10-02 13:37:12 +02:00
github-actions[bot]andfeder-cr 321809009a record 0.25.7 as published (#261)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-25 15:41:50 +02:00
Federico f8b80c40b5 goto returns on pages that redirect themselves, and the browser's output is read for its whole life (#259)
goto on YouTube (`?themeRefresh=1`), on Reddit's JavaScript challenge, and on
any page that calls `location.replace` before `load` timed out after 45 s on a
page that was ready, while stock Playwright 1.61 answered in 2 to 4 s on the
same Firefox 151 and on Chromium. Such a page starts a new navigation after
ours has committed; our navigation never reaches `load`, and `wait_for_state`
accepted only the states of our own navigation id. The guard exists for a real
defect, the previous document's states being taken for ours (2026-08-27), but
that one is about navigations from BEFORE ours. The frame now numbers the
navigations it sees, and the wait accepts ours or one that came after it:
Reddit 5.8 s and YouTube 3.4 s on the fixed client. Two unit cases, one per
side of the line, and an e2e against a local page that replaces itself; three
mutations caught, and the old guard reproduces the YouTube message exactly.

The browser's stdout and stderr share one pipe, read only until the readiness
line. Once Firefox had written a pipe buffer's worth after startup, its next
write blocked and the browser stopped answering with no error: forced with
`devtools.console.stdout.content`, 2 KB still answered and 8 KB never did,
5085 bytes sitting unread. ProcessOutput is now the one reader, for the whole
life of the process, keeping the last 200 lines; readiness is a question asked
of it. When the pipe closes mid-session the error now carries the exit code
and those lines, not only "the pipe is closed". Unit tests on a real OS pipe
and an e2e writing 64 KB; the reader that stops at readiness makes both fail.

The pin moves to invisible-core 34.31.0 (GeoIP under a non-ASCII path, Windows
ARM64). Version 0.25.7. Full e2e: 231 passed, 3 skipped.
2026-09-25 15:15:51 +02:00
Federico b562cb8078 The README opens with what Playwright gets and what this one runs on, in two lines (#260)
The subtitle was two sentences of forty-four words that changed subject three
times. Now it says the thing the way the MCP server's README does: what happens
to Playwright, what this one is, and that existing Playwright code works. Free,
open source and the detection suites stay where the hero shows them.
2026-09-25 15:07:46 +02:00
github-actions[bot]andfeder-cr 7717bd6f3e record 0.25.6 as published (#258)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-25 10:48:45 +02:00
Federico bf77af0198 The engine starts under Claude Desktop: the pin moves to core 34.30.0 (#257)
Claude Desktop on Windows is an MSIX package, and so is the Microsoft Store
Python. Files written under AppData by a packaged app's processes really land
in the package's own LocalCache folder, and the engine downloaded there could
not be started from the AppData path: `[Errno 14001] ... side-by-side
configuration is incorrect`, because Windows looks for `mozglue.dll` where the
file really is. Every session of the MCP server under Claude Desktop failed at
its first `browser_open`. Reported in discussion #256; issue #22 was the same
failure under the Store Python.

The fix lives in invisible-core 34.30.0: `verify_engine`, which every launch
route in this package already goes through, hands back the path the file
system reports. Nothing in this package's code changes. The core's CI now
downloads and launches the engine inside a registered MSIX package on every
push.

Version 0.25.6.
2026-09-25 10:26:45 +02:00
github-actions[bot] 609c22fe8d record 0.25.5 as published (#255)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-09-23 20:48:18 +02:00
Federico a1f28bd774 The README is checked for promises no measurement supports, on every change (#254)
A sentence in this README promised to beat everything until 2026-09-22 ("it
passes every bot detection test"), and the check that found it ran by hand from
outside the repository, after the text was public. It is invisible_core.claims
since core 34.29.0, and a new `claims` job runs it with its selftest first, the
same shape as the language gate. `gate` waits for it and refuses on its failure.

What it reads is the README, which is also what PyPI shows; a circumvention claim
on its own stays allowed and is only reported. On this README today it reports
three and refuses none.

The pin moves to invisible-core 34.29.0 and the version to 0.25.5. No runtime
change in this package.
2026-09-23 20:29:03 +02:00
Federico 7529122385 The headline says what happens, and it no longer promises to beat everything (#253)
Two defects in one sentence, and the second is the serious one.

"it passes every bot detection test" is an absolute over an unbounded set. Nothing can pass every test, and this README already shows the measured figure two lines below, in the hero image whose alt text reads "5/5 detection suites passed". A claim the product cannot support is forbidden on grounds of truth rather than of rule, and a promise that big returns the traffic it attracts. The sentence points at that proof now instead of exceeding it, and the figure is not repeated in prose: the image is where it lives, and a number written twice goes stale in one of the two places.

Both halves were also noun piles with no verb, so a reader had to assemble the product from a list before learning that they write ordinary Playwright code and it runs somewhere undetectable. The action leads now.

Nothing about the circumvention claim changed: bypass, undetected and captcha are all still here, which is the owner's standing decision, and the account-wide scan reports the same pairing for this field as before. What changed is the absolute beside it.

Counted rather than judged: 0 fragments without a predicate where the old one had 1, and 15 of 15 keywords kept. Merged with all 14 checks green. The name scan and the disclosure scan were run by hand on the push range, because a pre-push from a worktree skips both.
2026-09-23 10:35:31 +02:00
github-actions[bot]andfeder-cr 9e9bda4e07 record 0.25.4 as published (#252)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-22 00:17:05 +02:00
Federico c937930b31 The pin moves to the core where the attempt count belongs to the caller (#251)
34.28.0 takes the retry out of the shared download primitive and makes it a
parameter: the engine download keeps its three attempts, and the geoip
refresh asks once when it has a cached mmdb to fall back on and three times
when the cache is cold. Without this the refresh inherited the engine's
policy and would have spent ten seconds of backoff at session start reaching
a fallback it was taking anyway. Nothing in this package changes beyond the
pin; same engine, firefox-34.
2026-09-21 23:58:05 +02:00
github-actions[bot] d187e3683f record 0.25.3 as published (#250) 2026-09-21 20:12:51 +02:00
Federico cb3ca7846c The pin moves to the core that asks again on a transient download failure (#249)
invisible-core 34.27.0 retries the failures that mean ask again when it
fetches the engine: nothing in the package had ever asked twice, so a 504 on
the 262 MB archive ended the install, on a runner and on the machine of
anyone whose first use landed on one. Nothing in this package changes beyond
the pin; same engine, firefox-34.
2026-09-21 19:57:15 +02:00
github-actions[bot] 850b4d63ea record 0.25.2 as published (#248) 2026-09-21 17:57:41 +02:00
Federico 3b6101ad37 build_env verifies the font manifest against the executable and delegates the rest to the core (#247)
It was a twin of the core's launch.build_launch_env: TZ, the WebRTC
declaration, the manifest variable and, since 0.25.0, the hidden surface's
launch_env() with its removals, all written twice. The only thing here that
needs the executable is the manifest check; everything else is composed by
the core (34.26.0), so there is one place that knows what the browser is
launched with. The three environment-variable constants that only this
function read are gone: the strings of the binary contract live in the
composer. Same environment on the wire, which the existing tests assert.
0.25.2, pinned to the core that carries display_env.
2026-09-21 17:33:22 +02:00
Federico f8661f0a8c The Linux e2e reads the environment of the browser it launched (#246)
The Linux e2e reads the environment of the browser it launched

The e2e that ran under xvfb-run was green over two real defects: a headed
session opened while an Xvfb session was alive was born on the Xvfb (B221),
and once that was fixed the hidden browser still carried WAYLAND_DISPLAY.
A page renders on any display, so opening one sees neither. This test reads
/proc/<pid>/environ of each Firefox it launches: a headed control on the
caller's DISPLAY, a hidden session on its own Xvfb with X11 pinned and the
Wayland variables absent while os.environ stays untouched, and a headed
session opened beside the hidden one still on the caller's DISPLAY. Measured
against the v0.25.0 tree it is red on the Wayland variable; on main it is
green. Tests only.

The Linux e2e finds its own browser by a mark, not by counting processes

In CI the e2e runs under xdist with four workers, each a process launching
Firefox at the same time, and the first cut of this test asked for the one
new Firefox and saw two. Counting was the wrong question. Each arm now sets
INVPW_TEST_MARK in this process before launching, the browser inherits it
the way every variable travels into its environment, and the assertion reads
the one Firefox carrying that mark. Green alone and under two workers with
other browser-launching files beside it.
2026-09-21 16:52:34 +02:00
github-actions[bot] 4cc4cc1979 record 0.25.1 as published (#245) 2026-09-21 16:08:29 +02:00
Federico 822bd50811 A launch environment the caller names is the whole environment (#244)
The in-process Juggler server added the named variables onto its own
process environment, so a variable build_env had removed came back from
os.environ: measured on 0.25.0 from the index, a headless=True session on
Linux was born with WAYLAND_DISPLAY still set (/proc/<pid>/environ), and
only GDK_BACKEND=x11 kept it off the real desktop. The server now hands the
engine exactly what was named; naming nothing (a bare launch) still
inherits, because a browser with no PATH and no SYSTEMROOT starts and then
cannot reach the network. Two tests: the composition with its known-bad
merge, and the handler handing that environment to the engine. 0.25.1.
2026-09-21 15:35:25 +02:00
github-actions[bot] a76e01fada record 0.25.0 as published (#243) 2026-09-21 15:25:23 +02:00
Federico ea8d049d6a build_env applies the None half of launch_env(), and the pin moves to 34.25.0 (#242)
On Linux the Xvfb display no longer travels through os.environ: the core's
launch_env() names the variables the browser must carry and, with None, the
five Wayland ones it must not. build_env sets the former and drops the latter
on the session's environment only, so a headed session opened while an Xvfb
session is alive in the same process is born where it was asked to be.
The known-bad input is the update() this replaces, which would hand the
subprocess a None value and keep WAYLAND_DISPLAY. 0.25.0, pinned to the core
that carries the contract, on the same engine (firefox-34).
2026-09-21 15:08:19 +02:00
github-actions[bot] 0f0d4ffcc2 record 0.24.0 as published (#241)
The changelog entry now carries the date the index served 0.24.0, 2026-09-21, which is what the release e2e compares it against.
2026-09-21 13:51:47 +02:00
Federico 47e71541a5 The pin moves to the core that seals firefox-34 (#240)
invisible-core 34.24.0 resolves the first engine whose window capturer reads
a hidden window from its own desktop, which is what the 0.24.0 screencast of a
headless=True session on Windows relies on. CHANGELOG 0.24.0 already names
that engine as a requirement; this is the pin that enforces it.
2026-09-21 08:10:14 +02:00
Federico a86ac08ca7 The environment block spells its NUL terminators with chr(0) (#239)
A control character inside a string literal is what the workbench's literal
gate hunts, because that is how a backslash escape corrupts a Windows path;
the two NULs of the CreateProcessW environment block are deliberate, so they
are spelled with chr() and a comment, which is the form that gate accepts.
Same bytes on the wire: the hidden-desktop and first-launch tests still pass.
2026-09-21 03:28:32 +02:00
Federico e151bb8a3e headless=True on Windows creates the browser on a hidden desktop (#238)
The Windows spawn names the hidden desktop the core created, and the cloak layer is gone

`headless=True` on Windows now creates the browser on the hidden Win32
desktop that `invisible_core` makes for the session. `_spawn_windows` is a
`CreateProcessW` in `ctypes` with `STARTUPINFOEXW`: `lpDesktop` is the one
field `subprocess.Popen` cannot set, so the call is ours, with the same
`PROC_THREAD_ATTRIBUTE_HANDLE_LIST` as before - exactly four handles are
inherited, the two Juggler pipe ends, the child's end of the stdout pipe
and a NUL for stdin - and `_WindowsProcess` gives `Connection` the four
verbs it asked of `Popen`. One spawner for both modes: with no desktop
named, `lpDesktop` stays NULL and the browser is born where the caller is.

`build_env` applies the session's `launch_env()` over a cleared slot, so a
headed session never inherits another session's desktop through
`os.environ`. `build_prefs` loses `headless=`: it selected the cloak layer
and selects nothing now; `virtual_display` is the fact that remains, and
with it the two sandbox keys measured in 2026-05 for exactly this desktop.

The screencast is refused, with the reason, on a hidden-desktop session:
from there the window capture starts and delivers no frame (measured 0 in
15 s against firefox-33, where the same window on the visible desktop gives
93 in 4 s), because the compositor only composes the active desktop. A
refusal that names the cause is the same choice the engine makes for true
headless; a silent black stream is not. `page.screenshot()` is unaffected
and `headless=False` keeps the screencast. Tracked as [B220] in the
workbench; the fix belongs in the engine's window capturer.

`tests/test_cloak.py` is replaced by `tests/test_hidden_desktop.py`, which
also carries the control arm the old guard lacked: a headed window is found
on the interactive desktop before a hidden one is asserted absent from it.
The two public docs pages that described the cloak describe the desktop.

0.24.0, pinned to invisible-core 33.24.0.

The screencast of a hidden session is the engine's to deliver, and the gate asks for it

The refusal of `screencast.start()` on a hidden-desktop session goes, and
so does the `hidden_desktop` flag it rested on: the frames were never the
wrapper's to withhold. They were missing because the engine's cropping
capturer cropped a visible window from the screen, which shows the input
desktop only, and moved the capture thread there for good; firefox-34
keeps a window that lives on another desktop on the window capturer,
whose `PrintWindow` reads it in full from its own desktop. Measured on the
fixed build with a seal of its own: both screencast tests green with
`headless=True`, where firefox-33 gave no frame in 15 s.

`tests/test_hidden_desktop.py` now asks for a frame from the hidden
session, so the engine's release gate proves the capability on every
Windows build. The two screencast tests are back to `headless=True` on
every platform. The CHANGELOG names the engine this release requires.

The std handles the spawner hands Firefox are shaped for its launcher

`tests/test_first_launch_from_a_new_path.py` went red on the ctypes spawn:
the launcher recorded a start and the browser never did. The tree showed
why - python -> browser, no launcher in between - and the Event Log said
where: the launcher's own `CreateProcessW` failed with
ERROR_INVALID_PARAMETER (`LauncherProcessWin.cpp:580`), so it disabled
itself for that path (`|Browser` = 0) and ran on as the browser.

The launcher builds a handle list from its stdin, stdout and stderr plus
the Juggler pipe (`ProcThreadAttributes.h`): it forwards only DISK and PIPE
handles, silently drops the rest while still naming them as std handles,
and never de-duplicates, and Windows refuses a handle list that holds the
same handle twice. The first draft passed a NUL device for stdin and one
handle for both stdout and stderr. `Popen` never tripped it: CPython
duplicates every std handle separately.

stdin is now the read end of a pipe whose write end is closed at once (EOF,
and a PIPE type), stderr its own duplicate of the stdout pipe: five
inherited handles, all distinct. Measured on the fixed build: first launch,
hidden desktop and both screencast tests green, and the launcher chain is
back, python -> launcher -> browser.
2026-09-21 00:55:46 +02:00
Federico aa8dca67c6 The release gate reads the e2e it never looked at (#237)
The gate that decides whether a release goes out runs `python -m pytest -q`,
which is the DEFAULT selection, and the default selection deselects `e2e`. So
the browser-driving suite has never been part of the decision: it runs on every
push and every pull request, and no gate reads it, so a red there stops neither
a merge nor a tag.

That is not hypothetical. 0.22.1 was tagged from a main whose e2e was red, and
nothing said so because nothing was looking. It is the same shape as the
`-m unit` false green the project forbids elsewhere, sitting inside the workflow
that publishes.

The new step ASKS rather than re-runs. The e2e has already run on that commit,
and running it again here would cost five minutes to learn what one API call
answers. What was missing was not a second measurement: it was somebody reading
the first one.

Three verdicts, and the middle one is the one that gets written wrong. A
check-run that concluded badly refuses, naming it. A leg still running waits,
then refuses on the deadline rather than assuming. And NO e2e check-run for that
commit refuses too: an empty list reads the same whether the job was renamed,
never started, or was never configured, and mapping it to a pass turns the gate
into decoration exactly when it matters. A gate that cannot read the checks at
all, for a missing token or an API error, refuses for the same reason.

The verdict is a pure function of the check-runs, so its ten known-bad cases
need no token, no repository and no network, and the workflow runs them before
trusting it. Measured against four real commits as well: a green one passes, a
red one refuses naming the leg, the repository's first commit refuses as absent,
and no token refuses.

Why now and not earlier: this was deliberately left open while the e2e was
intermittently red for a real reason, because a gate that says no at random
teaches people to go around it. That reason was the pointer teleporting under
load, and it shipped fixed in 0.23.0.
2026-09-20 03:24:14 +02:00
github-actions[bot] 3c44f046f4 record 0.23.0 as published (#236)
The upload succeeded and the ledger could not be pushed to main directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.
2026-09-20 02:55:38 +02:00
Federico 2992056827 A pointer action that did not reach its element says so (#235)
A pointer action that did not reach its element used to return as if it had. The hit target is checked before the action and, on purpose, the geometry is never re-read after it, so a target that moved in between produced no error, no event on the element, and a caller told "done". On a moving target that was hover 2 silent misses out of 8 and click 8 out of 8.

Now the engine records where each event landed, at dispatch, and the driver asks after every commit: a miss raises ActionMissed and is not retried, because a press cannot be taken back. The question carries the id of the last event sent and the engine waits for the renderer's ack of it, since a mousemove is coalesced and dispatched at the next refresh tick, after a question sent right behind it. The e2e job also checks the protocol mirror against the pinned engine now; it had drifted four commands behind with the count test green.

Pins invisible_core 33.23.0 (engine firefox-33), which this change requires. Supersedes #233: that pin, firefox-32, delivered the drag but under load failed clicks more often than the engine before it, measured on the same runners the same day. Also carries the fix to the hover assertion that depended on where the pointer already was.
2026-09-20 02:24:28 +02:00
github-actions[bot]andfeder-cr 93d243c8e9 record 0.22.2 as published (#231)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-18 21:29:26 +02:00
Federico 7f2f42310d The version this reports describes the code, not the install record (#230)
`__version__` said 0.16.2 from a tree declaring 0.22.1, minutes after that
checkout had been brought to zero commits behind origin/main.

It came from `importlib.metadata.version("invisible-playwright")`, which answers
about the distribution the installer put there. For a wheel that is the same
artifact as the code. For `pip install -e` the metadata is written once and the
code keeps moving, and nothing says the two have parted. Pulling does not touch
the record, so this is a defect in the code and not a stale checkout.

This is the package a measurement names. Every bench that drives a browser
reports "measured against invisible-playwright X", and read from the program X
was the moment somebody ran `pip install -e`, not the code under test. A finding
was about to be written with a version six releases wrong; it survived because
its author had read the number off the tree instead, which is luck rather than
method.

So the version of the code is now: the install record for a normal install,
because the metadata and the code came out of the same build; the version the
source tree declares for an editable one, plus a `+editable` local segment so a
tree that can carry uncommitted work is never read as the published release of
the same number. Which of the two an install is comes from what the installer
wrote (PEP 610 `direct_url.json`), not from a guess about `__file__`.

The record stays, under a name that cannot be mistaken for the version, the way
`invisible_core` already names it. This is deliberately not a shared module: the
core derives from the seal it PACKAGES, which is a different reading, and
`aihawk` carries this same one for the same reason, noted in both so a
correction to one is looked at in the other.

Three tests moved, and why matters more than that they did.

`test_version_matches_installed_package_metadata` asserted the equality that is
now wrong, under a docstring saying the point was that the version can never
drift from the `pyproject.toml` field. The assertion never held that. It was
true of the install record all along, which is the fact it was really about, so
it now asserts that under the record's own name, and what the docstring wanted
is held against real `pip` installs in the new file.

The `--version` and `-V` arms spawned a subprocess, which does not inherit
pytest's `pythonpath`, so they tested whatever was installed rather than the
code under test. In CI the two coincide because the workflow installs this
repository editable; from a worktree they do not, and the arms went red against
a checkout they were never meant to measure. They now put this package's `src`
on the subprocess path.

0.22.2, and the repository had to tell me: I first left the number alone so the
drag regression being fixed in parallel could have it. That is not an option
here. `test_the_declared_version_is_not_already_published` refuses a change to a
file that goes into the wheel while `pyproject` still names a version the index
already serves, because a release from there publishes nothing: `publish.yml`
sees the version, reports a no-op rather than a failure, and skips everything
below it. Keeping the number free would have made this unreleasable instead.

Six known-bad mutations, six killed, including the whole previous
implementation put back and a wheel arm that keeps the remedy from consulting a
tree that is not what runs.
2026-09-18 21:07:27 +02:00
github-actions[bot]andfeder-cr 314b9b6cc9 record 0.22.1 as published (#229)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-18 04:22:32 +02:00
Federico cf8c3f8303 A click is delivered once, whatever the click does to the page (#228)
* A click is delivered once, whatever the click does to the page

One `browser_click` could hand the page thirty-nine clicks and then report
the action failed. On a control that stays put it did the action twice and
reported success. Measured on the published 0.22.0, three buttons on one page
differing only in what their handler does, thirty calls each, with the page
counting what it received:

    does nothing        30 calls ->   30 clicks, 30 reported success
    moves itself        30 calls ->   30 clicks, 30 reported success
    hides itself        30 calls -> 1068 clicks, 30 reported FAILURE

and, on a real sessions panel, one call produced two complete gestures 167 ms
apart: opened by the first, closed by the second, success reported.

The discriminant is not movement. It is the target ceasing to be hittable BY
ITS OWN EFFECT - a modal's close, a cookie banner's accept, a menu item, a
"load more", a submit that becomes a spinner.

`_with_hit_target` read the hit target before the action and again after it,
and raised `WrongHitTarget` on both. `_retry` absorbs that exception by
starting over, and starting over presses again.

The conclusion outlived its premise. Until 0.18.0 the mechanism was an
interceptor: it watched each event as it arrived and BLOCKED the ones whose
point had stopped belonging to the element, so a bad verdict meant nothing had
happened and retrying was free. 0.22.0 replaced it with two pure reads, for a
good reason - the block was a tell, since a real `mousedown` that vanishes
under `preventDefault` is not something an input stack produces - but kept the
retry semantics, which now mean "it happened, do it again".

And the read afterwards cannot answer the question it is asked. Once the event
has gone out, "the point stopped belonging to the element" is the same
observation for a click that missed and for a click that worked and moved the
control out from under the pointer. A check whose negative result carries no
information cannot gate anything, so it is gone rather than narrowed.

What replaces it is one read, between the approach and the press.
`_act_on_target(f, element, point, *, approach, commit, force)` makes the two
halves explicit: for `hover` the committing event is the move and there is
nothing to approach; for `click` and for `check`/`uncheck` the approach is the
move and the commitment is the press.

The read also moved AFTER the approach, which is where the race is. It used to
run before the pointer moved, so a page that rearranges itself on hover - a
menu opening under the cursor - was judged in the layout from before the thing
that changed it. What is left is one round trip between the read and the press.
Closing that one belongs to the engine, the only place that can verify and
dispatch without a gap; it is not closed by reading the DOM again afterwards.

`_retry` now carries the invariant in writing: starting over is sound only
while nothing has happened, and nothing may raise `WrongHitTarget` after
committing. An action with something to say about what it did says it in its
result, because a retry loop cannot un-press a button.

Four known-bad mutations, all killed, including restoring 0.22.0's exact
behaviour. `test_hit_target_check.py` holds the shape - one read, in that
order, nothing after the commit - and the new `test_a_click_is_delivered_once.py`
holds the consequence on the real path, with a control arm for a button that
does nothing so the other two cannot pass on a driver that never presses.

Verified against a real browser on the same bench that found it: 30 calls ->
30 clicks, 30 successes on all three buttons, and the time per call down from
15-16s to 0.1-1.5s. Four controls of a real interface that were red for this
cause went green with nothing else changed.

Suite: 707 passed, 7 skipped. Lint and `invisible_core.english` clean.

* 0.22.1
2026-09-18 03:58:03 +02:00
github-actions[bot]andfeder-cr 6c8c66aec8 record 0.22.0 as published (#227)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-17 22:26:55 +02:00
Federico 31969d5e3b the screencast rate bench measured the runner with one arm and blamed the product (#226)
It went red on CI and blocked the merge of the 0.21.0 ledger PR, which carries
nothing but PUBLISHED.json. The numbers say the opposite of the verdict: 5
frames a second asked delivered 15 in three seconds, which is 5.0 exactly and
is the cap being honoured; 25 asked delivered 22, which is 7.3 and is a loaded
runner's ceiling, not an answer about the lever. The identical commit was green
seven minutes earlier and a re-run on the same SHA was green again.

The shape was wrong, not the threshold. Only ONE of the two arms is limited by
what it asks for; the other measures the machine, so `fast > slow * 1.5` was an
undeclared requirement that the host deliver 7.5 frames a second. Asking for 2
instead of 5 moves that requirement to 3, which no machine that can run a
browser will miss.

And the half that does not depend on the machine was the one nobody checked. A
cap only ever pushes the rate down, so "asking for 2 delivers about 2 a second"
is answerable however slow the host is, and it is the assertion a disconnected
lever fails first, because then the slow arm runs at the machine's maximum too.
It is asserted now, so this is a stronger bench than before rather than a more
permissive one.

The failure message names the second cause as well, so whoever reads the red
can rule it out without repeating this investigation.
2026-09-17 22:15:29 +02:00
Federico b6d24ebbbf strict refuses an ambiguous selector, force bypasses the checks it names (#225)
Two options accepted across the public API and read by nobody. The same count
that found `trial` named them: public signatures on one side, occurrences in
`_juggler/` on the other.

`strict` is the expensive one, because nobody passes it by hand. The chain
implemented it end to end except for one link: `injected.query_selector` takes
the parameter and the injected script raises `strictModeViolationError` on more
than one match, but no caller of `Actions._retry` forwarded it, so the default
stayed false. The callers that matter are not users - they are the 28 Locator
methods that send `strict=True`. With two buttons on the page,
`page.locator("button").click()` clicked the first and reported success: the
automation acting on an element nobody had chosen, and saying nothing.

`force` bypassed none of the checks it promises to bypass. It now bypasses two,
the state checks and the hit target, because "receives events" is one of the
checks the option names and an overlay intercepting the pointer is the ordinary
reason somebody passes it. Honouring only the first half leaves the option
indistinguishable, from the caller's side, from doing nothing.

The origin is not the options, it is the SHAPE of the reader: one reader per
option. Seven copies of `params.get("trial")` next to zero copies of the other
two is how the eighth action gets written with one and without the others. So
`_act_opts` reads all three together, actions take `**opts` and hand it to
`_retry` - the only thing that knows what actionable means - and the handle
operations go through `_act_args`, which carries the options inside it.

The test that matters most does not check an option. It checks that one cannot
be lost: it derives from the code which actions accept the bag and requires
every operation reaching one of them to hand it over, working out for itself
which helpers carry it rather than listing them. Run against the product it
immediately found six handle-level operations the hand-written wiring had
missed. Five known-bad mutations, five killed.

`no_wait_after` was grouped with these two and is not a defect: upstream
declares it deprecated and without effect, so a client that ignores it matches
upstream rather than departing from it.
2026-09-17 21:53:41 +02:00
github-actions[bot]andfeder-cr 1c4d8859ae record 0.21.0 as published (#224)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-17 20:30:56 +02:00
Federico b09d23c05b go_back() and go_forward() come back: the stale handle was ours, not the engine's (#223)
0.18.0 withdrew them because a restored page broke every locator afterwards
while evaluate() kept working, and the cause was read as the engine's bookkeeping
for a restored world. It was not. Instrumenting the client showed the destruction
events arriving, in the right session, and being taken: the engine destroyed
contexts id-16 and id-17, this client believed the frame's worlds were id-14 and
id-15, no entry matched, nothing was dropped, and the next locator sent an
objectId minted in id-15 to a frame whose worlds were now id-20 and id-21.

The injected script was cached per FRAME. It is an object inside one execution
CONTEXT, and a frame outlives its contexts: every navigation replaces them and so
does a restore. So the handle is stored with the context it was minted in, and
handle() asks whether that context is still the frame's utility context. The
question is decided from state this client already keeps, instead of being
inferred from destruction events arriving complete and in order, which on a
restore they do not. Nothing is dropped on destruction any more; there is nothing
left to get wrong.

The test walks back, forward and back again and reads THROUGH A LOCATOR each
time, with one locator before the first movement so the bench arrives holding
something. One movement is green against the defect, and so is asserting on the
URL, and the two earlier tests did one of those each. Proven red against the
previous client and green against this one.

WITHDRAWN is empty again and stays declared, for the next operation that is
written and cannot be trusted yet. The README and the bfcache page stop saying
the two are held back.
2026-09-17 19:57:07 +02:00
github-actions[bot]andfeder-cr 97bf5ddf94 record 0.20.0 as published (#222)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-17 19:04:24 +02:00
Federico c6c38ab327 The injected script leaves nothing on the page's nodes, and now something checks (#221)
The half of this class that concerned the page's window was closed in 0.19.0.
This is the other verb: what the bundle WRITES on elements. `computeAriaRef`
sets `element._ariaRef` while building the accessibility tree, reachable only
through `mode="ai"`, and the question underneath had never been answered - does
an assignment made through an Xray stay in the sandbox, or reach the page's
node?

Measured against a page served from 127.0.0.1 that watches its own elements with
its own script: it stays. With mode="ai" the snapshot comes back carrying 8 refs
and the sandbox sees `typeof el._ariaRef === "object"`, while the page sees
nothing at all. So nothing was broken and nothing is being fixed here.

The gate exists for the day that stops being true. If the confinement ever
fails - a Gecko change, or the injected script built somewhere that is not an
Xray sandbox - every interactable element in the document would carry a property
any page can enumerate, and nothing would say so.

It asserts that the writing branch was REACHED before it believes the page is
clean: refs in the snapshot, and the expando visible from the sandbox. Without
that it would be green on a build where nothing was written, which says nothing
about confinement.

Five known-bad mutations, four killed. A write that goes THROUGH the Xray is
caught, and so is one that lands on the page's prototype - which is why the
watcher keeps two ways of looking instead of one. The fifth removes a redundancy
rather than describing a fault, and the test says so.

The watcher's own control used to read with a different instrument than the
verdict, so blinding the verdict left the control still reporting that it could
see. A mutation found it. It is one function now, called twice.
2026-09-16 22:52:56 +02:00
github-actions[bot]andfeder-cr a00b421298 record 0.19.0 as published (#220)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-16 22:40:11 +02:00
Federico ab5f6a98b0 A drag travels now, and the pacing rules left the async loop they were welded into (#219)
One measured defect held three, and only one of them was about stealth. The
whole of drag_and_drop was five events: the 480-pixel journey happened in ONE,
the two events carrying it were identical and 7 ms apart, and on a draggable
source it raised NS_ERROR_FAILURE and left the mouse button DOWN, so every
later event lied about it. All of HTML5 drag and drop was unusable and nothing
said so, because there was no end-to-end test of a drag at all.

The reason the drag never moved like everything else is structural. The
delivery rules - absolute deadlines from one t0, drop rather than send late,
never two events in one instant, the 8 ms floor, the viewport clamp - lived
inside an async loop in _cursor, so only something that can await could run
them. A drag is generated in the in-process Juggler server, which is
synchronous. Writing them a second time in synchronous form would have left two
definitions of one thing, so they moved into _pacing as a state machine with no
clock: Pacer decides what happens next, and the two drivers decide how to wait.

The path generator needed nothing: CursorMotion.path is already pure and
synchronous. It had a missing consumer, not a missing capability.

The motion budget travels too, under the same condition as the seed, so
humanize=<seconds> caps this movement as it already capped every other one.

Measured on the same page: 3 move events over 2 distinct points became 27 over
26, and the gesture completes instead of raising.

What this does NOT fix: the drop still never reaches the target, in this path
and in a hand-composed one alike. The docstring that claimed otherwise is gone.
2026-09-16 20:55:29 +02:00
Federico 1a46abb6b8 A click has a duration, and the transport carries the seed rather than a persona (#218)
Same class as the keyboard, one device over: a press with no duration is a press
no hand made. mousedown and mouseup left together, so what a page measured as the
hold was 8.0 ms - measured on a real page, four clicks - against the 60-120 ms a
finger takes. The number differs from the keyboard's 4.0 ms because they are
different commands, which is why each was measured instead of derived from the
other.

The double click had the matching defect one level up: its two presses had
nothing between them and were still delivered as a dblclick, because that event
is born from clickCount and not from the interval. A page therefore received a
double click no operating system would have accepted as one - an event that
existed only because we declared it.

Three fields join PointerPersona and plan_click has the same shape as
plan_typing: a (dwell, gap) pair per press, the last without a pause because the
wait after a click belongs to whatever happens next. delay= was dropped here too,
alongside button and modifiers before it; Playwright documents it as the wait
between mousedown and mouseup, so it is the override now rather than the only
rhythm available.

The new fields are appended to from_seed and that is load bearing. It draws in
order from one stream, so a field inserted above an existing one would shift
every draw after it and change what every existing seed produces, silently, for
a property this package documents. Verified against the previous release on
three seeds: the other fields are unchanged.

And the transport now carries the SEED instead of a ready-made persona, which
the second consumer settled. It carried a TypingPersona while the keyboard was
the only thing that wanted a rhythm; then the click wanted one from a DIFFERENT
persona drawn from the same seed, and a transport carrying built objects would
have grown a field per rhythm while the thing that is actually session-scoped
stayed one number. Personae are built where they are used.

Eight unit tests and one e2e. The known-bad input is a plan that answers zero,
and it kills four of the eight plus the e2e, which reports "median hold was
8.0 ms" under mutation.
2026-09-16 19:37:43 +02:00
Federico e28658a75a The keyboard gets an owner of its rhythm (#217)
A keypress was two protocol messages back to back, so a page measured the hold
of one key at 4.0 ms - measured on a real page, not estimated - against the
60-120 ms a finger takes, and eleven characters went by in about 50 ms. No probe
is needed to collect that: a site only has to listen, and a password field is
where the listening is already installed. The pointer has had an owner of its
rhythm since 0.4.0; the keyboard had none.

delay= was not the fix, for two independent reasons. The server dropped it on
six of the seven paths that accept it. And the seventh, the only one that
forwarded it, handed the number to time.sleep as if it were seconds while the
public API documents milliseconds, so type("abc", delay=100) waited five minutes
instead of 0.3 seconds: the six broken paths were accidentally protected from
the bug the seventh had. The unit is in the name now, which is the origin of
that class rather than the conversion. And even working, delay= is a constant
the caller picks, so every install passing the same number would share one flat
rhythm - the linkage key 19-cursor-signature.md is about, moved to the keyboard.

TypingPersona sits next to PointerPersona and has the same shape: every field a
range, because the centre is an estimate and the width is the admission that
people differ. It models the dwell as a log-normal around a MEDIAN rather than a
mean, because a human timing has a floor and a tail; the digram structure, where
alternating hands is faster than staying on one and a repeated key is slowest;
and occasional hesitations, which are what give the tail. plan_typing produces a
(dwell, gap) pair per character and the engine keyboard obeys it rather than
deciding anything.

The stream is tagged, and that is the part that could have broken a promise:
_sub_seed gives independent streams, so the new persona does not move a single
number an existing seed produces for the pointer. Verified against main on three
seeds.

How the seed reaches an engine client that has no seed, and the two shapes that
were rejected. A module-level value is wrong the moment one process holds two
sessions: the second would type with the first's hand. Deriving it from
zoom.stealth.fpp.hw_seed, which already travels, is wrong because that value has
about twenty possibilities, so unrelated sessions would share a rhythm - the
thing being removed. It rides in the launch prefs, which the launcher composes
in full and op_launch already receives, under a key deliberately outside the
stealthfox.* namespace because that prefix means the binary reads it; and
take_typing_persona takes it back out before user.js is written, so no session
identifier reaches the disk.

Twenty-five tests and one e2e. Four known-bad mutations, each caught by exactly
one test: flat digram factors, zeroed sigmas, a pop turned into a get, and the
seed removed from the prefs - that last one judged by the e2e, which reports
"median hold was 4.0 ms" under mutation.

Typing is now slower in real time, which is in the changelog where users will
read it before upgrading. The full e2e went from 373 s to 425 s.
2026-09-16 19:16:13 +02:00
Federico b7af7a0f02 trial=True stops the action (#216)
The parameter is accepted on 31 public signatures - click, dblclick, hover, tap,
check, uncheck, set_checked and drag across Page, Frame, Locator and
ElementHandle - and the word appeared nowhere in the engine client. It reached
the wire and fell off it, so a call whose entire purpose was not to click
clicked.

The single place that read it made the outcome worse rather than better: the
cursor wrapper took trial as a reason to skip the humanised approach and then
ran the action anyway, so the click went out with no pointer movement in front
of it, which is the most recognisable shape a click has.

It is honoured in Actions._retry. That loop is the only thing that knows what
actionable means, and trial is a statement about actionability: run the checks,
skip the act. Honouring it inside each of the seven actions would be the same
sentence written seven times, and the eighth action would be written without it.
The hit target is checked on the trial path too, because a trial that answers
yes and is followed by a click landing elsewhere has told the caller nothing,
and it costs one pure read. A drag checks both ends and dispatches nothing:
checking only the source would skip the half that actually fails.

Reading the parameter off the wire lives in one helper for the same reason.

Six unit tests and one e2e. The e2e is the proof that matters, because the unit
tests can only show the branch is taken: it counts clicks on a real page, and
under the known-bad mutation that removes the branch it reports one click after
the trial.
2026-09-16 18:20:26 +02:00
Federico f43f0a60a6 The hit target is checked, not intercepted (#215)
* The hit-target listeners live as long as the action, not as long as the page

Constructing the InjectedScript registered thirteen capture listeners on the
page's window and observed the document, for the whole life of that document,
to serve a delegate that the action path arms for the duration of one click.
That permanence is why the bundle also had to watch for a documentElement
replacement and announce itself with a CustomEvent on the page's window to
learn whether its listeners had survived - a probe a site could arm in three
lines.

The earlier fix moved both installations into the utility world. It removed the
COUNTABILITY, because the call then reaches the native addEventListener through
the Xray, which is why the traversal gate went to zero and the case looked
closed. The listeners stayed registered on the real window.

So setupHitTargetInterceptor now adds them when it arms and removes them when it
stops, and registers only the types of its own action instead of all twelve.
That changes no behaviour: the listener already returned immediately for any
type outside that set, so the other registrations could never do anything.
_setupHitTargetInterceptors, _setupGlobalListenersRemovalDetection,
onGlobalListenersRemoved, _allHitTargetInterceptorEvents and
_hitTargetInterceptor are gone rather than renamed.

The Python half was a defect of its own: stop() sat in the try of
_with_hit_target, so an action that RAISED never disarmed. An armed interceptor
whose result is not "done" calls preventDefault and stopImmediatePropagation on
the events that follow, so a click that timed out could go on eating a person's
next one. With the listeners tied to the arming, that leak became a listener
leak, so the guarantee is part of the fix and not a nicety.

tests/gates/injected_page_surface.js runs the real bundle against a window and a
document that record every access, and asserts three class properties rather
than looking for names: construction writes nothing to the page, every action
removes what it added, and no action registers the union of the interceptor
events. Construction went from 13 addEventListener plus a MutationObserver to 0,
and rewriting documentElement from one dispatchEvent to 0. Four known-bad
mutations, one per property plus a rename, all caught.

* Say why the extractor still expects a symbol the bundle no longer has

gen_injected_source.py fingerprints the bundle it extracts FROM, which is
upstream's and still carries _setupHitTargetInterceptors. Our removal happens
after, so the name belongs there - but a grep for the symbols that were just
removed lands on it, and deleting it would weaken a check on the extract. The
note says so, and names the gate that would catch a regeneration quietly
bringing the mechanism back.

Also renames a one-letter loop variable in the new gate's helper, the single
ruff finding this branch added.

* The hit target is checked, not intercepted, because the block was the tell

Tying the interceptor's listeners to the action removed their permanence and
left the reason they existed: blocking a real event. When the point had stopped
belonging to the element, the interceptor called preventDefault and
stopImmediatePropagation on a genuine mousedown. No input stack produces a
mousedown that vanishes, so the defence announced us exactly when it worked, and
it needed capture listeners on the page's window to do it.

Both go. setupHitTargetInterceptor becomes checkHitTarget, a pure DOM read that
was never the problem: it reads through the Xray like every other read in the
bundle. _with_hit_target runs it BEFORE the action and again AFTER. The first
refuses to act on a point that has already moved; the second catches a target
that moved in between and turns it into a retry. What a page sees in that case
is a click that landed where the thing it was aimed at used to be, which is what
a hand produces when a layout shifts under it.

Gone by construction, not renamed: the three interceptor event sets, the arm,
the stop, the handle and the finally that governed it. The bundle does not call
addEventListener on the page's window anywhere.

A nested frame now needs the point converted, which the listener made
unnecessary because it read the event's own coordinates. A point arrives in the
MAIN frame's space - getContentQuads answers there and dispatchMouseEvent wants
it there - so inside a child it is shifted by the difference between the two
content origins, read from mozInnerScreen* rather than recomputed here. The
cross-origin iframe tests are the judge: 221 e2e passed, 18 of them mouse and
iframe.

The gate's three properties collapse into one, and that is the point of the
change rather than a side effect. While this was an interceptor the best that
could be asked was that an action removed exactly what it added and added no
more than it needed. Now the number is zero in every phase, which two symmetry
assertions could never say. Four known-bad mutations: a listener planted in the
constructor, one planted in the check itself, the removed detector back under a
different name, and a check that stops answering - that last one because zero
touches is trivially true for a function that does nothing.

* Release 0.19.0: the hit target is checked, not intercepted

The version gate is right: 0.18.0 is already on the index and three files that
go into the wheel changed since it, so a release from here would report
'already on the index, no-op' and publish nothing.

Minor rather than patch because the observable behaviour moves. An element that
moves between the check and the event now receives that one event and the action
is retried, where before the event was blocked and never arrived.

* A mutation lands on Linux too: the line ending belongs to the checkout

The mutations split the bundle on a hardcoded CRLF, which is what Windows
produces under core.autocrlf and not what Linux does. Every anchor then matched
nothing, so four mutation tests failed on the ubuntu runners while windows
stayed green: a bench accusing a healthy gate on half the machines.

The comment sitting right above that constant warned about exactly this class.
It was right about the danger and wrong about the value, because a line ending
belongs to the CHECKOUT and not to the file, so it is read now rather than
assumed.

It failed loudly only because at() asserts its anchor is unique; a plain replace
would have applied nothing and reported that the gate is blind. The new test
exercises both spellings rather than whichever one the machine produces, and the
known-bad input is the hardcoded constant coming back.
2026-09-16 17:01:44 +02:00
github-actions[bot]andfeder-cr 720cbf4799 record 0.18.0 as published (#213)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-16 11:40:19 +02:00
Federico ddb7058f2b go_back() and go_forward() refuse, because working once is the problem (#212)
0.17.0 shipped them working, and a clean-environment check the same night found
what one step hides. The engine restores the document and reports the
navigation, which was the whole of the fix. What it does not do is leave this
client holding a usable handle for the restored page: go forward, or go back a
second time, and every locator on that page raises "Cannot find object with id"
while evaluate() and content() keep answering from the right document. A
reload() clears it.

That is worse than not having the method. The call succeeds, the URL is right,
and the failure lands later and somewhere else, looking like a broken selector
on a page that is fine. Both now raise a sentence that names what would have
happened and points at the two things that do work: navigating to the URL, and
reload().

The engine bookkeeping stays. A page that moves its own history takes the same
road and without it the client is never told the navigation committed at all.
What is withdrawn is the public method, until the restored world is understood,
and it is not: announcing the world as cleared is what makes the first restore
work AND what leaves the stale handle, while not announcing it loses the
execution context instead. Two complementary failures are a wrong model, not a
missing line.

The perimeter gained a fifth category rather than a wrong label. Of the four
that existed, one says the engine has no command, one says it is decided at
build time, one calls itself our debt and simply not written, and the last says
the feature was left out by decision and generates a sentence saying so. All
four would have been untrue here, and an inventory that lies is worse than one
with a gap because nobody looks behind it. The reverse check covers the new
category too, so the day the engine is right the inventory asks to be emptied.

And the README stops claiming all methods. It never covered tracing, HAR, CDP or
the API request context; the refusals have said so for a while and the headline
had not caught up.
2026-09-16 11:27:57 +02:00
github-actions[bot]andfeder-cr 1fae640048 record 0.17.0 as published (#211)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-16 11:16:11 +02:00
Federico 080b6ffdaa Release 0.17.0 on firefox-31, where an authenticated HTTP proxy routes again (#210)
* go_back() is no longer expected to fail, and a test says what it must do

The xfail went on when the cause was unknown. It is known now: the engine goes
back perfectly well and Juggler had no bookkeeping for a document restored from
the back forward cache, so the client was never told the navigation had
committed. The remedy is in the engine.

The second test is the one that matters. Asserting that the URL changed would
pass against a browser that silently refetched the page, which is what every
other automation stack settles for and is not what going back means. It serves
the document once, counts what the server is asked for, and requires that going
back asks for nothing: a restored document, not a second download. Proven red
against a page served with Cache-Control: no-store before it was trusted.

* An authenticated HTTP proxy is a gate now, and the pinning page's examples run

Issue #206 reported that behind an authenticated HTTP proxy the browser started
without an error and the page came out of the host address, while the same
credentials over socks5 worked. The cause is in the engine. What is fixed here
is the reason nothing saw it: the two HTTP end-to-end arms of
test_proxy_reaches_the_browser.py launch with no credentials at all, the only
authenticated arm is SOCKS5 in test_proxy_socks_auth_e2e.py, and the single test
that puts http and credentials together asserts on a Python dict and never opens
a browser. The product had never once been driven out through an authenticated
HTTP proxy under test.

test_proxy_http_auth_e2e.py drives a real browser through a local HTTP proxy
that answers 407 until it is shown the right Proxy-Authorization. The assertions
are in the positive form, because "the proxy received something" is green on the
leak: a browser that connects directly leaves nothing on the proxy, so an empty
recorder and a healthy proxy are the same observation. What is asserted is that
the proxy routed the page's own request and that the page read this proxy
instance's own body, for a host RFC 2606 reserves to resolve nowhere. Measured
against two engines: red on the packaged firefox-30 with Page.goto:
NS_ERROR_UNKNOWN_HOST, which is the leak itself, and green on a local build
carrying the fix. Taking the password back out of the dict makes it red on the
fixed engine too, with NS_ERROR_PROXY_CONNECTION_REFUSED and the proxy's own
record showing it was offered the user with an empty password. The navigation
error is caught rather than left to propagate, because both known-bad engines
fail inside goto and an uncaught Gecko code says neither of those two opposite
things.

The pinning page's two GPU examples raised when copied. An RTX 4090 in the
opening block and an Iris Xe under "mimic a specific real device" name no
persona in the validated pool, so both ended in "names no validated GPU
persona". They are replaced with personas read off that exception, a GTX 980 and
an Intel HD Graphics, the second one mid_range so the class_tier written beside
it stays true. The paragraph on implausible pairings named the RTX 4090 too and
said the sampler picks the screen from the seed's own tier, which a GPU pin has
conditioned since 2026-09-15. It now says where such a pair can still be built,
by pinning both halves, and carries the measurement: over 200 seeds a low_end
persona draws a 4K screen zero times and mid_range draws one 23 times.

test_pinning_doc.py could see neither. It compared example keys against the
validator's table while the GPU refusal is on the value, so it was green on both
broken blocks; putting the Iris Xe string back confirms it, the new executing
test fails naming the string and the keys-only test still passes. The keys test
stays, as the cheaper half that names the offending key directly. And the
extraction only matched pin = {...}, so the opening block, which hands pin={...}
to the constructor as a keyword argument, was invisible: 2 examples found
before, 3 now. The count is a floor rather than a non-zero check, because with
two other examples on the page a non-zero check stayed green while a third of it
went unread. Removing the keyword arm again now fails with "found 2 pin
example(s) on the page, expected at least 3".

* Stage the changelog the ledger step rewrites, or the rewrite never happened

invisible-core's record step now realigns this version's changelog heading to
the upload date the index reports, which is the fix for a heading typed hours
before the upload it claims to describe. This is the repository that keeps a
changelog, so this is where that matters, and a file rewritten on the runner's
disk that nobody stages is a change that never happened.

Conditional for the same reason the release notes step below is: git add on a
missing path fails the step under bash -e.

* The context proxy gets the same gate, because the report measured both roads

Issue #206 listed the launch proxy and the context proxy as separate arms and
both leaked, which is what a cause living under both looks like. The fix is one
function, so this arm cannot fail for an engine reason while the other passes.
It can fail for a wiring reason: setBrowserProxy and setContextProxy are two
commands with two handlers and two stores, and the eager refusal that stops an
inexpressible proxy from becoming a silent direct connection is installed at two
call sites. Remove one and contexts go out in the clear while launches stay
proxied, which is the original bug on the road nothing was watching.

Known-bad on two real engines, both arms. Against the shipped firefox-30 both
fail with NS_ERROR_UNKNOWN_HOST and the proxy logs nothing at all, routed and
refused both empty, which is the browser resolving the name itself and leaving
directly. Against the engine that carries the fix, both pass in 12 seconds.

* Release 0.17.0 on firefox-31

The pinned engine moves to firefox-31 through invisible-core 31.23.0, and the
two fixes it carries are the reason to take it.

An authenticated HTTP or HTTPS proxy was accepted and then bypassed on every
engine from firefox-24 to firefox-30, with the page going out over the host's
own address and nothing raised anywhere. And go_back now reports the navigation
it performed, which it had been doing all along without telling the client.

Minor rather than patch: both are behaviour a caller can observe changing, and
the second removes an expected-failure marker that people have been coding
around.
2026-09-16 04:54:18 +02:00
github-actions[bot]andfeder-cr 9833d053fa record 0.16.2 as published (#208)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-16 02:32:34 +02:00
Federico 84146233e4 Date 0.16.2 the way the index dates it (#209)
The heading said 2026-09-16 and PyPI says the files went up on 2026-09-15.
Both are honest readings of the same moment: the upload landed at 23:21 UTC,
which is past midnight in Rome, and the heading is typed by hand at bump time
while the index stamps UTC at upload. The changelog gate compares the two and
went red on main, so every branch cut from it started red.

The gate is right and the heading is the thing that moved. Its own docstring
settles which record wins: a heading dated by the person writing it rather than
by the upload is a small lie a reader can check, and PyPI is the record that
settles it.

This corrects the datum. The reason a hand-typed date can disagree at all is
that it is written before the upload exists, so the author is predicting a
timestamp; that is fixed where the timestamp becomes known, in the ledger step,
and not here.
2026-09-16 02:25:20 +02:00
Federico 174ceebc89 The language gate comes from the core, and the srflx names cross into English with the pin
* The language gate comes from the core, and the three srflx names cross into English with the pin

invisible-core 30.23.0 carries the check that this repository is English, as
`invisible_core.english`. Until now it was a SCRIPT here and a copy in AIHawk,
and the copies drifted: AIHawk's exclusion list named paths that exist only
here, and this one never gained the `.js`, `.css` and `.html` coverage the other
did on 2026-09-11 - JavaScript, CSS and HTML were outside its sight entirely.
Five tracked files fall there and all five are clean, so this is a hole and not
a fire, but it is the hole the copy makes.

So `scripts/check_english_only.py` is deleted and the `english` CI job runs the
module, after installing the pinned core the way `unit` does. What this
repository exempts is declared once, in `[tool.invisible.english]`: the vendored
Playwright folder (our own patches inside it are still read, found by the
marker), the injected script extracted from the bundle, and `test_fork.py`,
whose known-bad fixture is Italian on purpose. The vendored Node driver is no
longer in the list because it is no longer in the tree - an exclusion that names
nothing is refused by the gate, which is the check the copies did not have.

Verified before this went in: with the copy's exact settings the shared module
gives an identical per-file verdict on all 722 tracked files, as they are and
with Italian injected into each of them, so the deletion changes what is
COVERED and nothing about what is judged.

The three names the core translates in the same release follow here, at the
call sites the pin move requires: `srflx_to_declare()`, the `srflx_declared`
keyword of `build_launch_env`, and the `_srflx_declared` attribute that carries
the decision. The pin moves to 30.23.0 in this same commit, because a pin move
without the renames breaks the launch with a TypeError, and the renames without
the pin move import a name the index does not have.

* The changelog has a heading for 0.16.2

The gate that asks for it is right: a version bump without an entry is how
0.13.2 went out with a changelog that ended one version short. The entry says
what a reader of this package needs - the gate now comes from the core and the
three srflx names crossed with it - and that nothing the browser receives moved.
2026-09-16 01:08:28 +02:00
github-actions[bot]andfeder-cr 5ec3ca3f6e record 0.16.1 as published (#205)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-15 20:05:02 +02:00
Federico accc852849 Pin invisible-core 30.22.0, and file uploads stop being expected-red (#204)
The preference that makes a file upload possible ships from 30.22.0, which is
on the index, so the pin moves and the two tests that covered the defect go
back to being hard assertions - the first time since B178 was opened. They
were strict on purpose so that this moment could not pass quietly.

The pin was moved with sync_core_pin.py rather than by hand, because the
script is the one place that knows which consumers exist and what the core
builds.
2026-09-15 19:54:22 +02:00
Federico c6d423db7e scroll_into_view_if_needed() scrolls, a file chooser can upload (#203)
* scroll_into_view_if_needed() scrolls, and every refusal is declared

The method sent Page.scrollIntoViewIfNeeded, and that command can never
succeed: the engine handler calls scrollRectIntoViewIfNeeded, which is
declared in no binding of Element in the tree, so it is undefined for every
caller and the else branch throws. Measured at four positions, including an
element already in view, it timed out on all four while bounding_box() on the
same element answered correctly.

The remedy was already in the file. Actions has scrolled before every click
through InjectedScript.scroll_into_view since a click below the fold was found
to miss, so the click path scrolled correctly while the public method sent a
command that cannot work: one concept, two implementations, and users called
the broken one. The dispatcher now calls the same helper. It centres rather
than scrolling the minimum, and rect is not honoured, both asserted.

Alongside it, perimeter.py stops being a partial inventory. Ten operations
refused inline with a reason beside the code and no record anywhere that they
existed, which is the exact gap the module was written to close: a caller had
no way to tell a decision from a hole. They are declared in three sets that
keep the difference between no engine command, fixed when the injected script
is built, and simply not written yet. A test reads server.py and fails in both
directions, so neither the code nor the inventory can drift alone.

* A file chooser can upload, and the two upload doors read the request once

FileChooser.set_files() holds the input element already, so the client asks
the ElementHandle for setInputFiles instead of going through a selector, and
this package had no such method. The dispatcher was right to call it a gap
rather than a decision, and a gap it was: the listening half of the
file-chooser feature - the event, the chooser object, is_multiple, element -
all led to a door that was shut.

The element handle now performs the same upload the frame does. The action
gained the element_id parameter every other action already had, which is the
only reason it could not be wired before, and the wire shape of the request is
unpacked in one function instead of once per dispatcher.

The other half of B178 is not here. Creating the File fails in the engine
unless dom.file.createInChild is set, which is a preference and belongs to
invisible-core; it reaches this package when a core carrying it is published
and the pin moves. The two tests that cover the two doors stay expected-red
until then and are now strict, so the day the pin moves they turn red and
somebody deletes the markers instead of leaving a green that proves nothing.

The Italian identifiers in that test file are gone in the same commit: this
repo is English, the language gate does not see bare identifiers, and the file
was open anyway.

* 0.16.1, because this tree is not the 0.16.0 on the index any more

The version gate asks the right question and it was answered wrong: a pull
request that changes what goes into the wheel while declaring a version that is
already published proposes content which can never reach anybody, since the
publish workflow treats an already-present version as a deliberate no-op and
cannot tell that case from a forgotten bump.

The changelog heading goes in the same commit as the bump, which is the
convention the other gate in tests/ exists to enforce at the moment the bump is
written rather than seventeen hours after the upload.
2026-09-15 17:34:54 +02:00
github-actions[bot]andfeder-cr 0f73547619 record 0.16.0 as published (#202)
* record 0.16.0 as published

* Touch the branch so the CI runs (an Action's push does not trigger it)

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-15 12:13:47 +02:00
Federico fa1533eb70 The wiki follows the documents it mirrors (#201)
The wiki follows the documents it mirrors

publish-wiki.yml triggers on `release: published`, and that event does not fire
for the releases this repository makes: GitHub does not start a workflow from an
event created with the built-in GITHUB_TOKEN, and publish.yml is what creates
the release - which is why every recent release here is authored by
github-actions[bot]. Across 43 runs, all but a couple were manual dispatches,
and the two `release` events are old enough to predate the automation. The
comment at the top of the file said "it runs on a published release".

It cannot go red. A workflow that is never triggered does not produce a failing
run, it produces no run at all, and an absence is not something a list of checks
shows.

MEASURED. Since the last dispatch on 2026-09-14 the docs have moved by 37
insertions and 15 deletions, with v0.15.2 released in between, and the published
wiki was showing neither.

The fix is the cause rather than the symptom: the wiki mirrors docs/, so it now
also runs on a PUSH to main that touches what the wiki is made of - the pages,
the converter, and this file. That is an event that actually happens here. The
release trigger stays because it costs nothing and works for a release a person
publishes; it is simply no longer what this depends on. The path list includes
this file, so merging repairs the current staleness without a dispatch.

FOUND IN THE SIBLING FIRST. AIHawk had the identical defect, the identical false
sentence in the identical comment, and the same cost - eight releases and 16
pages. It was fixed there, and the detector that found it is the general one:
of every job a repository declares, how many times has it actually run.

NO GATE IS ADDED HERE, DELIBERATELY. AIHawk carries one, and copying it would
make two statements of one rule in two repositories, free to drift - which is
the defect that detector exists to find. The single home for a rule both repos
must obey is invisible_core.hooks, which both already run on every push, and
putting it there is a core release plus a pin bump. Until that is done the
remedy in this repository is the trigger and not a check, and saying so is
better than a copy that looks like coverage.
2026-09-15 04:46:35 +02:00
Federico 8ade6f90ad One implementation of the humanize pref contract, and the pin surface follows the core (#200)
* One implementation of the humanize pref contract, not two

`_cursor.humanize_prefs` was a second answer to "which stealthfox.humanize*
prefs does this session get", and no code in src/ called it. The live answer is
the core's `compose_session_prefs`, reached through `_session.build_prefs`,
which the two front doors share.

The two disagreed. The core emits `stealthfox.humanize.stepMs`; the deleted
duplicate did not, so two tests were green about a pref set the product has
never produced. That is the shape that makes a dead path look maintained: it
had tests, so it read as load-bearing.

The properties those tests asserted are real and they move to the live path -
the two front doors emit the same humanize prefs, and a cap is never written
without the toggle - now measured through `build_prefs`. A known-bad mutation
of the live decision (always pass the cap through, which is what the duplicate
effectively did) turns them red.

`max_seconds_for` stays: it has two callers in `_session.py` and is the only
thing left that knows what a `humanize=` value means in seconds.

* The shim test stops passing an argument that is going away

`generate_profile` loses `fixed_gpu_class=` in the next core: it was a second
spelling of `pin["gpu.class_tier"]`. It was incidental here - what this file
protects is that the shim path and the core path produce the same prefs - so
dropping it leaves the property intact and the test working against the
published core as well as the next one.

The `forced_gpu_class` import stays, and gains an assertion. The import SHAPE
is what this file exists to protect, and that name is still exported; it is a
query now rather than a knob.

* The pinning page and its gate follow two keys out of the pin table

`codec.webspeech_synth` and `screen.tier` stop being pinnable in the next core:
one was drawn and never read (the pref is a constant, so the sampled value only
made the profile disagree with the browser on about 12% of seeds), the other
could not work by construction, since pins land after the draw.

The page loses both rows and says where they went, because a reader who
remembers a key needs to be told rather than find it absent - the rule this
file's own `fonts` test already enforces.

The gate gains the third level of an idiom it already had twice:
`_NOT_PINNABLE` for top-level scalars, `_NOT_PINNABLE_GROUPS` for whole groups,
and now `_NOT_PINNABLE_FIELDS` for a field inside a group. Each carries a
reason, and each refuses an excuse that has gone stale - either because the
field came back to the pin table or because it left the profile entirely.

* The page and the gate follow screen.avail_* out of the pin table

* Pin invisible-core 30.21.0, and say what it removes

0.16.0 has not shipped, so these entries join it rather than inventing a
version: the three pin keys that could not work, the sampled codec field that
contradicted the browser, and the deleted duplicate of the humanize pref
contract.

* Two e2e modules stop pinning keys that no longer exist, and a gate that would have said so

`screen.avail_width` and `screen.avail_height` left the pin surface, and these
two modules kept pinning them. Both are marked `e2e`, so the default selection
deselects them: every local run was green and the failure appeared on the Linux
CI leg as 81 errors, four minutes in. The migration was not incomplete because
it was hard - it was incomplete because the only thing that would have noticed
needed a browser.

Nothing about the question needs one. A pin dict is a dict of strings and
`_validate_pin_key` is a pure function, so `test_pin_dicts_are_valid.py` reads
every pin dict in src/, tests/, scripts/ and examples/ and asks the real
validator. It finds the two shapes this repository writes - `pin=` inline and a
module-level PIN shared across an e2e module - and it is killed by both: a
removed key returning to an e2e PIN, and an invented key in an inline dict.

Its first draft was red on a healthy repository, which is the state where a gate
teaches people to ignore it. Two exclusions came out of that, both deliberate
and both documented in the file: dicts inside `with pytest.raises(...)` hold
keys that are SUPPOSED to be refused, and `_NOT_PINNABLE` is a table of reasons
whose name merely contains the letters PIN.

The assertions in the two e2e modules get stronger for the change: availWidth
and availHeight are now read as values the engine computed, not as values the
caller believed it had set.
2026-09-15 04:32:53 +02:00
Federico 0c061e6410 A GPU pin selects a validated persona instead of setting a label (#199)
* A GPU pin selects a validated persona instead of setting a label

⛔ DO NOT MERGE BEFORE invisible_core SHIPS THE MATCHING RELEASE AND THE PIN IS
BUMPED. Two tests here assert behaviour the published 30.19.0 does not have;
against it they fail, which is the correct order working as intended (publish
the core, then move the pin, then use the new behaviour).

The two call sites here passed fixed_gpu_class=forced_gpu_class(self.seed),
restating a value generate_profile already derives. They were two of the six
places that had to agree about which GPU a session presents, and a pin reached
some of them and none of the ones that decide what the browser is told, so
pin={"gpu.renderer": ...} changed the profile object and left the page reading
the seed's own GPU. The choice lives in invisible_core now, in one function.

The docs carried the same defect and are where it was copied from.
docs/pinning.md said the renderer "lands verbatim in UNMASKED_RENDERER_WEBGL"
and "does not condition other fields"; both are now the opposite of true. The
README example pinned an RTX 4090, which no validated persona carries, so the
snippet a reader copies raises today and silently did nothing before.

test_pin_gpu_renderer_propagates asserted the pinned string came back out of
Profile.gpu.renderer, with a comment explaining that the prefs "may suppress it
on Windows for hash-coherence reasons" - that sentence is how the defect
survived as a documented feature. It follows the value to the emitted pref now,
and a companion test covers the refusal.

* Pin invisible-core 30.20.0

* Retire the webgl.* pin surface on this side too

invisible_core 30.20.0 emits the same MSAA sample count on both builds and no
longer offers webgl.msaa_samples as a pin, so the page that documented it and
the two tests that asserted the old split follow it here.

IT12 read "pinning MSAA on Linux survives the prefs translation; on Windows the
same pin is overwritten to 4" - that sentence was the tell, and it now asserts
the parity instead.

test_pinning_doc's group check gains _NOT_PINNABLE_GROUPS, the same declared
exception the scalar check already had one level up, plus a refusal when an
excuse goes stale: a group with no pin table is either a decision or an
omission, and only one of those should pass.

* Release 0.16.0
2026-09-15 02:19:02 +02:00
github-actions[bot]andfeder-cr 67bfe5beea record 0.15.2 as published (#198)
* record 0.15.2 as published

* Touch the branch so the CI runs (an Action's push does not trigger it)

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-15 02:12:29 +02:00
Federico 296fb10b57 evaluate stops rewriting the JavaScript it was given (0.15.2) (#197)
The caller's argument was placed by building the wrapper first and then
searching it for the placeholder and replacing it. That search ran over a
string that already held the caller's expression, so those three uppercase
letters were rewritten to the argument's JSON anywhere they appeared in the
caller's own code.

Found by driving it through a real browser, and measured there:

    'CARGO'.length              answered 6, not 5
    [data-role='TARGET']        matched nothing
    /ARGH/                      became /nullH/
    const ARG = 5               was a syntax error

Three of the four are silent. The letters only have to appear inside a longer
word, so MARGIN, LARGE and CHARGE are all in scope, and an identifier is
merely renamed consistently while a string, a selector or a regular expression
is quietly changed into something else. A caller gets a wrong answer and
builds its next decision on it.

The argument now goes in during the same formatting pass that inserts the
expression, so the expression is an argument to the format string and never a
place the format string looks. The sibling wrappers in element_handle.evaluate
and eval_on_selector were already written this way and were never affected;
wait_for_function repeated the two lines inline instead of calling the helper,
which is how one of the two could have been fixed and the other left alone, so
it calls the helper now.

The script the page runs is unchanged, character for character, for every
expression that did not spell the placeholder, and a test pins it against what
shipped. This call is the one place in the transport that deliberately runs in
the main world rather than the utility one, so the shape of that wrapper is
something a site can look at, and a correctness fix must not move it.

Suite green, 593 passed. Six known-bad inputs, six killed, two of them a
single space and a variable name in the template, which is what keeps the
pinned script honest. The end to end probe runs the four failing expressions
in a real engine: four wrong before, none after.
2026-09-14 23:29:25 +02:00
github-actions[bot]andfeder-cr 39fcd4cdb6 record 0.15.1 as published (#196)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-14 08:55:19 +02:00
Federico 8ebc075d49 Pin invisible-core 30.19.0: the engine is firefox-30, whose screencast survives a minimised window (0.15.1) (#195)
The screencast capture in the engine ended for good when a headed window was minimised for a moment; firefox-30 starts the capture module again for as long as the window cannot be captured, and repeats the last frame every 250 ms while the module is quiet, so a client can judge a capture by the age of its frames. The pin follows the seal and nothing else moves. Version 0.15.1.

`invisible-core` 30.19.0 is on the index (ledger #43 merged). The full e2e ran green against the firefox-30 Windows binary with the release seal: 212 passed, 1 skipped, 3 xfailed.
2026-09-14 08:45:35 +02:00
github-actions[bot]andfeder-cr c419762864 record 0.15.0 as published (#194)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-14 08:39:51 +02:00
Federico 5521fee86c A closed pipe is a closed target, and the public API exports the type a caller catches (0.15.0) (#193)
The browser being gone is one fact, and it reached a caller as two classes. A call on a disposed page, context or browser raised `TargetClosedError`; a call that was waiting when the pipe closed, or one made after, came out of the connection as a plain `Error` carrying "the pipe closed". A caller that had to tell "the page refused" from "the browser died" was reduced to matching sentences.

One class now, defined in the connection and raised by both layers, and `async_api`/`sync_api` export `Error`, `TimeoutError` and `TargetClosedError` so the type can be caught without a private import. Five tests on a pipe pair, no browser started. Version 0.15.0.
2026-09-14 03:10:05 +02:00
Federico ed2259a405 Ten pages on the Selenium, Puppeteer and Python-automation gap (#192)
* Ten pages on the Selenium/Puppeteer/Python-automation gap the wiki never covered

Measured before writing: SERP winnability and demand on the shortlist, and a
cosine-similarity gap check against the full 452-page corpus (threshold 0.52),
so every title lands where nothing already answers it above that bar.

Split from AIHawk's MCP-agent wave on purpose: this wiki is developer
mechanism (protocol, driver architecture, what a page can and cannot see),
not agent-task language, per the perimeter both wikis already follow.

Gates run: english-only clean, no em/en-dash in the new or touched files, all
internal .md links resolve to real files, build_wiki.py renders the full 473
pages with zero unresolved .md links in the output. In-body link density
(prose only, footer excluded) checked and raised where it was thin - one page
shipped at zero in-body links on the first pass, four more under 2/1000
words; all ten now sit between 3.0 and 6.2/1000, matching the range this
project already measured (2-5/1000, median 3.4) rather than assumed.

What is NOT independently verified this session: several claims (Selenium's
WebDriver architecture, CORS enforcement, headless-mode history) are sourced
to public documentation linked inline rather than fetched live in this
session, and the code/command blocks (curl, Puppeteer's API, Playwright's
launch snippet) are written, not executed against a live target. Both are
gaps against this project's own pipeline standard and are noted here rather
than left implicit.

* The same pipeline pass on these ten, and the two defects it found here

Titles averaged 42 characters against a house median of 49 and a stated window
of 50-60; descriptions ran 198-260 against a house median of 159. All 20 values
rewritten, verified by a check that refuses to write when a pair falls outside
the window.

And the first-party evidence the pipeline requires and these pages did not
have. Three now carry a measurement from this project rather than a citation to
somebody else's documentation:

- The same build rendering text across 48 family/size/weight combinations
  produced 9-19 distinct alpha levels per render on Windows and 193-256 on
  Linux, 16 of 48 using all 256. Same code, same display mode, different host.
  It is the number that separates a machine fact from a headless fact, which is
  what the headless page is arguing.
- An A/B/A on one build: a CSS system-font value read from the host rather than
  from the declared identity moved a detector from tampering=False/4/0 to
  True/12/1 and back to False/4/0. One value, both directions.
- Font ascent and descent diverged on 58 of 72 families across hosts on one
  build while every advance width already matched, because shaping is the same
  in-tree library. The layer below the frameworks is larger than the gap
  between them, which is what the Selenium-vs-Playwright page needed to say
  with a number instead of an adjective.

Gates: english-only clean, no dashes, no invisible codepoints, no CRLF, all
internal links resolve, in-body link density 2.6-10.1 per 1000 words against
the measured house range, and the full 473-page wiki renders with zero
unresolved links.
2026-09-10 11:42:34 +02:00
Federico a0e04af8e6 Tighten the patch section without turning it into a bare link list (#191)
It had become the longest section on the page at 564 words, which is what the
two sections before it were just trimmed for. The obvious cut was the wrong one:
this section exists to say what is patched, so dropping the descriptions and
leaving surface plus link would delete the thing it is for.

So the preamble loses half its words and keeps both rules, which are the part
that distinguishes this from a list of features, and eleven of the seventeen
lines lose a subordinate clause each. Every claim survives, said shorter.

480 words now. All 29 links are still there and none moved: measured by
comparing the link sets before and after, 76 distinct links to 76, nothing lost,
nothing added, nothing broken.
2026-09-10 03:34:15 +02:00
Federico 57ef9cd523 Trim the two index sections: 396 words out, no link broken and none invented (#190)
Measured first, because the page had grown past what anybody reads. Of 2305
words, the three link sections held 1572 of them, 70 percent, around 86 links;
the operating part - how it works, install, usage, the CLI - was 571 words, code
included. The page was three quarters an annotated index.

Related projects spent two or three lines per entry explaining what somebody
else's product does, while eleven of the fourteen already carried their own
comparison page on the same line. Each entry is one line now, and every link
survives. The two closing paragraphs move up into the lead, where they answer
the question a reader has before the list rather than after it.

The eleven articles listed flat at the end of Documentation are gone. The four
bullets above them exist to say the wiki organises exactly that, so the list was
the thing they replace. Checked before removing: none becomes an orphan, the
least-linked of them has three inbound pages and the rest between six and forty.

Three of those eleven were the duplicates worth removing anyway - the two font
pages and measureText also sat in `What is patched in the engine` - so of eleven
lines only eight links leave the page, and the overlap between the two index
sections is now zero.

Verified by comparing the link sets before and after, not by reading: 84
distinct links to 76, the eight expected, nothing invented, nothing broken.
2026-09-10 03:26:01 +02:00
Federico 971ecb945f Move what the engine does to the end, and say all of it instead of one example (#189)
Three changes to the same page, and they are one idea: the top answers what a
reader is deciding, the detail waits at the bottom for the reader who wants it.

The closed shadow root paragraph is gone from `How it works`. It was one patch
out of forty standing where the section says what the engine is, which made it
read as the headline feature rather than as an example. It is now a line in the
new section, next to the others.

`If you would rather prompt than script` moves out of `Install` and into
`Documentation, guides and comparisons`. It is not an installation step for this
package: it points at two other products for people who do not want this one as
a library, which is a documentation question. Install is now three lines,
Python version and platforms, and nothing between the command and the usage.

The new section at the bottom is what was missing. `How it works` names the
surfaces in one breath, and the only thing linking the engine was a bare
repository URL, so a reader who wanted to know what is actually patched had
nowhere to go. It now lists them surface by surface under the two rules that
hold across all of them, with the article for each. Twenty-nine links, every one
checked against the tree: the README carries sixty-nine links to `docs/` and
none of them is broken.

Nothing new is claimed. Every line restates what the wiki page it links already
documents, and the section is a map to those pages rather than a second copy of
them.
2026-09-10 02:44:41 +02:00
Federico c2f1764fc4 Shorten the closed shadow root paragraph to the claim and the link (#188)
It was six lines of prose in a section otherwise made of one-line bullets, and
most of it was evidence: the quote from Playwright's documentation, the date of
the measurement, the zero-match result, the three-arm table. That belongs to the
wiki page the paragraph already links, and the link was the last thing a reader
reached.

Three lines now, carrying what a reader decides on: stock Playwright cannot see
into closed-mode shadow roots in either engine, this one returns the element,
and the page still reads null from element.shadowRoot so nothing it can observe
changes. The last clause stays because it is the point - reaching the element is
useless if reaching it is visible.
2026-09-09 23:28:22 +02:00
Federico ecbf313a05 Drop the proxy section and the macOS note from the README (#187)
Two removals, both asked for by the owner.

The proxy section answered a question the README does not need to raise: it
opened by conceding that challenges still happen and then explained whose fault
that is. The line above it, pointing at the engine repository, went with it -
the wiki and the sibling block already carry that link where a reader is looking
for it.

The macOS sentence spent a full line explaining a platform the package does not
ship for. The supported list says which platforms work, which is the thing a
reader is checking; anyone on a Mac gets the same explanation from the package
itself, at launch, where it is actionable.

Nothing else moves. The `Around 90% of proxies are public` figure still lives in
docs/configuration.md and docs/vs-ulixee-hero.md, where it belongs to an
argument rather than to a front page.
2026-09-09 23:21:32 +02:00
Federico 1c0bf446ce Ask for the changelog entry where the bump is written, and let the gate see two jobs it was ignoring (#186)
Yesterday 0.14.0 was bumped, tagged and published with CHANGELOG.md still
ending at 0.13.2. Everything was green: tests, gate, the wheel and the sdist on
the index. The omission surfaced seventeen hours later in the e2e, by which
time the only repair was a second commit.

The convention was never in doubt. test_release_e2e.py carries an `in_flight`
exception written for exactly this, and says why: the changelog entry has to sit
in the commit that bumps the version. Nothing asked for it at that moment.

So the new test compares two files in the tree and asks the network nothing,
which is what lets it live in the default selection: it runs in `pytest -q`,
therefore in `unit`, therefore inside the one context main requires, and it runs
in the pre-push hook on the machine of whoever writes the bump. The e2e test
stays where it is; it has the index in hand and remains the one that checks
dates against the upload. It could not do this job: it speaks only after the
upload, it is deselected by default, and e2e.yml ignores every push touching
only `**.md`, so the file it asserts on cannot start it.

Validated against the known-bad on the real tree, not a fixture: with the 0.14.0
heading cut out, it fails and names the newest heading it found.

The second half is a defect this went looking for and found next door. `gate` is
the only context main requires and it waited for three of the five checks. The
two it ignored were `english`, written for this repository after 549 lines of
Italian shipped here, and `version`, which stands between a forgotten bump and a
release that publishes nothing and reports success. Measured by extracting the
run block and executing it: with the old needs list, either job failing still
exited 0. Thirteen combinations run against the new one, including the skips
that are normal - version on a push, unit and docs-api during the window when
the pinned core is not on the index - and each behaves as declared.
2026-09-09 17:21:59 +02:00
Federico 89563a2dd7 The changelog stopped at 0.13.2 while the index was serving 0.14.0 (#185)
The e2e has been red since the release commit itself, 2026-09-08 15:30, and
stayed that way for seventeen hours because the only push after it touched the
wiki and does not start that workflow. One test of 209:
test_the_changelog_documents_every_version_it_claims_to_cover, reading the
headings in this file against what PyPI actually serves.

That test is marked e2e, so the default selection deselects it and the `gate`
context main requires cannot see this class at all. It is the defect the test
was written for in the first place, in August: a record written by hand, read
by users, that nothing downstream breaks when it falls behind.

The date is the upload time on the index, not the day this was written, because
the test compares those too. The entry describes the only change of the seven
commits in the range that a caller can see; the rest are wiki, tests and one
internal thinning.
2026-09-09 13:32:54 +02:00
github-actions[bot] 07efe3944c record 0.14.0 as published (#183)
The upload succeeded and the ledger could not be pushed to main directly, so the entry lands here. Without it the next release is refused over a version the index serves and the ledger does not record.
2026-09-09 10:18:12 +02:00
Federico f2b648f7cf Answer the two shortcuts people try before they find frame_locator (#184)
This page explains the frame problem well and never mentions the two
workarounds the top search answers actually propose, which is why a
reader arriving from those answers does not find their question here.
Both are now addressed, with the mechanism rather than a verdict.

Clicking with JavaScript fails on a consent banner for a reason that is
not about Playwright: evaluate runs in the main frame and the
same-origin policy stops any script there from reading into a
cross-origin iframe, so querySelector never finds the button. That holds
whatever isolation strategy the browser runs. Where it does reach, a
script-synthesised click carries isTrusted false, which is the field a
handler can check.

Removing the banner from the DOM removes the overlay and does not record
a decision. Content gated behind a stored consent stays unrendered, so
the scrape returns empty, and the banner is back next run.

And the honest exception, because both statements are wrong on a
first-party banner in the main document: there the JavaScript route does
reach the button and only the trust question remains.

Two entries added to the short-answers block, which is where the
long-tail phrasings of these two questions land.

The page's load-bearing claim was verified before pushing it rather than
assumed: the emitted prefs still carry fission.autostart false,
webContentIsolationStrategy 0 and processCount.webIsolated 1.
2026-09-08 22:27:23 +02:00
Federico ff096b4d1b screencast.start() takes an fps, and the default stays at ten (0.14.0) (#182)
* screencast.start() takes an fps, and the default stays at ten (0.14.0)

The engine has taken a frame rate all along - `fps || 25` in its own registry -
and this passed the wrapper's constant to it whatever the caller asked for. So a
live view could not go past ten frames a second no matter what it did, which is
the second half of a slow pane: the first half was the client asking every
200 ms for a source producing every 100, fixed elsewhere.

Measured on the same page, interleaved arms: asking for 10 delivers 9.6-9.8 fps
at 257 KB/s, asking for 25 delivers 23.8-24.0 at 629 KB/s.

⛔ THE DEFAULT DOES NOT MOVE, and that is the whole shape of the change. Raising
the constant would put two and a half times the bandwidth on every consumer to
serve the one that is watching a window - a batch job that never looks at a
frame would pay it too. The caller decides and the constant is what happens when
nobody does, which is how `quality` and `size` on the same call already worked.

The test that pins it caught its own weakness first. It asserted that `fps` is
in the public signature, and the mutation that deletes `fps=fps` from the
generated wrapper survived that: a parameter a caller can pass and that goes
nowhere is an inert lever, and it is worse than a missing one because it looks
like it works. It now checks that every parameter the public signature declares
is forwarded, which is the property rather than this one case.

* And an e2e that asks the engine, because the unit test cannot

The unit test proves the wrapper puts a number on the wire. Only a real engine
can say the number does anything, and a lever verified from outside the system
it moves is exactly what this project has been fooled by before: seven levers
passed as prefs on the protocol, all inert, all reported green.

Two pages of one browser, same served page, same duration, and the assertion is
on the ratio - the absolute rate is a property of the machine, and the claim is
that asking for more gets more. The floor is far from the measured numbers on
purpose: it tests that the lever is connected, not that this machine is fast.
2026-09-08 17:29:57 +02:00
Federico 84192938cb Nineteen pages show the values they describe, and twenty-four stop pointing nowhere (#181)
* Four more pages get the measurement they were describing

Each of these pages asserted something a reader has to take on trust. Each one
now carries the run that produces it, on one Windows machine, one page served
from 127.0.0.1, with the numbers computed inside the page so the figure and the
figures agree by construction.

Canvas fingerprint changes every run. Four sessions: two without a seed disagree
on both readbacks and even on the device pixel ratio, two with the same seed are
identical, 0 of 79,800 pixels apart. The drawing looks the same in all four
panels, which is the useful part: the eye cannot separate them and the hash can.
Running it also contradicted a sentence the page carried, "Different seed,
different bytes": two different identity seeds can land on the same hardware
seed and return the same readback. The direction that holds is same seed, same
bytes, and the text now says only that.

Human-like mouse movement. Three ways to reach one target, with the page
recording every pointer event. All three report isTrusted true, so the trusted
flag does not separate the driver from the engine, only both from page script.
What separates them is the deltas: 3 distinct movementX values across 41 events
for an evenly stepped driver path, 26 across 34 for the engine's. And the third
panel is not a graceful arc, which is this page's whole thesis in one image.

Detecting installed fonts by width. The article's own snippet, run over ten
families against two different fallbacks. Consolas reads absent against
monospace and present against serif on the same machine in the same session,
because Consolas is what monospace resolves to there. An invented control family
stays absent under both, which is what makes that a finding. The rule now names
its exception: an identical width means the candidate did not render, or the
candidate is the fallback.

Screen size and viewport tells. The taskbar check does not fire on this browser:
bundled Firefox headless reports a 48 pixel gap, same as headful. What is a tell
is the constant, 1366x768 at two different viewports. Also states a sharp edge of
ours: an explicit viewport leaves outerWidth on the declared window while
innerWidth follows the request, 1490 pixels of impossible chrome, and
no_viewport keeps the pair at a plausible 85.

Every PNG was opened and inspected, and carries no metadata chunks and nothing
after IEND.

* Measure the new_page default instead of describing it

The page says browser.new_page() ships Playwright's stock 1280x720, and that the
same gap was closed on this engine. Both halves are now run rather than stated.

Three headless sessions on one page served from 127.0.0.1. The bundled Firefox
opened with new_page() reports inner 1280x720 on a screen it calls 1366x768. The
same build asked for new_context(no_viewport=True) reports 1366x683, a window on
that screen instead of a number from a config file. The patched engine opened
with new_page() reports 1920x947, which is exactly what its own new_context
gives, so the convenience call is not picking up a default nobody chose.

The first panel carries a second contradiction worth naming on a page about
relationships: outerHeight reads 805 while availHeight reads 720, so the window
is taller than the space the OS says exists.

PNG opened and inspected, no metadata chunks, nothing after IEND.

* Thirteen more pages show the values they describe, and the canvas page gets two corrections

Each page now carries a card of the values it names, read from a page served
from 127.0.0.1 by two headless sessions: Playwright's bundled Firefox and a
patched engine. Every card holds that page's own values, so no two are the same
table.

Eleven pages had at least one value that differs between the two browsers, so
those carry both panels. Three had none, and there the card is a single panel
with a note that the bundled Firefox returned the same values: a difference that
does not exist is not worth two identical tables.

Four cards were built and then dropped rather than shipped. Five pages named the
same trio of userAgent, platform and oscpu, which would have put the same
three-row table on five pages, and two comparison pages would have carried the
same two-row table. Kept where that trio is the subject, dropped elsewhere.

Three probes are deliberately not in the catalogue because they reveal the host
that ran the bench: the unmasked WebGL renderer prints the real GPU, the resolved
timeZone and navigator.languages print where the machine is. Measured on this
host before they were removed.

And the canvas page carries two corrections that came out of running it:

Without a seed, what changes on every launch is the device, not necessarily the
readback. Five unseeded launches moved the screen between 1920x1080 and
2560x1440, the core count between 4 and 12 and the ratio between 1 and 1.25, and
returned the same canvas four times out of five. So two unseeded runs agreeing on
a canvas hash is the likely outcome, not evidence that a seed took effect.

And hashing toDataURL partly hashes the PNG encoder. Three launches of the
bundled Firefox drawing an identical canvas returned three different toDataURL
hashes and the same getImageData bytes every time, with
privacy.fingerprintingProtection and privacy.resistFingerprinting tested both
ways. The cards read getImageData for this reason.

All nineteen PNGs opened and inspected, no metadata chunks, nothing after IEND.

* Three questions the new measurements answer, in the block that captures them

Each of these is a question a reader types and the page could not answer until
the bench ran. One per page, and all three different: a block that grew by the
same entry on three pages would be padding.

Hash getImageData rather than toDataURL when you want to know whether the drawing
changed, because three launches of the bundled Firefox returned three data URL
hashes and the same pixel bytes.

Playwright's Firefox reports 1366x768 with availHeight 720 in headless mode, and
it did not move at two different viewports, so it is a constant rather than
something derived from the session.

And a font the probe calls absent may be the fallback: Consolas reads absent
against monospace and present against serif in the same session on Windows.

* Shorten the one alt text that ran past four hundred characters

Every other figure sits between roughly one hundred and three hundred; this one
described four things a screen reader has to hear in one breath. Same content,
fewer clauses.

* Give seven mute pages their first in-body links

linkgraph counted 24 pages in the engine corpus with zero contextual
outgoing links and named none of them, so the number had sat there for a
month with nobody able to act on it. Named now, they turn out not to be
stubs: 620 to 2600 words, six to eleven H2s, with every internal link
sitting in the See also footer or the FAQ block, which the graph excludes
on purpose because boilerplate is not equity.

Seven of them get two or three links each, written for the sentence they
sit in: the four net::ERR_* pages point at the siblings that differ only
in how far the exchange got, Anubis and Turnstile point at each other on
the proof-of-work layer they share, and the CSP page places an init
script at the page-JavaScript level of the three.

Measured before and after with the tool, on this worktree: 24 to 17.

* Eleven more mute pages, and the integrations family had none at all

The eight pages under docs/integrations had zero internal markdown
links between them: only the directory README pointed in, and nothing
pointed out. They are also the pages where a reader arrives having
already chosen a tool, which makes them the ones most worth giving a
next step.

Links are placed on the sentence that raises the subject, and the
target differs per page on purpose: eight near-identical pages that all
grew the same link in the same section would be the monotemplate
signature the checklist warns about, which is the thing the See also
block already is. So the user-agent warning points at why one string is
the weakest thing to change, Crawlee's fingerprint generator at what a
fingerprint is read as, scrapy's SOCKS route at where Playwright drops
the credentials, TestCafe's missing prefs column at the seed.

One anchor was written before checking the target and described
something that page does not cover; it names the layer stack now, which
is what the page is actually about.

Link form is the corpus convention, [x](slug.md), which build_wiki
resolves from a subdirectory through its addressable table. The
../slug.md form would read correctly on github.com and dead on the
wiki, which is the surface that ranks.

Measured with the tool against this worktree: 17 to 6, median outbound
density back to 3.4 per thousand words.

* The last six mute pages: the engine corpus is at zero

Six troubleshooting and getting-started pages get their first in-body
links, and three of them sit next to each other in the error space, so
the links say which of the neighbouring errors you would be reading
instead: force-clicking through an overlay against the not-attached
error, a leaked process against a script still holding a browser that
went away, strict mode against a click that is merely covered.

Two anchors were written before reading the target and had to be
corrected. One claimed a page covered whether content arrives in the
HTML, which it does not; it names the layer stack now. One asserted the
seed page lists two things it cannot pin, which is not the shape of that
section; it points at the section by what it is. An anchor that
describes the target wrongly is worse than no link, because a reader
follows it once and stops trusting the rest.

engine: 24 mute pages to 0, median outbound density 3.4 per thousand
words, inside the 2-5 house range. aihawk still has 2, both on the
restricted themes, handled separately.

* An anchor with an underscore left one dead link on the wiki

The link rewriter's anchor class was [A-Za-z0-9-], and a heading like
"What invisible_playwright does and does not do here" produces an anchor
carrying an underscore. The pattern then fails to match the whole link,
not just the anchor, so it shipped to the wiki as
](geetest-v4-explained.md#...) - a dead target, because the wiki has no
.md pages.

One link across 463 pages, and invisible from either side: the page
renders normally and only the destination 404s. Found by building the
wiki and grepping the output for links that still end in .md, which is
worth doing on any batch that adds internal links.

Underscore added to both classes, since a page name can carry one for
the same reason a heading can. Rebuilt: the unresolved count goes 1 to
0 and exactly one of the 463 output files differs, so nothing else
moved.

* The headful panel printed this machine's display, so it comes out

The screen figure had four panels and the third was labelled "now it is
the host's display". It was: 1365 x 853, the real geometry of the
machine the bench ran on, painted into the pixels of a page about to be
published. The alt text had carefully avoided the number, so the image
was the only place it appeared.

That is the class the house rule names by name, and it got through
because the exclusion list lives in the probe catalogue, which the
value cards go through and a bespoke bench does not. A bench written
for one page reaches straight past it.

Recomposed from the three headless panels with the harness. The
argument survives: the taskbar gap is still 48 px, the screen is still
a constant across two viewports, the patched engine still declares
1920x1080. The headful measurement is now stated in prose, with the
reason it is not shown, which is the honest version of what that panel
was for.

Renamed to three-arms, free to do because the URL has never been
published. The other four bespoke figures were opened and are clean,
and the 114 strings rendered into the fourteen value cards were scanned
for IP, host timezone, host locale, GPU model, user paths and machine
names: nothing.
2026-09-08 17:03:02 +02:00
Federico 53b7996bc3 Show the headful/headless font difference instead of only asserting it (#180)
The page opens by saying that the same page rendered both ways on one machine
is not identical, and then argues it from Linux and fontconfig. Nobody had run
it on Windows.

Four arms on one page served from 127.0.0.1, same viewport, same URL: the
bundled Firefox headful and headless, then a patched Firefox headful and
headless.

The bundled build disagrees with itself across the two modes on 8,989 of
294,400 pixels, 3.05% of the frame. The shape matters more than the number.
Every sample row keeps its exact height, so no glyph got taller; the rows drift
downward by 0, 1, 1, 2, 2, 2, 2 and 3 pixels from the first sample to the
eighth. Line boxes round differently and the error accumulates, which is why a
screenshot test can pass on a laptop and fail in CI, and why a tolerance tuned
on the first viewport does not hold at the bottom of a long page.

The patched engine returned the same frame in both modes, byte for byte, on
three repeats of the whole bench.

The figure carries the browser's own pixels: labels sit on strips added outside
the panels, since GitHub strips figcaption. It includes an amplified difference
map so the 3% is visible rather than asserted, and the text states the cost of
the trade: Arial Narrow is installed on the host, the patched engine does not
carry that face, so that row renders wide instead of narrow.
2026-09-08 07:44:18 +02:00
Federico 7567dbc52b Give every wiki page a view counter of its own (#179)
* Give every wiki page a view counter of its own

A GitHub wiki serves no per-page analytics. The traffic API reports the ten
most visited paths over fourteen days and nothing below that, so a corpus of
463 pages is invisible by construction: measured today, the whole wiki index
sits at about thirty views per fortnight and no individual page reaches the
top ten. We know which pages rank and not which ones get read.

Each page now embeds a 68-byte transparent 1x1 PNG held as an asset of an
article-views release, the way the browser launch counter has worked since
May: the asset's download count is how many times the page was loaded. The
release is created with make_latest=false, so it never becomes the
repository's Latest.

What that number is not, measured rather than assumed: four deliberate loads
produced six counts, so it carries fetches we did not make and cannot
separate, download_count being a bare integer with no provenance. It counts
fetches and not visitors, crawlers like readers, and nothing at all for a
reader who blocks images. It is for comparing pages and days.

The pixel goes into the wiki only, never back into docs/: the wiki is the
surface that ranks, while the .md in the repository is served as a JSON
payload React mounts, so a counter there would measure almost nothing and put
markup in the source tree.

build_wiki.py writes no pixel unless it is told which repository it builds
for, which is right for a local preview and silent otherwise - a wiki
published that way looks entirely normal and counts nothing. So the workflow
passes the flag and then gates on it: the checker refuses a page with no
pixel, with two, or with one addressed elsewhere, and its own eleven
known-bad cases run first.

* Pace the first upload run, and say it in English

The first run on an existing corpus uploads one asset per page - 463 here -
and GitHub throttles bursts of content-creating requests with a 403 or 429
carrying Retry-After. That burst happens before the wiki push, so a throttle
would have blocked the publish itself on the one run nobody gets to rehearse.
Honour the header, retry, and pace the loop at a tenth of a second, which puts
the whole first run under a minute of added wall clock.

The backoff has its own three known-bad cases against a fake throttling
server, because retry code that has never once retried is not retry code. A
404 stays unretried on purpose: reading one is how a missing release is found.

And the file was carrying Italian identifiers and test names into a public
repository. The language gate reads git ls-files, so running it before the
file was tracked was running it against a world where the file did not exist.
2026-09-08 07:41:16 +02:00
389 changed files with 69766 additions and 22870 deletions

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ body:
id: install_cmd
attributes:
label: How you installed
placeholder: pip install invisible_playwright
placeholder: uv add invisible-playwright
validations:
required: true
+76
View File
@@ -0,0 +1,76 @@
# ─────────────────────────────────────────────────────────────────────────────
# counters.yml - the daily snapshot of the launch counter, and the README badges.
#
# GitHub keeps only the running total of a release asset's downloads, so the
# launches of a day exist only if someone records the total every day. This is
# that someone: no machine and no personal token, just the scheduler and the
# built-in GITHUB_TOKEN. A run that fails sends GitHub's failure mail, and the
# run's log warns when a day between two snapshots is missing.
#
# Everything it writes lives on the `badges` branch, which is not protected:
# counters/history.csv date,key,value - every counter, once a day
# counters/launches_daily.csv day_utc,launches - one row per measured day
# docs/badges/launches.svg, docs/badges/stars.svg
#
# 00:10 UTC, so the snapshot dated D closes calendar day D-1.
name: counters
on:
schedule:
- cron: "10 0 * * *"
workflow_dispatch: {}
permissions:
contents: write
concurrency:
group: counters
cancel-in-progress: false
jobs:
snapshot:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the script (main)
uses: actions/checkout@v4
with:
path: main
- name: Check out the badges branch
uses: actions/checkout@v4
with:
ref: badges
path: badges
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Self-test
run: python main/scripts/launch_counters.py --selftest
- name: Record today's counters and redraw the badges
env:
GITHUB_TOKEN: ${{ github.token }}
run: >
python main/scripts/launch_counters.py
--history badges/counters/history.csv
--daily badges/counters/launches_daily.csv
--badges badges/docs/badges
- name: Commit to the badges branch
working-directory: badges
run: |
set -euo pipefail
git config user.name "feder-cr"
git config user.email "85809106+feder-cr@users.noreply.github.com"
git add counters docs/badges
if git diff --cached --quiet; then
echo "nothing changed"
exit 0
fi
total=$(awk -F, '$2=="launches_total"{v=$3} END{print v}' counters/history.csv)
git commit -q -m "counters: $(date -u +%F), browser launches at ${total}"
git push origin HEAD:badges
+8
View File
@@ -50,6 +50,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# 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:
hunt:
name: hunt (${{ inputs.os }})
+18
View File
@@ -47,6 +47,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# 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:
# The install below resolves `invisible-core==N.M.0` from the package index,
# and the core is published BEFORE this package. This gate answers whether it
@@ -90,6 +98,16 @@ jobs:
sudo "$(which python)" -m playwright install-deps firefox
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: The protocol mirror agrees with the engine it is pinned to
# `invisible_core.juggler.protocol` is generated from the Protocol.js INSIDE the
# shipped binary, and nothing used to tie the two together after a pin
# bump: the mirror sat at 71 commands while the pinned engine declared
# 75, with the unit test that fixes the count green the whole time,
# because a count checks the mirror against itself. This is the only
# job that has the binary, so this is where the comparison belongs.
# 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")"
- 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
@@ -28,6 +28,14 @@ on:
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 .` below resolves `invisible-core==N.M.0` from the package
# index, and the core is published BEFORE this package. This gate answers
+43 -1
View File
@@ -7,6 +7,23 @@
# links to the wiki's extensionless form, names each page by its slug (index.md
# becomes Home.md), and regenerates _Sidebar.md from the parent/nav_order tree.
#
# ⛔ THE RELEASE TRIGGER DOES NOT FIRE FOR THE RELEASES THIS REPOSITORY MAKES.
# GitHub does not start a workflow from an event created with the built-in
# GITHUB_TOKEN, and publish.yml creates the release - which is why every recent
# release here is authored by github-actions[bot]. Measured 2026-09-15 across
# 43 runs: all but a couple were manual dispatches, and the two `release` events
# are old enough to predate the automation. The sibling package AIHawk had the
# identical defect and the identical false sentence in this comment.
#
# The cost is the same too: since the last dispatch on 2026-09-14 the docs have
# moved by 37 insertions and 15 deletions with a release in between, and the
# published wiki was showing neither.
#
# So it also runs on a PUSH to main that touches what the wiki is made of - the
# pages, the converter, and this file - which is an event that actually happens
# here. The release trigger stays: it costs nothing and works for a release a
# person publishes. It is simply no longer what this depends on.
#
# It runs on a published release (the docs the release ships are what the wiki
# should show) and on manual dispatch. The wiki checkout is wiped and rebuilt
# each run so a page deleted from docs/ also disappears from the wiki; nothing
@@ -20,6 +37,13 @@
name: publish-wiki
on:
push:
branches: [main]
paths:
- "docs/**"
- "scripts/build_wiki.py"
- "scripts/sync_article_pixels.py"
- ".github/workflows/publish-wiki.yml"
release:
types: [published]
workflow_dispatch: {}
@@ -44,7 +68,25 @@ jobs:
python-version: "3.12"
- name: Render docs/ into a wiki build directory
run: python scripts/build_wiki.py docs wiki_build
run: python scripts/build_wiki.py docs wiki_build --pixels "${{ github.repository }}"
# The view counters. Upload BEFORE the push, never after: a page that
# reaches the wiki without its asset serves a 404 for its own pixel and
# counts nothing until the next release. Uploading only what is missing
# makes this a no-op on a run that adds no pages.
- name: Give every new page its view pixel
env:
GITHUB_TOKEN: ${{ github.token }}
run: python scripts/sync_article_pixels.py --repo "${{ github.repository }}" wiki_build
# And the gate. `build_wiki.py` writes no pixel when it is not told which
# repository it is building for, which is the right default for a local
# preview and a silent disaster here: the wiki would publish, look
# perfectly normal, and count nothing. This is the step that notices.
- name: Check every page carries its own pixel
run: |
python scripts/sync_article_pixels.py --selftest
python scripts/sync_article_pixels.py --repo "${{ github.repository }}" --check wiki_build
- name: Publish to the wiki
env:
+73
View File
@@ -30,6 +30,26 @@ on:
permissions:
contents: read
# One publish at a time per repository, whatever started it and on whatever
# ref. Two runs of one tag (a delayed delivery, or a dispatch plus the push)
# would both pass the already-published check before either had uploaded, and
# both would upload. Keyed on the ref, a dispatch on a branch and a push of the
# tag would not wait for each other, so the group is the workflow alone.
# Serialised, the second run waits for the first and then finds the version on
# the index, so it ends as a no-op. Never cancelled in progress: an upload that
# has started must be allowed to finish.
concurrency:
group: publish
cancel-in-progress: false
# 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:
# Asked of the INDEX, first, because a tag can legitimately name a version that
# is already published: a tag backfilled for a hand-published release, a tag
@@ -62,6 +82,11 @@ jobs:
needs: already-published
if: needs.already-published.outputs.present != 'yes'
runs-on: ubuntu-latest
# `checks: read` for the step below, which asks what the e2e concluded on
# this commit. Job level rather than workflow level: no other job needs it.
permissions:
contents: read
checks: read
steps:
- uses: actions/checkout@v4
with:
@@ -84,6 +109,29 @@ jobs:
exit 1
fi
- name: the e2e is GREEN on the commit being tagged
# ⛔ THE SUITE BELOW IS THE DEFAULT SELECTION, WHICH DESELECTS `e2e`. So
# until this step existed, the job that decides whether a release goes
# out had never looked at the suite that drives a browser: a red there
# stopped neither a merge nor a tag. 0.22.1 was tagged from a main whose
# e2e was red, and nothing said so because nothing was looking.
#
# It ASKS rather than re-runs. The e2e has already run on this commit;
# running it again here would cost five minutes to learn what one API
# call answers. What was missing was not a second measurement, it was
# somebody reading the first one.
#
# The selftest runs first, because a gate that has only ever printed
# PASS is not a gate - and this one's verdict is a pure function, so its
# ten known-bad cases cost nothing and need no network.
if: github.event_name == 'push'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/e2e_is_green.py --selftest
python scripts/e2e_is_green.py --repo "$GITHUB_REPOSITORY" --sha "$GITHUB_SHA"
- name: the pinned invisible-core is ON THE INDEX
# THE ordering rule, as a gate instead of a sentence in a runbook. This
# package declares `invisible-core==X.Y.Z`, so pip resolves the PUBLISHED
@@ -125,6 +173,19 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: version gate
# The version and the ledger against what the index serves, as the
# pre-push hook checks them: in layers, not as alternatives, because the
# hook is per clone and can be missing or skipped, and this cannot
# ([B353]). Exit codes: 0 pass, 1 refused, 2 gate broken, 4 no usable
# ledger; only 0 continues. The check builds the package to compare
# it, without isolation, so the build backend is installed here: the
# dev extra carries `build` and not `hatchling`, and without it the
# check stopped as "gate broken" on the first tag (v0.40.0).
run: |
python -m pip install build hatchling
python -m invisible_core.release check --verify-index
- name: arm the pre-push gates
# The suite asserts core.hooksPath is set and a fresh checkout has none.
run: python scripts/install_hooks.py
@@ -213,6 +274,18 @@ jobs:
git config user.name "feder-cr"
git config user.email "85809106+feder-cr@users.noreply.github.com"
git add PUBLISHED.json
# `record` also realigns this version's CHANGELOG heading to the upload
# date the index reports, and this is the repository that keeps a
# changelog, so this is where it matters. A file rewritten on the
# runner's disk that nobody stages is a change that never happened, and
# the whole point is that the date stops being written by hand: 0.16.2
# shipped dated a day ahead because the heading is typed at bump time,
# hours before the upload it claims to describe, in whatever timezone
# the author is in. Conditional to match the release notes step below,
# and because `git add` on a missing path fails under `bash -e`.
if [ -f CHANGELOG.md ]; then
git add CHANGELOG.md
fi
git commit -m "record $VERSION as published"
BRANCH="${{ github.event.repository.default_branch }}"
if git push origin "HEAD:refs/heads/$BRANCH"; then
+137 -4
View File
@@ -19,6 +19,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# 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:
# The gate was written FOR this repository on 2026-08-27, after 549 lines of
# Italian shipped here in one subsystem and 852 more were found in 33 files
@@ -35,19 +43,107 @@ jobs:
# being made.
english:
name: the repository is English
# ⛔ The gate is `invisible_core.english` since core 30.23.0, not a script of
# this repository: the script was a COPY, one here and one in AIHawk, and the
# copies drifted - this one never gained the `.js/.css/.html` coverage the
# other did. So this job needs the pinned core on the index, like `unit`.
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the prose
# --selftest first: a language gate that has only ever printed "clean" is
# the same non-gate as any other, and this one can go blind from a single
# edit to its word list.
# edit to its word list. What this repository exempts is declared in
# `[tool.invisible.english]` in pyproject.toml, and an exclusion that
# names nothing is refused.
run: |
python scripts/check_english_only.py --selftest
python scripts/check_english_only.py
python -m invisible_core.english --selftest
python -m invisible_core.english
# A README that promises to beat everything was live here on 2026-09-22 ("it
# passes every bot detection test"), and the check that found it ran by hand,
# from outside the repository, after the text was public. The logic is
# `invisible_core.claims` since core 34.29.0, shared with the MCP server's
# repository; what this one reads is declared in `[tool.invisible.claims]`,
# and without a declaration it is the README, which is also what PyPI shows.
claims:
name: the README promises nothing it cannot support
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the claims
# --selftest first, for the same reason as the language gate: a check
# that has only ever printed "clean" may have gone blind.
run: |
python -m invisible_core.claims --selftest
python -m invisible_core.claims
# The way in is uv (the owner, 2026-09-06 and "uv everywhere" on 2026-10-17),
# and on that day this repository still taught pip in its README, its
# CONTRIBUTING, its docs and the messages its code prints, with nothing
# comparing any of them with the decision. `invisible_core.way_in` since core
# 49.45.0 refuses an install instruction that is not uv, in the tracked
# Markdown, the issue templates and the string literals of src/.
way-in:
name: every install instruction is uv
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the way in
# --selftest first: a check that has only ever printed "clean" may
# have gone blind.
run: |
python -m invisible_core.way_in --selftest
python -m invisible_core.way_in
# The user-install job installs what was published, as a user would. It ran
# on `release: published`, which never fires: the Release is created with
# GITHUB_TOKEN, and an event that token causes starts no other workflow
# ([B347], core 50.48.0). `invisible_core.install_job` judges this tree: the
# job runs on the ledger pull request, its wait for the index is scoped to it
# and bounded, and every test file it runs keeps out, in a `_LEAKS`, every
# variable the pinned core's library reads.
install-job:
name: the user-install job runs on the ledger pull request
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the install job
run: |
python -m invisible_core.install_job --selftest
python -m invisible_core.install_job
# `pip install -e ".[dev]"` below resolves `invisible-core==N.M.0` from the
# package index. The core is published BEFORE this package, so between the
@@ -211,8 +307,25 @@ jobs:
python scripts/check_docs_api_surface.py --selftest
python scripts/check_docs_api_surface.py
# `gate` is the ONLY context main requires, so a check this job does not wait
# for is a check the branch protection cannot see. It waited for three of the
# five, and the two it left out are not minor ones: `english` is the gate
# written FOR this repository after 549 lines of Italian shipped here in one
# subsystem, and `version` is what stands between a forgotten bump and a
# release that publishes nothing and reports success. Either could go red
# while this job went green and the push landed on main regardless - which is
# the decorative protection this project has already met once, on the branch
# rules that required job names no job produced any more.
#
# `skipped` is not a failure and must not be treated as one: `version` runs on
# pull requests only and is skipped on every push to main, and `unit` and
# `docs-api` are skipped during the window when the pinned core is not on the
# index yet. The case arms name failure and cancelled, so a skip passes on
# purpose. That is also why each arm carries its own sentence: a gate that
# exits 1 without saying which of five inputs went red is a gate somebody has
# to open five tabs to read.
gate:
needs: [core-on-index, unit, docs-api]
needs: [core-on-index, unit, docs-api, english, claims, version, way-in, install-job]
if: always()
runs-on: ubuntu-latest
steps:
@@ -221,6 +334,11 @@ jobs:
echo "core-on-index: ${{ needs.core-on-index.result }}"
echo "unit: ${{ needs.unit.result }}"
echo "docs-api: ${{ needs.docs-api.result }}"
echo "english: ${{ needs.english.result }}"
echo "claims: ${{ needs.claims.result }}"
echo "way-in: ${{ needs.way-in.result }}"
echo "version: ${{ needs.version.result }}"
echo "install-job: ${{ needs.install-job.result }}"
case "${{ needs.unit.result }}" in
failure|cancelled) echo "the suite did not pass"; exit 1 ;;
esac
@@ -230,6 +348,21 @@ jobs:
case "${{ needs.docs-api.result }}" in
failure|cancelled) echo "the guides name something that does not exist"; exit 1 ;;
esac
case "${{ needs.english.result }}" in
failure|cancelled) echo "the repository is not English"; exit 1 ;;
esac
case "${{ needs.claims.result }}" in
failure|cancelled) echo "the README promises what no measurement supports"; exit 1 ;;
esac
case "${{ needs.way-in.result }}" in
failure|cancelled) echo "an install instruction is not uv"; exit 1 ;;
esac
case "${{ needs.version.result }}" in
failure|cancelled) echo "the version this change proposes is already taken"; exit 1 ;;
esac
case "${{ needs.install-job.result }}" in
failure|cancelled) echo "the user-install job would not run on a release, or leaks"; exit 1 ;;
esac
echo "ok"
# Measured 2026-09-04: 0.10.0 was on the index while main sat on 0.10.0 with
+25 -11
View File
@@ -15,12 +15,16 @@
# * installing a blessed `playwright==<pin>` afterwards REPAIRS the venv. If
# the declared range resolves to a client the shipped Juggler cannot speak,
# that manual line turns the job green while every fresh install is broken.
# What a user gets is what pip resolves from the declaration, and that is
# what has to be under test.
# What a user gets is what the installer resolves from the declaration,
# and that is what has to be under test.
#
# So this workflow installs nothing from the checkout except the test files. It
# takes `pip install invisible-playwright` from the index, in an empty venv, and
# runs it the way somebody's first script would.
# So this workflow installs nothing from the checkout except the test files.
# test_release_e2e.py runs the README's install block for the runner's system
# as written - uv from its own installer, `uv init`, `uv add
# invisible-playwright` from the index, `fetch` - and then drives the browser
# from the project it made, the way somebody's first script would.
# test_upgrade_e2e.py stays on pip on purpose: it is the path of the people who
# installed before the README said uv, and they are still there.
#
# WHY IT MUST NOT BE MADE TOLERANT.
# There is a real window in which this cannot pass: between publishing the core
@@ -54,8 +58,16 @@ on:
# here, so a run triggered only by pushes would never see them. Weekly is
# enough to catch that drift without adding a Windows job to the queue daily.
- cron: "17 6 * * 1"
release:
types: [published]
# ⛔ THE LEDGER PULL REQUEST, not `release: published` ([B347], core
# 50.48.0). The Release is created by the publish workflow with GITHUB_TOKEN,
# and an event that token causes starts no other workflow: on `release:` this
# job had never run at release time. The ledger PR exists only after the
# upload and `record`, and merging it waits for this run, so a release does
# not close before what it published installs. `python -m
# invisible_core.install_job` checks the wiring (tests.yml).
pull_request:
paths:
- PUBLISHED.json
permissions:
contents: read
@@ -88,7 +100,8 @@ jobs:
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 `release:` - which fires seconds after the upload.
# this workflow runs on the ledger pull request, which the publish run
# opens seconds after the upload (it ran on `release:`, just as soon).
# MEASURED 2026-07-28: invisible-firefox 0.2.6 was uploaded, the release was
# created about forty seconds later, and the pip install below still resolved
# 0.2.5. The job reported a forgotten publish that had happened two minutes
@@ -99,10 +112,11 @@ jobs:
# PER-VERSION endpoint is the authority; the aggregate `info.version` lags it
# by minutes and has its own trap, so this asks for the exact URL.
#
# Only on `release:`. A scheduled or dispatched run is not racing anything,
# and a wait there would hide a real absence behind five minutes of polling.
# Only on the ledger pull request. A scheduled or dispatched run is not
# racing anything, and a wait there would hide a real absence behind five
# minutes of polling.
- name: wait for the index to serve this version
if: github.event_name == 'release'
if: github.event_name == 'pull_request'
shell: bash
run: |
python - <<'PY'
+13 -3
View File
@@ -6,9 +6,11 @@ name: webrtc-e2e
# 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".
# Until that binary ships, test_not_blocked_behind_tcp_only_socks is EXPECTED
# to fail (the old binary is fully blocked behind a SOCKS proxy), which is the
# whole point of the gate.
# 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
@@ -20,6 +22,14 @@ on:
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
+1950
View File
File diff suppressed because it is too large. Load diff
+12 -12
View File
@@ -4,8 +4,7 @@ Thanks for your interest in improving this project. Contributions are welcome vi
## Quick links
- **Bug?** Open a [bug report](https://github.com/feder-cr/invisible_playwright/issues/new?template=bug_report.yml).
- **Idea?** Open a [feature request](https://github.com/feder-cr/invisible_playwright/issues/new?template=feature_request.yml).
- **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 [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
@@ -13,11 +12,12 @@ Thanks for your interest in improving this project. Contributions are welcome vi
This repository ships the **Python wrapper** (`invisible_playwright`) around a pre-built patched Firefox. In scope:
- The `InvisiblePlaywright` sync/async API and launcher
- The fingerprint sampler (`_fpforge`)
- Binary download/caching, CLI, proxy plumbing
- The `InvisiblePlaywright` sync and async API, and its Playwright compatibility layer
- 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/feder-cr/invisible_core).
Out of scope (belongs in `firefox_antidetect_patch`):
- Changes to the Firefox C++ source
@@ -26,19 +26,19 @@ Out of scope (belongs in `firefox_antidetect_patch`):
## Development setup
To *use* the package you do not need any of this: `pip install invisible-playwright`.
The steps below are for working on the code.
To *use* the package you do not need any of this: see [Install](README.md#install) in the README.
The steps below are for working on the code, with [uv](https://docs.astral.sh/uv/).
```bash
git clone https://github.com/feder-cr/invisible_playwright.git
cd invisible_playwright
python -m venv .venv
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
python -m invisible_playwright fetch # download the patched Firefox binary
uv pip install -e ".[dev]"
invisible-playwright fetch # download the patched Firefox binary
```
Requires Python 3.11+ and one of: Windows x86_64, Linux x86_64.
One of: Windows x86_64, Linux x86_64.
## Running tests
@@ -72,7 +72,7 @@ Before opening, please:
Include:
- OS and version, Python version, `invisible_playwright` version (`invisible_playwright version`)
- OS and version, Python version, the output of `invisible-playwright version`
- A minimal reproduction
- Expected vs actual behavior
- Relevant logs / stack traces
+27085
View File
File diff suppressed because it is too large. Load diff
+99 -66
View File
@@ -1,10 +1,14 @@
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-dark.png">
<img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-light.png" alt="invisible_playwright" width="720">
<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>
<h3 align="center">Free antidetect browser stealth for Playwright: undetected Firefox fingerprint, headless or headed.<br>
Python web scraping and captcha bypass. Open source, and it passes every bot detection test.</h3>
<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>
![invisible_playwright - 5/5 detection suites passed](https://raw.githubusercontent.com/feder-cr/invisible_playwright/7a8693c6b4386e9a84dd93bedc479ca8654482e1/docs/screenshots/hero.gif)
@@ -23,53 +27,41 @@ Anti-bots ask two questions, and reCAPTCHA, hCaptcha and Cloudflare Turnstile sc
- Every click, hover and drag follows a natural mouse path with human timing, no teleporting cursor.
- Each input is byte-identical to a real mouse: real input source, pressure, trusted events.
**And one thing the stock driver cannot do.** Playwright's own documentation says
"Closed-mode shadow roots are not supported", and measured on 2026-09-05 against a page
carrying one open and one closed root, stock Playwright returned zero matches for the
closed content in Firefox and in Chromium alike. This engine returns the element, while
the page still reads `null` from `element.shadowRoot`, so nothing observable to the page
changes. The three-arm table and the page that reproduces it:
[closed shadow roots](https://github.com/feder-cr/invisible_playwright/wiki/closed-shadow-root-playwright).
Driven by the standard Playwright API. Full breakdown: [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
---
## Still seeing captchas or anti-bot? It's the proxy.
Once the browser is handled it stops being the variable. If you are still getting challenged, the tell is no longer the browser, it is the IP you come from. Around 90% of proxies are public: anyone can rent the same address, so it is already known and sits on the blocked-IP lists sites check. A perfect browser on a known IP still loses.
---
## Install
```bash
pip install invisible-playwright
python -m invisible_playwright fetch # one-time download, sha256-verified: 240 MB (Windows) / 262 MB (Linux x86_64) / 253 MB (Linux arm64), about 550 MB unpacked
Windows, in PowerShell:
```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "$env:USERPROFILE\.local\bin;$env:Path"
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-playwright
uv run invisible-playwright fetch # one-time download, sha256-verified: 240 MB, about 550 MB unpacked
```
Requires **Python 3.11 or newer**.
Linux:
Supported platforms: **Windows x86_64**, **Linux x86_64 / arm64**. macOS is no longer supported (releases stopped at firefox-20); on a Mac the package refuses at launch with a clear message rather than downloading a binary that no longer exists.
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-playwright
uv run invisible-playwright fetch # one-time download, sha256-verified: 262 MB, about 550 MB unpacked
```
### If you would rather prompt than script
Supported platforms: **Windows x86_64**, **Linux x86_64**. Linux arm64 is no longer supported from firefox-56 (firefox-55 is the last engine built for it).
This page is the engine, as a Python library. There are two ways to use it
without writing code, and both are one line:
- **From an MCP client you already have** (Claude Code, Claude Desktop,
Cursor): `claude mcp add stealth -- uvx aihawk`. See
[the MCP server page](https://github.com/feder-cr/AIHawk/wiki/mcp-server).
- **With an interface and a model included**, needing only an OpenRouter key:
`uvx aihawk ui --openrouter-key sk-or-...`. See
[AIHawk](https://github.com/feder-cr/AIHawk).
Same engine underneath, and the second is a client of the first.
Then save one of the examples below as `main.py` in `my-project` and run it with `uv run main.py`.
---
## Usage
### Random fingerprint per session
**100% Playwright-compatible** - sync and async, all methods, zero API changes. If you already use Playwright, switching is two lines:
**Playwright's API, sync and async, with no code changes.** The same objects, the same calls, the same return values. A few surfaces are out of scope - tracing, HAR, CDP, the API request context - and each one refuses with a sentence saying why rather than misbehaving quietly. If you already use Playwright, switching is two lines:
```diff
- from playwright.sync_api import sync_playwright
@@ -156,8 +148,8 @@ By default everything comes from `seed`. To force specific values while the rest
with InvisiblePlaywright(
seed=42,
pin={
"gpu.renderer": "ANGLE (NVIDIA, NVIDIA GeForce RTX 4090 Direct3D11)",
"gpu.vendor": "Google Inc. (NVIDIA)",
"gpu.renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)",
"gpu.vendor": "Google Inc. (AMD)",
"screen.width": 2560,
"screen.height": 1440,
"hardware.concurrency": 16,
@@ -166,6 +158,11 @@ with InvisiblePlaywright(
...
```
A GPU pin picks one of the validated personas rather than setting a free string,
because the ~81 `getParameter` values and the extension list travel with the
renderer name and a detector cross-checks them against it. A name the pool does
not carry raises, and the error lists the ones it does.
Full list of pinnable keys, how pinning interacts with the Bayesian sampler, and common patterns are in **[docs/pinning.md](docs/pinning.md)**.
---
@@ -184,6 +181,16 @@ invisible-playwright version # wrapper, core and engine versions, and where the
## Documentation, guides and comparisons
**If you would rather prompt than script.** This page is the engine, as a Python
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 aihawk`, see
[the MCP server page](https://github.com/feder-cr/AIHawk/wiki/mcp-server); or with an
interface and a model included, needing only an OpenRouter key,
`uvx aihawk ui --openrouter-key sk-or-...`, see
[AIHawk](https://github.com/feder-cr/AIHawk). 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/feder-cr/invisible_playwright/wiki)**,
organised into four sections instead of one flat list:
@@ -217,17 +224,6 @@ read from its own documentation or from confirmed reverse engineering:
[PerimeterX](docs/perimeterx-explained.md), [hCaptcha](docs/hcaptcha-explained.md),
[Imperva](docs/imperva-incapsula-explained.md), and
[the rest of the set](docs/guides-detectors-explained.md).
- [crawl4ai stealth and custom browser engines](docs/crawl4ai-stealth-custom-browser.md) - browser_type accepts firefox but there is no executable_path; where the adapter seam is
- [Why headless browsers render different fonts](docs/headless-fonts-differ.md) - the three causes, the per-platform font sets, and why the fix is not installing more fonts
- [How to make Linux and macOS report real Windows fonts](docs/bundled-fonts-cross-platform.md) - one manifest, three font backends convinced not to ask the host, and the four seams still open
- [measureText and TextMetrics as a fingerprinting surface](docs/measuretext-textmetrics-fingerprinting.md) - ten-plus numbers from one call needing no permission prompt, and the two mistakes we made fixing it
- [What privacy.resistFingerprinting really does](docs/resist-fingerprinting.md) - and why this project sets it to false on purpose
- [The ChromeDriver cdc_ variable](docs/cdc-variable-explained.md) - why renaming it is not removing it, and what that generalises to
- [What bot.sannysoft.com actually checks](docs/sannysoft-explained.md) - row by row, and the canvas-in-iframe test nobody reads
- [How CreepJS decides you are lying](docs/creepjs-explained.md) - four detection techniques, and why blocking the probe is itself recorded
- [Firefox preferences that silently do nothing](docs/firefox-prefs-not-applying.md) - five reasons, starting with the one that cost us a real bug
- [What BotD actually detects](docs/botd-explained.md) - twenty detectors, and why most are not about bots at all
- [Why a FingerprintJS visitor ID changes](docs/fingerprintjs-visitor-id.md) - it is a hash of 41 components, so one moving moves all of it
## Related projects
@@ -242,29 +238,66 @@ two around it are how most people reach it:
one command. The interface is a client of the server, with no private path
to the browser.
**The open-source neighbours**, and what each one is for.
**The open-source neighbours.** Which one fits depends on the layer your problem is
at, and on whether you need Firefox or Chromium:
[three ways to make Playwright undetected](docs/playwright-stealth-levels.md) works
through what each layer can reach, and [AI browser agents and stealth](docs/ai-browser-agents-stealth.md)
covers the frameworks that pick Chromium over CDP for you.
**On the Firefox side**
- **[Camoufox](https://github.com/daijro/camoufox)** - an anti-detect Firefox that also patches at the C++ level. It covers a wider surface and ships its own fingerprint database; this project derives a fingerprint from a seed with a Bayesian sampler, so one number reproduces one machine. [Full comparison](docs/vs-camoufox.md).
- **[LibreWolf](https://librewolf.net)** - a Firefox fork with privacy defaults. It ships a configured binary for people to browse with; this ships source patches plus an automation wrapper.
- **[arkenfox/user.js](https://github.com/arkenfox/user.js)** - Firefox hardening through preferences. Where a preference is enough, use it; this project patches C++ where one is not.
- **[Camoufox](https://github.com/daijro/camoufox)** - patches C++ too, wider surface, ships a fingerprint database instead of deriving one from a seed. [Comparison](docs/vs-camoufox.md).
- **[LibreWolf](https://librewolf.net)** - a privacy-defaults Firefox to browse with, not to automate.
- **[arkenfox/user.js](https://github.com/arkenfox/user.js)** - hardening through preferences. Where a preference is enough, use it.
**On the Chromium side**
- **[Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright)** - a patched Playwright fork, so the stealth work lands in the driver rather than in the browser binary. [Full comparison](docs/vs-patchright.md).
- **[nodriver](https://github.com/ultrafunkamsterdam/nodriver)** - the successor to `undetected-chromedriver`, driving Chrome over CDP directly and removing the WebDriver-flavoured tells. [Full comparison](docs/vs-nodriver.md).
- **[playwright-stealth](https://github.com/Mattwmaster58/playwright_stealth)** - an init-script patch applied before the page loads. Its own maintainer calls it a proof-of-concept; [full comparison](docs/vs-playwright-stealth.md).
- **[puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra)** - the original of this init-script lineage, still widely recommended. Its repository's last substantive commit is from mid-2024; [what that means in practice](docs/puppeteer-extra-stealth-unmaintained.md).
- **[selenium-stealth](https://github.com/diprajpatra/selenium-stealth)** - the same approach on Selenium/CDP. Its repository's last commit is from December 2021; [what that means in practice](docs/selenium-stealth-unmaintained.md).
- **[pyppeteer](https://github.com/pyppeteer/pyppeteer)** - the unofficial Python port of Puppeteer. Its own README says it's unmaintained and points to `playwright-python` instead; [what that recommendation is actually about](docs/pyppeteer-unmaintained-playwright.md).
- **[rebrowser-patches](https://github.com/rebrowser/rebrowser-patches)** - fixes the `Runtime.enable` CDP leak on Chromium, independently converging on close to the same fix Patchright uses. [Full comparison](docs/vs-rebrowser-patches.md).
- **[fingerprint-suite](https://github.com/apify/fingerprint-suite)** - generates a coherent fingerprint with a Bayesian network, close to this project's own generation approach, then injects it into a Playwright or Puppeteer page on either Chromium or Firefox. [Full comparison](docs/vs-fingerprint-suite.md).
- **[playwright-with-fingerprints](https://github.com/bablosoft/playwright-with-fingerprints)** - injects fingerprint values sourced from a remote paid service, Windows-only, pinned to a specific Chromium build. [Full comparison](docs/vs-playwright-with-fingerprints.md).
- **[Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright)** - a patched Playwright fork: the work lands in the driver, not the binary. [Comparison](docs/vs-patchright.md).
- **[nodriver](https://github.com/ultrafunkamsterdam/nodriver)** - successor to `undetected-chromedriver`, driving Chrome over CDP. [Comparison](docs/vs-nodriver.md).
- **[rebrowser-patches](https://github.com/rebrowser/rebrowser-patches)** - fixes the `Runtime.enable` CDP leak. [Comparison](docs/vs-rebrowser-patches.md).
- **[fingerprint-suite](https://github.com/apify/fingerprint-suite)** - a Bayesian fingerprint generator, then injected into the page. [Comparison](docs/vs-fingerprint-suite.md).
- **[playwright-with-fingerprints](https://github.com/bablosoft/playwright-with-fingerprints)** - values from a paid remote service, Windows-only. [Comparison](docs/vs-playwright-with-fingerprints.md).
- **[playwright-stealth](https://github.com/Mattwmaster58/playwright_stealth)** - an init-script patch; its maintainer calls it a proof-of-concept. [Comparison](docs/vs-playwright-stealth.md).
- **[puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra)** - the original of that lineage, last substantive commit mid-2024. [What that means](docs/puppeteer-extra-stealth-unmaintained.md).
- **[selenium-stealth](https://github.com/diprajpatra/selenium-stealth)** - the same approach on Selenium, last commit December 2021. [What that means](docs/selenium-stealth-unmaintained.md).
- **[pyppeteer](https://github.com/pyppeteer/pyppeteer)** - unmaintained by its own README, which points to `playwright-python`. [What that recommendation is about](docs/pyppeteer-unmaintained-playwright.md).
Which of these fits depends on the layer your problem is at, and on whether you need Firefox or Chromium. [Three ways to make Playwright undetected](docs/playwright-stealth-levels.md) works through what each layer can and cannot reach, including what this one costs.
---
If you are picking between engines rather than tools, note that a large share of AI agent frameworks drive Chromium over CDP, which decides the question for you: [AI browser agents and stealth](docs/ai-browser-agents-stealth.md).
## What is patched in the engine
Two rules hold across everything below. Every value is decided **before a page can
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:
[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).
- `navigator.languages` and the `Accept-Language` header are the same declaration, sent and read: [Accept-Language and navigator.languages](docs/accept-language-navigator-languages.md).
- Screen geometry, `devicePixelRatio` and the media queries exposing it are declared, not read from the host: [devicePixelRatio and the Firefox pref](docs/devicepixelratio-firefox-pref.md), [CSS media query fingerprinting](docs/css-media-query-fingerprinting.md).
**Rendering**
- Canvas readback is deterministic per seed and keeps the real shape, rather than blocked or noised: [canvas fingerprint noise](docs/canvas-fingerprint-noise.md), [why a canvas fingerprint changes every run](docs/canvas-fingerprint-changes-every-run.md).
- WebGL reports a coherent GPU persona: vendor, renderer and the parameter limits are cross-checked, not set one at a time: [WebGL renderer strings](docs/webgl-renderer-strings.md), [WebGL parameters are identical](docs/webgl-parameters-are-identical.md).
- Fonts ship with the browser, so the same faces exist on every host and the platform font engine no longer chooses: [bundled fonts across platforms](docs/bundled-fonts-cross-platform.md), [why headless browsers render different fonts](docs/headless-fonts-differ.md), [detecting installed fonts from JavaScript](docs/detect-installed-fonts-javascript.md).
- Text metrics follow those fonts: `measureText` returns ten-plus numbers from one call, with no permission prompt: [measureText and TextMetrics](docs/measuretext-textmetrics-fingerprinting.md).
- Canvas and WebGL agree across operating systems for the same seed: [cross-platform consistency](docs/canvas-webgl-cross-platform-consistency.md), [canvas differs across operating systems](docs/canvas-differs-across-operating-systems.md).
**Audio and media**
- The audio stack answers from the profile rather than from the host device: [AudioContext fingerprinting](docs/audiocontext-fingerprinting.md), [sample rate and latency](docs/audiocontext-samplerate-latency-fingerprint.md).
- The codec table is declared, so a Linux host does not answer a Windows question with Linux support: [codec fingerprinting](docs/codec-fingerprinting.md).
**Network**
- WebRTC offers one synthetic candidate carrying the proxy exit, instead of leaking the real address or offering none, which is itself a tell: [WebRTC ICE candidate spoofing](docs/webrtc-ice-candidate-spoofing.md), [does the WebRTC IP match the proxy exit](docs/webrtc-ip-match-proxy-exit.md).
- DNS resolves through the proxy, including when the proxy is not in the preferences: [does a proxy leak DNS](docs/does-a-proxy-leak-dns-doh-explained.md), [how to check for a proxy IP leak](docs/how-to-check-proxy-ip-leak.md).
- The timezone comes from the egress IP, resolved offline, so it matches the exit: [timezone and proxy mismatch](docs/timezone-proxy-mismatch.md), [offline GeoIP timezone](docs/offline-geoip-timezone-proxy.md).
**The automation layer**
- Input events come from the real input path, so `isTrusted` is true because it is true: [Playwright clicks and isTrusted](docs/playwright-clicks-istrusted.md).
- The pointer follows a human path and timing, at a cadence a real device could produce: [human mouse movement](docs/human-mouse-movement.md), [mouse dynamics as behavioural biometrics](docs/mouse-dynamics-behavioural-biometrics.md).
- The debugger surface does not answer the timing questions that give a driven browser away: [debugger timing detection](docs/debugger-timing-detection.md).
- Closed-mode shadow roots are reachable, which stock Playwright cannot do in either engine, while the page still reads `null`: [closed shadow roots](docs/closed-shadow-root-playwright.md).
---
@@ -289,7 +322,7 @@ This project is for educational purposes only. It is provided as-is, with no war
<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 151.0"></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>
<img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/badges/docs/badges/launches.svg" alt="browser launches">
<a href="https://github.com/feder-cr/invisible_playwright/stargazers"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/badges/docs/badges/stars.svg" alt="GitHub stars"></a>
</p>
@@ -0,0 +1,131 @@
---
title: "Alternative Chromium browsers for automation: what differs"
description: "Brave, Edge, Opera, Vivaldi, Ungoogled: what actually changes between the forks, and why none of it touches the CDP tells that really decide detection."
parent: "Comparisons"
nav_order: 40
---
# Alternative Chromium browsers for automation, and the one question that matters
Brave, Microsoft Edge, Opera, Vivaldi, Ungoogled Chromium: all of them build on
the open-source Chromium project, and all of them are Chromium for automation
purposes in the way that matters most. This page is about what actually
changes between the forks, and the one thing that does not.
## What Chromium being the base actually means
Every fork above takes Chromium's rendering engine (Blink), its JavaScript
engine (V8), and most of its automation surface (CDP, the same protocol
Playwright and Puppeteer speak to Chrome) largely unchanged. What each fork
adds is UI chrome, some default settings, and in a couple of cases genuine
engine-level changes - which is the part that matters and the part most
comparisons skip.
## What actually differs
**Ungoogled Chromium** strips Google-service integration and telemetry calls.
The rendering and automation surface underneath is stock Chromium. For
detection purposes this changes almost nothing observable from a page; it
changes what phones home, not what the DOM reports.
**Brave** adds a built-in ad and tracker blocker and fingerprinting
countermeasures aimed at *passive, cross-site* tracking - randomizing certain
canvas and audio outputs per session by default. That is a genuine engine-level
difference, and it cuts both ways for automation: it can make canvas-based
fingerprint matching noisier, but a browser that randomizes its own canvas
output on every load is itself an unusual, identifiable behaviour to a detector
that checks for consistency across repeat visits.
**Edge, Opera, Vivaldi** are UI and feature layers - vertical tabs, built-in
VPNs, sidebar panels - on essentially stock Chromium/Blink underneath, with UA
strings that identify them as themselves rather than as Chrome.
## The one question that matters, and none of these answer it
**Is the browser being driven by an automation protocol, and does that show?**
Every fork above, driven by Playwright or Puppeteer over [CDP](bidi-vs-cdp-detection.md),
inherits the same automation surface Chrome does, because CDP is the layer
Playwright actually talks to - the browser skin on top is close to irrelevant
to what CDP exposes. [`navigator.webdriver`](navigator-webdriver-explained.md),
the CDP-specific runtime properties, the automation flags: present in
Brave-under-Playwright exactly as in Chrome-under-Playwright, because they
come from the driving protocol, not the fork.
Picking a different Chromium skin to solve a detection problem is picking a
different paint color to fix an engine problem. The tells that matter live in
the automation layer, not in whether the tab bar says Brave or Edge.
## Where the fork does matter
- **Feature availability for your test surface.** If you are testing behaviour
specific to Edge's rendering quirks or Brave's Shields, you need that
specific browser, automation-detectability aside.
- **A UA string that must say the right thing.** If a site branches logic on
the UA rather than on capability detection, the fork's declared identity
matters for that reason alone.
- **Brave's own fingerprint randomization**, if you specifically want noisier
canvas/audio output and are not worried about the randomization itself being
a signal.
## The actual alternative, if the browser is your problem
If what you are after is a Chromium-family browser that reads as a normal
consumer install rather than an automation-driven one, the fork choice is the
wrong lever - the automation layer is. [Patchright](vs-patchright.md) takes
this approach on Chromium specifically: patching Playwright's driver to
remove the most common CDP-level tells rather than switching which skin sits
on top.
This project takes the same idea on a different base entirely: a Firefox
patched at the C++ source, chosen over any Chromium fork because Firefox is
not driven over CDP at all - a different protocol with a different, smaller
set of shared tells, on an engine most anti-bot vendors have spent
proportionally less effort fingerprinting given Chromium's dominant share.
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
is the fuller argument for that choice, independent of which Chromium fork you
were comparing against.
## Short answers to the questions that lead here
**Is Brave harder to detect than Chrome for automation?** Not meaningfully,
when driven by the same protocol. Its fingerprint randomization changes canvas
and audio output but does not touch the automation-protocol signals a detector
checks first.
**Does using Edge instead of Chrome avoid bot detection?** No. Same Blink
engine, same CDP surface when automated, different UA and UI.
**Is there a Chromium fork built for automation stealth?** Not among the
consumer forks above. Patchright and undetected-chromedriver-style projects
patch the driver layer on stock Chromium/Chrome rather than relying on a
different skin.
**Does Ungoogled Chromium avoid fingerprinting?** It removes Google telemetry
calls, not fingerprintable page-level properties. A detection script reads the
same DOM and JS surface either way.
**Which non-Chromium browser is worth trying instead?** Firefox is the
structurally different option - different rendering engine, different
automation protocol - which is the actual axis that moves the needle rather
than a Chromium skin.
**See also:**
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md),
[patchright vs invisible_playwright](vs-patchright.md) for the driver-patching
approach on Chromium, and
[what navigator.webdriver really tells a site](navigator-webdriver-explained.md)
for the flag every CDP-driven fork inherits alike.
## Sources
- [The Chromium Project](https://www.chromium.org/chromium-projects/), retrieved 2026-09-10, for what the open-source base provides to every fork.
- [Brave's own documentation on fingerprinting protections](https://brave.com/privacy-features/), retrieved 2026-09-10, for the canvas/audio randomization behaviour described above.
- [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/), retrieved 2026-09-10, for the automation surface every CDP-driven Chromium fork exposes identically.
---
*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
implicitly.*
+3 -3
View File
@@ -9,7 +9,7 @@ nav_order: 34
# Anubis: The Proof-of-Work Firewall, Explained
Every other vendor on this list is a commercial product whose internals have to be pieced together from reverse engineering, because the company that built it has no reason to publish them. Anubis is different: it is MIT-licensed, its full source is on GitHub, and its author writes publicly about why it exists and what it does not solve. This page is built almost entirely from primary material, its own repository, its own documentation, and a named security researcher's own published analysis, not practitioner reconstruction. Say that plainly, because it is the exception in this corpus, not the rule.
Every other vendor in [the survey of how websites detect bots](how-do-websites-detect-bots.md) is a commercial product whose internals have to be pieced together from reverse engineering, because the company that built it has no reason to publish them. Anubis is different: it is MIT-licensed, its full source is on GitHub, and its author writes publicly about why it exists and what it does not solve. This page is built almost entirely from primary material, its own repository, its own documentation, and a named security researcher's own published analysis, not practitioner reconstruction. Say that plainly, because it is the exception in this corpus, not the rule.
Anubis was created by Xe Iaso, a pseudonymous developer, in January 2025, after Amazon's web crawler overloaded Iaso's own Git server while ignoring `robots.txt` entirely. It is now maintained by Techaro. The name is the joke and the mechanic at once: Anubis, the Egyptian god who weighs the hearts of the dead, and the software "weighs the soul" of an incoming HTTP request before deciding whether it deserves to reach the backend at all.
@@ -27,7 +27,7 @@ Later versions moved Anubis toward something closer to a lightweight, rule-drive
## Adoption: this is not a hypothetical
Anubis is deployed in front of real infrastructure at meaningful scale, not just a research demo. Documented adopters include GNOME's GitLab instance, the Linux kernel's mailing list and Git infrastructure, FFmpeg, Wine, UNESCO, FreeCAD, ScummVM, Duke University's digital archives, OpenWRT, and the Deutsche Nationalbibliothek. Its author's own stated tradeoff is explicit rather than hidden: deploying it "will result in your website being blocked from smaller scrapers and may inhibit 'good bots' like the Internet Archive," and the project's guidance is that most sites should try Cloudflare first and reach for Anubis only when that is not an option.
Anubis is deployed in front of real infrastructure at meaningful scale, not just a research demo. Documented adopters include GNOME's GitLab instance, the Linux kernel's mailing list and Git infrastructure, FFmpeg, Wine, UNESCO, FreeCAD, ScummVM, Duke University's digital archives, OpenWRT, and the Deutsche Nationalbibliothek. Its author's own stated tradeoff is explicit rather than hidden: deploying it "will result in your website being blocked from smaller scrapers and may inhibit 'good bots' like the Internet Archive," and the project's guidance is that most sites should try Cloudflare first and reach for Anubis only when that is not an option, which in practice means the gate a visitor meets is more often [Turnstile](cloudflare-turnstile-explained.md) than this one.
## A real, named critique worth reading in full
@@ -39,7 +39,7 @@ That critique does not contradict what Anubis's own author and documentation say
This is the one detector in this whole corpus where the honest answer is: engine realness is close to irrelevant to whether the gate opens. Anubis is not testing whether a browser is lying about its fingerprint, checking canvas output, or looking for automation-framework tells. It is testing one thing: can this client execute a modern JavaScript engine fast enough to solve a SHA-256 search in a reasonable time. Any real browser, patched or unpatched, stealth or not, answers that the same way, because the puzzle does not touch fingerprint surfaces at all. A plain HTTP client with no JavaScript engine fails it regardless of how convincingly its headers are spoofed, which is the entire point: it is a liveness test for "do you run JavaScript like a browser," not a fidelity test for "are you the specific browser you claim to be."
`invisible_playwright` does not do anything specific to Anubis, and there is nothing Anubis-specific to do: a genuinely real Firefox, C++-patched or stock, solves its puzzle the same way any other real Firefox does, because the puzzle is engine-agnostic by construction. What this page is really useful for is the opposite lesson: not every gate in this space is a fingerprint problem, and treating Anubis as one would be a category error.
`invisible_playwright` does not do anything specific to Anubis, and there is nothing Anubis-specific to do: a genuinely real Firefox, C++-patched or stock, solves its puzzle the same way any other real Firefox does, because the puzzle is engine-agnostic by construction. What this page is really useful for is the opposite lesson: not every gate in this space is a fingerprint problem, and treating Anubis as one would be a category error. The gates that do read [what a browser fingerprint is made of](what-is-a-browser-fingerprint.md) are a separate family, and knowing which of the two you are behind decides whether any of that work applies at all.
## Short answers to the questions that lead here
+4 -4
View File
@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20" role="img" aria-label="Firefox: 151.0">
<title>Firefox: 151.0</title>
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20" role="img" aria-label="Firefox: 159.0">
<title>Firefox: 159.0</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="99" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
@@ -10,7 +10,7 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="28.0" y="15" fill="#010101" fill-opacity=".3">Firefox</text>
<text x="28.0" y="14">Firefox</text>
<text x="77.5" y="15" fill="#010101" fill-opacity=".3">151.0</text>
<text x="77.5" y="14">151.0</text>
<text x="77.5" y="15" fill="#010101" fill-opacity=".3">159.0</text>
<text x="77.5" y="14">159.0</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

+15
View File
@@ -89,6 +89,21 @@ as [what `navigator.vendor` and `navigator.productSub` report on Firefox](naviga
which are wrong on a Chromium base pretending to be Firefox and correct on an actual
Firefox build.
### The answer, read from a session
![One panel listing three values read from the patched engine, headless:
navigator.getBattery is undefined, navigator.vendor is an empty string, and
navigator.productSub is 20100101. A note says the bundled Firefox returned the same
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.
The two Firefox constants sit next to it on purpose. A build that reports the empty
`vendor` and `20100101` for `productSub`, and then hands a page a battery object, has
contradicted itself with three property reads: the first two say Firefox and the third
says something that is not one.
## Check it yourself in two lines
Switching from stock Playwright is a two-line change, and after that every standard
+14 -12
View File
@@ -92,20 +92,21 @@ anyone who needs it.
The cost is real and you should know it before you enable this anywhere:
**[`go_back()`](https://playwright.dev/python/docs/api/class-page#page-go-back) waiting
for `load` can time out.** A bfcache restore does not fire `load`,
because nothing loaded. Code that navigates back and waits for that event will sit there
until the timeout expires.
**`go_back()` used to time out here, and does not any more.** A bfcache restore does not
fire `load`, so code waiting for that event sat there until the deadline. The engine
reports the navigation from firefox-31, and the driver stopped caching the injected
script across a restore in 0.19.0, which was the second half of the same problem: the
page came back and the driver was still holding a handle into the world it had left.
```python
# fragile once bfcache is enabled
page.go_back() # may wait for a load that never comes
# robust either way
page.go_back(wait_until="domcontentloaded")
# fine now
page.go_back()
page.wait_for_selector("#something-on-the-previous-page")
```
Waiting for something you can see is still more robust than waiting for a lifecycle
event on a restore, because the lifecycle events genuinely do not fire again.
Waiting for something you can see is more robust than
[waiting for a lifecycle event](how-to-wait-for-page-load-playwright.md) anyway, and it
works whether or not the page was restored.
@@ -151,8 +152,9 @@ in Firefox explicitly and in Chromium effectively.
never restore, which is not how consumer browsers behave. It is a weak signal on its own
and it belongs to a family of weak behavioural signals.
**Why does `go_back()` hang after I enable bfcache?** Because a restore does not fire
`load`. Wait for `domcontentloaded` or for an element instead.
**Does `go_back()` still hang?** No, since firefox-31 for the navigation and 0.19.0 for
the driver side. Wait for an element rather than for `load`, which does not fire again
on a restore.
**Should I enable it?** For realistic sessions yes, for deterministic test suites
probably not.
@@ -174,7 +176,7 @@ for where behavioural signals sit in the wider picture.
and [MDN: the `pageshow` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event),
which documents `persisted`.
- Playwright's documented [`go_back()`](https://playwright.dev/python/docs/api/class-page#page-go-back)
and its `wait_until` values, including `domcontentloaded`.
and its `wait_until` values.
- The Playwright tracker's open items on bfcache behaviour and on enabling it under
Chromium.
- This project's driver, which reads a preference before disabling the cache and leaves
+124
View File
@@ -0,0 +1,124 @@
---
title: "Browser automation testing tools: where each one fits"
description: "Playwright, Selenium, Cypress and Puppeteer by what each one was built to test, not by feature count, plus the axis none of the four was designed around."
parent: "Comparisons"
nav_order: 41
---
# Browser automation testing tools, and where each one actually fits
Four names come up constantly and get compared as if they were interchangeable:
Playwright, Selenium, Cypress and Puppeteer. They overlap enough to confuse
and differ enough that picking by feature-list length is how people end up
fighting the wrong tool for a year.
## The four, by what they are actually built for
**Playwright.** General-purpose, cross-browser (Chromium, Firefox, WebKit),
built by Microsoft with auto-waiting and multi-language support (JS/TS,
Python, Java, .NET). The current default recommendation for new
browser-automation projects that need real cross-browser coverage.
**Selenium.** The oldest and most widely deployed, via the W3C WebDriver
standard. Broadest language support, largest historical ecosystem, and the
one that can drive an actual retail browser install rather than a
framework-maintained build - relevant if you specifically need to test
against exactly what your users have installed.
**Cypress.** Built specifically for testing web applications from inside the
browser, running in the same run-loop as your app rather than driving it from
outside. Excellent developer experience and debugging for single-page apps,
historically Chromium-only in practice (with newer versions adding limited
Firefox and WebKit support), and architecturally not built for the kind of
cross-origin, multi-tab scraping work Playwright and Selenium both handle
natively.
**Puppeteer.** Chromium/Chrome only, Node.js only, maintained by the Chrome
team. If your target is specifically Chrome and your stack is Node, it is a
direct, well-supported option; it does not cover Firefox or WebKit at all.
## Choosing by what you are actually testing
| Your situation | Reach for |
|---|---|
| Cross-browser regression suite, multiple languages on the team | Playwright |
| Testing a Chrome-only internal app, Node stack already in place | Puppeteer |
| Fast-feedback testing of a single-page app you are actively developing | Cypress |
| Must drive an actual retail-installed browser, not a framework build | Selenium |
| Large legacy Selenium suite that works | Selenium, don't rewrite for its own sake |
| Real-world scraping across multiple sites, need Firefox specifically | Playwright |
## The axis none of these four are built around
All four of these are testing tools, built to verify that **your own
application** behaves correctly under known, cooperative conditions. None of
them was designed against a page actively trying to distinguish automation
from a human - because for their primary use case, the page being tested is
yours, and it has no reason to fight you.
That changes completely when the target is someone else's site and it is
actively fingerprinting. Every one of these four, used with its default
browser build, presents recognizable automation signals: `navigator.webdriver`
under WebDriver-based tools, CDP-visible properties under CDP-driven ones,
and browser builds that differ from a retail install in ways a determined
detector checks for. Picking Playwright over Selenium, or Puppeteer over
Cypress, does not change this axis at all - it is orthogonal to which testing
tool you picked.
## Where this project sits
[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
if the Firefox underneath it was patched at the C++ source rather than
Playwright's stock automation build? It is the engine layer beneath a testing
tool, not a replacement for one.
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
covers why Firefox was the base worth patching, and
[patchright vs invisible_playwright](vs-patchright.md) covers the equivalent
idea applied to Chromium instead.
## Short answers to the questions that lead here
**Is Playwright better than Selenium?** For new cross-browser projects,
usually yes - faster, auto-waiting, fewer moving parts. Selenium's breadth of
language support and ability to drive a real retail browser remain real
advantages in specific cases.
**Is Cypress a replacement for Selenium or Playwright?** Not a direct one.
Cypress is purpose-built for testing an application you control from inside
the browser's run-loop, and is a weaker fit for cross-origin scraping or
multi-tab flows that Selenium and Playwright handle natively.
**Does Puppeteer support Firefox?** Puppeteer has had experimental Firefox
support at various points; it is not the primary, well-maintained target the
way Chrome is. If Firefox specifically matters, Playwright is the
better-supported cross-browser option.
**Which tool is hardest to detect?** None of the four is built with detection
resistance as a design goal, and the default automation build under any of
them is recognizable. That is a separate axis from which testing tool fits
your testing needs.
**Can I use these for scraping instead of testing?** Yes, and Playwright and
Selenium in particular are commonly used this way - but recognize that you
have moved outside each tool's primary design intent, onto an axis (adversarial
detection) none of them was built to address.
**See also:**
[Selenium vs Playwright: the actual differences](difference-between-selenium-and-playwright.md),
[Migrating from Puppeteer to Playwright for stealth](migrate-puppeteer-to-playwright-stealth.md),
and [Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md).
## Sources
- [Playwright's own documentation](https://playwright.dev/), [Selenium's documentation](https://www.selenium.dev/documentation/), [Cypress's documentation](https://docs.cypress.io/), and [Puppeteer's documentation](https://pptr.dev/), all retrieved 2026-09-10, for each project's stated scope and browser support.
---
*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
to answer.*
@@ -81,6 +81,21 @@ a real AudioContext output, and Windows screen metrics with a plausible availabl
and device pixel ratio. Those answers are the same whether the host is your laptop or a
Linux container, because they are presented by the browser rather than read from the box.
## What each browser answers on the same page
![Two panels listing three values. navigator.webdriver differs, true against false. The
AudioContext sample rate is 48000 Hz in both. navigator.platform is Win32 in
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
the server tell on this host.
That is worth showing precisely because the section above is about a machine looking
like a server rather than a desktop. On a real desktop with a real audio device the
sample rate is ordinary in both, and the value that separates the two runs is the
automation flag, which is not a server signal at all.
## What invisible_playwright presents instead
The launch is two lines, and the browser you get back is a real Playwright
@@ -80,6 +80,22 @@ the folder.
This is not a bug in private mode. Private mode never promised a new identity. It
promised no leftover state, and it delivers that.
## What changes when the values change
![Two panels listing three values. localStorage is available in both browsers, and both
report that the screen and the viewport differ, so neither looks like
resistFingerprinting is on. The canvas pixel hash differs between the two
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
probe is not reading state.
The line that moves is the canvas, hashed from `getImageData` bytes rather than from
`toDataURL`, and the reason for that choice is measured in
[why a canvas hash changes between runs](canvas-fingerprint-changes-every-run.md): the
encoded string moves on its own even when the pixels do not.
## Changing the values themselves, not clearing storage
If the problem is that the fingerprint values are stable and readable, the fix is to
@@ -119,7 +119,8 @@ step so the download never lands on a request path:
```dockerfile
FROM python:3.12-slim
RUN pip install invisible-playwright
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
RUN uv pip install --system invisible-playwright
# Unpack the engine at BUILD time, not per request.
RUN python -m invisible_playwright fetch
# ... your worker entrypoint ...
+52 -2
View File
@@ -33,8 +33,11 @@ audio pipeline draw the same thing every time.
In this browser, those three readbacks are overwritten before they reach your code.
The value you read is a pure function of one number: an internal hardware seed the
wrapper derives from the identity seed of the session. Same seed in, same bytes out.
Different seed, different bytes.
wrapper derives from the identity seed of the session. Same seed in, same bytes out,
which is the direction you can rely on. The reverse does not hold as neatly: two
different identity seeds can land on the same hardware seed and hand you the same
readback, so a changed seed is not a guarantee of changed bytes. If you need two
sessions to look like two machines, check the readback rather than assuming it.
So when you launch without passing a seed, each session gets a new one, and the three
hashes move together in a self-consistent way. That is not the spoof failing. That is
@@ -123,6 +126,47 @@ pages is that you [assert the presence of the right value rather than the absenc
wrong one](how-to-test-bot-detection.md), and this is a case where you can measure the
right value directly.
![Four sessions of the same page served from localhost. Two sessions launched without
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/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
disagree on both readbacks. The two seeded ones agree on both, and their screenshots
are identical pixel for pixel, 0 of 79,800 differing.
The detail worth noticing is that the drawing looks the same in all four panels. Your
eye cannot separate them; the hash separates them immediately. That is the shape of
this whole surface: the readback is not the picture, and a page that hashes it is not
looking at what you are looking at.
The second unseeded panel is also physically larger, because that session drew at a
different device pixel ratio. It is not only the readbacks that get redrawn per
session: the device does.
**Two things about that panel are worth stating precisely, because guessing them wrong
sends you debugging the wrong thing.**
**What changes on every unseeded launch is the device, not necessarily the readback.**
Five unseeded launches, reading four values each: the screen alternated between
1920x1080 and 2560x1440, the core count between 4 and 12, the device pixel ratio
between 1 and 1.25. All five moved. The canvas readback, over the same five launches,
returned the same value four times. So **two unseeded runs agreeing on a canvas hash is
not evidence that your seed took effect** - it is the likelier outcome. Check a value
that varies freely, like the screen or the core count, when you want to know whether a
new identity was drawn.
**And if you hash `toDataURL()`, you are partly hashing the PNG encoder.** On the
bundled Firefox, three launches drawing the identical canvas returned three different
`toDataURL()` hashes while `getImageData()` returned the same pixel bytes all three
times. The pixels never moved; the encoded string did. A canvas hash that changes
between two runs of a *stock* browser is usually this, not a fingerprinting defence, and
it is not something `privacy.fingerprintingProtection` or `privacy.resistFingerprinting`
explains: both were tested off and on, and the encoded string kept moving either way.
Compare `getImageData` bytes when you want to know whether the drawing changed.
Draw to a canvas, read it back with
[`toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL),
and compare the hash across two launches with the same seed:
@@ -218,6 +262,12 @@ after launch and log it. Passing that number back reproduces the same device.
same cookies but a different fingerprint is a contradiction. Keep one stable seed per
durable identity.
**Should I hash `toDataURL()` or `getImageData()`?** `getImageData`, if you want to know
whether the drawing changed. Three launches of the bundled Firefox drawing the same
canvas returned three different `toDataURL` hashes and the same pixel bytes every time:
the encoded string moves on its own, so a data URL hash reports changes the canvas never
made.
## Sources
- The project's fingerprint generator, in which the canvas, WebGL and audio readbacks
+16
View File
@@ -133,6 +133,22 @@ pixel: [`measureText()` and its ten-plus numeric fields](measuretext-textmetrics
which fail the same way for the same reason if the noise added to them accumulates
instead of staying bounded.
## Substitution, seen on one page
![Two panels listing three values. The canvas pixel hash differs between the bundled
Firefox and the patched engine. The measureText width is 115.65 px in both, and both
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.
That pairing is the distinction this page is built on. A substituted readback changes
what comes out of the canvas without changing the layout metrics the same text produces,
so a detector comparing the two does not find the mismatch that per-call noise creates.
The hash comes from `getImageData` bytes on purpose: `toDataURL` output moves between
launches on the bundled browser too, for encoder reasons that have nothing to do with
the drawing.
## Checking your own
```js
+116
View File
@@ -0,0 +1,116 @@
---
title: "How to check a proxy's status before you rely on it"
description: "Liveness, exit location, latency and browser behaviour are four checks, not one. The order to run them, and what none of them can tell you about a site."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 40
---
# How to check a proxy's status before you rely on it
"Is my proxy working" is actually four separate questions, and treating it as
one is how people spend an hour debugging a browser fingerprint when the
proxy was down the whole time, or blame a working proxy for a site's own
block.
## The four checks, in the order to run them
**1. Is it alive at all?** Before touching a browser: `curl` through it and see
if you get a response.
```bash
curl -x socks5h://user:pass@host:port https://ifconfig.me
```
`socks5h` (not `socks5`) resolves DNS through the proxy rather than locally,
which matters for the leak question below. An HTTP proxy uses
`curl -x http://user:pass@host:port ...` instead. If this hangs or errors, stop
here - nothing downstream will work and no browser-level fix changes it.
**2. Where does it say it is exiting from?** The `ifconfig.me` response gives
you the exit IP. Check it against a geolocation lookup and against what you
expected to pay for. A proxy sold as "US residential" that resolves to a
datacenter ASN in a different country is not doing what you bought it for,
and this is worth catching before you spend time on anything else.
**3. Is it fast enough for what you are doing?** `curl -x ... -w "%{time_total}\n" -o /dev/null -s https://example.com`
gives you a round-trip number. A proxy that is technically alive but takes
eight seconds per request will make an automated flow look nothing like a
human's browsing rhythm, independent of any fingerprint concern.
**4. Does it hold up through an actual browser session, not just curl?** This
is the check people skip, and it is where a proxy that passes checks 1-3 can
still fail in practice. `curl` and a browser are different clients: a browser
opens more connections, resolves DNS differently depending on configuration,
and can leak the real address through WebRTC regardless of what the HTTP
proxy is doing correctly.
[How to check if a proxy leaks your real IP](how-to-check-proxy-ip-leak.md)
is the browser-level version of this check, and it is not optional if the
proxy's whole purpose is to hide the real address - a proxy that passes
`curl` but leaks over WebRTC has not actually done its job.
## What "proxy status" checks cannot tell you
None of the four checks above say anything about whether a *site* will let
you through. A perfectly healthy, correctly-exiting, fast proxy still gets
challenged if the browser behind it reports as automated, or if the exit
address has been used by enough other traffic to earn a bad reputation on
that specific site's own reputation database. Conflating "my proxy is up" with
"the site accepts my proxy's traffic" is a different confusion in the other
direction from the one above, and it sends people rotating proxies to fix a
browser-fingerprint problem.
## A quick reference for interpreting results
| Symptom | Likely cause | Where to look |
|---|---|---|
| curl through the proxy hangs or errors | Proxy is down or credentials are wrong | Check 1 |
| curl works, exit IP is wrong country/ASN | Wrong proxy config or provider issue | Check 2 |
| curl works, browser session times out | Browser-specific connection handling, or WebRTC leaking real address and site rejecting the mismatch | Check 4 |
| Everything above passes, site still blocks | Fingerprint, rate, or behavioural detection - not the proxy | See below |
If you have run all four checks and the proxy is confirmed healthy and
non-leaking, and you are still being challenged, the proxy has done its job
and the remaining problem is elsewhere.
[Why does my Playwright script get blocked?](why-does-my-playwright-script-get-blocked.md)
is the next page to read, and it starts from exactly this point: address
confirmed fine, now what.
## Short answers to the questions that lead here
**How do I know if my proxy is working?** Run `curl` through it against an IP
echo service before touching a browser. If that fails, nothing above it will
work either.
**Why does my proxy work in curl but not in my browser?** Different clients
handle DNS and WebRTC differently. A working `curl` test does not rule out a
WebRTC leak or a browser-specific connection issue.
**How often should I check a proxy's status?** Before every automated session
that depends on it mattering, if the proxy is shared or rotating - a proxy
that worked an hour ago can have changed reputation or gone down since.
**Does a slow proxy get detected more?** Indirectly: unusually slow, uniform
latency is itself a signal in aggregate behavioural analysis, separate from
whatever the proxy's address reputation is.
**Is a datacenter proxy always worse than residential?** Not universally - it
depends entirely on whether the specific site treats datacenter ranges
differently, which varies by site.
**See also:**
[How to check if a proxy leaks your real IP](how-to-check-proxy-ip-leak.md),
[Setting a proxy per Playwright context](set-geolocation-permissions-per-playwright-context.md),
and [WebRTC leak with a proxy](webrtc-leak-proxy.md).
## Sources
- [Playwright's documented proxy configuration](https://playwright.dev/python/docs/network#http-proxy), retrieved 2026-09-10, for how proxy credentials and per-context proxies are set.
- This project's own release gates, including the positive-form WebRTC check referenced in check 4, which replaced an earlier negative-only assertion that a fully blocked WebRTC connection could pass by mistake.
---
*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.*
+11 -3
View File
@@ -46,7 +46,9 @@ probing for web APIs, and other checks aimed at browser quirks and human behavio
family of idea as Hashcash: spend a measurable amount of CPU on something that is
cheap for the server to verify. A script that can run arbitrary JavaScript pays this
cost the same as a real browser does; a client with no JS engine at all cannot pay it
and never produces a token.
and never produces a token. A gate built on that idea alone exists in the open, and
[Anubis is readable end to end](anubis-proof-of-work-explained.md) in a way Turnstile
is not, which makes it the cheapest way to see what this layer can and cannot decide.
**Proof-of-space** is the storage-based cousin of the same idea, trading disk or
memory instead of CPU cycles.
@@ -58,7 +60,10 @@ page claims to be. Cloudflare does not publish the exact list of properties it r
and the widget script itself is not meant to be human-readable, so anyone claiming a
precise inventory of what it checks is going further than Cloudflare's own
documentation does. What is documented is the shape of the approach, not the field
names.
names. The shape is the part worth internalising: a value being wrong matters less
than two values disagreeing, which is why a mismatch like
[a platform string that contradicts the oscpu beside it](navigator-platform-oscpu-consistency.md)
is a stronger signal than either field on its own.
The point of running all of this before showing anything is stated plainly in
Cloudflare's docs too: the goal is to "fine-tune the difficulty of the challenge to
@@ -89,7 +94,10 @@ When Managed mode does decide to show something, Cloudflare's own documentation
describes it as a "simple checkbox that the visitor must click to proceed", explicitly
not an image puzzle or text to transcribe. This is the point worth being precise
about: the checkbox is not another fingerprint probe layered on top of the earlier
ones. It is a click, gated behind whatever risk score the earlier signals produced.
ones. It is a click, gated behind whatever risk score the earlier signals produced,
and a click carries its own provenance:
[a click dispatched from page JavaScript is never trusted](playwright-clicks-istrusted.md),
while one produced by the driver or the engine is.
That distinction matters for what a real engine can and cannot do about it. Everything
in the non-interactive layer, the proof-of-work, the API probing, the consistency
+3
View File
@@ -59,6 +59,9 @@ need rendering. Each page below states where the other tool covers more.
- [Why Playwright Locators Never Throw StaleElementReferenceException](playwright-vs-selenium-stale-element-reference.md) - Selenium's WebElement holds a live reference that goes stale; Playwright's Locator re-resolves on every action.
- [How to Read a Stealth-Browser Benchmark Without Being Misled](how-to-read-a-stealth-browser-benchmark.md) - What to check before trusting a comparison, including this project's own, since almost every published one ranks itself first.
- [Web Scraping Proxy Costs: Build vs. Buy Your Stealth Stack](web-scraping-proxy-costs-build-vs-buy.md) - Proxy spend, engineering maintenance time and vendor lock-in, without the invented totals most build-vs-buy pages lead with.
- [Selenium vs Playwright: the actual differences](difference-between-selenium-and-playwright.md) - Protocol, driver architecture and auto-waiting compared from each project's own docs, plus the one difference neither's docs foreground.
- [Alternative Chromium browsers for automation](alternative-chromium-browsers-for-automation.md) - Brave, Edge, Opera, Vivaldi: what actually differs between the forks, and why none of it touches the CDP-level tells that matter.
- [Browser automation testing tools, and where each one actually fits](browser-automation-testing-tools.md) - Playwright, Selenium, Cypress, Puppeteer by what they were each built to test, not by feature-list length.
## Patched-engine, driver-patch and stealth-plugin tools
+2 -1
View File
@@ -71,7 +71,8 @@ row is for a specific situation.
| Variable | When you need it |
|---|---|
| `INVISIBLE_PLAYWRIGHT_CACHE_DIR` | Put the cached engine somewhere else - another drive, a shared location, a path your CI already caches |
| `INVISIBLE_PLAYWRIGHT_CACHE_DIR` | Put the cache somewhere else - another drive, a shared location, a path your CI already caches. It holds the engine and this machine's state (the GeoIP database, the font manifest) |
| `INVISIBLE_PLAYWRIGHT_ENGINE_DIR` | Keep the engine apart from the state, for example on a read-only disk built once per release: `invisible-playwright fetch` with it set fills it, and a launch only reads it. The cache directory must still be writable |
| `INVPW_BINARY_PATH` | Point at a binary you already have, and skip the download |
| `STEALTHFOX_GITHUB_TOKEN` | A rate-limited or corporate network that refuses anonymous GitHub downloads |
| `INVISIBLE_PLAYWRIGHT_SKEW=allow` | Run a Playwright version outside the tested range anyway |
@@ -20,6 +20,12 @@ widget. The failure is silent in the way CSP failures usually are: no exception
Python code, a console warning in the browser you likely never read, and code that
simply never ran.
That is worth reading as a property of the layer, not an accident. An init script is
page JavaScript, and page JavaScript is the outermost of
[the three levels anything can be changed at](playwright-stealth-levels.md): it is the
level the page itself is allowed to have an opinion about, and CSP is the page
exercising that opinion.
## What CSP actually restricts
By default, a policy that sets `default-src` or `script-src` blocks inline `<script>`
@@ -74,7 +80,10 @@ that is a difference from a genuine session, not a neutral convenience. Whether
specific target's own logic could ever observe that difference from inside the page is a
separate question this page cannot answer for you, but the premise underneath
"bypassing CSP is invisible" does not hold: it is a real change to how the page executes,
not a transparent workaround.
not a transparent workaround. It belongs on the same list as every other setting that
makes a session behave unlike a visitor's, which is the list
[the checklist for a session being detected](playwright-detected-as-bot.md) works
through in order.
The practical rule: use `bypassCSP` when you are testing your own integration against
your own header and you know exactly why it is there. Treat it as a real behavioral
+36
View File
@@ -56,6 +56,36 @@ useful to a detector: it is stable for one machine, and it varies between
machines, because the installed-font set is one of the more distinctive things
about a device.
### The blind spot in that snippet, measured
The probe above is the one detectors use, and it has a false negative worth knowing
before you trust its output: **a family that IS the fallback is invisible to it.**
![The probe run on one Windows machine across three browsers, each testing ten
families against two different fallbacks. Segoe UI, Calibri, Cambria and Tahoma read
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/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`
resolves to on that machine, so the candidate width and the baseline width are the same
number, and the comparison reads "fell back" when nothing fell back.
Swap the fallback to `serif` and the same family reads **present**, on the same page in
the same session. The invented control family stays absent under both, which is what
makes the Consolas row a finding, not a broken probe.
So the rule stated above holds with one exception: an identical width means the
candidate did not render *or* the candidate is the fallback. A detector that probes
against a single generic will systematically miss whichever family that generic points
at, and which family that is depends on the platform.
The other thing the three panels show is that the answer does not move. The bundled
Firefox headful, the same build headless, and an engine carrying its own font set all
return the same ten bits on this host.
## Why this is different from hashing measureText
It is easy to lump this in with `measureText` fingerprinting, but the two probe
@@ -241,6 +271,12 @@ font set is built from one manifest on every OS, and the width for a run carries
single bounded, seed-derived offset instead of the host rasterizer's metrics, so
the numbers track the seed rather than the operating system.
**Why does the probe say a font is missing when I know it is installed?** Because the
candidate is the fallback. Measured on Windows: `Consolas` reads absent against a
`monospace` fallback and present against a `serif` one, in the same session, since
`monospace` resolves to Consolas there and the two widths match. Probe against a second
generic before believing an absent.
## Sources
- This project's font architecture notes: a bundled Windows font set built from a
@@ -0,0 +1,157 @@
---
title: "Selenium vs Playwright: the differences that matter"
description: "Protocol, driver architecture, auto-waiting and browser support from each project's own docs, plus the one difference neither project's docs foregrounds."
parent: "Comparisons"
nav_order: 39
---
# Selenium vs Playwright: the actual differences
Both drive a real browser. The differences that matter are in how they talk to
it, not in what either one can technically click, and most comparisons stop
before the difference that a defended site actually reads.
## Protocol
**Selenium** speaks the W3C WebDriver protocol: your test code sends an HTTP
request to a driver process (geckodriver, chromedriver), which translates it
into browser-specific automation calls. That extra hop is a JSON server in the
middle of every action.
**Playwright** speaks each browser's own remote-debugging protocol directly -
CDP for Chromium, its own protocol for Firefox and WebKit - with no
intermediate driver process. One fewer moving part, and it is also why
Playwright ships its own browser builds rather than driving whatever happens
to be installed.
The practical consequence: Playwright is generally faster and has fewer version
mismatches to manage, because there is no separate driver binary to keep in
sync with the browser. Selenium's WebDriver layer is a published spec, which
is why so many languages and tools speak it; Playwright's protocols are not a
public spec, which is why Playwright itself has to ship the client libraries.
## Auto-waiting
Selenium waits for an element to exist. Playwright waits for it to be
**actionable** - visible, stable, not covered by another element, not
disabled - before acting on it. This single design choice removes a large
share of the flaky-test problem Selenium suites are known for, where a test
clicks an element that technically exists but has not finished animating into
place.
You can build the same waiting logic into a Selenium suite by hand. Playwright
builds it into every action by default.
## Browser support and architecture
Selenium supports whatever has a WebDriver implementation: Chrome, Firefox,
Edge, Safari, and older browsers nobody ships anymore. Playwright supports
Chromium, Firefox and WebKit, using patched builds it maintains itself rather
than the retail installs on your machine.
That difference cuts both ways. Selenium can drive the exact browser your users
have, retail build and all. Playwright's browsers are a known, pinned,
Playwright-maintained artifact - consistent across machines, and also a
specific automation build with its own fingerprint, discussed below.
## Language and ecosystem
Selenium has bindings older and wider than Playwright's: every mainstream
language, decades of Stack Overflow answers, and a WebDriver spec that other
tools (Appium, for mobile) build on. Playwright covers JavaScript/TypeScript,
Python, Java and .NET officially, younger, with fewer historical workarounds
needed because the API was designed after auto-waiting was already a known
problem.
## The difference neither project's own docs foreground
Both are legitimate testing tools built for testing, and neither one was
designed against adversarial detection. But they end up in different places on
that axis anyway, for structural reasons:
**[`navigator.webdriver`](navigator-webdriver-explained.md) is `true` under
both by default**, because it is part of the WebDriver spec both implement,
not a Selenium-specific flag.
**Selenium via geckodriver or chromedriver adds an extra network hop and
process**, which shows up in timing and in a few CDP/WebDriver-specific
properties a determined detector can check for.
**Playwright's own browser builds [carry properties that differ from a retail
install](chromium-is-not-chrome.md)** - build flags, missing OS integration
pieces, a UA string that can disagree with what the build actually is -
because they were built for automation, not for the browser vendor's own
release pipeline.
Neither framework is "worse" here; both are automation tooling used the way
automation tooling looks, which is a separate question from which one has the
nicer API.
**And the layer below both of them is bigger than the gap between them.**
Measured in this project on one build, the same seed, changing only the host:
font ascent and descent diverged on **58 of 72 families** (up to 27px at 72pt)
and line-box height on 61, while **every advance width already matched**,
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/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
at all.
[Migrating from Selenium to Playwright for stealth](migrate-selenium-to-playwright-stealth.md)
is the practical guide if the browser, not the API, is your actual problem.
## Which to pick
- **An existing large Selenium suite, no detection problem:** stay. Rewriting a
working suite for architecture purity is rarely worth it.
- **A new suite, no detection problem:** Playwright, for auto-waiting alone.
- **Automation is being recognized and you need the retail browser exactly as
your users have it:** Selenium can drive it directly; Playwright's patched
builds are a different thing, unless you point it at a real engine as this
project does.
- **Automation is being recognized and you can accept a modified engine:**
Playwright with a patched build.
## Short answers to the questions that lead here
**Is Playwright faster than Selenium?** Generally yes, from the missing driver
hop and less flakiness from auto-waiting, not from any raw execution
advantage.
**Is Playwright replacing Selenium?** For new projects, largely, but Selenium's
installed base and WebDriver's status as a real spec keep it relevant,
especially where Appium and mobile matter.
**Does Selenium still get updates?** Yes, actively maintained, including 4.x's
own move toward Chrome DevTools Protocol features alongside WebDriver.
**Which one is more detectable?** Neither is inherently worse; both default to
`navigator.webdriver = true` and both are recognizable automation stacks
unless something changes the underlying browser.
**Can I use Playwright's API with Selenium's driver model?** No, they are
separate protocols end to end. Patchright and similar projects patch
Playwright's own driver instead of switching protocols.
**See also:**
[selenium-driverless vs invisible_playwright](vs-selenium-driverless.md) for the
driver-removal approach from Selenium's side, and
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
for the engine question once you have picked a framework.
## Sources
- [Selenium's own documentation on WebDriver and its components](https://www.selenium.dev/documentation/overview/components/), retrieved 2026-09-10.
- [Playwright's documentation on browsers and why it ships its own builds](https://playwright.dev/python/docs/browsers), retrieved 2026-09-10.
- [MDN, `Navigator.webdriver`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver) and the [WebDriver specification](https://www.w3.org/TR/webdriver2/#interface), for the flag both frameworks inherit.
- This project's own fingerprint gates, for the claim that a patched engine changes what the browser reports versus what Playwright's stock builds report.
---
*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.*
+58
View File
@@ -0,0 +1,58 @@
---
title: "Differences from Playwright"
description: "Where invisible-playwright deliberately behaves differently from upstream Playwright, what it refuses, and why each one is a choice rather than a gap."
parent: "Documentation"
nav_order: 6
---
# Differences from Playwright
invisible-playwright adds nothing to Playwright's API: every method, option and
argument is Playwright's own. Where it cannot do what Playwright does without leaving
something a page can see, or without claiming to have done something it did not, it
says so with an error instead of pretending. This page lists those places.
## Objects that are not implemented
These exist only so the object tree is well formed. Every call on them raises an error
that names the reason.
| Object | Why |
|---|---|
| `Tracing` | It records a session for the trace viewer and drives none of it. `tracing.stop()` is accepted and does nothing, so code that always stops a trace keeps working. |
| `APIRequestContext` (`context.request`, `playwright.request`) | It sends HTTP from outside the page, without the browser's fingerprint, which is the opposite of what this package is for. |
## Calls that are refused
| Call | What happens | Why |
|---|---|---|
| `set_input_files()` with a folder | Error | The engine takes files. Pass the files inside the folder. |
| `set_input_files()` with an in-memory payload | Works, but `mimeType` is ignored | The payload is written to a file and handed over the way a user's pick is, so Firefox derives the type from the file name, as it does for a real pick. |
| `drop()` with an explicit data payload | Error | The engine builds the `DataTransfer` from a real pointer drag. Use `drag_and_drop()`. |
| `route_web_socket()` | Error | The engine reports WebSocket frames but cannot hold or rewrite one, so a route would look like it worked and pass everything through. |
| Screencast to a video file | Error | The engine streams JPEG frames and has no encoder. Pass `on_frame=` to receive the frames. |
| `register_selector_engine()` or `set_test_id_attribute()` after a page exists | Error | Both are built into the page's injected script when it is created. Call them before the first page. |
| `expose_binding()`, `expose_function()` | Error, not implemented yet | The page-facing half is easy; the reply path into the page's promise is not wired, and a binding that never answers would hang the page. |
| `set_storage_state()` with per-origin `localStorage` | Error, not implemented yet | Restoring only the cookies would look like success and leave half the session missing. |
| `response.body()` on a very large or old response | Error | The engine keeps at most 100 MB of response bodies per tab and 10 MB per response. Read the body sooner. |
## Behaviour that differs on purpose
- **`service_workers="block"`** is honoured by the engine itself, per context, with
no page script: `register()` fails the way it fails when the worker's script is
unreachable, and `navigator.serviceWorker` stays native. Playwright does it with a
page script whose source names Playwright. On a persistent profile, turning the
block on removes the service workers the profile had saved for that context, and
they do not come back when the block is turned off.
- **Language.** `locale="auto"` (the default) declares the language of a Firefox
build people in the proxy's country actually run. An explicit `locale` is
`navigator.language`, followed by the fallbacks Firefox itself adds
(`en-AU, en-US, en`).
- **Human input.** With `humanize=True` (the default) the pointer moves along a paced
path, typing pauses before the first key, and a file chooser waits as a person
looking for the file does. Calls take longer than in Playwright, and the page sees a
person's timing.
- **The server speaks to this client only.** The bundled Playwright client and the
bundled server are versioned together; a stock Playwright client cannot drive the
server directly.
+1 -1
View File
@@ -141,7 +141,7 @@ Playwright method works unchanged because there is no wrapped subset to learn.
Install is the ordinary way, and the engine downloads itself on first use:
```bash
pip install invisible-playwright
uv add invisible-playwright
```
That is the engine layer, in full, scriptable. What it does not print is a
+12
View File
@@ -81,6 +81,18 @@ All three are page-visible because they live in the document or the global scope
them is the control channel. Fixing them is a matter of not writing them into the page in
the first place, which is a design decision, not a runtime patch.
There is a fourth, and it is the one you control rather than one the browser decides:
**an init script of your own that throws reaches the page.** A script added with
`page.add_init_script()` runs in the page's own realm, so a callback it registers - an
event listener, a timer, a promise - throws into that realm like any other page code.
An uncaught one reaches the page's `window.onerror` with `"eval code"` as its source,
which is a string a document that never calls `eval` has no other way to produce. The
browser's own injection does not do this: measured on a page that installs `onerror`,
a capturing `error` listener and `unhandledrejection` before anything else, then reads
every surface this package spoofs, nothing surfaces across repeated loads, reloads and
an iframe. So keep your own init scripts inside `try { } catch { }`, especially the
callbacks they leave behind, and prefer feature checks over assuming a property exists.
## Chromium injects cdc_ into the document; Firefox through Juggler does not
Chromium-based tooling writes `cdc_`-prefixed properties into the page; Firefox driven
+1 -1
View File
@@ -112,7 +112,7 @@ The launch is the same two lines for both agents. The seed makes the identity
reproducible, so a failing run can be replayed rather than guessed at.
```bash
pip install invisible-playwright
uv add invisible-playwright
```
A DOM-reading agent reads structure and acts on a selector:
+3 -3
View File
@@ -223,9 +223,9 @@ deploy on. A blank or changing emoji is a failure, not a pass.
## Sources
- This project's font architecture and its cross-OS font gate, which runs the
browser on a Linux host with no Windows fonts and reads what it renders,
including colour emoji (decision log, 2026-06-20).
- This project's font architecture and its cross-OS host gate, which runs the
browser on a Linux host with no Windows fonts and compares what a page reads,
colour emoji included, with the Windows build (decision log, 2026-06-20).
- Firefox's use of a bundled colour-emoji font in place of the platform emoji
font, verified against a stock build on more than one operating system.
- [`HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
+13 -4
View File
@@ -13,8 +13,11 @@ nav_order: 33
failed. Chromium's own network error list defines it as "an operation was aborted
(due to user action)," and the cancelling "action" is very often something your own
page, your own script, or Playwright's own navigation handling did on purpose. This
is the one error on this page's list of siblings that is frequently not a problem at
all, and treating every occurrence as a bug wastes time chasing something that
is the one error in the `net::ERR_` family that is frequently not a problem at
all. [ERR_CONNECTION_RESET](err-connection-reset-playwright.md) and
[ERR_HTTP2_PROTOCOL_ERROR](err-http2-protocol-error-playwright.md) report a
connection that genuinely broke; this one usually reports one that was closed on
purpose, and treating every occurrence as a bug wastes time chasing something that
already worked.
## The causes that are usually fine
@@ -61,7 +64,10 @@ in-flight navigation rather than the intended third-party request.
**`page.close()` was called while a navigation was still in flight.** Closing the
page tears down whatever requests it had open; if that happens mid-navigation on
purpose or by an unrelated timeout, the abort is real and the navigation that was
racing it never gets a result.
racing it never gets a result. When the teardown came from the browser or the
context disappearing under you, the exception that surfaces first is usually
[TargetClosedError](playwright-targetclosederror-causes.md), and the abort is the
second thing you see.
**A route handler that never resolves.** A `page.route()` interceptor that neither
calls `route.continue()`, `route.fulfill()`, nor `route.abort()` leaves a request
@@ -92,7 +98,10 @@ of browser realness changes whether it fires. It is a navigation-lifecycle signa
that fires identically on a stock Playwright Chromium, a stock Firefox, and this
project's patched build, because the cancellation is decided by request-handling
logic in the engine, on your own code's instruction, not by anything about how real
the browser's identity looks to a remote site.
the browser's identity looks to a remote site. The error that does carry that
second meaning is a different one:
["Execution context was destroyed" can be a navigation you did not ask for](execution-context-destroyed.md),
which is worth reading before deciding an abort was a block.
## Short answers to the questions that lead here
+17 -2
View File
@@ -36,7 +36,10 @@ installed in the browser's trust store, that certificate is signed by an authori
nothing trusts. This is functionally identical, from the browser's point of view, to
a hostile machine-in-the-middle attack, because it is the same mechanism: someone
between you and the destination is terminating TLS you did not expect them to
terminate.
terminate. Note where in the sequence this leaves you: the tunnel was established
and the certificate on the far side of it is what failed. A proxy that refuses the
tunnel outright never gets this far and reports
[ERR_TUNNEL_CONNECTION_FAILED](err-tunnel-connection-failed-playwright.md) instead.
**An expired or misconfigured intermediate certificate.** A chain that used to
validate can stop validating the moment an intermediate CA cert expires or gets
@@ -66,6 +69,14 @@ to be adversarial. A context configured this way cannot tell the difference betw
your trusted proxy's re-signed certificate and a hostile one sitting on public
Wi-Fi, because the check that would have told them apart is the check you disabled.
Turning the check off also changes nothing about what the destination sees. A proxy
that terminates your TLS and re-establishes its own connection onward presents its
own handshake to the server, so the
[JA3 and JA4 fingerprint](ja3-ja4-tls-fingerprint.md) arriving at the destination is
the proxy's and not your browser's. Whether your browser accepted the proxy's
certificate and what the proxy's handshake looks like from the far end are two
separate questions, and only the first one is what this error is about.
The narrower, safer alternative when the actual goal is trusting one specific proxy
is installing that proxy's own root CA certificate into the browser's trust store,
so only that one issuer becomes trusted, not every issuer becoming
@@ -88,7 +99,11 @@ unexpected interception point produces.
interception.
3. **Test the same target with the proxy removed.** Validates cleanly without the
proxy: the proxy is the one re-signing TLS, confirmed. Still fails: the
destination's own certificate is broken, unrelated to the proxy at all.
destination's own certificate is broken, unrelated to the proxy at all. A proxy
that intercepts TLS is usually also deciding
[where your DNS queries go](does-a-proxy-leak-dns-doh-explained.md), which is a
separate setting with a separate way of going wrong, and worth reading once while
you have the proxy's configuration open.
4. **Check with `openssl s_client -connect host:443 -showcerts`** for the full chain
and its dates, to rule out an expired intermediate specifically rather than an
untrusted one.
+10 -2
View File
@@ -39,7 +39,10 @@ words, applies to "connections closed with the non-standard code 444," releasing
socket with a TCP reset, not a normal close. A server operator who wants to deny
a request with zero information leakage, whether the requester is a scanner, a bot, or
simply unwanted traffic, has this as a first-class, standard option: return nothing
rather than a status code that says "blocked."
rather than a status code that says "blocked." That is the one cause on this list
where the error is not a fault to repair but a decision made about your session, and
the question then moves off this page and onto
[why the script is being refused in the first place](why-does-my-playwright-script-get-blocked.md).
**A proxy-side rewrite or bypass rule interacting badly with routing.** [A real Playwright
report](https://github.com/microsoft/playwright/issues/20703) traces `ERR_EMPTY_RESPONSE`
@@ -81,7 +84,12 @@ resemblance to the Chromium string you searched for.
that closes with zero bytes, and removes the browser as a variable.
2. **Remove the proxy and retry direct.** Gone without it, the proxy or the path to it is
implicated, matching the shape in the routing-bypass report above. Persists, the origin
server or something between you and it is next.
server or something between you and it is next. If the proxy never opened the tunnel
at all you would be reading
[ERR_TUNNEL_CONNECTION_FAILED](err-tunnel-connection-failed-playwright.md), and if the
socket was torn down after some bytes had moved,
[ERR_CONNECTION_RESET](err-connection-reset-playwright.md): the three differ only in
how far the exchange got.
3. **Check whether it is one target or many.** Consistent on one specific site with
everything else loading normally is the shape of a deliberate drop; intermittent across
unrelated targets points at your own proxy or network path.
+13 -3
View File
@@ -46,7 +46,10 @@ string while driving Firefox? Look for those two names in your logs instead.
- **ALPN disagrees with what actually gets spoken.** HTTP/2 is negotiated in the TLS
handshake's ALPN extension. A proxy that terminates TLS and re-negotiates outbound can
advertise `h2` to your client while speaking something else to the origin, so the
session starts as HTTP/2 and cannot stay one.
session starts as HTTP/2 and cannot stay one. A proxy doing that also replaces the
handshake the destination sees with its own, so the
[JA3 and JA4 fingerprint](ja3-ja4-tls-fingerprint.md) arriving there is the proxy's,
which matters separately from whether the session survives.
- **A server-side HTTP/2 config problem, unrelated to your proxy.** HTTP/2 enforces
header rules HTTP/1.1 never did: no invalid bytes in a header value, a fixed
pseudo-header order, framing from RFC 9113 a lenient HTTP/1.1 stack never checked. A
@@ -55,11 +58,18 @@ string while driving Firefox? Look for those two names in your logs instead.
- **The "error" is not an error.** More than one report traces this exact code to a
server sending `RST_STREAM` deliberately, as an anti-automation response rather than a
protocol accident. The browser reports both cases identically: a stream closed with
`PROTOCOL_ERROR` before delivering anything.
`PROTOCOL_ERROR` before delivering anything. If that is what happened, the thing
worth reading is not the framing rules but
[what an HTTP/2 connection reveals about the client that opened it](http2-fingerprint-detection.md),
since the frame order and settings are themselves a fingerprint.
A smaller set of reports describe the error only in headless mode, disappearing
headful, proxy or no proxy. That is in Playwright's own tracker with no confirmed root
cause; treat it as something to test for, not an explanation to assume.
cause; treat it as something to test for, not an explanation to assume. It is also the
one shape on this page where
[the separate question of what headless changes](is-playwright-headless-detectable.md)
is worth a look, because a mode-dependent failure with no protocol explanation is the
signature of something reading the client and not the frames.
## How to actually find out which one it is
+1 -1
View File
@@ -97,7 +97,7 @@ a Playwright page directly. Because invisible_playwright hands you a genuine
Playwright `Page`, the port attaches to it with no adapter:
```bash
pip install invisible-playwright python-ghost-cursor
uv add invisible-playwright python-ghost-cursor
```
```python
+5 -1
View File
@@ -17,6 +17,10 @@ override from the page, because the page is not where the tell originates.
## What the driver reveals about itself
- [What is headless browser automation?](what-is-headless-browser-automation.md) - A real engine with no window, not a lighter fake one. The three properties that differ by default, and why headless-specific detection is mostly a solved category.
- [Python browser automation without Selenium](python-browser-automation-without-selenium.md) - Playwright and Pyppeteer, curl_cffi and httpx when you don't need a browser, and how to tell in five minutes whether you need one at all.
- [Is Python good for automation?](is-python-good-for-automation.md) - Yes, and the reason is the library ecosystem, not the language. Where it's genuinely strong, where it's a weaker choice.
- [Can Websites Detect Playwright?](can-websites-detect-playwright.md) - Which webdriver, protocol and fingerprint signals catch a run, and what a patched Firefox fixes.
- [Does Playwright Change My Browser Fingerprint?](does-playwright-change-my-fingerprint.md) - Stock Playwright inherits the host's real values instead of randomizing, leaking past a spoofed user agent.
- [Does Playwright Get Detected on the First Request?](does-playwright-get-detected-first-request.md) - The TLS handshake and HTTP/2 settings form a network fingerprint detectable before any JavaScript runs.
@@ -40,7 +44,7 @@ override from the page, because the page is not where the tell originates.
- [Execution context was destroyed, and when it means detection](execution-context-destroyed.md) - Usually a race condition, but sometimes a redirect to a challenge; how to tell the two apart.
- [Why content_frame() returns None for a cross-origin iframe](cross-origin-iframe-unreachable.md) - One shared cause behind None, throws and timeouts: process isolation, not a permissions bug.
- [Running Playwright Firefox on ARM64 Linux](playwright-firefox-arm64-linux.md) - What ships per architecture on ARM64 Linux, the emulation trap, and the memory ceiling.
- [Running Playwright Firefox on ARM64 Linux](playwright-firefox-arm64-linux.md) - What ships per architecture on ARM64 Linux, the emulation trap, and the memory ceiling (this project no longer ships a Linux arm64 engine from firefox-56).
## Human-like input and interaction
+2
View File
@@ -28,6 +28,8 @@ which is exactly why it is worth understanding on its own.
## Proxy protocols, DNS and IP leaks
- [How to check a proxy's status before you rely on it](check-proxy-status.md) - Liveness, exit location, latency and browser-level behaviour are four different checks; confusing them misattributes both proxy failures and site blocks.
- [SOCKS5 vs HTTP proxy: what each does in the browser](socks5-vs-http-proxy-browser.md) - Who authenticates and where: SOCKS auth and DNS in the engine, HTTP auth in the driver.
- [Playwright SOCKS5 proxy with authentication](playwright-socks5-proxy-authentication.md) - Why credentials on a socks5:// server fail silently, and the routes that work.
- [Does a proxy leak DNS? DoH and DNS leaks explained](does-a-proxy-leak-dns-doh-explained.md) - How a SOCKS5 proxy leaks DNS when the host resolves names locally, and how to verify.
+1
View File
@@ -219,3 +219,4 @@ for the model that orders the rest, then pick the task you have.
- [Automating an Email OTP / Verification-Link Login with Playwright](automating-email-otp-verification-login-playwright.md) - Poll your own inbox over IMAP mid-login and feed the code back into the same session that requested it.
- [Automating TOTP-Based 2FA Login with Playwright](automating-totp-2fa-login-playwright.md) - Generate a time-based code with pyotp from the same shared secret an authenticator app would scan; no inbox, no polling.
- [How to Scrape a Sandboxed Iframe with Playwright](how-to-scrape-sandboxed-iframe-content-playwright.md) - A `sandbox` attribute can block Playwright's own injected scripts even on a same-origin frame; what the tokens restrict and how to detect it first.
- [Puppeteer scraping examples, and what a real defense does to them](puppeteer-scraping-examples.md) - Six standard patterns as code, then run against an actual detector to show what changes and what does not.
+3
View File
@@ -39,6 +39,9 @@ telling the difference before you ship a fix, not after.
## When you get blocked or detected
- [Selenium detected by Cloudflare](selenium-detected-by-cloudflare.md) - The specific default properties a managed challenge reads, and why patching one from JavaScript does not survive a descriptor check.
- [Playwright blocked by CORS policy](playwright-blocked-by-cors-policy.md) - Almost never detection - the browser correctly enforcing a policy the server set. How to tell the two apart.
- [Playwright detected as a bot on one site: a checklist](playwright-detected-as-bot.md) - a checklist that checks the free fixes first, before buying a better proxy on day one.
- [Why Does My Playwright Script Get Blocked?](why-does-my-playwright-script-get-blocked.md) - a four-layer diagnostic across fingerprint, IP reputation, rate and quota, and behaviour.
- [Why am I blocked with a clean fingerprint?](why-blocked-with-a-clean-fingerprint.md) - you pass CreepJS, BotD and sannysoft and still get blocked; how to isolate which of four layers is failing.
+2 -1
View File
@@ -113,8 +113,9 @@ time, so point it at a persisted path:
```dockerfile
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
RUN pip install invisible-playwright
RUN uv pip install --system invisible-playwright
# keep the cached engine on a mounted volume so it downloads once
ENV INVISIBLE_PLAYWRIGHT_CACHE_DIR=/engines
+36
View File
@@ -60,6 +60,42 @@ differs will report a different *set* of fonts as installed, even though nothing
installed or removed. Two containers from the same image can disagree if their
fontconfig caches were built at different times.
## What this looks like on one Windows machine, measured
![Four renderings of the same font sample page. Playwright's bundled Firefox in headful
mode, the same build in headless mode where 3.05% of the pixels differ, an amplified
difference map showing that the differing pixels are whole rows of text rather than
stray edges, and the patched engine, which returns an identical frame in both
modes.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/headless-fonts-headful-vs-headless.png)
The three causes above are usually argued from Linux and fontconfig. They show up on
Windows too, and the difference is measurable on one machine with nothing installed
or removed in between.
The bench serves a single page from `127.0.0.1` and renders it four times at the same
viewport: the bundled Firefox headful and headless, then a patched Firefox headful and
headless. Same URL, same host, same session.
The bundled build disagrees with itself between the two modes on **8,989 of 294,400
pixels, or 3.05% of the frame**. The shape of that disagreement is the useful part.
Every sample row keeps its exact height, so no glyph got taller. The rows *drift
downward* instead, by 0, 1, 1, 2, 2, 2, 2 and 3 pixels from the first sample to the
eighth.
That drift is the mechanism behind a screenshot test that passes on a laptop and fails
in CI. Line boxes round to slightly different heights, the error accumulates, and an
element halfway down a long page has moved further than one near the top. A tolerance
tuned on the first viewport will not hold at the bottom.
The patched engine returned the same frame in both modes, byte for byte, and did so on
three repeats of the whole bench. It declares its own font set instead of reading the
host's, so a headless environment has nothing left to be missing.
One row shows what that costs. `Arial Narrow` is installed on the host, so the bundled
build renders it narrow; the patched engine does not carry that face and falls back, so
the same row comes out wide. Host independence and host fidelity pull in different
directions, and this is where they part.
## Why any of it matters beyond flaky screenshots
Fonts are one of the highest-entropy signals a browser exposes, and unlike most of
+39 -25
View File
@@ -70,15 +70,17 @@ what this project does when you ask for `headless=True`.
The browser is launched **headed** and the window is hidden, by a different mechanism on
each platform:
- **Windows.** The browser cloaks its own windows through the compositor, so they render
on the real GPU and never appear on screen, in the taskbar or in the switcher.
- **macOS.** The window is kept fully transparent with occlusion checks pinned, so the
system does not stop drawing it.
- **Windows.** A fresh desktop object is created for the session and the browser process
is created *on* it, so the whole tree - launcher, parent, GPU and content processes -
lives on a desktop nobody switches to. It renders on the real GPU and never appears on
screen, in the taskbar or in the switcher. The browser binary is not involved in the
hiding at all.
- **Linux.** A private virtual display is started for the session and the browser is
pointed at it, because X11 and Wayland have no per-window equivalent that keeps the
GPU rendering.
The point of all three is the same: stay on the code path a visible browser uses.
The point of both is the same: stay on the code path a visible browser uses, and hide
the screen rather than the window.
Being straight about the limits, because they matter:
@@ -108,27 +110,39 @@ same process level passed throughout, which is exactly why this went unnoticed:
thing validating the behaviour and the thing shipping it were not using the same
mechanism.
The fix is a compositor-level cloak, set on the window itself rather than on any
thread or process, which is also why it needs to live in the browser binary: only the
window's own owning process can set that attribute. Validated
afterward against a visible, headful window on the same machine: identical fingerprint
surface (no `visibilityState`, focus, canvas or WebGL tell), a real GPU-composited
screenshot, and a passing result on a commercial detector that specifically checks for
masked headless state. A per-platform automated check now asserts the underlying
window attribute directly - the cloak flag on Windows, the transparency and occlusion
state on macOS - rather than trusting a screenshot alone.
The first fix was a compositor-level cloak, set on the window itself from inside the
browser binary, because only the window's own owning process can set that attribute.
It worked, and it was validated against a visible, headful window on the same machine:
identical fingerprint surface, a real GPU-composited screenshot, a passing result on a
commercial detector that specifically checks for masked headless state.
**The same fix closed a second, unrelated-looking bug for free.** An earlier hiding
approach had put the browser's main process on one virtual desktop and left its
sandboxed content processes on a different one by default. Ordinary page loads never
noticed. A page that triggered a cross-process navigation - handing the active tab from
one content process to another mid-session - did notice: the window being reparented
expected both processes on the same desktop, found them split across two, and the tab
crashed. Because the compositor-level cloak keeps every process on the single real
desktop and hides at the window level instead, that split stopped existing as a
possibility, and the crash went away as a side effect of fixing something else
entirely. It's a reminder that "which mechanism hides the window" and "which processes
can actually talk to each other" are not as separate as they look.
It was replaced anyway, for a reason that has nothing to do with whether it worked: it
was a patch inside the browser on a surface that has nothing to do with fingerprinting,
and the fewer of those a modified browser carries, the less there is to diverge from
the original. The current mechanism puts the hiding back where the operating system
already offers it. A desktop object is created per session and the browser *process*
is created on it - the process, not the thread, which is exactly the scope the latent
bug above had got wrong. Every child inherits it. Nothing in the browser knows it is
hidden, because from where it stands it is not: it has a desktop, a compositor and a
GPU like any other window. Validated the same way, same seed hidden against headed:
focus, visibility, inner and outer size, screen position, screen geometry, pixel ratio
and the WebGL renderer string all identical, one window on the session's desktop and
none on the interactive one.
**Two things a separate desktop changes, and why they are handled rather than hoped
away.** A browser's process sandbox assumes its parent lives on the interactive
desktop. Its GPU process cannot parent the compositor window across desktops under the
default sandbox level, and its content processes above a certain level are placed on
the sandbox's own window station. Left alone, the first means a software renderer under
a hardware renderer string, and the second means a tab that dies on the first
cross-process navigation - handing the active tab from one content process to another
mid-session - because the window being reparented expects both processes on the same
desktop and finds them split across two. Both were measured, and both are closed by
two sandbox settings the session applies only when it actually created a desktop:
never from the platform name, always from the fact. An automated check asserts the
result directly - a headed window found on the interactive desktop as the control, then
a hidden one absent from it and present on its own, still rendering - rather than
trusting a screenshot alone.
## How to find out which one is your problem
+1 -1
View File
@@ -116,7 +116,7 @@ Switching from stock Playwright is the launch line; every method after it is sta
Playwright. Install it first:
```bash
pip install invisible-playwright
uv add invisible-playwright
```
Then gather ICE candidates through the proxy and assert the positive form. The `seed`
@@ -95,7 +95,7 @@ Strip everything that is not part of the number, then parse the digits and separ
with the page's locale rather than guessing. Babel does the locale-aware step:
```bash
pip install babel
uv add babel
```
```python
@@ -127,7 +127,7 @@ Relative and localized dates need the page's language to read the words and the
timezone to anchor the arithmetic. `dateparser` takes both:
```bash
pip install dateparser
uv add dateparser
```
```python
@@ -93,7 +93,7 @@ the main content block and discard the rest. The `readability-lxml` package is
a direct port of the well-known algorithm and takes an HTML string:
```bash
pip install readability-lxml lxml
uv add readability-lxml lxml
```
```python
@@ -79,6 +79,41 @@ consent iframe loads into the same process as the page and the driver's frame tr
reaches it. That is a deliberate trade for a single-purpose automation session, and it
is what makes the `frame_locator` pattern below resolve instead of time out.
## The two workarounds you will find first, and what each one actually does
Search this problem and the top answers offer two shortcuts before anyone mentions
frames. Both are worth understanding, because the reason they fail is the same reason
the frame approach works, and one of them fails silently.
**"Click it with JavaScript."** The suggestion is
`page.evaluate("document.querySelector('#accept').click()")`. On a banner that lives in
the main document this reaches the button. On a consent banner it usually does not, and
for a reason that has nothing to do with Playwright: `evaluate` runs inside the main
frame, and the same-origin policy stops any script in that frame from reading into a
cross-origin iframe's DOM. `document.querySelector` cannot see the button, so there is
nothing to call `.click()` on. This is a browser security rule, not a process-model
detail, so it holds whatever isolation strategy the browser runs.
There is a second cost even where it does reach. A click synthesised from page script
carries `isTrusted: false`, which is the one field a handler can check and cannot be
assigned from script;
[why a JS-dispatched click can never be trusted](playwright-clicks-istrusted.md) is the
whole story. A driver-level click does not have that problem, which is what
`frame_locator(...).click()` below produces.
**"Just remove the banner from the DOM."** Deleting the overlay, or hiding it with CSS,
removes the thing in front of the content. It does not record a consent decision, and
those are different events. Content that the page renders only after consent is stored
stays unrendered, so a scrape that looked unblocked returns an empty list; and because
nothing was written down, the banner is back on the next run. When the banner is inside
an iframe, removing the iframe removes the widget, not the decision.
The honest exception to both: plenty of sites ship a first-party banner in the main
document, no iframe involved. There the JavaScript route does reach the button, and the
only remaining question is whether the site's handler cares that the event was not
trusted. The iframe case is the one that generates the timeouts people arrive here
with.
## Target the frame, do not force the click
The correct tool is `frame_locator`. It addresses the iframe first, then finds the
@@ -215,6 +250,16 @@ long as it needs to be and no longer.
context, yes, so guard the accept with a presence check. With a persistent profile it
stays accepted, along with any device permission the flow also stored.
**Can I just click the accept button with JavaScript?** Usually not on a consent
banner. `page.evaluate` runs in the main frame, and the same-origin policy stops any
script there from reading into a cross-origin iframe, so `document.querySelector` never
finds the button. Where the banner is first-party and in the main document it does
reach it, at the cost of an untrusted event.
**Can I remove the cookie banner instead of accepting it?** You can remove the overlay,
but removing it is not consenting. Content the page renders only after a stored consent
stays unrendered, and the banner returns next run because nothing was written down.
## Sources
- This project's own patch history for the cross-origin iframe root cause, the frame
@@ -69,11 +69,12 @@ Chromium-specific plumbing you have to translate.
```dockerfile
FROM python:3.11-slim
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN uv pip install --system --no-cache -r requirements.txt
# Bake the patched engine into the image at build time, not at container
# start. This is a one-time ~238 MB download (~544 MB unpacked), sha256-verified
@@ -92,7 +93,7 @@ invisible-playwright
That builds and runs. It also, by itself, still describes a machine with no GPU, a
tiny font set and no audio device, for the reason above: none of those come from
`pip install`, they come from the base image. The next two sections are what actually
the package install, they come from the base image. The next two sections are what actually
changes that.
## The part a Dockerfile cannot fix by itself
@@ -238,7 +238,10 @@ itself the expensive part of the exchange, not the page wrapped around it.
Rate limits on WHOIS lookups are tighter than on most catalog pages for exactly
that reason, and a pacing scheme copied from a catalog scraper, a random gap
of a second or two, will get a lookup service returning empty answers or a
captcha well before a similar gap trips a catalog site's limiter.
captcha well before a similar gap trips a catalog site's limiter. When the
limiter does answer, the response is usually a status code and not a page, and
[the backoff that belongs in the middle of a run](how-to-handle-403-429-backoff-mid-scrape-playwright.md)
is a different piece of work from the pacing that avoids reaching it.
```python
import random
@@ -282,6 +285,12 @@ registry is doing real, expensive work for each one, because it is. The
parsing is straightforward once each value is tied to the field that names it;
the pacing is what decides whether you get to keep making requests at all.
One record per domain, with a variable set of labels and a raw block kept
alongside, is the shape
[JSON Lines handles without a schema argument](how-to-scrape-to-json-lines-playwright.md):
a ccTLD that carries three fields and a gTLD that carries twenty go into the
same file without either one padding the other.
## Short answers to the questions that lead here
**Does WHOIS only exist as a web page?** No. The original protocol answers in
+23 -9
View File
@@ -55,15 +55,15 @@ with InvisiblePlaywright(seed=42, headless=True) as browser:
`browser` here is a real Playwright `Browser`, so every standard method works exactly
as documented upstream. What is different is what `headless=True` means underneath:
this engine renders on the code path a visible window uses, and hides the window
itself rather than switching to a stripped rendering mode. On Windows that is a
compositor-level cloak on the window; on Linux it is a private virtual display; on
macOS the window stays transparent with occlusion checks pinned. The point of all
three is the same, and it is worth being specific about it because the same product
did not always get this right: for several releases, `headless=True` on Windows
rendered the browser on the real desktop anyway, because the hiding mechanism moved
the launching *thread* to an invisible desktop while the browser's own child
processes inherited the *parent process's* desktop instead, and stayed visible
regardless. The fix had to move to the window itself, in the browser binary, because
itself rather than switching to a stripped rendering mode. On Windows the browser
process is created on a fresh desktop object nobody switches to; on Linux it is a
private virtual display. The point of both is the same, and it is worth being specific
about it because the same product did not always get this right: for several releases,
`headless=True` on Windows rendered the browser on the real desktop anyway, because
the hiding mechanism moved the launching *thread* to an invisible desktop while the
browser's own child processes inherited the *parent process's* desktop instead, and
stayed visible regardless. The fix is to name the desktop when the process is created,
so the whole tree is born there - the browser binary is not involved, because
only the window's own owning process can set that attribute. See
[headless vs headful](headless-vs-headful.md) for the full account and why it stayed
unnoticed for as long as it did.
@@ -183,6 +183,20 @@ is what this product bundles into the engine on all three platforms, so the same
identity reports the same fonts whether the machine underneath is Windows, Linux or a
container with nothing installed.
### What the two browsers report before you change anything
![Two panels listing two values. The bundled Firefox headless reports a 1366 by 768
screen with 1366 by 720 available. The patched engine reports 1920 by 1080 with 1920 by
1032 available. Both of the two values differ.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/how-to-scrape-headless-blocked-values.png)
Both values differ, and the shape of the difference is the thing to notice. The bundled
Firefox headless reports `1366x768`, a laptop resolution it uses whatever viewport you
asked for, so every stock headless session on any machine claims the same display. The
patched engine reports a declared `1920x1080`.
Neither browser reports the host's actual monitor, which is the part people expect and
do not get.
## Fix three: the screen and viewport numbers
A headless browser has no monitor, so every screen value it reports was decided by
@@ -51,7 +51,7 @@ The launch is stock Playwright. If you have driven Playwright before, the only c
the two lines that open the browser:
```bash
pip install invisible-playwright
uv add invisible-playwright
```
```python
@@ -53,7 +53,7 @@ already in it. Wrap that string in `io.StringIO` (pandas asks for a file-like ob
literal HTML) and pass it in.
```bash
pip install invisible-playwright pandas lxml
uv add invisible-playwright pandas lxml
```
```python
@@ -37,6 +37,13 @@ downstream date is now wrong under the right label. The fix is to match on
the label text itself, normalize it through a small alias table, and only then
read the adjacent value.
Check one thing before writing any of it, because it can make the whole section
unnecessary: some patent and publication databases ship the same bibliographic
fields as machine-readable metadata in the page, and
[a JSON-LD block already carries its own labels](how-to-extract-json-ld-structured-data-playwright.md).
Where it is present it is the better read, and the selector work below is the
fallback for pages that do not have one.
```python
import re
from datetime import datetime
@@ -256,6 +263,12 @@ the shared invention-level fields once, then attaches jurisdiction-specific
fields per member, so a query for "every active family member in this
jurisdiction" does not require reconstructing the family from scratch.
The traversal underneath is the ordinary one:
[a list page whose entries each open a detail page](how-to-crawl-list-to-detail-pages-playwright.md),
with the wrinkle that here one detail page can expand into several rows. Getting
the list-to-detail walk right first makes the family expansion a step you add on
top instead of a special case tangled into the crawl.
```python
def scrape_patent_record(url, browser):
page = browser.new_page()
@@ -259,7 +259,7 @@ port and that you confirm the exit inside the browser rather than assuming it. A
minimal install for the container it runs in:
```bash
pip install invisible-playwright
uv add invisible-playwright
```
The engine downloads and caches itself on first use, so the first run in a fresh
@@ -94,6 +94,12 @@ Store the reading exactly as the feed reported it, with its own timestamp, and s
cadence as data rather than assuming it. A downstream consumer that genuinely needs a
fixed grid can resample from the as-reported table at query time.
One row per observation, with whichever variables that station actually reports and no
padding for the ones it does not, is the case
[JSON Lines was already the right container for](how-to-scrape-to-json-lines-playwright.md):
a station reporting three variables and one reporting twenty append to the same file,
and a partial run leaves a file that still parses.
```python
def rows_from_feed(feed, variable_map):
"""Emit one row per (variable) per observation, using the feed's own timestamps.
@@ -199,6 +205,11 @@ list is. It is paginated by day or by month, so a request asks for one calendar
and gets back everything that station reported in it. A five-year pull across one
station is roughly sixty separate requests, one per month, not one long scroll.
Sixty requests is long enough that something will interrupt one of them, and a
calendar walk has the property that makes recovery cheap: the period is the key, so
[a run can pick up from the period it stopped on](how-to-resume-an-interrupted-scrape-playwright.md)
without re-reading the years already stored.
Walk the calendar explicitly and issue one request per period. `page.request` shares
the browsing context's cookies with a plain HTTP call, so an archive endpoint gated
behind a session the browser already holds answers without a second login flow.
@@ -165,7 +165,8 @@ scheduler calls it. A minimal container runs the job and exits:
```dockerfile
FROM python:3.12-slim
RUN pip install invisible-playwright
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
RUN uv pip install --system invisible-playwright
COPY monitor.py .
CMD ["python", "monitor.py"]
```
@@ -10,8 +10,8 @@ nav_order: 7
# How to use invisible_playwright in Docker
To run `invisible_playwright` in Docker, start from a maintained Playwright
base image for the OS-level shared libraries, `pip install
invisible-playwright`, fetch the patched Firefox engine at build time, and
base image for the OS-level shared libraries, install
`invisible-playwright` with uv, fetch the patched Firefox engine at build time, and
run the container with `--shm-size=1gb`. The fingerprint itself needs
nothing container-specific: the same seed produces the same machine on a
desktop or inside a container.
@@ -39,6 +39,7 @@ packages that may not match your distro:
```dockerfile
FROM mcr.microsoft.com/playwright/python:v1.47.0-jammy
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
WORKDIR /app
```
@@ -50,17 +51,21 @@ libraries, not the browsers it ships alongside them.
## Installing invisible-playwright
Installing `invisible-playwright` in a container is the same two-step
install as on a desktop: `pip install invisible-playwright` for the
package, then a separate `fetch` step to download the patched engine. See
[installation](installation.md) for why the two steps are kept separate:
Installing `invisible-playwright` in a container takes the same two steps
as on a desktop: install the package with uv, then a separate `fetch` step
to download the patched engine. See [installation](installation.md) for why
the two steps are kept separate:
```dockerfile
RUN pip install --no-cache-dir invisible-playwright
RUN uv venv --python ">=3.11" /opt/venv
ENV VIRTUAL_ENV=/opt/venv PATH="/opt/venv/bin:$PATH"
RUN uv pip install --no-cache invisible-playwright
```
Nothing container-specific here yet. The wheel is small; the part that
needs a build-time decision is the next step.
The venv is not decoration: the Python in this base image is 3.10, older
than the 3.11 the package needs, so uv brings an interpreter that can run it.
The wheel is small; the part that needs a build-time decision is the next
step.
## Fetching the patched engine at build time
+1 -1
View File
@@ -93,7 +93,7 @@ a browser and read back what the server saw. A public HTTP/2 fingerprint endpoin
the frames it received as JSON.
```bash
pip install "httpx[http2]"
uv add "httpx[http2]"
```
```python
+26 -1
View File
@@ -88,7 +88,32 @@ But consider what a behavioural check can compare, once you have a curve:
So the curve is necessary and not sufficient, which is the same shape as every other
part of this subject.
## How this project does it
## The same three layers, measured on one page
![Three panels of one target page, each drawing a dot per pointer event received. A
single driver move leaves two events and no path; a driver move with forty steps leaves
an evenly spaced line with three distinct movementX values; the patched engine's path is
unevenly spaced with twenty-six. All three report isTrusted
true.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/mouse-path-driver-vs-engine.png)
One page served from `127.0.0.1`, one target, three ways of reaching it. The page draws
a dot per `pointermove` and prints the fields it actually received, so the picture and
the numbers come from the same run.
The first thing the panels settle is a negative: **`isTrusted` is `true` in all three,
and so `isTrusted` does not separate the driver from the engine.** It only separates
both of them from page script. A check that stops at the trusted flag has not
distinguished anything here.
What does separate them is the deltas. The evenly stepped driver path produces **three
distinct `movementX` values across 41 events**, because a straight line walked in equal
steps reports the same delta almost every time. The engine's path produces **26 distinct
values across 34 events**. Same trusted flag, same `pointerType`, same `pressure`, and a
completely different distribution underneath.
And notice what the third panel is not: it is not a graceful arc. The dots stay roughly
on the line to the target, clustered at the start and irregular the rest of the way.
That is the point of this page in one image. The shape was never the hard part.
Two pieces, and the split is deliberate.
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+13 -18
View File
@@ -1,6 +1,6 @@
---
title: "Installation"
description: "Install the wrapper from PyPI, then fetch the patched Firefox binary separately - a one-time, sha256-verified download. Supported on Windows, Linux and macOS."
description: "Install the wrapper with uv, then fetch the patched Firefox binary separately - a one-time, sha256-verified download. Supported on Windows and Linux."
parent: "Documentation"
nav_order: 1
---
@@ -8,31 +8,28 @@ nav_order: 1
# Installation
Install invisible-playwright in two steps: `pip install invisible-playwright` for
the Python wrapper, then `python -m invisible_playwright fetch` to download the
Install invisible-playwright in two steps: `uv add invisible-playwright` for
the Python wrapper, then `uv run invisible-playwright fetch` to download the
patched Firefox binary it drives. The steps are separate on purpose - the Python
package is small, the browser is not.
```bash
pip install invisible-playwright
python -m invisible_playwright fetch # one-time ~238 MB download (~544 MB unpacked), sha256-verified
uv add invisible-playwright
uv run invisible-playwright fetch # one-time ~238 MB download (~544 MB unpacked), sha256-verified
```
`pip install` gets you the wrapper and its API. `fetch` downloads the patched Firefox
If you do not have a uv project yet, [the README's install steps](https://github.com/feder-cr/invisible_playwright#install) create one.
`uv add` gets you the wrapper and its API. `fetch` downloads the patched Firefox
binary itself, verifies it against a sha256 shipped inside `invisible-core`, and caches
it. You only pay that cost once per engine version - later runs use the cached copy
without a network call.
## Supported platforms
**Windows x86_64**, **Linux x86_64 / arm64**, **macOS arm64 / x86_64**.
On macOS the app is ad-hoc signed, not notarized. If Gatekeeper complains the first
time it runs, clear the quarantine flag once:
```bash
xattr -dr com.apple.quarantine /path/to/cached/Firefox.app
```
**Windows x86_64**, **Linux x86_64**. There is no macOS engine: its
build ended on 2026-08-26. Linux arm64 is no longer supported from firefox-56:
firefox-55 is the last engine built for it.
`invisible-playwright version` prints the cache location, and
`invisible-playwright fetch` prints the exact binary path as its last line.
@@ -66,7 +63,7 @@ the [CLI reference](cli-reference.md).
## Short answers to the questions that lead here
**Do I need to install Firefox myself?** No. `python -m invisible_playwright fetch`
**Do I need to install Firefox myself?** No. `uv run invisible-playwright fetch`
downloads the patched binary for you, verifies it, and caches it - there is nothing
to install separately.
@@ -83,9 +80,7 @@ Point `INVPW_BINARY_PATH` at a binary you already have to skip the download
entirely. [Configuration](configuration.md) lists the other environment variables,
including the ones for corporate networks and CI.
**Which platforms are supported?** Windows x86_64, Linux x86_64/arm64, and macOS
arm64/x86_64. macOS needs the quarantine flag cleared once if Gatekeeper complains
on first launch.
**Which platforms are supported?** Windows x86_64 and Linux x86_64. Linux arm64 is no longer supported from firefox-56.
**See also:** [Configuration](configuration.md) for proxy, timezone and environment
variables, [CLI reference](cli-reference.md) for what `fetch` and `version` do in
+15 -5
View File
@@ -25,11 +25,13 @@ The engine and the identity come from the Python package even though the tests a
JavaScript. Get them once:
```bash
pip install invisible-playwright
invisible-playwright fetch # downloads it if missing, prints the binary path as its last line
python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
uv add invisible-playwright
uv run invisible-playwright fetch # downloads it if missing, prints the binary path as its last line
uv run python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
```
Run them in a uv project; [the README's install steps](https://github.com/feder-cr/invisible_playwright#install) create one.
Regenerate `prefs.json` when you upgrade the package: the pref set moves with the
engine. Keep the seed written down next to it, because that number is the identity.
@@ -78,6 +80,9 @@ The helper API does not change, and that is the point of doing it at this layer.
version and from the same seeded profile as everything else. Overriding only that
string is the standard way to make a browser contradict itself, and CodeceptJS makes
it easy to do by accident because `userAgent` sits right next to the options above.
Why one string on its own is the weakest thing to change is
[its own subject](is-changing-user-agent-enough.md), and worth reading once before
deciding you need the option.
**One seed per identity, not per run.** A fixed seed makes a failing test
reproducible: you can tell the site changing from the browser changing. Rerolling per
@@ -95,7 +100,10 @@ The same two things every non-Python route gives up, and you should know them be
you pick this layer:
- **Humanised pointer motion.** The preference enables it, but the paths are drawn
by the Python driver from the seed. From CodeceptJS the pointer still teleports.
by the Python driver from the seed. From CodeceptJS the pointer still teleports,
which matters only against a site that watches behaviour:
[what a pointer event carries besides coordinates](human-mouse-movement.md) says
which half of that you keep here and which you lose.
- **Timezone and locale resolved from the proxy exit.** Those are computed at launch
by the Python wrapper. Here you get whatever `prefs.json` was generated with, so a
proxy in another country will disagree with the browser unless you regenerate per
@@ -111,7 +119,9 @@ Add a scenario that visits a fingerprint page and asserts on the user agent and
WebGL renderer. The user agent should say Firefox and the version should match
`invisible-playwright version`. If the renderer comes back as a software or basic
renderer, either the prefs did not load or the machine has no GPU, and both are worth
knowing before the suite reports green.
knowing before the suite reports green:
[which renderer strings a real machine actually reports](webgl-renderer-strings.md)
is the reference for telling one of those two from the other.
## Short answers to the questions that lead here
+14 -6
View File
@@ -27,11 +27,13 @@ The engine and the identity are produced by the Python package even though the
crawler is Node. Get them once, at install or deploy time:
```bash
pip install invisible-playwright
invisible-playwright fetch > .browser-path
python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
uv add invisible-playwright
uv run invisible-playwright fetch > .browser-path
uv run python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
```
Run them in a uv project; [the README's install steps](https://github.com/feder-cr/invisible_playwright#install) create one.
Yes, a Python dependency in a Node project. That is the real cost of this route,
and if it is unacceptable, the answer is a Chromium-based tool rather than a
workaround.
@@ -78,7 +80,10 @@ one compiled into the engine and derived from the seed.
Two independent opinions do not average out. They disagree, and the disagreement
between a generated header set and an engine-level fingerprint is a stronger signal
than either being slightly unusual on its own. Turn it off and let one component own
the identity.
the identity. The reason a disagreement outweighs an oddity is
[in what a fingerprint is actually made of](what-is-a-browser-fingerprint.md): it is
read as a set of values that have to corroborate each other, not as a list of fields
scored one at a time.
The same argument applies to `userAgent` anywhere in your config: do not set it.
@@ -89,7 +94,8 @@ and `launchOptions` is typed to accept `launchPersistentContext` parameters too,
`userDataDir` belongs there. Pair a stable profile with a stable seed: the profile
keeps cookies and storage, the seed keeps the machine those cookies belong to. One
without the other is a session whose history and hardware disagree about how long it
has existed.
has existed. Which number to write down and where to keep it is
[the seed's own page](reproducible-agent-browser-identity-seed.md).
## What this route gives up
@@ -105,7 +111,9 @@ The same two things every non-Python route gives up:
That second point matters more in Crawlee than in most places, because rotating
proxies is a normal thing to do here. If your proxy pool spans countries, either
generate a `prefs.json` per region and select it per session, or accept that the
timezone will be wrong for most of them.
timezone will be wrong for most of them, which is
[a mismatch a page can check in one line](timezone-proxy-mismatch.md) and not a
subtlety anyone has to dig for.
## Checking it worked
+11 -3
View File
@@ -20,7 +20,7 @@ check the signature before blaming the engine.
## What you need
```bash
pip install crawlee[playwright] invisible-playwright
uv add crawlee[playwright] invisible-playwright
```
The patched Firefox binary is downloaded on first launch and cached, so the first
@@ -144,7 +144,10 @@ if __name__ == '__main__':
and matching headers, on the assumption that it controls the browser's identity.
Here it does not: the identity is compiled into the engine and derived from the
seed. Leaving the generator on produces two independent opinions about who this
browser is, and the disagreement between them is exactly what detectors read.
browser is, and the disagreement between them is exactly what detectors read. It is
the same failure a stealth plugin runs into when it patches values on top of an
engine that already reports them,
[which is the whole subject of the comparison with playwright-extra](vs-playwright-extra-stealth.md).
**The seed decides whether a failure is debuggable.** With `seed=None` every run is
a different machine, so a failing run tells you nothing: you cannot separate the
@@ -165,12 +168,17 @@ receives. A SOCKS5 endpoint has to reach `get_default_stealth_prefs` through its
engine reads, and it must not also reach Playwright: Playwright configures the
proxy itself, without the SOCKS credentials, and that configuration wins over the
preferences. HTTP and HTTPS are the other way round and go through Playwright's
own `proxy=` argument.
own `proxy=` argument. That asymmetry is not a Crawlee quirk:
[why SOCKS5 credentials have to arrive as preferences](playwright-socks5-proxy-authentication.md)
explains where Playwright drops them, and it applies to every route on this list.
If you use one, leave locale and timezone on their defaults. They resolve from the
exit IP and not from the host machine, which is what keeps the JS timezone, the
language list and the IP in agreement. Setting them by hand to your own machine's
values is how a session ends up claiming one country while leaving from another.
The resolution happens against
[a GeoIP database carried locally](offline-geoip-timezone-proxy.md), so it costs no
extra request and nothing external learns which exit you are using.
## When this is the wrong tool
+11 -5
View File
@@ -29,11 +29,13 @@ Verified 2026-07-27 by reading each binding's own launch options.
## Step one: get the two values
Run the commands below in a uv project; [the README's install steps](https://github.com/feder-cr/invisible_playwright#install) create one.
The binary has a CLI:
```bash
pip install invisible-playwright
invisible-playwright fetch # downloads and caches it once, prints the absolute path
uv add invisible-playwright
uv run invisible-playwright fetch # downloads and caches it once, prints the absolute path
```
The preferences do not, and that is a real gap instead of an omission from this
@@ -41,12 +43,14 @@ page: there is no `prefs` subcommand today, so you generate them with a one-line
and keep the JSON.
```bash
python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
uv run python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
```
Regenerate it when you upgrade the package, since the pref set moves with the engine.
Treat `prefs.json` as belonging to a specific seed and a specific version, and keep
the seed written down next to it.
the seed written down next to it. Which version it belongs to is not a convention
either: [the engine is pinned by a seal](pinning.md), and the pairing that file
describes is the one you are reproducing by hand here.
## Step two: launch
@@ -117,7 +121,9 @@ none of the extra is in the JSON:
Python.
- **The pin check.** The wrapper refuses to run a binary that does not match the
version of the config that produced the prefs. Nothing enforces that pairing here.
If you upgrade the binary and keep an old `prefs.json`, nothing will tell you.
If you upgrade the binary and keep an old `prefs.json`, nothing will tell you, and
the way that goes wrong is quiet: prefs the engine no longer reads simply
[do not apply, with no error anywhere](firefox-prefs-not-applying.md).
So this route is right when the surrounding system is already in Go or Java and
rewriting it is not on the table. When the choice is open, Python gets you the parts
+10 -4
View File
@@ -32,10 +32,12 @@ Written against `microsoft/playwright-mcp` as of 2026-07-27.
## The short version
```bash
pip install invisible-playwright
python -c "from invisible_playwright import ensure_binary; print(ensure_binary())"
uv add invisible-playwright
uv run python -c "from invisible_playwright import ensure_binary; print(ensure_binary())"
```
Run them in a uv project; [the README's install steps](https://github.com/feder-cr/invisible_playwright#install) create one.
The second command downloads the patched Firefox on first run, caches it, and prints
the path. Give that path to the MCP server:
@@ -73,7 +75,9 @@ reproduce a session from.
That distinction matters more than it sounds. Sharing one identity across every user
of a build is its own signal. If you need a per-session machine, the MCP route is not
the one; drive the browser from Python with `InvisiblePlaywright(seed=...)` instead,
where the prefs are generated and applied for you.
where the prefs are generated and applied for you, or use
[an MCP server that launches through the engine](mcp-browser-server-stealth-firefox.md)
and therefore has the profile to give.
## Making the prefs work anyway
@@ -103,7 +107,9 @@ applies it over the profile's own prefs.
This is a workaround, not the supported path. It pins one identity for that profile
rather than one per session, and the profile keeps cookies and storage between runs,
which is either what you wanted or a correlation problem depending on the job.
which is either what you wanted or a correlation problem depending on the job. If it
is what you wanted, [persistent profiles have their own page](persistent-profiles.md)
covering what survives a restart and what does not.
## Checking it worked
+11 -7
View File
@@ -31,10 +31,10 @@ The engine and the identity come from the Python package, which suits Robot Fram
since it is Python underneath anyway.
```bash
pip install robotframework-browser invisible-playwright
rfbrowser init
invisible-playwright fetch # downloads if needed, prints the path as its last line
python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
uv add robotframework-browser invisible-playwright
uv run rfbrowser init
uv run invisible-playwright fetch # downloads if needed, prints the path as its last line
uv run python -c "import json;from invisible_playwright import get_default_stealth_prefs;print(json.dumps(get_default_stealth_prefs(seed=1, humanize=True)))" > prefs.json
```
Regenerate `prefs.json` when you upgrade the package. Keep the seed written next to
@@ -85,7 +85,9 @@ Open Stealth Browser
```
This has the advantage that the prefs can never drift from the installed package,
which is the failure mode a checked-in JSON file eventually produces. The cost is
which is the failure mode a checked-in JSON file eventually produces: a stale pref
name is not rejected, it is
[accepted and then never read](firefox-prefs-not-applying.md). The cost is
that `ensure_binary()` may download on the first run of a suite, so a CI job with a
short timeout wants the `invisible-playwright fetch` step separately.
@@ -99,12 +101,14 @@ version and from the same seeded profile as everything else.
`colorScheme` are all available there, and each one you set by hand is a value that
now has to agree with the profile instead of being derived from it. If you are
using a proxy, setting `timezoneId` to your own machine's zone is the classic way to
break a session that was otherwise fine.
break a session that was otherwise fine, and it breaks it in a way
[a page can check against the IP in one line](timezone-proxy-mismatch.md).
**One seed per identity, not per suite run.** A fixed seed makes a failing test
reproducible: you can separate the site changing from the browser changing. If you
need several identities in one suite, open several browsers with different seeds
rather than rerolling.
rather than rerolling. Which surfaces the number actually decides, and which it does
not, is [written out on the seed's own page](reproducible-agent-browser-identity-seed.md).
## What this route gives up
+11 -3
View File
@@ -22,7 +22,7 @@ is the reference; this one explains which route to pick and what each one costs.
## Install
```bash
pip install "scrapy-playwright>=0.0.48" invisible-playwright
uv add "scrapy-playwright>=0.0.48" invisible-playwright
```
The patched Firefox is downloaded on first launch and cached. You do not need
@@ -152,7 +152,10 @@ not per request. It comes from the engine's real version and the seeded profile,
overriding only that string is the classic way to make a browser contradict itself.
**Do not run another stealth layer.** If something else patches `navigator` from
inside the page, it is now arguing with an engine that has already answered.
inside the page, it is now arguing with an engine that has already answered. The
argument is visible from the page, which is why
[a patch applied from JavaScript and a value produced by the engine](playwright-stealth-levels.md)
are not two ways of doing the same thing.
**One seed per identity, not per run.** A fixed seed makes a failure reproducible,
which is the difference between bisecting a problem and guessing at it. For many
@@ -174,6 +177,8 @@ carries are used for an HTTP 407 challenge, and the SOCKS handshake reads its
credentials from the proxy prefs, which nothing on that route writes. So on route
two an authenticated SOCKS endpoint fails to connect while an unauthenticated one
works. Use `http(s)://` there, or take route one.
[The full account of where the credentials get dropped](playwright-socks5-proxy-authentication.md)
is worth reading before assuming a working proxy is a broken one.
On route one, leave locale and timezone on `auto` so they follow the exit. On route
two they cannot follow anything, which is the main reason to prefer route one when a
@@ -183,7 +188,10 @@ proxy is involved at all.
If the target needs Chromium, use a Chromium backend. If a page does not need
JavaScript, plain Scrapy is an order of magnitude faster and no fingerprint is
involved at all.
involved at all. Reach for this backend when a fingerprint is genuinely in play, and
when it is, the order to work through
[the layers a block can come from](how-to-scrape-without-getting-blocked.md) decides
what to change first, which is rarely the setting people reach for.
## Short answers to the questions that lead here
Loaded 100 of 389 files, more files were not shown because too many files have changed in this diff. Show more