* Point every GitHub location at oss-invisible
The repository and its companions moved to the oss-invisible organization:
invisible_playwright is now oss-invisible/playwright, invisible_core is
oss-invisible/core, invisible_playwright_mcp is oss-invisible/playwright_mcp
and firefox_antidetect_patch is oss-invisible/firefox_antidetect_patch.
README, docs, package URLs, release/counter scripts and the tests that pin
them now use the new locations. PyPI package names are unchanged.
* docs: keep one doc line as it is (the local name guard)
* Version 0.51.1: the files that go into the wheel changed since v0.51.0 (package URLs)
* CHANGELOG: the 0.51.1 heading the version bump needs
* docs: the agent links and the command name the repo as it is now
Two things were broken for a reader on main, not one.
Thirteen links pointed at github.com/feder-cr/AIHawk. GitHub redirects a
NAME to the OBJECT that carried it, not to the content: after the September
swaps that name belongs to invisible_dots, which has seven wiki pages, so
AIHawk/wiki/<page> lands on its wiki Home. It answers 200 with different
content, which means a reader who clicks does not find the page and a search
engine sees a soft-404 across about 150 indexed URLs.
Seven occurrences said `uvx aihawk`, a command that does not exist. One sat
in a front-matter description, which is the snippet search engines show, and
one in a block meant to be copied: `claude mcp add stealth -- uvx aihawk`.
The command is invisible-playwright-mcp, on PyPI at 0.70.16.
All eight link targets were checked one by one and resolve to themselves with
the page title, no redirect.
Three things stay as they are, which only reading them showed. The
`pip install invisible-playwright` line matches what this engine's own README
teaches for the library, so the page is consistent rather than broken.
CHANGELOG.md keeps the old name because a changelog entry says what was true
then. And the fixture in scripts/sync_article_pixels.py keeps it because it is
the deliberate wrong case, a pixel for ANOTHER repo.
One sentence went away instead of being renamed: "shipped inside AIHawk" made
sense when AIHawk was the larger product containing the server. The server and
the repository are now the same thing, so "shipped inside itself" was circular.
(cherry picked from commit d9c8e46dce)
* test: the docs name the MCP server's repository and command as they are now
feder-cr/AIHawk now leads to an unrelated repository and answers 200, which no
link checker reports; `uvx aihawk` does not exist. The README and docs/ are
read for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the Fission bench counts the processes that host a site, not every new content process
test_same_site_other_port_stays_in_process was red on the e2e of the 0.50.0 commit ("a same-site frame
started a process: [13443]"): the bench counted every `-contentproc ... tab` pid, and the engine starts a
preallocated content process to refill its pool whenever it gets to it. On Linux the engine names a content
process by its remote type (ContentChild::SetProcessName, prctl PR_SET_NAME): "Isolated Web Co" once it
hosts a site of strategy 1, "Web Content" while preallocated. Measured on firefox-62: a cross-site frame
renames a preallocated process and a new "Web Content" refills the pool; a same-site frame changes neither.
The two tests that count processes skip off Linux, where no process carries a name.
Unit test with the measured processes: 3 red on the old bench, 3 green here. e2e on firefox-62 (candidate
#6, Linux): the bench file 17 passed; the two counting tests 15 of 15 runs green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: a closed context is checked for the processes of its sites, not for every content process
test_closed_contexts_with_a_never_stopping_service_worker_leave_no_process was red on the e2e of the 0.50.0
tag ([2, 2, 2, 5, 5], 5 <= 2). Measured on firefox-62 (Linux), the test's own scenario 10 times with every
process named: no "Isolated Web Co" left after any close; the 3 more are "Web Content", the engine's pool of
preallocated processes filling up behind the closed contexts (5 runs of 10, new pids each time). Not a leak:
the count read the refill.
The helper of the bench moves to tests/_processes.py and both tests use it. The context test counts the
processes that host a site: at least one while the page is open (or the count proves nothing), none a few
seconds after `close` answers (the engine waits for them inside close and kills the ones that stay). Off
Linux it skips, as the bench's two counting tests do: no other system names the process.
Unit tests (tests/unit/test_processes_counts_sites.py) from the measured processes, the closed-context case
included. e2e on firefox-62 (candidate #6, Linux): the context test 10 of 10; run_e2e.py on the two files and
the unit test 18 passed. The old counter, same scenario: 5 of 10 runs would fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release 0.50.1: 0.50.0 with the process-counting e2e corrected (0.50.0 never reached the index)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the same-site control puts its frame in the shown page; CHANGELOG: 0.50.0's entry is 0.50.1's
The e2e of #451 saw a new "Isolated Web Co" once after a.test/plain -> a.test/same-site ([10878] -> [10878,
11208]). Not a process of an earlier test: it was created after the first read and only this worker's
descendants are counted. It is the top-level navigation: when the old document may enter the back-forward
cache, the browsing context is replaced (mReplaceBrowsingContext, dom/ipc/ProcessIsolation.cpp) and the new
one may be placed in another process of the same site (dom.ipc.processCount.webIsolated = 4). Measured on
firefox-62 (candidate #6, Linux): 0 of 30 runs alone (bfcache on and off), 0 of 57 under 4 workers. The test
was written for the frame, so the frame is now added to the page already shown and the top never navigates:
20 of 20 runs green.
0.50.0 never reached the index, so the changelog gate refused its heading; its entry now opens 0.50.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* UDP line: the e2e of the proxy for a context, the chain by name, the declared host network, and the wrapper that declares it
Squash of the local integration branch (one branch for the candidate):
- e2e behind a gateway with coherent UDP (the cost of a gather, two contexts, a proxy without UDP, TURN over TCP of a context,
HTTP/3 through the proxy) and one hermetic SOCKS5 gateway helper under them;
- the whole UDP chain by name behind a gateway at 130 ms (hermetic);
- the declared host network e2e (interfaces, ports, two connections);
- the wrapper declares the host network from the session seed (no srflx, no UDP verdict, no host_ip any more);
- the integration test follows the declared network and the DoH of the session proxy.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* dev extra: aioquic, so the two HTTP/3 e2e run in the gate instead of being skipped by importorskip
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: networkidle through a served browser whose context routes every request, on a reused page
launch_server() plus a stock Playwright client, a context route that aborts image/font/media and continues the rest, a
page with sendBeacon, the same font twice, a frame of another site, a worker, redirects, requests the page cancels while a
slow route decides, 100 requests at once, and a slow client that answers concurrently (async). Every shape reaches
networkidle on firefox-62; one page reused for twelve addresses too. The leak that tf-fetch meets on real sites needs
end events the engine loses, which no local page produces: its deterministic red/green is in the core
(tests/test_networkidle_on_a_reused_page.py of invisible-core); this file guards the remote path end to end.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: the answer to a request the browser has already closed is not an error (Cannot find request), as stock sendMayFail
A page cancels requests while a route is deciding (a fetch aborted, an image replaced, an iframe removed, a beacon with
its document). The engine takes the request out of its held set at once and the late continue/abort/fulfill meets
"Cannot find request". Stock Playwright sends the interception commands as may-fail and tells the client nothing; ours
passed the error up, the client kept it as the error of the whole connection and raised it on the NEXT route command,
which was then never sent: its request stayed held in the engine, its handler failed too, and so on down the page. Seen
on a real news page: six held requests in a row, one a beacon, and networkidle never came.
RouteDispatcher._send now treats "Cannot find request" and a closed target as done (still disposed); any other protocol
error still reaches the client.
Tests: the e2e with a plain handler (no try) on a page that removes an iframe whose requests are held (red before: networkidle
never, 25 s; green after; the fetch and image shapes were green before too), and a static guard that every op of
RouteDispatcher (abort, continue, fulfill, redirect) goes through _send and that _send swallows exactly those two.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stock Playwright client is required by the networkidle e2e (explicit failure, never a skip); the dev extra pins it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a page reached over IPv6 gathers host candidates on a machine declared without IPv6 (hermetic, [::1], no proxy)
Red on an engine before ddaf867f03: the gathering is empty. Needs the firefox-63 build to run: not run here.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the names of a proxied session go to DoH through the proxy (written ahead of the engine)
E2E for the contract of core-19/motore-18, plus the hermetic helpers they stand
on, which are unit-tested now: a hand-written DoH server (h2 and HTTP/1.1), a
SOCKS5 gateway and an HTTP proxy that hand the DoH CONNECT to it and tag each
query with their name, a connection watcher and a resolver trap. The e2e skip
without a binary and cannot be green before the engine that keeps the contract.
test_integration follows the core: no host_ip pref, no DNS gate switch, TRR mode 3.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the TURN name of the udp chain is resolved by the DoH through the proxy, not by the gateway
Chain is now a DohGateway (one SOCKS5 gateway in tests/): a CONNECT to the DoH goes to a FakeDoh whose zone is the TURN and
the page names, the datagram to TURN_IP goes to the TURN server by address (type 1), a name on the relay or a query to port 53
is dropped and recorded. DnsServer and the type-3 branch are gone. DohGateway takes the Gateway options (UDP relay, rtt) and
delays its tunnels by half the round trip like the base gateway. explain() lists what the DoH, the gateway, the TURN server and
the page saw, and says why.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the UDP line e2e need the engine that carries it (firefox-63); a missing websockets, aioquic or h2 is a failure, not a skip
The dev extra installs all three; a gate that skips for want of one proves nothing. main's e2e fetches the published engine 62, where the
declared network, the DoH through the proxy and the SOCKS5 UDP layer do not exist: those tests skip there and run on the candidate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: networkidle through a served browser whose context routes every request, on a reused page
launch_server() plus a stock Playwright client, a context route that aborts image/font/media and continues the rest, a
page with sendBeacon, the same font twice, a frame of another site, a worker, redirects, requests the page cancels while a
slow route decides, 100 requests at once, and a slow client that answers concurrently (async). Every shape reaches
networkidle on firefox-62; one page reused for twelve addresses too. The leak that tf-fetch meets on real sites needs
end events the engine loses, which no local page produces: its deterministic red/green is in the core
(tests/test_networkidle_on_a_reused_page.py of invisible-core); this file guards the remote path end to end.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 47182f0cd85fea08fc45e36f1c91d2d570722f14)
(cherry picked from commit e46f2dcf3eb361e6af0fedcdf6e1189f0ac330b6)
* server: the answer to a request the browser has already closed is not an error (Cannot find request), as stock sendMayFail
A page cancels requests while a route is deciding (a fetch aborted, an image replaced, an iframe removed, a beacon with
its document, the favicon of the page a goto just left). The engine takes the request out of its held set at once and the
late continue/abort/fulfill meets "Cannot find request" or NS_BINDING_ABORTED. Stock Playwright sends the interception
commands as may-fail and tells the client nothing; ours passed the error up, the client kept it as the error of the whole
connection and raised it on the NEXT route command, which was then never sent: its request stayed held in the engine, its
handler failed too, and so on down the page. Seen on a real news page: six held requests in a row, one a beacon, and
networkidle never came.
RouteDispatcher._send now treats "Cannot find request" and a closed target as done (still disposed); any other protocol
error still reaches the client.
Tests: the e2e with a plain handler (no try) on a page that removes an iframe whose requests are held (red before:
networkidle never; green after), and a static guard that every op of RouteDispatcher goes through _send and that _send
swallows exactly those two. The same defect was found a month earlier by richardpowellus (#351), with the favicon of the
previous page: his test is added in the next commit.
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stock Playwright client is required by the networkidle e2e (explicit failure, never a skip); the dev extra pins it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 91223226f5bba25edff9af0e8b1fd6b5bfea2227)
(cherry picked from commit 612b18c02b95e9b5833d62b6595d4a0ff324aac2)
* tests: answering a route the next navigation already aborted does not raise (the case of #351: the favicon of the page just left)
Sixty sequential routed gotos on a loopback page: 4-12 of them failed on the old server, every failing continue_ being
the previous document's favicon, aborted by the next navigation while the route sat with the handler. Red on main (in-process
path), green with the fix of RouteDispatcher._send.
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.50.1: pin invisible-core 62.64.0; CHANGELOG for the networkidle fixes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit e63ef8e61ea42e7f8df7c1bde206f3bf86fc18f7)
* ci: the list of mandatory suites and its one judge (ci/required-suites.json, scripts/ci_verdict.py)
The list names three suites with the least number of tests each must collect (wrapper.e2e.udp 51,
wrapper.e2e.doh 8, wrapper.unit.udp 86). ci_verdict.py prints the pytest arguments of a suite and judges
its junit: a failure, an error, a skip, too few tests, a required file or node id that did not pass, and
a list that lost a suite, a minimum or a test against main are all red, each said with its reason.
The leak watcher's file defined a test that skipped on every host; the two resolver-trap tests now exist
one per host (collected, never skipped), so the unit suite allows no skip.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH negative control does not skip where the resolver trap cannot run (Windows reaches the page by a name the system resolves by itself)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the verdict judge closes the holes a review found (main comparison, complete, exact counts, xunit2, commit, list validation, DoH trap)
- main: --main-required compares when the file is there; --main-has-no-list (the gate's declaration that main was checked
out and has none) passes declared; a missing path without it is red. A failed download is no longer "main has no list".
- complete: every (suite, os) of the list reported a green result, no stranger, one commit, one binary per OS.
- exact: every row says whether collected must equal min_tests; the result json carries verdict green|red.
- the junit must be xunit2 (classname present, no file/line); the commit is --commit or git HEAD, never GITHUB_SHA;
--binary is mandatory and must exist; --seal is read (it carries no sha256 of the binary: said, not compared).
- the list is validated by args, judge and complete (exit 2 with the reason); against main also exact, os, tests, marker.
- DoH e2e: with INVPW_REQUIRE_TRAP=1 a resolver trap that cannot run or bind is a failure, not a silent skip.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH prefs follow the new split (the core declares the provider, the engine the state and the excluded names)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the git identity of the verdict test is a plain word
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A route answer the engine refuses is the engine's business, whatever its wording
The server took one wording ("Cannot find request") of an answer to a closed request as done and passed every other
protocol error up to the client. The engine also says "NS_BINDING_ABORTED
[nsIInterceptedChannel.resetInterceptionWithURI]" when the channel was cancelled while the answer was on its way: the
same event, and the client kept it as the error of the connection and raised it on its next route command.
Stock Playwright sends the three interception commands as may-fail and tells the client nothing, whatever the engine
says. So does RouteDispatcher._send now: every ProtocolError is swallowed, the route is disposed after it.
Tests: the static guard no longer allows a re-raise inside the handlers; a unit test feeds three wordings (red on the
old code for two of them).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wrapper: every context carries the position the core declares for the session
The geo step is asked with the session seed (launcher, async_api, the served
browser, the default session) and the core's SessionGeo.geolocation_override()
(latitude, longitude, accuracy) becomes the standard `geolocation` context
option in _default_context_kwargs: the default context, each new_context /
new_page and each context of a remote client get Browser.setGeolocationOverride
through the existing path (server.py _apply_context_options). A geolocation given by the
caller wins; no coordinates, nothing is sent; the permission is never granted
here. Tests written ahead: tests/test_the_session_position_reaches_every_context.py.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wrapper: a proxy given to a context declares its measured UDP exit (udp) in Browser.setContextProxy
The core measures where a SOCKS5 proxy's UDP leaves from and the answer is the optional
field `udp` of the proxy declaration. The wrapper hands it on:
- the launcher, the async launcher and launch_server pass the udp their geo step measured
to configure_proxy(udp=), so it reaches Browser.setBrowserProxy;
- the server's launch (a client that composed no session) declares the proxy with what the
geo step remembered, never coherent without a measurement;
- BrowserDispatcher._apply_context_options, the one place new_context(proxy=...) of the sync,
async and remote clients ends in, measures the context proxy BEFORE Browser.setContextProxy
is sent (the core discovers the TCP exit through it and measures the UDP beside it, once per
proxy, cached by endpoint and a hash of the credentials) and the result goes in `udp`.
Tests: a recorder in place of the engine, the fake SOCKS5 gateway with a UDP relay and a STUN
server only the relay reaches, declared through STEALTHFOX_UDP_STUN_SERVERS.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wrapper: the STUN servers are a launch parameter kept on the session (udp_stun_servers); the caller never declares udp
- InvisiblePlaywright(..., udp_stun_servers=None) (sync and async) and launch_server(...,
udp_stun_servers=None) take "ip:port" IPv4 literals (None = the core's two public defaults;
a name or a bad port raises ValueError naming the parameter) and keep them on the session.
The launch's geo step uses them, and so does every later new_context(proxy=...): the server
keeps the list on the browser it launches (the list rides to the server in the launcher's
composed prefs like the session seed and is taken out before the profile is written), so the
per-context call needs no new parameter. Nothing of it reaches the browser's environment,
argv, prefs or pipe (tested).
- The proxy command is built by the core's context_proxy_command / launch_proxy_command: the
`udp` field is the measurement, never what the caller wrote; configure_proxy(udp=) is gone
and the launch's measure reaches Browser.setBrowserProxy through the core's per-proxy memory.
- The constructor-signature pin records the new keyword.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the e2e of the UDP relay hand the core the STUN server its gateway answers (udp_stun_servers), and the dropped-UDP cases expect the new behaviour
The core now MEASURES the UDP exit of a SOCKS5 proxy before declaring it; only `coherent`
makes the engine send UDP to the relay. A gateway of the tests that is not asked the right
way is declared `no` and its e2e would fail for a reason that is not the product's.
- _socks_servers: MEASURE_NUMBER (the fake STUN by a number of its own, so the measurement
is told apart from the page's STUN_NUMBER), Gateway.measure_servers, silent_udp() (relay
granted, STUN never answered -> unmeasured), relay_host on every factory.
- _udp_line (new): measure_servers, egress_by_proxy (the TCP exit of each gateway: a context
proxy is measured against its own), declared_udp (what the launch measured; absent is not
`unmeasured`), one place for every e2e.
- test_webrtc_realness: one launch helper behind a gateway; the relay tests, the two-contexts
and the TURN-over-TCP tests use the exits of their own gateways; the dropped-UDP case is one
helper with three roads (refused: no, another exit: no, never answered: unmeasured) that
asserts the declared udp, no srflx, 701, and that the page's UDP never reached the relay.
- test_the_whole_udp_chain_by_name_e2e: the chain is told its own TCP exit (it was a
documentation address the chain's UDP does not leave from, i.e. `no`) and asserts coherent.
- test_the_udp_line_helpers (unit): the real measurement of the core against each gateway
and the chain; the helper's list is `ip:port` IPv4 literals the core takes.
- ci/required-suites.json: wrapper.e2e.udp 51 -> 53 (two new tests, listed by name).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: HTTP/3 is judged on three visits of one page (h2, h3, h3 with UDP free; h2 three times without), as a retail Firefox reads them
Reference: retail 159 Linux, 15 of 15 each way (invisible_WebRTC captures/h3-fallback): with
UDP free the first visit is h2 and the second and third h3; with UDP dropped every visit is
h2 and the later loads are as fast as the first.
- _h3_server: the TCP side speaks HTTP/2 by ALPN (h2 library; HTTP/1.1 only for a client that
offers nothing else), carrying Alt-Svc: h3; it answered HTTP/1.1 only, so the first visit
could never read h2. One HTML document over TCP and QUIC; tcp_alpn recorded.
- test_http3_through_the_proxy_e2e: the retail method (one context, three gotos, a pause of 2 s
after each load, nextHopProtocol of the navigation entry) on six roads: no proxy and a SOCKS5
with coherent UDP -> h2,h3,h3 (QUIC through the relay, the server never sees this host);
SOCKS5 that refuses UDP / leaves from another address / never answers (the declared udp is
asserted) and an HTTP proxy -> h2,h2,h2, no QUIC at the server, no page datagram at the relay,
visits 2 and 3 no more than 1.5 s slower than visit 1. An h3 on visit 1 is named as an error.
- _udp_line: expected_protocols / judge_visits (the sequence and the judgement, unit-tested).
- test_the_h3_line_helpers (unit): the server really negotiates h2, says Alt-Svc, answers the
same document over h3; the judge names each mistake.
- ci/required-suites.json: wrapper.e2e.udp 53 -> 57 (the http3 file has 6 tests, was 2).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A keepalive fetch is a request of the page for the client, in a real browser
e2e: the page sends a plain fetch, a keepalive fetch (cors and no-cors) and a beacon; the client must hear a `request`
for each and an end for each. Measured on the firefox-62 engine: the server received the keepalive fetches and the client
heard no `request` for them (stock Playwright's Firefox reports them). Red until the engine attributes the request to
its page.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the no-proxy gather is a required test of wrapper.e2e.udp (58 tests)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the descriptors of the spawn are asserted by running it, not by reading the core's source
test_the_spawn_keeps_the_two_hardwired_descriptors asserted that the source of the core's _spawn_posix contains
`pass_fds=(its_read, its_write, 3, 4)`. Core 62.64.0 starts the engine with posix_spawn and file actions, so the words are gone
and the test failed on every Linux unit suite although the behaviour is the same (and better).
The test now runs the spawn: a parent with nothing open on 3 and 4 and its pipes far from them launches a program that reads
fd 3 and answers on fd 4 (the contract of nsRemoteDebuggingPipe.cpp), and the answer must come back and the child must hold no
descriptor above 4 of the parent's. Same shape as the core's own test
(test_the_pipe_of_the_engine_reaches_its_fixed_descriptors). No skip: the file is already POSIX-only.
The other tests of the file do not read source text (checked: no getsource/inspect/read_text left).
Ran the parent program on Linux with core 62.64.0 (image tetra-invisible:run1b-final): pong:ping:0.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the fake DoH of the e2e uses a name that is not HSTS-preloaded (doh.gateway.test at 192.0.2.53), declared through extra_prefs
Firefox refuses certificate overrides for HSTS-preloaded/pinned hosts, so a self-signed fake for
mozilla.cloudflare-dns.com could never be accepted. The test now declares its own provider
(network.trr.uri, network.trr.bootstrapAddr) and counts every connection of the browser, including
the background traffic of the default context whose TLS fails by design, at the gateways.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the chain by name declares the FakeDoh's own provider (doh.gateway.test): the DoH of Mozilla is HSTS-preloaded and takes no override
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the h3 e2e turn off Firefox's check of third-party roots (a self-signed test server stops HTTP/3 otherwise: measured)
The Alt-Svc is learned and the QUIC handshake of validation passes with the override, then Firefox closes the connection itself because the chain
ends in a root it does not know, and every visit stays h2. With network.http.http3.disable_when_third_party_roots_found off the three visits read
h2, h3, h3 (3 runs of 3, no proxy, on the engine of the first round).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the ICE server name of a PeerConnection is resolved in the context of its page, by the proxy of that context (red until the resolver carries the OriginAttributes)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the ICE-name e2e is part of wrapper.e2e.doh (11 tests)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the first datagram of a PeerConnection does not wait for a UDP association (red on the giro 2 binary: 396 ms)
The pool of UDP associations was warmed only in the process of the HTTP connections (the parent); the sockets of the PeerConnections
are made in the socket process, which found it empty and made its association from scratch: three answered steps before the first
STUN datagram. A gateway that answers every step after 130 ms makes it visible: on the giro 2 binary the first datagram leaves 396 ms
after the birth of the PeerConnection. The test asserts it leaves within 250 ms, and that an association was granted before.
The gateway of the tests now also keeps the wall-clock origin of its times and the instant of every accepted connection.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A TURN server over TCP is connected to and waited for, direct and behind SOCKS5 (e2e)
A TCP stand-in for a TURN server on this machine's address accepts, reads and closes N ms after the accept; the page asks for a
TURN allocation over TCP. A retail Firefox connects, sends the Allocate request and hears 701 when the server closes (accept
at 48 ms, 701 and the gathering complete at 850 ms with N=800). The candidate engine never connected: no accept, no bytes, 701 within
9-28 ms with the gathering complete, direct and through the gateway alike.
Red on the firefox-63 candidate build; green expected with the engine commit that binds the wildcard of the declared family.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the warm-pool and the TURN-over-TCP e2e are required in wrapper.e2e.udp (61 tests)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the gather without a proxy and the ICE-name e2e wait for the engine that carries the UDP line
test_the_gather_is_real_without_a_proxy (in wrapper.e2e.udp) had no the_udp_line, unlike the other tests of its file, and the
ICE-name e2e (wrapper.e2e.doh) resolves a name through the proxy of a context, which the engine firefox-63 does. On an older
engine they skip with the reason; on the candidate (firefox-63-candidate) they run, so the exact lists of
ci/required-suites.json are unchanged. The networkidle e2e stays ungated: it needs no proxy and no UDP, and is fixed by the
Python of the core and the wrapper on any engine. Review finding 14.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the declared-network e2e no longer sets variables the engine does not read
STEALTHFOX_WEBRTC_PUBLIC_IP and STEALTHFOX_WEBRTC_DISABLE_IPV6 are not read by the engine or the core (the unit test of the
declaration bans them in the environment); the e2e set and deleted them and imported _FAKE_EGRESS only for that. Dead setup
that said the egress still feeds WebRTC. Review finding 27.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: one helper for the address of this host, computed before any server starts, a host without a default route skips
this_host_address() and its two copies connected a UDP socket to 192.0.2.1 and raised OSError on a host with no default route;
in the chain it was evaluated as an argument after the TURN server, the resolver and the page were already listening, so the
test errored and leaked three listeners instead of skipping. The helper is now tests/_host_address.py (OSError => pytest.skip),
the chain asks it first, and the three copies are gone. Review finding 29.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ProxyEgressNonVerificabile: the docstring says what goes unconfirmed (timezone and locale), not an address
The engine no longer declares an egress address (the host network is drawn from the seed); only the timezone and the locale are
decided from the egress. Reworded like ProxyEgressDrifted, with a test on the text that fails on the old wording. Review
finding 30.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a context that is the only proxy resolves its names by DoH through it (red while TRR stays mode 0 for context-only proxies, green with engine 9bff9cf8de)
A session launched with no proxy, a context made with its own SOCKS5 gateway, a page at a name only the FakeDoh can resolve: the
name must be asked to the DoH by that gateway, the page reached by address through it, nothing to the DoH directly and no
question about the zone to the resolver of the machine. Review finding 4 (the e2e that was missing).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the context-only-proxy DoH e2e (wrapper.e2e.doh, 12) and the host-address helper unit tests (wrapper.unit.udp, 97) are required
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The page dispatcher waits for Page.ready before the page is handed over (needs invisible-core with Lifecycle.wait_for_page_ready)
Same defect and fix as in the core's page (see the core commit): a goto sent right after new_page could meet the page's initial about:blank.
The pin of invisible-core moves with the core release that carries wait_for_page_ready.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Pin invisible-core==62.65.0 (a page handed over when the engine says it is ready); changelog
The core that carries Lifecycle.wait_for_page_ready is invisible-core 62.65.0 (draft PR invisible_core#238), not on the index yet:
the pin check of this push is skipped on purpose (INVISIBLE_PIN_CHECK=skip).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stand-in engine of the registry test says Page.ready, as the real one does (the page is handed over on it)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a context with a proxy resolves by DoH through it and a context without one never uses the DoH; the first navigation of a fresh context never asks the system resolver (written ahead of the engine)
The context-only test also asserts that the DoH log holds no name but the proxied context's, that no handshake failed and that the
default context's background lookups reach the system resolver (the trap, where it runs). New race test: eight contexts created
and navigated back-to-back, a launch-proxy variant, and a proxied context beside one without a proxy. The DoH e2e docstrings
follow the per-context rule.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH of a proxied context when it is slow (2 s per answer) and when it refuses a name once; FakeDoh gains delay_s, delay_names and fail_first (written ahead of the engine)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the refused-once e2e shortens the DNS negative cache, so it measures a temporary block and not Firefox's 60 s failure cache
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: new_page and a popup are handed over only when the engine says Page.ready (red without the wait in PageDispatcher, green with it)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the resolver-race and DoH-under-stress e2e (wrapper.e2e.doh, 17) and the FakeDoh levers unit tests (wrapper.unit.udp, 110) are required
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the refused-once e2e says what it measures and what it does not
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the engine never reads the host's hosts file, with a proxy or without (MOZ_LOG per process, with a control)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the hosts-file e2e is required in wrapper.e2e.doh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: h3 behind a proxy follows the definitive retail (never h3 at visit 1, h3 within 5 visits, h2 every visit without usable UDP)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A page is built at once and announced when the engine says Page.ready (the wait inside the constructor held a popup's first request behind a page that did not exist yet, and lost its commit and load)
- PageDispatcher no longer waits in __init__; wait_until_ready() is called by the adoption between the construction and the announcement
(context 'page' event, newPage answer). A detach while waiting ends the wait; a page that is not ready in time is disposed.
- The main frame's initializer carries what the lifecycle already knows (url, name, load states), as every other frame's does.
- Tests: unit (a popup exists and listens while it waits; what it does before its ready reaches its frame; red on 6a60dce) and e2e
(a popup of a link, noopener or window.open reaches an in-process and a stock client of a served browser within 2 s, with and
without a context route; 15 of 16 red on 6a60dce, 16 green).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stand-in pages say wait_until_ready; the popup e2e reaches the stock client as the other served tests do
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the popup reaches the client from another site too (a link, noopener, window.open: 16 more cases, in-process and through a served browser)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A popup is reported on Page.ready as Playwright's is: no limit and no warning, with the address of the commit that came with the ready
- Stock Playwright 1.62 (measured): a 204 or a silent destination gives no page event, one that answers after 4 s gives it at 4 s with the
destination already. The adoption of a popup waited 20 s and dropped it with a warning; now only a page a caller asked for
(newPage) has the 20 s; a popup waits until the engine says Page.ready, the target goes away, or its context closes
(BrowserDispatcher.end_waits_of), and says nothing.
- The ready and the commit of the document that made the page ready come in the same turn: the page is announced after a round trip to the
engine (settle_events), so the frame reads the destination at the page event (3 of 4 slow popups said about:blank).
- In-process the slow popup arrived 0.9 s later than stock: it is the humanised click (1.1 s of pointer movement before the click returns),
the popup arrives 4.02 s after the click in both modes.
- Tests: unit (limit None for a popup and 20 s for a requested page; a popup with no ready ends with its context and says nothing; the
address at the page event is the commit's) red on b09d620; e2e (204 and silent: no event; 1.5 s: url is the destination; 25 s: reported
then) in-process and through a served browser: the 25 s ones red on b09d620.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A download started by a popup that is not announced yet is reported on its opener, as Playwright reports it
- Browser.downloadCreated names the tab the download came from. A tab opened for an attachment (a target=_blank link, a window.open) never gets
a Page.ready and the engine closes it at once, so it is not among the announced pages and the download was lost: no download event
anywhere (a21e1de had it, on the popup). Playwright's ffBrowser._onDownloadCreated reports it on the opener of a page that is not
reported yet; so does this, from the opener recorded when the target was attached (BrowserDispatcher._openers). The abort of the
navigation that became the download still goes to the page that owns the frame.
- Tests: unit (red on fbceeaf); the e2e of the destinations and of the popup matrix of the fake-web branch (73f1e8d): 16 + 34 cases against
the reference measured on stock Playwright 1.62 - on fbceeaf 4 of the 16 were red (the download), now 50 of 50 green.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the page and popup suites of 0.50.1 are required (wrapper.e2e.page 96, wrapper.unit.page 17), wrapper.unit.udp counts 113 after the merge
* ci: the drive gate launches through the core (the engine waits for the session's road; bare Playwright never sends it); the declaration test does not resolve an engine
* A popup tells its listeners the load it reached before it was announced; an unannounced frame has no address of its own
- The popup is announced when the engine says Page.ready, which is when its document commits, so its domcontentloaded and load may be said
before the client has the page: page.on('load') registered in the handler of the page event never fired (Playwright's does, measured by
the independent run: destinations of 4 s and 25 s). FrameDispatcher.emit records those two states while the page is not announced and
PageDispatcher.announce says them again right after the page event, in their order and under one lock; the first time they already set
the state wait_for_load_state reads, so it returns at once. Only popups: a requested page is announced as before.
- The main frame is created with the address the lifecycle knows, '' if it has committed nothing (an attachment's empty tab), not
about:blank: Playwright says '' there.
- Tests: unit (the two states after the page event, in order; red on 2f153c7); e2e: a listener registered in the handler of the page event
hears the load of a slow popup, wait_for_load_state in the handler returns in under 2 s (in-process and a stock client over a served
browser, window.open and link).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the first visit of the h3 e2e is h2 because the fixture has no HTTPS record (the retail read h3 first in 3 sessions of 15); the FakeDoh never serves type 65 and the tests assert it
* A popup whose target goes away while its page is being built is announced and closed, not waited for for ever
A download's empty tab is closed by the engine within milliseconds; on a loaded machine its page is still being built when the detach arrives.
_handle_detach recorded it as early (nobody in _building to tell) and the adoption then waited for a Page.ready that never comes: the
popup was never announced (test_popup_destinations_e2e, the download on the opener, failed once in a full suite run). The adoption now
looks at the early detaches when it registers the page as waiting.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A command of the adoption that finds the target's session gone announces and closes the popup, as a detach before the ready does
The independent run on a quiet machine lost one link-into-attachment popup in a hundred: the engine closed the tab WHILE the adoption was
initializing it, answered 'cannot find session' to Page.setInitScripts, and the popup was discarded with a warning - no page event - where
Playwright's is announced and closed. PageDispatcher._build now treats an initialization command that fails because the target or its session
is gone (one test: _target_is_gone) as the same case: the page is built, flagged gone_while_building, and the adoption announces it and closes
it right after. Test: a fake engine answers 'cannot find session' to each command of the adoption in turn (parametrised): the page event and
the close arrive, no warning; red on b05741f for Page.setInitScripts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the page and popup suites count the tests of release/0.50.1 6200bc2 (e2e.page 100, unit.page 24)
* ci: test_a_page_that_moves_on_e2e.py is required in wrapper.e2e.page (114): the e2e of the engine fix for a navigation the page overtook
* tests: the resolver trap says why it could not bind (the error of the socket)
* tests: the helper of the popup destinations does not shadow the browser fixture (ruff F811)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the resolver trap takes the first loopback address it can bind for port 53 (a hosted runner can hold 127.0.0.1:53) and writes that address in resolv.conf
* tests: two connections on one page are judged on the road they take, not on the clock of the machine
The test asserted a median of 30-55 ms, the time of a fast machine. On a GitHub runner the same healthy engine takes 67 ms (Windows) and
122 ms (Linux) and the gate was red on both: an absolute time is a verdict on the machine.
Every one of the five cold launches is now judged on what the machine cannot change:
* the data channel opens and echoes;
* each connection gathered a UDP host candidate named by mDNS (a run without UDP is the reserved-port failure: the socket could not bind and
the connection fell back to TCP);
* the nominated pair, read from the browser's own statistics, is host to host over UDP at both ends (no road through TCP; a succeeded pair
means the other connection's mDNS name was resolved);
* it opens in less than the responder's first retry (3 s): a name that does not come back opens only at the retry.
The time is printed beside the retail window, as a measure.
Run on the firefox-63 candidate engine: passes, [38, 39, 39, 73, 77] ms.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a caller that asks for the ICE in the content process, or for no socket process, gets the srflx through the relay all the same (the engine locks both prefs)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: wrapper.e2e.udp counts 68 (the three ICE rows of test_webrtc_realness: default, content process asked, no socket process asked; the engine locks both prefs)
* tests: the popup tests do not fail on the machine's speed (no 2 s limit)
A runner with four workers delivered a popup in 2.013 s (the limit of the test was 2 s). The verdict of these tests is that the popup arrives with
its address and its load; the wait is generous (30 s) and the check of the time is gone. The wait_for_load_state of the handler is bounded by 8 s.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the popup tests do not fail on the machine's speed (no 2 s limit)
A runner with four workers delivered a popup in 2.013 s (the limit of the test was 2 s). The verdict of these tests is that the popup arrives with
its address and its load; the wait is generous (30 s) and the check of the time is gone. The wait_for_load_state of the handler is bounded by 8 s.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the fixtures that several e2e files share are in conftest.py, not imported from a sibling file (ruff F811, the lint of the tests job)
A fixture imported from a twin file and then named as a test argument is a redefinition: 60 F811 in the new tests of the UDP line, the
same error that turned the 0.50.1 CI red. The collection does not change: the same 2187 tests (1422 by default), the same setup plan
(fixture order and scope per test, compared with --setup-plan before and after).
- conftest.py: doh, gateway, trap, watcher, pages (DoH e2e), socks5_tcp_only, local_https_page (WebRTC e2e) and browser (the two-transport
fixture of the popup tests). The heavy imports are inside the bodies, so a run without the e2e extras still collects.
- _doh_support.py (ZONE, Pages) and _socks_servers.py (Socks5TcpOnly, was _Socks5TcpOnly in test_webrtc_realness.py): the plain code the
fixtures need, in support modules, not in a test file.
- The twin files keep what is not a test argument (the autouse _hermetic_session and the helpers, imported by name); the sibling files
stop importing the fixtures. The four `# noqa: F811` of test_popup_destinations_e2e.py are gone: ruff passes with --ignore-noqa.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the trap-policy test reads the trap fixture in conftest.py (6b moved it there with the lint of the fixtures)
* The adoption of a target is one explicit state machine, proved over every order of the engine's events
Four patches of the same race (a detach before the ready, during the build, between the build and the wait, a command answered 'cannot find
session') and a fifth the exhaustive test found (a detach while the adoption waits for the main frame of a tab the engine never announced:
the wait went on for 20 s and the popup was discarded; this is the order the runner produced for the download popups: 3 of 4 lost).
- _Adoption: the single record of a target between its attach and its announcement: state (attached, building, waiting, announced), gone
(set by the engine's detach AT ANY MOMENT), page, opener, context. It replaces _adopting, _building, _openers and _detached_early.
- Every wait of the adoption looks at gone (the main-frame wait polls it), every state change is one method (_enter_building, _enter_waiting,
_enter_announced), a command that finds the session gone ends in the same place as a detach, a closing context takes away every adoption
of it in any state (end_waits_of).
- Invariant: an attached target that is not a page a caller asked for gives the client exactly one page event, at its ready or at its
disappearance (and its close right after), unless its context closed first.
- Test: test_every_order_of_the_events_of_a_popup_gives_one_page_event stops the adoption thread at six points of its own and delivers the
engine's events (frame, commit, ready, detach, in every prefix) at every one of the eight moments: 635 orders, none sampled. Mutation
check: without the gone-aware main-frame wait 24 orders break, without the tolerance of the command error 42, without the close after the
page 374; without the early-gone check of _enter_waiting the adoption hangs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The adoption keeps a short trace per target and writes it where a popup is dropped or fails
The log of a CI run says that a popup was not announced and not in which order the engine's events came. Each target in flight keeps (in memory,
at most 60 short strings, nothing afterwards) what the engine said (frame, commit, ready, detach) and what the adoption did (building, waiting,
announced), with the milliseconds since the attach. It is written in the warning of a failed adoption, in the error the newPage waiter gets, in
the timeout of a requested page, and in browser._dropped (the last 16 targets dropped with their context).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The WebGL determinism test says why the browser could not make a context
One run in 31 of the e2e on a loaded Linux runner failed this test with "reason='gl null'" and nothing else: getContext('webgl') gave the page null. The browser
says why in the `webglcontextcreationerror` event (statusMessage: the failure list, e.g. "tryNativeGL (FEATURE_FAILURE_EGL_LOAD_3)", "Initializing WebGL backbuffer
failed.", "GL error 0x505 occurred during OpenGL context initialization"), and each of the paths that can produce null on Linux in our engine writes a different one
(library not loaded, display not initialised, context not created, GL out of memory, backbuffer not allocated). The test reads the event and puts it in the
assertion, and tries webgl2 on a fresh canvas (the old canvas already had the failed type).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the same-site control of the Fission bench measures the frame, not the process pool
The control counted the processes that host a site between two reads, with the default pool of three preallocated content processes: a pool
process handed to a site after the first read moved the count without the frame having asked for anything ([63248] -> [63248, 63386] on a
four-worker runner; the same family as 5402da4, ff2123e and fef0bc5). The control now runs in a browser with dom.ipc.processPrelaunch.fission.number
at 0, where a process of a site appears only because a site needed one, and says so if the page of the site has no process to compare with.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH e2e declare the exit the UDP measurement asks for; the gateway's page is reached by an address; e2e.udp is split in e2e.udp and e2e.web; the trap says who holds port 53
* tests: two connections on one page may nominate a peer-reflexive end; the road is what is judged
On the round 3 gate (Linux, run 43164943499) the nominated pair was host to prflx: the other connection's mDNS name was not resolved yet when its
connectivity check arrived, and the address the check came from is learned as peer-reflexive. That is the same direct local road, so the test accepts
host or prflx at each end, over UDP at both ends, and refuses what is a different road: a relay, a server-reflexive candidate (through the proxy or the
network), or TCP. The open time stays judged against the responder's first retry, and printed beside the retail window.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a port 53 that cannot be bound is redirected from 127.0.0.2 to a free port (iptables nat OUTPUT), the rules go with the trap
* tests: the resolver trap ends its threads before it closes its sockets, so its port is free for the next test (no more "Address already in use" on 127.0.0.1-8:53)
The answering threads sit in accept()/recvfrom(); on Linux a close() from another thread does not wake them and the kernel keeps the socket
bound until the call returns, which it never did: every trap left its address taken, and the eighth trap of a run found all eight taken
(reproduced here in a container: 19 DoH e2e, the 6 tests after the 8th trap are errors; alone, the same file passes). The loops now wake every
0.2 s to look at a flag; the teardown sets it, joins the threads, and then closes the sockets.
- test_a_closed_trap_gives_its_port_back_at_once (wrapper.unit.udp 139 -> 140): a trap on a free port is closed and a second one on the same
port must bind 127.0.0.1 again; red on the old code on Linux.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The download of a tab that is not announced yet is said after the page event of the tab
The tab opened for an attachment is announced when the engine takes it away, a few milliseconds after it says the download; the download
(reported on the opener) went to the client first, the popup after: the order the other way round from Playwright's, and a client that read
the popup the moment the download arrived found none on a one-CPU machine (the 4 download cases of GitHub, 3 of 4 red; the same on a one-CPU
container: 1, 0, 2 of 50 on a90dadc). The adoption holds the download on its record and says it right after the page event (never lost: also
when the tab is dropped or fails).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the discovery of the exit of a context stays covered now that the DoH e2e declare it away
The DoH e2e declare the exit the core asks for (their subject is the roads of the browser). The discovery itself keeps its own test: it goes
through the gateway of the context, by name, only to the services of the core, never through another context's gateway, and a gateway that
refuses them never makes the measurement say coherent. wrapper.unit.udp 140 -> 142.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the iptables fallback of the resolver trap is gone (the cause was the trap's own threads holding the port, fixed in 4933f8c); wrapper.unit.udp 141
* tests: the realness check without a real proxy - six declared exits, the values a page reads, and the judges
The manual check drove the browser through a paid proxy and compared what a page reads with the proxy's exit. This is the
same check against a local SOCKS5 gateway that declares its exit: a local site that tells a connection the gateway opened from
a direct one, FakeDoh for the names, and the core's own geo database as the truth for the zone and the country.
* test_realness_behind_a_declared_exit_e2e.py: one launch per exit (six, in six countries), read by five tests (the address a
site sees and no connection past the gateway; nothing of the host in the WebRTC candidates and SDP; the names reach the gateway
and not the system resolver; the zone, the offsets read two ways and a worker; the language of the page, a worker and the
Accept-Language header against the exit's country), plus the vendored detection page loaded behind the gateway.
* _realness_support.py: the exits, ExitGateway (remembers the ports of the connections it opened), the site, the reads, the judges.
* test_the_realness_helpers.py: the judges and the gateway/site correlation held to golden reads, no browser.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the realness e2e (32) is a required suite, its helpers (24) join wrapper.unit.udp (165)
* A download is taken with the record's removal in one step, and the opener of a target not announced is remembered: no step of the adoption can lose it
The failure branch said the pending downloads BEFORE it removed the record: a download created between the two found the record, queued on it, and
nobody said it. Taking the pending downloads and removing the record are now one step under the browser's lock, in the three branches
(announced, dropped with its context, failed); the opener of a target that ended without being announced is kept for the last 16 targets, so a
download that comes after the record is gone is still said, on the opener. Test: the download is forced into the gap of the failing adoption
(red on 65f7580: said 0 times, now once).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: wrapper.unit.page counts the popup-order test and the changed page tests of release/0.50.1 8049df3 (32)
* wrapper: the opener kept for the downloads of a target whose adoption failed lives until the engine detaches the target, and none is made for a target already detached; unit tests (unit.page 34)
* tests: the first datagram of a PeerConnection is judged with the session's UDP declared coherent, and the core's own probe is not counted as the engine's association
The giro 3 gate was red on this test: with a fixed time zone the core does not discover the TCP exit, so it cannot compare it with the UDP probe's mapped
address and declares the UDP of the proxy unmeasured; the engine then treats the proxy as a router that drops UDP, asks it for no association and sends
nothing (measured on the giro 3 Linux binary: the gateway saw ONE ASSOCIATE for the whole test, the core's probe; the layer was pushed on the PC's
socket and what was sent was dropped). The test gives the core the gateway's TCP exit as every e2e of the line does (egress_by_proxy), and it no longer counts
the probe's association (the first of the gateway, made before the browser exists) as one that was ready before the PeerConnection - it passed an
engine that asked for none. Green on the giro 3 Linux binary (run 43164943499).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the CONNECT helper of the HTTP proxy tests reads the answer one byte at a time, so the first bytes of the tunnel are not lost with the head; unit test (unit.udp 166)
When the far side wrote and closed at once, the 200 and the first bytes of the tunnel could reach the socket in one segment, and _connect_raw dropped everything after the blank line: the caller read the end of the stream instead of the data (run 43176569993, test_a_connect_to_loopback_is_relayed_and_one_that_would_leave_it_is_refused).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the chain by name allows loopback in ICE, because the lab's exit is 127.0.0.2 and a retail Firefox throws away an answer whose mapped address is loopback
The giro 3 gate was red on test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick. Measured on the giro 3 Linux binary (strace of the socket
that talks to the relay + the gateway's own log): the gateway delivers the TURN server's 401 and then its success (type 0x0103) within 5 ms, the browser
reads both, answers the 401 with credentials, and never accepts the success: it retransmits the same Allocate 5 times in the 2 s of the page. The
success carries XOR-MAPPED-ADDRESS 127.0.0.2 (where the gateway's datagrams leave from, by design of the test) and nICEr rejects a loopback mapped address as
bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) unless the ICE context allows loopback (turn_client_ctx.cpp; the flag is set from
media.peerconnection.ice.loopback in nricectx.cpp). The same TURN server answers a direct browser at a non-loopback address and the allocation completes in
60 ms, so the chain is sound. With the pref the chain test passes at 130 ms of round trip on the giro 3 binary; without it it fails at 0, 65 and 130 ms.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the comment of the first-datagram test says why the core's discovery of the exit fails in the lab (no echo service is reachable), not that a fixed time zone skips it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH, stress and ICE-names e2e ask for a virtual display on a Linux machine that has none; unit tests (unit.udp 173)
Run 43176569993: 19 of 19 of wrapper.e2e.doh on Linux died at the launch with "no DISPLAY environment variable specified". Those files launched a headed browser without a screen (the runner has none, and the suite runs under sudo). The other e2e launch with headless=True, which is a headed browser on an Xvfb the wrapper starts itself. A machine with a display, and Windows, are left as they are.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the chain by name reads its srflx and its relay from the page with a gateway exit that is not loopback, and the loopback pref is gone
The exit of the lab is 198.51.100.9 (documentation, RFC 5737), held on lo with ip addr add for the length of the test; nICEr accepts it as a mapped
address (nr_stun_transport_addr_check rejects only wildcard, loopback and link-local), so the product's own setting is what is under test, not a pref that
is off in production. The page must read a srflx equal to the gateway's exit and the relay candidate of the TURN server it asked.
The file moves to a suite of its own, wrapper.e2e.udp.exit (Linux only, root): adding an address to an interface needs administrator and changes the network
of the host, so the Windows suite does not collect it (a skipped test would turn the verdict red). Chain takes exit_host; the TURN helper test runs for two exits.
Red on the old code: with the 127.0.0.2 exit and no pref the test fails at 0, 65 and 130 ms; green on the giro 3 Linux binary at 130 and 0 ms (container).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH, stress and ICE-names e2e always launch on a virtual display (headless=True, as the UDP and realness e2e); the helper that looked at the display of the host is gone; unit tests (unit.udp 177)
A test does not behave differently by the display of the machine it runs on. Replaces the helper of 302af97.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the QUIC of the gateway test works on Windows: the relay leaves from the host's address, is told by its port, and a send that fails is said; unit tests (unit.udp 176)
On Windows the e2e read h2 on five visits and 'the server saw QUIC from []': the relay of the gateway sent from 127.0.0.1 to an address of its own
host (WinError 10051, nothing sends from loopback to the host's address there) in a timer that ignored every OSError, after logging the datagram as carried.
- the coherent gateway of the h3 test leaves from the host's address on every system (exit_host), and its fake STUN is bound there too (Windows sends
neither from the host's address to loopback, 10049, nor the reverse); the relay is told from a client that came direct by the PORT it sends from
(Gateway.exit_ports, H3Server.quic_peer_addrs); it forwards only to this host (forward_only_to): the browser's own QUIC to the Internet stays in the lab.
- Gateway._later records a send that raised (send_errors) and the report of the test shows it; the test asserts there is none.
- the relay's sockets turn SIO_UDP_CONNRESET off on Windows and a ConnectionResetError no longer ends the thread that reads.
- unit tests: a failing send is recorded and reported; a relay that leaves from the host's address reaches a server there, by a port in exit_ports and not
one of a direct client; the fake STUN answers through it. Red on the old helpers (they have no exit_host/exit_ports/send_errors).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: three e2e modules of the UDP line are bound to the engine that carries it, as the others are
test_networkidle_through_a_served_browser_with_routes_e2e.py (red on firefox-61 and 62: its engine fix, 0972db59da, is in the 63), test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py
and test_turn_over_tcp_is_tried_for_real_e2e.py (red before the UDP line) had only pytest.mark.e2e, so the e2e job of main, which fetches the PUBLISHED engine, would run them
against it. They now carry usefixtures(the_udp_line): they skip on an older engine and run on the candidate (REVIEW-63 #14). The collected counts do not change
(21, 1, 2); the ids stay in ci/required-suites.json, and a skip on the candidate is still red there.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the chain by name keeps its walk on Windows (exit of the lab on loopback, with the pref) beside the one without the pref (wrapper.e2e.udp.exit, Linux)
d41ea7e moved the whole file to the Linux-only suite. Now the file holds two tests: the walk with an exit that is not loopback and no pref (wrapper.e2e.udp.exit, Linux, root), and the walk with the exit on 127.0.0.2 and media.peerconnection.ice.loopback (wrapper.e2e.udp, Linux and Windows). Selected by node id; wrapper.e2e.udp 41 again; the notes of the two suites say why.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* request.resource_type agrees with the pinned driver: a beacon is `beacon`, a CSP report `cspreport`
The table that turns a Juggler cause into a Playwright resource type was a copy of the driver's and had gone stale: the pinned
driver (1.61, coreBundle.js ffNetworkManager) says `beacon` for TYPE_BEACON and `cspreport` for TYPE_CSP_REPORT; ours said `other`
for both. Measured on cnbc.com and scmp.com, our engine and Playwright's own Firefox side by side: the same POSTs (2 and about 8
per page) are `other` here and `beacon` on stock, so a client or a route filter that looks for beacons saw none.
Test (red on the old table): the driver's own table is read from the installed package and every cause it names must map to the
same type here; the next driver version that changes it fails the test, nothing is updated by hand.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The old table test expects beacon for TYPE_BEACON, as the pinned driver says
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the DoH session built by hand launches on a virtual display too, and a test reads every direct InvisiblePlaywright(...) of the DoH and realness files (unit.udp 181)
Run 43188313516: test_a_session_without_a_proxy_resolves_with_the_system_resolver died with "no DISPLAY environment variable specified": it builds its
session by hand (not through _launch) and was not covered. The new test parses the files of the two suites and fails on a construction without headless=.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the resolver trap counts the questions of the user that runs the test, by the owner of the socket (/proc/net), not by name; unit.udp 189
Run 43188313516: on a runner the agent of the runner asks for github.com, api.github.com and its orchestrator through the /etc/resolv.conf the trap
rewrites, and the trap blamed the browser (6 realness tests and 1 DoH test). A question whose socket belongs to another user is answered and
listed in trap.foreign, not counted. The owner is read on receipt, before the answer: measured on Linux, 3000 questions that wait for their answer,
0 unreadable; one that cannot be read counts as the browser's.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: a loss is not a drop - behind a proxy that cannot carry the UDP of a PeerConnection, nothing of the browser reaches a witness direct (suite wrapper.e2e.udp.exit)
The e2e that check 'no srflx' cannot tell the fail-closed rule from a leak: at an address nothing routes a datagram sent direct arrives nowhere, exactly as a dropped one.
A witness (_witness.py: a STUN server and a TCP listener at 198.51.100.10, held on lo, reachable by the browser directly) hears who contacts it, and the gateways leave from ANOTHER
documentation address (the exit, 198.51.100.9; the test gateway's TCP now leaves from it too, opt-in: tcp_from_exit). In each fail-closed scenario - a SOCKS5 proxy that refuses UDP, one whose UDP
leaves from another address, one whose relay never answers, an HTTP proxy - the witness hears no datagram and no connection from a source that is not the exit; a send direct is red. The controls
that make the green mean something: the same page with no proxy IS heard by the witness (datagram and connection), and behind a coherent gateway the witness hears the exit only.
Proved in the container on the giro 3 Linux binary (green, 7 tests of the suite). The witness and the gateway's source binding have unit tests (192). Counts: wrapper.e2e.udp.exit 7, wrapper.unit.udp 192.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* launcher: preload_newtab, the option of the core that turns off the preloaded New Tab page
InvisiblePlaywright(preload_newtab=...) (sync, async and launch_server)
hands the core's option of the same name over, only when it is not None:
a wrapper paired with a core that does not know it cannot meet a
TypeError for a caller who never used it. None keeps the retail's
behaviour; False writes browser.newtab.preload false (no privileged-about
process); True says the retail's value aloud; a pref in extra_prefs wins.
Tests: the kwarg reaches the core only when asked and is a parameter of
every entry point; the e2e reads the process types from the engine's log
(MOZ_LOG=Process:5): privilegedabout exists by default and is absent with
the option, on every platform.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: wrapper.unit.udp counts the three tests of preload_newtab (195); its e2e is in no suite until it has been seen green
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the constructor signature knows preload_newtab; the witness takes TCP first (Windows excluded ranges); the preload_newtab e2e (seen green as root on Linux) joins wrapper.e2e.udp.exit (9)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: wrapper.e2e.udp.sandbox (Linux, a normal user, the browser's sandbox on): the socket process and a tab process must have a seccomp filter, plus the three situations of the UDP line (a proxy with UDP, no proxy, a proxy without UDP with the ICE name by DoH)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the preload_newtab e2e moves to wrapper.e2e.udp (seen green on Windows, 10 runs of 10): udp 43, exit 7
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the UDP witness binds TCP and UDP on one number even where the system's picks fall in a refused UDP range
Witness("127.0.0.1") failed with WinError 10013 in three unit tests of
wrapper.unit.udp on a Windows work machine, while the push before had passed
them. Windows hands out ephemeral TCP ports in sequence and keeps excluded
ranges of a hundred ports for UDP in the same zone: the witness asked the
system for a TCP port twenty times, got twenty consecutive numbers inside one
UDP range, and gave up.
Now each try binds TCP and then UDP on the same number, and if either is
refused both are released and another number is tried: the first is the
system's own pick, the others are drawn at random below both Windows'
dynamic range and Linux's ephemeral range, so they are not the next of a
sequence. 200 tries at most, then an error that names the address and the
last refusals. A port asked for is tried once and its refusal raised.
Test, red on the old code (2 of 3): a fake socket layer whose TCP picks are
sequential and whose UDP refuses 50000-50199. Real sockets on that machine,
20 runs of the witness tests each: old 19 of 20 green, new 20 of 20.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: wrapper.unit.udp counts the three tests of the witness port pick (198)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the sandbox leg finds the tab processes (forked by the fork server, their argv has no 'tab' at the end): the kind comes from the last word, else from the Name in /proc/<pid>/status
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the resolver trap counts the questions of the processes of the test (the socket's inode, the process that holds it, its parents), not of a user; a question of any other process is listed with its pid and command
Runs 43188313516 and 43211837926: on the runner the agent of the runner, as root like the browser under sudo, asks for github.com, api.github.com and its orchestrator
through the trap's /etc/resolv.conf, and a user filter cannot tell it from the browser (6 realness tests red). Measured on Linux, 40 questions of a descendant and
40 of an orphan process of the same user: 40 counted, 40 foreign, each with its pid and command. One whose process cannot be traced is judged by its user, one whose
socket is gone counts as the browser's.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the resolver trap counts the BROWSER (a browser process and what it starts), not the test process nor the core it runs: the core asks github.com for the latest GeoIP tag as root, the test says the browser asked
Measured on Linux: a process named firefox and its child counted 20 of 20 each; the test's own python and an orphan of the same user foreign 20 of 20 each.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* juggler: a download that finished before it was announced is finished
BrowserDispatcher._on_download_finished keeps the error of a download whose
artifact does not exist yet; a successful download has no error (None), and
_on_download_created popped it with a None default and tested `is not None`,
so the artifact was never marked finished and save_as, path and failure
waited forever. A module-level sentinel tells "nothing recorded" from
"finished with no error". The entry is also popped before the
unknown-context early return, so it no longer stays in the dict.
Tests: unit file (red on the old code for the success and the gone-context
cases) and a served-browser e2e with ten 300-byte and ten 1-byte downloads.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* juggler: an early download finish lives only as long as it can be read
The review of 6a50ad1 found three cases where an entry of _finished_early
stayed for the life of the browser: (a) a download announced while its
context was already closed, whose finish came after; (b) a finish after the
client released the artifact; (c) a finish of a uuid never announced.
The browser now keeps, per announced download, the context it belongs to,
until its finish or the end of that context. A finish whose download was
announced and whose artifact is gone writes nothing; only a finish of a
download not announced yet leaves an early entry, and those are bounded (64,
the oldest dropped first). The end of a context forgets its downloads that
never finished.
Tests, red on 6a50ad1 (4 of 10): (e) gone context, (f) released artifact,
(g) never-announced finishes are bounded, (h) the end of a context forgets.
NOT proven: that the engine ever sends a finish after the end of a context,
or a finish before the announcement. On one connection Juggler says a
download's creation before its end (TargetRegistry.js interceptDownloadRequest
then onDownloadComplete), so the early path is defensive. The e2e of tiny
downloads is a proof of use, not of the order; its docstring says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release 0.51.0: engine firefox-63, pin invisible-core 63.66.0; CHANGELOG for the UDP line
* Release 0.51.0: the README says what the launch counter is and how to turn it off; the CHANGELOG says what is known to be wrong (popups opened without a route, as measured)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.51.0: the served launch cannot turn the launch counter off (a client's firefoxUserPrefs, bare or marked, are refused with the core's message); the history says it is no longer possible
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the two tests that ask the resolver trap from the test process say that the test stands for the browser
Since fc10e257ca the trap counts only the questions of a browser process, found by the process that holds the socket in
/proc/net. That is only possible on Linux; on Windows every question counts, so the pre-push (Windows) stayed green
while test_the_trap_counts_a_query_it_is_sent_and_refuses_what_it_cannot_answer failed on Linux (republish run
43230437094, wrapper.unit.udp/linux: 1 failed, 218 passed): the test asks from its own python, which is not a browser,
and the question went to `foreign`. The same holds for the resolv.conf test of the root legs.
Both tests now pass is_browser=lambda pid: True. The trap itself is unchanged, so the realness leg judges the same code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the HTTP/3 test server finds a port that TCP and UDP both bind where the system's picks fall in a refused UDP range
wrapper.e2e.web on the Windows runner (republish run 43230437094) failed three tests with "no port free for both TCP and UDP",
and the pre-push failed the same way on a work machine: Windows hands out ephemeral TCP ports in sequence and keeps excluded
ranges of a hundred ports for UDP in the same zone, so the old loop (fifty times the system's pick) got fifty consecutive numbers
inside one refused range. The first try is still the system's pick; the others are drawn at random below the dynamic range, as
the witness already does (same constants), and the refusals are named in the error.
Two tests with a fake socket layer (TCP picks 50000, 50001, ...; UDP refuses 50000-50199): the old loop is red on it, this one
finds a number outside the range; and a server that can bind nothing says so after a bounded number of tries. wrapper.unit.udp
goes from 219 to 221 tests (ci/required-suites.json).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.51.0: the CHANGELOG and the README say only what is proven (counter: what the package refuses and whose repository counts; the real name of the async class; the popup numbers of the register; Windows memory only; addBinding out)
Markdown only. Following the fact check of the release texts: the launch counter is refused by the package's launcher and server
(not "not optional" for the engine alone) and counted in the engine's repository; preload_newtab names the async class by its real
path and keeps only the Windows numbers that have a saved run, with the engine they were taken on; the protocol mirror line about
Page.addBinding is out (not shown for the pinned engine); the differences section no longer claims a comparison run nobody saved;
the popup known issue states where, with which client, on which engines and with how much load it was seen, with the numbers of the
register, and that the correction is in 0.51.1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* user-install: the wait asks pip, not the JSON page of the index, and fails saying what is missing; the upgrade test installs the version its listing named
Ledger #476 of 0.50.1: the Linux job failed in test_upgrade_e2e ("the upgrade did not move the wrapper", '0.49.1' != '0.49.1') three
minutes after the upload. The step that waits for the index had asked the per-version JSON endpoint, which answered; the listing of
`pip index versions` had 0.50.1; the `pip install --upgrade` that followed was still served the 0.49.1 page.
The wait now runs `pip download --no-deps --no-cache-dir invisible-playwright==X` (the client and the index the install uses), for at most
ten minutes, and ends in "::error::the index does not have X yet, after N minutes" instead of a warning and a run that fails later. The
upgrade test takes previous and latest from one listing and installs `WRAPPER==latest`. Four unit tests run the script of the step with a
pip that fails until its Nth call; the core's install_job gate still passes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the fake pip of the wait test is a regular package, so the pip of the environment cannot shadow it
CI (runs 43196645121, 43196645144): 2 tests of the wait for the index failed on every Python of both systems. The shim was a directory with a
__main__.py and no __init__.py: a namespace package, which loses to the regular package `pip` of an environment that has one (a local uv venv
has none, so it passed there). The real pip ran, said "No matching distribution" for 9.9.9 and the shim was called 0 times. Reproduced in a venv with pip;
red without the __init__.py, green with it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: ask for the processes of a site by its name, never count between two reads
The e2e tests that looked at content processes compared the set of
"Isolated Web Co" processes before and after an action. The browser starts
processes of its own: the pool refill, and a process for a Mozilla site
(webIsolated=https://mozgcp.net) that the New Tab page starts about a second
after its own, with any page. Under load it was born between the two reads:
the same-site control was red in 14 of 30 runs of the whole e2e suite
([P] -> [P, P2]), the cross-site test could pass on that process alone, and
the service-worker test could read it as a process left behind.
With the test-only pref fission.processSiteNames a content process that hosts
a site is named by that site (http://a.test^u on Linux, cut at 15
characters). tests/_processes.py now returns the processes of one site by that
name; the bench and the service-worker test use it. Linux only, as before.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the popup process case has a browser that starts no process by itself, and asks by name on Linux
test_the_other_site_popup_runs_in_another_process counted every content process
between two reads, so a process the browser starts by itself (the pool refill,
the preloaded New Tab page and, in some countries, a process for a Mozilla
site) was taken for the popup's doing. It now has a browser of its own, on each
transport, with no preallocated processes and no preloaded New Tab page
(test-only prefs), so the count between two reads is the popup's. On Linux it
also asks by name that one of the new processes is the process of localhost.
It still runs on Windows, with no skip: the required suite wrapper.e2e.page
collects this file on both systems with an exact count, which is unchanged (34).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the popup process case runs its own browser in a thread of its own
The e2e of the previous commit failed at setup: the module's browser of the
matrix keeps a sync client open in the test's thread, and a second sync client
refuses to start inside its loop ("Sync API inside the asyncio loop"). The case
now opens its quiet browser in a thread with no loop and hands back its result
or its error. Same count of tests (34), still no skip on any system.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release 0.51.0: the CHANGELOG line of the process tests says only what is proven
Markdown only. The line that came with the end-to-end process tests carried a count of red runs and a cause of the extra
process that nothing saved; it now says that these are tests only and what they ask for.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.51.0: pin invisible_core==63.67.0 (the protocol mirror agrees with the published engine); the popup known issue says what the correction measured
invisible-core 63.66.0 carried a protocol mirror that differed from the Protocol.js of the published firefox-63 (the e2e job's
`--check` said DRIFT: a header count and the `ref` of two optional points of Page.getFrameOrigin); 63.67.0 is 63.66.0 with the mirror
regenerated from that engine. The pin moves to it.
The popup known issue: both causes found are in the wrapper (the hand-over of a new page to the client, and the replay of a new
page's events while live ones are being delivered). The correction of the first alone lowers the red cases over 20 runs from 15 to 2
with the firefox-62 engine but only from 17 to 13 with the firefox-63 engine; the correction of the second is under test. No version
is promised.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the SOCKS5 proxy test uses the suite's gateway that carries the DNS-over-HTTPS (the old fake answered the DoH with nothing); the CHANGELOG says what a SOCKS5 proxy now receives
test_socks_still_goes_out_through_the_proxy_after_the_roads_were_merged was written for the road where the browser handed the
SOCKS5 proxy the NAME (socks_remote_dns). Since the DoH road (decision core-19) a browser behind a proxy asks the name to a
DNS-over-HTTPS server THROUGH the proxy (network.trr.mode 3, no fallback) and connects to the address it gets. Its fake accepted
every CONNECT and answered nothing to the DoH, so the name never resolved: `Page.goto: domcontentloaded not reached in 30s`
(on Windows the launch itself failed first: "could not discover the egress IP through the proxy: the proxy accepted the connection
and then never answered"), and its second assertion (the name reached the proxy) could not be true by design.
The test now runs on the fixtures `doh`, `pages` and `gateway` (the suite's SOCKS5 gateway that serves the DoH and relays the
loopback): the page loads, the DoH asked the name through the gateway, the page was reached by address, and the NAME never reached
the gateway. The fake and its fixture are gone (nothing else used them). Red on the old test and green three times on the new one,
on Windows, with the published firefox-63.
CHANGELOG [0.51.0], Changed: one sentence for what a SOCKS5 proxy now receives (addresses, not names) and what a proxy that cannot
carry HTTPS to the DoH server resolves (no name). Said for SOCKS5 only: for an HTTP proxy the e2e of the DoH keeps it as an
assumption that an http page's name still goes to the proxy.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* e2e.yml: the seven root e2e (wrapper.e2e.udp.exit) run in a root step as the gate runs them, and the run of the runner user leaves them out by name
Run 43262636367 of PR 483: the seven tests whose lab exit is 198.51.100.9 added to `lo` errored when collected as the runner user ("cannot hold ... needs root
and iproute2"). The new step copies the engine to /opt/ff and runs exactly those under `sudo -H -E env -u PYTEST_ADDOPTS -u XDG_RUNTIME_DIR INVPW_REQUIRE_TRAP=1`,
no rerun plugin, and reads its own junit: exactly 7 tests, no failure, error or skip. The full run gets --ignore/--deselect of the same tests (ROOT_FILES / ROOT_NODES),
so nothing is skipped silently and nothing runs twice.
Test: tests/test_the_root_e2e_run_in_the_root_step_and_nowhere_else.py reads the list from ci/required-suites.json and the workflow as text (no PyYAML); red on e2e.yml as it was.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* e2e.yml: the root e2e run AFTER the run of the runner user, and a diagnostic step says what root left behind
Run 43271443150 (PR 483): with the root step first, every launch of the run that followed waited for the browser's
readiness line until its timeout (46 stacks in connection.launch -> wait_for_ready) and the job was cancelled at 40
minutes; the same head without the step had 748 green. Now the root step comes after the full run
(if: success() || failure()), and the next step prints the files root left under the runner's home and /tmp,
/etc/resolv.conf and the addresses on lo (it decides nothing).
tests/test_the_root_e2e_run_in_the_root_step_and_nowhere_else.py now holds the order too: red on a5606dd's workflow
(the root step comes BEFORE the run of the runner user), green here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
e2e.yml and tests.yml already ran once per commit of a pull request (push is
filtered to main, pull_request to PRs against main), but their concurrency
group was keyed on the ref and cancelled in progress everywhere. For a push to
main the ref is always refs/heads/main, so the next push cancelled the e2e
run of the commit before it, and scripts/e2e_is_green.py refuses a release
whose e2e check-run is `cancelled`. The group is now keyed on the pull request
number and cancels only on pull_request; every other event gets a group
unique to the run, so nothing on main is cancelled or replaced while pending.
user-install.yml had a group keyed on the ref that cancelled its own weekly
run when a manual one started on main; it follows the same rule. publish-wiki
no longer cancels a publish in progress. Triggers, workflow and job names
(`e2e`, `e2e (linux, xvfb)`, `gate`) are unchanged.
tests/test_ci_runs_once_per_commit.py pins the triggers the release reads, the
cancel rule and the hunt cap (max-parallel <= 8), with known-bad inputs for
each checker. It reads the workflows with a small parser because PyYAML is
not a dependency of this package.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The test said the click must come back in under 2.5 s while /slow slept 3 s.
That measured the runner: on a loaded one the click alone took longer (2 of 30
runs of the suite, every run on one CPU) with nothing wrong in the product.
/slow is now an answer the server holds until the test lets it go. The click
with no_wait_after=True must come back while the answer is still held (the
order is: click returned, then answered; the url is still the old one). A new
test holds the other half: a plain click on the same link does not come back
until the answer is given, and returns on the new page.
Known-bad input, run before trusting it: the same test with no_wait_after
removed from the click is red on the order (answered, then click returned).
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Under [0.50.1], after the record of its publication:
- Fixed: a popup reaches the client as with Playwright's own Firefox (no limit
of time, the destination's url, load reachable), and the opener's download
event comes after the popup's page event.
- Known differences from stock Playwright, each with its measurement: the url
of a popup that turns into a download, the url of a frame of another site at
DOMContentLoaded, the longer click of the library client, and back/forward
restoring the page from the back-forward cache.
Documentation only: no published byte changes.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* docs: the agent links and the command name the repo as it is now
Two things were broken for a reader on main, not one.
Thirteen links pointed at github.com/feder-cr/AIHawk. GitHub redirects a
NAME to the OBJECT that carried it, not to the content: after the September
swaps that name belongs to invisible_dots, which has seven wiki pages, so
AIHawk/wiki/<page> lands on its wiki Home. It answers 200 with different
content, which means a reader who clicks does not find the page and a search
engine sees a soft-404 across about 150 indexed URLs.
Seven occurrences said `uvx aihawk`, a command that does not exist. One sat
in a front-matter description, which is the snippet search engines show, and
one in a block meant to be copied: `claude mcp add stealth -- uvx aihawk`.
The command is invisible-playwright-mcp, on PyPI at 0.70.16.
All eight link targets were checked one by one and resolve to themselves with
the page title, no redirect.
Three things stay as they are, which only reading them showed. The
`pip install invisible-playwright` line matches what this engine's own README
teaches for the library, so the page is consistent rather than broken.
CHANGELOG.md keeps the old name because a changelog entry says what was true
then. And the fixture in scripts/sync_article_pixels.py keeps it because it is
the deliberate wrong case, a pixel for ANOTHER repo.
One sentence went away instead of being renamed: "shipped inside AIHawk" made
sense when AIHawk was the larger product containing the server. The server and
the repository are now the same thing, so "shipped inside itself" was circular.
(cherry picked from commit d9c8e46dce)
* test: the docs name the MCP server's repository and command as they are now
feder-cr/AIHawk now leads to an unrelated repository and answers 200, which no
link checker reports; `uvx aihawk` does not exist. The README and docs/ are
read for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the Fission bench counts the processes that host a site, not every new content process
test_same_site_other_port_stays_in_process was red on the e2e of the 0.50.0 commit ("a same-site frame
started a process: [13443]"): the bench counted every `-contentproc ... tab` pid, and the engine starts a
preallocated content process to refill its pool whenever it gets to it. On Linux the engine names a content
process by its remote type (ContentChild::SetProcessName, prctl PR_SET_NAME): "Isolated Web Co" once it
hosts a site of strategy 1, "Web Content" while preallocated. Measured on firefox-62: a cross-site frame
renames a preallocated process and a new "Web Content" refills the pool; a same-site frame changes neither.
The two tests that count processes skip off Linux, where no process carries a name.
Unit test with the measured processes: 3 red on the old bench, 3 green here. e2e on firefox-62 (candidate
#6, Linux): the bench file 17 passed; the two counting tests 15 of 15 runs green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: a closed context is checked for the processes of its sites, not for every content process
test_closed_contexts_with_a_never_stopping_service_worker_leave_no_process was red on the e2e of the 0.50.0
tag ([2, 2, 2, 5, 5], 5 <= 2). Measured on firefox-62 (Linux), the test's own scenario 10 times with every
process named: no "Isolated Web Co" left after any close; the 3 more are "Web Content", the engine's pool of
preallocated processes filling up behind the closed contexts (5 runs of 10, new pids each time). Not a leak:
the count read the refill.
The helper of the bench moves to tests/_processes.py and both tests use it. The context test counts the
processes that host a site: at least one while the page is open (or the count proves nothing), none a few
seconds after `close` answers (the engine waits for them inside close and kills the ones that stay). Off
Linux it skips, as the bench's two counting tests do: no other system names the process.
Unit tests (tests/unit/test_processes_counts_sites.py) from the measured processes, the closed-context case
included. e2e on firefox-62 (candidate #6, Linux): the context test 10 of 10; run_e2e.py on the two files and
the unit test 18 passed. The old counter, same scenario: 5 of 10 runs would fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release 0.50.1: 0.50.0 with the process-counting e2e corrected (0.50.0 never reached the index)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the same-site control puts its frame in the shown page; CHANGELOG: 0.50.0's entry is 0.50.1's
The e2e of #451 saw a new "Isolated Web Co" once after a.test/plain -> a.test/same-site ([10878] -> [10878,
11208]). Not a process of an earlier test: it was created after the first read and only this worker's
descendants are counted. It is the top-level navigation: when the old document may enter the back-forward
cache, the browsing context is replaced (mReplaceBrowsingContext, dom/ipc/ProcessIsolation.cpp) and the new
one may be placed in another process of the same site (dom.ipc.processCount.webIsolated = 4). Measured on
firefox-62 (candidate #6, Linux): 0 of 30 runs alone (bfcache on and off), 0 of 57 under 4 workers. The test
was written for the frame, so the frame is now added to the page already shown and the top never navigates:
20 of 20 runs green.
0.50.0 never reached the index, so the changelog gate refused its heading; its entry now opens 0.50.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: networkidle through a served browser whose context routes every request, on a reused page
launch_server() plus a stock Playwright client, a context route that aborts image/font/media and continues the rest, a
page with sendBeacon, the same font twice, a frame of another site, a worker, redirects, requests the page cancels while a
slow route decides, 100 requests at once, and a slow client that answers concurrently (async). Every shape reaches
networkidle on firefox-62; one page reused for twelve addresses too. The leak that tf-fetch meets on real sites needs
end events the engine loses, which no local page produces: its deterministic red/green is in the core
(tests/test_networkidle_on_a_reused_page.py of invisible-core); this file guards the remote path end to end.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 47182f0cd85fea08fc45e36f1c91d2d570722f14)
(cherry picked from commit e46f2dcf3eb361e6af0fedcdf6e1189f0ac330b6)
* server: the answer to a request the browser has already closed is not an error (Cannot find request), as stock sendMayFail
A page cancels requests while a route is deciding (a fetch aborted, an image replaced, an iframe removed, a beacon with
its document, the favicon of the page a goto just left). The engine takes the request out of its held set at once and the
late continue/abort/fulfill meets "Cannot find request" or NS_BINDING_ABORTED. Stock Playwright sends the interception
commands as may-fail and tells the client nothing; ours passed the error up, the client kept it as the error of the whole
connection and raised it on the NEXT route command, which was then never sent: its request stayed held in the engine, its
handler failed too, and so on down the page. Seen on a real news page: six held requests in a row, one a beacon, and
networkidle never came.
RouteDispatcher._send now treats "Cannot find request" and a closed target as done (still disposed); any other protocol
error still reaches the client.
Tests: the e2e with a plain handler (no try) on a page that removes an iframe whose requests are held (red before:
networkidle never; green after), and a static guard that every op of RouteDispatcher goes through _send and that _send
swallows exactly those two. The same defect was found a month earlier by richardpowellus (#351), with the favicon of the
previous page: his test is added in the next commit.
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stock Playwright client is required by the networkidle e2e (explicit failure, never a skip); the dev extra pins it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 91223226f5bba25edff9af0e8b1fd6b5bfea2227)
(cherry picked from commit 612b18c02b95e9b5833d62b6595d4a0ff324aac2)
* tests: answering a route the next navigation already aborted does not raise (the case of #351: the favicon of the page just left)
Sixty sequential routed gotos on a loopback page: 4-12 of them failed on the old server, every failing continue_ being
the previous document's favicon, aborted by the next navigation while the route sat with the handler. Red on main (in-process
path), green with the fix of RouteDispatcher._send.
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.50.1: pin invisible-core 62.64.0; CHANGELOG for the networkidle fixes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit e63ef8e61ea42e7f8df7c1bde206f3bf86fc18f7)
* A route answer the engine refuses is the engine's business, whatever its wording
The server took one wording ("Cannot find request") of an answer to a closed request as done and passed every other
protocol error up to the client. The engine also says "NS_BINDING_ABORTED
[nsIInterceptedChannel.resetInterceptionWithURI]" when the channel was cancelled while the answer was on its way: the
same event, and the client kept it as the error of the connection and raised it on its next route command.
Stock Playwright sends the three interception commands as may-fail and tells the client nothing, whatever the engine
says. So does RouteDispatcher._send now: every ProtocolError is swallowed, the route is disposed after it.
Tests: the static guard no longer allows a re-raise inside the handlers; a unit test feeds three wordings (red on the
old code for two of them).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the descriptors of the spawn are asserted by running it, not by reading the core's source
test_the_spawn_keeps_the_two_hardwired_descriptors asserted that the source of the core's _spawn_posix contains
`pass_fds=(its_read, its_write, 3, 4)`. Core 62.64.0 starts the engine with posix_spawn and file actions, so the words are gone
and the test failed on every Linux unit suite although the behaviour is the same (and better).
The test now runs the spawn: a parent with nothing open on 3 and 4 and its pipes far from them launches a program that reads
fd 3 and answers on fd 4 (the contract of nsRemoteDebuggingPipe.cpp), and the answer must come back and the child must hold no
descriptor above 4 of the parent's. Same shape as the core's own test
(test_the_pipe_of_the_engine_reaches_its_fixed_descriptors). No skip: the file is already POSIX-only.
The other tests of the file do not read source text (checked: no getsource/inspect/read_text left).
Ran the parent program on Linux with core 62.64.0 (image tetra-invisible:run1b-final): pong:ping:0.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The page dispatcher waits for Page.ready before the page is handed over (needs invisible-core with Lifecycle.wait_for_page_ready)
Same defect and fix as in the core's page (see the core commit): a goto sent right after new_page could meet the page's initial about:blank.
The pin of invisible-core moves with the core release that carries wait_for_page_ready.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Pin invisible-core==62.65.0 (a page handed over when the engine says it is ready); changelog
The core that carries Lifecycle.wait_for_page_ready is invisible-core 62.65.0 (draft PR invisible_core#238), not on the index yet:
the pin check of this push is skipped on purpose (INVISIBLE_PIN_CHECK=skip).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stand-in engine of the registry test says Page.ready, as the real one does (the page is handed over on it)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: new_page and a popup are handed over only when the engine says Page.ready (red without the wait in PageDispatcher, green with it)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A page is built at once and announced when the engine says Page.ready (the wait inside the constructor held a popup's first request behind a page that did not exist yet, and lost its commit and load)
- PageDispatcher no longer waits in __init__; wait_until_ready() is called by the adoption between the construction and the announcement
(context 'page' event, newPage answer). A detach while waiting ends the wait; a page that is not ready in time is disposed.
- The main frame's initializer carries what the lifecycle already knows (url, name, load states), as every other frame's does.
- Tests: unit (a popup exists and listens while it waits; what it does before its ready reaches its frame; red on 6a60dce) and e2e
(a popup of a link, noopener or window.open reaches an in-process and a stock client of a served browser within 2 s, with and
without a context route; 15 of 16 red on 6a60dce, 16 green).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the stand-in pages say wait_until_ready; the popup e2e reaches the stock client as the other served tests do
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the popup reaches the client from another site too (a link, noopener, window.open: 16 more cases, in-process and through a served browser)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A popup is reported on Page.ready as Playwright's is: no limit and no warning, with the address of the commit that came with the ready
- Stock Playwright 1.62 (measured): a 204 or a silent destination gives no page event, one that answers after 4 s gives it at 4 s with the
destination already. The adoption of a popup waited 20 s and dropped it with a warning; now only a page a caller asked for
(newPage) has the 20 s; a popup waits until the engine says Page.ready, the target goes away, or its context closes
(BrowserDispatcher.end_waits_of), and says nothing.
- The ready and the commit of the document that made the page ready come in the same turn: the page is announced after a round trip to the
engine (settle_events), so the frame reads the destination at the page event (3 of 4 slow popups said about:blank).
- In-process the slow popup arrived 0.9 s later than stock: it is the humanised click (1.1 s of pointer movement before the click returns),
the popup arrives 4.02 s after the click in both modes.
- Tests: unit (limit None for a popup and 20 s for a requested page; a popup with no ready ends with its context and says nothing; the
address at the page event is the commit's) red on b09d620; e2e (204 and silent: no event; 1.5 s: url is the destination; 25 s: reported
then) in-process and through a served browser: the 25 s ones red on b09d620.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A download started by a popup that is not announced yet is reported on its opener, as Playwright reports it
- Browser.downloadCreated names the tab the download came from. A tab opened for an attachment (a target=_blank link, a window.open) never gets
a Page.ready and the engine closes it at once, so it is not among the announced pages and the download was lost: no download event
anywhere (a21e1de had it, on the popup). Playwright's ffBrowser._onDownloadCreated reports it on the opener of a page that is not
reported yet; so does this, from the opener recorded when the target was attached (BrowserDispatcher._openers). The abort of the
navigation that became the download still goes to the page that owns the frame.
- Tests: unit (red on fbceeaf); the e2e of the destinations and of the popup matrix of the fake-web branch (73f1e8d): 16 + 34 cases against
the reference measured on stock Playwright 1.62 - on fbceeaf 4 of the 16 were red (the download), now 50 of 50 green.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A popup tells its listeners the load it reached before it was announced; an unannounced frame has no address of its own
- The popup is announced when the engine says Page.ready, which is when its document commits, so its domcontentloaded and load may be said
before the client has the page: page.on('load') registered in the handler of the page event never fired (Playwright's does, measured by
the independent run: destinations of 4 s and 25 s). FrameDispatcher.emit records those two states while the page is not announced and
PageDispatcher.announce says them again right after the page event, in their order and under one lock; the first time they already set
the state wait_for_load_state reads, so it returns at once. Only popups: a requested page is announced as before.
- The main frame is created with the address the lifecycle knows, '' if it has committed nothing (an attachment's empty tab), not
about:blank: Playwright says '' there.
- Tests: unit (the two states after the page event, in order; red on 2f153c7); e2e: a listener registered in the handler of the page event
hears the load of a slow popup, wait_for_load_state in the handler returns in under 2 s (in-process and a stock client over a served
browser, window.open and link).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A popup whose target goes away while its page is being built is announced and closed, not waited for for ever
A download's empty tab is closed by the engine within milliseconds; on a loaded machine its page is still being built when the detach arrives.
_handle_detach recorded it as early (nobody in _building to tell) and the adoption then waited for a Page.ready that never comes: the
popup was never announced (test_popup_destinations_e2e, the download on the opener, failed once in a full suite run). The adoption now
looks at the early detaches when it registers the page as waiting.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A command of the adoption that finds the target's session gone announces and closes the popup, as a detach before the ready does
The independent run on a quiet machine lost one link-into-attachment popup in a hundred: the engine closed the tab WHILE the adoption was
initializing it, answered 'cannot find session' to Page.setInitScripts, and the popup was discarded with a warning - no page event - where
Playwright's is announced and closed. PageDispatcher._build now treats an initialization command that fails because the target or its session
is gone (one test: _target_is_gone) as the same case: the page is built, flagged gone_while_building, and the adoption announces it and closes
it right after. Test: a fake engine answers 'cannot find session' to each command of the adoption in turn (parametrised): the page event and
the close arrive, no warning; red on b05741f for Page.setInitScripts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the helper of the popup destinations does not shadow the browser fixture (ruff F811)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the popup tests do not fail on the machine's speed (no 2 s limit)
A runner with four workers delivered a popup in 2.013 s (the limit of the test was 2 s). The verdict of these tests is that the popup arrives with
its address and its load; the wait is generous (30 s) and the check of the time is gone. The wait_for_load_state of the handler is bounded by 8 s.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The adoption of a target is one explicit state machine, proved over every order of the engine's events
Four patches of the same race (a detach before the ready, during the build, between the build and the wait, a command answered 'cannot find
session') and a fifth the exhaustive test found (a detach while the adoption waits for the main frame of a tab the engine never announced:
the wait went on for 20 s and the popup was discarded; this is the order the runner produced for the download popups: 3 of 4 lost).
- _Adoption: the single record of a target between its attach and its announcement: state (attached, building, waiting, announced), gone
(set by the engine's detach AT ANY MOMENT), page, opener, context. It replaces _adopting, _building, _openers and _detached_early.
- Every wait of the adoption looks at gone (the main-frame wait polls it), every state change is one method (_enter_building, _enter_waiting,
_enter_announced), a command that finds the session gone ends in the same place as a detach, a closing context takes away every adoption
of it in any state (end_waits_of).
- Invariant: an attached target that is not a page a caller asked for gives the client exactly one page event, at its ready or at its
disappearance (and its close right after), unless its context closed first.
- Test: test_every_order_of_the_events_of_a_popup_gives_one_page_event stops the adoption thread at six points of its own and delivers the
engine's events (frame, commit, ready, detach, in every prefix) at every one of the eight moments: 635 orders, none sampled. Mutation
check: without the gone-aware main-frame wait 24 orders break, without the tolerance of the command error 42, without the close after the
page 374; without the early-gone check of _enter_waiting the adoption hangs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The adoption keeps a short trace per target and writes it where a popup is dropped or fails
The log of a CI run says that a popup was not announced and not in which order the engine's events came. Each target in flight keeps (in memory,
at most 60 short strings, nothing afterwards) what the engine said (frame, commit, ready, detach) and what the adoption did (building, waiting,
announced), with the milliseconds since the attach. It is written in the warning of a failed adoption, in the error the newPage waiter gets, in
the timeout of a requested page, and in browser._dropped (the last 16 targets dropped with their context).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The WebGL determinism test says why the browser could not make a context
One run in 31 of the e2e on a loaded Linux runner failed this test with "reason='gl null'" and nothing else: getContext('webgl') gave the page null. The browser
says why in the `webglcontextcreationerror` event (statusMessage: the failure list, e.g. "tryNativeGL (FEATURE_FAILURE_EGL_LOAD_3)", "Initializing WebGL backbuffer
failed.", "GL error 0x505 occurred during OpenGL context initialization"), and each of the paths that can produce null on Linux in our engine writes a different one
(library not loaded, display not initialised, context not created, GL out of memory, backbuffer not allocated). The test reads the event and puts it in the
assertion, and tries webgl2 on a fresh canvas (the old canvas already had the failed type).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the same-site control of the Fission bench measures the frame, not the process pool
The control counted the processes that host a site between two reads, with the default pool of three preallocated content processes: a pool
process handed to a site after the first read moved the count without the frame having asked for anything ([63248] -> [63248, 63386] on a
four-worker runner; the same family as 5402da4, ff2123e and fef0bc5). The control now runs in a browser with dom.ipc.processPrelaunch.fission.number
at 0, where a process of a site appears only because a site needed one, and says so if the page of the site has no process to compare with.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The download of a tab that is not announced yet is said after the page event of the tab
The tab opened for an attachment is announced when the engine takes it away, a few milliseconds after it says the download; the download
(reported on the opener) went to the client first, the popup after: the order the other way round from Playwright's, and a client that read
the popup the moment the download arrived found none on a one-CPU machine (the 4 download cases of GitHub, 3 of 4 red; the same on a one-CPU
container: 1, 0, 2 of 50 on a90dadc). The adoption holds the download on its record and says it right after the page event (never lost: also
when the tab is dropped or fails).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A download is taken with the record's removal in one step, and the opener of a target not announced is remembered: no step of the adoption can lose it
The failure branch said the pending downloads BEFORE it removed the record: a download created between the two found the record, queued on it, and
nobody said it. Taking the pending downloads and removing the record are now one step under the browser's lock, in the three branches
(announced, dropped with its context, failed); the opener of a target that ended without being announced is kept for the last 16 targets, so a
download that comes after the record is gone is still said, on the opener. Test: the download is forced into the gap of the failing adoption
(red on 65f7580: said 0 times, now once).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Richard Powell <1369873+richardpowellus@users.noreply.github.com>
The launch count was a small badge at the very bottom. It now opens the
README, under the banner, next to engine downloads and stars. The daily
counters job also writes launches.json and downloads.json on the badges
branch; shields.io draws the big badges from them, so the numbers still
come only from our snapshot.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* grant_permissions: the permission names are the engine's, a name outside the table is refused, and no origin is every origin
The wrapper passed the web names (geolocation, notifications) to the engine, which keeps a grant under its own
(geo, desktop-notification) and stored one under a name it never reads: a page of a context that had been granted
geolocation and given a position was still denied. The table is the Playwright client's for this browser
(playwright-core ffBrowser.js, doGrantPermissions); a name outside it is an error, as there. A grant with no
origin was sent as the empty string, which the engine's lookup reads as false and answers with '*', where nothing
was held: it is now '*'. Tests: the table and the refusals as units, and the position of a granted page as an e2e
that fails on the old code (denied, or no answer).
* tests: the sentinels of the isolation strategy hold strategy 1, not 0
The baseline of a core that runs Fission (strategy 1, autostart, four isolated content processes) is what the
firefox-62 engine is built for: the Juggler reaches an iframe of another process like any other. The four unit
tests of test_cross_origin_iframe.py held the opposite (strategy 0, autostart off, one isolated process) and are
turned round: strategy 1, autostart on, fission.autostart.session absent (the parent writes it), four isolated
processes, the default of a translated profile 1, and an override to 0 only when a caller sets it. They fail on
invisible-core 61.62.0 and pass on a core with the strategy-1 baseline (invisible_core ffced25); the pin moves with
that core. The module text says why a harness of two ports of one host is one site and where the iframes that leave
the process are held.
* changelog: Fission (strategy 1) and the permission names, to be confirmed by the firefox-62 build
* e2e: the bench for Fission strategy 1 (a.test / b.test, a -> b -> a): two tests that hold it, eight that say what is not done yet
The prefs are an overlay of the file (strategy 1, autostart, four isolated processes, the test hosts through
network.dns.localDomains); the wrapper's baseline stays at strategy 0. Tests 1 and 2 pass today (a cross-site
frame adds a content process, a same-site one does not); tests 3 to 10 fail today on the empty url of a frame of
another process, the missing context, the missing parent chain, describeNode on a cross-origin element, the init
script that does not reach the other process, and the console that does not arrive.
(cherry picked from commit a8edf34d5f2da5e5e142359efe0dfaa801f5d57d)
* e2e: the bench of Fission strategy 1 reads the client's events while it waits, and holds three cases of step 1
The sync client takes the engine's events only inside its own calls: the waits of the bench now go through
page.wait_for_timeout. Added: a context of the top survives a frame of another process coming and going (a guard),
the frame of another process comes back after the top is restored from the back-forward cache, and a removed frame
of another process leaves page.frames and the page keeps answering.
(cherry picked from commit b9483514bb0be7712f378e1fbdc9ffd5701634b3)
* e2e: the bench splits the restore from the back-forward cache in the frames that come back and the url and contexts that come with them
The first is green with the parent re-announcing the frames it knows; the second stays red until the parent's
registry of navigations (step 3) and the mux's re-announcement of contexts (step 2b). set_extra_http_headers is not
in the wrapper's perimeter, so the removed-frame test uses the init script alone.
(cherry picked from commit 47a9d6f59ab237e173fe3c271fa37cbafe6e0668)
* e2e: element-to-frame and iframe geometry across processes (Fission strategy 1)
(cherry picked from commit 3ec3752333e76baaebdbbd78263028237fdda86a)
* tests: the crash of an iframe's process leaves the tab (firefox-62, Fission)
Kills the process that holds the iframe (found through the engine over Marionette, required to differ from the top's) and asserts the tab stays, no Page.crashed or close, and the page answers. Red on firefox-61: the unpatched engine closes the tab.
(cherry picked from commit 1e90ff23b3c3827cac943f926f30eeccaa6ec3aa)
* tests: the mouse events of the page and of a same-process iframe keep their order and values
Sequences recorded on firefox-61 (click, double click, right click with contextmenu, moves with the button down), through page.mouse; the test passes there and has to pass on the engine whose mouse takes the APZ route (a click on an iframe of another site needs the hit test).
(cherry picked from commit 4374fcab3c3e6718239cd36bad9c2970e1626aec)
* Test that the identity is the same in the top document and in every iframe
One local server on 127.0.0.1, 127.0.0.2 and 127.0.0.3 serves a top page with an
iframe on a second site (holding a nested frame on the top's own site) and an
iframe on a third site. Each document reads a fixed canvas drawing, a fixed
OfflineAudioContext buffer, the WebGL debug renderer info, the Intl time zone,
the navigator language and user agent, the screen geometry, the pixel ratio and
a font of the bundle, and posts them to the top; the test asserts they are equal
everywhere. screenX and screenY are read and not compared.
It runs under strategy 0 (what the core writes today) and under strategy 1
(fission.autostart and webContentIsolationStrategy=1 as extra_prefs). Each run
proves where the iframes ran from inside the page: one iframe spins for 400 ms
and the top times a 10 ms timer, which stalls only in a shared process.
The negative case is the machine the seed describes (WebGL renderer and screen),
because the 2D canvas and the audio buffer carry no per-seed value. The pure
comparison has unit tests with known-bad inputs.
(cherry picked from commit 76cae1a19abd65b30b72ea317dc42110541c8745)
* e2e: an iframe nested too deep names no frame, and a frame of another process comes out of the cache with the top
(cherry picked from commit 7f71460d799d8271346f470b0b2ad06c0a5315fb)
* e2e: the Fission tests that firefox-61 cannot pass wait for firefox-62
Measured on the released firefox-61 (Linux, run_e2e.py, 4 browsers): these twelve fail there and nothing else in
the six Fission files does. Ten of the bench (the steps that are not in firefox-61) and two of the
element-to-frame file (an <embed> of another process and the detach of a removed iframe). They now take
engine_at_least("firefox-62"), so the gate on firefox-61 is green (43 passed, 13 skipped) and the candidate runs them.
* e2e: a navigation that changes the process is stopped, replaced, refused or cut the way one that does not is
* e2e: an iframe whose src goes to another site shows the new address in the frame list
* A frame that left the page answers a call with "Frame was detached", not "Target page, context or browser has been closed"
The server disposed the dispatcher of a frame as soon as the lifecycle retired it, so the next call on the Frame object (an
iframe a script or a framework removed) named a guid that no longer existed and was answered as if the page had closed.
Measured with a process per site and without it: frame_element, evaluate, content and query_selector on a removed iframe,
all four. Playwright's driver never disposes a Frame at detach; the call reaches its dispatcher, which refuses it with
"Frame was detached". The frame stays registered (collected with its page or by its bucket, as the driver's), refuses every
call, and its element handles go with it.
Test: test_a_detached_frame_answers_detached.py (7 of its 10 fail on the old server code); test_frame_dispatch.py still
passes; test_a_removed_iframe_is_detached (the Fission e2e) passes on an engine with the Juggler of the integration.
* e2e: a worker leaves with its page for the back-forward cache and comes back the same (Fission strategy 1)
A document starts a worker that counts; the top goes forward (same site or another, by page.goto or by the page's
own location.href) and comes back from the cache (pageshow.persisted is checked). The protocol events the client
receives must say: workerCreated, workerDestroyed before the new page commits, workerCreated again with the same
workerId once after the restore's contexts are cleared, no workerDestroyed after it, one live worker that answers 3.
The worker lives in the top or in a frame of another site. engine_at_least("firefox-62"): it skips on firefox-61.
Measured on repacks of fission/integration (Linux, strategy 1): red on bdf02eb9d8 and on 1e9ff6dec0. In the top the
worker comes back under a new workerId; in the out-of-process frame it is not announced again.
* changelog: the Fission and permission-name entries are under 0.50.0
* e2e: the frames have their urls when goto returns (an iframe of another site, 50 runs, nothing waited for)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* e2e: a goto to the address the page is at ends, 20 times, on nine kinds of page (sites isolated)
Plain, big, revalidated with a 304, fresh in the cache, never stored, a frame of its own site, a frame of another
site (also revalidated), a -> b -> a, and the same query twice. Red on the engine of fission/integration 14e826b7b5
(load not reached, navigation started and neither committed nor aborted), green with the Juggler fix.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* A launch that names no session gets one: op_launch writes a composed session into every profile
A bare BrowserType.launch on the server (Playwright's own suite, any client of invisible_playwright._pw)
sent no prefs, and op_launch wrote into user.js only what the client sent: the engine came up with
Mozilla's defaults, no persona, every value a page reads taken from the machine. On Linux the first window
then also held the first-run policy tab of TelemetryReportingPolicy (the Terms of Use the core declares
accepted were not), and the first new_page failed with "Browser.newPage: Unexpected number of tabs in the
new window: 2": 15 of 15 bare launches on firefox-61 and on the firefox-62 candidate; with
datareporting.policy.firstRunURL emptied alone, 1 tab every time.
The launcher marks what it composes (COMPOSED_PREF, taken out before user.js like the seed); an unmarked
launch gets the session InvisiblePlaywright() composes with the server's defaults (new seed, humanize off as
in launch_server), with the caller's prefs on top. launch_server already sent a composed session: its e2e
and a unit test on the mark guard it. The one network step of composing (the egress IP) has one name,
_session.session_geo, which the unit tests answer offline.
Tests: test_a_launch_without_a_session_gets_one.py (4 unit: red on the old code, the profile held 0 prefs),
test_a_launch_without_a_session_gets_one_e2e.py (a bare launch has one tab and says Windows on the Linux
engine: red on the old code with "Unexpected number of tabs: 2"; every context of a served browser is the
same Windows machine). Unit suite 1128 passed on the firefox-62 candidate image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* A launch that names no session also gets the session's environment variables
The variables `build_env` adds (the font manifest, the display backend, the crash reporter, the WebRTC
declaration with a proxy) are added to the environment of a launch that names no session, wherever the
caller named none of the same name. Unit tests: the manifest reaches a bare launch, a variable the caller
names wins, a composed launch gets nothing it did not send.
Measured before keeping it: no page-visible difference. On the firefox-62 candidate (Linux) and on
firefox-61 (Windows) a page of a bare launch lists the same families with and without the manifest: the
bundle's (Segoe UI, Calibri, the substitutes such as Helv and MS Sans Serif), none of the host's (FreeSans,
Unifont, Liberation Sans in the container; Segoe UI Variable on the Windows host). The engine uses its
packaged copy when the variable is absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* The session of a bare launch is composed through the launch's proxy; e2e: behind a proxy the page reads the egress as its srflx
`launch(proxy=...)` reaches `session_for_launch`, and the session is composed through it as
`InvisiblePlaywright(proxy=...)` composes: the egress measured there is the address the session's
environment declares for WebRTC (STEALTHFOX_WEBRTC_PUBLIC_IP). The engine is still told the proxy by
op_launch (Browser.setBrowserProxy), as before.
e2e test_a_bare_launch_behind_a_proxy_declares_the_egress_as_its_srflx: a bare launch behind the local
TCP-only SOCKS5 of test_webrtc_realness.py, the egress answered with 203.0.113.7 (RFC 5737). The page must
read a srflx of that address. Red on the prefs-only commit (no srflx of the egress: host candidates only)
and on release/firefox-62 (the two-tab refusal); green here. Unit suite green on the firefox-62 candidate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the named environment of an unmarked launch carries the session's variables, and still nothing of the server's
test_the_launch_handler_hands_the_named_environment_to_the_engine asserted the engine got exactly the named
variables (plus the session's TMP). An unmarked launch now also gets the variables of the session the server
composes for it (font manifest, display backend, crash reporter): the test reads them from
_session.default_session and keeps its point, WAYLAND_DISPLAY of the server's own process stays out.
It went red on 36cffac, which I committed without running the whole unit suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the same-document navigation test attaches the frame it reports on
The engine announces a frame (Page.frameAttached) before any event of it, and from invisible-core's fix on
release/firefox-62 the lifecycle makes frames of that event alone: an event of a frame it does not know is
dropped. The three tests of this file reported events of a frame "F1" they never attached, which only the old
auto-creation accepted. Green with the old core and with the new one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the gates of the shelved line ask for firefox-63 again; firefox-62 is the Fission release
#444 renumbered the engine gates when the shelved line (idwr text, canvas colours and ICC readback, maths,
media decoding, WebGL arithmetic, the Linux system-theme refusal) was firefox-62. That line is firefox-63 now
and firefox-62 is Fission (one process per site), which has none of those properties: on the firefox-62
candidate 14 of those tests ran and failed (WebGL dot, canvas text, ClearType, ICC, fonts and colours,
WebCodecs). The seventeen files #444 touched ask for firefox-63 (comments and docstrings too), conftest.py
names the same number, and tests/unit/test_engine_at_least.py checks that 61 and 62 skip a gate that asks 63.
The Fission tests (bench, worker, crash, oop_frame_element, goto to the same url, raw launch, mouse events,
cross-origin iframe) keep firefox-62. Default suite: 1131 passed, 8 skipped; the three reds are the install
metadata of the shared Python.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the hand-built InjectedScript of the adopt test has the detached frames the wait for a world reads
invisible-core 62's wait for a frame's world ends at the frame's detach and reads InjectedScript._gone, which __init__
makes. test_adopt_is_one_wire_call_for_both_crossings builds the object without __init__ and sets what __init__ gives
it by hand; it now sets _gone too. (Red on the core with the detach wait: "no attribute '_gone'".)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Release 0.50.0: pin invisible-core 62.63.0 (engine firefox-62, Fission strategy 1)
CHANGELOG 0.50.0: the engine entry, and the fixes of the bare launch and of a detached frame; the
Fission and permission-name entries were waiting for the firefox-62 build, which shows them (candidate #6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the docstring of the bare-launch e2e says what the served browser is for, not who runs it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the gates of the shelved line ask for firefox-64; firefox-63 is the coherent UDP
The 16 e2e files of the shelved line (idwr text, colours, maths, media, WebGL, host-free Linux),
conftest's description of engine_at_least and its unit test: firefox-62 and firefox-63 skip them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* tests: the refused iframe's address is read by scheme and host, not by a prefix of the string
CodeQL (incomplete URL substring sanitization) flagged the startswith on the frame's url; the
split url says the same thing and cannot match a longer host. The file passes on firefox-62 (5 of 5).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* Add INVPW_GC_EVERY_NAV: optional Heap.collectGarbage every N main-frame navigations
Off by default. The collection is sent from a daemon thread (never from the
reader thread, which would deadlock), with at most one in flight; a round
due while one runs is skipped and counted, and every error is swallowed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* INVPW_GC_EVERY_NAV: send the collection with the page session; fix page.request_gc
Juggler answers Heap.collectGarbage from its page handler. Sent with the
browser-level connection it fails with 'Handler for does not implement method',
so the first version of the option counted every collection as failed, and
page.request_gc() has been failing the same way.
The option now sends with the session of the page that committed (a thread of its
own, one in flight); op_request_gc uses the page session too. Tests fail on the
old code and pass on the fix; measured on the engine: collections take 0.02-0.09 s
and the values a page reads are identical with the option on and off.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* INVPW_GC_MODE=minimize: the option can send Heap.minimizeMemory, with a fallback to gc
INVPW_GC_MODE=gc|minimize (default gc) says what INVPW_GC_EVERY_NAV sends. minimize sends the
Juggler command that runs about:memory's "Minimize memory usage" (engine commit 2423b7c242 of
the engine's juggler/minimize branch); on an engine without it the first round logs one
warning and falls back to Heap.collectGarbage for that round and every later one (the
engine's answer, "method '...' is not supported", is the sign).
Unit tests for the mode, the fallback and the other errors; e2e (engine_at_least firefox-61)
that the engine takes the command and, as documentation, that minimize evicts the bfcache
(pageshow.persisted false on go_back) where nothing sent leaves it true. Measured on the
engine with the command, and on the one without: the first and third e2e fail there.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* INVPW_GC_MODE: the command must be named in the error that makes minimize fall back to gc
A fallback on any error saying "is not supported" would turn the mode down for good on an
unrelated error; the sign of an engine without the command is its answer naming it
("method 'Heap.minimizeMemory' is not supported", or 'does not implement method "..."').
Also the docs say what the command is: the memory manager's MinimizeMemoryUsage.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the minimize e2e uses a plain protocol client, and the protocol-name scan lets the engine-gated name through
The e2e imported the installed Playwright (test_fork forbids it) and the vendored client has no
connect: it now speaks the protocol over the served WebSocket, like the other served-browser e2e.
Re-run on an engine with the command (all three pass) and on one without (the first and the third
fail, with the fallback warning).
Heap.minimizeMemory is written by navgc.py for an engine the published core's protocol mirror does
not describe yet, behind a fallback to the older command. test_protocol_names_are_declared keeps it
in AHEAD_OF_THE_MIRROR, still checks every other name, and a last test fails when the mirror gets
the command, saying to delete it from the list.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The periodic collection option is out: only the page.request_gc() fix stays
The engine has no behaviour that stock Playwright's Juggler lacks, and a server option that
sends a memory command on a schedule is one. INVPW_GC_EVERY_NAV and INVPW_GC_MODE, navgc.py,
the hook in the commit path, their unit tests, the e2e of the engine command and the entry in
the protocol-name scan leave the branch.
What stays is a defect of the standard API: page.request_gc() sent Heap.collectGarbage on the
browser connection, whose handler does not have it, so it failed on every call; it is now sent
with the session of the page. The test fails on main's server.py and passes here.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* 0.49.1: page.request_gc() works on a served browser
A change to the package's code takes a new version and a changelog entry: 0.49.0 is published.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the web fonts of closed contexts leave WebRender's shared archive (firefox-61)
A probe opens N contexts, each with a page that loads a web font of its own
bytes, closes them, and reads explicit/gfx/webrender/resource-cache/fonts from
a memory report (Marionette, chrome scope) before, with contexts open, and
after. On firefox-60 the archive keeps ~1 MB per closed context (10/20/40
contexts: 10.4/19.8/40.7 MB, measured); the test asserts it is back at what it
was from firefox-61 and is skipped on an older engine.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Disable the context cache while a route is active, as upstream
Playwright's ffBrowser.doUpdateRequestInterception sends
Browser.setCacheDisabled with the same flag as Browser.setRequestInterception.
The server sent only the second, so a routed context filled the engine's cache2
on disk. op_set_interception now sends both, for the same context.
* tests: a context that ends leaves no content process (e2e, from firefox-61)
A page that registers a service worker whose script is `for (;;) {}` kept its content process alive
after its context was closed. The test closes three such contexts and counts the web content
processes after each; on an engine without the fix the count grows by one per context ([4, 5, 6]),
with it it does not. Skipped on an engine older than firefox-61.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* 0.49.1: the firefox-61 engine through invisible-core 61.62.0 (prepared, not pushed)
Pin to the core that carries the firefox-61 seal (the core is not published yet) and the changelog of the
engine's four fixes, on top of the four open branches this release carries: page.request_gc() (#442), the
context route and the cache (#447), the web fonts of closed contexts (#445) and the processes of an ended
context (#446).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* tests: the process count of an ended context is compared from the second context on, over five
On the Linux gate the count after the three contexts was [2, 3, 3]: the first context adds one process
that is not the leak (a spare content process the engine starts when the first page takes one) and
then the line is flat, and counts[2] <= counts[0] failed on the engine WITH the fix. Five contexts, and
the last must not be above the second: with the fix [.., 3, 3, 3], on the old engine every context adds
one ([4, 5, 6, 7, 8] measured on Windows). Run on both engines locally.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The corrections release is firefox-61 now, and the shelved line (idwr text, canvas colours and ICC
readback, maths, media decoding, WebGL arithmetic, the Linux system-theme refusal) is firefox-62.
The seventeen files whose engine_at_least gate asked for firefox-61 ask for firefox-62, comments and
docstrings too; conftest.py names the same number in its comment and docstring.
tests/unit/test_engine_at_least.py: the engines firefox-61 and firefox-61-candidate are skipped by a
gate that asks for 62. With the old minimum (61) three of its cases fail; with 62 the file passes.
Default suite in a clean checkout: 1084 passed, 9 skipped.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine of firefox-60 evicts, when the main frame commits a navigation, the bodies of the documents the tab
left, as Chromium does; a body over the cap already answered 'evicted'. The test serves two pages from a local
server, reads the bodies of the current document, then of the one that was left, and checks that the second
context and the page still work after the bodies are gone.
Gated with engine_at_least('firefox-60'): skipped on firefox-59 (checked with the real gate), and run by hand
against a copy of the firefox-59 engine with the fix it passes, against the unmodified one the first test fails
with 'DID NOT RAISE'.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Seventeen e2e files skip unless the engine is at least "firefox-60": the idwr text, the canvas
colours and ICC readback, the maths, the media decoding, the WebGL arithmetic, the Linux system
theme refusal. Those are the goals of the line that is now called firefox-61. The name firefox-60
is the next release of the engine (firefox-59 plus the Juggler memory fixes), which has none of
them: with the gates at 60 they would have run on it and failed. They ask for 61 now, and a unit
test says that engines 60 and 60-candidate are skipped by a gate that asks for 61 (it fails with
the old minimum, which let 60 run).
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* e2e: the run stops at the first refusal of the engine instead of launching for 26 minutes
Against a firefox-59 engine whose gate wanted a declaration the core no longer made (59.58.0), the
suite went on for 26 minutes, launching the browser for each test, being refused each time with the
same sentence, and opening a crash window per refusal on the desktop. tests/engine_refusal.py reads
the text of a failed e2e report and, when it holds the engine's own refusal ("stealth: X is not
declared. Engine rule 7" or the scale refusal), stops the run with that sentence as the reason:
session.shouldstop on the serial path, the controller's shouldstop under xdist (a worker is never
stopped alone). A test that expects a refusal passes, so it never reaches the plugin; a unit test
that only quotes the sentence does not count.
The unit tests read the sentence; the integration tests run pytest over twenty e2e-marked tests of
which the second fails with the refusal, serial and with -n 2: the old suite ran all twenty (the two
fail without the plugin, and a failure that is not a refusal still runs all twenty).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* launch_server, launch_server_async and RemoteServer are on the package; the README shows a server and a client
The server API was reachable only through invisible_playwright._juggler.remote, a private path.
`from invisible_playwright import launch_server` now works, with launch_server_async and
RemoteServer, and they are in __all__. The README section "Serving one browser to many clients"
gets a complete example: a server with launch_server() and a Playwright for Python client that
connects to its ws_endpoint, how to install the extra, where it listens and how the browser ends,
and one line for a client in another language. The example was run against the real engine (the
server printed its address, the client read "Example Domain" and closed, the server's browser stayed
up until Enter).
The test checks the exports and reads the README block against the package; four of its five tests
fail on the old code.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* 0.48.1: invisible-core 59.60.0 (the browser never opens its crash reporter), launch_server on the package
Pins invisible-core 59.60.0, whose launch environment carries MOZ_CRASHREPORTER_DISABLE=1. The
version is 0.48.1 and the CHANGELOG names the crash reporter, the exported launch_server with its
README example and the e2e run that stops at the engine's first refusal.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* wire: a protocol message is JSON, and a transport that proves it
_juggler/wire.py: dumps/loads/round_trip, and WireError naming the path of the first
value JSON would change or lose (bytes, sets, objects, non-string keys, NaN/inf).
JsonWireTransport (INVPW_WIRE=json) puts that wire between the client and the server
of the in-process transport, in both directions: a non-JSON client message raises from
send, a non-JSON reply fails its call with the path, a non-JSON event is recorded in
wire_errors. Local use is unchanged (no JSON unless asked).
tests/test_the_wire_is_json.py: 12 unit tests; the reply-that-is-not-JSON test fails
when emit_message forwards unchecked. The unit suite has the same results with and
without INVPW_WIRE=json; running the e2e suite on the wire is the next step.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wire: the server reads a 1.62 message like a 1.61 one, fixed at Dispatcher.handle
Playwright 1.62 moved the call's timeout from the parameters to the metadata,
so a 1.62 client's timeout was lost and every call waited 30 s. handle() now
folds the variants into one shape (_juggler/variants.py), with no version
check: a timeout in the parameters wins, one in the metadata fills the gap,
unknown fields pass unread. scroll is ignored on purpose (documented); a
webp screenshot, screencastFrameAck, waitForFunction on a selector and
virtual credentials refuse that one command with their reason.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wire: a 1.62 screencastFrameAck is accepted and does nothing
The server already acknowledges each screencast frame to the engine, so a client that
acknowledges every frame (1.62's does) is answered, not failed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* wire: a Dialog is an object of the protocol, and the server stops reading the client's registry
The Dialog was a fused class: no __create__, no guid, no channel. The server
built it with Server.twin(page guid), looked into the client's guid registry
(bind_impl_objects/bind_twins) and called BrowserContext._on_dialog through
Connection.deliver_event.
Now DialogDispatcher (TYPE Dialog, parent the Page, initializer type/message/
defaultValue/page, methods accept/dismiss) is announced with __create__ and
then carried by the context's `dialog` event; _dialog.py is a ChannelOwner as
in Playwright, with its case in _object_factory.py, and the event reaches the
listener through Connection.dispatch like any other. Removed: _emit_fused_dialog,
send_async, Server.bind_twins/twin/deliver/run_blocking/call_soon, the
transport's bind_impl_objects/run_blocking/call_soon, Connection.deliver_event
(dispatch is upstream's again) and the bind calls in both context managers.
The reader's pause stays: accept/dismiss answer through
PageDispatcher.answer_dialog, in the worker. diff_protocol no longer lists
Dialog as an expected difference.
Tests: test_a_dialog_is_a_protocol_object.py fails on the old code; the pause
test now covers the answer over the channel.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* remote: launch_server() serves one browser to any protocol client over a WebSocket
One launch, one registry, a connection per client: objects are owned by the
client that made them, a client leaving closes its contexts and not the browser.
initialize answers with BrowserType, LocalUtils, Browser and a Playwright root
carrying preLaunchedBrowser. No version check, no limit of ours; the identity
stays the server's. A dialog, which cannot cross the wire, is dismissed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* remote: the Playwright initializer names every required type of spec 1.62
A client built on the 1.62 spec (playwright-go's newPlaywright) reads chromium, firefox, webkit,
android and electron from the Playwright initializer without checking for a missing one and
panics: 'fromChannel: expected *channel, got <nil>'. chromium and webkit are BrowserTypes whose
calls refuse with a reason; Android and Electron likewise. Announced before Playwright.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* pin invisible_core 59.57.0 (the pin PR 413 proposes), engine firefox-59
One core for the image that serves this wrapper: the unit suite and a quick e2e (the served
browser answering a plain client, add_script_tag, dialog pause) run on core 59.57.0.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: "no-override" is not sent to the engine as a colour scheme, motion or forced-colors value
The Go client (and Playwright's null) says "not overridden" with the string
"no-override". The server passed it to Browser.setColorScheme (and the motion
and forced-colors commands), whose enum has no such member, so the engine
refused the whole newContext. Now nothing is sent and the context keeps the
persona's declared theme; explicit dark/light/no-preference still go out.
Page.setEmulatedMedia treats it as a reset (field left out, empty medium).
Tests: unit (6 of 11 fail on the old server) and an e2e with a light and a
dark persona that reads prefers-color-scheme through a Go-style context.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* remote: the pointer's walk is drawn by the server, once, for every client
The in-process client patched Frame._click/hover/dblclick/tap/check,
Mouse.click and Mouse.wheel and sent N mouseMove before each action; a
client that is not ours sent one Frame.click and the page saw one
mousemove (measured with humanize=True on a served browser). The walk
(approach, off-centre landing, idle fidget, scroll detents) moves to
_juggler/pointer.py, built per page from the session seed, the page's
number and the humanize budget, and called by FrameDispatcher and the
Page mouse ops. The in-process client now sends the plain action.
- an explicit mouse.move stays the caller's: the server walks it only
when the in-process client marks it (humanise); a standard client's
move reaches the page as the exact point it named
- who draws travels in the launch prefs (invisible.server.pointer), so
the engine's own expansion and INVPW_CURSOR_ENGINE=off are not
humanised twice
- golden from 5d9ad70 (tests/data/pointer_golden.json, with its origin
and generator): a Frame.click reaching the server draws the same
engine events, same coordinates and instants, as the client did
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: Mouse.click puts one mousemove on its point, not two
Pointer.click_at sent the endpoint as a move of its own and then Actions.click_at
moved onto it again as its own approach before the press: the engine got two
mousemove with the same coordinates at the same instant, which no mouse reports
and a page can count. The defect predates the move of the walk to the server
(it was the client's Mouse._click); it is corrected at the source instead of
being preserved, for every transport (op_mouse_click is the one path).
- pointer.py: click_at sends the stroke and lets the click's own approach be the
one move onto the point; the hand is re-synced after the click.
- golden: only the explicit_pointer session (the one with a Mouse.click)
changes, regenerated by tests/data/pointer_golden_origin.py
--revise-mouse-click, which refuses unless the result is the old session minus
that one repeated move; the origin says why.
- tests: no two consecutive equal mousemove in a humanised Mouse.click (fails on
the old code), plus an e2e with one real browser that counts them in the page.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: a stroke from standstill does not open with the point it stands on
The first waypoint of a stroke is its start. When the engine has already been
told the pointer is on that pixel (a move that stopped there, then a pause), the
stroke sent it again: a zero-displacement mousemove no mouse reports. Pointer.
_travel now skips a first waypoint that coincides with the position the engine
knows; a pointer the engine was never told about (the page's first movement,
from the seeded start point) still opens with its first waypoint.
- golden: only the explicit_pointer session changes (one mousemove fewer; t, x,
y and type of every other event unchanged, latency draws follow the ordinal),
regenerated by pointer_golden_origin.py --revise-standstill, which refuses
unless the other three sessions equal the server's run event for event.
- tests: no repeated or zero-displacement mousemove from standstill after 0, 0.2
and 5 s, for click and move (fail on the old code); e2e with one real browser.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: a closed context leaves nothing in the registry, the browser's lists or the wire's error log
The three children of a context (Debugger, Tracing, APIRequestContext) were
announced under the browser and adopted by the context on the wire, but dispose
forgets a subtree by walking parent, so they outlived every context: 3 registry
entries per context (500 contexts: 1,500). browser.contexts kept every closed
context with its options and owner, browser._artifacts every download, and a
Stream's file stayed open when its parent's dispose forgot it (the cascade does
not call dispose on a descendant). New Dispatcher.released(), called for the
object and for each descendant the cascade forgets, lets go of what other
objects hold of it. RemoteEndpoint.wire_errors keeps the last 32, not all.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* remote: an opt-in memory probe (INVPW_MEM_LOG) and malloc trim (INVPW_MALLOC_TRIM), both off by default
INVPW_MEM_LOG=<file> writes a JSON line every INVPW_MEM_LOG_INTERVAL seconds
(default 2) and at each context close: uss/rss, registry objects, contexts,
clients, the bytes and messages queued in the clients' outboxes (read from the
queue at sampling time, free when the probe is off), gc counts and glibc
mallinfo2. INVPW_MALLOC_TRIM=1 calls malloc_trim(0) after each message of 64 KiB
or more has been sent and at each context close (Linux only; elsewhere ignored
with one warning). With both off nothing is built or loaded and the wire is
byte-identical.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: the guid registry collects its oldest dispatchers like Playwright's server
Per bucket (the object's type; Frame is MainFrame or Frame), past the limit the oldest
tenth is disposed with __dispose__ {reason: "gc"} to its owner and its subtree silently,
as dispatchers/dispatcher.ts of Playwright 1.62 does: 10000, JSHandle and ElementHandle
100000, one value per type in dispatcher.GC_LIMITS (INVPW_GC_LIMITS lowers some without
editing code). The registry is walked once per batch, not once per object. An event on a
disposed object is dropped, a request or frame already collected is not named again.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: a request and a response keep what they hold, not what the wire carried
Measured on a real browser (one context, 95 navigations, ~100 subresources each) a Request
was 4.5 KB and a Response 6.0 KB: headers as a list of dicts kept twice (initializer and
raw_headers), the POST body and the timing in the initializer. Headers are now a tuple of
interned (name, value) pairs rebuilt on demand, the certificate is one object per distinct
certificate, the remote address a pair, and the initializer is replaced after the
__create__ by a copy without headers, postData and timing (a new dict: a message waiting in
a queue still holds the old one). Dispatcher.announced() is the hook; released() clears a
request's and a response's state when they leave the registry. 0.84 KB each, and the same
run ends at 73 MB instead of 149 MB.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* server: Request, Response and Route collect at 2000, and nothing younger than 10 s is collected
Two declared differences from Playwright's collector (dispatcher.GC_LIMITS, docstring):
the three network types have a limit of 2000 instead of 10000, and an object younger than
GC_MIN_AGE_S is never a victim, so what a client was just handed (the Go client uses a
request inside the callback of its event) stays valid however fast the bucket fills.
Measured on a real browser, one context, 95 navigations of pages with ~100 subresources
and heavy headers: 193 MB at 10000, 74 MB (flat from navigation 25) at 2000.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* remote: malloc_trim is on by default on Linux; INVPW_MALLOC_TRIM=0 turns it off
After a context closes and after each message of 64 KiB or more is sent, the served browser
calls malloc_trim(0) when the libc has it (glibc on Linux). Slack's runs of 95 navigations: the
free memory glibc held (fordblks) went from 13 MB to 177 MB by default. Off Linux, with musl or
a libc without the function, nothing is called and nothing is said. No mallopt here:
MALLOC_ARENA_MAX=2 is process-wide, the launcher's to set (README). The probe stays off
and free unless INVPW_MEM_LOG is set.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs: the registry's collection limits and what they mean for a program that holds many old requests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* release 0.48.0: launch_server, and the engine firefox-59 through invisible-core 59.57.0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the missing-websockets message is spelled by the installer, and two tests share a fixture without redefining it
The message named a written pip install, which the way-in check refuses; it is built with
invisible_core.installer now, as _engine.py does. The two tests imported a fixture and
took it as an argument (F811); they bind it by assignment instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* ci: the pointer test reaches its fixture module the way the other tests do, not through a tests package that CI does not have
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: the trim test waits for the trim, which the writer runs after the send
A fixed read of the trim count right after the reply failed on a slow runner (the client
holds the reply before the writer's next line runs). A delayed trim fails the old test and
passes this one.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: the WebGL e2e looks at the engine processes below its own test, not at the first one on the machine
With several workers in /proc the scan over every process could be handed another worker's
browser, which had not drawn yet and maps only the host's libgallium (GTK's GLX): red on one run of
the Linux gate and green on the next, same engine and core. The test now walks the tree under its
own process, asks that at least one process there maps the engine's libEGL and libgallium and that
none maps a host libEGL; a unit test with two trees on one machine fails a whole-machine scan.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: a click's stroke is judged by its shape, not by how many mousemoves reached the page
The pacer drops a sample it cannot send on time, so the same stroke is 15 events on an idle machine
and 6 to 9 on a loaded one (Windows with 32 busy processes; the Linux gate with four workers got
9). The e2e asked for more than 10 and failed on the gate with a real stroke: it left from
(1116, 731), came in steps and ended on the click. It now asks that the stroke left from far away,
came in at least one step and ended on the target with no repeated mousemove; the standstill test
asks for something before the landing, not for 6 events. The unit test holds the gate's page events
as data: the old rule refuses them, the shape rule accepts them, and a jump, two events, a miss, a
start on the target and a repeat are refused. Ten idle runs and three loaded runs pass on Windows;
the old test fails under load.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Pin invisible-core 59.58.0; the pinning page drops the two keys that core no longer accepts
59.58.0 is on PyPI. Besides the same numbers from a seed on Python 3.11 to 3.14 (the red
py3.11 job), it stops declaring the glyph coverage ladder and forces no sRGB output profile, so
the pin keys font.alpha_ladder and desktop.srgb_output are refused by the validator; the pinning
page listed both and test_pinning_doc caught it. Their rows are gone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Pin invisible-core 59.59.0 (59.57.0 and the version-independent float arithmetic)
59.59.0 is 59.57.0 plus only the fix for the two builtins that differ between Python versions
(sum() of floats and math.log2), which was the red py3.11 job. It keeps the glyph coverage
ladder the firefox-59 engine's declaration gate requires and the sRGB output pin, so the
pinning page lists font.alpha_ladder and desktop.srgb_output again.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* The server answers NaN, the infinities and -0 as Playwright's tag, not as a bare number
Found by the e2e run on the strict JSON wire: page.evaluate_handle("() => NaN").json_value()
passed in process and failed with "$.result.value.n: nan is not JSON". The server's serializer
answered {"n": nan}, which Python writes as the bare word NaN and no other JSON reader accepts.
Playwright sends {"v": "NaN"} (and "Infinity", "-Infinity", "-0"); so does the server now. The
unit test fails on the old serializer (9 of 11) and the e2e that found it passes on both wires.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
On Windows the engine takes the system fonts and colours from the toolkit as
retail does (StealthVerifySystemTheme returns unless MOZ_WIDGET_GTK), so a
launch without ui.highlight, ui.-moz-field or ui.font.menu does not refuse
there. Candidate 42673795394's Windows gate ran the test and got DID NOT RAISE
three times. The refusal test now skips on win32; the control launch still runs.
tests/unit/test_theme_refusal_drop.py checks the skip mark on the refusal test
and its absence on the control; it fails on the test without the mark.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The three missing-pref cases end in a deliberate abort (the engine refuses the launch), and each
opened the crash reporter on the desktop of whoever ran it.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
media.rdd-process.enabled=false and media.gpu-process-decoder=false left
the content process with no video decoder at all on Linux: WebCodecs'
configure() rejected with no decoder found for video/avc (MOZ_LOG
WebCodecs:5/MediaDecoder:5 confirms it, not a guess), fast and clean. The
hang the test actually showed was separate: flush() rejects right after
that, and nothing caught it inside the test's own new Promise, so resolve()
never ran and Playwright's own 30s evaluate timeout is what finally fired.
A real user always has the RDD process; dropping those two prefs runs the
default path instead of a configuration retail never has. flush() now
settles the promise on either outcome, so a real decode failure surfaces
immediately instead of hanging for 30s.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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>
Candidate 42640321957 failed it on one lstat("~/.fonts.conf") of the parent: the parent builds
the content sandbox's permissions (SandboxBrokerPolicyFactory::InitContentPolicy) and asks
whether each path exists. It opens nothing, no byte of those files enters the process, and a
page cannot see it; the sandbox policy is not touched.
The criterion is now: a process that OPENS a host fontconfig or font path fails (an open
that fails with ENOENT too), and a content process that does anything there fails (stat,
access, readlink). The parent's existence probes are ignored, with the reason in the module.
tests/unit/test_fontconfig_criterion.py runs it on fake strace lines: the lstat passes; a
parent that opens /etc/fonts/fonts.conf or ~/.fonts.conf, and a content process that stats a
host font directory, fail.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
The regex that finds a pref's line in user.js had a lone backslash before its closing bracket
(an unterminated character set): every case of the e2e died with re.error before launching
a browser (candidate 42624473465, Windows gate). tests/unit/test_theme_refusal_drop.py runs
the helper on a user.js of its own and fails on the old regex.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
tests/data/canvas_text_ref only compares black text on white under one ClearType state, which
hides what a text-mask hook changes: 12 of 14 coloured cases differ from retail on an engine
that quantises its A8 masks.
New e2e, with hashes from retail Firefox 159.0 on Windows (headless, same pages, same bundled
fonts):
- the 14 coloured cases (7 colour pairs x Arial 16/33 px) with the seed's configuration;
- 39 cases (25 black of canvas_text_ref + the 14 coloured) under three ClearType keys,
1800/100, 1400/50 and 2200/0, one launch per key with the font.cleartype_gamma and
font.cleartype_contrast pins. The failure message lists each differing case.
The pin, the font check and the server of the existing canvas text test move to
tests/_canvas_text.py, which both tests import. The reference holds pages, hashes and
metadata only (scripts/build_canvas_text_colors_refs.py rebuilds it from the saved bytes);
tests/unit/test_canvas_text_colors_refs.py checks its structure and that the keys give
different hashes.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
* 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>
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>
* 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>
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>
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>
* 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.
* 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>
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>
* 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>
* 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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
`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.
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.
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.
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.
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.
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.
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.
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.
* 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
* 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.
* 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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
* 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
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.
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.
* 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.
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.
* 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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
- `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>
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.
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.
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.
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.
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.
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>
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>
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>
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.
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.
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).
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.
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
`__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.
* 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
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.
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.
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.
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.
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.
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.
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.
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.
* 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.
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.
* 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.
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.
* 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.
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.
* 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.
* 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>
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.
* 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.
* 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
* 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>
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.
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.
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.
* 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
* 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.
* 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.
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.
* 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
877 changed files with 102115 additions and 26032 deletions
# The root ones are left out by name and run in the step below, as root: here, as the runner user, they errored.
run:|
IGNORE=(); for f in $ROOT_FILES; do IGNORE+=("--ignore=$f"); done
DESELECT=(); for n in $ROOT_NODES; do DESELECT+=("--deselect=$n"); done
xvfb-run -a python -u scripts/run_e2e.py "$FF" "${IGNORE[@]}" "${DESELECT[@]}"
# Runs ONLY if the step above fails, and before 2026-08-13 it could not
# THE ROOT SUITE, AS THE GATE RUNS IT (wrapper.e2e.udp.exit in ci/required-suites.json). Seven e2e need root: the exit of the lab is a documentation
# address (198.51.100.9) added to `lo` with `ip addr add`. Collected here as the runner user they ERRORED (run 43262636367: "cannot hold 198.51.100.9
# on lo (needs root and iproute2 on Linux)"), so the run above leaves them out by name (ROOT_FILES / ROOT_NODES) and this step runs them, and only
# them, the way the gate does: the engine copied to /opt/ff (the socket process execs inside a new user namespace, where the runner's 750 home is not
# readable), `sudo -H -E env -u XDG_RUNTIME_DIR` (Firefox refuses to run as root in a regular user's session), no rerun plugin. Nothing is skipped
# silently: the step reads its own junit and refuses anything but exactly that many tests, all passed.
# AFTER the run of the runner user, never before it (run 43271443150 of PR 483: with this step first, every launch of the run that followed
# waited for the browser's readiness line until its timeout, and the job was cancelled at 40 minutes; the same head without the step had 748
# green). Whatever root leaves behind (files under the runner's home or /tmp, /etc/resolv.conf, an address on lo) cannot reach a launch of the
# runner user any more; the step after this one prints what it left, and decides nothing.
# tests/test_the_root_e2e_run_in_the_root_step_and_nowhere_else.py holds the two lists, this step and the run above to the suite's list, and the order.
- name:The root e2e (wrapper.e2e.udp.exit), as root, as the gate runs them
@@ -4,20 +4,20 @@ 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/oss-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.
- **The C++ patches** live in the companion repo [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
## Scope
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/oss-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/).
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
@@ -66,13 +66,13 @@ CI must be green before merge.
Before opening, please:
- Search [existing issues](https://github.com/feder-cr/invisible_playwright/issues) - the bug may already be tracked.
- Search [existing issues](https://github.com/oss-invisible/playwright/issues) - the bug may already be tracked.
- Reproduce on the **latest release** if possible.
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `feder-cr/firefox_antidetect_patch` instead.
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `oss-invisible/firefox_antidetect_patch` instead.
Include:
- OS and version, Python version, `invisible_playwright` version (`invisible_playwright version`)
- OS and version, Python version, the output of `invisible-playwright version`
<img alt="invisible_playwright, Playwright on an anti-detect Firefox. An animation: the two-line switch from Playwright, the fingerprint set inside the engine, a mouse that moves like a hand, and the bot tests it passes." src="https://raw.githubusercontent.com/oss-invisible/playwright/main/docs/banner-light.gif" width="100%">
</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>
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.
uvruninvisible-playwrightfetch# 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
@@ -133,6 +130,50 @@ with InvisiblePlaywright(proxy=proxy) as browser:
Schemes supported: `socks5`, `socks4`, `http`, `https`. DNS is routed through the proxy by default, no local leak.
### Serving one browser to many clients
`launch_server()` serves one browser on a WebSocket to any Playwright client. Install the
extra that carries the WebSocket library with `uv add "invisible-playwright[remote]"`.
"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,8 +207,18 @@ 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)**.
### Launch counter
The engine counts launches with an anonymous GET to the `usage-counter` release of the engine's repository (`oss-invisible/firefox_antidetect_patch`) on GitHub. This package's launcher and server refuse the two prefs that govern it, `invisible_firefox.usage_ping.enabled` and `invisible_firefox.usage_ping.url`, in `extra_prefs`.
---
## CLI
@@ -184,8 +235,18 @@ 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 invisible-playwright-mcp`, see
[the MCP server page](https://github.com/oss-invisible/playwright_mcp/wiki/mcp-server); or with an
interface and a model included, needing only an OpenRouter key,
`uvx invisible-playwright-mcp ui --openrouter-key sk-or-...`, see
[invisible_playwright_mcp](https://github.com/oss-invisible/playwright_mcp). Same engine underneath, and the second
[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
**The other pieces of this one.** The engine is the middle of three, and the
two around it are how most people reach it:
- **[invisible_core](https://github.com/feder-cr/invisible_core)** - seed to
- **[invisible_core](https://github.com/oss-invisible/core)** - seed to
fingerprint to preferences, plus proxy and geolocation. This package pins it.
- **[AIHawk](https://github.com/feder-cr/AIHawk)** - this engine as an MCP
server (`uvx aihawk`, for any client that brings its own
- **[invisible_playwright_mcp](https://github.com/oss-invisible/playwright_mcp)** - this engine as an MCP
server (`uvx invisible-playwright-mcp`, for any client that brings its own
model) and, in the same package, an interface with a model included, from
one command. The interface is a client of the server, with no private path
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 privacydefaults. 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
-`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).
---
## License
MIT - see [LICENSE](https://github.com/feder-cr/invisible_playwright/blob/main/LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
MIT - see [LICENSE](https://github.com/oss-invisible/playwright/blob/main/LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch).
---
@@ -282,14 +369,12 @@ This project is for educational purposes only. It is provided as-is, with no war
<p align="center">
Built by <a href="https://it.linkedin.com/in/federico-elia-5199951b6">Federico Elia</a>
- Vulnerabilities in the patched Firefox source - report to [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch/security/advisories/new)
- Vulnerabilities in the patched Firefox source - report to [oss-invisible/firefox_antidetect_patch](https://github.com/oss-invisible/firefox_antidetect_patch/security/advisories/new)
- Upstream Firefox / mozilla-central - report to Mozilla directly
- Third-party dependencies - report to those projects
{"id":"wrapper.e2e.udp","giro":"G2","os":["linux","windows"],"min_tests":43,"exact":true,"tests":["tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py","tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py","tests/test_turn_over_tcp_is_tried_for_real_e2e.py","tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy","tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback","tests/test_declared_host_network_e2e.py","tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py","tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay","tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay","tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay","tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away","tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server","tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own","tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context","tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all","tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all","tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all"],"marker":"e2e","needs_root":false,"note":"Needs the candidate binary (STEALTHFOX_E2E_BINARY) and the engine that carries the UDP line. 57 = 1+7+6+1+21 from the five files + 21 from the 10 UDP-line tests of test_webrtc_realness.py (parametrized). The chain by name is here in its variant with the lab's exit on loopback (127.0.0.2) and the pref `media.peerconnection.ice.loopback`, on Linux and Windows: the exit of the lab is loopback, and a loopback mapped address is thrown away by nICEr unless the ICE context allows it. The variant without the pref (an exit that is not loopback) is the suite wrapper.e2e.udp.exit, Linux only; the address added to the interface of the Windows runner is work of the release after firefox-63. The preload_newtab test (2) is here: seen green on Linux as root (Docker) and on Windows 10 runs of 10 (windows-2022, round 5 engine); it reads the engine's own process log."},
{"id":"wrapper.e2e.udp.exit","giro":"G2","os":["linux"],"min_tests":7,"exact":true,"tests":["tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick","tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py"],"marker":"e2e","needs_root":["linux"],"note":"Linux only, and not collected on Windows: the exit of the lab is a documentation address (198.51.100.9) added to lo with `ip addr add`, which needs root and iproute2; a mapped address in 127/8 would be thrown away by nICEr as bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) and the pref that allows it is off in a product. The page reads a srflx equal to the gateway exit and the relay of the TURN server, the TURN name resolved by the DoH through the proxy, in the tick of 2 s. On the Windows runner of GitHub (administrator, the network of the runner) it could run too: not yet. A skipped test would turn the verdict red, hence a suite of its own. Its twin with the lab's exit on loopback and the pref stays in wrapper.e2e.udp on both systems, so that Windows keeps the walk of the chain by name."},
{"id":"wrapper.e2e.udp.sandbox","giro":"G2","os":["linux"],"min_tests":13,"exact":true,"tests":["tests/test_the_socket_process_is_sandboxed_e2e.py","tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy","tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay","tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"],"marker":"e2e","needs_root":false,"note":"The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed."},
{"id":"wrapper.e2e.web","giro":"G2","os":["linux","windows"],"min_tests":27,"exact":true,"tests":["tests/test_networkidle_through_a_served_browser_with_routes_e2e.py","tests/test_http3_through_the_proxy_e2e.py"],"marker":"e2e","needs_root":false,"note":"The networkidle e2e with routes and the HTTP/3 e2e, split from wrapper.e2e.udp (about 260 s of 500 on Linux; the whole suite did not fit the 15 minutes of Windows)."},
{"id":"wrapper.e2e.doh","giro":"G2","os":["linux","windows"],"min_tests":19,"exact":true,"tests":["tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py","tests/test_resolver_race_e2e.py","tests/test_doh_under_stress_e2e.py","tests/test_context_proxy_only_resolves_by_doh_e2e.py","tests/test_doh_through_the_proxy_e2e.py","tests/test_ice_names_by_the_context_proxy_e2e.py"],"marker":"e2e","needs_root":["linux"],"note":"Linux needs root: the resolver trap of the file (ResolverTrap) points /etc/resolv.conf at a counting resolver on port 53. Su Windows il resolver trap non gira: l'asserzione sul resolver di sistema è l'unica omessa. Run it without xdist (port 53 is one per host). On the Linux leg the gate exports INVPW_REQUIRE_TRAP=1: a trap that cannot run or bind port 53 is a failure, not a skipped assertion."},
{"id":"wrapper.e2e.realness","giro":"G2","os":["linux","windows"],"min_tests":32,"exact":true,"tests":["tests/test_realness_behind_a_declared_exit_e2e.py"],"marker":"e2e","needs_root":["linux"],"note":"The realness check without a real proxy: six declared exits, the values a page reads, and the roads. Linux runs as root without xdist like the DoH suite (the resolver trap); on Windows the trap does not exist and the assertion on the system resolver is the only one omitted."},
{"id":"wrapper.unit.udp","giro":"G1","os":["linux","windows"],"min_tests":221,"exact":true,"tests":["tests/test_a_served_launch_cannot_turn_the_launch_counter_off.py","tests/test_the_witness_picks_a_port_both_sockets_bind.py","tests/test_preload_newtab_reaches_the_core_only_when_asked.py","tests/test_the_resolver_trap_counts_its_own_users.py","tests/test_the_doh_e2e_launch_on_a_virtual_display.py","tests/test_the_realness_helpers.py","tests/test_the_h3_line_helpers.py","tests/test_the_fake_doh_delays_and_refuses.py","tests/test_the_host_address_helper.py","tests/test_the_udp_chain_helper.py","tests/test_the_fake_doh_answers.py","tests/test_doh_session_prefs_unit.py","tests/test_the_leak_watcher_sees_a_direct_connection.py","tests/test_the_http_proxy_helper_asks_for_credentials.py","tests/test_every_route_command_is_answered_may_fail.py","tests/test_the_network_declaration_reaches_the_engine.py","tests/test_the_resolver_trap_is_required_by_the_gate.py","tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py","tests/test_the_witness_hears_a_direct_send.py"],"marker":"unit","needs_root":false,"note":"92 = 6+32+21+7+8+3+9+6. The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added."},
{"id":"wrapper.e2e.page","giro":"G2","os":["linux","windows"],"min_tests":115,"exact":true,"tests":["tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py","tests/test_a_page_that_moves_on_e2e.py","tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py","tests/test_a_popup_of_a_link_reaches_the_client_e2e.py","tests/test_popup_destinations_e2e.py","tests/test_popups_reach_the_client_e2e.py","tests/test_route_superseded_e2e.py"],"marker":"e2e","needs_root":false,"note":"114 = 100 + the 14 of test_a_page_that_moves_on_e2e.py (a navigation the page overtook with location.replace ends; the engine fix 860ef8a6d9 is proved by it). 100 counted at the collection; was 96 = 10+32+16+34+4 before the popup tests of 6200bc2). A page is handed over when the engine says Page.ready; a popup reaches the client (link, noopener, window.open; own site and another; with and without a route; in-process and over launch_server) as Playwright's does; a superseded route. Needs the candidate binary, and the stock Playwright client of the dev extra."},
{"id":"wrapper.unit.page","giro":"G1","os":["linux","windows"],"min_tests":44,"exact":true,"tests":["tests/test_a_download_finished_before_it_was_announced_is_finished.py","tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py","tests/test_ci_drive_gate_goes_through_the_core.py","tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py","tests/test_a_new_page_waits_for_the_engine.py","tests/test_page_number_follows_the_call.py"],"marker":"unit","needs_root":false,"note":"24 (counted at the collection; was 20 = 3+8+1+8 before 6200bc2). The page dispatcher's wait for Page.ready and what it hands over; the drive gate goes through the core (the engine waits for the session's road)."}
title:"AI agent retry loops trip rate limits, not fingerprints"
description:"Retry and re-plan loops multiply requests into a volume signal; throttling belongs in the agent loop. This page moved to the AIHawk wiki."
description:"Retry and re-plan loops multiply requests into a volume signal; throttling belongs in the agent loop. This page moved to the invisible_playwright_mcp wiki."
parent:"AI Agents and Frameworks"
grand_parent:"Guides"
nav_order:17
@@ -9,10 +9,10 @@ nav_order: 17
# AI agent retry loops trip rate limits, not fingerprints
This page moved to the AIHawk wiki, where the agent-experience content now
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/feder-cr/AIHawk/wiki/agent-retry-loops-rate-limits)**
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/oss-invisible/playwright_mcp/wiki/agent-retry-loops-rate-limits)**
The one-paragraph version: an agent that retries and re-plans multiplies its
requests, and volume is scored server-side against your address and account.
title:"Why AI browser agents have their own timing signal"
description:"An LLM loop emits machine-regular action gaps and instant pointer jumps - a behavioral signal no fingerprint fixes. This page moved to the AIHawk wiki."
description:"An LLM loop emits machine-regular action gaps and instant pointer jumps - a behavioral signal no fingerprint fixes. This page moved to the invisible_playwright_mcp wiki."
parent:"AI Agents and Frameworks"
grand_parent:"Guides"
nav_order:10
@@ -9,10 +9,10 @@ nav_order: 10
# Why AI browser agents have their own timing signal
This page moved to the AIHawk wiki, where the agent-experience content now
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
**[The timing signal AI agents give off](https://github.com/feder-cr/AIHawk/wiki/ai-agent-timing-signal)**
**[The timing signal AI agents give off](https://github.com/oss-invisible/playwright_mcp/wiki/ai-agent-timing-signal)**
The short version it still owes you here: a think-act loop pauses for model
latency, and that pause repeats with a regularity no human produces. The
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/oss-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
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
@@ -77,7 +77,7 @@ This is the one detector in this whole corpus where the honest answer is: engine
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright), a Firefox
patched at the C++ level. Anubis is the one detector here this project can actually read the source of, and
the honest conclusion is that engine-level realness has almost nothing to do with passing it: the puzzle
tests JavaScript execution speed, not fingerprint fidelity, and any real browser clears it the same way.*
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
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/oss-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/oss-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
title: "browser-use gets detected: what you can and cannot change"
description: "browser-use drives Chrome over CDP. What BrowserProfile lets you change and what stays out of reach. This page moved to the AIHawk wiki."
description: "browser-use drives Chrome over CDP. What BrowserProfile lets you change and what stays out of reach. This page moved to the invisible_playwright_mcp wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 2
@@ -9,10 +9,10 @@ nav_order: 2
# browser-use gets detected: what you can and cannot change
This page moved to the AIHawk wiki, where the agent-experience content now
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
**[browser-use getting blocked: what you can and cannot change](https://github.com/feder-cr/AIHawk/wiki/browser-use-getting-blocked)**
**[browser-use getting blocked: what you can and cannot change](https://github.com/oss-invisible/playwright_mcp/wiki/browser-use-getting-blocked)**
The unchanged short answer: browser-use exposes a real set of levers
(`executable_path`, `user_data_dir`, `proxy`, `headless`, `args`), all of
@@ -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

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
@@ -208,6 +224,6 @@ canvas-in-iframe rows are a consistency test rather than a fingerprint test, and
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
*From the notes of [invisible_playwright](https://github.com/oss-invisible/playwright),
a Firefox patched at the C++ level. The solid-fill guard exists because we shipped
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
`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/oss-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.*
@@ -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
title: "Computer-use agents and browser fingerprint detection"
description: "Clicking by pixel makes driver flags moot; the engine fingerprint and action rhythm stay checkable. This page moved to the AIHawk wiki."
description: "Clicking by pixel makes driver flags moot; the engine fingerprint and action rhythm stay checkable. This page moved to the invisible_playwright_mcp wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 6
@@ -9,10 +9,10 @@ nav_order: 6
# Computer-use agents and browser fingerprint detection
This page moved to the AIHawk wiki, retargeted at the question people
This page moved to the invisible_playwright_mcp wiki, retargeted at the question people
actually search:
**[Claude computer use detected as a bot](https://github.com/feder-cr/AIHawk/wiki/claude-computer-use-detected-as-bot)**
**[Claude computer use detected as a bot](https://github.com/oss-invisible/playwright_mcp/wiki/claude-computer-use-detected-as-bot)**
The core of it, kept here in brief: a coordinate-clicking agent never
generates the DOM-automation tells, so `navigator.webdriver` advice mostly
@@ -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 |
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/oss-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/oss-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.*
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
@@ -208,6 +208,6 @@ and [testing detection without fooling yourself with a verdict](how-to-test-bot-
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
*Written while maintaining [invisible_playwright](https://github.com/oss-invisible/playwright),
a Firefox patched at the C++ level driven by stock Playwright. It hides that a script is
present; the pacing is still yours to get right.*
Loaded 100 of 877 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.