Compare commits

..
Author SHA1 Message Date
feder-cr 27f0501cea tests: the proof of the hidden-display pointer test is an outcome after a count of frames, not a clock window 2026-12-02 11:47:28 +01:00
feder-cr 585acedecc tests: a page on the hidden display sees no pointer or mouse event before the test's first input, and its first event is the one that input makes 2026-12-02 11:44:49 +01:00
feder-cr 05149cb8c8 Merge branch 'e72/r6-pwwidth' into e72/r6-wrapper 2026-12-02 08:49:39 +01:00
feder-cr 95bcd4d1c3 tests: the password-mask extraction test is listed among the tests that hash a file, and the page it hashes is a pinned fixture (-text) 2026-12-02 08:49:29 +01:00
feder-cr 4afd02e305 Merge branch 'e72/r6-b2' into e72/r6-wrapper 2026-12-02 08:48:00 +01:00
feder-cr 570d9997ad Merge branch 'e72/r6-twinctl' into e72/r6-wrapper
Unit rows re-summed: +9 cases of the popup move-to extraction test (first and later popup positions), 4586 + 9 = 4595 linux, 4598 + 9 = 4607 windows.
2026-12-02 08:48:00 +01:00
feder-cr 0eff758320 tests: each phase of the popup move/resize test expects what retail reads in the position the phase has in the browser's life (phase 1 the first popup, phase 3 a later one), from the popup-move-to capture of four launches
Retail Firefox 159.0 at a real 150% opens the first popup of a browser one device pixel narrower than every popup after it (inner 499, outer 514, against 500 and 515), and moveTo(99999, 0) stops at 766 for it and 765 for a later one. The old expected values of phase 1 came from rounds
that ran resizeBy(0, 0) in a LATER popup (500, then 501), while the test runs phase 1 as the FIRST popup the browser opens (nothing is opened before it: launch_case, new_page, goto, then the three phases in this order, each popup closed before the next).

The capture (RetailCaptures hunt/popup-move-to, run 46833539990, commit 8a78d95c461c84d9c11fcbd0596b120bbcb102f4; runs 46832090474 and 46821521582 read the same except the one value below) has per display case four launches: a the test's order, b phase 3 alone, c a throwaway
popup opened and closed first and then the three phases, d phase 2 alone, so every phase is read as the first popup of a browser and as a later one. scripts/extract_retail_popup_move_resize.py writes ci/retail-popup-move-resize.json from it (cases[case][phase][first|later],
the launches each reading came from, the sha256 of every raw.json checked against its meta.json, popups of one position that disagree fail the extraction) and cross-checks the window-geometry rounds against it. The test reads only: MOMENTS is phase 1 first, MOVE_TO is
phase 3 later; no assertion changed.

Old and new expected values: phase 1 at scale 1.5 was inner 500x400, outer 515x478 before and inner 501 after resizeBy(0, 0); it is now inner 499x400, outer 514x478 before and after. Scales 1, 1.25 and 2 and phase 3 (moved 13,13; moved_to 765,0; outer 515 at 1.5) are unchanged.

The "501 after resizeBy(0, 0)" case is not asserted any more because this test never opens a non-first popup with resizeBy. It is not lost: launch c (resizeBy(0, 0) in the second popup of its browser) reads 500 then 501 at 1.5 in runs 46832090474 and 46833539990, and the extraction
fails if the old rounds' readings are reproduced by no position (they are, by later, in all four cases).

Unit tests (red on the old script, green after): 26 -> 35 in test_the_retail_popup_moves_and_resizes_are_extracted_from_the_capture_not_typed.py; ci/required-suites.json wrapper.unit.all.linux 4564 -> 4573 and wrapper.unit.all.windows 4576 -> 4585.
2026-12-02 08:42:21 +01:00
feder-cr 6bb7df2ba3 tests: TEMP evidence, a listener made by another script world and the page's own throwing listener, and what window.onerror is told, run on retail and on ours, side by side
On candidate 46792115974 (linux.3, windows.3) the two listener cases of
test_a_page_function_called_by_the_client_sees_only_page_frames_e2e.py fail: the error of the
listener the client's evaluate registered never reaches window.onerror, the page's own does.
This test registers the same listener from the default sandbox of Marionette's ExecuteScript on
retail Firefox 159 (not wrappedJSObject.eval, which is the page's realm) and from the client's
evaluate on ours, fires it by a real click on the page's trigger, and saves per case (Error,
throw 5) whether window.onerror was called and what it was told, with the page's own listener as
control. It asserts nothing about ours.
It is the third file of the row wrapper.e2e.stock_twin.tooltip (min_tests 6) and a named exclusion
of the whole-suite rows (30).
2026-12-02 07:36:17 +01:00
feder-cr 71ddb27003 Merge branch 'e72/r6-b2' into e72/r6-wrapper 2026-12-02 07:26:52 +01:00
feder-cr 1509415d7a Merge branch 'e72/r6-pwwidth' into e72/r6-wrapper
Unit rows re-summed: 4558 + 6 (twin control) + 14 (popup move-to extraction) + 8 (password-mask extraction) = 4586 linux; 4570 + 28 = 4598 windows.
2026-12-02 07:26:51 +01:00
feder-cr 0072328944 Merge branch 'e72/r6-twinctl' into e72/r6-wrapper 2026-12-02 07:26:21 +01:00
feder-cr 197a3e4f49 tests: phase 3 of the popup move/resize test expects what retail reads in its own order (the third popup of one launch, moveBy(10, 10), moveTo(99999, 0)), extracted from the popup-move-to capture with every raw.json checked against its meta.json sha256, not from rounds that ran resizeBy(0, 0) first 2026-12-02 07:12:56 +01:00
feder-cr f0b83b089c tests: the retail window of a twin is sized by the content area of ours plus its frame read in device pixels, and only the inner equality is the hard control
The control was wrong against its source. size_by_content took the retail frame as outerWidth/outerHeight less innerWidth/innerHeight and demanded retail outer == asked. outerWidth and
outerHeight are whole CSS pixels (Firefox nsGlobalWindowOuter::GetOuterSize returns RoundedToInt(GetSize() / CSSToDevScale), nsGlobalWindowOuter.cpp:3573 in the engine tree), innerWidth and
innerHeight are fractional, so the frame read that way is off by up to half a CSS pixel, and a content area of an odd number of device pixels at a scale of 2 (558.5 CSS = 1117 device) has no
outer size that reads back as asked. Candidate 46792115974: linux dpr2.0 asked outer [800, 558.5], answers outer [800, 559] and inner [800, 558.5] = ours; windows dpr1.25 asked [1548.4, 829.2],
answers [1549, 830]; linux dpr1.25 and dpr1.5: the frame from the whole outer less the fractional inner made the retail inner 0.4 and 0.33 CSS smaller than ours (a real mismatch).

RetailSession.set_inner_size reads the window frame in device pixels in one chrome script (nsIBaseWindow.getSize less the content area times the scale) and sets the window to ours' inner
size plus that frame (CONTENT_JS). run_retail_twin keeps the inner equality as the hard control (BROKEN CONTROL when the inner sizes differ); the outer readback is no longer a condition.
Nothing about ours changes. Unit tests: the odd device height at dpr2.0 is not broken when inner is equal, an inner that differs is broken; red on 674ba823, green here.
Unit rows: +6 tests (4564 linux, 4576 windows).
2026-12-02 06:50:50 +01:00
feder-cr b165ac7e90 tests: TEMP evidence, the plant and the page's own read of the getters of the handle test run on retail and on ours, side by side
The control of test_a_client_call_on_a_handle_reads_none_of_the_getters_the_page_planted fails before
any client call on candidate 46792115974 (linux.3, windows.3): properties off the prototype chain
count 1, properties on it count 0. This test runs the same pages and the same plant and read on retail
Firefox 159 (Marionette) and on ours, and saves per property the count, where it is defined before
and after the plant, and a second read, in the evidence folder. It asserts nothing about ours.
It is the second file of the row wrapper.e2e.stock_twin.tooltip (min_tests 5) and a named exclusion of the
whole-suite rows (29).
2026-12-02 06:50:39 +01:00
feder-cr c1c0a84214 tests: a password field of 40 characters is as wide as on retail Windows (the engine masks with U+25CF, not '*'), the retail width extracted from the capture by a script
- test_a_password_field_is_as_wide_as_on_retail_windows_e2e.py: the page of the retail capture, byte for byte (tests/data/password_mask_page.html), read in the product launch (seed 4, scale 1): the scrollWidth of a password field of 40 x "a" in Arial 16px must equal the retail value, on Linux and Windows. Red where the widget layer masks with '*' (249 px against 387 px).
- scripts/extract_retail_password_mask.py writes ci/retail-password-mask.json from the capture (result.json and meta.json, sha256 checked, page sha256 checked); nothing is typed.
- test_the_retail_password_mask_width_is_extracted_from_the_capture_not_typed.py: the extraction on a small sample, known-bad captures refused, the e2e test holds no number (8 unit cases).
- ci/required-suites.json: the e2e in wrapper.e2e.suite.linux.3 (394) and windows.3 (297); the unit file in wrapper.unit.all.linux (4566) and windows (4578).
2026-12-02 06:49:05 +01:00
feder-cr 674ba82359 tests: the login list not open before the click on #user ends, or before the press on #pass, is a broken control, not a finding about ours 2026-12-02 06:32:59 +01:00
feder-cr 7ee01460c3 tests: the login autocomplete case is launched with signon.rememberSignons true, as a default Firefox, since -marionette sets it false, and its failure message prints the pref 2026-12-02 06:32:13 +01:00
feder-cr 476da7c8d0 Merge commit 'eb052e74397795bf8588be1d6e72f8034fb87e06' into e72/r5-wrapper 2026-12-02 06:30:35 +01:00
feder-cr eb052e7439 tests: the fontconfig rules of the host enter through /etc/fonts/local.conf, since the core owns XDG_CONFIG_HOME
The test of the fontconfig rules (E1) injected each launch's rules through $XDG_CONFIG_HOME/fontconfig/fonts.conf and held the precondition that
XDG_CONFIG_HOME reached the engine (/proc/<pid>/environ). The core now points XDG_CONFIG_HOME and XDG_CONFIG_DIRS of the engine at empty folders of
its own, so that route no longer reaches the engine.

Now each launch writes its rules to /etc/fonts/local.conf with sudo (the e2e job runs on ubuntu-24.04 runners with passwordless sudo: e2e.yml
already uses it) and puts the original file back, or removes it if there was none, when the launch ends. The positive control stays: fc-match on
the host, in the environment of the test process, must obey each rule, or the launch fails. The engine-environment precondition is replaced by that
control. Every pixel assertion is unchanged: same launches, canvases, families, sizes and hashes compared with launch 1, plus the system-ui
assertion. Same three tests, same ids.

Why this is not a weakened test: the source of the test changed, not its bar. The test's route (the user's XDG config folder) is no longer a
route a host can use on the new engine, because the core owns that variable; the system-wide file is where a host can still put a rule, and the
test reads the same effect there. The check that the rule is in force in fontconfig itself is kept as the host control, and a rule fontconfig
does not apply still fails the launch.

The row note of ci/required-suites.json and the docstring of the host-files test say how it is now.
2026-12-02 03:25:15 +01:00
feder-cr c8b3b086fa tests: the datalist twin runs in the leg of the dnd twin (a 2-minute leg), so no new leg is needed in the series' gate matrix 2026-12-02 00:59:07 +01:00
feder-cr 5e4adfbcfa tests: a press outside the open list of a datalist ends as on stock Firefox (stock twin, 4 scales, list open asserted in chrome on both) 2026-12-02 00:57:28 +01:00
feder-cr f73432d5ed tests: the timer the client's evaluate starts in the timer-callback frames test is a reviewed stimulus (the callback's stack and caller are what it asserts), debt 0 2026-12-02 00:13:55 +01:00
feder-cr 03dde48c06 tests: a click on the password field under the open login autocomplete list reaches the page and opens no tab
The login list (#PopupAutoComplete) opens by itself on a username field and covers the field below it. Stock Playwright sends the press to the page through it; an engine whose door lets the list take part put the press on its insecure-login warning row, which opens a tab. The e2e opens the list with a click on #user (read from the chrome, so the case cannot pass for nothing), clicks #pass, and asks for the whole click and the focus on #pass and for the number of pages to stay as it was. Three scales; added to linux.2 (460 to 463) and windows.2 (324 to 327).
2026-12-02 00:12:26 +01:00
feder-cr e9d4f95d54 tests: the listeners of the client's evaluate are fired by the page when the test clicks a trigger, not from a timer of the page 2026-12-01 23:51:09 +01:00
feder-cr 728bcbe5d7 tests: print the launcher registry values and the Firefox Launcher event log entries when the first-launch test fails
Diagnostic output only: the assert expressions are unchanged, the evidence is
appended to their messages. It never raises.
2026-12-01 23:19:01 +01:00
feder-cr 633b72bbcf Merge branch 'e72/fontconfig-candidate' of https://github.com/oss-invisible/playwright into e72/r5-wrapper
# Conflicts:
#	ci/required-suites.json
2026-12-01 23:17:20 +01:00
feder-cr 516edfc15c tests: the retail window of the select and tooltip twins gets the content area of ours plus its own frame, not the outer size of ours
Ours is a real window with the frame of a Windows window; the retail reference has the frame of its own system, so the same outer size gave a different content area and both
legs ended BROKEN CONTROL (candidate run 46711902888: Linux outer 1936x1040 -> retail inner 1936x1040 against ours 1920x1032; Windows at 2.0 retail inner 805x561 against ours 800x558.5).
run_retail_twin now asks the outer size of ours, reads the retail frame (outer less inner) and asks ours' inner size plus that frame; a fractional size is set from chrome scope in
device pixels. The inner-equality control and the outer check are unchanged. Unit rows: +8 tests (4528 linux, 4540 windows).
2026-12-01 22:40:20 +01:00
feder-cr a3e647bf2f tests: the page-bytes reference holds Windows 11's Highlight and SelectedItem, rgb(0, 120, 212)
Source: retail capture run 46676225172 (windows-2025 10.0.26100.33828): retail Highlight and SelectedItem rgb(0, 120, 212); GetSysColor(COLOR_HIGHLIGHT) #0078D4; Control Panel Colors Hilight 0 120 212; aero.theme 0XC40078D4. The core declares it since core PR 376.
2026-12-01 22:39:24 +01:00
feder-cr fee389c299 ci: the unit rows count the 30 cases of test_fontconfig_host_files_criterion.py (4529 linux, 4541 windows)
Source: the file's own collected cases (pytest --collect-only: 30), added to the rows of 029eb855 (4499, 4511); candidate run 46711856312 collected 4529 and 4541, the rows had been raised by 25.
2026-12-01 22:39:18 +01:00
feder-cr db40654e73 tests: the popup move/resize test expects what retail reads (inner width 501 after resizeBy(0, 0) at 150%), extracted from four capture rounds, not typed 2026-12-01 22:32:47 +01:00
feder-cr 1c8c1bcbe7 tests: the retail numbers of the maximized-window popup test are extracted from the capture by a script, not typed (outer width at scale 1.5 was 514, retail reads 515) 2026-12-01 22:04:32 +01:00
feder-cr 8805cb8978 tests: the control of the import() case runs from an inline script, so its referrer is the document as the evaluate's 2026-12-01 19:56:59 +01:00
feder-cr 185c386b79 tests: a non-Error thrown by a listener of the client's evaluate and an import() of its code name no location of its world and ask like the page's own 2026-12-01 19:56:05 +01:00
feder-cr bee003ef27 tests: a violation the client's evaluate causes and an error thrown by a listener it registered name no location of the client's world 2026-12-01 19:53:12 +01:00
feder-cr 4ba9c5e4e4 tests: the atoms, sent raw, call nothing of the page's wrapped methods and getters, or are seen with page frames and a null caller only 2026-12-01 19:48:40 +01:00
feder-cr 365f7da7e3 tests: a page function called by the client's evaluate, a timer it starts and a click it makes see only the page's own frames in their stacks, and a thrown error still reaches the client 2026-12-01 19:47:03 +01:00
feder-cr b60a2a89c5 tests: an exposed function reads the getters of its argument as the page's own clone does, and a client call on a handle reads none of the getters the page planted on what each PageAgent block reads 2026-12-01 18:56:42 +01:00
feder-cr 27374a6a8f tests: the page's own Error.prototype message and stack getters are not read when an evaluate throws or rejects, and the client still gets the message 2026-12-01 18:44:17 +01:00
feder-cr d667c6b55d tests: the page's own RegExp and Date Symbol.hasInstance are never called while the client listens to console events, in linux.3 and windows.3 2026-12-01 18:40:49 +01:00
feder-cr 2df8b8f773 tests: the host's fontconfig reaches neither the text pixels nor the screenshot, and no fontconfig file of the host is opened (Linux e2e)
- test_the_host_fontconfig_rules_do_not_reach_the_text_pixels_linux_e2e.py: rules in the user's own fontconfig config (rgba none and bgr, lcdfilter none, embeddedbitmap off, autohint, hintfull without antialias, a strong system-ui prepend) leave the pixel hashes of the opaque and the default canvas, and system-ui's family and widths, as they are with no rule; fc-match proves each rule is in force.
- test_no_fontconfig_file_of_the_host_is_opened_and_the_screenshot_draws_the_bundle_linux_e2e.py: with poisoned caches in HOME and XDG_CACHE_HOME, no browser process opens /etc/fonts, a fonts.conf or a fontconfig cache, and the screenshot of a bundled face equals the content's drawing.
- test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py keeps its ids and asserts the 72's engine: no fontconfig cache is written or read. It retires after the 72's release.
2026-12-01 13:14:43 +01:00
feder-cr 029eb855e7 headless: the server API never starts the browser with -headless; headless=True is a real window on the hidden display 2026-12-01 11:43:58 +01:00
feder-cr eed0facf61 headless: INVPW_TRUE_HEADLESS is retired and refused at launch
The product always runs a real browser window on a hidden display. Setting the variable now stops the launch (sync, async and the server) with a clear error, before the network, a display or a browser starts. The true-headless branch of _resolve_headless is gone.
2026-12-01 11:43:57 +01:00
feder-cr 063222b682 tests: screen.left, screen.top, screen.availLeft and screen.availTop read 0 at every scale, on both systems 2026-12-01 11:43:44 +01:00
feder-cr 675ca17161 wrapper: a page or context made with no_viewport=True is not pinned to the declared viewport, as in Playwright; the declared geometry is merged by one helper for the launchers and the served browser, and the engine gets no default viewport for it 2026-12-01 11:43:43 +01:00
feder-cr 7b5a7fd182 tests: the main window with no viewport reads the retail inner and outer sizes at every scale, on both systems 2026-12-01 11:43:43 +01:00
feder-cr 685db8ffb7 tests: a click on a page element under an open notification panel reaches the page (the door must not hit-test an arrow panel); the select rollup file counts three more on each system 2026-12-01 11:07:53 +01:00
feder-cr ca6f2bef5b tests: an e2e test fails when its browser writes that a release went on without its press handled 2026-12-01 11:07:53 +01:00
feder-cr 4ebb18c26a ci: the unit rows count the persona cover's screen-size test (one more on each system) 2026-12-01 10:14:54 +01:00
feder-cr 6017f94910 tests: every fixture whose bytes a test pins is -text, so Windows checks it out byte for byte; a check holds every pinned fixture to it 2026-12-01 10:14:25 +01:00
feder-cr 62d623a816 udp: a command that waits answers from a thread of its own, so four proxied contexts leave the transport workers free 2026-12-01 07:45:59 +01:00
feder-cr e1ef053355 udp: a context proxy being measured holds up no other command of the served browser 2026-12-01 07:15:00 +01:00
feder-cr 2ea8c602e5 udp: one exit cache per served browser, as the core's browser keeps one 2026-12-01 07:13:06 +01:00
feder-cr 3ebc864346 tests: an e2e test fails when its browser writes the expired popupshown wait
A tee in front of the core's reader of the browser output matches the engine's warning line; the conftest installs it for every e2e test and the teardown fails naming the line. The unit rows go up by the five tests of the new file.
2026-12-01 06:09:59 +01:00
feder-cr e5798ba80c tests: a press and a release at once on a select reach the page as retail does, and the contextmenu of a right click follows its release
The select case is the second press of the retail double click with nothing between the press and the release; the suite minimum of the two rows that hold the file goes up by the three scales.
2026-12-01 06:09:46 +01:00
feder-cr f0a2a8d304 popups: a popup the engine did not pin is told no viewport, and the hand reads its window when it plans
page.viewport_size of a popup under the declared default is None, as for a
page whose viewport is not emulated. The size the hand plans inside is read
from the window at the time of use, since a popup can still change size after
its first script. A size the client sets on the popup pins it again.
2026-12-01 06:09:33 +01:00
feder-cr 7cc5a4494a popups: a popup that names no size is left to its own window under the declared viewport, and pinned to one the user chose
The session marks the viewport of its defaults as the core's; a viewport the
user passes replaces it. The server sends the mark to the engine as
isDeclaredDefault of Browser.setDefaultViewport and never to the client. A popup
the engine did not pin tells the client the size its window has.

Tests: unit for the mark, the engine command and the size a popup is told; an
e2e case for a popup with no size under a user viewport. Both are in the suite
rows.
2026-12-01 06:09:33 +01:00
feder-cr 6b5f5c78a0 tests: the webgl ranges are checked as Float32Array of the page's own realm, with DEPTH_RANGE as the control 2026-12-01 06:09:33 +01:00
feder-cr 9437e06399 persona cover: the screen size test reads the formula from the core's screen profile, not from a copy of the taskbar 2026-12-01 05:22:07 +01:00
feder-cr 2d0620e33e persona cover: the screen size in device pixels is derived from the screen dimension
zoom.stealth.screen.device_width and device_height are the panel's work area plus the taskbar
(the core declares the screen as the whole panel and the work area as the screen minus the
taskbar). They were left unclassified, so every recompute of the cover stopped. A test checks
the formula over many seeds and scales.
2026-12-01 05:20:52 +01:00
feder-cr 6aebe0eb15 ci: the crash-record parser of the known-defects judge says it moves to the core, and the list says it is read from main once main holds it
The parser lives in one place next to the core's matcher after S1, fetched by sha, so the series and the wrapper share it. The list of the wrapper under test is read only until the wrapper's main holds the first row; then it comes from main, so a branch cannot excuse its own crash.
2026-12-01 02:45:08 +01:00
feder-cr 039c2e8bdc ci: the wrapper's list of known Mozilla defects holds D31, the FSBroker crash at the exit of a -backgroundtask process of Firefox 159
ci/mozilla-defects.json has the one row seen in run 46539190316 (process
backgroundtask, phase exit, thread FSBroker, the MOZ_CRASH reason, no frames:
the top frames are libc's and an unsymbolized libxul address, which depend on
the runner), for Firefox 159.0 to 159.*. The core's matcher accepts the file
for 159.0 and 159.0.1 and refuses it for 160.0. Four cases check that and that
the A/A judges the core of the real run with this list; the unit suites count
them (4443 on Linux, 4455 on Windows).
2026-12-01 02:36:33 +01:00
feder-cr c4d5ffe903 ci: the cores a browser leaves are judged against the known Mozilla defects with the core's matcher; the A/A reports a matched crash by its D<n> and is not red
scripts/ci_crash_evidence.py: every core the probe finds becomes a crash record
(process from the `Core was generated by` line, with the cut-line rule; thread
from gdb's header or %e of the core's name without its instance number; frames
of the crashing thread; the MOZ_CRASH reason; phase exit or run from the moment
the launch began to close the browser, recorded in the launch entry before the
original close runs). exit_problems judges the cores of a launch whose parent
ended with 0 with the core's main matcher (MOZILLA_DEFECTS_CHECKER, else
fetched once from main by sha) and the wrapper's ci/mozilla-defects.json for the
Version= of the application.ini beside the binary. The judge is closed: no
matcher, no API, no list or no version keeps every core red and says why. A
launch whose parent did not end with 0, a minidump, a core with no record and a
caller that does not say whether its measurements are complete (None) stay red
exactly as before.

scripts/ci_ab_oracle.py: only the A/A control (the two dumps of the published
engine) judges; its measurements are complete when the dump ended with 0 and
every asked visit has its result and no tab died (visits_complete). A matched
crash is a note, printed and kept in diff-a-a.json.

Tests: test_known_mozilla_defects_in_crash_evidence.py (64 cases, the real gdb
text of the FSBroker core and a copy of the matcher with its sha256); both
unit suites count them (4439 on Linux, 4451 on Windows).
2026-12-01 02:35:59 +01:00
feder-cr 73add864d3 tests: a popup with a position and no size opens normal at the stored size, at the retail position, at the four scales
window.open with left=100,top=100 and with left=5000,top=5000 from a maximized
main window whose state is stored: the popup reads the retail inner and outer
sizes and screenX, screenY (Firefox 159 on Windows, measured), in its first
script and at load. The two suite rows holding the file count eight tests more.
2026-12-01 02:04:38 +01:00
feder-cr 49838e1df3 tests: a popup of a maximized main window reads the retail inner, outer and visual viewport sizes for six feature strings at the four scales 2026-12-01 00:55:58 +01:00
feder-cr 66530eadba tests: a stencil mask wider than the stencil bits reads back whole, the four masks after each write on a fresh WebGL1 context 2026-11-30 23:50:35 +01:00
feder-cr 49f9ac900c tests: a press or a wheel with a popup open follows the platform's rollup, no popup outlives its page, the WebGL ranges are Float32Array
A real press, release, double click, right press, wheel turn or item press while a select dropdown, a datalist list or the page context menu is open reaches the page as retail Firefox 159 on Windows measured it, at the scales 1, 1.25 and 1.5, in the top document and in a frame of another site. Closing a page with a dropdown, a context menu or a datalist list open leaves no popup open and no browser element with pointer-events changed. The declared aliased line width and point size ranges are Float32Array of the page. The two new files are in the second whole-e2e rows of each system (447 on Linux, 318 on Windows).
2026-11-30 21:07:32 +01:00
Federico Elia a0d7c627a6 Merge pull request #633 from oss-invisible/ledger/0.61.0
record 0.61.0 as published
2026-11-30 16:52:48 +01:00
feder-cr 704fd5f98c record 0.61.0 as published 2026-11-30 12:28:40 +00:00
Federico Elia 262937350f Merge pull request #632 from oss-invisible/release/0.61.0-firefox-71
release 0.61.0: engine firefox-71, core 71.85.0
2026-11-30 10:01:32 +01:00
feder-cr 50cda456cb release 0.61.0: pins invisible-core 71.85.0 (engine firefox-71), the core release whose proof reads main's retired tests; persona seeds and the gate lock for that core 2026-11-30 02:39:56 +01:00
feder-cr ce913bbf4b release 0.61.0: pins invisible-core 71.84.0 (engine firefox-71); persona seeds and the gate lock for that core 2026-11-30 00:40:08 +01:00
feder-cr a6fe4ea53b release 0.61.0: version and changelog (engine firefox-71, core 71.84.0) 2026-11-29 22:29:07 +01:00
feder-cr 34f02cdcdc ci: the unit suites count the five cases of the drag twin's frame rule (4375 on Linux, 4387 on Windows) 2026-11-29 22:02:46 +01:00
feder-cr a3ff6087f1 tests: the move with a button down starts outside the context menu that the right click left open
Juggler closes a menu on a press only, as the platform does, so the context menu of "frame right click" is still open at the next action. Its first move, to (300, 200), lay over the menu and the page never saw it, on retail or on ours. The points of "move with button down" are now left of and above the right click's point, inside the iframe and on its button; the press of the action closes the menu. The expected event list is unchanged.
2026-11-29 19:59:52 +01:00
feder-cr d7b0cb8638 tests: the dropdown test waits for the trusted mouseup and click that the page gets after a release the parent handled alone
A release that the parent handles in chrome (the select dropdown is open) is answered without the content ack. On retail the page then gets a trusted mouseup and click on the select, dispatched by SelectChild after the parent's Forms:MouseUp, asynchronously. The pages of the stays-open test record both on the select, and the test waits for them in the page's own log with the deadline of the file (never assuming they arrived when the call returned), in the top document and in the frame of another site. What the tests already assert is unchanged. The negative control (popup hidden between the press and the release) does not wait for them.
2026-11-29 19:59:52 +01:00
feder-cr 66a682cfe6 tests: the back-forward cache bench leaves the page when the frame's report request is over, not when the server has recorded it
The frame page /shown sent its pageshow report with a fetch, and the test left the top as soon as the server had recorded the report. The response was still on its way, the fetch was still in the frame's load group, and Firefox refuses the back-forward cache for a page left with a request in flight (BFCacheStatus::REQUEST, CanonicalBrowsingContext::AllowedInBFCache): both reports came with persisted=false. Stock Firefox does the same, and the product never promised the cache for a page left like that.

The page keeps the request in window.__sent; the test waits in the frame until it settles (the request is over, so the frame's load group is empty), then leaves. The sequence is a helper with the condition to leave on ("finished" or "recorded"). The server fixture gets a knob that holds the first pageshow response for 2 s after recording it, and a new e2e runs the sequence with the knob on: the old sequence (leave on "recorded") with the knob is the red case, which runs on the candidate; the new one is green.

e2e rows: wrapper.e2e.suite.linux.2 419 to 420 and wrapper.e2e.suite.windows.3 276 to 277 (+1 each).
2026-11-29 19:59:23 +01:00
feder-cr 1717c2063c tests: the drag twin declares the top's leave into an in-process frame and the dropEffect of the frame drop
In the drop in a frame of another site, two fields of the top document depend on stock's frame
being in its own process model: the top's dragleave whose element under the cursor is the frame
(stock's event manager fires a leave at the body when the cursor enters the subdocument; retail
with the frame out of process and ours have none), and the dropEffect of the top dragend (the
frame's drop result, which crosses processes). Before the comparison they leave top.once for
top.into_frame and top.dragend_effect, both declared IN_PROCESS_FRAME, so the event lists line up
and the rest of the top is still compared. In the drop in the top document the record is compared
whole, dragend's effect included. split, compare, recorded and verdict take the kind of the drop.

The frame page of the twin was served raw with height:100%%, an invalid length, so body had height
0 and the twin read html where retail reads body; it is height:100% now.

The unit test of the twin gets the leave under the frame in its frame fixture, a case with stock
leave and copy against ours without it and move (green, recorded as declared), and the same
dragend effect difference in the top drop (red).
2026-11-29 19:56:25 +01:00
feder-cr 5ea88e57d5 tests: a select dropdown stays open after the release, and a context menu closes on the next press with no input call hanging
Menus are closed by the platform on a press outside them and on the wheel (nsWindow::DealWithPopups), not on a release or a move. Per place (select of the top document, select of a frame of another site): press, wait for the popup to be open, release, and the state read over the next second must be open at every look; a chrome hidePopup between the press and the release is the negative control and must read closed. The pages and reads are those of the select twin, imported.

One more e2e for the case an unguarded call in the input path was there for: a chrome context menu that captures the mouse. A right click opens the chrome context menu, then moves across the page, a left click elsewhere and a move again must each return (each duration is in the message of a failure), and the menu is closed after the press of that click.

Red on an engine whose input closes menus on a release or a move: the dropdown reads closed after the button went up. e2e rows: wrapper.e2e.suite.linux.2 414 to 419 and wrapper.e2e.suite.windows.2 286 to 291 (+5 each).
2026-11-29 16:47:15 +01:00
feder-cr b7ef739d56 tests: the intersection twin does not compare the box of a frame that is fully out of view with stock
In Mozilla's code a fission frame scrolled fully out of view reads an empty boundingClientRect: DOMIntersectionObserver.cpp 792-794 returns early when there is no in-process root frame, after the transform chain HitTestingTreeNode.cpp 298-328, BrowserChild.cpp 3751-3778 and UnitTransforms.h 343-351; Mozilla's own web-platform meta (cross-origin-iframe.sub.html.ini) marks that step FAIL under fission. Stock's frame is in-process, so it reads the rectangle. The declared list of the twin now has the box of the steps all above and all below (in-process frame in stock); the box of the steps where the frame is in view and every other field stay compared, and the retail capture decides the declared ones.

Red on the old list: the declared-list test and the two out-of-view tests fail with nothing declared. unit.all rows: +13 (Linux 4370, Windows 4382).
2026-11-29 16:39:04 +01:00
feder-cr 23548f5822 tests: the select twin records the window's activation and focus at the click
For each select the record now has, before the click and right after it: chrome Services.focus.activeWindow === win, win.document.hasFocus(), the browsing context's isActive (win.gBrowser.selectedBrowser.browsingContext.isActive), the top content document's hasFocus() and visibilityState, and the driver's ack of the click when it keeps one. A popup that does not open for a window that was not active is then told apart from a popup at the wrong place. A read that fails is recorded and never raised.

Red on the old code: the six new tests and the existing ones that use the fake chrome fail without the read. unit.all rows: +6 (Linux 4357, Windows 4369).
2026-11-29 16:27:40 +01:00
feder-cr 5f58bdf808 tests: a field that depends on stock's frame being in-process is recorded, not compared with stock
Stock Playwright's Firefox sets fission.webContentIsolationStrategy=0, so its cross-site frame shares the top's process, and its drag is Juggler's synthetic one (no OLE loop). A field that depends on either is not what stock reads, and the retail capture decides it.

_stock_twin.split_differences splits the differences of a twin by a declared list per twin (a pattern of canonical paths and one of two reasons: in-process frame in stock, synthetic drag in stock); a declared field that differs is recorded (recorded_differences in the report) and a field that is not declared and differs is red.

The drag twin declares the buttons, drag at the source (count and presence), the dragend point less the last drag, and in the frame effectAllowed, dropEffect and mozSourceNode; routing, targets, client points, rel, types, trusted, the input source and the effects of the top document stay compared. The intersection twin has the list and declares nothing yet (moving boundingClientRect is one line).

Red on the old code: the new tests fail at their import of the declared list and of split_differences. unit.all rows: +43 (Linux 4351, Windows 4363).
2026-11-29 16:26:35 +01:00
feder-cr e0273aac56 tests: the retail driver's synthesized input reaches a frame in another process
SEND_JS called Window.synthesizeMouseEvent without isAsyncEnabled. With the webidl default (false) the event goes through widget->DispatchEvent and never through APZ (nsContentUtils.cpp 10552-10560 at FIREFOX_159_0_RELEASE), has no layers id, and EventStateManager::DispatchCrossProcessEvent falls back to the top process (EventStateManager.cpp 2199): a frame in another process never got the move or the click. The options now carry isAsyncEnabled: true, Mozilla's own mechanism (EventUtils.js asyncEnabled).

A static check reads every synthesize call of code that runs on retail or stock Firefox and is red when its options literal lacks isAsyncEnabled: true. Red on the old SEND_JS (two tests of the file), green on the new.
2026-11-29 16:22:44 +01:00
feder-cr 622f0d3eaf tests: the drag twin records every drag event the page reads, for a drop in a frame and for a drop in the top document
The twin of the drag kept a few numbers (the count of dragstart, the drop target and the client
point of the drop, the end point less the last drag point) and only for a drop in a frame of another
site. A dragenter at the wrong element, an empty dataTransfer, a dropEffect of none or an untrusted
event read as the same as stock's, and a drop in the top document was not covered at all.

Now both pages keep every event they hear (dragstart and drag at the source; dragenter, dragover,
dragleave and drop where the drag goes; dragend at the source) with its type, target id, the id of
the element under the cursor, client and screen points, buttons, mozInputSource,
dataTransfer.types, effectAllowed, dropEffect, mozUserCancelled, whether mozSourceNode is null and
isTrusted, plus the count of drag events at the source and the dragend point. The same test does
the drag twice on a fresh page, once ending in the frame and once in the top document, on stock
and on ours, and the verdict prints both records whole.

Ours is compared with stock exactly in every field that is the same on every machine; in one CSS
pixel in a client point (the tolerance the drop point already had); and through the relation of the
screen point to the client point, because screenX/Y is where the window stands (real on stock,
declared on ours). The counts of dragover and of drag events are recorded and not compared: retail
fires both from a timer (OLE calls DragOver periodically, and nsNativeDragTarget fires drag at the
source each time). What is compared is that drag fired at the source at least once on both sides.

Regression test (54 tests, no browser, fake pages): red on the old files (the module of the record
does not exist and the old twin has no DROPS or recorder), and red on each mutation of the
comparison. In the two unit rows: 4250 -> 4304 on Linux, 4262 -> 4316 on Windows (collect-only on
the row's files). The e2e row keeps its 4 tests.
2026-11-29 14:16:39 +01:00
feder-cr e0e620e8d5 tests: a select twin that fails says where it clicked and what the geometry was, and every case leaves its numbers
The steps of the select twin said "the dropdown did not open after a click on the select of the
frame document" and nothing about the click, so a red case at one display scale could not be told
from a wrong point, a wrong scale or a window that moved. Now, for each select, every failure of the
steps carries: the click point (CSS, and the point the driver sent with its unit and its device
point), the scales record, the select's box in its own document and the frame element's box in the
top document, mozInnerScreenX/Y of the top and of the frame, and the popup's state after the click,
at the deadline and at a second look. The verdict of the twin prints both browsers' records whole.
The same record is written for every case, red or green, to
$RUNNER_TEMP/invpw-evidence/popup-diagnostics/<case>-<browser>.json, the folder the jobs upload, so
a green run leaves the numbers to compare with a red one. A read of the diagnosis that fails is
recorded in the record and never replaces the finding.

The drivers keep the point they sent (last_click), and the retail driver reads a frame through
Marionette and is back in the top document when the read ends or fails.

Regression test (13 tests, no browser, a fake driver): red on the old files (11 of the 13 fail on
the old steps and drivers, the module of the record does not exist). In the two unit rows: 4237 ->
4250 on Linux, 4249 -> 4262 on Windows (collect-only on the row's files, not OS-specific).
2026-11-29 11:09:11 +01:00
feder-cr a7f84eded4 tests: the intersection twin routes the page of its frame again, and a check reads every page a test asks the fake sites for
The frame of the intersection twin is sites.url("B", "/io") and nothing routed B /io: the route was
dropped in an earlier commit and _register did not get it back. The fake sites answer an unrouted
path with a 404 and an empty body, so the frame had no #t and IntersectionObserver.observe threw.
_register routes B /io (FRAME_IO, which was defined and unused) again.

Regression test (9 tests, no browser): in every test module that builds Sites(), each
X.url(site, path) and each wait_frame/frame_of that names a site and a path has an X.route for it
in the same module; a computed part of a path is a wildcard on both sides; one exemption (the
expected scope of a service worker, compared and never requested) is listed with its reason and is
itself red when no call uses it any more. Red on the old file: the module without the route reads
B /io asked and not routed (two lines: the page of A and the frame lookup), and a snippet of the same
shape; green with the route. In the two unit rows: 4228 -> 4237 on Linux, 4240 -> 4249 on Windows
(collect-only on the row's files: 4240 before, 4249 after).
2026-11-29 11:01:13 +01:00
feder-cr 06c2428572 tests: the retail twin sends its input with Window.synthesizeMouseEvent, and a check reads every chrome call against Mozilla's sources
The four cases of wrapper.e2e.stock_twin.tooltip died on the engine candidate with "win.windowUtils.sendMouseEvent is not a function": Firefox 159 has no
nsIDOMWindowUtils.sendMouseEvent, its chrome input is Window.synthesizeMouseEvent. SEND_JS of the retail reference now calls
win.synthesizeMouseEvent(type, x, y, {button, clickCount, modifiers, inputSource}, {ignoreRootScrollFrame, isDOMEventSynthesized}), with Mozilla's own field names
and the same offsets (CSS pixels of the browser window).

Static check, no browser: scripts/extract_mozilla_chrome_api.py reads nsIDOMWindowUtils.idl and Window.webidl at the release tag into ci/mozilla-chrome-api.json
(path, tag, commit and sha256 of each source; what only our engine tree has is listed apart under "ours"). tests/test_the_chrome_calls_of_the_tests_exist_in_firefox.py
scans the strings of every test and script for windowUtils.<name>, .synthesize<...>( and the keys of the dictionaries those calls pass: a name that no Firefox
has is red, a name only our engine has is red in code that runs on retail or stock Firefox. Red on the old SEND_JS (sendMouseEvent is not in 159), green on this
one. The extractor has its own unit test on a small IDL and WebIDL sample.

Both files join wrapper.unit.all.linux and wrapper.unit.all.windows, min_tests raised by 18 each (12 + 6).
2026-11-29 10:40:14 +01:00
feder-cr 3e082e07d7 tests: the stack watchdog's log lands in the evidence folder that every job uploads
INVPW_TEST_WATCHDOG_FILE is set only by the wrapper's own e2e workflow, so a run of the gate
wrote the stacks of a hung test to the temporary folder, which nothing uploads, and they were
gone with the runner. With RUNNER_TEMP set and no file named, the log is now
$RUNNER_TEMP/invpw-evidence/watchdog/e2e-watchdog.log, inside the folder the gate keeps as
"what the tests saved"; a named file still wins, and off a runner nothing changes.

Regression test (5 tests, red on the old files: the module does not exist and conftest.py
opens the temporary folder). In the two unit rows: 4205 -> 4210 on Linux, 4217 -> 4222 on
Windows (not OS-specific).
2026-11-29 08:59:28 +01:00
feder-cr 3366497f7d tests: the twins open their page before they ask Marionette for a session
The wrapper launches the engine with -silent, so there is no window at start-up, and
Marionette's WebDriver:NewSession is answered only when the browser's start-up ends, which
only a window ends. run_retail_twin and _on_ours created Chrome() before browser.new_page(),
so the session never got its answer and the socket timed out after 300 s (every retail twin
and every stock twin of the engine candidate).

Chrome now takes the page of the launch as a required argument, so the wrong order cannot be
written, and both twins open the page first. scales() reads that page.

Regression test (red on the old files, 4 of 9 fail): an ast scan of every test and script
refuses a function that asks for a session before its first new_page; the scan is itself
proved on the old order; a fake Marionette that answers NewSession only once a window exists
shows _on_ours and run_retail_twin get their answer. In the two unit rows: 4196 -> 4205 on
Linux, 4208 -> 4217 on Windows (9 tests, not OS-specific).
2026-11-29 08:59:28 +01:00
feder-cr aaf5863598 ci: the host oracle takes each side's own install folder as that side's own package, and the row of the graphics probe is out of the file
Engine final candidate (run 46227711139), ab_host on Linux, two defects of the harness:

1. DIFF on invisible_core/branding/official/branding.zip: <published set venv>/site-packages/... on the published side, <hostedtoolcache python>/site-packages/... on the candidate's.
   Each side's engine reads the branding of ITS OWN core, in the folder that core is installed in, and since the control side is the published set (0b23228e) the two folders
   differ. The classifier knew one own package, the folder of the engine. It now also knows the install folders of the python that runs the side (ci_ab_host.install_folders:
   sysconfig's purelib and platlib, the link and the real folder; the side's launch runs in that side's python), in the same class `package`, so the same read is the same
   file of the package on both sides and no path is named. Anything else stays the host's and red: the other side's folder, the python's own library under the same prefix,
   a sibling folder that only starts with the same text, any path declared nowhere.
2. FAIL the declared difference 'gfxtest-69' ... is stale, remove it: the published engine is the 70, which no longer spawns gfxtest either. ci/ab-host-expected.json declares nothing.
   The mechanism of a declared `proc` difference is tested with the row as a row of the tests' own (tests/_ab_host_declared.py), and a test takes the run's case as data: a row that
   does not show is red as stale, in the wording of the run, and the same run is green against the empty file.

tests/test_ab_host.py (+10, 9 of them red on the old classifier): the pair of the run is the same package on both sides and no difference; each of five reads outside a side's own
install folder is a difference; the install folders of a process; the stale row. tests/test_ab_oracle.py: the new helper is one of the host oracle's files for a pull request.
wrapper.unit.all.linux 4196 and wrapper.unit.all.windows 4208 (+11).
2026-11-29 08:59:28 +01:00
feder-cr dfd35bb47e ci: the page oracle's A/B allows the differences a release is known to make, declared per os, seed, dpr and leaf, and is red on a row that does not show
Engine final candidate (run 46227711139): ab_oracle was red on Linux and Windows on the same 24 differences, all of them the bar of a main window above the content.
Seed 6 at 1.25: the bar is 106 device px as retail Firefox 159 measures it, the published engine's core said 107; the candidate's core rounds the bar once on the sum in app units
(window_frame.chrome_height_device). Seed 63 at 1.5: the work area is under 720 CSS px, so retail chooses the compact density by itself (browser.js gUIDensity) and the bar is
73 CSS px, not the normal 85 (constants.ui_density, window_frame.chrome_height_device(1.5, 'compact')).

- ci/ab-oracle-expected.json (ab-oracle-expected/1): 48 rows, one per os x seed x leaf of those 24 (Linux and Windows read the same), each with exactly id, os, seed, dpr, leaf,
  published, candidate and reason (the retail source, the core function that produces the value, what the leaf is).
- scripts/ci_ab_oracle.py: the A/B (run, run_ab, compare) allows a difference only when a row matches it exactly (os of the leg, seed, dpr, leaf and both values); any other
  difference is red, and so is a row that does not show in the run (stale: "remove it", the wording of the host oracle). The rows apply to the A/B only: the A/A is judged without
  them. A row of a visit the run did not make (another shard or seed set) is not judged. The rows name no tag: when the published set moves to the release that holds the work, the two
  sides agree, every row is stale and the check forces them out. compare takes --leg (default: this machine's).
- tests/test_ab_oracle_declared_differences.py (16, red on the old judge) with the 24 DIFF lines of the run as data: the old judge is red on them and the new one green with the
  rows; an undeclared extra difference, another value than the row's, another seed, dpr or os, are red; a stale row is red; the A/A ignores the rows; the file's keys and rows.
  tests/test_ab_oracle.py: the fake pages of its tests have no rows (a fixture), the leg of one test is a real leg, and the file of the rows is one of the oracle's files for a pull request.
- wrapper.unit.all.linux 4185 and wrapper.unit.all.windows 4197 (+17: the 16 tests and the case of the new file in the oracle's pull-request file list).
2026-11-29 08:48:49 +01:00
feder-cr 76c33a9e0a tests: the stock browser and the retail reference of the twins get a display from the wrapper's mechanism
The engine gate runs the stock twin rows' pytest without xvfb-run (only wrapper.e2e.suite.* rows get it), and the docstrings said the browsers drew on "the display of the job".
Ours gets a display of its own from the wrapper (make_virtual_display, started per session), so ours drew and stock and retail died on Linux with
"no DISPLAY environment variable specified" (wrapper.e2e.stock_twin.intersection, all four cases).

_stock_twin.OwnDisplay starts the core's make_virtual_display() on Linux (1920x1080x24 Xvfb, access control on), one per launch, and gives the browser's environment its
DISPLAY and XAUTHORITY (the Wayland variables removed), stopped after the browser, also when the launch fails. Stock gets it through the env of p.firefox.launch, the retail
reference through its Popen env. On Windows nothing is made: a stock client cannot be spawned on another desktop. The docstrings of _stock_twin, _retail_reference and the
select and tooltip twins say what is true.

test_the_stock_and_retail_browsers_get_a_display_from_the_wrapper.py (4 tests, red on the old code) is in wrapper.unit.all.linux and wrapper.unit.all.windows, min_tests +4 each.
_fake_stock_playwright.py is the recorder both unit files of the stock twin share.

The exact counts of the two unit rows are corrected by 2: since the published-set commit the two rows were 2 below the real collect (the new published-set.yml workflow adds one case to
test_ci_linux_legs_read_no_mirror.py and one to test_ci_windows_temp_is_on_d.py, which are parametrized by workflow file, and that commit counted only the 36 tests of its own file).
wrapper.unit.all.linux is 4168 and wrapper.unit.all.windows is 4180, as the run of the engine's final candidate collected (4160 and 4172) plus the 8 of the two commits above.
2026-11-29 07:44:35 +01:00
feder-cr ce6db02d36 tests: the stock twins get layout.css.devPixelsPerPx as the string ours gets
The pref is a string pref of Firefox. The stock client sends user prefs through Browser.enable and Playwright's Juggler sets a number with setIntPref, so
the float of the case failed every stock twin launch on Windows with NS_ERROR_UNEXPECTED [nsIPrefBranch.setIntPref], a broken control on all four cases.
Stock now gets the scale from _window_origin.scale_pref, the form the core declares for ours (str(profile.screen.dpr)).

test_the_stock_twin_gets_the_display_scale_as_ours_does.py records the stock launch and compares it with ours composed by the core for each of the four cases
(4 tests, red on the number the old code passed); it is in wrapper.unit.all.linux and wrapper.unit.all.windows, min_tests +4 each.
2026-11-29 07:32:38 +01:00
feder-cr a1711b9802 ci: the published set is installed from published/ only, by hash, checked with pip check, and verify names the file installed
The wheelhouse's own folder holds the candidate's wheels of invisible-core and invisible-playwright,
built from core_ref and wrapper_ref; at an equal version they have the file names of the published
ones. With real pip, two --find-links and --require-hashes take the first local file of a name and
fail on a hash mismatch, they do not choose by hash.

- install: the gate lock's dependencies from the wheelhouse, then the two published wheels from
  <house>/published ONLY (one --find-links per pip call, --no-deps, by the hashes of
  ci/py-lock/published.txt), then pip check over the venv with the set's python: red, with what pip
  reports, when a requirement of the published wheels is not met. The wheel of each package is
  chosen by the sha256 the lock holds (a file with the name and another hash is refused, naming both)
  and recorded with the digest of its package files in <venv>/published-set.json.
- verify: reads that record and the disk. It names the file installed (wheel name, sha256), is red
  when that sha256 is not one the lock holds (naming both), and when a file of the package on disk is
  not, byte for byte, the wheel's. A version says nothing of which file is installed.
- tests (real pip, offline, wheels made with zipfile): the same name and version in the house root
  (the candidate's) and in published/ installs the published one and verify is green; a venv holding
  the candidate's wheels is red naming the file, its sha256 and the lock's; a record that says
  published over candidate bytes is red; a lock naming neither is red; a published wheel requiring
  what the house lacks is red at pip check, the normal house green. 42 tests in the file (+6), the
  rows of the whole unit suite raised by 6.

Red on the old install: the real-pip same-name test fails with pip's "THESE PACKAGES DO NOT MATCH
THE HASHES FROM THE REQUIREMENTS FILE" on the candidate's wheel of the same name (8 of the 42 fail
on the previous script).
2026-11-29 05:52:46 +01:00
feder-cr c4dbbe8faf ci: the stock twin row is four rows, one file and one leg each
The row wrapper.e2e.stock_twin (4 files, 20 tests) ran past the 25 minutes of a leg. It is now wrapper.e2e.stock_twin.dnd (4 tests),
.select (4), .tooltip (4) and .intersection (8), each with the file, the marker, the systems and stock_firefox of the old row, and the old note split by file.
The table of leg fields, the accounting of the e2e suite and the retail reference's messages name the new rows.
2026-11-29 03:54:02 +01:00
feder-cr b916990a33 e2e: a popup moved to the far right stops where retail's does, the capture's numbers per case
The phase ran moveBy(10, 10) and moveTo(99999, 0) in one popup and expected availLeft + availWidth - outerWidth, which is not retail's clamp:
Mozilla's CheckSecurityLeftAndTop uses the outer width rounded by its edges (CSSIntRect::Round), then the device rounding and the read-back.
The phase now runs the sequence of the retail capture (popup_move_resize, retail-window-geometry, Firefox 159.0) and expects the screenX and screenY
retail read after each call, per case, with the derivation for scale 1.25 written next to the table.
2026-11-29 03:50:11 +01:00
feder-cr 0b23228eb8 ci: the control side of every A/B oracle is the published set, as a user installs it
Engine candidate 5 (run 46208549074): ab_oracle, ab_network and ab_host were all red on a BROKEN
CONTROL. The published engine (labelled firefox-68, a tag written in the harness, when firefox-70
was the last published) was launched by the CANDIDATE's core, which no longer declares
zoom.stealth.screen.popup_position, and the engine refuses a launch whose declarations its core does
not emit (rule 7). A pairing no user has.

The control is now the set a user gets: the last invisible-playwright on the index, the
invisible-core it pins exactly, the engine that core's seal pins, in a venv of their own.

- ci/py-lock/published.txt: the set as a hash lock (every file of the two versions, the requirements
  each declares); scripts/ci_published_set.py makes it (resolve), compares it with the index (check),
  installs it offline over the gate's lock from the run's wheelhouse (install) and verifies what the
  venv imports (verify); fetch/tag run BY the set's python: its own core fetches its own engine.
- .github/workflows/published-set.yml: daily and on a pull request that touches the lock, red when
  the committed lock is not the index's last release.
- ci_ab_oracle, ci_ab_host, ci_ab_network: the published side runs in the set's python
  (INVPW_PUBLISHED_PYTHON) with an environment that carries nothing of the candidate's job
  (PYTHONPATH, VIRTUAL_ENV, its seal, its pin switches); the candidate side is unchanged. No tag is
  written in a harness file: the label and the file names (dump-<N>.json, ...) come from the seal of
  the set. A candidate without a set is refused, never run against its own core.
- ci_poison_host: the by-product files are named for the tag of the set as well.
- tests/test_ci_published_set.py (36, in wrapper.unit.all.linux and .windows): the defect on fake
  cores and a fake engine that refuses as rule 7 (red on the old harness with that refusal), the
  three seams, the lock on known-bad inputs, the resolver on synthetic index documents, the install
  commands, no tag written in a harness file.

Red on the old harness: the defect test fails with "stealth: zoom.stealth.screen.popup_position is
not declared by the core candidate-core (rule 7)" on the scripts of df491f2e. The regression
registry of the wrapper is not on this base: its row follows with the registry.
2026-11-29 03:40:21 +01:00
feder-cr df491f2e67 Merge commit '8e342a1378e9da0a8e6340411f42dbe66c39a5ed' into candidate/wrapper-71-final 2026-11-29 01:48:12 +01:00
feder-cr 8e342a1378 tests: the e2e stack watchdog holds the GIL (a Python thread), not faulthandler's dump_traceback_later, whose GIL-free copy of every thread's frames crashed the Windows part 3 worker
Five workers of the Windows part 3 of the e2e died, all on tests/test_fakeweb_p4_e2e.py::test_the_journey_leaves_every_page_only_once_its_noise_is_done, which runs 122-171 s with about 50 threads. tests/conftest.py armed faulthandler.dump_traceback_later(150 s, repeat=True) for every e2e test: a C thread that copies the frames of every thread WITHOUT the GIL (_Py_DumpTracebackThreads, documented "for debug purpose only ... after a segmentation fault, at fatal error") while the process keeps running and the other threads keep changing their frames. Two full dumps of a crashed worker show the process dead inside dump_frame, called from faulthandler_thread, reading a frame another thread was changing.

tests/_stack_watchdog.py is the same watchdog as a Python daemon thread: one per process, reused by every test; arm(nodeid, threshold_s, period_s, file) and cancel(); past the threshold, and then every period until cancelled, it writes "Timeout (h:mm:ss)!" and the frames of every thread (sys._current_frames(), holding the GIL, threads named from threading.enumerate()) to the same e2e-watchdog.log, in the format of faulthandler's dump; nothing to stdout or stderr; nothing after cancel() returns. Known limit, in the module: a thread that never releases the GIL keeps it from writing, which is pytest's faulthandler.enable() at the death of the process. tests/conftest.py calls it in place of dump_traceback_later and cancel_dump_traceback_later (setup, teardown, unconfigure).

Tests (all in the rows of wrapper.unit.all.linux and wrapper.unit.all.windows, min_tests 4061 -> 4116 and 4073 -> 4128, counted with the selector of the judge):
- tests/test_no_file_arms_a_gil_free_thread_dump.py: no .py of tests/, scripts/ or src/ calls faulthandler.dump_traceback_later, or dump_traceback with all_threads true or defaulted (ast, through any import form); pytest's faulthandler_timeout is set in no pyproject, pytest.ini, setup.cfg, tox.ini, conftest string, script string or workflow line (parsers, not text). Red on the conftest of 03425bb8, naming tests/conftest.py and the line, with how to fix and the rule; each form has its known-bad and its green twin. The only exclusion is norecursedirs of pyproject.toml.
- tests/test_the_stack_watchdog_writes_every_thread_after_its_threshold.py: in a child python, a blocked call gets the header and the stack of every thread, a test cancelled before its threshold leaves no dump, nothing is written after cancel (judged on the bytes of the file, waiting on the second test's first dump), the second test reuses the thread.
- tests/test_a_gil_free_thread_dump_kills_a_busy_process_and_the_stack_watchdog_does_not.py: 32 threads churning frames; dump_traceback_later at 1 ms ends the child with a crash status (red on the old mechanism), the new watchdog at a 1 ms period lets it run 6 s (60 times longer) and writes its dumps.
2026-11-29 01:20:27 +01:00
feder-cr 03425bb898 ci: every pytest process of a Windows e2e job clears SEM_NOGPFAULTERRORBOX, so a crashing worker reaches the LocalDumps
#629 sets WER LocalDumps for python.exe in each Windows e2e job, and a crashing pytest-xdist worker still left no dump. The pytest controllers of the runner are born with the
error mode 0x0003 (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX), every child inherits the mode of its parent, and a process with SEM_NOGPFAULTERRORBOX (0x0002) never
invokes Windows Error Reporting, so no worker crash reached LocalDumps.
https://learn.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode

The "Windows Error Reporting keeps a full dump..." step of each Windows job now also exports INVPW_WER_DUMPS=<the dumps folder> to $GITHUB_ENV. tests/conftest.py calls
tests/_wer_error_mode.py in pytest_configure (the controller and every xdist worker run it): when that variable names an existing folder on Windows, the process clears bit
0x0002 of its error mode and keeps the others, and appends "pid <n> error mode born 0x.., now 0x.." to invpw-evidence/dumps/error-mode.log. Nothing is written to stdout or
stderr, and nothing happens on Linux or in a job that did not set LocalDumps.

Tests: the rule test of the Windows jobs (tests/test_every_windows_job_keeps_a_dump_of_a_crashing_python.py) now requires the export in the LocalDumps step of every Windows
job, with the folder of DumpFolder and no other place that sets it (red on the previous e2e.yml, naming the job); a real child python born with 0x0003 (and 0x8003, 0x0002,
0x0001, 0x0000) ends with the born mode minus 0x0002 and leaves its evidence line, and without the variable or with a missing folder the mode is unchanged
(tests/test_every_pytest_process_clears_the_gp_fault_error_box_on_windows.py, a Windows file: only the row of Windows names it, min_tests 4061 on Linux, 4073 on Windows).
2026-11-29 00:34:35 +01:00
feder-cr 67b2ad3188 tests: the table of the leg fields carries the stock_firefox of the row wrapper.e2e.stock_twin, which the gate reads 2026-11-28 22:30:13 +01:00
feder-cr fe50cdc118 e2e: the retail reference gets the outer size of ours before anything is measured and both inner sizes are compared (a difference is a broken control); the launcher and the messages cover the Linux binary (firefox, no .exe, the job's display) 2026-11-28 21:52:21 +01:00
feder-cr e4aa743af3 e2e: the select dropdown and the tooltip are measured against RETAIL Firefox 159 driven by Marionette alone, headed (tests/_retail_reference.py, INVPW_RETAIL_FIREFOX set by the leg), not against Playwright's own Firefox; the tooltip joins the row wrapper.e2e.stock_twin (20 tests) and its rule is a cross-check in the record 2026-11-28 21:41:56 +01:00
feder-cr 5298149cd0 e2e: the stock twin runs headed, in the mode of ours (a real window on the display of the job), not in Firefox's headless mode 2026-11-28 21:36:40 +01:00
feder-cr 9140845e4d e2e: the select, drag and IntersectionObserver/lazy-frame tests are stock twins (the same steps on Playwright's own Firefox first, ours second, the verdict is the same as stock), in the new row wrapper.e2e.stock_twin (stock_firefox) and out of the whole-suite rows; each record keeps the page's and the chrome's devicePixelRatio and the real screen scale 2026-11-28 21:35:33 +01:00
feder-cr cb67c18332 e2e: a popup's position is Firefox's own rule (retail round 5: 4, 4 at scale 1.0), no popup_position pref is set; the second popup's stagger waits for capture round 8 2026-11-28 21:35:33 +01:00
feder-cr 652c911514 persona_cover: popup_client_top is a pref of the dpr dimension, the ui_normal and ui_compact rows of DERIVED go (no core writes them), persona-seeds.json regenerated with the core of c58efd7 2026-11-28 21:28:31 +01:00
feder-cr 229cfb7da2 Merge remote-tracking branch 'origin/main' into e2e/oop-frame-71
# Conflicts:
#	ci/required-suites.json
2026-11-28 20:47:26 +01:00
feder-cr 3259840c7c e2e: the tooltip's vertical offset is computed by Firefox's own rule (kDefaultTooltipOffset scaled by the system cursor size on Windows), not typed as 21 2026-11-28 19:56:28 +01:00
feder-cr c39a976a44 e2e: a tooltip opens at the real pointer, in the top document and in a frame of another site, at the four scales (red without the tooltip map), in the rows of the maximized-window test 2026-11-28 19:54:44 +01:00
Federico Elia df35204915 Merge pull request #629 from oss-invisible/ci/windows-worker-dumps
ci: every Windows e2e job leaves a full dump of a crashing python.exe in its evidence
2026-11-28 19:06:47 +01:00
feder-cr de9c19b578 ci: every Windows e2e job leaves a full dump of a crashing python.exe in its evidence
A pytest-xdist worker (python.exe) dies on the Windows e2e jobs with "node down: Not properly terminated" (a native "Windows fatal exception: access violation",
jobs 138402013609 and 138966622085) and nothing names the faulting native module. Each of the six Windows jobs that run pytest now sets, before its tests,
HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\python.exe (DumpType 2 = full, DumpCount 3, DumpFolder RUNNER_TEMP/invpw-evidence/dumps/python,
WER made enabled, no dialog), so the dump travels in the evidence artifact the job already uploads (the Control+A job gets that upload). After the tests
scripts/ci_wer_dumps.py lists the dumps with their size and reads the minidump header (thread, exception code, faulting module+offset, failed access) into summary.txt.
Docs: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps

Tests: the Windows jobs' rule test (red on the previous e2e.yml) and the reader on a synthetic minidump.
2026-11-28 18:39:32 +01:00
feder-cr 678978399c e2e: three new test files stored with LF, as the index of the repository has them (they were committed with CRLF) 2026-11-28 02:40:48 +01:00
feder-cr 310b88e81d e2e: the input test takes no tolerance: clientX/clientY of every click, hover, drag and wheel equal the requested whole CSS point exactly, and the message prints the requested point, the received one and the scale 2026-11-28 02:40:28 +01:00
feder-cr 6f84d62290 e2e: a page cannot reach the three chrome-only methods of the window-origin map (window, document, reachable objects, prototype chains, CanonicalBrowsingContext), in the rows of the maximized-window test 2026-11-28 02:40:28 +01:00
feder-cr eb2629fea1 e2e: the consumers of the window origin (early readings of a frame, popup moveBy/resizeBy/moveTo, drag into a frame, IntersectionObserver and lazy loading in a frame, input at four scales, select dropdown anchor), in the rows of the maximized-window test 2026-11-28 01:26:31 +01:00
Federico Elia 465386fd7d Merge pull request #625 from oss-invisible/tests/webgl-reference-on-our-gl
tests: the control launch of two WebGL e2e tests runs on the engine's own GL
2026-11-28 00:15:47 +01:00
feder-cr ce55e15e60 Merge remote-tracking branch 'origin/main' into tests/webgl-reference-on-our-gl
# Conflicts:
#	ci/required-suites.json
2026-11-27 23:45:45 +01:00
Federico Elia 21b5276c4d Merge pull request #624 from oss-invisible/tests/neutral-names-for-public-pages
tests: neutral names for the tests of public fingerprint and detector pages; one bundle and its two tests removed
2026-11-27 23:35:33 +01:00
feder-cr abfc2d2764 tests: the host-GL probe test writes down the page's WebGL at engine off and does not judge it
With the engine off the context comes from the host's Mesa, which a runner may not
serve (hunt run 45998187350: once in 3083 launches). The page still asks for WebGL,
which is what makes Firefox read GfxInfo; with the engine declared a missing context
is still red.
2026-11-27 23:35:16 +01:00
feder-cr 025ae12b72 tests: the control launch of two WebGL e2e tests runs on the engine's own GL
The control of the non-premultiplied WebGL canvas test and of the createPattern projection test had the engine off
(hw_seed 0), so WebGL ran on the host's Mesa: once in 3503 launches a runner gave no context. The control now keeps the
engine on, with the same declared GPU, and declares only the canvas noise off (zoom.stealth.canvas.substitute_pixels
false), as test_webgl_noise_active.py does. Both launches of both files, on Linux, check the maps of the engine's
processes with the rule of test_webgl_draws_on_the_engine_s_own_gl, now written once in engine_process_tree.py.
2026-11-27 23:17:13 +01:00
feder-cr 28841856d0 tests/vendor: the rules scanner's MIT notice is the copyright holder and year and the full permission text, verbatim from upstream; the contact address is left out (pm, 27/11) 2026-11-27 21:01:47 +01:00
feder-cr 9ba446ed3c e2e: the maximized window, its frames (also transformed) and its popups read as retail
The restored-window part of the retail window-geometry test is dropped
with the feature. What stays is read against retail Firefox 159.0 on
Windows at the four display scales: the maximized window and its probe
(round 4), fullscreen in and out from it, the same-origin and cross-site
frames and the popups (round 5).

New, from round 6 (GitHub run oss-invisible/core 46052782097,
RetailCaptures 4a37f5f, WINDOW_GEOMETRY_TRANSFORMED_FRAME.csv): a
cross-site frame under scale(1.5) and under rotate(10deg), one at a time,
read from inside after three real mouse moves to retail's CSS points. Its
mozInnerScreen equals retail's, and clientX/Y and screenX/Y equal retail's
at scale 1.0 and are within one pixel at the others.

A cross-site frame that reads the top's own mozInnerScreen now fails by
name: the out-of-process frame lost its own place in the top.

Registered in wrapper.e2e.suite.linux.3 and wrapper.e2e.suite.windows.4
with four tests each.
2026-11-27 20:56:16 +01:00
feder-cr 5e535d9faa tests/vendor: the headless detector bundle and its one test are removed (its required licence notice cannot ship without a studied system's name, and the local scanner is not changed); the rules scanner carries its upstream MIT notice verbatim in its header; min_tests of wrapper.e2e.suite.linux.1 (-2), wrapper.e2e.suite.windows.1 (-1), wrapper.e2e.suite.windows.4 (-1), wrapper.e2e.realness (-1) lowered by the tests removed (the headless detector test and the realness test that loaded its page) 2026-11-27 20:51:40 +01:00
feder-cr 0c43c7ec60 tests/vendor: the two upstream notices are left out until their place is decided; the README stays neutral 2026-11-27 20:51:28 +01:00
feder-cr 08f7fd91c7 tests: the licence notices of the two vendored bundles without a header are copied verbatim from the upstream LICENSE at the commit of the vendored version 2026-11-27 20:51:28 +01:00
feder-cr 90449bbdb2 tests: the README of the vendored bundles lists each with version, license, sha256 and where its licence notice lives; a test is red if a bundle changes without its row; unit counts +3 2026-11-27 20:51:28 +01:00
feder-cr dbdd7c7c6d tests: neutral names for the tests of public fingerprint and detector pages (file, functions, ids, references); behaviour and counts unchanged 2026-11-27 20:51:07 +01:00
Federico Elia 244fdcf0a8 Merge pull request #621 from oss-invisible/ci/retired-tests-by-nodeid
ci_verdict: retired single tests by nodeid, each declared once against the floor it lowers
2026-11-27 20:20:57 +01:00
feder-cr 53b5a1ef17 ci_verdict: a retired-test entry carries from_min_tests and allows its drop only while main's floor of the suite is still that value, so it is inert once the removal is on main; the five entries are written at 449, 333, 274 and 32 2026-11-27 13:42:20 +01:00
feder-cr eef12eb659 ci_verdict: ci/retired-tests.json declares single retired tests (nodeid, suite, count, reason, decided_by); a floor drops by exactly the declared count, any other lost test stays red; the entries of the two tests the rename removes 2026-11-27 13:42:20 +01:00
Federico Elia 54ce892a60 record 0.60.0 as published (#618) 2026-11-27 13:41:57 +01:00
Federico Elia f3f35ea0c3 Merge pull request #619 from oss-invisible/ci/install-job-deps-from-lock
user-install: the install-from-index harness comes from the hashed lock; every module the tests import is held to it
2026-11-27 13:06:40 +01:00
feder-cr 11c1b4573f CHANGELOG: 0.60.0 is dated 2026-11-27, the UTC day of its upload to the index (the line the ledger PR writes) 2026-11-27 08:09:12 +01:00
feder-cr 8a6ef83ef4 user-install: the harness comment names the helper and the rule test in words, not by path (the install-job gate reads every tests/ path of the file as a test the job runs) 2026-11-27 08:09:12 +01:00
feder-cr 4b97532753 user-install: the test harness of the install-from-index job comes from the wrapper's hashed lock, and a rule test holds every third-party module the tests import to that lock (psutil was missing, ledger PR #618) 2026-11-27 08:09:12 +01:00
Federico Elia 67648a9eb6 Merge pull request #617 from oss-invisible/tests/fission-frames-evidence
tests/fission frames: every test of the module keeps the module's evidence when it fails
2026-11-27 07:39:45 +01:00
feder-cr b4f7cde592 Merge remote-tracking branch 'origin/main' into tests/fission-frames-evidence 2026-11-27 07:07:10 +01:00
Federico Elia fb8a407084 Merge pull request #607 from oss-invisible/tests/webgl-engine-off-evidence
tests/canvas: an engine-off WebGL canvas that cannot be made says why, and the run keeps its gfx log
2026-11-27 00:27:59 +01:00
feder-cr 603ca155c9 tests/fission frames: every test of the module keeps the module's evidence when it fails (the wire, the engine trace, every frame's lifecycle)
Main run 45823271010 (linux part 1) saw the goto of /workers (A, its frame B, B's frame C: three processes) reach commit and domcontentloaded but not load in 30 s, with nothing in flight, in test_a_dedicated_worker_reports_the_identity_of_the_window_in_every_frame[blob]. The module arms FailureEvidence for all of its tests but only the one test that opened OnFailure saved it: that run kept nothing. Each test now runs in OnFailure with its page listened to (frameattached / framenavigated / framedetached, domcontentloaded, load). Diagnostic only: no wait or assertion changes; the 9 e2e nodes are the same.
2026-11-26 23:54:25 +01:00
feder-cr d12d722975 Merge remote-tracking branch 'origin/main' into tests/webgl-engine-off-evidence
# Conflicts:
#	ci/required-suites.json
2026-11-26 23:52:46 +01:00
Federico Elia c5709c6bd8 Merge pull request #616 from oss-invisible/release/0.60.0-firefox-70
release 0.60.0: pins invisible-core 70.83.0 on the engine firefox-70
2026-11-26 23:07:32 +01:00
feder-cr b39b7f65e1 release 0.60.0: the gate lock names core 70.83.0 (no locked distribution changes), the CHANGELOG heading is dated 2026-11-26 22:05:21 +01:00
feder-cr 1d21e84954 release 0.60.0: pins invisible-core 70.83.0 (engine firefox-70); persona seeds for that core 2026-11-26 21:55:59 +01:00
feder-cr 6e3e166bb7 CHANGELOG 0.60.0: the restored-window frame leaves (it ships with firefox-71) 2026-11-26 19:18:39 +01:00
feder-cr 91346ececc release 0.60.0: version and changelog (the unpublished 0.59.1 entry folds into 0.60.0; the core version and the engine tag are placeholders until they are published) 2026-11-26 19:18:32 +01:00
Federico Elia cccef5dadb Merge pull request #547 from oss-invisible/ci/windows-temp-on-d
ci: on Windows the browser's profiles and temp files go on D:, not on the saturated C:
2026-11-26 13:49:28 +01:00
feder-cr bb610da22e ci: the four Windows e2e jobs added since (network, host, page oracle, final seeds) also keep TEMP and TMP on D:
tests/test_ci_windows_temp_is_on_d.py was red on them on today's main (e2e-network-windows, e2e-host-windows,
e2e-page-windows, e2e-page-final-windows had TEMP on C:); green with the job env every other Windows job has.
2026-11-26 13:14:38 +01:00
feder-cr c3c1fcee2a ci: the unit rows count the test of the Windows temp folder (3949 -> 3964, 3953 -> 3968) 2026-11-26 13:14:38 +01:00
feder-cr c1b9c5392d Windows jobs keep the browser profiles on D:, not on C:
The profile of every Firefox the tests launch is made in TEMP. On the GitHub
Windows runners TEMP is on C:, and four browsers at once saturate that disk
(queue up to 144, latencies up to 4 s): the parent's main thread stays still
40-60 s and the e2e fail at random. Hunt of 20/11: profiles on C: took 5 of
4 shards, TEMP and TMP on D:\a\_temp took none.

Every Windows job that launches a browser (e2e, e2e-hunt, fakeweb, tests,
firefox-launch-matrix, real-sites, user-install) sets TEMP and TMP to
D:\a\_temp in its job env (matrix jobs: D: on Windows, /tmp on Linux).
tests/test_ci_windows_temp_is_on_d.py fails on the workflows of main.
2026-11-26 13:14:28 +01:00
Federico Elia cb31015dd5 Merge pull request #575 from oss-invisible/fix/screenshot-refuses-what-would-touch-the-page
Screenshot refuses by name the parameters Playwright honours by modifying the page
2026-11-26 13:14:09 +01:00
feder-cr 6834f16734 CHANGELOG 0.59.1: the screenshot refusal joins the entry #606 opened (the version is already 0.59.1 on main) 2026-11-26 12:45:10 +01:00
feder-cr d348c347f6 tests: omitBackground with png is compared with stock's exact first line, the API name included
The e2e asserted `^Not implemented`, and the client prefixes every server error with the API name, so the line is
`Page.screenshot: Not implemented` (and `Locator.screenshot`, `ElementHandle.screenshot`): red on every system in run 45081196889.
Stock Playwright 1.61.1 answers the same line: `FFPage.setBackgroundColor` throws `new Error("Not implemented")` and the Python
client writes `f"{apiName}: {error}"`. The test now compares the first line with that exact text for each way of asking.
2026-11-26 12:45:10 +01:00
feder-cr fe26fca02c fix: a refused screenshot of an element or a locator is refused before the page is scrolled or measured
The refusals of mask, style, animations="disabled", caret="initial" and omitBackground with png were inside PageDispatcher.op_screenshot, which the element's
screenshot reaches only after scrolling the element into view, taking its box and reading the document's scroll: a call that was going to be refused had moved the
page. They are now one function, _refuse_unserved_screenshot_parameters, called first by the page's screenshot and first by the element's (a locator's is the
element's). It reads the parameters and nothing else, so the element's second pass through the page's is the same answer. The required-suites counts follow the
13 unit and 10 e2e tests added.
2026-11-26 12:45:10 +01:00
feder-cr 2206289d7e tests: a refused screenshot of an element or a locator neither scrolls nor measures the page (red: the refusal came after the scroll)
ElementHandleDispatcher.op_screenshot scrolled the element into view, took its box and read the document's scroll before handing the call to the page's
screenshot, where the refusal of mask, style, animations="disabled", caret="initial" and omitBackground with png is. A refused call therefore moved the page. Unit:
for each refused parameter the element's call sends nothing to the engine, not a scroll, not a measure, not a picture (the page's call is held to the same, and the
call that is taken still scrolls and measures first). E2E: on a page scrolled to a known position with the element below the fold, a refused locator.screenshot and
element.screenshot leave window.scrollY as it was; the same call without the parameter does scroll.
2026-11-26 12:45:09 +01:00
feder-cr 3b362bab4b fix: a screenshot refuses what Playwright does by modifying the page: mask, style, animations="disabled", caret="initial"
PageDispatcher.op_screenshot never read these parameters, so the call succeeded with a picture that ignored them. It now refuses each by name with what to do
instead, and answers Firefox's own `Not implemented` for omitBackground with png (jpeg is a no-op, as in stock). caret="hide" and an absent caret are served: the
engine never draws the caret, which is what stock's default produces. The element's and a locator's screenshot reach the same call. The sentences are declared by
(operation, parameter) in perimeter.REFUSED_PARAMETERS and raised through _refuse_parameter, which the declared-refusals test holds to that table both ways.
2026-11-26 12:45:09 +01:00
feder-cr 020fe74328 tests: a screenshot refuses what would touch the page (red: mask, style, animations, caret="initial" and omitBackground were silently ignored)
Stock Playwright takes mask, style and animations="disabled" by modifying the page and draws the caret only for "initial"; its Firefox throws "Not implemented" for
omitBackground with png. PageDispatcher.op_screenshot never read any of them, so the call succeeded with a picture that ignored the parameter. Unit: the page, full
page, clip, element and locator calls refuse each parameter by name (and what is harmless passes), omitBackground png answers "Not implemented"; the refusals are
declared by (operation, parameter) in perimeter.REFUSED_PARAMETERS, both directions. E2E: the same through the client on a page, a locator and an element handle, the
page left untouched, and a measurement that no caret is in the picture with caret absent and "hide". Registered in wrapper.unit.all.* and wrapper.e2e.suite.{linux,windows}.1.
2026-11-26 12:45:09 +01:00
Federico Elia 250ac6919d Merge pull request #615 from oss-invisible/tests/the-tree-guard-names-the-launch-by-its-line-not-by-the-clock
tests: the tree guard's launch time is judged from the launch line, not by a window of seconds
2026-11-26 12:44:52 +01:00
feder-cr 444cf1128d tests: a process that exits between being listed and being read is gone for the tree guard's test, not an error
Wrapper #603's round (pytest ubuntu py3.13, job 139861116959): the same test failed with `psutil.NoSuchProcess: process PID
not found` from its helper `_alive`, which asked `pid_exists` and then `Process(pid).status()`: the grandchild the guard had
just killed was there for the first question and gone for the second. The guard itself already treats such a process as
gone (`kill_tree` suppresses `NoSuchProcess` and `psutil.Error`); the helper now does too.

Red on old: `test_a_process_that_exits_between_being_listed_and_being_read_is_gone` makes the race on purpose (a pid that
exists when listed and raises `NoSuchProcess` when read): the old `_alive` raised it (1 failed), the new one answers gone; a
process that is really there is still alive (the control). wrapper.unit.all rows +1.
2026-11-26 12:10:36 +01:00
feder-cr 2703848a44 tests: the tree guard's launch time is judged from the launch line, not by a window of seconds
`test_the_tree_guard_returns_at_the_timeout_kills_the_grandchild_and_names_the_launch_that_was_alive` asserted
`2 <= alive_s < 8`. `alive_s` is the time from the launch line the child writes to the moment the run is read; a child
that a loaded machine starts late writes that line late, so it was alive for less than 2 s when the tree was killed
and the check failed although the guard had done everything right (this repo's pre-push under the load of the whole
suite, twice in a row: `2 <= 1.75824`). A test cannot fail for the speed of the machine.

What holds whatever the load is asserted instead: the line cannot have been written before the run began nor after it
was read, and its `at` is whole seconds (`launch_line`, timespec="seconds"), so `0 <= alive_s <= spent + 1`; and the
message gives that number. The kill and the naming of the launch were already asserted and stay.

Red on the old check, on purpose: `test_a_launch_that_began_late_is_named_with_the_time_since_its_own_line` is a child
slowed until its launch line comes one second before the kill (`last_launch` read at a fixed `now`): the guard names it
alive for 1 s, the old window rejects it (asserted), the new check accepts it. A control shows the check refuses a time
the line cannot give (a line 30 s before a 3 s run, a line after the read). wrapper.unit.all rows +2.
2026-11-26 11:48:17 +01:00
Federico Elia 7369fffa53 Merge pull request #612 from oss-invisible/fix/core-328-frame-fields
persona cover and launcher test read the window frame of core #328 (ui_normal/ui_compact derived, the bar through declared_maximized_ui)
2026-11-26 07:48:56 +01:00
feder-cr e02024933a tests: the fake clock of the index wait stays out of the real subprocess.run (Popen.wait polls through time.sleep: a child not yet reaped moved the fake time past the deadline after one all-yes round); two tests, wrapper.unit.all counts 3855 linux, 3859 windows 2026-11-26 06:58:26 +01:00
feder-cr 5140ecd424 required suites: wrapper.unit.all counts the four new persona-cover tests (linux 3853, windows 3857, as collected by the round of #612) 2026-11-26 06:58:16 +01:00
feder-cr c39077a050 tests: persona cover derives the window-bar prefs from their dimension, so the stored seeds hold on the pinned core and on the core with the window-frame rule
The core now declares the maximized window's bar from the panel as well as the
scale (declared_maximized_ui) and adds ui_normal/ui_compact. persona_cover has a
DERIVED category: a pref that is a function of a dimension, checked to take one
value per value of it and kept out of the stored features. maximized_ui is of
screen_panel, ui_normal and ui_compact are of dpr. test_launcher_config reads
the bar through the core when it has declared_maximized_ui.
2026-11-26 06:57:59 +01:00
Federico Elia d1cf338a2f Merge pull request #613 from oss-invisible/tests/ab-network-dealloc-early-evidence
ab network: a TURN deallocation before the page began closing is evidence, not a problem
2026-11-26 06:56:56 +01:00
feder-cr 411c2ad6ae ab network: a TURN deallocation before the page began closing is evidence, not a problem: the page's reduced-precision clock cannot order it (published engine against itself on Windows, wrapper #612's round) 2026-11-26 06:24:49 +01:00
Federico Elia 8ca47cba13 Merge pull request #609 from oss-invisible/tests/the-os-cursor-is-parked-outside-the-window
tests: on Windows the OS cursor is parked outside the browser window before every e2e, and the gestures that record pointer events require it
2026-11-26 03:00:00 +01:00
feder-cr e2e1c49db6 ci: every Windows e2e job sets the runner's screen to 1920x1080 before its e2e, so the window leaves a strip to park the cursor in
Run 45719708645 of this pull request: the runner's screen is 1024x768 and the browser window of a 1920x1080 identity is 1936x1048, so
it covered the whole screen and the cursor parked at (1023,767), inside it; the gestures' precondition said so. Parking the cursor over
the browser's own chrome does not help: hunt 45724307513 showed native moves over the tab strip reach the page too (clientY < 0,
buttons=0) once Juggler input is in it. Hunt 45730213378: 1920x1080 is the largest mode the runner's video device accepts (Microsoft
Hyper-V Video; 2560x1440 is refused) on windows-2022 and windows-latest.

The six Windows jobs of e2e.yml set it with a declared step (Set-DisplayResolution, read back, red if the screen is smaller), before
their e2e. The engine's gate runs the same step, byte for byte, in its Windows wrapper.e2e rows. Two unit tests: the runner's
1920x1080 arrangement parks the cursor in the strip below the window, and every Windows job of e2e.yml declares the screen before it
starts pytest (red on main's e2e.yml). wrapper.unit.all rows +2.
2026-11-26 02:26:32 +01:00
feder-cr 041010070c tests: every e2e test on Windows starts with the OS cursor parked outside the browser window
An autouse fixture per e2e test, and one per module that has an e2e test (a module-scoped browser opens its window before the first test of the module),
calls tests/_os_cursor.py park: the cursor goes to the bottom-right corner of the virtual screen, where no window of the engine is, and is read back. The
window then opens away from the cursor and no native mouse move reaches the page in the middle of a recorded gesture; require_outside at the start of the
drag test and the humanise move count (previous commit) is green. Windows only: the Linux e2e run under xvfb-run, whose pointer is virtual.
2026-11-26 02:26:32 +01:00
feder-cr 9ea819445f tests: a gesture the page records starts with the OS cursor outside the browser window (red: on a Windows runner nothing parks it and it sits inside)
A headed window that appears under the real cursor gets a native WM_MOUSEMOVE for it; the first native move of a process passes Gecko's filter, so the
page saw `mousemove 512,299 buttons=0` after the press in the middle of test_a_real_page_sees_a_drag_that_travelled. The runner's cursor is at (512, 384),
inside the window (-8, -8) to (1928, 1040) of a 1920x1080 screen.

tests/_os_cursor.py: park_outside (a pure choice of a point of the virtual screen beyond every window rectangle plus a margin, a clear error when none
exists), cursor_is_outside, park (SetCursorPos read back with GetCursorPos) and require_outside, over user32 on Windows and no-ops elsewhere (the Linux e2e
run under xvfb-run, whose pointer is virtual). The drag test and the humanise move count (which asserts `off <= 2` page moves) call require_outside at
the start of their gesture. The unit rows of required-suites count the new file (+20 on each OS).
2026-11-26 02:26:31 +01:00
Federico Elia 2ec1a9026b Merge pull request #611 from oss-invisible/tests/ab-network-webrtc-evidence
ab network: the TURN path really works and the A/A proves it; the udp leaf counts STUN transactions
2026-11-26 02:25:59 +01:00
feder-cr f0d25a86ff ab network: the gateway marks the TURN deallocation from its payload (one shared reading), the count drops it by that mark, and one before the page began closing is a problem 2026-11-26 01:54:35 +01:00
feder-cr ca0c6e33f8 ab network: the TURN deallocation (a Refresh with lifetime 0, one best-effort send at teardown) is evidence, not a compared leaf; two of them, or one without an allocation, is a problem 2026-11-26 01:50:11 +01:00
feder-cr 46cf6a579a ab network: the A/A proves the TURN path it compares: a walk with no relay candidate, an error for the lab TURN, or a request the lab TURN refused is a problem on either side 2026-11-26 01:09:41 +01:00
feder-cr 0a031d2688 ab network: the probe uses the lab TURN's credential so the relay is really made; the fake TURN refuses a request whose integrity is wrong; the udp leaf counts STUN transactions, and a transaction over the engine's 7 transmits is a problem 2026-11-26 01:07:54 +01:00
feder-cr a9e56c0b21 ab network: the hunt also keeps the TURN server's answers, the relay's return datagrams and nICEr's log 2026-11-26 01:07:53 +01:00
feder-cr 04b7a79b66 ab network: the webrtc walk keeps, as evidence never compared, each datagram's time and STUN transaction and the page's own ICE times; e2e-hunt can repeat that walk alone 2026-11-26 01:07:53 +01:00
Federico Elia 2c5cd5ea79 Merge pull request #610 from oss-invisible/tests/worker-cache-back-evidence
tests/worker-cache: a red go_back keeps the Juggler record, the engine's session-history log and what the page says
2026-11-26 00:53:52 +01:00
feder-cr 877027f9f4 tests/worker-cache: the helpers of the evidence come after the test, so the guard reads wait_cacheable before the first go_back 2026-11-26 00:28:44 +01:00
feder-cr 0e48424da8 tests/worker-cache: a red go_back keeps the Juggler record, the engine's session-history log and what the page says
Candidate 45691494388 (job 139520127265) saw go_back end with "no new navigation on frame mainframe-11 in 30s" for top/other-site/goto and kept nothing. A hunt of 2960 iterations on that engine did not reproduce it (run 45711081489). The test now arms FailureEvidence with SHIPBFCache, nsSHistory, SessionHistory, BCWebProgress, DocumentChannel and BrowsingContext, and records what the page says when go_back raises and 2 s later. Diagnostic only: no assertion changes.
2026-11-26 00:19:44 +01:00
Federico Elia 43e1b355a3 Merge pull request #604 from oss-invisible/tests/unit-tests-never-reach-the-network
tests: a test that is not e2e never leaves the machine (socket and asyncio doors guarded, four tests declare the lab's exit)
2026-11-26 00:01:57 +01:00
feder-cr ebfd0fa573 tests: the ten unit tests that compose a launch declare the engine instead of asking GitHub for it
Run 45708815163 (this pull request, every pytest leg): the guard refused `api.github.com` in ten unit tests. Without
`binary_path=` a launch resolves the engine through `ensure_binary` (`_engine.resolve_executable`): with an engine in the
machine's cache it answers at once, with none it asks GitHub's release index and downloads the archive. So these
tests passed on any machine that had run `fetch` and went to the internet on a fresh runner (reproduced here with
INVISIBLE_PLAYWRIGHT_CACHE_DIR on an empty folder: 10 failed, 10 errors; with the fixture: all pass).

A fixture, `declared_engine` (tests/conftest.py), declares an empty executable in the test's folder as the answer of
`ensure_binary`; the file is never run. The ten tests take it:
  test_launcher_helpers.py: test_build_env_carries_the_declared_network, test_build_env_caller_env_override_wins,
    test_build_env_never_injects_font_env, test_build_env_no_font_keys_when_absent
  test_launcher_config.py: test_enter_with_profile_dir_calls_launch_persistent_context,
    test_enter_without_profile_dir_calls_launch_not_persistent, test_persistent_context_user_data_dir_is_created_if_missing,
    test_teardown_closes_persistent_context
  test_async_api.py: test_the_async_api_stamps_the_session_token_into_the_browser_env
  test_virtual_display_start_off_the_loop.py: test_a_second_browser_is_served_while_the_first_starts_its_display
The whole non-e2e selection with an empty engine cache and the guard: 3763 passed, 8 skipped (Windows).
2026-11-25 23:30:27 +01:00
feder-cr b699439355 tests: the version gate is the one declared third party of the guard (pypi.org, for its own file only)
Run 45647282454, job version: tests/test_version_is_not_taken.py asks the index whether the proposed version is
already published, which only the index can answer; the guard refused its lookup of pypi.org and the gate went red.
It is skipped unless IPW_CHECK_VERSION is set, which only the version job of tests.yml does.

tests/_no_network.py: DECLARED_THIRD_PARTIES names that file and that host alone. Its lookup of pypi.org passes and
the addresses it answered may be connected to; any other host, and pypi.org from any other file, stay refused.
Three cases (faked under the guard, nothing leaves the machine): the gate may ask the index and only the index; no
other file may ask it; the declared table is that one entry, so a new one changes a test in the same diff.
wrapper.unit.all rows +3 (3688 linux, 3692 windows).
2026-11-25 22:45:35 +01:00
feder-cr 7031c911c7 tests: the four tests that compose prefs through the core declare the exit of the lab
A new fixture, lab_exit (tests/conftest.py), declares the exit and the GeoIP database of the lab for one test that
is not e2e, as the e2e session has them (tests/_lab_egress.py). With no proxy the core asks the network where this
machine leaves from on every composition, even with a declared zone (zone, language and position come from the
exit): that is the product's rule, so the tests declare the answer instead of asking the internet.
2026-11-25 22:45:33 +01:00
feder-cr 464e0b132b tests: a test that is not e2e never leaves the machine (red: four tests asked the internet where this machine leaves from)
pyproject.toml says unit and integration are "no network", and nothing enforced it: the pre-push of the wrapper
failed on tests/unit/test_config_public.py where the network refused api.ipify.org and icanhazip.com.

tests/_no_network.py patches the four doors every client in the process goes through (socket.socket.connect,
connect_ex, sendto and socket.getaddrinfo) for every test that is not e2e (an autouse fixture of tests/conftest.py):
loopback, the unspecified address, localhost names, the documentation ranges and the address this host sends from
pass; anything else is refused (ConnectionRefusedError, what an offline machine shows) and recorded, and the record
fails the test at its teardown, with WHERE (the test), WHAT (door and destination), FIX and RULE, even when the code
under test swallowed the refusal.

Red on this commit, all through the core's one discovery of the exit (prepare_session_geo, no proxy):
  tests/unit/test_config_public.py::test_public_import_matches_direct_import
  tests/test_launcher_helpers.py::test_default_context_screen_matches_profile
  tests/test_launcher_helpers.py::test_default_context_color_scheme_follows_dark_theme
  tests/test_prefs_composition_arm.py::test_the_wrapper_composes_what_the_public_api_composes (green before: the
  core swallows the failed discovery when the zone is given, only the record catches it)

tests/test_a_test_that_is_not_e2e_never_leaves_the_machine.py (35 on Linux, 38 on Windows: the asyncio cases run on the selector loop, and on Windows on the Proactor loop too, which connects with ConnectEx and sends with WSASendTo, never through socket.socket) tests the guard; wrapper.unit.all rows +35 / +38.
2026-11-25 22:45:33 +01:00
Federico Elia a480b58677 Merge pull request #602 from oss-invisible/tests/h3-attempt-read-at-the-port
tests: h3 that was never tried is read as no datagram at the h3 port, not as a load time
2026-11-25 22:01:33 +01:00
feder-cr 995e2da01e tests: five h2 visits with no datagram at the h3 port are clean on a loaded runner, and a datagram there is an attempt whatever the load times
The verdict of an h2-only road is the judge of the protocols plus the attempt read at the port of the server; the time a visit took is no input of it.
One visit loaded in 2500 ms against 719 ms (a loaded runner) with nothing at the h3 port is clean; every visit fast with one datagram at the port is an
attempt. Four roads each; the unit rows of required-suites count the eight.
2026-11-25 21:00:48 +01:00
feder-cr 13286044c7 tests: the non-coherent SOCKS5 roads also read the attempt at h3 at the gateway (UDP ASSOCIATE asked, datagram into the relay)
The server's UDP port does not see an engine that tries h3 through the relay of a gateway: it asks for a UDP ASSOCIATE or sends into the relay.
relay_activity() is taken before the first visit (after the core's own measurement) and after the last; h3_attempts() reports what the engine
asked of the gateway in between. A unit test covers a granted and a refused ASSOCIATE and a datagram into the relay; the unit rows of
required-suites count it (+1 again).
2026-11-25 21:00:47 +01:00
feder-cr 4f4b8ab7a3 tests: behind an HTTP proxy (and where UDP is dropped) h3 is never tried, read as a datagram at the h3 port, not as a load time
The e2e judged the fallback by an absolute margin on page.goto (visit 2 loaded in 2500 ms against 719 ms), which is red on a loaded runner with
five visits that all read h2. The attempt is now read where it is born: H3Server records every datagram that reaches its UDP port
(udp_datagrams), a QUIC Initial included whether or not a handshake follows, and the h2 roads assert there is none. judge_visits no longer takes
load times, LOAD_MARGIN_MS and its debt entry in the clock exceptions are gone. A unit test proves the server sees an attempt that never
completes; the unit rows of required-suites count it (+1).
2026-11-25 21:00:47 +01:00
Federico Elia 46054486c9 Merge pull request #606 from oss-invisible/fix/element-handle-actions-walk-like-a-hand
ElementHandle pointer actions walk onto the element the way selector actions do (one click path, one fingerprint)
2026-11-25 21:00:14 +01:00
feder-cr 3e43f597e4 tests: the handle e2e prints what the page saw of the pointer and the core's turns when its opening sequence is wrong
Evidence only; the verdict is unchanged (`ordine[:2] == ['hover', 'click']`). Candidate 45621332479 recorded
['hover', 'hover', 'click'] once, and nothing told an exit and re-entry of the pointer from a spurious second
mouseover. The page now also keeps every mouseover, mouseout and click of the button with its relatedTarget, its
point and the button's box at that instant, and the first moves of the document; the test wraps the core's
actionability loop (Actions._retry, _center_point, hit_target: the originals are called with the same arguments) and
records the turns of each action, their hit-target verdicts and how they ended. All three go into the failure message.
2026-11-25 19:56:37 +01:00
feder-cr 8bcc2a9ca1 ElementHandle pointer actions walk onto the element the way selector actions do, one hand for every door
click, dblclick, hover, tap, check and uncheck (and so set_checked) of an ElementHandle called the core's actions directly: with no client cursor the approach is one mousemove onto the exact centre of the quad and a press there, while the selector actions go through Frame._by_hand / Pointer.act (a drawn path, a landing point of the session's own). The handle now goes through the same _by_hand with element=<its object id>: Pointer.act aims at that node (no selector looked up, the handle not disposed), and trial/force/strict/position/modifiers are read as before. The keyboard and text actions (fill, type, press, focus, selectText, setInputFiles) already end in the same core action as their selector twins and are unchanged. The comment that said a handle click was the humanised pointer is now true. Version 0.59.1.
2026-11-25 19:56:37 +01:00
feder-cr 292d86a15a tests: a handle's pointer action walks like a selector's (red: a handle click is one jump to the exact centre)
ElementHandle.click/dblclick/hover/tap/check/uncheck go straight to the core's actions, which with engine_approach off send one mousemove onto the exact quad centre and press there; the selector actions go through the server's hand. A unit test over the real core Actions and the real Pointer (only the connection and the injected script stubbed) and an e2e that asks the page. Both rows of wrapper.unit.all and one row per system of the e2e partition name the new files.
2026-11-25 19:56:37 +01:00
Federico Elia 2f5216b4c0 Merge pull request #605 from oss-invisible/fakeweb/stock-unsettled
fake web P2: a stock round that lost the end of a fetch the page aborted is stock unsettled, not a broken control
2026-11-25 19:56:04 +01:00
feder-cr c2c3d3c289 tests: the engine-off WebGL canvas test says why it got no context
The probe listens for webglcontextcreationerror and returns what it heard instead of null; after a first null the test waits 2 s and records a second attempt (statusMessages, renderer). The verdict stays the first attempt's. The test runs inside FailureEvidence with MOZ_LOG gfx2d.
2026-11-25 19:05:33 +01:00
feder-cr 4d0cbc8d08 fake web P2: a stock round that lost the end of a fetch the page aborted is stock unsettled, not a broken control; ours is judged against the declared outcome there 2026-11-25 18:16:44 +01:00
Federico Elia 7c4a9c0702 Merge pull request #599 from oss-invisible/tests/occlusion-cover-without-focus
tests/occlusion: on Linux the cover is a window of the test's own, and neither the pointer nor the focus may move
2026-11-25 18:15:17 +01:00
feder-cr 8fd5d8ae7d Merge remote-tracking branch 'origin/main' into tests/occlusion-cover-without-focus
# Conflicts:
#	ci/required-suites.json
2026-11-25 15:28:21 +01:00
feder-cr 2706c29676 tests/occlusion: the pointer, not the focus, is what the cover must not move
Run 45620136865 refuted the focus reading: with an X cover over the pointer 458 of 463 runs were red, FocusOut 0 of 40 on the old arrangement. With no window manager the focus is PointerRoot, the pointer sits inside the covered window, and a window mapped over it makes the pointer leave the toplevel; GDK turns that crossing into a GTK focus-out that redraws the window after FullyObscured.

- the display: the test warps the pointer to the bottom-right pixel of the root (from its read-back geometry) before any session starts.
- cover_rectangle keeps the pointer outside the cover (the margin shrinks on that side) and cover_window fails with "the pointer is inside the covered window, no free point on the screen".
- watch also selects Enter/LeaveWindowMask; crossings and focus events are kept with time, mode and detail; the pointer is read back once after the cover is up.
- precondition (both halves, before the page is judged): no crossing and no focus event on the covered toplevel, pointer outside both rectangles; message starts "arrangement: the covering moved the pointer or the focus".
- unit cases for all of it; min_tests of wrapper.unit.all.* raised by 11.
2026-11-25 15:27:21 +01:00
Federico Elia 1e8d47cb6e Merge pull request #598 from oss-invisible/ci/pin-actions-by-sha
ci: every action and reusable workflow pinned to a commit SHA, and a test that refuses an unpinned one
2026-11-25 14:37:04 +01:00
feder-cr 2273bb1f77 CI: pin every action and reusable workflow by commit SHA, with a rule test
Every uses: in .github/workflows is a local path or owner/repo@<40 hex> with the
version in a trailing comment. SHAs resolved from the official tags through the
API; the cross-repository noreply-identity reusable is pinned to the last core
commit that changed that file. tests/test_every_action_is_pinned_by_commit_sha.py
refuses any other form (FAIL file / job / step) and is in the wrapper.unit.all rows
(min_tests 3650 linux, 3651 windows).
2026-11-25 13:56:10 +01:00
feder-cr 063a507a9c tests/occlusion: the cover on Linux is a window of the test's own and the focus must not move
The covering window was the second Firefox session's. When it mapped it took the X focus; the covered toplevel got FocusOut and GTK draws a window that loses the focus (nsWindow::OnExposeEvent -> NotifyOcclusionState(VISIBLE)). When X delivered Partially, FocusOut and Fully in one batch, that draw ran after the Fully and the page never recorded hidden (hunt run 45603211231, 58 reds of 1294).

- _x_visibility: override-redirect InputOutput cover (cover_window, destroy_window), FocusChangeMask with VisibilityChangeMask on the covered toplevel, FocusIn/FocusOut kept with their time, focus_moved for the precondition.
- test_window_occlusion_e2e: on Linux no second session; both halves assert that no FocusOut reached the covered toplevel before the page is judged ("arrangement: the covering moved the focus"). Windows unchanged.
- _evidence_on_failure: MOZ_LOG_FILE carries %PID, one log file per process.
- unit cases for all of it; min_tests of wrapper.unit.all.* raised by 13.
2026-11-25 13:49:56 +01:00
Federico Elia 92adffd3ee ci/py-lock/gate: the pip lock of the engine series' gate, with hashes, read by its wheelhouse at wrapper_ref (#596)
* ci: the lock of the gate environment (ci/py-lock/gate.txt), resolved once with hashes, and the test that it follows its sources (ci-03)

The engine series' gate installs the wrapper's environment offline from a wheelhouse made of a lock that lives here. gate.in is written by
scripts/ci_py_lock.py from pyproject.toml (dependencies without invisible_core, and the dev extra), the dependencies of the pinned core, the playwright
pin and cryptography 44.0.3; gate.txt is its uv pip compile --universal --generate-hashes --no-build result. The new test reads both offline and is red on a
missing dependency, a range, an entry with no hash, a pin that moved without the lock. Registered in both wrapper.unit.all rows (min_tests recounted).

* ci: the archives of Playwright's Firefox are pinned by sha256 in ci/py-lock/playwright-browsers.json, with its generator and a test (ci-03)

The gate of the engine series installs Playwright's own Firefox for the stock rows. Its archives (Firefox and FFmpeg on both platforms, winldd on Windows) are
now pinned here, at the wrapper_ref the gate selects, for the Playwright of scripts/playwright_pin.txt.

scripts/ci_playwright_browsers.py writes the file: it asks the pinned Playwright for the URLs with `install --dry-run` on each platform, downloads each archive
once and hashes it. The test reads the file offline and is red on another version, a missing platform or archive, a bad hash, an absolute URL or a file that is
not the generator's bytes. It runs in wrapper.unit.all on both systems; min_tests 3624 -> 3642 (linux) and 3625 -> 3643 (windows), by collection.
2026-11-25 10:31:49 +01:00
Federico Elia fc8e7da94a ci: the rows of the registry carry the details of each leg (runner image, timeout, cores, ...) (#595)
The gate of the engine series will derive its matrix from ci/required-suites.json, so every per-leg
detail must be a field of the row. Optional fields, absent = the plain leg: runner_image, timeout_minutes,
needs_userns, core_dumps, stock_firefox, location_service, run, extra_steps (closed set), moz_log,
juggler_trace, artifact. Set on the rows that need them today; no row, os, test or minimum changes.

ci_verdict.py validates each known field (type and closed values, named); unknown names stay ignored.
A new test pins the validation and the table of the fields on the rows. wrapper.unit.all lists and
minimums follow the new test file (3610 / 3611, counted by collection on Python 3.11).
2026-11-25 02:55:31 +01:00
Federico Elia cad287d504 tests: date:date-time() called from an imported stylesheet is in the declared zone (#594)
An e2e test for the road a site uses: a main stylesheet that xsl:imports a
second one, both loaded by address, the imported one calling EXSLT's
date:date-time(). A context with timezone_id=Pacific/Kiritimati reads +14:00;
a launch with an empty declaration reads what getTimezoneOffset() says, and
that is not +14:00.

The file is added to wrapper.e2e.suite.linux.3 and wrapper.e2e.suite.windows.4
and their minimums go up by one.
2026-11-24 23:42:52 +01:00
Federico Elia 73a72cc540 tests.yml: the unit job judges the exact counts of wrapper.unit.all on Python 3.11, and min_tests follows the collection (#593)
PR #590 added a test to tests/test_ab_host.py without raising min_tests of
wrapper.unit.all.<os>; the PR checks (pytest tests/, floor 380) were green and
the engine series' gate went red ("the suite is exact").

The unit job now runs, on the Python 3.11 legs of both systems, the selection of
the row (ci_verdict.py args --with-marker) with a junit, and judges it with
ci_verdict.py judge from main against ci/required-suites.json, the list of main
as --main-required. The files outside the row run in a second, small pytest
(--ignore of every file of the row): no test runs twice. The plain run and its
floor stay for the other legs.

min_tests 3575 (linux) and 3576 (windows), counted by collection, including the
new test that holds the workflow to this.
2026-11-24 18:41:07 +01:00
Federico Elia a2dc1b6c2f record 0.59.0 as published (#591) 2026-11-24 12:09:59 +01:00
Federico Elia 9a6c12f0cb ab host: the presence of the pingsender and of what it spawns is listed, never red (#590)
Run 45364818483 (e2e on main 5a68489d, host windows): the A/A of the 68 broke on proc.socket<-pingsender, in no launch of one run and in every launch of the other. Whether a launch starts Mozilla's pingsender is canUpload()'s, not the engine's to hold, and with a few launches per side the rule of every kind turns that into a difference of the engine with itself. The kinds backgroundtask/pingsender and <kind><-pingsender are listed (not-judged), never red; their paths, their destinations and the separate pingsender[.exe] stay judged, and every other kind keeps the rule. A test with the shape of that run is red on the old oracle.
2026-11-24 11:14:44 +01:00
Federico Elia 5a68489dc3 Merge pull request #572 from oss-invisible/integ/candidate-69
Integration for the next candidate: #555, #567, #566 and #568 on main 3527f573
2026-11-24 10:23:56 +01:00
feder-cr 5076cec4c2 release 0.59.0: pins invisible-core 69.82.0 (engine firefox-69)
ci/persona-seeds.json names the core it was computed with: 69.82.0, same content.
2026-11-24 09:41:55 +01:00
Federico Elia 3722690103 Merge pull request #589 from oss-invisible/tests/ab-host-exit-ignores-reused-pids
ab-host: the wait for the exit ignores pids that Windows handed to another process
2026-11-24 07:00:18 +01:00
feder-cr 1156f42860 ab host: the run of the reused pid is 45328762166 2026-11-24 06:52:22 +01:00
feder-cr 69afb93aa2 ab-host: a pid of the tree is alive only while it is still that process
Windows hands the pid of an ended process to the next one it makes: pid 7352
of the tree ended at 05:05:33 and was TiWorker.exe at 05:05:38, so the wait
for the exit saw the tree alive for the whole 120 s (A/A seed 4 side A).
A pid of the tree has ended when the audit has its 4689 after its 4688, or,
with no 4689, when the process that has the pid was created after the birth
the audit gives. EXIT_LIMIT_S is unchanged.
2026-11-24 06:43:23 +01:00
Federico Elia 4eea99197d Merge pull request #588 from oss-invisible/ci/unit-min-tests-measured
ci: unit minimums are the counts the gate measured
2026-11-24 06:35:58 +01:00
feder-cr 539f5203ee ci: the unit minimums are the counts the gate measured (3563 Linux, 3564 Windows)
The two linux-deps PRs raised wrapper.unit.all by the size of each version of
tests/test_ci_linux_legs_read_no_mirror.py while the second one replaced the
first, so the minimum counted 78 new tests where 66 exist (plus 5 of the
occlusion test). Republish 45328762166 collected 3563 on Linux and 3564 on
Windows, against minimums of 3575 and 3576.
2026-11-24 06:20:23 +01:00
Federico Elia ec4db32b62 Merge pull request #587 from oss-invisible/tests/occlusion-control-sees-hidden
tests: the occlusion control judges that hidden was recorded after FullyObscured
2026-11-24 05:46:50 +01:00
feder-cr 7ce4b16a3a tests(occlusion): the engine's window log at Widget:4, the level of nsWindow's LOG 2026-11-24 05:37:47 +01:00
feder-cr 57a2e612b3 tests: the occlusion control judges that hidden was recorded after FullyObscured, not the final state
nsWindow::OnExposeEvent calls NotifyOcclusionState(VISIBLE) at every draw of the
window's container (Mozilla's code, the same in retail), so a draw after X's
FullyObscured makes the page visible again and the control, which read the
final state, was a race.

The control now takes the page's list of visibilitychange entries and passes
when hidden was recorded after FullyObscured; the product half is unchanged
(hidden never seen). A deterministic case on Linux draws the covered window
again while it stays covered (one pixel narrower through X): the page must
record visible, hidden, visible. The decision is a pure function with unit
tests, and the engine's Widget log goes into the evidence folder.
2026-11-24 05:29:08 +01:00
Federico Elia 7c9d414af9 Merge pull request #585 from oss-invisible/ci/linux-deps-repository
ci: Linux legs install from the run's repository of the closure (linux-deps, second form)
2026-11-24 05:23:08 +01:00
feder-cr a3cb07c126 ci(linux-deps): a root only provided is its one provider (libgtk-3-0's closure came without libgtk-3-0t64: apt-cache depends --recurse does not walk from a virtual root); identical to the series' copy 2026-11-24 04:49:16 +01:00
feder-cr ba86f02ee7 ci(linux-deps): each fetch of the closure retries 5 times, the MB and seconds of the download are logged (identical to the series' copy) 2026-11-24 04:20:10 +01:00
feder-cr 30ce3226d8 ci(linux-deps): a root may be a provided name, the entry per release of the image, the closure downloaded 8 at a time
libgtk-3-0 is a name libgtk-3-0t64 provides on noble and the root check read Package: alone (linux-deps-real-sites
red); a key per image build missed the entry whenever the builds of a release are mixed; the closure read one
package at a time took 13 minutes from a slow mirror. linux-deps.yml stays identical to the series' copy.
2026-11-24 03:48:21 +01:00
feder-cr 0663250d48 ci: the Linux legs install from the run's repository of the closure (second form of linux-deps)
The first form installed the .deb files the job's image lacked against the
leg's own image and lists; GitHub mixes builds of one image in one run, and
legs failed with "E: Unable to fetch some archives".

linux-deps.yml (identical to the series' copy) now hands the jobs a
repository: the roots and their whole closure, a Packages index and
roots.txt. A leg installs the roots by name with an apt that reads only that
repository (its own sources list and lists folder) and --no-download. The
Playwright pin is read from playwright_wrapper_ref (github.sha) instead of the
`playwright` flag.

tests/test_ci_linux_legs_read_no_mirror.py follows the same rules as the
series' test: the only apt lines are the two allowed ones, APT and the sources
list are local, the files are copied into apt's archives, the artifact is
downloaded before the install; it is red on the first form.
2026-11-24 03:20:40 +01:00
Federico Elia 13cd04a8d3 Merge pull request #584 from oss-invisible/ci/linux-deps-no-mirror
ci: Linux legs install packages from the run's linux-deps job, never from Ubuntu's mirror
2026-11-24 02:52:13 +01:00
feder-cr 83293b8184 ci: the Linux legs install their packages from the run's linux-deps job, never from Ubuntu's mirror
A run lost a green leg to its time limit because `playwright install-deps firefox` fetched 48.8 MB
from the mirror at 102 kB/s (about 8 minutes per leg). linux-deps.yml fetches the .deb files once
per runner image and list (xvfb, strace, gdb, elfutils or the leg's own packages, plus what
`install-deps --dry-run firefox` names for the pin of scripts/playwright_pin.txt), keeps them in a
cache entry and hands them to the run as the artifact linux-deps-<name>. The legs of e2e.yml,
fakeweb.yml, e2e-hunt.yml, real-sites.yml and user-install.yml need that job and install the local
files with --no-download: no apt-get update, no install-deps, no install from the archive.

tests/test_ci_linux_legs_read_no_mirror.py refuses those three in any job, requires each installing
leg to download the artifact of a linux-deps call it needs before its first install, and is in both
unit rows (3529/3530). The tests that read the job headers of e2e.yml, fakeweb.yml and
real-sites.yml follow the new needs.
2026-11-24 02:40:59 +01:00
feder-cr fead0e8c44 Merge tests/etw-session-lifecycle (#583) into the integration for the candidates 2026-11-23 23:12:13 +01:00
feder-cr a158db2151 ci: the stock control of the geolocation step reads the first host read Firefox makes for location, and our engine must make none
Republish 45257636942 (windows-2022): stock Firefox did not start the location utility process
(sandboxingKind=3), while on the same image it did in 45165805370, 45170547415 and 45252267809. The runner
has no source of position (getCurrentPosition answers code 2), so the utility depends on the runner. Stock
loaded capabilityaccessmanagerclient.dll (the CheckAccess of GeolocationSystemWin.cpp) in every launch
that ran, 5 of 5. The 68, the 68 again and the candidate loaded no location module in any of 168 launches.
- The stock control is broken only if stock ran and did not load capabilityaccessmanagerclient.dll. The
  utility is still recorded and printed.
- Our engine, on both sides of the A/A and the candidate in the A/B, the idle launch included: a location
  module or the location utility in any launch is red.
Unit rows 3492/3493.
2026-11-23 22:53:22 +01:00
feder-cr 0b63169b51 ci: the host oracle's ETW session is read from the list of sessions, waited for after its stop, and its errors say Windows' code
Gate 45257629988 (Windows, seed 6): `logman query <session> -ets`, the round trip between the canaries, failed
with 0x80071068 (4200, ERROR_WMI_GUID_NOT_FOUND) right after a successful create. The launch went without a
trace and the A/A was broken, under a line that blamed the administrator.
- The round trip reads the list of sessions (`logman query -ets`, which does not resolve the providers): the
  launch's session must be there and Running. A read that fails is read again every 0.25 s until the
  condition holds or the 120 s hang guard runs out. The browser starts only once it holds.
- After every stop, the next launch waits until the session is gone from that list (same read, same guard).
- Errors carry the command, the code in hex and Windows' text; "it needs an administrator" only for access
  denied (0x80070005).
Unit rows 3482/3483.
2026-11-23 22:06:11 +01:00
feder-cr 4a840e39b0 Merge tests/the-covered-window-is-covered-before-it-is-measured (#582) into the integration for the candidates 2026-11-23 21:06:48 +01:00
feder-cr 111dc3bf69 Merge tests/gl-probe-born-before-goto (#581) into the integration for the candidates 2026-11-23 21:06:48 +01:00
feder-cr 87f26ec99d Merge tests/location-checkaccess (#580) into the integration for the candidates 2026-11-23 21:06:48 +01:00
feder-cr 41738dcc3d ci: the host oracle judges the kinds of processes by the rule of the paths, keeps the raw audit of every launch, and drops a pid only when it is born again
Run 45228081536 (Windows): the A/A of the 68 was red on how many pingsenders a launch started (2, not 0 or 3)
and on whether they spawned a socket process. Mozilla's pingsender leaves in some launches and not in others
(measured: 6 short launches of 48, 5 long ones of 16).
- The kinds of processes follow the rule of the host paths: red only if a kind is in every measured launch of
  one engine and in no launch of the other. The other kinds, pingsenders included, are listed with their
  counts in not-judged[-a-a].json. The count rule for the pingsenders is gone. The separate pingsender
  executable and the pingsender's destinations are still judged, and so is the stock control's location
  utility process.
- process_tree: a pid of the tree stops counting only when it is born again as a process that does not join
  (plus the creator's name). A creator's end no longer excludes a child logged after it.
- Every Windows launch saves the raw 4688/4689 events of the tree and of the processes left out, with the
  reason, next to its footprint.
Unit rows 3464/3465.
2026-11-23 20:36:54 +01:00
feder-cr 3f63899afb tests: the covered window is measured only once Windows says the cover is in front and the tracker has been signalled (hunt run 45226548295)
The Windows half of the occlusion test judged the page after a Z-order change that the tracker never hears: WinWindowOcclusionTracker recalculates on
hooked events (foreground change, move or resize, minimize, state change, cloak, location change of a process that had a visible window), not on a
change of the Z-order, and the second move of the covered window went to where it already was, so it sent nothing. When the covered window kept the
foreground the tracker was never told, and the page stayed visible for the whole deadline.

The test now builds each precondition with calls the system honours and waits for it, with a deadline, as Windows reads it back:
- before the page is asked anything, the covered window is made topmost and moved by one pixel, and the test waits until nothing above it covers it and the
  page reads visible (a window of the same size opened over it by another session or by the load of the runner no longer reads as "hidden before anything
  covered it");
- the cover is made topmost, the covered window moves inside it, and the test waits until the read-back says the cover covers it ("the lab could not cover
  the window" otherwise, never a verdict about the page);
- the tracker is signalled after that with a real one-pixel move, repeated while the page still reads visible, so a page that never turns hidden is the
  engine's.

The step that only recorded, without a verdict, whether the system kept a plain Z-order is gone (it spent a full deadline in the control half and would
now read as kept every time); the foreground window and the number of signals are recorded on every run.
2026-11-23 19:07:26 +01:00
feder-cr e3572f289f ci: the host oracle's process tree takes a process only while its creator is alive in it
Run 45221868374 (Windows, idle launch of the 68): a Windows service (svchost wlidsvc), seven wevtutil and two
wsl of the oracle entered the engine's tree because their creator's pid matched a pid of the tree that Windows
had reused. The service never exited, so the wait for the tree's exit ran out and the A/A was broken.
process_tree now walks births (4688) and ends (4689) in order: a process joins only if its creator is alive in
the tree at its birth, and only if the creator's image matches ParentProcessName when the audit gives it.
A stranger that takes the pid of a process that has gone drops that pid. The trace turns on the
process-termination audit and puts it back afterwards; without it the tree relies on births alone.
Unit rows 3450/3451.
2026-11-23 18:20:50 +01:00
feder-cr 78271d32ce tests: with the engine off the host GL probe is born before the first goto (Linux) 2026-11-23 18:11:37 +01:00
feder-cr 16bf5d37c4 ci: the host job reads Windows' answer for location (CheckAccess) before and after turning it on, and is red unless Allowed
Run 45206303882 (gate, windows-2025): the location keys said Allow and lfsvc ran, and stock Firefox did not
start the Windows provider. Before it does, Firefox asks AppCapability("location").CheckAccess(), and that
answer was never read. The step now prints it before and after, and is red unless it is Allowed after.
2026-11-23 17:46:56 +01:00
feder-cr 71d8dfa4f6 Merge tests/journey-hang-guard (#579) into the integration for the candidates 2026-11-23 16:23:32 +01:00
feder-cr 1adc3f3ccf ci: a visit of the HTTPS and HTTP/3 walks is left only after its origin's favicon is served and the page is network-idle
A/A run 45189518824 (Linux): in one run the second visit of the HTTP/3 page asked for /favicon.ico, in the
other it did not. Over 14 transcripts of the day Firefox asks once per origin of a launch: in the journey
on the first page of each origin (140 of 140), on no page of the other steps (0 of 980), and in the walks
?v=1 always asks while ?v=2 does not (59 and 60 of 60). Hypothesis, not proved: the goto of ?v=2 races the
recording of ?v=1's favicon.
- settle_visit, the one point a visit is left from: the favicon of the page's origin has been asked for
  and served in full (WireServer.answered_at, marked after the last byte on http1, h2 and h3), then the page
  reaches networkidle. Each wait has the 120 s hang guard; one that reaches it is an error of the
  transcript that names the visit and the missing wait.
- The evidence of the transcript keeps the arrival and the end of the answer of the HTTP/3 requests,
  for the measure to make if this falls again. The journey is not touched.
- Unit rows 3443/3444.
2026-11-23 15:42:37 +01:00
feder-cr 2e2ce133df tests: the waits of the fake web's journey have a hang guard, and a wait that reaches it says its stage
Run 45176061220 (gate, Windows, network oracle): in one launch the runner was 3 to 4 times slower for
about 100 s. From the click to `load` steps 2 and 3 took 18.9 and 22.1 s (4.5 to 10.2 s on 480 pages in
6 runs), over the 15 s default deadline of the walk's context. A deadline meant for a hang became a leaf of
the comparison and the A/A of the published engine was red.
- TIMEOUT_MS becomes HANG_GUARD_MS (120 s), the deadline of every wait of the walk that has no time of its
  own; the wait for the noise uses it too. The back/forward keys and the networkidle time keep their own.
- A wait that reaches the guard says which wait, on which page, and the last request the site saw, in
  place of "Timeout Nms exceeded". Only the stage and the page are compared.
- Fake site pages that hold `load`: a click to a page that holds it 20 s is a passed step, and a page that
  never loads names `navigation to load` with a small guard.
2026-11-23 14:52:35 +01:00
feder-cr 472db8a7b3 Merge tests/oracle-controls-r2 (#578) into the integration for the candidates 2026-11-23 12:44:28 +01:00
feder-cr 5a328bb87c tests: the host e2e expects the stock control's footprint on Windows, in the A/A and with a candidate
Run 45165805370: the stock control passed (utility sandboxingKind=3) and the e2e was red only on the list of
footprints, which did not have it. expected_footprints holds the four cases (Windows/Linux, A/A/candidate).
Unit rows 3418/3419.
2026-11-23 12:44:06 +01:00
feder-cr 60f4fb7679 ci: the trace of the host oracle's stock control is rooted at the parent of stock Firefox, not at the oracle
Run 45162128126: stock Firefox answered getCurrentPosition (error 2) within a second and then stood in
`seed result` until its 120 s limit: the trace waited for the tree rooted at the oracle's own python, which
cannot exit (EXIT_LIMIT_S). The root is now the stock browser's parent process, found among the oracle's
descendants after the launch, as an engine's root is its parent; one not found is a broken control that says so.
Unit rows 3417/3418.
2026-11-23 12:23:04 +01:00
feder-cr 121cd4b5e0 ci: the host job turns on the runner's location service; the stock control has its own limit and says its phase; the network guard is the measured run plus 25%
Run 45153612447 (PR #578), host on Windows: the A/A was green, then the stock control stood still for more than 26 minutes,
until the test's guard killed the python child alone and nothing was said. On the runner the location service is off and
denied for the machine (lfsvc Disabled and Stopped, the machine's location consent Deny).
- e2e-host-windows turns the service on before any launch: lfsvc made startable and started, consent Allow for the machine
  and for the user's non-packaged apps. A setting that does not hold is red with its reason. The claim of the geolocation step
  is unchanged.
- The host test runs the oracle through crash.run_tree. The stock control runs in at most 120 s (crash.run_tree) and prints
  every phase, so a control that does not end says the phase it stood in.
- Network: the test's guard is the slowest measured run plus 25% (runs 45121964904 and 45153612447): 2197 s for the A/A,
  3285 s with a candidate. The network jobs of the PR have 50 minutes.
- Unit rows 3415/3416.
2026-11-23 11:59:07 +01:00
feder-cr b5f8865ea5 release 0.59.0: version and changelog (the unpublished 0.58.1 entry folds into 0.59.0) 2026-11-23 11:42:22 +01:00
feder-cr b1550faf89 ci: the unit rows counted again (3407/3408) and tests/test_glean_ready.py named in them 2026-11-23 11:02:42 +01:00
feder-cr efa6d948fe ci: the host and network oracles close only after Glean has initialised, and their controls say why they broke
Run 45121964904 (the gate of the 69) had three red controls, none from the candidate:
- network, Linux: the published 68 exited with -11 in the exit-pings launch. It is Mozilla's race:
  a session closed before Glean initialised makes it start inside the shutdown, where glean.init can
  panic ("No database found"). That launch had no window, so Glean was always born in the shutdown.
  Every launch of the two oracles now waits, right after its first page, for
  <profile>/datareporting/glean/db/data.safe.bin (a condition read from the host; 60 s is a red
  safety limit). The launch's own work always sits between the condition and the close. The
  exit-pings launch opens a page and navigates once before it closes, and its wait for the
  data-policy pref (which never came) is gone. The host's bare launch, never compared, is removed.
  Each launch keeps the listing of datareporting/ as evidence.
- network, Windows: the subprocess timeout killed only the python child; the firefox grandchild
  held the pipe and pytest timed out without a word. crash.run_tree writes the output to files,
  kills the whole tree, and names the launch that was alive and for how long.
- host, Windows: the stock control never started (Playwright's Firefox was not installed) and was
  reported as "does not reach the platform provider". It now runs after a green A/A on every
  Windows run, pull requests included. The job installs the browser, a missing executable is said by
  name, and a stock that ran without reaching the provider prints its processes and modules. A
  read-only step prints lfsvc and the location consent keys.
2026-11-23 11:02:42 +01:00
feder-cr 6d42084c95 Merge f2bd726e (#571) into the integration for the candidates
The partner tab of step 10 is closed from the walk's one point (Journey.leave) and the walk then waits
for its two pagehide requests, as integ already did; the fake tab of the unit test of that wait answers
the noise-done wait. The rows counted again by the collection: unit 3384/3385, suite.linux.2 412,
suite.windows.3 274.
2026-11-23 06:27:19 +01:00
feder-cr cf0c7ba3d2 Merge tests/ab-host-aa-stable into the integration for the candidates 2026-11-23 06:27:19 +01:00
feder-cr 3c09b863bf ci: the host oracle judges every host path by one rule, red only if in all measured launches of one engine and in none of the other, and lists the rest 2026-11-23 06:23:07 +01:00
feder-cr 583516ca34 tests: the host oracle's one rule on real A/A and A/B footprints and on built cases (red on the current judge) 2026-11-23 06:23:07 +01:00
feder-cr f2bd726ef4 tests: a page declares its noise done only once its fetch chain and its streams have sent their release
The network oracle of the run 45088980743 (Windows) saw `GET A/release?id=lp<TOK>` once in one run
of an engine and twice in the other: the home page of step 15 had sent its last stage and its
fonts, but its chain of seven fetches had not yet sent the release that ends it when the walk asked
for /account. window.__noiseDone did not cover that stage. It is now true once the fonts, the last
stage, the release of the fetch chain (stage 5) and the releases of the three aborted streams
(stage 9) have all been answered. A held request of a parked page stays out of it.

The check of the walk (journey_site.pages_left_before_their_noise) also asks, for every page, for
the release that ends its fetch chain, with the page as its referrer, before the walk leaves it.

Unit tests: a page left before that release is found; the page declares the new conditions. Both
red on the previous site. Counts: unit.all.linux 2426 -> 2427, unit.all.windows 2427 -> 2428.
2026-11-23 05:26:56 +01:00
feder-cr 715cbc9e59 tests: the late stylesheet of a partner page is read with the page's own URL as its referrer
The check of the p4 walk (journey_site.pages_left_before_their_noise) expected the late stylesheet
ld3 of a page of the other origin with the origin alone as its referrer. The partner page loads ld3
from its own origin: a same-origin request carries the whole URL of the page (O/partner/8). In the
run 45074928774 the stylesheet arrived 3 s after `load`, after the walk had waited for the page's
declaration, with that referrer, and the check called it missing (Linux job 137370233977, Windows
job 137370233997). The driver was right; the expected referrer was wrong.

Unit tests: the partner page is found by its own URL (red on the previous check, green here); step
10 closes the partner tab only after the wait for the tab's declaration (red when the cleanup
closes it at once); the source check also pins goto to the first page and forbids reload.

Counts: unit.all.linux 2424 -> 2426, unit.all.windows 2425 -> 2427.
2026-11-23 05:22:30 +01:00
feder-cr b44c5d64d0 ci: the rows counted again after #569 and #565 2026-11-23 01:20:30 +01:00
feder-cr 6582f222ce Merge 891abbf5 into the integration for the candidates 2026-11-23 01:17:08 +01:00
feder-cr afd5ca8f30 Merge 85a01e4b into the integration for the candidates 2026-11-23 01:17:07 +01:00
feder-cr 891abbf5ac tests: the refusal of two items with one name in createTempFiles is a wanted divergence, named in the budget with its witness 2026-11-23 00:48:51 +01:00
feder-cr c04752c86e fix: a stream is usable only by the context that made it; an unknown one is refused with the stock server's sentence
_upload_paths takes the context of the frame or the handle doing setInputFiles and accepts a WritableStream only if it is a child of that context. A guid that is unknown, or a stream of another context or another client, answers `streams[i]: no object with guid <g>` (the stock server's `_tChannelImplFromWire`); a guid of another type answers `object with guid <g> has type <t>, expected WritableStream`. Both doors (Frame and ElementHandle) pass their context.
2026-11-23 00:48:51 +01:00
feder-cr c8ac1fd329 tests: a stream is usable only by the context that made it, and an unknown one is refused with the stock server's sentence (red: another context's or another client's closed stream is accepted)
The stock server's streams are objects of one connection: a guid outside it answers `streams[i]: no object with guid <g>`. The unit tests drive the element's and the frame's setInputFiles with a closed stream of another context, of another client, and an own one, and read the exact sentence for a stream nobody made. Registry: unit rows +3.
2026-11-23 00:48:51 +01:00
feder-cr be7ac95cc4 fix: a path upload over connect is streamed into the session (createTempFiles and WritableStream served), and a file chooser the server cannot announce leaves a trace
A stock client on a remote connection uploads a path with createTempFiles, WritableStream write/close and setInputFiles{streams}; the server refused the first call with a sentence that said the opposite of the truth. BrowserContext now serves createTempFiles (one folder per call in the session's upload area, one file per item, names refused unless they are one bare file name, a folder refused as set_input_files refuses it, mtime from lastModifiedMs at close), the new WritableStream dispatcher appends and closes once, and _upload_paths reads streams as the closed files. The folder is removed by the context's released(), which a context close and a dropped client (_client_gone) both pass. The perimeter no longer names createTempFiles or write.

_announce_file_chooser records every early return in handler_errors, as the adoption failure already did.
2026-11-23 00:48:50 +01:00
feder-cr 43593669f6 tests: a path upload over connect is staged in the session, a stock client's file reaches the page whole, a file chooser the server cannot announce leaves a trace (red: createTempFiles is refused, four exits of the announcement are silent)
A stock client over `connect` uploads a path as a stream (createTempFiles, WritableStream write/close, setInputFiles{streams}) and the server refuses the first call. The unit file drives the real dispatchers and the served endpoint: names, one folder per call, write/close, the streams read by the upload, cleanup on context close and on a client dropping mid-copy. The e2e file gets a test that reads name, size, lastModified and bytes of two streamed files on the page, and its handler tests (2 and 4) now pass a Python function, which the client needs. Registry rows updated: unit rows +30, e2e rows +1.
2026-11-23 00:48:50 +01:00
feder-cr 209be2d08e tests: which path loses the file chooser: a direct click on an input, in process and on a served browser with a stock client, the event alone, a path and a payload, a fresh page (red: the evidence) 2026-11-23 00:48:50 +01:00
feder-cr 94f2b07540 tests: the real tap of an element leaves this branch: the engine cannot send a touch event since Firefox 159 (Juggler calls windowUtils.sendTouchEvent, which 159 removed); it waits on tests/a-tap-reaches-the-page-through-the-engine for the engine's fix 2026-11-23 00:05:18 +01:00
feder-cr f46565e900 Frame.tap of a context without touch is refused with stock's sentence before anything is looked up or sent (red: 2 unit); the e2e of the handle asks what stock answers: is_editable of a disabled button is stock's 'Element is not an <input>...' error, a page tap without touch is stock's refusal (+3 unit, +2 e2e) 2026-11-22 23:39:44 +01:00
feder-cr a75abbe7ec ci: the rows counted again after #566 and #568 2026-11-22 23:14:58 +01:00
feder-cr 6cda38db60 Merge fa849b58 (PR #568: the Linux e2e in three parts) into the integration for the candidates; the oracles' workflow tests read the Linux parts (e2e-linux) and their rows 2026-11-22 23:11:39 +01:00
feder-cr 4b216c9618 Merge 240f4ab6 into the integration for the candidates 2026-11-22 23:09:41 +01:00
feder-cr 690cbbdd16 ci: the rows counted again after #555 and #567 2026-11-22 23:03:55 +01:00
feder-cr b582b9e83d Merge 929ed9df (PR #567: the arguments of evaluate, the static check of the methods) into the integration for the candidates 2026-11-22 23:00:14 +01:00
feder-cr abf62dfe08 Merge 18f6225a (PR #555: the host oracle's rules, --junit, wrapper.e2e.ab_host_crash) into the integration for the candidates 2026-11-22 23:00:03 +01:00
feder-cr 88b3de4320 tests: the p4 walk leaves a page from one point, once the page has declared its noise done
Every page of the journey site now declares the end of its noise: window.__noiseDone is true once
the font stage is done (its stylesheet has loaded and document.fonts.ready has resolved after the
spans were laid out) and the last stage has loaded its stylesheet ld3; at once on a page without
noise.

The walk leaves a page only from Journey.leave, which waits for that declaration (deadline 30 s,
never a pause) before the act that leaves: every navigating click and Enter (Journey.navigate),
back and forward (history_step), closing the partner tab (step 10) and the end of the walk (the
context closes the last page). The same driver runs for stock Firefox and for ours, so the
verdict "same outcome as stock" is unchanged.

Unit tests (red on the previous commit's driver, green here): step 15, the form keys of steps 12
and 14, back and forward, the tab and the last page, a source check that every navigation, back,
forward and close of the walk goes through that one point, and the page's declaration.

Counts: unit.all.linux 2418 -> 2424, unit.all.windows 2419 -> 2425.
2026-11-22 22:51:11 +01:00
feder-cr bf3823036a tests: the p4 walk must leave a page only once its noise is done (red on the current driver)
The network A/A oracle on Windows differed at step 15 of the journey (ld3 1 vs 2, woff2 5 vs 7):
the walk clicks Account as soon as the home page has loaded, while the home page's noise still
runs on timers after load (fonts at 250 ms, the late stylesheet ld3 at 600 ms).

The lab can now make the last stage of the noise long (journey_site.start(last_stage_ms=...)),
and the site's record keeps the referrer and the type of every answer. The new e2e test runs the
walk with that stage at 3000 ms and reads the record: every page's ld3 (with the page as its
referrer) and its five woff2 must arrive before the walk's next navigation
(journey_site.pages_left_before_their_noise). The current driver leaves the home page of step 15
right after load, so the test is red on it by construction.

Counts: wrapper.e2e.fakeweb 4 -> 5, e2e.suite.linux.2 411 -> 412, e2e.suite.windows.3 273 -> 274,
unit.all.linux 2413 -> 2418, unit.all.windows 2414 -> 2419.
2026-11-22 22:44:57 +01:00
feder-cr 85a01e4be0 fix: a screenshot honours its scale: scale="css" is a picture in CSS pixels
PageDispatcher.op_screenshot sent omitDeviceScaleFactor false whatever the caller asked and never read `scale`: at a viewport of 1280x720 and a ratio of 1.25
page.screenshot(scale="css") was 1600x900, stock gives 1280x720. It now sends omitDeviceScaleFactor: scale == "css", as stock's Firefox page does. The element and
locator screenshots end in the same call, so they follow.
2026-11-22 22:33:42 +01:00
feder-cr b74a08c400 tests: a screenshot honours its scale: css pixels for "css", device pixels for "device" and by default (red: the driver always sent omitDeviceScaleFactor false)
Stock sends omitDeviceScaleFactor: scale === "css"; the driver never read scale, so at a viewport of 1280x720 and a ratio of 1.25 scale="css" gave
1600x900. Unit: the page, full page, clip and element calls put the right flag on the wire. E2E: at 1.25 and 2 the size and the pixels (colour blocks at known
CSS positions, one below the fold, one in an iframe) of the page, full page, clip and locators are those of the scale asked for. Both registered in the
wrapper.unit.all rows and wrapper.e2e.suite.{linux,windows}.1.
2026-11-22 22:33:30 +01:00
feder-cr fa849b582e ci: the unit rows count the tests of the final Linux job (2427 / 2428) 2026-11-22 22:21:47 +01:00
feder-cr 18f6225a95 Merge main (3527f573) into the A/B oracles: the rows and jobs of main kept as they are, the oracles' added
ci/required-suites.json: every row of main unchanged; the unit rows hold main's files plus the oracles' unit files, with the
minimum recounted (3080 Linux, 3081 Windows); the rows wrapper.e2e.ab_oracle, ab_network, ab_host and ab_host_crash added.
.github/workflows/e2e.yml: the Windows parts take their files from the rows wrapper.e2e.suite.windows.N (main's).
The oracles' e2e files are named as excluded in tests/test_the_e2e_suite_is_accounted_for.py (their own jobs), and the
oracle job tests check that no row of the shared suite holds them. The host oracle's unit tests take the 13 real WOF
lines of the Windows A/A and the 45 real lines of the Linux A/B of candidate run 45060573559.
2026-11-22 22:16:32 +01:00
feder-cr 0a6ae0e3e4 ci: the Linux e2e in three parts, one per row of the suite, and one check that waits for them
The single Linux job ran the whole e2e in 24.6 minutes on a normal runner and
35.7 on a slow one (every test slower by the same 1.44x), close to its
40-minute ceiling. It becomes a matrix of three parts, `e2e (linux, part N)`,
each running the row `wrapper.e2e.suite.linux.N` of ci/required-suites.json
(read with `ci_verdict.py args`, as the Windows parts read theirs) through
scripts/run_e2e.py under xvfb-run: the parallel pass with 4 browsers, then its
wall_clock tests alone. Every setup step of the Linux job stays; the uploads
are named per part (-linux-N).

The rows hold no test of wrapper.e2e.udp.exit or wrapper.e2e.udp.sandbox. The
root step and the sandbox step run in part 1 only (the lightest by the test
time of the Linux junit of run 45064266867: about 1893 s against 1988 and
2138), after its run, in the same order as before. The sandbox step now runs
the whole list of its suite (the file and the three node ids of the UDP line,
13 tests, as the gate's sandbox leg runs it): the rows leave those three
nodes to that suite, and without this they would run in no step.

A final job keeps the old check name, `e2e (linux, xvfb)`: it needs the
parts, runs with `always()` and the same gate of the core on the index, and
fails unless `needs.e2e-linux.result` is `success` (a failed, cancelled or
skipped part is red). While the core is not on the index it is skipped with
the parts, as the Linux job was.

Tests: the root and sandbox step tests read the new shape (rows of the parts
without the suites, the steps held to one part, the sandbox step to the
suite's list and count); test_ci_runs_once_per_commit.py holds the final job
(known-bad: no always(), accepting skipped, not needing the parts, exit 0,
another job's result, no gate of the core, success() || failure()). No change
to the registry, the judge or the series.
2026-11-22 22:13:02 +01:00
feder-cr abd471e031 tests: waiting for a state of a node that left the document answers as stock does for each of the six states: hidden and stable are met at once, visible, enabled, disabled and editable are 'Element is not attached to the DOM' (green on the code before: the core's injected script already answers as stock, measured on a detached node) (+6 unit, +6 e2e) 2026-11-22 22:10:15 +01:00
feder-cr 151824d806 The matches of a query rooted at an element are read in one command: the array is listed once with the core's properties, in numeric order, and the list is released; two commands for any number of matches instead of N + 2 2026-11-22 22:10:15 +01:00
feder-cr e8b1d1a0c9 tests: the list of a query rooted at an element is read in one command, whatever its length, in document order, and released when it cannot be read (red: 9 fail, the list is read by its length and then place by place) (+6 unit, +1 e2e) 2026-11-22 22:10:15 +01:00
feder-cr b720b66eba An element handle answers every method of the client but one: queries rooted at the element, its states, its gestures on that node, a handle of what a function returned; the wire-method budget loses 16 entries 2026-11-22 22:10:15 +01:00
feder-cr b3d9f167a0 tests: an element handle serves every method of the client, queries and states of the node, its gestures, a handle of what a function returned (red: 16 of the 17 answer 'a gap', 64 tests fail) (+64 unit, +22 e2e) 2026-11-22 22:10:15 +01:00
feder-cr 240f4ab63e tests: evidence of a popup that is not made: the activation, the gap from pointerdown, and null against a throw (run 45064266867) 2026-11-22 22:09:27 +01:00
feder-cr 6877a2dd28 tests: the page built again asks its new worker once: the second question got 2 (run 45064266867) 2026-11-22 22:08:08 +01:00
feder-cr 929ed9df3a tests: wait_for_function takes its argument as arg=, and the Date an exposed function answers is asked from the page's own realm (an evaluate runs in the caller's world, whose Date is another one) 2026-11-22 22:03:52 +01:00
feder-cr 56ca8b1ad1 tests: the refusals of an argument are pinned by their exact text, the decoder is pinned to the caller's world and leaves no global, and a page that counts Date, URL, Map, RegExp, Error and defineProperty sees none of them (+13 unit, +2 e2e) 2026-11-22 21:42:52 +01:00
feder-cr c0ee281f5b An ArrayBuffer (ab) in the argument of evaluate and its kin reaches the page: the page side of stock decodes it, so it goes to the decoder as it came; the tags this module handles are one constant 2026-11-22 21:41:22 +01:00
feder-cr 608ceea2f3 tests: every tag of a serialized value the driver accepts reaches the page, and an ArrayBuffer (ab) is one (red: ab is 'Attempting to deserialize unexpected value'; the tag list is read from the installed bundle's SerializedValue validator) (+19 unit) 2026-11-22 21:41:12 +01:00
feder-cr 012eca5db3 tests: the first launch from a new path runs in the serial lane: it starves the browsers of the parallel pass (run 45033639069) 2026-11-22 20:57:54 +01:00
feder-cr 51d2df9685 Every argument of evaluate and its kin reaches the page as Playwright sends it: handles, dates, URLs, errors, references, undefined and -0 are decoded in the page, not read as null 2026-11-22 20:54:15 +01:00
feder-cr 26804fcab3 tests: every form of an argument reaches the page as Playwright sends it, a handle, a date, a URL, an error, a reference, undefined, -0 (red: all of them reach it as null) (+73 unit, +23 e2e) 2026-11-22 20:54:15 +01:00
feder-cr 3c452f2e8d tests: the wire-method budget is checked out with LF on every system, as dump() writes it (red on the Windows runners: autocrlf) 2026-11-22 20:53:58 +01:00
feder-cr 645d68e05a tests: the clock guard sees a delay given to a lab server (rule lab-delay): such an e2e test is wall_clock or a reviewed entry 2026-11-22 20:37:58 +01:00
feder-cr 048340176b tests: the far-away gateway family, the whole UDP chain by name and the slow DoH run in the wall_clock lane 2026-11-22 20:37:58 +01:00
feder-cr 174f7a9a7f tests: a lab delay that the product answers in time is a wall-clock test (red: the guard does not see it, the far-away family is not in the serial lane) 2026-11-22 20:37:58 +01:00
feder-cr edf6153895 tests: every wire method the client sends is served, refused by name, or in a budget that only shrinks (26 holes, 3 partial) 2026-11-22 19:52:58 +01:00
feder-cr e64fc01e67 Merge main (3527f573: the characterization of firefox-68, PR #557) into the integration for the candidates 2026-11-22 19:43:37 +01:00
Federico Elia 3527f5736d Merge pull request #557 from oss-invisible/tests/characterization-69
tests: characterization of firefox-68 before the hooks of firefox-69 are reworked
2026-11-22 19:43:07 +01:00
feder-cr 30a5967409 ci: the accounting of the e2e suite counts the oracles and the host GL probe file (20 exclusions); the rows counted again 2026-11-22 18:58:24 +01:00
feder-cr f6aa5b4204 Merge b10b15af into the integration for the candidates 2026-11-22 18:56:06 +01:00
feder-cr 7a3bd43b7a Merge origin/char69/glxtest into the integration for the candidates 2026-11-22 18:56:05 +01:00
feder-cr 47022daa41 Merge origin/char69/occlusion-linux into the integration for the candidates 2026-11-22 18:56:05 +01:00
feder-cr 8a8a583664 ci: the rows counted again after the occlusion on Linux, the host GL probe and the held requests of p4 (the renamed p4 unit file) 2026-11-22 18:56:04 +01:00
feder-cr 3edbc3c791 ci: the unit rows' minimum follows the host oracle's install-folder, gfxtest and WOF tests and the host gate's junit 2026-11-22 18:55:39 +01:00
feder-cr 3e15901170 ci: the host oracle runs every engine from one folder, names the probe gfxtest, and reads a WOF stream as its file
Same install path: the content processes and the forkserver read the link of every
ancestor of <install>/omni.ja (Omnijar::ChildProcessInit -> realpath), so the 68 under
/tmp/ab-host-fetch-<random>/engines and the candidate under the checkout gave 10 leaves of
readlink per seed that were the place of the install. Each engine run (68, 68 again,
candidate) now copies the whole package to <RUNNER_TEMP>/ab-host/engine/firefox, runs from
there and removes it; nothing is normalised in the comparison.

gfxtest: the probe is labelled gfxtest (widget/gtk/GfxInfo.cpp:55 GFX_PROBE_BINARY); the
declared difference now names it (it named glxtest and was reported stale), and covers the
file leaves whose only toucher on the published side is that kind, in the seeds where the
kind is gone.

Windows: a path ending in :wofcompresseddata is the WOF compressed-data stream of the file
the process opened; the ETW reader reads it as that file. Other streams stay distinct.
2026-11-22 18:55:39 +01:00
feder-cr 4fff701c99 Merge b10b15af into the characterization line 2026-11-22 18:52:58 +01:00
feder-cr 2a7616b605 Merge origin/char69/glxtest into the characterization line 2026-11-22 18:52:58 +01:00
feder-cr 616919880a tests: the host GL probe starts only on an undeclared engine (Linux e2e)
A new e2e, Linux only (the GLX probe, gfxtest glx, is a child process of
Firefox on GTK; Windows has none): a declared engine starts no probe from
the launch to the page's WebGL context on firefox-69, and runs it on 68;
with zoom.stealth.fpp.hw_seed 0 Mozilla's probe starts on every engine.

The process tree is sampled with psutil in a thread from before the launch
(tests/_process_sampler.py). A poll can miss a child that lives tens of
milliseconds, so the launch runs under the strace stand-in (execve and the
clones only): every exec of the probe in the log must be a pid the sampler
saw as the probe, the sampler must cover the launch, and the log must hold
the browser's exec; otherwise the test is red with the problem, never green
on a miss. A unit file drives the real sampler with a fake tree.

Rows: wrapper.e2e.suite.linux.3 242 -> 244, Windows exclusion 16 -> 17;
wrapper.unit.all.linux 2382 -> 2389, wrapper.unit.all.windows 2383 -> 2390;
the firefox-69 gate is registered in tests/data/engine_gates.json.
2026-11-22 18:47:09 +01:00
feder-cr 887eb97bca Host gate: compare writes a junit with one testcase per invariant
--junit PATH writes the verdict of compare as xunit2: invariant:<name> for
each invariant and check:<name> for the other checks, classname
scripts.ci_host_gate (the path the hook tests name). A failed check is a
failure, a check with no dumps to look at is skipped.
2026-11-22 18:42:39 +01:00
feder-cr b10b15afdf tests: every held request of the journey starts after the load, the parked fetch of the category page too
The held fetch /hold?id=park of the category page (steps 7 and 8) was started by the noise script while the page was parsed, so
on an engine that announces a request before the commit the client attributed it to the previous document and did not count it.
It now starts from afterLoad(0, ...) like the keepalive fetch of the search page; URL, method and end are unchanged.
The unit test covers every held request (/hold with until) of every page of the steps that are not idle (7, 8, 12), and that no
other page of the journey holds one while it is parsed.
2026-11-22 18:40:02 +01:00
feder-cr f3e408a07d tests: on Linux the occlusion test owns its display and asks X whether the window was covered
The two sessions run on a private Xvfb (DISPLAY by monkeypatch, as the
focus test). The test's own libX11 connection selects VisibilityChangeMask
on the covered toplevel before the cover is mapped, raises the cover, reads
back once the stacking and the geometries (asserted: arrangement), and waits
for X's VisibilityNotify FullyObscured in both halves (never sent: red,
arrangement). With tracking enabled, FullyObscured sent and a page that never
turns hidden is red with a message that says ENGINE. The X record (window
ids, read-back, visibility events with their times) is kept on every run.
Windows side and product assertions unchanged. The parsing and the record
are unit-tested (10 tests, rows wrapper.unit.all.* +10).
2026-11-22 18:25:54 +01:00
feder-cr 9cf288fbd8 ci: the rows counted again after the navigation hook and the held ICE port 2026-11-22 18:04:46 +01:00
feder-cr 6c3f98b1b5 Merge e4f3dd27 into the integration for the candidates 2026-11-22 18:02:55 +01:00
feder-cr 78f34b2b1a Merge 153efcd156 into the integration for the candidates 2026-11-22 18:02:55 +01:00
feder-cr 7221b7da06 ci: the rows counted again after the navigation hook and the held ICE port 2026-11-22 18:02:54 +01:00
feder-cr 7e402528d0 Merge the reproduction of the held ICE port (e4f3dd27) into the characterization line 2026-11-22 18:01:05 +01:00
feder-cr 9745e5e754 Merge the e2e of the navigation hook (153efcd1) into the characterization line 2026-11-22 18:00:51 +01:00
feder-cr 153efcd156 tests: a same-site top-level goto is told moved (the browsing context is replaced); the negative case is a same-site iframe 2026-11-22 17:48:15 +01:00
feder-cr e4f3dd2712 tests: a port of the ICE socket that another process holds on loopback blinds the checks of two connections (red on firefox-68 on Windows; firefox-69 binds it exclusively) (+1 test) 2026-11-22 17:42:21 +01:00
feder-cr 7473b7e933 ci: the unit rows counted again after main 2026-11-22 17:05:25 +01:00
feder-cr a053458faf Merge main (3946c6c0: the evidence of the actions without a point) 2026-11-22 17:03:51 +01:00
feder-cr aebf02da8a ci: the unit rows counted again after main 2026-11-22 17:03:50 +01:00
feder-cr 33701e89d9 Merge main (3946c6c0: the evidence of the actions without a point) 2026-11-22 17:01:56 +01:00
Federico Elia 3946c6c024 Merge pull request #562 from oss-invisible/tests/actions-without-a-point-evidence
tests: the hidden-elements actions test keeps its evidence when it fails (second batch of the intermittent e2e)
2026-11-22 17:01:30 +01:00
feder-cr 9f575af60f ci: the unit rows' minimum follows the network oracle's evidence tests and the page oracle's crash records 2026-11-22 16:58:02 +01:00
feder-cr 1b54d76744 ci: the page oracle keeps what every browser wrote and records a tab that died as a leaf of its own
A candidate run lost the tab of a visit ("cannot find session" in every state.*) and the artifact held only args, json and xml: the crash was inferred.

* The launch probe puts a tee in front of the core's own reader of the browser's output (stdout and stderr on one pipe), so the whole output of EVERY launch is
  saved in crash/<run>/stderr/ whether it ended well or not, and a launch that never made a connection keeps its output too. A launch whose output could not be
  kept is red. Nothing is written to the browser: same environment, prefs, durations and launch count.
* The cores written since a launch began go through gdb whatever code the parent ended with (a content process can die and the parent end with 0); such a launch,
  or one with a minidump, is red. A launch with no core says where it looked.
* A tab that died or a session that was lost during a visit is the leaf crash.tab.<launch> (error and step) in the dump, not a cascade of state.* errors. The
  comparison puts "TAB CRASH side S seed N dpr D launch L at step ..." first, red on that leaf alone, and counts the leaves the dead tab could not read instead
  of listing them as <missing>.
2026-11-22 16:57:31 +01:00
feder-cr 2bafbb8dc7 ci: the network oracle's HTTP/1.1 site ends each connection after its answer, and each seed keeps its requests with their connection and moment outside the compared leaves
A/A run 45025164169 (engine candidate, oss-invisible/firefox_antidetect_patch) broke on both systems.

Linux: the HTTP/1.1 site had a resumed connection on one seed of one run and on none of
the five seeds of the other. The labs are already fresh for every seed (a new certificate,
a new TLS context, so new ticket keys, a new journey site), so nothing is shared between
the two runs: whether the browser opens a second connection to the site while the first
is still busy, before it has read the session ticket, is the pool's race. The site now
answers with Connection: close and ends the connection, so every request after the first
rides a connection opened after the ticket was read, and the resumption happens on every
seed of every run. The default of the capture server stays keep-alive.

Windows: step 15 of the journey (logo, then Account) had one request counted 2 against 1
(release, first Referer "/" against "/account") and the font 10 against 5, on seed 0 of the
second run only. The transcript folds a request into a count and drops the connection and
the moment, so it cannot say which page sent it. The tees now write the connection of each
head and the lab the moment; each seed's transcript keeps, outside the compared leaves
(like exits), the requests of the journey with connection, stage, referer and time, and the
connections of the HTTPS sites with time, stage, resumption and the requests of HTTP/1.1.
Nothing is excused for it.
2026-11-22 16:57:31 +01:00
feder-cr 174602e4ac ci: the unit rows' minimum follows the recorder's tests of how a launch ended 2026-11-22 16:37:23 +01:00
feder-cr 9196a86389 ci: a browser whose parent does not end with 0 is red in the page, network and host oracles, and what it left is kept
Every launch of every oracle (measured, idle, relaunch, warm-up, bare; A/A and A/B) is judged by how its parent ended: a code other than 0, or not seen, is a red
line naming the side, the seed, the launch and the code. A launch that did not end with 0 keeps, in the oracle's artifact, the strace tail and the fatal signal lines
(host), the core through gdb (thread apply all bt, the MOZ_CRASH reason, info sharedlibrary) with the build ids, the .extra and the minidump names, and what no
collector found. The trace records the fatal signals now and drops the signal lines where the log is read. Cores are enabled in every launch without touching the
working directory, the environment, the prefs or the crash reporter. The recorder's own e2e (a parent sent SIGSEGV is red with its evidence) runs in the host job.
2026-11-22 16:36:47 +01:00
feder-cr 0471b59911 tests: the network oracle's job test reads the Windows parts from the suite rows, where its files are in no row 2026-11-22 16:28:58 +01:00
feder-cr e1e6f416bc tests: the gateway reads a request's address in a static method again (as main's far-away watch wraps it); the address type is a thread-local of the module 2026-11-22 16:28:58 +01:00
feder-cr fd5d92cbfc tests: the gateway reads a request's address in a static method again (as main's far-away watch wraps it); the address type is a thread-local of the module 2026-11-22 16:28:58 +01:00
feder-cr 5947f04cf1 tests: a failed set_content of the hidden-elements test leaves the wire, the contexts, the stalls of the process and the runner's load (+10 tests)
The test was red once on Windows ("Runtime.evaluate: no response in 30s" at set_content) with nothing saved, so it could not be classified as a stall of the browser or an evaluate sent to a context that no longer answers.

The test now arms the Juggler wire and the engine's trace before the launch, records the client's frame and page events and each call, and saves them only when its body fails. The reading of the wire no longer depends on a marker in the code: every command with no answer is joined with its context, frame and url (when it was sent and at the end of the log), with the time it waited and whether its context was destroyed since; an answer says how long it took. A stall witness of the process and the runner's load run on the wire's clock, and one line of both goes on the exception as a note.

No probe changes the call it observes: nothing raises into the test, the unit tests make the recording, the probes and the note fail on purpose and the exception is the same object.
2026-11-22 16:23:13 +01:00
feder-cr 9533a9a35c Merge the Glean test of generate mode (13049ab0): firefox-69 carries both properties in the registry of engine gates 2026-11-22 16:21:32 +01:00
feder-cr 8f2f9e992a Merge remote-tracking branch 'origin/main' into integ/candidate-69 2026-11-22 16:19:31 +01:00
feder-cr ce328d8888 ci: the rows counted again after main and the Glean test 2026-11-22 16:16:36 +01:00
feder-cr 53f32936f0 Merge commit '13049ab0' into tests/characterization-69 2026-11-22 16:14:25 +01:00
feder-cr 1696d04a6d Merge main (b28bffd7: the first batch of the fixes of the existing tests) into the characterization line 2026-11-22 16:14:25 +01:00
Federico Elia b28bffd7af Merge pull request #561 from oss-invisible/tests/install-wait-without-a-real-clock
tests: first batch of fixes for the intermittent e2e of main (the install wait, the goto-stopped setup, the moving page's goto model, a read's timeout)
2026-11-22 16:13:44 +01:00
feder-cr e5ebd87472 ci: the entries of the suite rows are sorted 2026-11-22 16:13:16 +01:00
feder-cr 19e4fcc3cb Merge the two e2e of the navigation hook (tests/a-navigation-that-moved-is-told-by-the-engine, d4ba9b50) into the integration for the candidates; the rows counted again 2026-11-22 16:12:27 +01:00
feder-cr 13049ab0c9 tests: generate mode does not start Glean on firefox-69, and does on 68 2026-11-22 16:12:26 +01:00
feder-cr 02a7ac2766 Merge the oracles of the page, the network and the host (PR #555, 2851d1d9) into the integration for the candidates 2026-11-22 16:10:23 +01:00
feder-cr a9542fb863 Merge the batch of the fixes of the existing tests (tests/install-wait-without-a-real-clock, fd7d8a64) into the integration for the candidates 2026-11-22 16:09:38 +01:00
feder-crandClaude Sonnet 5.5 8095253e06 ci: the unit rows' minimum follows the page oracle's job test and the poison control's tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 15:53:48 +01:00
feder-cr 704851f0e7 ci: the control's reference is a Playwright Firefox that reads the machine's scheme, and the Windows canary is installed machine-wide
Run 45026082150: stock Firefox read no dark scheme on either system and, on Windows, did not see the per-user canary.

* the scheme: Playwright's playwright.cfg sets pref("ui.systemUsesDarkTheme", 0) (line 157 of the cfg of the build we install), and
  widget/nsXPLookAndFeel.cpp GetIntValue reads a set pref before the system (NativeGetInt: GTK's theme, the HKCU
  AppsUseLightTheme value of Windows), so whatever the poison says the stock reads light. The control now launches a COPY of that
  Firefox whose cfg has no such line (the same build and prefs otherwise; refused if the cfg or the line is not there), and says
  what it took out in poison-control.json. The control was never headless: the engines of the oracle run on a hidden desktop (the
  core's _headless.py), headed, and only `-headless` would use the hardcoded light of widget/headless/HeadlessLookAndFeelGTK.cpp.
* the font: on Windows the canary goes to the Fonts folder of the system and under HKLM (the runner is an administrator); undo
  removes both.
* nothing is in trial now: dark and the Windows canary are required again.
2026-11-22 15:52:55 +01:00
feder-crandClaude Sonnet 5.5 c6ca3ebaf5 ci: the page oracle's A/A has jobs of its own on a pull request, Linux and Windows, and the shared jobs leave its file out
Run 45030727459: the shared Linux e2e job hit its 40 minutes with every test passed; the page oracle (5 seeds, the H7 relaunch and the ab. visits) took 38 of them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 15:52:51 +01:00
feder-cr fd7d8a64aa tests: a failed far-away gather says the control connection's times, the core's UDP measurement, the stalls of the process and the runner's load (+25 tests)
Both far-away gathers (the one with an rtt and the one after the page loaded) kept no record of where the time went when the core's UDP
measurement ends unmeasured. The watch now also starts, with the gateway's own record: a read of the control connections' times (connect,
greeting, authentication, ASSOCIATE asked and answered, and the longest wait inside the gateway for an answer); a handler on the core's
logger invisible_core._udp_exit at DEBUG, set and removed around the test, next to marks of the launch; a daemon thread that beats every
50 ms and keeps the gaps over 200 ms; and the runner's CPU and load every 0.5 s with psutil. They go in the saved evidence (cells.json,
stall-witness, runner-load, core-udp-exit-log) and as four short lines in the failure message (a note of the exception when the failure is
not an assertion). The second test now keeps evidence too. No budget, threshold or retry changes; every recorder takes one dict per record,
never raises into the test or a server, and a unit file makes each fail on purpose (clock, load source, log record, records list) and makes a
real stall of the whole process (a GIL-holding call) to see the witness catch it.
2026-11-22 15:30:30 +01:00
feder-cr b58e078035 tests: the journey's held keepalive fetch starts after load, not while the page is parsed (+5 tests)
Step 12 of the p4 journey asserts that an open keepalive fetch keeps networkidle from being reached. The search results started that fetch
during parsing, which races with the commit being told: the engine announces the request at once, the commit waits for the handshake, and
the client drops the request at the commit (the reference Juggler does the same). The page now starts it with afterLoad(0, ...), a task
after the load event, so the step tests the rule and not the race; the verdict and pages.json are unchanged. A unit test reads the served
page and forbids the held keepalive fetch outside an afterLoad callback.
2026-11-22 15:23:42 +01:00
feder-cr b1673988b4 tests: a lab guard reads the host interfaces once, not at each refusal
A gateway of the lab refused the browser's CONNECTs to the DoH the core
declares (162.159.61.4:443) 117 and 254 times in two single tests, 2296 in
one leg, and every refusal read the host interfaces again with psutil in the
pytest process that runs the core's UDP measurement.

LabGuard now reads the interfaces once, when it is made, and judges every
destination against that reading: a refusal is a synchronous list append.
The decision-time reading (and its read_errors path) is gone; the reason of
a refusal says the reading was made when the gateway was made.

test_a_guard_reads_the_interfaces_once_however_many_destinations_it_refuses
counts the readings of a fake psutil: 1 for 40 refusals and 3 decisions
(44 on the old code).
2026-11-22 15:22:04 +01:00
feder-cr 06e49f0b4d ci: the Windows e2e jobs keep TEMP and TMP on D:, as on tests/characterization-69 (766961dc, the same lines)
The Firefox profiles land in TEMP. On C: the four browsers of a part saturate the runner's disk and the parent's main thread stops for
seconds: A/B of the engine series, run 44780607530 (profiles on C:, 5 stalls) against run 44780612863 (TEMP on D:, none). Seen again on
this branch, run 45028125122, Windows part 3, test_fakeweb_p4_e2e step 1: the lab answered "/" at 1137.21 and the engine committed at
1144.78; no request reached the lab from 1137.21 to 1146.94 and from 1147.12 to 1156.22, while the 7 requests reported in flight had all
been answered and closed by 1147.12.
2026-11-22 14:57:51 +01:00
feder-cr ef0d836c28 tests: the storage test of the second page saves the frames, the wire and the evaluate's context when it fails (+15 tests)
The B frame of the second page raised "Execution context was destroyed" at window.__r once on Windows. Nothing here changes an assertion, a wait or
a deadline: the module arms FailureEvidence before the browser launches (Juggler wire, the engine's trace), and a failing test saves the client's
framenavigated, frameattached and framedetached of both pages with url and name, the times at which wait_frame returned and the evaluate was
called, page.frames at the failure, and a reading of the wire that joins the evaluate's context id with its frame, url and answer.
Every recording runs in one guard and takes its data under a single field, so none can raise into the test or collide with a field of the data.
2026-11-22 14:51:30 +01:00
feder-cr 2851d1d934 ci: the unit rows' minimum follows the A/B oracle's poison and realm tests 2026-11-22 14:45:11 +01:00
feder-cr 9c70b5abf7 ci: the control's scheme and Windows canary are in trial, measured and told but not required
Run 45026082150: the page A/A was zero on both systems, and the negative control read, for stock Firefox, no dark scheme on either
system and, on Windows, did not see the per-user canary font. Until a run shows that stock reads them they are IN_TRIAL: still
measured, printed, written to poison-control.json (in_trial) and to the job summary, never silently, but they do not make the control
broken. Everything else stays required: language, zone, formats, the canary and fonts.conf on Linux, the audio sink.
2026-11-22 14:44:45 +01:00
feder-cr aaebd7384f ci: the poison's verify reads what the system reports, the control follows the system scheme and a canary measures its own width, and the ab leaves leave out the launch's own noise
Run 45024276134 (page oracle A/A on the poisoned host), the harness defects:

* Windows: Set-WinUserLanguageList keeps the tag 'ja' for ja-JP, and verify wanted 'ja-JP'. The apply now records what the OS reports
  (culture, language list, zone, theme); verify holds the machine to that record and, separately, to the semantic check that culture
  and first language are Japanese, so it stays red when the poison is not in force and does not depend on the form of the tag. A
  failed apply also tells the later steps where its state is, so the undo runs.
* the negative control used Playwright's default context, which emulates a light scheme: it follows the system now (no-override),
  and requires that stock reads a Japanese format.
* the canary was 'present' when it measured differently from a generic family, which on Linux are the canary itself (the user's
  fonts.conf): it is present when a text measures its own width (216 px).
* the ab visit's canvas and OffscreenCanvas PNGs carry the launch's own deBG chunk (the host gate's noise.png_deBG), and the iframe
  origin carried the site's random port: the PNGs are hashed without that chunk (and the pixels are hashed too) and the port is
  not recorded.
2026-11-22 14:44:40 +01:00
feder-cr 2d0660c85d ci: the Linux poison also sets the user's fontconfig, and the poisoned run keeps what the published engine reads from the host
* ~/.config/fontconfig/fonts.conf makes the canary the first choice of sans-serif, serif and monospace and sets antialias off, full
  hinting, rgb subpixels and the light LCD filter; undo restores the file that was there or removes the one the poison wrote. The
  page probe measures the three generic families; the negative control requires stock Firefox to pick the canary for all of them on
  Linux, and an engine that does is a finding.
* the published engine is dumped on the clean runner before the poison (ci_ab_oracle.py clean); the oracle's own run is the poisoned
  dump of the same seeds, and every leaf that differs is written to poison-host-dependence-68.json and to the job summary: a host
  dependency the published engine already has, a finding and never a verdict.
2026-11-22 14:44:37 +01:00
feder-cr 91b576aed2 ci: the page A/B oracle reads a poisoned host and every realm a page can make, and holds both to the declared identity
The comparison of two engines on one machine lets through a value both read from it. The page oracle's leg now runs on a machine given
values the engine must never read, and the dumps are held to what the persona declares:

* scripts/ci_poison_host.py: apply, verify and undo per system. Windows: the zone of Lima (tzutil), the ja-JP culture and user language
  list, the dark scheme (HKCU AppsUseLightTheme and SystemUsesLightTheme), a per-user canary font. Linux: TZ, LANG, GTK_THEME, a
  user-installed canary font, and a null PulseAudio sink at 96000 Hz with 6 channels as the default. The canary is generated, byte for
  byte the same every time (no third-party font). Every PowerShell forces the invariant culture first, and the state it keeps is text
  read before any change. `control` is the negative control: Playwright's own Firefox on the same runner must read the offsets of Lima,
  the dark scheme, the canary's width and, on Linux, the 96000 Hz sink, or it is a broken control. The dumps' findings are the host's
  values against what the identity declares (the core's prefs of the seed and the retail reference).
* host_gate_page.html: the ab.poison probe (one block between two markers, which the control evaluates too).
* scripts/host_gate/ab and ci_host_gate.py: an extra visit of seeds 0 and 63 in a launch of ja-JP and in a context of de-DE and
  America/Lima: the top window, a cross-site iframe, a srcdoc iframe, a worker, a shared worker, a service worker answering a
  navigation, an audio worklet, OffscreenCanvas, canvas and WebGL hashes in each, window.open with and without features, the
  Accept-Language the server saw per kind of request, and a re-read after back/forward. Leaves are under ab. (skipped by the retail
  comparison like diag., compared by the A/B). Seed 63 is the control of seed 0: it must differ on at least AB_CONTROL_MIN leaves.
* the page oracle's test checks that the ab visit read, that the control held, and on a poisoned host that the poison is in force,
  that stock Firefox read it and that neither engine did.
2026-11-22 14:44:18 +01:00
feder-cr d4ba9b5046 tests: the registry of engine gates knows the firefox-69 test of a moved navigation; the e2e file is LF 2026-11-22 14:41:05 +01:00
feder-cr 6ff74cd2a0 ci: the unit rows' minimum follows the page oracle's final shards 2026-11-22 14:36:57 +01:00
feder-cr f21523aba7 ci: the page oracle visits seed 0 twice on one profile (second launch under relaunch.), the final seeds have an A/A in four shards on their own jobs, and the e2e guard is sized from the shard
The dump launches seed 0 a second time on a profile folder a first launch used, in the wrapper's persistent context, and keeps that launch's items under the relaunch. prefix of the visit: the retail comparison never reads them, the A/A and the A/B hold them to equality, count them apart from the visit's floor, and are red when a side lacks them. The e2e reads AB_ORACLE_SEED_SET and AB_ORACLE_SHARD and sizes its hang guard from the seeds of its shard, the engine runs and the extra launches. e2e.yml has a touched step and two jobs (Linux and Windows) of four shards each for the A/A of the final set, run only when a pull request changes a file of the page oracle.
2026-11-22 14:35:59 +01:00
feder-cr 3fa1232011 ci: the cap of rare system modules does not count a resource file with its library or a catalog under catroot, and says so
Run 45024863785: the host A/A of Windows was red for 21 rare modules in the measured launches of run A, 6 catalogs under catroot and 15 resource files, no library.
- A .mui does not count when its library (the same name without .mui, one folder up from the language folder) is among the modules seen in that run, in any launch: the
  library carries the count. An orphan .mui counts.
- A .cat under catroot does not count (Windows signature verification, not a module the engine chooses).
- Libraries and every other file keep the cap (5; 30 in the long layer), which is not raised.
- The report always prints the numbers: counted, .mui excused, .cat excused, orphans. In the A/B the .mui and .cat the 68 and the candidate opened are listed, and a new
  library shows through the library itself.
2026-11-22 14:33:05 +01:00
feder-cr 3b094de0a7 ci: the unit rows count the p2 history tests 2026-11-22 14:31:34 +01:00
feder-cr fe8b648f2a tests: the download test keeps LF line endings 2026-11-22 14:27:57 +01:00
feder-cr 86c2066571 tests: the download left to Firefox keeps the network and JS download logs, and its evidence from about 10 s
(cherry picked from commit 10c552698fe0a53b4ef7f1aaa86e94bfbcfdddbd)
2026-11-22 14:27:35 +01:00
feder-cr 8044dc0cb5 test(fakeweb p2): a round that does not idle keeps the whole in-flight list, what the lifecycle held open at the expiry, and each open request's history on the Juggler wire (+4 unit tests)
(cherry picked from commit c7b8c4533e)
2026-11-22 14:26:58 +01:00
feder-cr 36cba6a41a tests: a navigation the engine moved to another process is told by the engine (firefox-69), and one that stayed is not 2026-11-22 14:24:26 +01:00
feder-cr d922dffc86 tests: the far-away gather's watch records through one guard and never raises into the gateway (+7 tests)
The record of a datagram carried the keyword 'source' twice, which raised in the gateway's own inbound thread, so no datagram was relayed.
Every recording of every wrapper now runs in _Watch.safely, after the original call, with the journal field renamed origin. A unit file
drives a real gateway (UDP ASSOCIATE and a relayed datagram), also with each recording made to raise.
2026-11-22 14:23:31 +01:00
feder-cr a84cb8d95f Merge remote-tracking branch 'origin/char69/cores' into tests/characterization-69 2026-11-22 14:17:21 +01:00
feder-cr 52b2fa1344 tests: the occlusion test records, in both halves, whether the order without topmost is kept and who has the foreground
Before the topmost arrangement each half now does the plain one: the covered
window is inserted right after the cover, with no topmost. It then waits for
the answer the half waits for anyway (hidden with tracking, two frames
without) and records, as evidence and never as a verdict, the calls' answers,
the Z-order from GW_HWNDFIRST down to the covered window, and the foreground
window with its pid and process. It also records whether that pid is one of
the two sessions' engines (the owners of the two windows). FailureEvidence
saves the record under $RUNNER_TEMP/invpw-evidence/test_window_occlusion/ on
every run, green or red. Every message carries, per half, "order without
topmost: kept / not kept, foreground: pid X (engine yes/no)". The topmost
arrangement, the precondition read once and the assertions are unchanged.
2026-11-22 14:11:06 +01:00
feder-cr 8f6995c45b tests: the occlusion test makes the covering window topmost and records the arrangement it reads back
In e2e run 45022307128 (windows, part 4) the control half passed, and the
product half was red at the precondition: SetWindowPos returned success and
the covered window took the requested rectangle, yet the covering window was
not above it. The plain insert-after was never kept for that half (the state
read the same for 30 s). The test did not record the Z-order or the
foreground's process, so it cannot tell a request the system did not keep
from a covered window raised back.

The covering window is now made HWND_TOPMOST (the system keeps it above every
non-topmost window, whoever has the foreground), and then the covered window
moves inside it with SWP_NOZORDER | SWP_NOACTIVATE; that move, last, is the
tracker's signal. The precondition is read back once, right after. Every red
carries both calls' return values and GetLastError, the Z-order from the top
down to the covered window (process, class, topmost), and the foreground
window with its process, read right after the arrangement and again after
the page answered. The assertions are unchanged.
2026-11-22 14:01:08 +01:00
feder-cr 866436f822 tests: the core of any crash is read by gdb after the test that fails (temporary)
The -11 at the exit of the security state's generate (runs 44985244053, 45014369018) left no core: a release build crashes in silence, and only a core
tells a wanted crash (gMozCrashReason) from a bad access. tests/_crash_cores.py, TEMPORARY:

* tests/conftest.py raises the soft RLIMIT_CORE of the pytest session to its hard limit once, at pytest_configure, on Linux: every engine a test starts
  inherits it, the core's own launches included;
* a pytest_runtest_makereport wrapper, after every phase that fails, has gdb read every core* in $INVPW_CORE_DIR (all threads' backtraces and names,
  the signal's address, gMozCrashReason, registers, shared libraries with build ids, mappings; the executable from the core's header, else
  INVPW_BINARY_PATH) into $RUNNER_TEMP/invpw-evidence/cores/<test>/ and deletes the core; the cores left after a passing test are deleted and listed in
  cores/after-passing-tests.txt.

tests/_generation_evidence.py keeps only stdout, stderr and the profile's files of the core's launch: its core-limit raising and its own gdb call are
gone, and the direct launch of tests/test_security_state_engine_e2e.py no longer lifts its limit. The proof with a fake engine that dies by SIGSEGV
through the core's real generate now asserts gdb's text with a backtrace on Linux (where a core lands and gdb exists) and the Linux-only note on
Windows; tests/test_the_core_of_a_crash_is_read_by_gdb_after_a_failed_test.py drives the conftest hook with a fake core and a fake gdb on every
system. Unit rows: +4 each (2301 Linux, 2302 Windows).
2026-11-22 13:48:52 +01:00
feder-cr dd1fa5324e tests: the two-connections loopback test also keeps the statistics of both connections, the browser's stdout and who holds UDP 5353 when it fails
The page records the time after each of the four descriptions and, when the wait is over (or an await throws), the getStats of BOTH connections: every local and remote candidate and every candidate pair with its checks sent and answered. The connections are closed in the page whatever happened. The launch's stdout (the engine's timecards) is copied to engine-stdout.log by wrapping the stream the core hands to its own reader, in the test process; MOZ_LOG becomes timestamp,sync,mdns_service::*:3,mtransport:5,signaling:1 (the timecard exists only while signaling is enabled). When a run is not right, the machine's holders of UDP 5353 are written while the browser is still up (Get-NetUDPEndpoint and Get-Process on Windows, ss on Linux). No assertion, wait or deadline changes.
2026-11-22 13:47:22 +01:00
feder-cr 8a57737969 tests: the popup's recorder binds the error text before the lambda that writes it (F821) 2026-11-22 13:22:54 +01:00
feder-cr 10d15eee00 ci: the unit rows name the files of the merged fixes, counted again 2026-11-22 13:19:47 +01:00
feder-cr 5f64171b68 Merge commit '6f0a3af9' into tests/characterization-69 2026-11-22 13:17:20 +01:00
feder-cr ebcf4ab793 Merge the evidence of a failed security-state generation into the characterization line 2026-11-22 13:17:19 +01:00
feder-cr 06f0de8a7f Merge remote-tracking branch 'origin/char69/ownaddr' into tests/characterization-69 2026-11-22 13:17:10 +01:00
feder-cr 3571ea427e Merge the first batch of the fixes of the existing tests (PR #561, d76ecfbf) into the characterization line 2026-11-22 13:17:09 +01:00
feder-cr 72c7e6acf6 tests: the far-away gateway gather saves, when it fails, where the page's STUN request went
Evidence only (webrtc-far-away-<ice row>-<rtt>): the gateway's control connections and datagrams with their times and addresses,
the page's candidates, ICE errors and gathering states, the timings, the Juggler wire and the addresses of the runner.
Assertions, waits and deadlines are unchanged.
2026-11-22 13:12:02 +01:00
feder-cr 78670896b9 tests: the core's own generation of the security state keeps its evidence when it fails (temporary)
In run 45014369018 the -11 came from the CORE's generate, which _ready calls once per module and whose outcome three tests share; the test's own
launch had exited 0, so its save path never ran, and the core's launch writes stdout and stderr to the null device, deletes its work profile before
it raises and keeps the test process's core limit of 0. tests/_generation_evidence.py wraps the core's launch while _ready runs it: stdout and
stderr to files, the soft core limit raised to the hard one (Linux), the profile's files noted at the engine's exit, and on GenerationError all of
it saved in $RUNNER_TEMP/invpw-evidence/security-state-generate-core with gdb's backtrace where a core lands. The direct launch lifts its limit the
same way (preexec_fn, no sh wrapper). A unit test proves it with a fake engine that dies by SIGSEGV through the core's real generate.
2026-11-22 13:08:58 +01:00
feder-cr e461d9d763 test(h3 lab): the residual case of the QUIC-first order is measured: a client that starts a QUIC handshake and vanishes holds the TCP of its IP until the QUIC idle timeout (+1 unit test) 2026-11-22 13:07:46 +01:00
feder-cr 365df5d90f test(read after goto): the test saves, when it fails, the client's view of every request and navigation, the Juggler wire, the engine's trace and the server's record of the requests it served 2026-11-22 13:06:26 +01:00
feder-cr aa078c0ff9 test(popup): the server-side recorder passes every call through unchanged and a recording error never reaches the server 2026-11-22 13:06:00 +01:00
feder-cr 2ab0b97072 test(popup): the 25 s popup saves, when it fails, the engine's wire and trace, what the server sent to the client and did with the target, what the client heard and the destination's record 2026-11-22 13:05:59 +01:00
feder-cr 5e70b513ce tests: the two-connections loopback test keeps what the lab heard on the mDNS group, packet by packet, when it fails
A passive listener (tests/_mdns_listener.py) joins 224.0.0.251:5353 on 127.0.0.1, the interface the engine's responder joins, before each launch and records every packet with its time, source, query or response, names and addresses. It never sends or answers, shares the port with the engine's socket and never raises. No assertion, wait or deadline changes.
2026-11-22 13:05:59 +01:00
feder-cr c0683e010b tests: the two-connections loopback test keeps the mDNS and mtransport logs and the page's ICE timeline when it fails
On failure the test saves the engine's own log of the failing launch (mdns_service and mtransport, MOZ_LOG_FILE in the evidence folder), the timings and the page's timeline of every launch up to it: each icecandidate of both connections, every ice and connection state change, when each addIceCandidate was called and settled. No assertion, wait or deadline changes.
2026-11-22 13:05:59 +01:00
feder-cr 525832571f tests: the no-proxy HTTP/3 test keeps the engine's HTTP log, the lab server's record and the visit timings when it fails
On failure the test saves the engine's own log of the launch (nsHttp and the neqo_glue, neqo_http3 and neqo_transport modules, MOZ_LOG_FILE in the evidence folder), the lab server's record of every TCP and QUIC connection (start, handshake, each request with its path, close and reason) and the url, protocol, goto time and read time of each visit. No assertion, wait or deadline changes.
2026-11-22 13:05:55 +01:00
feder-cr 6f0a3af9fd tests: the focus test gives the X input focus itself, as the window manager the private Xvfb lacks
On the private Xvfb no window manager runs, so nobody calls XSetInputFocus: the
focus stays PointerRoot and GDK activates the toplevel under the pointer
(has_pointer_focus when no _NET_SUPPORTING_WM_CHECK), while Firefox presents a
window (gtk_window_present_with_time, XSetInputFocus without a WM) only when it
is not active already. XGetInputFocus therefore read PointerRoot for the whole
wait although the first page had the focus.

The test now does the window manager's part on Linux: it finds the window the
step names by its _NET_WM_NAME and gives it the X input focus (the first
session's, the second session's, and the session's own new window as a focus
on map), then reads the focus back before judging; on Windows the same steps
ask for the foreground as before. X errors no longer end the process.
2026-11-22 12:57:09 +01:00
feder-cr e68597cdb8 ci: the unit file of the lab server's QUIC-first order is in the rows of the whole unit suite (+5 tests) 2026-11-22 12:54:59 +01:00
feder-cr 59186492f3 test(h3 lab): LF line endings for the new test file, as the rest of the repository 2026-11-22 12:54:43 +01:00
feder-cr 9ef9ae651c test(h3 lab): the TLS of a TCP connection waits for the QUIC handshake in progress of the same client, as a real network orders them (QUIC 1 RTT, TCP+TLS 2) 2026-11-22 12:54:27 +01:00
feder-cr 13ecefb579 test(h3 lab): the QUIC connection of a client is ready before its TCP+TLS one while its QUIC handshake is in progress (red on the current server) 2026-11-22 12:53:30 +01:00
feder-cr 93239a1a10 tests: the save-on-failure helper of the e2e (tests/_evidence_on_failure.py as on tests/characterization-69 bc6d861f, unchanged), for the journey's evidence 2026-11-22 12:50:09 +01:00
feder-cr 42c344a180 test(fakeweb): a failure of the journey's request log is never the client's 2026-11-22 12:49:55 +01:00
feder-cr 261883cfd5 test(fakeweb): the journey saves, when it fails, the site's record of each request, the client's log of every request event per step and each step's in-flight list 2026-11-22 12:49:55 +01:00
feder-cr 652d7ead39 tests: a gateway says why it refused and which interfaces of this host it read; an unreadable list raises
Every refusal of LabGuard now carries its reason: the lab's rule (a name that is not localhost; an address that is not loopback, not a
documentation range and not one of the N addresses of this host read at the decision) or the narrower rule of the gateway (the DoH gateway
carries only loopback; the IPv6 literal gateway only its listener). The record also says, once per gateway, the interfaces of this host as
read when the gateway was made (by interface name) and how they were read (psutil.net_if_addrs, its version, the normalisation).

The reading never fails silently any more: _own_addresses returned an empty set on any exception (psutil raising or not importing, _witness
not importing), which made every address of this host "not the lab's" without a word. _witness.read_host_interfaces raises
HostInterfacesUnreadable (also for an entry that is not an address and for a list with no address at all); the guard raises when it is made,
a failure at a decision refuses with that reason and raises at the close; the witness keeps an arrival it cannot judge as the host's and
raises when read.

The refusals of 10.1.0.52 in run 45014369018 (Windows part 2) were the DoH gateway's own rule in
test_nothing_of_a_context_leaves_but_through_its_proxy_e2e (the witness stands at the runner's address and no proxy may forward to it),
which the record did not say. Nine unit tests, red on the old helpers; registry: unit.all 2269 (Linux), 2270 (Windows).
2026-11-22 12:42:37 +01:00
feder-cr d76ecfbfbb Version 0.58.1: a read that runs out of time says Playwright's timeout (no tag: the release is decided with firefox-69) 2026-11-22 12:11:29 +01:00
feder-cr fc3622345f ci: the unit rows hold the model of a moving page's goto and the read whose probe ran out (24 tests more) 2026-11-22 11:49:22 +01:00
feder-cr c208d2f895 A read's probe running out of time is the read's timeout, not a second look at the clock 2026-11-22 11:49:05 +01:00
feder-cr a57ea6d34a tests: a read whose probe ran out of time is the caller's timeout, whatever the clock says 2026-11-22 11:49:05 +01:00
feder-cr bdb5a84508 tests: after a goto of a moving page raises the frame may go with either page; each test of the moving pages has its own page 2026-11-22 11:49:05 +01:00
feder-cr d8179ab1e0 tests: the model of where the frame goes after a goto of a moving page raises, on a fake page (red on the model that picks one page) 2026-11-22 11:49:05 +01:00
feder-cr 84ce385ef5 tests: the goto-stopped test says in one line why a page is not reused 2026-11-22 11:41:25 +01:00
feder-cr 4cc4b8e7c8 tests: each iteration of the goto-and-every-way-it-is-stopped test runs on its own page, so a refresh the engine replays late cannot fall on the next iteration's setup goto 2026-11-22 11:41:25 +01:00
feder-cr bc6d861f62 tests: the download left to Firefox keeps its evidence when slow, the shutdown ping is judged on the core's own grace
- test_a_context_without_download_options_is_left_to_firefox: the download reputation prefs are no longer switched off (a slow save is the product's); the seconds from the click to the file stay a junit property, and a save slower than 40 s (judged after the fact, never a verdict) keeps in invpw-evidence/download-left-to-firefox the test server's record, the client's requests, the Juggler wire and trace, and a MOZ_LOG of the download machinery
- _evidence_on_failure: keep(why) saves what the helper holds though the test passed; arm(moz_log=...) and note_records(...)
- test_the_shutdown_ping...: no patch of SENDER_GRACE nor of the session's safety net; the ping must be on the endpoint when the session has ended, within the core's 10 s grace
2026-11-22 11:38:07 +01:00
feder-cr 8f8a191e9b ci: the unit rows count the new test of the Marionette helpers 2026-11-22 11:17:51 +01:00
feder-cr eca6652f56 Merge remote-tracking branch 'origin/char69/movesonevidence' into tests/characterization-69 2026-11-22 11:16:41 +01:00
feder-cr fbae6d54a4 Merge remote-tracking branch 'origin/char69/misc' into tests/characterization-69 2026-11-22 11:16:41 +01:00
feder-cr 836e16724e Merge commit 'eb203fc5' into tests/characterization-69 2026-11-22 11:16:40 +01:00
feder-cr 2ca4fa8084 Merge remote-tracking branch 'origin/char69/windowdet' into tests/characterization-69 2026-11-22 11:16:30 +01:00
feder-cr 8dc5c3745a Merge remote-tracking branch 'origin/char69/pids' into tests/characterization-69 2026-11-22 11:16:30 +01:00
feder-cr 759bc060b0 tests: the crash-file collector and the closed-tab wait are proved on the losing interleaving, built on purpose
- The watcher test depended on a thread and on when the file was written: it could see the name before the content and delete the profile before the next look. The
  collector now has scan_once (the thread's look, and stop's last one); the tests drive it: the file is placed empty, then half written, then complete, and a file seen
  empty is read again when its size changes. Red when a file is read once, green on the size re-read.
- The network walk test made the beacons arrive from a thread after real sleeps and asserted a wall-clock bound: the beacons now reach the site one at each look of the
  walk's own wait (the losing interleaving: the walk is already waiting), and "no wait" is no look at all. Red without the wait, green with it.
- The geo lab test's request has a hang guard of 60 s, not 5.
2026-11-22 10:51:45 +01:00
feder-cr 364175411e ci: the unit rows count the install wait's busy-machine case (one test more) 2026-11-22 10:43:07 +01:00
feder-cr 87bd845ac0 tests: the install wait runs on a fake clock, so its rounds do not depend on the load of the machine 2026-11-22 10:40:21 +01:00
feder-cr 7f25429b4f tests: a busy machine cuts the install wait's rounds short (red: the wait reads the real clock) 2026-11-22 10:38:53 +01:00
feder-cr ce65951227 tests: the type a process was given is read for the process instance, not for the pid alone
remote_types read the engine's child logs in the order of their names (child-10 before child-2) and kept the last
type per pid, so a pid reused by a later content process could be read as the site of the ended one and the waits
for "no process of the site is left" never became true. The lines are now stamped with the time MOZ_LOG logs, ordered
by it (then by child number as a number), and a process takes only the types logged at or after its own creation time.
Unit tests with fake logs: reused pid, child-10 against child-2.
2026-11-22 10:36:04 +01:00
feder-cr 766961dcdb tests: steady e2e of the characterization round (download without options, shutdown ping, dom iterables, windows TEMP)
- test_a_context_without_download_options_is_left_to_firefox: Firefox's own save no longer runs the download reputation check; the time until the file landed is recorded (not judged)
- test_the_shutdown_ping...: the sender is given 120 s (_profile.SENDER_GRACE) and the session's safety net follows, so the verdict waits for it to end by itself
- test_dom_iterables_from_evaluate_e2e: one browser per case
- e2e.yml: TEMP and TMP on D:\a\_temp in the Windows jobs, as the engine series' gate
2026-11-22 10:19:58 +01:00
feder-cr eb203fc58c tests: the Marionette port is the one the browser got, and the language worker test waits on each content process
- the browsers of the e2e tests are launched with marionette.port 0 and the port is read from <profile>/MarionetteActivePort
  (webfont_probe.marionette_active_port): no port is freed for a browser to take, so a neighbour cannot bind it first
- the worker with its own language is read after a process script has read intl.accept_languages in the content process of each tab
- the script cache test keeps the file size of the sample that matched
2026-11-22 10:17:18 +01:00
feder-cr 3f4ee5c61e tests: the focus and fullscreen window tests judge after the event, not after a pause
The focus test is wall_clock (it runs alone, after the parallel tests), its two
sessions share a private Xvfb on Linux, and before judging it reads from the OS
that the focus is where the step says (X input focus, GetForegroundWindow on
Windows); "no blur" is judged after that and a round trip to the page's process
instead of a two-frame pause.

The fullscreen test waits for the condition itself with the engine on (declared
size, display-mode fullscreen, fullscreenElement) and for fullscreenchange and
the following resize with it off; on Windows it reads the monitor first and
declares a size that is not the monitor's.
2026-11-22 10:17:09 +01:00
feder-cr d358b5f2e5 ci: the long launches are a layer of the host oracle's system-module class
A/B: a module the candidate's idle or bare launch opened is red only if no launch of either 68 run opened it (the measured seeds, the warm-ups and the long launches).
A/A: the modules only one run has are counted in two layers, the measured launches (cap 5) and what only a long launch of the run opened (cap 30), each printed with
its count; a module the other run has in any launch is not rare. Paths outside the class stay as they were.
2026-11-22 09:27:14 +01:00
feder-cr 5d0be75316 tests: the occlusion test puts the covering in place on Windows and checks it as the tracker reads it
WinWindowOcclusionTracker marks a window OCCLUDED only when the windows above
it in the Z-order cover its rectangle, the second session's window lands above
the first only if the system lets its process take the foreground, and a move
of another process's window is heard only once that process was seen with a
visible window. Opening the second window left all three to the runner: red in
one Windows run, green in two. On Windows the test now moves the first window
right under the second, inside its rectangle (a maximized window counts as its
work area), with SWP_NOACTIVATE; that move is the tracker's own signal. Before
waiting it checks the cover is visible, uncloaked, opaque, not a popup, above
the first window and containing it, and a red names what did not hold.
2026-11-22 09:25:11 +01:00
feder-cr 0f265fedd9 ci: the host oracle's Windows system modules are red only when the candidate alone opens one, and the preloaded newtab is absent or present
- System modules (System32, SysWOW64, WinSxS; the catalogs are under System32\catroot): loaded by the Windows loader on behalf of system DLLs, no page reads them. A set
  per path over the launches that are compared (the seeds and the warm-up). A/B: red only a module the candidate opened that no launch of either run of the 68 opened; a
  module the candidate lacks is printed, not red. A/A: a module only one run has is rare, printed with its count; red when a run has more than 5. The idle and the bare
  launch are not in the class (run 44993377458: 19 of the 21 modules only run A had were theirs). Everything else stays strict, the shortcut inventory is its own rule.
- Privileged Cont (the preloaded about:newtab, NewTabPagePreloading.sys.mjs:96, browser.newtab.preload firefox.js:1952): absent or present per launch, more than one is red;
  it depends on the idle time after startup.
2026-11-22 09:24:32 +01:00
feder-cr 410ef27100 ci: the unit rows' minimum follows the network and host oracles' new tests 2026-11-22 09:16:34 +01:00
feder-cr 91e5aa43f0 ci: the host oracle's idle launch holds no rule on the pings, and the Windows system modules are a set over the seeds
Run 44993377458:
- The data-policy notification is never recorded because it is never needed: the core declares the terms of use accepted (invisible_core prefs.py termsofuse.accepted*,
  browser.preonboarding.enabled false), so canUpload() is true from the start (TelemetryReportingPolicy.sys.mjs:839; _delayedSetup :1156 returns before _userNotified
  :988). The idle launch no longer requires the notification or any number of pingsenders (Linux started 1, new-profile; Windows 0): evidence until proven. A separate
  pingsender[.exe] there stays red. The {0, 3} rule of the short launches stays: Linux 3 in all 12 and Windows 0 in all 12.
- Windows system modules (a path under c:\windows) are compared as a set over the union of the measured seeds of a side: a module that is in a seed of each side is
  the same module; one that only one side has in any seed is still red (2 of the 4 differences of the run remain: wevtapi.dll in one tab process, the resource file of
  twinapi.appcore.dll in one parent).
2026-11-22 09:15:47 +01:00
feder-cr 303817c9ef ci: the attribution of datagrams is the set of kinds per destination over the transcript; unattributed ones are counted and printed, not compared 2026-11-22 09:13:06 +01:00
feder-cr dbd2022e34 tests/test_a_page_that_moves_on_e2e.py: a failing read-after-goto round leaves the client log, Juggler wire, engine trace and server record 2026-11-22 07:23:08 +01:00
feder-cr 3c0ef88d88 tests: the bare launch and shortcut cases use lab paths; the unit rows' minimum follows 2026-11-22 07:19:45 +01:00
feder-cr 39fd73116a ci: the host oracle lists what the idle launch left in the places of the shortcut code
On Windows the idle launch of each engine run is bracketed by two snapshots of the places the shortcut code reads and writes: the Start menu of the user and of
ProgramData (Programs below them), the Desktop of the user and the Public one, the pinned taskbar shortcuts and ImplicitAppShortcuts, and every Mozilla-* folder of
ProgramData (the shortcuts log is there). The files that are new, changed or gone (name, size, mtime) are kept in the footprint and summarized in one line of the report
(SHORTCUTS ...): the direct proof of whether the engine leaves a shortcut or a log on the host. Evidence, not compared. The Create disposition stays.
2026-11-22 07:18:52 +01:00
feder-cr b825a5542b ci: the host oracle keeps the old idle launch as a bare case that records how a browser ended, and lists what the tree asked the system to make
The idle launch of run 44988820319 (no client, no page) ran a crash reporter on both systems. It was not a crash: the process is `crashreporter --ping-cleanup`
(CrashManager.in.sys.mjs cleanupPings, started by runMaintenanceTasks 57 s after the launch, AGGREGATE_STARTUP_DELAY_MS), the parent and the reporter ended with exit 0,
and the reporter ran 2 s (send_ping.rs cleanup_main sleeps 2 s). The idle launch now has a page, and the old one stays as a case of its own, never compared:

- bare launch: no client, no page, the same wait; records the exit code or signal of its parents, every crashreporter or minidump-analyzer process with its command
  line, the `.dmp` names and `.extra` contents found in the profile's minidumps and the Crash Reports/pending folders (a watcher reads them while the launch lives, the
  profile is deleted when it ends), and on Linux core dumps in the launch's folder (ulimit -c unlimited) with `gdb -batch -ex bt` and the kernel's core pattern;
- Windows: the footprint lists the host paths a process of the tree asked the system to make (the Create event's disposition: create, open-or-create, overwrite,
  supersede), the evidence of a file written and not only looked for.
2026-11-22 07:18:51 +01:00
feder-cr ac5a519244 tests: every proxy of the tests that could forward outside the lab carries only the lab's destinations
The base Gateway of _socks_servers (CONNECT relay and UDP relay, tcp_from_exit included), Socks5TcpOnly
and the SOCKS5 server of test_proxy_socks_auth_e2e refuse and record any destination that is not the
lab's (loopback, the documentation ranges, the addresses of this host's interfaces, localhost): a
CONNECT is answered with reply 2, a datagram is dropped, and the refusal is written down (time since the
gateway started, address type, destination as received, port, protocol) under
$RUNNER_TEMP/invpw-evidence/<gateway>/, always, when the gateway is closed. forward_only_to only narrows.
The gateway of test_ipv6_literal_connect_e2e reuses the base behaviour and keeps its evidence.
New unit test with known-bad inputs; the two unit rows of the registry name it.
2026-11-22 07:12:32 +01:00
feder-cr f585ea8ccb tests: the host oracle's public-class cases use the public resolvers the gates allow 2026-11-22 07:09:59 +01:00
feder-cr 18f4b716fe tests: the inventory list uses lab paths 2026-11-22 07:09:13 +01:00
feder-cr fb5125b78c tests: the host oracle's stray-path case uses a lab path 2026-11-22 07:08:46 +01:00
feder-cr 6b07f2c1d7 tests: the inventory case's synthetic paths are on a lab drive 2026-11-22 07:08:31 +01:00
feder-cr 0181b29eb8 ci: the unit rows' minimum follows the host oracle's class tests 2026-11-22 07:07:19 +01:00
feder-cr 702aee3930 ci: the host oracle compares a public destination as its class, the shortcut inventory as absent or complete, and what a pingsender spawns with the pingsenders
From the A/A of run 44988820319 (the host oracle, both systems):
- Linux: the parent's direct connects differed only by address (DNS rotation: 140.82.112-114.x:443, 185.199.108-110.133:443, 151.101.x.91:80). A public destination
  is compared as its class, the kind, the verb, the transport and the port; the number of distinct addresses of a class is tolerated, the reason written once
  (NET_CLASS_REASON). No name is made up from an address.
- Windows: in one launch the parent ran the shortcut inventory (the Start menu, Public\Desktop, Quick Launch\User Pinned\TaskBar, the shortcuts log of ProgramData, the
  shell libraries loaded for it): StartupOSIntegration.sys.mjs onStartupIdle -> ensurePrivateBrowsingShortcutExists (hasPinnableShortcut) and CustomIconManager
  enumerateInstallShortcuts, Mozilla code at startup idle. Its paths (the parent's first opens from the first to the last open of a path of the places it walks, by the
  order of the system's log) are absent or, on both sides, the same set.
- Windows: four socket processes in one launch were the parent's and one of each of the three pingsenders (a background task is a Firefox of its own): what a
  pingsender spawns is named `<kind><-pingsender` and comes and goes with the pingsenders; it is compared when they are on both sides.
- A creator pid that Windows reused before the launch is not in the tree (a pingsender of an earlier launch counted in the lifecycle).
- The idle launch opens a page: with no window the notification of the data policy was not recorded in 120 s on either system and the launch had a crash reporter.
2026-11-22 07:06:49 +01:00
feder-cr 37267260a3 ci: the unit rows' minimum follows the network oracle's launch-stage tests 2026-11-22 07:00:06 +01:00
feder-cr f5d2ec81f9 Merge remote-tracking branch 'origin/char69/network' into tests/characterization-69 2026-11-22 06:41:14 +01:00
feder-cr 6d1bd1047b ci: the whole-e2e suite holds the characterization tests, the adapted Windows tests leave the exclusions, a third Linux row
The 35 new e2e files of the characterization branch are in one row of each system (balanced on the junits of runs 44942540063 and 44985244053, about 9.4 minutes of estimated wall time per Linux row, 10.2 per Windows row, 4 browsers). The four tests adapted to Windows (the headed popup, two fission process-name tests, the service-worker process test) are no longer excluded and are named by their files in the Windows rows. Linux gets wrapper.e2e.suite.linux.3.
2026-11-22 06:40:46 +01:00
feder-cr ac75085d10 tests: the ipv6 literal gateway records every CONNECT with time since launch, address type, destination as received and port 2026-11-22 06:31:57 +01:00
feder-cr 8ab1d3d68a Merge remote-tracking branch 'origin/ci/e2e-suite-on-candidate' into tests/characterization-69 2026-11-22 06:31:29 +01:00
feder-cr b58edbf367 Merge remote-tracking branch 'origin/char69/fakeweb' into tests/characterization-69 2026-11-22 06:31:29 +01:00
feder-cr aad5ac38da Merge remote-tracking branch 'origin/char69/skips' into tests/characterization-69 2026-11-22 06:31:29 +01:00
feder-cr ac62151198 Merge remote-tracking branch 'origin/char69/secstate' into tests/characterization-69 2026-11-22 06:31:28 +01:00
feder-cr 94fd5740c8 Merge remote-tracking branch 'origin/char69/screen' into tests/characterization-69 2026-11-22 06:31:28 +01:00
feder-cr 174c6b8b88 Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-22 06:31:28 +01:00
feder-cr 4bf9b5e009 tests: the ICE host candidates test leaves: in the product configuration a page reads only mDNS names, and what depends on the declaration is already asserted by test_declared_host_network_e2e.py 2026-11-22 06:31:28 +01:00
feder-cr 37aa78d339 ci: the network oracle records the CONNECTs and DNS questions of the launch stage with the process that opened each
The launch stage held only the UDP; it now holds the CONNECTs (the DoH road left out: its
start-up connection lands in this stage or in the journey's first step, so it is counted with the
journey's), the DNS questions and the datagrams, each with who opened it: `core` (the Python
process that runs the lab and makes the core's own requests at launch), `browser:<kind>` (parent,
socket, tab..., backgroundtask:pingsender) or `unknown`. The idle launches and the exit-ping launch
record the same.

The gateway looks at the client's source port while it serves the handshake and finds the owner
with psutil.net_connections (Linux and Windows both give the pid); a datagram carries the
opener of the UDP ASSOCIATE it came on (the association's control connection), and a DNS
question the opener of the connection that carried it. Only the stages that ask for it are looked
up (launch, idle, exit).
2026-11-22 06:26:26 +01:00
feder-cr 0af776766a tests: a generation of the security state that does not exit 0 saves the engine's stderr, the profile's files and, on Linux, the gdb backtrace of the core it left (e2e.yml installs gdb and points kernel.core_pattern at a folder) 2026-11-22 06:23:53 +01:00
feder-cr f5234742e6 tests: the ipv6 literal e2e gateway forwards nothing outside the lab; assert the CONNECT shape, not a count 2026-11-22 06:19:23 +01:00
feder-cr 07018c00b7 tests: the script cache test keeps every amount the two preloaders report under a path (the parent's scriptCache.bin and the child's scriptCache-child.bin share the reporter paths) and records the files of startupCache/ in each assertion message 2026-11-22 06:18:45 +01:00
feder-crandClaude Sonnet 5.5 b37287094e tests: the closed-context service-worker process test runs on Windows (process types from the engine log) instead of skipping
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 06:18:19 +01:00
feder-cr 2c50950f9a ci: the unit rows' minimum follows the oracles' new tests 2026-11-22 06:09:50 +01:00
feder-cr 9dab7a335b tests: the oracles' public addresses and runner paths in their cases are the allowed public resolvers and a neutral lab path 2026-11-22 06:09:14 +01:00
feder-cr b732bda9e3 tests: the host oracle's public addresses in its cases are public resolvers the gates already allow 2026-11-22 06:08:21 +01:00
feder-cr ec8e0fdc19 ci: the host oracle changes no pref, and compares what only the pingsender touches when it is on both sides
- Removed the lab telemetry endpoint of the idle launch (toolkit.telemetry.server) and its server: no pref is changed in any launch of any oracle. The idle
  launch stays, still ended by the notification recorded in the profile's prefs.js; its strict comparison is what does not depend on the third party: the
  notification seen, three pingsender processes of the three types, always the background task, spawned by the parent.
- A pingsender that goes to the telemetry host direct is the product's behaviour in a session with no proxy: the rule about a public destination is gone from
  the host oracle (behind a proxy it is the network oracle's). A destination of the pingsender kind is `public, telemetry`; the outcome of the connection is
  not in the verdict.
- The paths and destinations only the pingsender kind touches are compared when it is present on both sides of the same launch (the measured launches and the
  two warm-ups) and left out when it is on one side only, so a return to pingsender[.exe] or to a new read of the host shows.
2026-11-22 06:04:51 +01:00
feder-cr 881df0df5d ci: the host oracle's idle launch is where the exit pings must leave, a short launch has 0 or 3 of them
The exit pings leave as `firefox --backgroundtask pingsender` through the session's route when Mozilla's canUpload() is true (TelemetrySend.sys.mjs:1083), which is
the case once the notification of the data policy was recorded (TelemetryReportingPolicy.sys.mjs:988 `_userNotified`, from `ensureUserIsNotified` at
`sessionstore-windows-restored`, :1140-1175; the first-run tab, or the infobar at 60 s, :51). A short launch may or may not have got there.

- Short measured launches: the number of pingsenders is 0 or 3 (the first run's new-profile, first-shutdown and event, spawned by the parent, the background task
  and never the separate pingsender[.exe]); any other number or form is red, and the paths and destinations only they touch are not compared.
- The idle launch of each engine run (no journey, the telemetry endpoint is a loopback server of the lab so no ping goes to the internet) waits until the
  profile's prefs.js records the notification (a file of the launch, no channel into the engine; at most 120 s), then closes. The comparison there is strict: the
  notification seen, three pingsenders of the three types, spawned by the parent, none to a public address (B266). A launch behind a session proxy also fails on any
  pingsender destination that is public.
2026-11-22 06:04:49 +01:00
feder-cr c395116f9e ci: the e2e hang guard of the network oracle counts the exit-ping launch and still fits the job's 40 minutes 2026-11-22 06:04:23 +01:00
feder-cr e0a103dada ci: the network oracle's idle launch behind the proxy waits for the data reporting notice and counts the exit pings
The first seed gets one more idle launch per engine (idle/exit_pings), behind the lab's
coherent proxy and with no pref changed: it reads the profile's prefs.js every 0.5 s until
datareporting.policy.dataSubmissionPolicyNotifiedTime is there (120 s only end a launch that
never gets there: recorded is false and the A/A must agree), closes, and records until the
tree has exited, the pingsender of the shutdown included.

What went to the proxy towards a name outside the lab is compared strictly (the form of the
target, the number of each, the order): the proxy answers those CONNECTs itself with a SOCKS
reply 4 (host unreachable, as it does for any name outside the lab) and writes them down,
nothing leaves the lab. A connection of the browser or of its pingsender that did not go to
the proxy is in direct, which is red on either side. The e2e's hang guard counts the launch.
2026-11-22 06:03:22 +01:00
feder-cr 53a9e4da1e ci: the unit rows' minimum is the number of tests their files hold today (the oracles' tests were added without raising it) 2026-11-22 05:53:43 +01:00
feder-cr 8c394f4e72 ci: the host oracle runs alone on its own jobs and keeps the evidence that proves when the shutdown spawns what
Run 44982522362: the Windows A/A of the host oracle differed on the pingsender (3 vs 0 in one measured launch) and the Linux one on a /proc/self/fd/N open
of the parent. Neither is excused. What the run shows and what the oracle now records:

- the report counted 150 to 1000 paths per seed opened by firefox.exe processes OUTSIDE the tree on Windows: the other tests' browsers ran at the same
  time on the shared e2e machine, and the engine's own timers (the telemetry notification that decides whether the shutdown spawns the pingsender; the
  idle flush of the shared data that the parent copies read-only through /proc/self/fd/N) race with a loaded machine. The host oracle has jobs of its own,
  e2e (host, linux) with strace and e2e (host, windows), one test each, and the shared jobs leave its file out like the network oracle's;
- Linux keeps the order of starts and ends of the tree (strace with the exit lines, signals off), the call that touched each path (open, openat, stat, ...),
  and every open of /proc/self/fd/<n> with the memfd_create that made the descriptor; Windows adds the Kernel-Process stops to the ETW session (the exit
  code: 0 by itself, 1 for the core's TerminateProcess) and the times of the 4688 events (a refusal of the provider is said, not red);
- every footprint keeps how the close ended: the return code of the root and the seconds the core's close took (evidence, never a threshold).
2026-11-22 05:52:35 +01:00
feder-cr f7450cfd5b ci: the host oracle's journey ends with a geolocation step, the candidate must start no Windows location utility process, and stock Firefox is the negative control 2026-11-22 05:52:34 +01:00
feder-cr d4f4f86d88 ci: the host oracle compares the netlink sockets and the public destinations of each kind on Linux
The whole-run trace of the host oracle now also records, per process kind, every netlink socket the tree
opens (by protocol: NETLINK_ROUTE, NETLINK_KOBJECT_UEVENT, ...), the requests it sends on it (RTM_GETLINK,
RTM_GETADDR, ..., read from strace's decoding or from the message bytes) and the multicast groups it binds
to, and every connect or send towards a public address, with transport, family, address and port. A socket
is known by the inode -y prints for it, so a send names the protocol of the socket() that made it, whichever
thread sends. The set per kind enters the comparison like the host paths: identical, no exception. Loopback,
the lab's documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24), private, link-local and
multicast destinations are not compared and are counted by class as evidence. The warm-up report lists the
network entries only the warm-up had.

The strace stand-in traces socket, connect, bind, sendto, sendmsg and sendmmsg only when the host oracle asks
(network=True); the font tests' default is unchanged.

Windows is not covered and the report says why: the connect and send events are in the
Microsoft-Windows-Kernel-Network provider, which needs a second provider in the session, logs every packet of
the machine and has no field names verified on a hosted runner yet; interface enumeration there is NSI by
IOCTL, not a socket.
2026-11-22 05:52:34 +01:00
feder-cr 4d97eae291 tests: the closed-context process test judges by the processes that host the frames' sites, not by a count
The count of content processes holds the preallocated pool and what the browser starts for itself, so it moved with whatever ran beside the test (gate run on Windows: [9, 9] while open, [9] after). The test now waits until the processes that host the sites of the frames (B and C) exist while the context is open, and until none is left once it is closed: by the name of the process on Linux, by the remote type the engine logs on Windows.
2026-11-22 05:49:03 +01:00
feder-cr a4e6c8f56d tests: a popup naming only left reads that x and the declared default y 2026-11-22 05:48:26 +01:00
feder-cr 9bd7622e83 ci: the walk waits for what a closed tab sends as it leaves; a resumption must happen in every run; the ECH grease aead is one volatile entry again
- tests/fakeweb/profile_p4.py: the tab of step 10 is closed by the walk's cleanup and its
  two pagehide requests reach the site after close() returns. The walk now goes on when
  the site has both (an event; a failsafe keeps a request that never comes from blocking
  it), so they belong to the step that closed the tab. A/A run 44982522362, Windows seed 6:
  in 19 launches of 20 both landed in step 11, in one n=2 landed in step 10; both were sent
  in every launch. The per-journey summary of those requests is gone.
- Optional entries (resumed connections) get an invariant: an origin that resumes on some
  seed in one run must resume on some seed in the other; an engine that stops (or starts to)
  is red. Which launch resumes stays timing.
- The ECH GREASE aead: the existing volatile entries cover fresh and resumed connections
  (security/nss/lib/ssl/tls13ech.c:2257: the aead is chosen by the low bit of HKDF output of
  a fresh key, for every ClientHello without real ECH); two fingerprints that differ only by
  the aead are one.
2026-11-22 05:41:15 +01:00
feder-cr 435d261ce4 test(fakeweb): evidence helper with LF endings 2026-11-22 05:38:54 +01:00
feder-cr 36634bc63f ci: the network oracle's A/A of run 44982522362: no shared port numbers, optional resumptions, leaving traffic over the journey, the ECH grease as a draw
- Lab: two servers of a lab never share a port number (open_lab makes the lab again when
  they do). A port is normalised into the role of its server, and on Linux seed 4 the port
  of the origin O and that of the HTTP/3 server were the same number in one run: 667 leaves
  read journey-o.test:h3. The lab also gives the walk's step counter back when it closes.
- Resumed connections: an origin may have one in a run and none in the other (ticket and
  pool timing; 108 leaves per seed on Linux h1). The volatile list can name an `optional`
  owner: what is under it is excused when one run has nothing there and compared when both
  have something. The fresh connections and the protocols are always compared.
- The ECH GREASE AEAD is written as what it is, a draw from 1 and 3 (any other value is a
  difference), on fresh and resumed connections alike; the two per-leaf entries are gone.
- What the page sends from its pagehide handler (the beacon and the keep-alive POST) is
  summarised over the journey with its counts, as the CONNECTs are: the pair reaches the
  lab while the driver moves to the next step and straddled the boundary in one run
  (Windows, steps 10 and 11).
2026-11-22 05:35:04 +01:00
feder-cr 8a42ed3676 test(fakeweb): the networkidle-under-load case saves its evidence when it fails
On failure only, into RUNNER_TEMP/invpw-evidence/fakeweb-leaving-beacons-under-load/: the fake web's own record of every
connection and request (arrival, answer, error), the client's log of every request, the Juggler wire of the served browser,
the engine's Juggler trace (INVISIBLE_JUGGLER_TRACE_DIR) and the cells. No assertion, wait or deadline changes.
2026-11-22 05:32:57 +01:00
feder-cr 2c6a93900f tests: the headed popup test and the two process-by-site bench tests run on Windows instead of skipping
The headed window.open test asked for DISPLAY, which Windows never has: it now asks for it only off Windows.
The bench tests found a site's process by its name, which only Linux sets: on Windows they read the remote type the
engine logs for every process it creates (MOZ_LOG Process) and count the live content processes of that site.
2026-11-22 05:29:42 +01:00
feder-cr 756f722d40 Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-22 05:22:56 +01:00
feder-cr 215f552a10 ci: the whole e2e suite as seven rows of the gate (linux 1-2, windows 1-4, control_a), run on the candidate's binary by scripts/ci_suite_run.py
The rows are balanced on the test times of run 44942540063 and exact; the Windows parts of e2e.yml read them instead of taking every fourth file.
tests/test_the_e2e_suite_is_accounted_for.py holds every e2e test in one row of each system or in a named exclusion.
2026-11-22 05:14:46 +01:00
feder-cr 98da306330 tests: the warm session's script cache is compared with the file left on disk when the fresh session ended (a rewrite at shutdown replaces the adopted one) 2026-11-22 05:02:50 +01:00
feder-cr b14f479e09 Merge remote-tracking branch 'origin/char69/icehost' into tests/characterization-69 2026-11-22 04:59:24 +01:00
feder-cr af48556777 Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-22 04:59:23 +01:00
feder-cr 5776836ab6 tests: the DOM iterables that firefox-68 iterates from evaluate stay; the WebGPU features case keeps its red proof on its branch 2026-11-22 04:59:23 +01:00
feder-cr da0720364a tests: a page with a media permission reads the declared network in its ICE host candidates (characterization of firefox-68) 2026-11-22 04:47:24 +01:00
feder-cr c3295c5b12 tests: the launch counter test reads browser/omni.ja with the core's jar reader (Mozilla's optimized jar is refused by zipfile on Windows) 2026-11-22 04:43:43 +01:00
feder-cr a7b1acf732 tests: iterating DOM iterables from page.evaluate, one case each 2026-11-22 04:42:13 +01:00
feder-cr 9072dbb74f ci: the host oracle warms each engine up, compares the tree only, and the network oracle has jobs of its own
Host oracle
- Each engine run starts with a discarded warm-up launch (the first seed), an experiment control and not an excuse: its trace is kept in the
  footprint and the report lists what only the warm-up did (WARMUP-ONLY, per kind and per path, with the process that did it), and which of those
  both engines have. The measured launches are compared as they are: a pingsender or a socket process that differs after the warm-up is red.
- Only the tree of the launch is compared. On Windows the ancestry is the creator's pid chain of the 4688 events and every open of the machine is read,
  so what a process outside the tree opened (a service, the antivirus) is counted by process name (OUTSIDE THE TREE) and left out; on Linux the strace
  tree is the tree.
- A path or a kind that differs names the processes to blame: touched_by (the kinds that opened each host path, on both systems, a thread's open
  counted for its process) and spawned_by (the kinds that spawned each kind), in the DIFF lines and the problems.

e2e.yml
- tests/test_ab_network_e2e.py has its own jobs, e2e (network, linux) and e2e (network, windows), with the setup of the shared jobs, one test that must
  pass (no skip), 40 minutes (the test's own budget for 5 seeds is 30); the shared Linux job ignores the file (OWN_JOB_FILES) and the Windows parts
  leave it out of the collection (own_job). The workflow tests take a job by its name now, and the network jobs are held to the same rules as the others.
2026-11-22 04:39:18 +01:00
feder-cr 88b058956a ci: the host oracle's Windows classification is spelling-independent and names what it can name
From the A/A of run 44963364060 (Windows part 4, 129 differences):
- the runner's TEMP is the 8.3 spelling (the short spelling of the user folder) and the engine opens the same folder under both spellings, so 70 paths of the
  launch's own profile were classed host: the context puts every root and every path in the long spelling (GetShortPathNameW / GetLongPathNameW
  of the user's folders, the temp root and the package), whatever the NT prefix;
- uninstall_ping_<install hash>_<uuid>.json(.tmp) in C:\ProgramData\Mozilla-<install id> (30): the uuid of the ping is normalized, the folder and
  the name are still compared;
- a firefox.exe --backgroundtask pingsender (three in the first launch of the run, the cause of its extra parent kinds, imagehlp.dll and a .mui) is
  the kind backgroundtask/pingsender by its command line, not a parent;
- the start canaries are three, with a round trip to the session before each, and the last one must be in the trace (the first canary of the first
  launch was not);
- the footprint keeps, as evidence, which kinds of process opened each host path.
2026-11-22 04:12:39 +01:00
feder-cr 8d6d6ae208 Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-22 04:04:03 +01:00
feder-cr 194ae6f042 Merge remote-tracking branch 'origin/char69/automation' into tests/characterization-69 2026-11-22 04:04:03 +01:00
feder-cr dee362ea02 Merge remote-tracking branch 'origin/char69/mediajs' into tests/characterization-69 2026-11-22 04:04:03 +01:00
feder-cr f8e5ff8700 Merge remote-tracking branch 'origin/char69/locale' into tests/characterization-69 2026-11-22 04:04:03 +01:00
feder-cr e8b3efa8c9 Merge remote-tracking branch 'origin/char69/screen' into tests/characterization-69 2026-11-22 04:04:02 +01:00
feder-cr b02f74ed58 Merge remote-tracking branch 'origin/char69/window' into tests/characterization-69 2026-11-22 04:04:02 +01:00
feder-cr b48592587f tests: the popup frame control is a second declared frame (the engine off reads the host's own frame on Windows) 2026-11-22 03:51:47 +01:00
feder-cr 66e5b75cb6 tests: the launch counter's address is read from the engine's module in the binary, the shutdown ping goes to an allowed host (a refused host is a control), the warm session's script cache is moved aside until rewritten 2026-11-22 03:51:20 +01:00
feder-cr 8e4be5b67d tests: a goto to a refused port waits for the error page's navigation before the next goto starts 2026-11-22 03:51:20 +01:00
feder-cr 69a9c60328 tests: escape the line breaks of the native-endings probe; the branding test reads only chrome://, the one place a page can load 2026-11-22 03:50:27 +01:00
feder-cr 2c562c035f ci: the network oracle compares the resumed ClientHellos and the protocols per origin, and its e2e has a hang guard sized from its seeds
- fold_wire: the connections whose ClientHello resumes a session are a set of their own
  (the number of tickets offered left out), and `protocols` is the set of protocols that
  carried a request (h1, h2, h3), not how many requests each carried.
- tests/test_ab_network_e2e.py: the default 420 s of the e2e killed the xdist worker of the
  A/A on 5 seeds on Linux and Windows (run 44963364060). The test's guard is 120 s to start
  plus, per engine run, 240 s for the first seed and 150 s for each next one (measured: 120 s
  and 145 s per engine run for the first seed on Linux and Windows); the subprocess ends at
  that budget and the worker's guard comes 120 s after it.
2026-11-22 03:49:45 +01:00
feder-cr 2b9858570a tests: the second window session runs in a thread of its own (no sync client inside another one's loop) 2026-11-22 03:48:00 +01:00
feder-cr bd71ac2026 tests: leave out of the locale characterisation what the product cannot do or the 68 engine does not do (running-worker language change, worker canvas group, shared and service worker Accept-Language) 2026-11-22 03:47:58 +01:00
feder-cr 731ec861c5 ci: the network oracle compares what the engine says on each connection, not what the pool did
A/A run 44960767715 left 214 leaves on Linux and 297 on Windows, all of them the pool:
a second connection with no request (in the first visit's stage in one run, the
second's in the other), the page's requests split between HTTP/2 over TCP and
HTTP/3 over QUIC (4 and 1, then 1 and 4) with their stream numbers, priorities and
frame counts, the HTTP/3 datagram count, and the start-up connection to the DoH
landing in the launch stage or not.

Each role (h1, h2, h3) now has one summary over its whole walk (fold_wire): the
distinct fingerprints of the connections that carried a request and are not resumed
(ClientHello, ALPN, SETTINGS, first WINDOW_UPDATE/PRIORITY, QUIC parameters, pseudo-header
order), and every request, with its count, wherever it rode. In the h3 role the
transport's own headers (te, alt-used) belong to the connection and the page's
priority is kept for the page. Not kept: the number of connections, a connection that
carried no request, stream numbers, frames after the first request, the h3 datagram
count. The CONNECTs of the launch stage count with the journey's. The direct-connection
rule is untouched. The volatile entries follow the new paths.
2026-11-22 00:54:03 +01:00
feder-cr aabf0516cc tests: the host oracle's trace cases use a neutral lab home 2026-11-22 00:40:18 +01:00
feder-cr 50c08fb950 ci: the A/A of the page, network and host oracles runs every seed when the pull request touches the oracle
On a pull request the three A/A controls ran on a few seeds (page 2, network 1, host all). The A/A is what every A/B verdict
rests on, so when the pull request changes the code or the data of an oracle it must be zero on every seed of the candidate
set [0, 2, 4, 6, 63], Linux and Windows.

scripts/ci_ab_pr_seeds.py holds the files of each oracle (what they share: ci_ab_oracle.py, persona_cover.py,
ci/persona-seeds.json), fetches the base commit and lists `git diff --name-only <base> HEAD` (HEAD is the merge commit the
runner checks out), and prints AB_ORACLE_PR_SEEDS, AB_NETWORK_PR_SEEDS and AB_HOST_PR_SEEDS (every seed, or the default 2, 1
and 2). One step of e2e.yml, on a pull request, in the Linux job and the Windows parts, appends them to $GITHUB_ENV; no
third-party action. The three e2e tests read their variable with pr_seed_count and, without it (a push, a manual run), keep
their default. Unit tests: the path rule per oracle, the shared files, the variable (a carriage return, a bad value), the
fetch-then-diff order, LF-only output, and the step in the workflow.
2026-11-22 00:33:28 +01:00
feder-cr 11dc585abf ci: the host oracle compares the whole trace of a closed run, not a photograph of one instant
The A/A of the host oracle kept finding noise because it read the tree once, after a wait for quiet: the number of live
content processes, one font mapped lazily, the number of short-lived children. The oracle now compares the TRACE of the
run, from the launch to the exit of the browser (the quiet point is the exit of the process):

- processes by kind (parent, -contentproc type + sandboxingKind + isForBrowser/notForBrowser, helpers by what they ran)
  from the command lines of the launch; every kind and its count identical, except the count of the kinds of type tab
  (idle time): for those only the presence counts, with the reason written once;
- the SET of host paths the tree touched, identical with no exception. Every path is classified ours (the package, the
  profile and temp dirs of the launch, the run's cache, its own shared memory) or host; ours leaves the comparison as a
  class, the reason written once.

Linux: strace -f -y of the whole tree, now with the file calls (open, openat, stat, access, readlink, execve, ...), read
after the group has exited. Windows: the process starts with their command lines come from the process-creation audit
(event 4688, switched on for the run and put back), a file trace from an ETW session on Kernel-File (logman, tracerpt),
two canary files and the lost-events line check that the session was recording. It needs an administrator.

Gone: the volatile list (tab count, tahoma7_04.ttf, the job total, the WMI count) and its mechanism, the module snapshot,
the quiet wait, the WMI trace and the poller. The declared glxtest difference stays, applied by kind.
2026-11-22 00:33:19 +01:00
feder-cr cba46aa042 Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-22 00:18:02 +01:00
feder-cr 55ce95a1ad Merge remote-tracking branch 'origin/char69/window' into tests/characterization-69 2026-11-22 00:18:01 +01:00
feder-cr a837e63a08 Merge remote-tracking branch 'origin/char69/webglread' into tests/characterization-69 2026-11-22 00:18:01 +01:00
feder-cr 70f81bbb3a Merge remote-tracking branch 'origin/char69/automation' into tests/characterization-69 2026-11-22 00:18:01 +01:00
feder-cr 3a67051a92 Merge remote-tracking branch 'origin/char69/locale' into tests/characterization-69 2026-11-22 00:18:01 +01:00
feder-cr 112607291a Merge remote-tracking branch 'origin/char69/screen' into tests/characterization-69 2026-11-22 00:18:01 +01:00
feder-cr 38fb8b6877 Merge remote-tracking branch 'origin/char69/mediajs' into tests/characterization-69 2026-11-22 00:18:00 +01:00
feder-cr 2703b5fc97 Merge remote-tracking branch 'origin/char69/audiohw' into tests/characterization-69 2026-11-22 00:18:00 +01:00
feder-cr 1791f7ea68 ci: the A/A of the network and host oracles is clean, from the evidence of run 44946411675
Network oracle (5,580 leaves differed between the published engine and itself):
- the ad frame's origin travels as a URL parameter (a=http%3A..%3A<port>) and the slow
  frame holds id=sf<token><i>: the normaliser now turns the encoded port into the role of
  its server and drops the token (the index stays), so a request has the same key in
  every run (5,532 leaves);
- the lab cuts the journey into steps when the driver moves on, and what the browser does
  on its own (a connection, a second lookup of a name once its 30 s are over) landed in
  whichever step was current: the CONNECTs and the DNS questions are one summary of the
  whole journey, the requests and datagrams stay in their step;
- the HTTP/3 datagrams are summed over the walk (a visit leaves packets in flight for the
  next one: 12+8 and 13+7);
- the "ERROR in the transcript" scan no longer names the text a page answered
  (steps/14/extra/error is the sign-in page's own message);
- ci/ab-network-volatile.json: the counts of connections (the pool's) and the ECH GREASE
  AEAD (random per connection), each with the run that proved it.

Host oracle: a volatile list of its own (ci/ab-host-volatile.json), applied in the A/A and
in the A/B, per system, stale when it matches no leaf, and a leaf that vanishes is not noise
unless the entry says so: the live tab-process count and one lazily mapped font on Linux,
the job's total process count on Windows.

The three oracles' launches use a cache folder of their own (XDG_CACHE_HOME on Linux, the
wrapper's cache pinned), so they leave no fontconfig cache of the bundle in the user's
folders for the fontconfig test's cold launch.
2026-11-22 00:01:05 +01:00
feder-cr 323d272a32 tests: negative controls with the engine off or another declared screen, second sync client in a thread of its own 2026-11-21 23:56:27 +01:00
feder-cr b7f974788a tests: negative controls with the engine off or another declared screen, second sync client in a thread of its own 2026-11-21 23:51:23 +01:00
feder-cr 3f372e4675 tests: the WebGPU adapter is read in the page realm, where the features iterate 2026-11-21 23:47:53 +01:00
feder-cr a9ec63caed tests: the fullscreen test pins the device pixel ratio with the screen 2026-11-21 23:47:27 +01:00
feder-cr c3dad8b9e9 tests: the WebGL noise control keeps the engine on and declares only the canvas noise off 2026-11-21 23:47:10 +01:00
feder-cr 50f2e53c9c tests: the click on a download left to Firefox does not wait for a navigation, the file does 2026-11-21 23:46:42 +01:00
feder-cr 0a0a2f4efd tests: negative controls with the engine off or another declared screen, second sync client in a thread of its own 2026-11-21 23:46:02 +01:00
feder-cr 8add8e4a42 tests: the locale of a live context is changed through the product's Juggler command; the canvas test records every measure 2026-11-21 23:44:28 +01:00
feder-cr 5e18bdc03f gitattributes: the persona seeds file is LF on every checkout, as its test compares it byte for byte 2026-11-21 23:40:40 +01:00
feder-cr 89c7d3be3b Merge remote-tracking branch 'origin/char69/platform' into tests/characterization-69 2026-11-21 21:28:04 +01:00
feder-cr 241d156f1f Merge remote-tracking branch 'origin/char69/automation' into tests/characterization-69 2026-11-21 21:28:04 +01:00
feder-cr d6dc3bf0ba Merge remote-tracking branch 'origin/char69/mediajs' into tests/characterization-69 2026-11-21 21:28:04 +01:00
feder-cr 74deb6a060 Merge remote-tracking branch 'origin/char69/locale' into tests/characterization-69 2026-11-21 21:28:04 +01:00
feder-cr fa735a74e7 Merge remote-tracking branch 'origin/char69/window' into tests/characterization-69 2026-11-21 21:28:03 +01:00
feder-cr d6498e527b Merge remote-tracking branch 'origin/char69/screen' into tests/characterization-69 2026-11-21 21:28:03 +01:00
feder-cr 92712b1658 Merge remote-tracking branch 'origin/char69/audiohw' into tests/characterization-69 2026-11-21 21:28:03 +01:00
feder-cr ab3247d359 Merge remote-tracking branch 'origin/char69/fonts' into tests/characterization-69 2026-11-21 21:28:03 +01:00
feder-cr 4bf642a58a Merge remote-tracking branch 'origin/char69/canvasreaders' into tests/characterization-69 2026-11-21 21:28:03 +01:00
feder-cr 360a22887f Merge remote-tracking branch 'origin/char69/webglread' into tests/characterization-69 2026-11-21 21:28:02 +01:00
feder-cr 2d31ecdfff Merge remote-tracking branch 'origin/char69/webglparams' into tests/characterization-69 2026-11-21 21:28:02 +01:00
feder-cr 03ec71cf72 tests: the host oracle's normalizer cases use neutral lab paths 2026-11-21 21:21:49 +01:00
feder-cr 6b67a514e5 tests: characterise the script cache, the launch counter, the shutdown ping, the geolocation of the host and the WebGPU adapter on firefox-68 2026-11-21 21:21:31 +01:00
feder-cr f42d5ecd26 tests: characterize automation hooks on firefox-68 (download cancel and no-options control, refused port goto, element atoms, hybrid xray control and cross-origin handover) 2026-11-21 21:19:32 +01:00
feder-cr e89a789354 tests: the network oracle's e2e has no switch that weakens its verdict 2026-11-21 21:13:55 +01:00
feder-cr 38aaebd4f2 ci: the page A/B oracle has a control: the published engine against itself, alone on a pull request
ci_ab_oracle.py run dumps the published engine twice and compares the two (the A/A). A
difference, or a dump that did not run, is a broken control (exit 2) and the A/B is not
run. Without a candidate (a pull request: the engine under test is the published one,
given with --published-binary, under the seal of the core) the A/A is the whole run, on
the first two seeds of the candidate set (--limit 2); with a candidate it runs on every
seed first and the A/B follows against the first dump. compare --a-a repeats it from the
files.

tests/test_ab_oracle_e2e.py no longer requires INVISIBLE_SEAL_FILE: both modes save their
dumps and diffs in $AB_ORACLE_OUT or $RUNNER_TEMP/invpw-evidence/ab-oracle. 11 unit
tests for the A/A, its broken-control exit and the command line.
2026-11-21 21:13:04 +01:00
feder-cr 813b889c78 ci: the network and host A/B oracles are required suites, their unit files in the unit rows 2026-11-21 21:09:08 +01:00
feder-cr 3877438598 ci: the host-footprint A/B oracle, the process tree and the mapped modules per kind after the same journey
scripts/ci_ab_host.py walks the first steps of the fake web's journey with the stock client,
waits for the tree to be quiet and, before closing, takes the multiset of process kinds, the
modules each kind has mapped (normalized: install dir, system dirs, temporary paths, memfd and
shm names without numbers) and the children born and gone before the snapshot (Linux: strace;
Windows: the job's TotalProcesses and a WMI process-start trace). `ab` runs the A/A control
(the published engine twice: a difference is a broken control, exit 2) and, with a candidate,
the published engine against it, with the declared differences of ci/ab-host-expected.json
(glxtest on Linux; a declared difference that does not show is red as stale).

tests/test_ab_host.py is the comparator on synthetic footprints; tests/test_ab_host_e2e.py runs
it on Linux and Windows: the A/A on a PR's e2e, the A/A and the A/B with a candidate.
2026-11-21 21:08:43 +01:00
feder-cr 9cd828654f ci: the network A/B oracle, the same journey on the lab with the published engine and with a candidate, every leaf of what the wire carried compared
tests/_wire_capture.py reads what a client puts on the wire, with the standard library, hyperframe/h2 and aioquic: the TLS ClientHello (MSG_PEEK until the whole record is
buffered, then the same socket goes to ssl; GREASE is one word, the random, the session id, key share bytes and PSK identities are dropped), the HTTP/2 frames (SETTINGS in order,
WINDOW_UPDATE, PRIORITY, PRIORITY_UPDATE, the pseudo-header order of each request), HTTP/1.1 request heads as written, and an HTTP/3 client (QUIC transport parameters in order,
the SETTINGS frame, the header order). WireServer serves one HTTPS site on TCP (h1 or h2 by ALPN) and QUIC on one port.

scripts/ci_ab_network.py runs the P4 journey, an HTTPS page on each protocol, an HTTP/3 page, a WebRTC page (STUN and TURN through the relay) and two idle launches through a
coherent SOCKS5 gateway with the fake DoH, the witness and the watcher, writes a normalised transcript per engine, and compares two transcripts leaf by leaf (path and both
values). A direct connection on either side is red by itself; the leaves that differ between two runs of one engine live in ci/ab-network-volatile.json (empty until the A/A
measures them; an entry that matches no leaf is stale and red). --a-a runs the published engine twice: a difference there is a broken control (exit 2), and with a candidate
the A/A runs first.

tests/test_ab_network.py, tests/test_wire_capture.py and tests/test_wire_capture_quic.py hold the comparator, the normalisation, the lab and the parsers to known inputs, no
browser. tests/test_ab_network_e2e.py runs the A/A on a pull request (evidence under RUNNER_TEMP/invpw-evidence/ab-network) and the A/A then the A/B with a candidate.
2026-11-21 21:08:43 +01:00
feder-cr 050dbb159f ci: the A/B oracle visits the persona seeds, each at its own DPR
scripts/persona_cover.py computes, from the prefs the core emits for the seeds 0..99999
(every pref that varies across seeds belongs to a dimension or is excluded with its reason),
two sets of seeds: `candidate`, the smallest set that reaches every webgl renderer and every
DPR (5 seeds), and `final`, a greedy cover with reverse delete of every reachable value of
every dimension (20 seeds). ci/persona-seeds.json holds them with the sha256 of the
dimensions and features; `check` recomputes and says what changed.

ci_ab_oracle.py takes its visits from that file: the candidate set by default, each seed at
its own DPR (nothing pinned; ci_host_gate.py dump gets --visit and --no-pin), or
--seed-set final with --shard i/n to split the 20 seeds over several jobs. The e2e test
passes AB_ORACLE_SEED_SET and AB_ORACLE_SHARD through. tests/test_persona_cover.py holds the
stored file to a recompute, the covers to the dimensions, and a cover with a seed less red.
2026-11-21 21:00:55 +01:00
feder-cr 1f06722137 Characterize the readers of a WebGL/WebGPU canvas and the as-drawn painter on firefox-68
Five e2e tests written before the hooks of fingerprint/canvas/noise-projection and
fingerprint/canvas/as-drawn are redone: every reader of a WebGL element, an
OffscreenCanvas and a transferred placeholder gives the same noised bytes; a WebGPU
canvas reads noised through toDataURL and toBlob; -moz-element paints a WebGL canvas
as drawn. Each carries its control in the same test (canvas noise declared off).
2026-11-21 20:56:43 +01:00
feder-cr 9f91d752e4 tests: characterise the language and zone of workers, worklets, canvases, the page realm and every request kind (firefox-68) 2026-11-21 20:56:29 +01:00
feder-cr c820dd50f9 tests: characterize the bundle-only font list, src:local names, regional-indicator measureText, vertical text metrics and createPattern projection on firefox-68 2026-11-21 20:54:54 +01:00
feder-cr 20af8c4509 tests: characterize window occlusion, fullscreen without a window manager, and focus on OS deactivation (e2e, firefox-68) 2026-11-21 20:52:11 +01:00
feder-cr c6d3ded241 tests: characterisation e2e for screen, popup geometry, iframe click origin and css-media hooks 2026-11-21 20:52:05 +01:00
feder-cr 11db0d50b5 tests: characterize the declared WebGL parameters and the shader language on firefox-68 2026-11-21 20:52:05 +01:00
feder-cr 194035dec5 tests: characterise the WebGL readback roads (PBO, captureStream, partial rectangle, non-premultiplied) 2026-11-21 20:51:54 +01:00
feder-cr 79b46cc0a2 Characterization e2e of the media enumeration, voice URIs, eval name, native line endings and branding on firefox-68 2026-11-21 20:50:35 +01:00
feder-cr 8c926d9551 tests: characterize audio noise, audio context values, sample rate and hardware declarations on firefox-68 2026-11-21 20:48:55 +01:00
feder-cr c65828d809 tests: characterize the IPv6 literal gate of firefox-68 (direct refused, mapped refused, SOCKS destination left to the proxy) 2026-11-21 20:37:26 +01:00
feder-cr 37cae03940 ci: the A/B oracle, same seed and same bytes, the published firefox-68 engine against the candidate
scripts/ci_ab_oracle.py runs the host gate's dump twice on one machine with the same
core and wrapper: with the engine published as firefox-68 (its seal.json and archive
fetched through the core's own download under that seal) and with the candidate binary
under its own seal. Every leaf of every visit must be equal; only the noise entries of
exceptions.json and the diag. keys are excused. A difference is red with its leaf, both
values and the seed; a visit that compares fewer leaves than the host gate's reference
holds (16439) is red. It writes dump-68.json, dump-candidate.json and diff.json.

tests/test_ab_oracle.py holds the comparator to known inputs (27 cases, no browser), in
the rows of the whole unit suite. tests/test_ab_oracle_e2e.py is the gate's leg, the new
row wrapper.e2e.ab_oracle on Linux and Windows.
2026-11-21 19:40:51 +01:00
Federico Elia 5d84475d98 record 0.58.0 as published (#553) 2026-11-21 12:37:30 +01:00
Federico Elia 0d3a710c02 Release 0.58.0: invisible-core 68.80.0 on firefox-68 (the security state of a retail profile) (#552)
* security state: fetch has the engine generate it, every launch gives the core its engine, and CI launches with a fixed ready directory

The core replaced the intermediates list with the security state (intermediates, OneCRL and the CRLite filters, generated by the engine and copied into every profile). The CLI's fetch calls update_security_state(engine=<the binary it installed>); server.py's one write_user_js passes engine=<the executable of the launch> (no engine_argv: a generation is its own headless run, the core's default line). STEALTHFOX_SECURITY_STATE replaces STEALTHFOX_INTERMEDIATES in every workflow that launches the browser (scripts/ci_lab_security_state.py, ci/security-state/ with a result and no data, pinned by sha256); the unit tests' conftest patches ensure_security_state.

Tests: tests/test_cli.py (fetch), tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py, tests/test_ci_lab_security_state.py, tests/test_ci_workflows_set_the_security_state.py, each red on the code of main.

* e2e: the engine's security state - generation, a normal launch, a certificate revoked in a CRLite delta refused at the first navigation, a launch with no state

wrapper.e2e.securitystate, both legs, in the candidate's wrapper-e2e job: the engine launched directly in its generate mode (exit, the contract's keys, the hashes are the sha256 of the files, the bytes of security_state/) and through the core's generate; a normal launch writes no security-state pref and re-imports nothing; with Mozilla's CRLite test filters and a CA on Mozilla's default test key, a leaf with the serial and SCTs of revoked-in-delta.example.com is refused with SEC_ERROR_REVOKED_CERTIFICATE at the first navigation, a valid one loads, and the revoked one loads with no state; a launch with no or an empty state starts. Red on firefox-67 (no generate mode); the last test is a guard.

* ci: the required list only grows, so the two test files of the intermediates lab keep their names and guard that the old road stays gone

The judge of main refused the list of the branch: wrapper.unit.all.* lost tests/test_ci_lab_intermediates.py and tests/test_ci_workflows_set_the_intermediates_list.py. Both files come back with tests that the lab's files and steps are gone and that every leg that had the step sets the security state (red on main, 5 of 5). The unit suites count what the candidate collected (2183 and 2184) plus these 5: 2188 on Linux, 2189 on Windows.

* ci: the unit rows count what the candidate's gate collected (2168 linux, 2169 windows)

* Release 0.58.0: invisible-core 68.80.0 on firefox-68 (the security state of a retail profile)

* test: the frames of a goto are counted once all are announced, within the goto's own deadline

With Fission the innermost frame of a-b-a lives in a third process and its
announcement may reach the client after the top document's load (2 of 3
frames 0.22 s after the goto, run 44888497316). A frame that never comes
is still red.
2026-11-21 11:12:31 +01:00
Federico Elia 4c7faecde0 tests: the close-loop verdict counts the replies that arrive inside the close, and says where a silent browser was (#550)
The corsa 44856198702 (Windows) was red with replies [47, 0, 46] inside the close: the second browser's engine did not run for the
whole close while the loop read the other two. The verdict asked every browser for a call that BEGAN and ENDED inside the close, so a
single call that straddled the whole close turned a machine that did not run an engine into "the loop did not run".

- the pinger records the spans of its calls and the call still waiting; the test prints the close's duration, the replies that arrived
  inside it, the calls inside it, and the spans that touched it;
- a browser answered during the close when a reply ARRIVED while it was in flight, whenever its call began;
- a browser silent inside the close is red only if the watcher saw the loop's thread inside a step of the close that waits, or if no
  browser answered at all; "all three answer while the removal is held" stays with `during_removal`;
- unit tests: a held loop is red, one silent engine with a free loop is green (the 47/0/46 of the corsa), a straddling call counts, the
  client's own pinger on a scripted page; required-suites: wrapper.unit.all +6 (37 -> 43 in the verdicts file), e2e count unchanged.
2026-11-21 08:59:56 +01:00
Federico Elia f84f83f17d tests: the witness counts only what comes from this host (#551)
* tests: the witness counts as the browser only a source that is an address of this host

* ci: the unit rows that hold the witness test count its four new tests
2026-11-21 08:26:41 +01:00
Federico Elia 2b68ae3adf tests: each engine gate waits for the release that carries its property (68 vs 69) (#548)
* The accumulated line's tests wait for firefox-69, not for the release being made

firefox-68 now carries only the core's in-memory caches, the security-state
files, the held cut of a committed navigation (networkidle), the Juggler trace
and MOZ_LOG modules, and TEMP on D:. The 18 gates on firefox-68 of the 15 test
files of the accumulated line (idwr canvas text, empty fontconfig, ucrt maths,
WebGL blending and ALU, WebCodecs, system fonts and colours, the canvas colour
profile, WebGL2 without Mesa) move to firefox-69. test_a_page_that_moves_on_e2e
keeps its firefox-68 gate.

tests/data/engine_gates.json states for each release from firefox-68 on what it
carries and which test files wait for it; tests/unit/test_engine_at_least.py
reads every engine_at_least / engine_reaches call and fails when a gate names a
release the registry does not put that file in (red on the old gates, green now).
The two unit rows of ci/required-suites.json go up by the 5 new tests.

* Delete the 15 tests of the cancelled backlog, with what exists only for them

The accumulated line (firefox-69) is not the backlog any more: its 15 e2e tests prove
functions that were deleted, and a test no round runs is deleted, not left off.

Out with them: the six unit tests that only read their references or helpers, the
reference data (canvas text and ICC, ucrt sweeps, system theme, WebCodecs streams), the
scripts that built them and the shared canvas helper. tests/data/engine_gates.json keeps
only firefox-68. The strace stand-in that the fontconfig cache test imported from one of
the deleted files moves to tests/_strace_stand_in.py. The two rows of the unit suite lose
those files and 41 tests.

* The fake web's case under load waits for firefox-68, where the held cut of networkidle is fixed
2026-11-21 04:04:49 +01:00
Federico Elia 6c800e7fa0 The judge lets a test leave a row only by a retired list that main holds (#549)
A test that is deleted because its feature is cancelled cannot stay in the rows, and the
judge, reading main, called every such deletion a lost test and a lower minimum.
ci/retired-tests.json, read from main next to main's list (never from the judged branch),
names the files that may go: each with its reason, its date and the number of tests it had
in each row. A retired file that no longer exists leaves its row without being counted as
lost, and the minimum of the row may go down by exactly those tests. A retired file still
on disk, a file main did not retire and a minimum lowered by more all stay red. The ten
files of the cancelled backlog that the unit rows name are the first entries; a test checks
that the declared counts are what the collection gives while a file exists.
2026-11-21 02:45:40 +01:00
454 changed files with 80377 additions and 29715 deletions

No files matched your search

+24
View File
@@ -13,3 +13,27 @@
# Linux one. The gate folds CRLF vs LF deliberately, but there is no reason to
# make it do that work.
PUBLISHED.json text eol=lf
# The persona seeds are compared byte for byte with their canonical rendering (tests/test_persona_cover.py): LF on every checkout.
ci/persona-seeds.json text eol=lf
# The wire-method budget is compared with what `dump()` writes, byte for byte
# (tests/test_every_wire_method_is_served_or_refused.py): a Windows runner checks
# out with autocrlf and would hand the test CRLF that nobody wrote.
tests/gates/wire_method_debt.json text eol=lf
# The lock of the gate is hashed byte for byte: its header names the sha256 of gate.in, so neither file may be rewritten with CRLF on a Windows checkout.
ci/py-lock/** text eol=lf
# The vendored bundles are third-party bytes whose sha256 is pinned in tests/vendor/README.md: no checkout converts their line endings
# (a Windows runner with core.autocrlf=true would hand them over with CRLF and the hash would no longer match).
tests/vendor/*.js -text
# The evidence of the known-defects tests and the copy of the core's matcher are hashed byte for byte against tests/data/known_mozilla_defects/sources.json: no checkout converts their line endings.
tests/data/known_mozilla_defects/** -text
# The ready security state is hashed byte for byte against ci/security-state.pin.json.
ci/security-state/** -text
# The page of the password-mask e2e is the same bytes as the page of the retail capture (its sha256 is checked), so no checkout may change its line endings.
tests/data/password_mask_page.html -text
+3 -3
View File
@@ -35,18 +35,18 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out the script (main)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
with:
path: main
- name: Check out the badges branch
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
with:
ref: badges
path: badges
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
+71 -84
View File
@@ -22,9 +22,14 @@
# Windows runner separates the two without asking anyone to stay off it
# for six hours.
#
# A SECOND PATTERN, `pattern=init-map`: not a hunt, a measurement. It maps what a launch does from `InvisiblePlaywright(...)` to the first page and the first goto,
# with the time of every step (scripts/init_map.py), on Linux and on Windows, and uploads a JSON and a Markdown table. No threshold and no verdict: the job is green
# when it measured, and the numbers are read by whoever is looking for where to optimise. The loop above does not run for it.
# A second use, chosen by the input `ab_network_webrtc_seed` (empty = the loop
# above, as always): the network oracle's WebRTC walk of that seed, alone,
# `runs` times for each engine of its A/A (the published engine twice). It
# exists to tell two readings apart when the A/A of that walk differs from
# itself in the number of TURN Allocate datagrams (scripts/ci_ab_network.py:
# AB_NETWORK_HUNT): each repetition keeps every datagram with its time and its
# STUN transaction id and the page's own ICE times (network/hunt/<engine>-<i>.json,
# summary in network/hunt/summary.json). It decides nothing: the step exits 0.
#
# Doesn't start on its own: `workflow_dispatch` only. It's not a gate, it's
# an investigation tool, and it must not be added to the required contexts.
@@ -38,18 +43,10 @@ on:
description: "How many runs at most (at 12% it takes ~18 for a 90% chance)"
required: false
default: "18"
pattern:
description: "What to run. hang = the loop below (e2e until it catches a hang); init-map = the map of the launch's steps with their time (Linux and Windows; `runs` and `os` do not apply)"
ab_network_webrtc_seed:
description: "A seed (e.g. 4) to repeat ONLY the network oracle's WebRTC walk of, `runs` times for each engine of its A/A, instead of the e2e loop. Empty: the e2e loop."
required: false
default: "hang"
type: choice
options:
- hang
- init-map
map_runs:
description: "pattern=init-map: how many launches are measured, on a warm cache, for each scenario"
required: false
default: "10"
default: ""
os:
description: "Where to hunt. windows-latest answers a DIFFERENT question: are the interaction retries seen on the dev machine the product or contention?"
required: false
@@ -75,10 +72,27 @@ env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
# The Ubuntu packages of the Linux hunt, from Ubuntu's archive once per runner image and list (linux-deps.yml), never by the hunt. On Windows this job is
# skipped and the hunt runs on (the condition below accepts `skipped` and `success`, nothing else).
linux-deps-hunt:
name: linux-deps-hunt
if: startsWith(inputs.os, 'ubuntu')
uses: ./.github/workflows/linux-deps.yml
with:
name: hunt
packages: xvfb
playwright_wrapper_ref: ${{ github.sha }}
hunt:
name: hunt (${{ inputs.os }})
if: inputs.pattern != 'init-map'
needs: linux-deps-hunt
if: ${{ !cancelled() && (needs.linux-deps-hunt.result == 'success' || needs.linux-deps-hunt.result == 'skipped') }}
runs-on: ${{ inputs.os }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(inputs.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(inputs.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
# 18 runs of ~6 minutes plus install time. Deliberately generous: the
# ceiling here must NEVER be the thing that stops the hunt, or we're back
# to a killed job that explains nothing, which is the original defect.
@@ -105,16 +119,49 @@ jobs:
# Linux only: on Windows the browser launches on the runner's desktop,
# and `firefox-launch-matrix.yml` has shown for months that it really
# starts there.
- name: System deps (xvfb + Firefox runtime libs)
- name: The Linux packages (the run's linux-deps-hunt job, no mirror)
if: runner.os == 'Linux'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: ${{ needs.linux-deps-hunt.outputs.artifact }}
path: /tmp/linux-deps
- name: System deps (xvfb + Firefox runtime libs; the repository of the linux-deps-hunt job)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo "$(which python)" -m playwright install-deps firefox
set -euo pipefail
# The run's linux-deps repository and nothing else: apt reads only its sources list and lists folder, the files are already in apt's archives,
# and the roots are installed by name with --no-download: a package the repository does not hold is named here and red, never fetched.
read -r OS VER < /tmp/linux-deps/image.txt
echo "the repository was read on $OS $VER; this runner is $ImageOS $ImageVersion"
sudo mkdir -p /tmp/linux-deps-apt/lists/partial /tmp/linux-deps-apt/parts
echo "deb [trusted=yes] file:/tmp/linux-deps ./" | sudo tee /tmp/linux-deps-apt/sources.list >/dev/null
APT="-o Dir::Etc::SourceList=/tmp/linux-deps-apt/sources.list -o Dir::Etc::SourceParts=/tmp/linux-deps-apt/parts -o Dir::State::Lists=/tmp/linux-deps-apt/lists -o Acquire::Languages=none"
sudo apt-get $APT update
sudo cp /tmp/linux-deps/*.deb /var/cache/apt/archives/
sudo apt-get $APT install -y --no-download --no-install-recommends $(cat /tmp/linux-deps/roots.txt)
- name: The security state (a fixed directory of the repository)
if: inputs.ab_network_webrtc_seed != ''
run: python scripts/ci_lab_security_state.py set --pin ci/security-state.pin.json
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: The GeoIP database (made by the repository, same bytes every run)
if: inputs.ab_network_webrtc_seed != ''
run: python scripts/ci_lab_geoip.py build
# The hunt of the network oracle's WebRTC walk: instead of the loop below, never with it. `runs` is the number of repetitions per engine.
- name: The network oracle's WebRTC walk of one seed, repeated (decides nothing)
if: inputs.ab_network_webrtc_seed != ''
env:
PYTHONUNBUFFERED: "1"
AB_NETWORK_HUNT: webrtc:${{ inputs.ab_network_webrtc_seed }}:${{ inputs.runs }}
run: |
set -u
if [ "$RUNNER_OS" = "Linux" ]; then PRE="xvfb-run -a"; else PRE=""; fi
mkdir -p network
$PRE python -u scripts/ci_ab_network.py ab --a-a --out network --published-binary "$FF"
- name: Loop until it catches one
if: inputs.ab_network_webrtc_seed == ''
env:
PYTHONUNBUFFERED: "1"
INVPW_TEST_WATCHDOG_FILE: evidence/e2e-watchdog.log
@@ -170,71 +217,11 @@ jobs:
if-no-files-found: warn
retention-days: 14
# pattern=init-map: the map of a launch (scripts/init_map.py). The published engine, the core and the wrapper of this ref. Warm cache: one launch that is not
# counted, then `map_runs` launches in a fresh interpreter each, for three scenarios (no proxy; behind a SOCKS5 gateway of the runner, which keeps the UDP
# measurement beside the TCP discovery; `headless=True`); then one launch on a cold cache (a new cache directory, the engine kept) and one under cProfile. The
# engine's download is timed apart (the `fetch` step). Nothing here is a gate.
init-map:
name: init-map (${{ matrix.os }})
if: inputs.pattern == 'init-map'
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- { os: linux, runner: ubuntu-24.04 }
- { os: windows, runner: windows-2022 }
env:
# The profile of every Firefox is made in TEMP: on the Windows runners the default is on C:, whose disk the browsers saturate (the reason of the e2e jobs).
TEMP: ${{ startsWith(matrix.runner, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.runner, 'windows') && 'D:\a\_temp' || '/tmp' }}
PYTHONUTF8: "1"
PYTHONUNBUFFERED: "1"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install the wrapper (and the stock client, for the system libraries of Firefox)
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
- name: System deps (xvfb + Firefox runtime libs)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo "$(which python)" -m playwright install-deps firefox
- name: Fetch the published firefox binary (timed apart, a cold download is not a step of the map)
run: |
t0=$(python -c "import time; print(time.time())")
python -m invisible_playwright fetch | tee fetch.log
t1=$(python -c "import time; print(time.time())")
echo "INIT_MAP_FETCH_SECONDS=$(python -c "print(round($t1 - $t0, 2))")" >> "$GITHUB_ENV"
- name: The map of the launch
env:
INIT_MAP_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
mkdir -p init-map-out
if [ "$RUNNER_OS" = "Linux" ]; then PRE="xvfb-run -a"; else PRE=""; fi
$PRE python -u scripts/init_map.py --runs "${{ inputs.map_runs }}" --out init-map-out 2>&1 | tee init-map-out/init-map.log
test -f "init-map-out/init-map-$(python -c "import os; print('windows' if os.name == 'nt' else 'linux')").md"
- name: The table in the summary
if: always()
run: cat init-map-out/init-map-*.md >> "$GITHUB_STEP_SUMMARY" || true
- name: Upload the map
if: always()
- name: Upload the hunt of the network oracle's WebRTC walk
if: always() && inputs.ab_network_webrtc_seed != ''
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: init-map-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
path: |
init-map-out
fetch.log
name: e2e-hunt-network-webrtc-${{ inputs.os }}-${{ github.run_id }}-${{ github.run_attempt }}
path: network/hunt
if-no-files-found: warn
retention-days: 30
retention-days: 14
+1188 -70
View File
File diff suppressed because it is too large. Load diff
+40 -10
View File
@@ -53,11 +53,27 @@ jobs:
core-on-index:
uses: ./.github/workflows/core-on-index.yml
walk:
name: fakeweb ${{ matrix.profile }} (${{ matrix.os }})
# The Ubuntu packages of the Linux legs, from Ubuntu's archive once per runner image and list (linux-deps.yml), never by a leg.
linux-deps-fakeweb:
name: linux-deps-fakeweb
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
uses: ./.github/workflows/linux-deps.yml
with:
name: fakeweb
packages: xvfb
playwright_wrapper_ref: ${{ github.sha }}
walk:
name: fakeweb ${{ matrix.profile }} (${{ matrix.os }})
needs: [core-on-index, linux-deps-fakeweb]
if: needs.core-on-index.outputs.available == 'true'
runs-on: ${{ matrix.runner }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(matrix.runner, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.runner, 'windows') && 'D:\a\_temp' || '/tmp' }}
timeout-minutes: 30
strategy:
fail-fast: false
@@ -80,18 +96,32 @@ jobs:
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
- name: System deps (xvfb + Firefox runtime libs)
- name: The Linux packages (the run's linux-deps-fakeweb job, no mirror)
if: matrix.os == 'linux'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: ${{ needs.linux-deps-fakeweb.outputs.artifact }}
path: /tmp/linux-deps
- name: System deps (xvfb + Firefox runtime libs; the repository of the linux-deps-fakeweb job)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo "$(which python)" -m playwright install-deps firefox
set -euo pipefail
# The run's linux-deps repository and nothing else: apt reads only its sources list and lists folder, the files are already in apt's archives,
# and the roots are installed by name with --no-download: a package the repository does not hold is named here and red, never fetched.
read -r OS VER < /tmp/linux-deps/image.txt
echo "the repository was read on $OS $VER; this runner is $ImageOS $ImageVersion"
sudo mkdir -p /tmp/linux-deps-apt/lists/partial /tmp/linux-deps-apt/parts
echo "deb [trusted=yes] file:/tmp/linux-deps ./" | sudo tee /tmp/linux-deps-apt/sources.list >/dev/null
APT="-o Dir::Etc::SourceList=/tmp/linux-deps-apt/sources.list -o Dir::Etc::SourceParts=/tmp/linux-deps-apt/parts -o Dir::State::Lists=/tmp/linux-deps-apt/lists -o Acquire::Languages=none"
sudo apt-get $APT update
sudo cp /tmp/linux-deps/*.deb /var/cache/apt/archives/
sudo apt-get $APT install -y --no-download --no-install-recommends $(cat /tmp/linux-deps/roots.txt)
- name: Playwright's own Firefox (the control)
run: python -m playwright install firefox
# The preloaded-intermediates list is a file of the repository (ci/intermediates.json, empty, the sha256 in ci/intermediates.pin.json): with
# STEALTHFOX_INTERMEDIATES set the core neither downloads nor checks Mozilla's. BEFORE `fetch`, which makes the list present (it would download it).
- name: The intermediates list (a fixed file of the repository)
run: python scripts/ci_lab_intermediates.py set --pin ci/intermediates.pin.json
# The security state is a ready directory of the repository (ci/security-state/, a result with no data, the sha256 in ci/security-state.pin.json): with
# STEALTHFOX_SECURITY_STATE set the core neither downloads nor generates one. BEFORE `fetch`, which makes the state present (it would download and generate it).
- name: The security state (a fixed directory of the repository)
run: python scripts/ci_lab_security_state.py set --pin ci/security-state.pin.json
- name: Fetch the published firefox binary
run: echo "FF=$(cd "$RUNNER_TEMP" && python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
# The GeoIP database made by the repository (no download, the same bytes every run).
+8 -3
View File
@@ -50,6 +50,11 @@ jobs:
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ${{ matrix.os }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: 'D:\a\_temp'
TMP: 'D:\a\_temp'
strategy:
fail-fast: false
matrix:
@@ -60,10 +65,10 @@ jobs:
python: ["3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: ${{ matrix.python }}
cache: pip
@@ -146,7 +151,7 @@ jobs:
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 (v4.6.2)
with:
name: launch-failure-${{ matrix.os }}-py${{ matrix.python }}
path: |
+188
View File
@@ -0,0 +1,188 @@
# ─────────────────────────────────────────────────────────────────────────────
# linux-deps.yml — the Ubuntu packages of a workflow's Linux jobs, read from Ubuntu's archive ONCE per runner image and list, never by the jobs.
# The same file in the series and in the wrapper.
#
# Republish 45297517213: wrapper.e2e.fakeweb-linux-x86_64 was cancelled at its 25 minutes with every step green, because `playwright install-deps
# firefox` fetched 48.8 MB from the archive's mirror at 102 kB/s ("Fetched 48.8 MB in 7min 59s"). The speed of a mirror is a third party's.
# The first form of this file handed the jobs only the packages missing on ITS runner image and installed them against the job's own image: the
# wrapper's PR #584 ran that job on ubuntu24 20261116.376.1 and the legs on 20261116.133.1, and the legs' apt wanted a package the files did not
# hold ("E: Unable to fetch some archives"). GitHub mixes builds of an image in one run, so the files cannot depend on the image they were read on.
#
# So this job hands the jobs a REPOSITORY: the roots (the packages named with their recommends, the recommends themselves, the packages named without,
# and the roots `playwright install-deps firefox` installs for the Playwright of the wrapper's pin, read from its table), their whole closure of
# Depends and Pre-Depends with the virtual packages' providers, INCLUDING what the image already has, a Packages index, and roots.txt. A job
# installs the roots BY NAME with an apt that reads only that repository (its own sources list and lists folder) and --no-download: whatever its
# image has or lacks is resolved from the files, and a package that is not there is named by apt, red, never fetched from a mirror.
# The files are kept in a cache entry keyed by the image's OS, the date of its release and the sha of the list (an entry of .deb files on GitHub's
# runners, this file only), and handed to the run's jobs as the artifact linux-deps-<name>. Not by the image's build: the repository does not depend
# on it, and the builds of one release are mixed in a run (20261116.133.1, 20261116.376.1), so a key per build missed the entry run after run and
# read the archive each time (wrapper PR #585: 13 minutes for a closure, from a slow mirror). The download runs 8 at a time: the slowness seen is
# per connection.
# ─────────────────────────────────────────────────────────────────────────────
name: linux-deps
on:
workflow_call:
inputs:
name:
description: the artifact is linux-deps-<name>
type: string
required: true
packages:
description: packages installed with their recommends (as `apt-get install -y` did)
type: string
default: ''
packages_no_recommends:
description: packages installed without their recommends
type: string
default: ''
playwright_wrapper_ref:
description: the oss-invisible/playwright ref whose scripts/playwright_pin.txt names the Playwright of `install-deps firefox`; empty for none
type: string
default: ''
outputs:
artifact:
description: the artifact that holds the repository
value: ${{ jobs.debs.outputs.artifact }}
permissions: { contents: read }
jobs:
debs:
name: debs
runs-on: ubuntu-24.04
timeout-minutes: 20
outputs:
artifact: linux-deps-${{ inputs.name }}
steps:
- name: Checkout wrapper (its Playwright pin)
if: inputs.playwright_wrapper_ref != ''
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: oss-invisible/playwright
ref: ${{ inputs.playwright_wrapper_ref }}
path: linux-deps-pin
fetch-depth: 1
sparse-checkout: scripts/playwright_pin.txt
sparse-checkout-cone-mode: false
- name: Set up Python
if: inputs.playwright_wrapper_ref != ''
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: The list and its entry (the runner image and the sha of the list)
id: spec
shell: bash
env:
PACKAGES: ${{ inputs.packages }}
NO_REC: ${{ inputs.packages_no_recommends }}
PW_REF: ${{ inputs.playwright_wrapper_ref }}
run: |
set -euo pipefail
: "${ImageOS:?no ImageOS: not a GitHub runner image}" "${ImageVersion:?no ImageVersion: not a GitHub runner image}"
PIN=""
if [ -n "$PW_REF" ]; then PIN="$(tr -d '[:space:]' < linux-deps-pin/scripts/playwright_pin.txt)"; [ -n "$PIN" ] || { echo "ERROR: empty scripts/playwright_pin.txt at $PW_REF"; exit 1; }; fi
mkdir -p "$RUNNER_TEMP/linux-deps-spec"
printf 'form: repository of the closure\nrecommends: %s\nno-recommends: %s\nplaywright-roots-firefox: %s\n' "$PACKAGES" "$NO_REC" "$PIN" > "$RUNNER_TEMP/linux-deps-spec/spec.txt"
cat "$RUNNER_TEMP/linux-deps-spec/spec.txt"
SHA="$(sha256sum < "$RUNNER_TEMP/linux-deps-spec/spec.txt" | cut -c1-16)"
echo "pin=$PIN" >> "$GITHUB_OUTPUT"
RELEASE="${ImageVersion%%.*}"
echo "key=linux-deps-$ImageOS-$RELEASE-$SHA" | tee -a "$GITHUB_OUTPUT"
- name: The entry of this image and list
id: restore
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /tmp/linux-deps
key: ${{ steps.spec.outputs.key }}
- name: A new image or list - the repository from Ubuntu's archive, once
if: steps.restore.outputs.cache-hit != 'true'
shell: bash
env:
PACKAGES: ${{ inputs.packages }}
NO_REC: ${{ inputs.packages_no_recommends }}
PIN: ${{ steps.spec.outputs.pin }}
run: |
set -euo pipefail
printf '%s\n' 'Acquire::http::Timeout "60";' 'Acquire::https::Timeout "60";' 'Acquire::Retries "5";' \
| sudo tee /etc/apt/apt.conf.d/80-ci-network >/dev/null
sudo apt-get update -qq
command -v apt-ftparchive >/dev/null || sudo apt-get install -y -qq apt-utils
PW_ROOTS=""
if [ -n "$PIN" ]; then
python -m pip install --quiet "playwright==$PIN"
# The roots `playwright install-deps firefox` installs (with --no-install-recommends): the `tools` and `firefox` lists of this system's
# entry in the driver's table, the list install-deps itself reads.
PLATFORM="ubuntu$(. /etc/os-release && echo "$VERSION_ID")-x64"
PW_ROOTS="$(python - "$PLATFORM" <<'PY'
import os, re, sys
import playwright
path = os.path.join(os.path.dirname(playwright.__file__), "driver", "package", "lib", "coreBundle.js")
text = open(path, encoding="utf-8").read()
at = text.find('"%s": {' % sys.argv[1])
if at < 0:
sys.exit("no entry %s in %s" % (sys.argv[1], path))
roots = []
for group in ("tools", "firefox"):
m = re.compile(r"\b%s: \[(.*?)\]" % group, re.S).search(text, at)
if not m:
sys.exit("no %s list after the entry %s" % (group, sys.argv[1]))
roots += re.findall(r'"([a-z0-9][a-z0-9.+-]*)"', m.group(1))
if "xvfb" not in roots or len(roots) < 10:
sys.exit("the roots read from %s are not install-deps' list: %s" % (path, roots))
print(" ".join(sorted(set(roots))))
PY
)"
echo "playwright install-deps firefox roots: $PW_ROOTS"
fi
# The recommends of the packages named with their recommends (as `apt-get install -y` installed them), one level, as roots themselves.
RECS=""
[ -z "$PACKAGES" ] || RECS="$(apt-cache depends --no-depends --no-pre-depends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances $PACKAGES \
| sed -n 's/^ *|\{0,1\}Recommends: \([a-z0-9][^ <>]*\)$/\1/p' | sort -u | tr '\n' ' ')"
NAMED="$(echo $PACKAGES $RECS $NO_REC $PW_ROOTS | tr ' ' '\n' | sed '/^$/d' | sort -u | tr '\n' ' ')"
# A name only provided (libgtk-3-0, libgtk-3-0t64's on noble) is its provider, as `apt-get install` resolved it: `apt-cache depends
# --recurse` does not walk from a virtual root (wrapper PR #585: the closure of libgtk-3-0 came without libgtk-3-0t64, 92 packages of 230).
ROOTS=""
for r in $NAMED; do
if apt-cache show --no-all-versions "$r" 2>/dev/null | grep -qx "Package: $r"; then ROOTS="$ROOTS $r"; continue; fi
p="$(apt-cache showpkg "$r" | sed -n '/^Reverse Provides:/,$p' | sed '1d' | awk 'NF {sub(/:.*/, "", $1); print $1}' | sort -u)"
[ "$(echo "$p" | wc -w)" = 1 ] || { echo "ERROR: the root $r is not a package and is provided by [$p], not by one package"; exit 1; }
echo "the root $r is provided by $p"
ROOTS="$ROOTS $p"
done
ROOTS="$(echo $ROOTS | tr ' ' '\n' | sort -u | tr '\n' ' ')"
echo "roots: $ROOTS"
# The closure: Depends and Pre-Depends, recursively, the providers of every virtual package, what the image has included.
CLOSURE="$(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances $ROOTS \
| grep -E '^[a-z0-9]' | sed 's/:amd64$//' | grep -v ':' | sort -u)"
REAL="$({ apt-cache show --no-all-versions $CLOSURE 2>/dev/null || true; } | sed -n 's/^Package: //p' | sort -u)"
rm -rf /tmp/linux-deps && mkdir -p /tmp/linux-deps
# The lists were refreshed above (apt-get update), so every closure name has its current version; each fetch retries 5 times. The MB and
# the seconds of the download go to the log, so the archive's speed is measured run after run.
T0="$(date +%s)"
( cd /tmp/linux-deps && echo "$REAL" | xargs -n 20 -P 8 apt-get download -qq -o Acquire::Retries=5 )
T1="$(date +%s)"
echo "download: $(echo "$REAL" | wc -w) packages, $(du -sm /tmp/linux-deps | cut -f1) MB in $((T1 - T0)) s"
( cd /tmp/linux-deps && apt-ftparchive packages . > Packages )
for p in $REAL; do grep -qx "Package: $p" /tmp/linux-deps/Packages || { echo "ERROR: $p of the closure was not downloaded"; exit 1; }; done
# A root is a package of the repository or a name one of them provides (libgtk-3-0 is libgtk-3-0t64's on noble, as `apt-get install` resolved it)
for r in $ROOTS; do
e="$(printf '%s' "$r" | sed 's/[.+]/\\&/g')"
grep -qE "^(Package: $e|Provides: (.*, )?$e( \(.*\))?(,.*)?)$" /tmp/linux-deps/Packages || { echo "ERROR: the root $r is not in the repository"; exit 1; }
done
echo "$ROOTS" | tr ' ' '\n' | sed '/^$/d' > /tmp/linux-deps/roots.txt
cp "$RUNNER_TEMP/linux-deps-spec/spec.txt" /tmp/linux-deps/spec.txt
echo "$ImageOS $ImageVersion" > /tmp/linux-deps/image.txt
echo "$(wc -l < /tmp/linux-deps/roots.txt) roots, $(find /tmp/linux-deps -name '*.deb' | wc -l) packages in the closure, $(du -sh /tmp/linux-deps | cut -f1)"
- name: Keep the entry
if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /tmp/linux-deps
key: ${{ steps.spec.outputs.key }}
- name: The repository for the jobs of this run
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: linux-deps-${{ inputs.name }}
path: /tmp/linux-deps
retention-days: 1
if-no-files-found: error
+1 -1
View File
@@ -9,4 +9,4 @@ permissions:
contents: read
jobs:
noreply-identity:
uses: oss-invisible/core/.github/workflows/noreply-identity.yml@main
uses: oss-invisible/core/.github/workflows/noreply-identity.yml@6d048ac02fc886a50791a4ae0423cbca2a547d72 # core main, the last change of noreply-identity.yml
+2 -2
View File
@@ -63,10 +63,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo (docs + the converter)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
+8 -8
View File
@@ -62,7 +62,7 @@ jobs:
present: ${{ steps.probe.outputs.present }}
version: ${{ steps.probe.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- id: probe
shell: bash
run: |
@@ -88,10 +88,10 @@ jobs:
contents: read
checks: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
@@ -206,8 +206,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: Install the wrapper (its core comes from the index)
@@ -225,10 +225,10 @@ jobs:
contents: write # to commit the ledger entry back
pull-requests: write # and to open one when protection declines the push
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- run: python -m pip install --upgrade pip build
@@ -237,7 +237,7 @@ jobs:
run: |
pip install twine
twine check dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
- name: record what was published, and commit it back
# The action above holds the OIDC credential and does the upload; the
# thing that writes PUBLISHED.json is invisible_core.release. So the
+44
View File
@@ -0,0 +1,44 @@
# ─────────────────────────────────────────────────────────────────────────────
# published-set.yml - the control side of the A/B oracles is the last PUBLISHED SET, and this keeps its lock equal to the index.
#
# An A/B oracle holds a candidate against the engine published before it, and that engine is launched by the core it was built for (it refuses a launch whose
# declarations that core does not emit). So the control is a set: the last `invisible-playwright` on the index, the `invisible-core` it pins exactly, and the engine
# that core's seal pins, in a venv of their own, installed by hash (ci-03): ci/py-lock/published.txt, made by scripts/ci_published_set.py. Nothing in it is chosen
# by hand; a new release is the new baseline.
#
# The lock is a committed file so that a run installs it offline (the wheelhouse of the run holds the files it names). What can go stale is the lock, the day a
# release is published: this reads the index (the JSON of the two packages, nothing is installed or run) and is RED when the committed lock is not the index's last
# release. The fix is one command, `python scripts/ci_published_set.py resolve --write`, in the pull request that records the release.
# ─────────────────────────────────────────────────────────────────────────────
name: published-set
on:
schedule:
- cron: "41 5 * * *"
pull_request:
paths:
- ci/py-lock/published.txt
- scripts/ci_published_set.py
- .github/workflows/published-set.yml
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
lock-is-the-index:
name: the committed published set is the index's last release
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out the lock and the script
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: The lock against the index (reads the index, installs nothing)
run: python scripts/ci_published_set.py check
+56 -8
View File
@@ -146,16 +146,29 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "admission: $admission, invisible-playwright $version"
# The Ubuntu packages of the Linux legs, from Ubuntu's archive once per runner image and list (linux-deps.yml), never by a leg.
linux-deps-real-sites:
name: linux-deps-real-sites
needs: plan
uses: ./.github/workflows/linux-deps.yml
with:
name: real-sites
packages: xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
round:
name: round (${{ matrix.os }})
needs: plan
needs: [plan, linux-deps-real-sites]
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false # one system failing must not hide the other's table
matrix:
os: [ubuntu-24.04, windows-latest]
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
VERSION: ${{ needs.plan.outputs.version }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
@@ -163,11 +176,26 @@ jobs:
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.12' }
- name: Linux runtime libraries for the browsers
- name: The Linux packages (the run's linux-deps-real-sites job, no mirror)
if: runner.os == 'Linux'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: ${{ needs.linux-deps-real-sites.outputs.artifact }}
path: /tmp/linux-deps
- name: Linux runtime libraries for the browsers (the repository of the linux-deps-real-sites job)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
set -euo pipefail
# The run's linux-deps repository and nothing else: apt reads only its sources list and lists folder, the files are already in apt's archives,
# and the roots are installed by name with --no-download: a package the repository does not hold is named here and red, never fetched.
read -r OS VER < /tmp/linux-deps/image.txt
echo "the repository was read on $OS $VER; this runner is $ImageOS $ImageVersion"
sudo mkdir -p /tmp/linux-deps-apt/lists/partial /tmp/linux-deps-apt/parts
echo "deb [trusted=yes] file:/tmp/linux-deps ./" | sudo tee /tmp/linux-deps-apt/sources.list >/dev/null
APT="-o Dir::Etc::SourceList=/tmp/linux-deps-apt/sources.list -o Dir::Etc::SourceParts=/tmp/linux-deps-apt/parts -o Dir::State::Lists=/tmp/linux-deps-apt/lists -o Acquire::Languages=none"
sudo apt-get $APT update
sudo cp /tmp/linux-deps/*.deb /var/cache/apt/archives/
sudo apt-get $APT install -y --no-download --no-install-recommends $(cat /tmp/linux-deps/roots.txt)
# Two venvs that share nothing: what a user gets from the index, and what a user of stock Playwright gets. The wrapper is installed by its published version
# (the index may lag a few minutes behind a publication: only the install is asked again), then its engine is fetched the way a user fetches it.
@@ -245,9 +273,14 @@ jobs:
# One pass of stock over the list, on one system: five of them per system make the admission.
admit:
name: admit (${{ matrix.os }}, pass ${{ matrix.repeat }})
needs: plan
needs: [plan, linux-deps-real-sites]
if: needs.plan.outputs.admission == 'true'
runs-on: ${{ matrix.os }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
timeout-minutes: 40
strategy:
fail-fast: false
@@ -260,11 +293,26 @@ jobs:
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.12' }
- name: Linux runtime libraries for the browser
- name: The Linux packages (the run's linux-deps-real-sites job, no mirror)
if: runner.os == 'Linux'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: ${{ needs.linux-deps-real-sites.outputs.artifact }}
path: /tmp/linux-deps
- name: Linux runtime libraries for the browser (the repository of the linux-deps-real-sites job)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
set -euo pipefail
# The run's linux-deps repository and nothing else: apt reads only its sources list and lists folder, the files are already in apt's archives,
# and the roots are installed by name with --no-download: a package the repository does not hold is named here and red, never fetched.
read -r OS VER < /tmp/linux-deps/image.txt
echo "the repository was read on $OS $VER; this runner is $ImageOS $ImageVersion"
sudo mkdir -p /tmp/linux-deps-apt/lists/partial /tmp/linux-deps-apt/parts
echo "deb [trusted=yes] file:/tmp/linux-deps ./" | sudo tee /tmp/linux-deps-apt/sources.list >/dev/null
APT="-o Dir::Etc::SourceList=/tmp/linux-deps-apt/sources.list -o Dir::Etc::SourceParts=/tmp/linux-deps-apt/parts -o Dir::State::Lists=/tmp/linux-deps-apt/lists -o Acquire::Languages=none"
sudo apt-get $APT update
sudo cp /tmp/linux-deps/*.deb /var/cache/apt/archives/
sudo apt-get $APT install -y --no-download --no-install-recommends $(cat /tmp/linux-deps/roots.txt)
- name: Stock Playwright and its Firefox, then one pass
shell: bash
+67 -19
View File
@@ -53,8 +53,8 @@ jobs:
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
@@ -82,8 +82,8 @@ jobs:
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
@@ -108,8 +108,8 @@ jobs:
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
@@ -135,8 +135,8 @@ jobs:
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
@@ -164,13 +164,18 @@ jobs:
# email (author, committer, tagger). The judge lives in oss-invisible/core and
# is read from its main, never from this branch.
noreply-identity:
uses: oss-invisible/core/.github/workflows/noreply-identity.yml@main
uses: oss-invisible/core/.github/workflows/noreply-identity.yml@6d048ac02fc886a50791a4ae0423cbca2a547d72 # core main, the last change of noreply-identity.yml
unit:
name: pytest (${{ matrix.os }}, py${{ matrix.python }})
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ${{ matrix.os }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
strategy:
fail-fast: false
matrix:
@@ -190,7 +195,7 @@ jobs:
- { os: windows-latest, python: "3.13" }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
# main, for the tests that compare a list of this change with the list of main (tests/test_the_e2e_tests_do_not_wait_on_clocks.py: the debt of
# the e2e tests only shrinks). The checkout is one commit deep; without this the comparison has nothing to read and the test says so.
@@ -199,7 +204,7 @@ jobs:
run: git fetch --no-tags --depth=1 origin main:refs/remotes/origin/main
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: ${{ matrix.python }}
cache: pip
@@ -234,11 +239,11 @@ jobs:
run: |
python -m ruff check --select F821,F811,F601 --no-cache --output-format concise .
# The preloaded-intermediates list is a file of the repository (ci/intermediates.json, empty, the sha256 in ci/intermediates.pin.json): with
# STEALTHFOX_INTERMEDIATES set the core neither downloads nor checks Mozilla's.
- name: The intermediates list (a fixed file of the repository)
# The security state is a ready directory of the repository (ci/security-state/, a result with no data, the sha256 in ci/security-state.pin.json): with
# STEALTHFOX_SECURITY_STATE set the core neither downloads nor generates one.
- name: The security state (a fixed directory of the repository)
shell: bash
run: python scripts/ci_lab_intermediates.py set --pin ci/intermediates.pin.json
run: python scripts/ci_lab_security_state.py set --pin ci/security-state.pin.json
# The GeoIP database is made by the repository (scripts/ci_lab_geoip.py: the same bytes on every run, the sha256 in ci/geoip.json), never a
# site and never a licensed file: without STEALTHFOX_GEOIP_MMDB the core asks GitHub which database is the latest on every call
@@ -248,11 +253,37 @@ jobs:
run: python scripts/ci_lab_geoip.py build
- name: Run pytest
if: matrix.python != '3.11'
shell: bash
run: |
set -o pipefail # or tee would swallow pytest's exit code
pytest tests/ -v --tb=short -rs | tee tests-report.txt
# The legs of Python 3.11 (the version the engine series' gate runs, on both of its systems) run the suite the way that gate does: the files and the
# marker of the row wrapper.unit.all.<os> of ci/required-suites.json (printed by scripts/ci_verdict.py args), one junit, and the judge below reads
# it. Until 2026-11-24 this workflow ran `pytest tests/` with a floor of 380 and nothing judged the exact counts the gate holds: PR #590 added a test
# without raising min_tests, this workflow was green, and the gate went red on main's next series run ("the suite is exact").
# No test runs twice: the row leaves out the files of the environment (a clone with its hooks armed, one with origin/main, the package index, ...: named,
# each with its reason, in tests/test_the_unit_suite_is_accounted_for.py), so a second pytest, with --ignore for every file of the row, runs those
# and any file that is in no row: together the two runs are what `pytest tests/` ran.
- name: Run pytest (the selection of the gate, then the files outside the row)
if: matrix.python == '3.11'
shell: bash
env:
SUITE_OS: ${{ startsWith(matrix.os, 'windows') && 'windows' || 'linux' }}
run: |
unset PYTEST_ADDOPTS
python scripts/ci_verdict.py args --required ci/required-suites.json --suite "wrapper.unit.all.$SUITE_OS" --os "$SUITE_OS" --with-marker | tr -d '\r' > "$RUNNER_TEMP/unit_args.txt"
mapfile -t ARGS < "$RUNNER_TEMP/unit_args.txt"
IGNORE=()
for a in "${ARGS[@]}"; do
case "$a" in tests/*::*) ;; tests/*) IGNORE+=("--ignore=$a") ;; esac
done
rc=0
python -m pytest "${ARGS[@]}" -o addopts='' -o junit_family=xunit2 -q --tb=short -p no:cacheprovider -p no:rerunfailures -rs --junitxml="$RUNNER_TEMP/unit-junit.xml" || rc=$?
python -m pytest tests/ "${IGNORE[@]}" -v --tb=short -rs || rc=$?
exit $rc
# The leg ran with the pinned database, and the core never went past it to GitHub (tests/geoip_used.py wrote what it did).
- name: The leg ran with the pinned GeoIP database
if: always()
@@ -267,6 +298,7 @@ jobs:
# already filters on two markers - one more, or a typo in one, silently
# turns 726 tests into 0 and reports success.
- name: Refuse a run in which the suite deselected itself
if: matrix.python != '3.11'
shell: bash
run: |
python - <<'PY'
@@ -293,6 +325,22 @@ jobs:
print(f"{passed} tests ran")
PY
# The judge of the engine series' gate on the junit of the step above: the exact count of the row (not one test more, not one less), no skip, every
# file of the row passed, and the list only grows against main. The judge and the list it compares with are read from main, never from the branch under
# judgment (a branch that edits its own judge or its own list cannot pass itself): a PR that adds a test and does not raise min_tests is red here.
# The suite launches no browser, so --binary names the interpreter that ran it (the judge wants a file to hash; nothing reads that hash: no --out).
- name: Judge the suite wrapper.unit.all (the exact count, with the judge and the list of main)
if: always() && matrix.python == '3.11'
shell: bash
env:
SUITE_OS: ${{ startsWith(matrix.os, 'windows') && 'windows' || 'linux' }}
run: |
mkdir -p "$RUNNER_TEMP/main"
git show origin/main:scripts/ci_verdict.py > "$RUNNER_TEMP/main/ci_verdict.py"
git show origin/main:ci/required-suites.json > "$RUNNER_TEMP/main/required-suites.json"
if git cat-file -e origin/main:ci/retired-tests.json; then git show origin/main:ci/retired-tests.json > "$RUNNER_TEMP/main/retired-tests.json"; fi
python "$RUNNER_TEMP/main/ci_verdict.py" judge --required ci/required-suites.json --suite "wrapper.unit.all.$SUITE_OS" --os "$SUITE_OS" --junit "$RUNNER_TEMP/unit-junit.xml" --binary "$(python -c 'import sys; print(sys.executable)')" --main-required "$RUNNER_TEMP/main/required-suites.json"
# ONE SINGLE CONTEXT FOR BRANCH PROTECTION. Measured 2026-08-13: this
# repo's protection required `pytest (windows-latest, py3.11)`, which the
# matrix explicitly EXCLUDES a few lines up - a context no job can ever
@@ -327,8 +375,8 @@ jobs:
if: needs.core-on-index.outputs.available == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
cache: pip
@@ -424,12 +472,12 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
with:
# The gate diffs the tree against the tag of the published
# version; a shallow clone has no tags and cannot tell.
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with:
python-version: "3.12"
- name: the version this change proposes is still free
+40 -8
View File
@@ -79,9 +79,23 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# The Ubuntu packages of the Linux leg, from Ubuntu's archive once per runner image and list (linux-deps.yml), never by the leg.
linux-deps-user-install:
name: linux-deps-user-install
uses: ./.github/workflows/linux-deps.yml
with:
name: user-install
packages: xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
install:
needs: linux-deps-user-install
name: ${{ matrix.os }} - install from ${{ github.event.inputs.source || 'index' }} and launch
runs-on: ${{ matrix.os }}
# TEMP and TMP on D:\a\_temp (the runner's temp folder): the Firefox profiles land in TEMP and on C: they saturate the disk (queue up to 144,
# latencies up to 4 s, parent main thread still 40-60 s). On the job, not in a step: `runner.temp` is not readable in a job's `env`.
env:
TEMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
TMP: ${{ startsWith(matrix.os, 'windows') && 'D:\a\_temp' || '/tmp' }}
timeout-minutes: 45
strategy:
fail-fast: false # one OS failing must not hide the other's result
@@ -89,17 +103,20 @@ jobs:
os: [ubuntu-24.04, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 (v4.4.0)
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 (v5.6.0)
with: { python-version: '3.11' }
# Only what the TEST needs (and `uv`, for the wait below to ask uv, which the release test installs the package with). The package under test is installed by the
# Only what the TEST needs, from the wrapper's hashed lock (ci/py-lock/gate.txt), the one the other test jobs read: never a hand list, which is how
# `psutil` (imported by the OS-cursor helper of the tests since #609) was missing here and ledger #618 was red. The lock holds `uv` (the wait below asks it, and the
# release test installs the package with it) and holds neither invisible-playwright nor invisible-core: the package under test is installed by the
# test itself, into a venv it creates, from the index - installing it
# here as well would put a second copy on the path and the assertions
# would be reading the wrong one.
# would be reading the wrong one. The runner's own pip, nothing unhashed.
# A rule test of the unit suite (the install job has every module its tests import) holds every third-party module the tests import to that lock.
- name: Test harness only
run: python -m pip install --upgrade pip pytest packaging uv
run: python -m pip install --require-hashes -r ci/py-lock/gate.txt
# ⛔ THE VERSION OF A LEDGER PULL REQUEST IS THE ONE IT ADDS TO PUBLISHED.json, NOT THE ONE THE TREE DECLARES.
# The ledger PR of a release is merged after this job is green, and the next release's tree can already be on main: ledger #534 recorded
@@ -197,11 +214,26 @@ jobs:
time.sleep(poll)
PY
- name: Linux runtime libraries for the browser
- name: The Linux packages (the run's linux-deps-user-install job, no mirror)
if: runner.os == 'Linux'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: ${{ needs.linux-deps-user-install.outputs.artifact }}
path: /tmp/linux-deps
- name: Linux runtime libraries for the browser (the repository of the linux-deps-user-install job)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
set -euo pipefail
# The run's linux-deps repository and nothing else: apt reads only its sources list and lists folder, the files are already in apt's archives,
# and the roots are installed by name with --no-download: a package the repository does not hold is named here and red, never fetched.
read -r OS VER < /tmp/linux-deps/image.txt
echo "the repository was read on $OS $VER; this runner is $ImageOS $ImageVersion"
sudo mkdir -p /tmp/linux-deps-apt/lists/partial /tmp/linux-deps-apt/parts
echo "deb [trusted=yes] file:/tmp/linux-deps ./" | sudo tee /tmp/linux-deps-apt/sources.list >/dev/null
APT="-o Dir::Etc::SourceList=/tmp/linux-deps-apt/sources.list -o Dir::Etc::SourceParts=/tmp/linux-deps-apt/parts -o Dir::State::Lists=/tmp/linux-deps-apt/lists -o Acquire::Languages=none"
sudo apt-get $APT update
sudo cp /tmp/linux-deps/*.deb /var/cache/apt/archives/
sudo apt-get $APT install -y --no-download --no-install-recommends $(cat /tmp/linux-deps/roots.txt)
- name: The user path, end to end
env:
+92
View File
@@ -4,6 +4,98 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- **Breaking:** the environment variable `INVPW_TRUE_HEADLESS` is retired and is now refused at launch, on the sync, the async and the server
entry points, with an error that says to unset it. The product always runs a real browser window on a hidden display; it no longer
has a second mode that runs without a window.
## [0.61.0] - 2026-11-30
### Changed
- Pins invisible-core 71.85.0 on the engine firefox-71 (Firefox 159.0).
- The window origin is declared by the core, and the screen coordinates a page reads go through it, in the top document and in an
out-of-process frame of another site: such a frame used to read the top document's origin without its own position.
- The end point of a drag is mapped through the window of the drag source, and tooltips and autoscroll open at the real pointer.
- A popup's position and outer size are set when it opens by Firefox's own rule, and a positioned popup is kept on the declared screen by
Firefox's own clamp; the core no longer declares a popup position.
- The height of the maximized browser chrome follows Firefox's toolbar density rule, and the window frame is computed from the system
metrics at the declared scale: at 125% the bar above the page is 106 device pixels, as in retail Firefox 159, where 0.60.0 declared 107.
- The core accepts exactly the display scales Windows offers (100% to 500%), and refuses a scale the declared screen does not offer.
### Fixed
- The load of a frame waits for the processes below it, a navigation that does not create a new document no longer releases a frame, and
the ready of a page is told once, after its document.
- Drag and drop driven by the client reaches a frame of another site: the drag has one session, owned by the browser process, as a real
drag does; `dragend` ends at the screen point of the declared window, the drag events carry the buttons held, and `drag` fires at the
source.
- A select dropdown opened by a click no longer closes on that click's own release: menus close on the next press or wheel, as with a
real mouse, never on a release or a move.
- `wait_for_selector(state="hidden")` returns at once when nothing matches and never returns a handle, as stock Playwright does.
- A font face that our text code used after it could be released (a dangling HarfBuzz face pointer) is now held by its own type.
- Through a UDP proxy, an IPv6 socket reaches its IPv4 relay after the association too.
## [0.60.0] - 2026-11-27
### Changed
- Pins invisible-core 70.83.0 on the engine firefox-70 (Firefox 159.0).
- The engine carries Firefox's fix for the race between the start and the shutdown of its telemetry (Glean): a browser closed while it was
still starting no longer leaves that work half done.
- ElementHandle pointer actions (`click`, `dblclick`, `hover`, `tap`, `check`, `uncheck`, `set_checked`) now use the same humanised pointer walk as selector actions (they used to jump to the exact centre of the element in one move).
- Screenshot parameters that Playwright honours by modifying the page (`mask`/`maskColor`, `style`, `animations="disabled"`,
`caret="initial"`) are now refused by name with a clear error instead of being silently ignored; `omitBackground` with PNG answers
Firefox's own `Not implemented`, as stock Playwright does. A refused screenshot of an element or a locator is refused before the page is
scrolled or measured.
## [0.59.0] - 2026-11-24
### Changed
- Pins invisible-core 69.82.0 on the engine firefox-69 (Firefox 159.0).
### Added
- An element handle serves the methods of Playwright's `ElementHandle` that it used to refuse as a gap: `query_selector`, `query_selector_all`,
`eval_on_selector`, `eval_on_selector_all` (rooted at the element), `evaluate_handle`, `is_visible`, `is_hidden`, `is_enabled`, `is_disabled`,
`is_checked`, `is_editable`, `wait_for_element_state`, `dblclick`, `select_text` and `dispatch_event`, with the answers and the errors
Playwright's own server gives. `wait_for_selector` on an element handle is still refused.
- `set_input_files` with a file path works from a client attached with `connect`: the file is streamed into the session, as a stock client does
over a remote connection, and a stream can be used only by the context that made it.
### Fixed
- The argument of `evaluate` and its kin (`page.evaluate(fn, element)`, `evaluate_handle`, `eval_on_selector`, `eval_on_selector_all` and the
frame and handle forms) reaches the page as Playwright sends it: element and JS handles, dates, URLs, errors, shared references, `undefined`,
`-0` and `ArrayBuffer` are decoded in the page instead of arriving as `null`.
- `screenshot(scale="css")` is a picture in CSS pixels, as in stock Playwright; the scale was ignored and the picture was in device pixels.
- `tap` on a context without `has_touch` is refused with Playwright's own message before anything is sent to the page.
- A read that waits for its element (`inner_text`, `text_content`, `get_attribute` and the others) and runs out of time now always fails with
Playwright's own `Timeout Nms exceeded`. On Windows it could fail with the engine connection's `no response in 0s` instead, when the last
probe ran out of the caller's time a moment before the clock said so.
### Engine firefox-69
- On Linux the engine no longer runs the host's GL probe when the machine is declared: whether WebGL is available comes from the declaration alone.
- A navigation that changes process is no longer ended by the document it left, and a page is reported ready only after its document.
- A request to a page process that went away is answered instead of being left waiting, and the end of a network request and the contexts of a
frame are reported as Playwright expects.
- The engine's security-state generation no longer ends in a crash now and then (the telemetry was starting during shutdown).
- On Windows, the port a WebRTC connection holds is its own.
### Known issues
- `tap` with `has_touch` fails with an engine error: the engine cannot send a touch event since Firefox 159. It will be fixed in the engine.
## [0.58.0] - 2026-11-21
### Changed
- Pins invisible-core 68.80.0 on the engine firefox-68 (Firefox 159.0).
- Every profile starts with the security state a retail Firefox has: the intermediate certificates, OneCRL and the CRLite revocation filters.
`invisible-playwright fetch` downloads them from Mozilla's service and has the engine build them once; every launch copies the result into its
profile. Filters ten days old or more are left out, as a retail Firefox does, with one warning that says to run `fetch`.
### Fixed
- `networkidle` waits for the end of the document request that is still arriving when the page is cut, instead of ending early.
- A navigation the page's process reports as aborted while the parent is still carrying its request now waits for that request, so a
`goto` no longer fails with a false abort.
- Behind a SOCKS5 proxy, WebRTC sockets on ports Windows reserves no longer take the proxy's UDP association from the sockets that work.
## [0.57.1] - 2026-11-20
### Fixed
+3046
View File
File diff suppressed because it is too large. Load diff
+4
View File
@@ -0,0 +1,4 @@
{
"format": "ab-host-expected/1",
"differences": []
}
+38
View File
@@ -0,0 +1,38 @@
{
"format": "ab-network-volatile/1",
"about": "The leaves of the network transcript that differ between two runs of ONE engine (the A/A of scripts/ci_ab_network.py). Each entry: `pattern` (fnmatch over the leaf path seeds/<seed>/<category>/...), `reason` (why that leaf is noise), `aa_run` (the A/A run that proved it). Born from the evidence of the A/A, never written ahead of it. It may only shrink: an entry that matches no leaf of a run is red as stale.",
"entries": [
{
"pattern": "seeds/*/journey/connects/counts/*",
"reason": "How many TCP connections the browser opens to each destination of the journey (the DoH, the two origins) is the connection pool's: parallel and speculative connections, keep-alive connections that close and reopen, DoH connections. The CONNECTs of the launch stage are counted with the journey ones (the DoH connection at start-up lands in either). The set of destinations and the order they were first reached stay compared (journey/connects/order). Totals of the two runs: Linux DoH 226 and 225, origin A 14 and 13, origin O 20 and 12; Windows DoH 222 and 230, A 23 and 15, O 22 and 14.",
"aa_run": "44946411675 (linux, windows)"
},
{
"pattern": "seeds/*/webrtc/connects/counts/*",
"reason": "The connections to the DoH during the WebRTC page: 14 and 25 between the two Windows runs. Same pool; the destinations of the page (webrtc/connects/order) stay compared.",
"aa_run": "44946411675 (windows)"
},
{
"pattern": "seeds/*/https/*/wire/resumed_connections",
"optional": true,
"reason": "Whether a connection that resumes a session carried a request at all follows the ticket and the pool: an origin had one in a run and none in the other (seed 2 and seed 4 on Linux, h1: 108 leaves each), so what is under it is compared where both runs have a resumption and excused where only one has. The fresh connections (wire/connections) and the protocols stay compared always.",
"aa_run": "44982522362 (linux)"
},
{
"pattern": "seeds/*/h3/wire/resumed_connections",
"optional": true,
"reason": "The same for the HTTP/3 site's resumed connection.",
"aa_run": "44982522362 (linux)"
},
{
"pattern": "seeds/*/https/*/wire/*connections/*/tls/extensions/encrypted_client_hello/aead",
"reason": "The engine sends an ECH extension with no real configuration (GREASE) and picks its AEAD at random for each ClientHello it builds, whether the handshake is fresh or resumed: NSS security/nss/lib/ssl/tls13ech.c:2257, `aead = (rawData->data[0] & 1) ? HpkeAeadAes128Gcm : HpkeAeadChaCha20Poly1305;` where rawData is HKDF output of a freshly generated key (tls13_MaybeGreaseEch, called from ssl3con.c:5888 for every ClientHello that has no real ECH, with or without a pre_shared_key). 1 (AES-128-GCM) or 3 (ChaCha20-Poly1305): Windows h2 first connection 1 then 3, h1 3 then 1, both values inside one run; resumed h1 connections 3 and 1 (seeds 2 and 4 on Windows, seed 63 on Linux). The rest of the extension (type, kdf, enc and payload lengths) stays compared.",
"aa_run": "44946411675 and 44982522362 (linux, windows)"
},
{
"pattern": "seeds/*/h3/wire/*connections/*/tls/extensions/encrypted_client_hello/aead",
"reason": "The same ECH GREASE draw (tls13ech.c:2257) on the TLS connection of the HTTP/3 site (the HTTP/2 connection that opens before QUIC): 1 in one run and 3 in the other, on Linux and on Windows.",
"aa_run": "44946411675 and 44982522362 (linux, windows)"
}
]
}
+749
View File
@@ -0,0 +1,749 @@
{
"format": "ab-oracle-expected/1",
"differences": [
{
"id": "linux-seed6-state.after_fullscreen.events.mousemove",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.events.mousemove",
"published": [
[
0,
86
],
[
0,
85
]
],
"candidate": [
[
0,
85
],
[
0,
84
]
],
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed6-state.after_fullscreen.innerHeight",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed6-state.after_fullscreen.mozInnerScreenY",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "linux-seed6-state.normal.events.mousemove",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.events.mousemove",
"published": [
[
0,
86
],
[
0,
85
]
],
"candidate": [
[
0,
85
],
[
0,
84
]
],
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed6-state.normal.innerHeight",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed6-state.normal.mozInnerScreenY",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "linux-seed6-surface.visualViewport.height",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.visualViewport.height",
"published": 730.4000244140625,
"candidate": 731.2000122070312,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: visualViewport.height, the viewport height in CSS px."
},
{
"id": "linux-seed6-surface.window.innerHeight",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.window.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed6-surface.window.mozInnerScreenY",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.window.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "linux-seed63-state.after_fullscreen.events.click",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.click",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a click event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.after_fullscreen.events.mousedown",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mousedown",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousedown event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.after_fullscreen.events.mousemove",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mousemove",
"published": [
[
0,
85
],
[
0,
84
]
],
"candidate": [
[
0,
73
],
[
0,
72
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.after_fullscreen.events.mouseup",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mouseup",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mouseup event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.after_fullscreen.innerHeight",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed63-state.after_fullscreen.mozInnerScreenY",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "linux-seed63-state.normal.events.click",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.click",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a click event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.normal.events.mousedown",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mousedown",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousedown event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.normal.events.mousemove",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mousemove",
"published": [
[
0,
85
],
[
0,
84
]
],
"candidate": [
[
0,
72
],
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.normal.events.mouseup",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mouseup",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mouseup event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "linux-seed63-state.normal.innerHeight",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed63-state.normal.mozInnerScreenY",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "linux-seed63-surface.visualViewport.height",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.visualViewport.height",
"published": 587.3333129882812,
"candidate": 599.3333129882812,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: visualViewport.height, the viewport height in CSS px."
},
{
"id": "linux-seed63-surface.window.innerHeight",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.window.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "linux-seed63-surface.window.mozInnerScreenY",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.window.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed6-state.after_fullscreen.events.mousemove",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.events.mousemove",
"published": [
[
0,
86
],
[
0,
85
]
],
"candidate": [
[
0,
85
],
[
0,
84
]
],
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed6-state.after_fullscreen.innerHeight",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed6-state.after_fullscreen.mozInnerScreenY",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.after_fullscreen.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed6-state.normal.events.mousemove",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.events.mousemove",
"published": [
[
0,
86
],
[
0,
85
]
],
"candidate": [
[
0,
85
],
[
0,
84
]
],
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed6-state.normal.innerHeight",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed6-state.normal.mozInnerScreenY",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "state.normal.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed6-surface.visualViewport.height",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.visualViewport.height",
"published": 730.4000244140625,
"candidate": 731.2000122070312,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: visualViewport.height, the viewport height in CSS px."
},
{
"id": "windows-seed6-surface.window.innerHeight",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.window.innerHeight",
"published": 730,
"candidate": 731,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed6-surface.window.mozInnerScreenY",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.window.mozInnerScreenY",
"published": 85.5999984741211,
"candidate": 84.80000305175781,
"reason": "Seed 6 is at 1.25. The bar of a main window, client top to content top, is 106 device px in retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406), not the 107 that the published engine's core declares; the candidate's core computes it with window_frame.chrome_height_device(1.25, 'normal'), which rounds the tab strip, the nav bar and the content border once, on the sum in app units (_offset_device), and the page gets 106 device px = 84.8 CSS px. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed63-state.after_fullscreen.events.click",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.click",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a click event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.after_fullscreen.events.mousedown",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mousedown",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousedown event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.after_fullscreen.events.mousemove",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mousemove",
"published": [
[
0,
85
],
[
0,
84
]
],
"candidate": [
[
0,
73
],
[
0,
72
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.after_fullscreen.events.mouseup",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.events.mouseup",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mouseup event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.after_fullscreen.innerHeight",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed63-state.after_fullscreen.mozInnerScreenY",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.after_fullscreen.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed63-state.normal.events.click",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.click",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a click event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.normal.events.mousedown",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mousedown",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousedown event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.normal.events.mousemove",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mousemove",
"published": [
[
0,
85
],
[
0,
84
]
],
"candidate": [
[
0,
72
],
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mousemove event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.normal.events.mouseup",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.events.mouseup",
"published": [
[
0,
85
]
],
"candidate": [
[
0,
73
]
],
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: the distinct (screenY - clientY) that a mouseup event of the page was seen with, in CSS px: the bar above the content as the page reads it from a pointer event."
},
{
"id": "windows-seed63-state.normal.innerHeight",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed63-state.normal.mozInnerScreenY",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "state.normal.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
},
{
"id": "windows-seed63-surface.visualViewport.height",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.visualViewport.height",
"published": 587.3333129882812,
"candidate": 599.3333129882812,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: visualViewport.height, the viewport height in CSS px."
},
{
"id": "windows-seed63-surface.window.innerHeight",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.window.innerHeight",
"published": 587,
"candidate": 599,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.innerHeight, the viewport height in CSS px."
},
{
"id": "windows-seed63-surface.window.mozInnerScreenY",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.window.mozInnerScreenY",
"published": 84.66666412353516,
"candidate": 72.66666412353516,
"reason": "Seed 63 is at 1.5, and the work area of its screen is under 720 CSS px high (about 693 on a 1920x1080 panel), so retail Firefox 159 chooses the compact density by itself (browser.js gUIDensity: compact while 36 CSS px over the reference height is more than browser.compactmode.auto.threshold 0.05, that is below 720 CSS px; RetailCaptures analysis/window-geometry/chrome-density; retail Firefox 159 on Windows, measured by the core's retail window-geometry capture workflow (rounds 2 and 3, runs 45672953042 and 45679625406)). The bar is the compact 109 device px = 73 CSS px, not the normal 127 device px = 85 CSS px that the published engine's core declares: the core's constants.ui_density and declared_maximized_ui pick the density, window_frame.chrome_height_device(1.5, 'compact') gives the bar. This leaf: window.mozInnerScreenY, the screen Y of the content's top in CSS px (the bar above the content)."
}
]
}
-1
View File
@@ -1 +0,0 @@
{"format":1,"collection":"security-state/intermediates","collection_timestamp":0,"fetched_utc":"1970-01-01T00:00:00Z","count":0,"set_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","certs":[]}
-6
View File
@@ -1,6 +0,0 @@
{
"comment": "The preloaded-intermediates list every CI leg launches with (STEALTHFOX_INTERMEDIATES): EMPTY (format 1, no certificates), so a leg never asks Mozilla for the real list (the core neither downloads nor checks when the variable is set) and every run has the same bytes. Set by scripts/ci_lab_intermediates.py. To change the list, change ci/intermediates.json and sha256 here in one commit; `set` refuses to go on when they differ. The real list is looked at only by what the release proves about the product.",
"file": "ci/intermediates.json",
"sha256": "f4f6a2332a4d589a1e8aaa4e73c820644a764125bb2970667afc7351e7cb3465",
"bytes": 219
}
File diff suppressed because it is too large. Load diff
+18
View File
@@ -0,0 +1,18 @@
[
{
"id": "D31",
"bug": "",
"firefox": {
"from": "159.0",
"to": "159.*"
},
"signature": {
"process": "backgroundtask",
"phase": "exit",
"thread": "FSBroker",
"reason": "MOZ_CRASH(mozilla::detail::MutexImpl::mutexLock: pthread_mutex_lock failed)"
},
"seen": "oss-invisible/firefox_antidetect_patch/actions/runs/46539190316/job/142310624770",
"why": "at the exit of a -backgroundtask process the FSBroker thread unregisters from the profiler after the static destructors ran and locks a destroyed mutex"
}
]
+566
View File
@@ -0,0 +1,566 @@
{
"candidate": [
0,
2,
4,
6,
63
],
"core_version": "71.85.0",
"counts": {
"audio": {
"audio.sample_rate=44100|audio.output_latency_ms=20|audio.max_channel_count=2": 4315,
"audio.sample_rate=44100|audio.output_latency_ms=40|audio.max_channel_count=2": 14437,
"audio.sample_rate=44100|audio.output_latency_ms=50|audio.max_channel_count=2": 8614,
"audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2": 21542,
"audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=6": 7783,
"audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2": 5091,
"audio.sample_rate=48000|audio.output_latency_ms=30|audio.max_channel_count=2": 19799,
"audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2": 18419
},
"codecs": {
"media.av1.enabled=false|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f": 4264,
"media.av1.enabled=false|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f": 18331,
"media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a": 12026,
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=false|media.webm.enabled=true|media.decode_support=sha:960968735a": 4065,
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=false|media.decode_support=sha:960968735a": 4500,
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a": 56814
},
"cores": {
"hw_concurrency=10": 591,
"hw_concurrency=12": 21879,
"hw_concurrency=14": 1593,
"hw_concurrency=16": 13914,
"hw_concurrency=2": 2532,
"hw_concurrency=20": 3999,
"hw_concurrency=22": 1038,
"hw_concurrency=24": 2270,
"hw_concurrency=28": 1047,
"hw_concurrency=3": 1215,
"hw_concurrency=32": 2317,
"hw_concurrency=4": 16106,
"hw_concurrency=5": 800,
"hw_concurrency=6": 2189,
"hw_concurrency=7": 572,
"hw_concurrency=8": 27517,
"hw_concurrency=9": 421
},
"dark_theme": {
"ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1": 59856,
"ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0": 40144
},
"dpr": {
"layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31": 70210,
"layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38": 18299,
"layout.css.devPixelsPerPx=\"1.5\"|screen.frame_border=11|screen.popup_ui=106|screen.popup_client_top=45": 11491
},
"gfx_device": {
"adliris_7085": 7197,
"arl_6629": 2281,
"gtx1650_62101": 5882,
"gtx980_58278": 6133,
"icl_2145": 2398,
"irisxe_7085": 9685,
"renoir_21925": 8650,
"rpl770_7092": 3631,
"rtx3060_62101": 6058,
"rtx4060_62101": 6044,
"rtx5060_62101": 6044,
"rtx5060ti_62101": 5881,
"rtx5070_62101": 6289,
"rtx5080l_61742": 5891,
"rx580_21925": 1855,
"rx6600_32015": 1817,
"rx7600_32015": 1865,
"uhd620_2145": 2680,
"uhd630_2145": 7419,
"uhd770_7092": 2300
},
"gfx_feature_status": {
"gfx.feature_status=sha:05ce56d3c0": 22813,
"gfx.feature_status=sha:098c0bf836": 2281,
"gfx.feature_status=sha:2f5fe3776b": 14187,
"gfx.feature_status=sha:80c00ab015": 9817,
"gfx.feature_status=sha:b153aef69f": 48222,
"gfx.feature_status=sha:d1db3983c9": 2680
},
"render_noise": {
"fpp.hw_seed=11": 11111,
"fpp.hw_seed=16": 11111,
"fpp.hw_seed=19": 11111,
"fpp.hw_seed=20": 11111,
"fpp.hw_seed=28": 11111,
"fpp.hw_seed=5": 22223,
"fpp.hw_seed=6": 11111,
"fpp.hw_seed=9": 11111
},
"screen_panel": {
"screen.width=1280|screen.height=720|screen.avail_device_width=1920|screen.avail_device_height=1008|layout.css.devPixelsPerPx=\"1.5\"": 9276,
"screen.width=1536|screen.height=864|screen.avail_device_width=1920|screen.avail_device_height=1020|layout.css.devPixelsPerPx=\"1.25\"": 15893,
"screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"": 41031,
"screen.width=1920|screen.height=1200|screen.avail_device_width=1920|screen.avail_device_height=1152|layout.css.devPixelsPerPx=\"1.0\"": 5228,
"screen.width=2048|screen.height=1152|screen.avail_device_width=2560|screen.avail_device_height=1380|layout.css.devPixelsPerPx=\"1.25\"": 2406,
"screen.width=2560|screen.height=1080|screen.avail_device_width=2560|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"": 1918,
"screen.width=2560|screen.height=1440|screen.avail_device_width=2560|screen.avail_device_height=1392|layout.css.devPixelsPerPx=\"1.0\"": 19886,
"screen.width=2560|screen.height=1440|screen.avail_device_width=3840|screen.avail_device_height=2088|layout.css.devPixelsPerPx=\"1.5\"": 2215,
"screen.width=3840|screen.height=2160|screen.avail_device_width=3840|screen.avail_device_height=2112|layout.css.devPixelsPerPx=\"1.0\"": 2147
},
"webgl_renderer": {
"ANGLE (AMD, Radeon HD 3200 Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)": 8650,
"ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)": 5537,
"ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)": 16030,
"ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)": 21561,
"ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)": 48222
}
},
"dimensions": {
"audio": [
"audio.sample_rate=44100|audio.output_latency_ms=20|audio.max_channel_count=2",
"audio.sample_rate=44100|audio.output_latency_ms=40|audio.max_channel_count=2",
"audio.sample_rate=44100|audio.output_latency_ms=50|audio.max_channel_count=2",
"audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2",
"audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=6",
"audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2",
"audio.sample_rate=48000|audio.output_latency_ms=30|audio.max_channel_count=2",
"audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2"
],
"codecs": [
"media.av1.enabled=false|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"media.av1.enabled=false|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=false|media.webm.enabled=true|media.decode_support=sha:960968735a",
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=false|media.decode_support=sha:960968735a",
"media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a"
],
"cores": [
"hw_concurrency=10",
"hw_concurrency=12",
"hw_concurrency=14",
"hw_concurrency=16",
"hw_concurrency=2",
"hw_concurrency=20",
"hw_concurrency=22",
"hw_concurrency=24",
"hw_concurrency=28",
"hw_concurrency=3",
"hw_concurrency=32",
"hw_concurrency=4",
"hw_concurrency=5",
"hw_concurrency=6",
"hw_concurrency=7",
"hw_concurrency=8",
"hw_concurrency=9"
],
"dark_theme": [
"ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0"
],
"dpr": [
"layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38",
"layout.css.devPixelsPerPx=\"1.5\"|screen.frame_border=11|screen.popup_ui=106|screen.popup_client_top=45"
],
"gfx_device": [
"adliris_7085",
"arl_6629",
"gtx1650_62101",
"gtx980_58278",
"icl_2145",
"irisxe_7085",
"renoir_21925",
"rpl770_7092",
"rtx3060_62101",
"rtx4060_62101",
"rtx5060_62101",
"rtx5060ti_62101",
"rtx5070_62101",
"rtx5080l_61742",
"rx580_21925",
"rx6600_32015",
"rx7600_32015",
"uhd620_2145",
"uhd630_2145",
"uhd770_7092"
],
"gfx_feature_status": [
"gfx.feature_status=sha:05ce56d3c0",
"gfx.feature_status=sha:098c0bf836",
"gfx.feature_status=sha:2f5fe3776b",
"gfx.feature_status=sha:80c00ab015",
"gfx.feature_status=sha:b153aef69f",
"gfx.feature_status=sha:d1db3983c9"
],
"render_noise": [
"fpp.hw_seed=11",
"fpp.hw_seed=16",
"fpp.hw_seed=19",
"fpp.hw_seed=20",
"fpp.hw_seed=28",
"fpp.hw_seed=5",
"fpp.hw_seed=6",
"fpp.hw_seed=9"
],
"screen_panel": [
"screen.width=1280|screen.height=720|screen.avail_device_width=1920|screen.avail_device_height=1008|layout.css.devPixelsPerPx=\"1.5\"",
"screen.width=1536|screen.height=864|screen.avail_device_width=1920|screen.avail_device_height=1020|layout.css.devPixelsPerPx=\"1.25\"",
"screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"screen.width=1920|screen.height=1200|screen.avail_device_width=1920|screen.avail_device_height=1152|layout.css.devPixelsPerPx=\"1.0\"",
"screen.width=2048|screen.height=1152|screen.avail_device_width=2560|screen.avail_device_height=1380|layout.css.devPixelsPerPx=\"1.25\"",
"screen.width=2560|screen.height=1080|screen.avail_device_width=2560|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"screen.width=2560|screen.height=1440|screen.avail_device_width=2560|screen.avail_device_height=1392|layout.css.devPixelsPerPx=\"1.0\"",
"screen.width=2560|screen.height=1440|screen.avail_device_width=3840|screen.avail_device_height=2088|layout.css.devPixelsPerPx=\"1.5\"",
"screen.width=3840|screen.height=2160|screen.avail_device_width=3840|screen.avail_device_height=2112|layout.css.devPixelsPerPx=\"1.0\""
],
"webgl_renderer": [
"ANGLE (AMD, Radeon HD 3200 Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)",
"ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)",
"ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)",
"ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)",
"ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
]
},
"dpr": {
"0": 1.0,
"107": 1.0,
"11": 1.5,
"134": 1.0,
"1633": 1.25,
"190": 1.0,
"19013": 1.0,
"2": 1.0,
"258": 1.0,
"271": 1.25,
"29735": 1.0,
"3580": 1.0,
"4": 1.0,
"49": 1.0,
"50": 1.0,
"5469": 1.5,
"59": 1.0,
"6": 1.25,
"610": 1.25,
"63": 1.5,
"7": 1.0,
"72": 1.0,
"89": 1.0,
"9219": 1.0
},
"excluded": {
"zoom.stealth.media.enumeration_ms": "the time of the first enumerateDevices(): a draw from its own stream, hundreds of values, no class of seeds to cover"
},
"features": {
"0": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=false|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"cores": "hw_concurrency=12",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx5070_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"107": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=22",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "uhd630_2145",
"gfx_feature_status": "gfx.feature_status=sha:80c00ab015",
"render_noise": "fpp.hw_seed=6",
"screen_panel": "screen.width=2560|screen.height=1440|screen.avail_device_width=2560|screen.avail_device_height=1392|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"11": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=6",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=32",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.5\"|screen.frame_border=11|screen.popup_ui=106|screen.popup_client_top=45",
"gfx_device": "rpl770_7092",
"gfx_feature_status": "gfx.feature_status=sha:05ce56d3c0",
"render_noise": "fpp.hw_seed=16",
"screen_panel": "screen.width=1280|screen.height=720|screen.avail_device_width=1920|screen.avail_device_height=1008|layout.css.devPixelsPerPx=\"1.5\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"134": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=false|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"cores": "hw_concurrency=5",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "gtx980_58278",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=6",
"screen_panel": "screen.width=1920|screen.height=1200|screen.avail_device_width=1920|screen.avail_device_height=1152|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"1633": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=6",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=24",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38",
"gfx_device": "adliris_7085",
"gfx_feature_status": "gfx.feature_status=sha:05ce56d3c0",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=2048|screen.height=1152|screen.avail_device_width=2560|screen.avail_device_height=1380|layout.css.devPixelsPerPx=\"1.25\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"190": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=50|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=false|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=6",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "gtx1650_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=20",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"19013": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=20",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "uhd620_2145",
"gfx_feature_status": "gfx.feature_status=sha:d1db3983c9",
"render_noise": "fpp.hw_seed=28",
"screen_panel": "screen.width=3840|screen.height=2160|screen.avail_device_width=3840|screen.avail_device_height=2112|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"2": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=8",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "renoir_21925",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=16",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (AMD, Radeon HD 3200 Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"258": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=14",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx3060_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=19",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"271": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=16",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38",
"gfx_device": "rx580_21925",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=20",
"screen_panel": "screen.width=1536|screen.height=864|screen.avail_device_width=1920|screen.avail_device_height=1020|layout.css.devPixelsPerPx=\"1.25\"",
"webgl_renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"29735": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=false|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"cores": "hw_concurrency=28",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "irisxe_7085",
"gfx_feature_status": "gfx.feature_status=sha:05ce56d3c0",
"render_noise": "fpp.hw_seed=6",
"screen_panel": "screen.width=2560|screen.height=1080|screen.avail_device_width=2560|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"3580": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=30|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=false|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=4",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "icl_2145",
"gfx_feature_status": "gfx.feature_status=sha:80c00ab015",
"render_noise": "fpp.hw_seed=11",
"screen_panel": "screen.width=2560|screen.height=1440|screen.avail_device_width=2560|screen.avail_device_height=1392|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"4": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=12",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "uhd630_2145",
"gfx_feature_status": "gfx.feature_status=sha:80c00ab015",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"49": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=8",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rx6600_32015",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=2560|screen.height=1440|screen.avail_device_width=2560|screen.avail_device_height=1392|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"50": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=false|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"cores": "hw_concurrency=4",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx5060_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=28",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"5469": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=8",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.5\"|screen.frame_border=11|screen.popup_ui=106|screen.popup_client_top=45",
"gfx_device": "arl_6629",
"gfx_feature_status": "gfx.feature_status=sha:098c0bf836",
"render_noise": "fpp.hw_seed=19",
"screen_panel": "screen.width=2560|screen.height=1440|screen.avail_device_width=3840|screen.avail_device_height=2088|layout.css.devPixelsPerPx=\"1.5\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"59": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=3",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx5080l_61742",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=28",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"6": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=12",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38",
"gfx_device": "adliris_7085",
"gfx_feature_status": "gfx.feature_status=sha:05ce56d3c0",
"render_noise": "fpp.hw_seed=19",
"screen_panel": "screen.width=1536|screen.height=864|screen.avail_device_width=1920|screen.avail_device_height=1020|layout.css.devPixelsPerPx=\"1.25\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"610": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=false|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=7",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.25\"|screen.frame_border=9|screen.popup_ui=89|screen.popup_client_top=38",
"gfx_device": "rx7600_32015",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=11",
"screen_panel": "screen.width=1536|screen.height=864|screen.avail_device_width=1920|screen.avail_device_height=1020|layout.css.devPixelsPerPx=\"1.25\"",
"webgl_renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"63": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=20|audio.max_channel_count=2",
"codecs": "media.av1.enabled=false|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:9c24a8728f",
"cores": "hw_concurrency=32",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.5\"|screen.frame_border=11|screen.popup_ui=106|screen.popup_client_top=45",
"gfx_device": "rx7600_32015",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=1280|screen.height=720|screen.avail_device_width=1920|screen.avail_device_height=1008|layout.css.devPixelsPerPx=\"1.5\"",
"webgl_renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"7": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=30|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=4",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx5060ti_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=11",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"72": {
"audio": "audio.sample_rate=48000|audio.output_latency_ms=25|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=10",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "uhd770_7092",
"gfx_feature_status": "gfx.feature_status=sha:05ce56d3c0",
"render_noise": "fpp.hw_seed=5",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"89": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=50|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=true|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=9",
"dark_theme": "ui.systemUsesDarkTheme=0|layout.css.prefers-color-scheme.content-override=1",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "rtx4060_62101",
"gfx_feature_status": "gfx.feature_status=sha:b153aef69f",
"render_noise": "fpp.hw_seed=6",
"screen_panel": "screen.width=1920|screen.height=1080|screen.avail_device_width=1920|screen.avail_device_height=1032|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
"9219": {
"audio": "audio.sample_rate=44100|audio.output_latency_ms=40|audio.max_channel_count=2",
"codecs": "media.av1.enabled=true|media.encoder.webm.enabled=true|media.mp4.enabled=true|media.webm.enabled=false|media.decode_support=sha:960968735a",
"cores": "hw_concurrency=2",
"dark_theme": "ui.systemUsesDarkTheme=1|layout.css.prefers-color-scheme.content-override=0",
"dpr": "layout.css.devPixelsPerPx=\"1.0\"|screen.frame_border=8|screen.popup_ui=72|screen.popup_client_top=31",
"gfx_device": "renoir_21925",
"gfx_feature_status": "gfx.feature_status=sha:2f5fe3776b",
"render_noise": "fpp.hw_seed=9",
"screen_panel": "screen.width=1920|screen.height=1200|screen.avail_device_width=1920|screen.avail_device_height=1152|layout.css.devPixelsPerPx=\"1.0\"",
"webgl_renderer": "ANGLE (AMD, Radeon HD 3200 Graphics Direct3D11 vs_5_0 ps_5_0, D3D11)"
}
},
"final": [
0,
7,
11,
49,
50,
59,
72,
89,
107,
134,
190,
258,
271,
610,
1633,
3580,
5469,
9219,
19013,
29735
],
"format": "persona-seeds/1",
"max_seed": 100000,
"sha256": "82547e9f34ece0c17075d812dcc009c7e8e6f348eb33fb4cc5cdbff6253cc4f0"
}
+28
View File
@@ -0,0 +1,28 @@
# Input of the gate lock; `python scripts/ci_py_lock.py` writes it and gate.txt from the sources below. Wrapper-owned (ci-03), read at the wrapper_ref.
# python-version: 3.11
# exclude-newer: 2026-11-25T00:00:00Z
# wrapper: pyproject.toml sha256 93d8d0940284352ad53e189e17b9ad6e3109ce52e54ab138ecdfa01d8571b193 (at generation); its dependencies without invisible_core, and its `dev` extra
# core: invisible_core==71.85.0, tag v71.85.0, pyproject.toml sha256 c0d14a4d26d3650005076ab72347eb24fba4b89e643f514e7f7334bd0a2ac174 (at generation); the core is a wheel of ours, only what it depends on is locked
# core-requires: platformdirs>=4 | psutil>=5.9 | requests[socks]>=2.31 | maxminddb>=2.2 | tzdata>=2024.1
# playwright: 1.61.0 from scripts/playwright_pin.txt (the stock client the gate drives the engine with)
# cryptography: 44.0.3 (the lab's PKI)
# harness: uv>=0.5 (the installers of the install-from-index job)
aioquic>=1.2
build>=1
cryptography==44.0.3
cryptography>=41
greenlet>=3.1.1,<4.0.0
h2>=4,<5
maxminddb>=2.2
platformdirs>=4
playwright==1.61.0
psutil>=5.9
pyee>=13,<14
pytest>=7
pytest-timeout>=2
pytest-xdist>=3
requests[socks]>=2.31
ruff>=0.6
tzdata>=2024.1
uv>=0.5
websockets>=13
+845
View File
@@ -0,0 +1,845 @@
# Generated by `python scripts/ci_py_lock.py`: do not edit. Wrapper-owned (ci-03).
# input: ci/py-lock/gate.in sha256 7de18cd95f842ff5df52b931d6fb2f318936f54b0ff1be1c8d66df1d6706d9df
# resolver: uv pip compile --universal --generate-hashes --no-build --python-version 3.11 --exclude-newer 2026-11-25T00:00:00Z
# Every file of each version is hashed (Linux and Windows wheels of every Python from 3.11, and the sdist): one lock for every OS.
# A consumer installs it with: pip install --no-index --find-links <wheelhouse> --require-hashes -r <this file>
aioquic==1.8.0 \
--hash=sha256:12333f99f7493af4bc6b9af24f5ac45ae993a2780b9c469c38bdf4461189d5db \
--hash=sha256:14c8f0e4d7a74ee6ba3ade9434601f21ab8d6f9948f602efddbfc082d2bbb385 \
--hash=sha256:3da2c9609cd7299ee2965ff4b0df7a5d50ebe4eacd0cf50f8243686612c2d801 \
--hash=sha256:6fd3cd612aa739be38ab15005e596087cfc0ecbbe935a0343dc82f8b60532669 \
--hash=sha256:78616046a99831c55ca3aac3405b6353e79a923c67a6e5b1dd134585cfcc8e66 \
--hash=sha256:90d1a379ff0057a84863ba7d886af7f49eedfd1a14def5ba5a3ba719ab99c37f \
--hash=sha256:a17bf2347cb9f92c5ccb93fd88be65550e47db2a76e086602b226259f814b111 \
--hash=sha256:a4b57b3235014074fd7316dae5f4ee08cf46fa9b9c7bdf8718c3f310aaff9155 \
--hash=sha256:ac365806f09cba9127fe716f570219bf1fb7d733e847eef7535ade5c08aed721 \
--hash=sha256:b2acf9f4b7214502792d3430a341907f872cedd25042430f2c4138f9b7092d87 \
--hash=sha256:d9de93041c7749f1a93dbc0367408572ed76d710566fd7d74241ce7f69388350 \
--hash=sha256:eb44d2276ad670e8608bc2f2a926afc8e06f62de87275afb56d7ed8aa8a4f298
attrs==26.1.0 \
--hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 \
--hash=sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32
build==1.6.1 \
--hash=sha256:51cc11666391ab6f092070437ac747002ff46f3e4113a3622177ee6b488bfc53 \
--hash=sha256:ecd351a4be9d35a9eaaba244a7687143c9c7d4aea6ac964e7e7ddab20cbcf4e7
certifi==2026.11.20 \
--hash=sha256:7422df25243767b9877031a2248cb14d09ddac9beee846f4cef3d5c9191d488f \
--hash=sha256:af1cb240a8133f105aa52684a3a3258339d7f2fd0bd4e2812698ff5cf5588c4e
cffi==2.1.1 ; platform_python_implementation != 'PyPy' \
--hash=sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e \
--hash=sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66 \
--hash=sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2 \
--hash=sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0 \
--hash=sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6 \
--hash=sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971 \
--hash=sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c \
--hash=sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d \
--hash=sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9 \
--hash=sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517 \
--hash=sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735 \
--hash=sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80 \
--hash=sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f \
--hash=sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1 \
--hash=sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29 \
--hash=sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8 \
--hash=sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c \
--hash=sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e \
--hash=sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48 \
--hash=sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813 \
--hash=sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac \
--hash=sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632 \
--hash=sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6 \
--hash=sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1 \
--hash=sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659 \
--hash=sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688 \
--hash=sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004 \
--hash=sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0 \
--hash=sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062 \
--hash=sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779 \
--hash=sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94 \
--hash=sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50 \
--hash=sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab \
--hash=sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac \
--hash=sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6 \
--hash=sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676 \
--hash=sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1 \
--hash=sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9 \
--hash=sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf \
--hash=sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13 \
--hash=sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e \
--hash=sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e \
--hash=sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973 \
--hash=sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527 \
--hash=sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72 \
--hash=sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890 \
--hash=sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c \
--hash=sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990 \
--hash=sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd \
--hash=sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9 \
--hash=sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94 \
--hash=sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3 \
--hash=sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80 \
--hash=sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41 \
--hash=sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5 \
--hash=sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c \
--hash=sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a \
--hash=sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4 \
--hash=sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e \
--hash=sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6 \
--hash=sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98 \
--hash=sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b \
--hash=sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1 \
--hash=sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03 \
--hash=sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af \
--hash=sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231 \
--hash=sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2 \
--hash=sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3 \
--hash=sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836 \
--hash=sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5 \
--hash=sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399 \
--hash=sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96 \
--hash=sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e \
--hash=sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be \
--hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf \
--hash=sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc \
--hash=sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455 \
--hash=sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0 \
--hash=sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12 \
--hash=sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b \
--hash=sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7 \
--hash=sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692 \
--hash=sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54 \
--hash=sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3 \
--hash=sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b \
--hash=sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be \
--hash=sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d \
--hash=sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358 \
--hash=sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a \
--hash=sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7 \
--hash=sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc \
--hash=sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960 \
--hash=sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125 \
--hash=sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb \
--hash=sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a \
--hash=sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa \
--hash=sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf \
--hash=sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3 \
--hash=sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4 \
--hash=sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264
charset-normalizer==3.5.3 \
--hash=sha256:00edb7682962c596f774bfa126e6b6f885b7af2319f448d327591c284a482de8 \
--hash=sha256:01b35bec964b92b89bdf94adf931d2e80a15f1c7b93bf850b4430cca23f7a2a2 \
--hash=sha256:020cabbb90926b2d8b022a5e057ab349f28844b61f34117323fc08c2971915e3 \
--hash=sha256:02b1abf64742b2d0782172cd2542616e462c201c829c23aff833390babe2967f \
--hash=sha256:06d07272f70d9880fba32d4876e966ae4dc9961134bc989066a0901509dfd8cf \
--hash=sha256:0810592b80dc5a97f8103443460264b588f31c6baa8a20abae7c683435d8117a \
--hash=sha256:085a5d1f49eaf96596d79494fcab18d9a32db6e345da15d6debfc90110b20679 \
--hash=sha256:09833ba78c91f0d1fd06387c69dae9f079428b77ea05eaaf1553eecead31fb68 \
--hash=sha256:0b3fc6f7dd9db4a7782e65dc98eb80b2a91a854cf54a03dd93649be2f7ca638d \
--hash=sha256:0c0fe07631dce6dae788a59c20ed927adc6feeb2d9ed440747eb367d89822a45 \
--hash=sha256:0ca25f1b1167e9fb94d93d3708df0b631de241bf8440947b0cb9f8c4cb66fed0 \
--hash=sha256:0ca2da4a505fae7ef95922f8d48235b2e49ff8f10f4edcc0481e5f6526ba3841 \
--hash=sha256:0cf4cb8d75090a8da3bd30c0963b2c6c6114e791c6fc060c3cef8971497b1f04 \
--hash=sha256:106b9d0438e2ff0a0e8ebd869273fcb3640af28323bba8651c714c57efb38e51 \
--hash=sha256:11ad35a0b856ad8bbd0c9e900c069461a4661694714aa17b6e6e2e8621e1c373 \
--hash=sha256:139aeb8ca63946dc79364c37f2c9cfe5c1b7f3882f2c47484d0e54bf14b921b0 \
--hash=sha256:1714ff1ba001da5241a585fbd17a7742a61ad34efb4be8404aca5679f51e53ea \
--hash=sha256:183aee7e84789391e547ec1609f8269332b9b123d21e97f7ef79eaa474c47e08 \
--hash=sha256:1a34385837db59d5de814c9f1e0f4157b571f9ce0eabdaeace410aa93bf5df62 \
--hash=sha256:1b2704f4651539eab50ba104a975b96c3cd5246011aa0755d2dd71ac12546644 \
--hash=sha256:2246873913d7db43ed5a3d98ace398b989b2ae20b77c8d761a7bef5fdb9bed42 \
--hash=sha256:249bf0b6f43985c33c83adbbab0ca71246ec24c82d960fa00c4ddb2cfed25db9 \
--hash=sha256:256b434b2860ef9da1cb6a5fd4ebb5d600936668e50e2035858948b96b068ecd \
--hash=sha256:26c6ad87bb79628954b52f8f7b9e18ab5cd9667546712ded9689fb7677e630d6 \
--hash=sha256:277b72183b96879887f0c3aa0bdac1fee08a6c7e67bad53145c4fd416d99dfd3 \
--hash=sha256:28ba8e6361e0f319641707484994096ceb77e05c29eaad2919756218c0c89001 \
--hash=sha256:28d954a437bfa5fcdfe7ad8902cf4347a8486f34a86c5f39003bc1288eb67d72 \
--hash=sha256:2978c799237eb66619d8951d2ab7efd317414cb6682160e05614ce1c8b5c905f \
--hash=sha256:29ac44f5878142128ffe4fa7e041ddc4cc5fafe43983245b9a141908c40b515d \
--hash=sha256:2a6f937e0b70133d1f826d0a253331b6fe1a4c874808cc12e16f2fb8177042f4 \
--hash=sha256:2b7797a5b0cb197f118fd13b41c14c5a3c38dd625a87c1da58a3066cf53254fd \
--hash=sha256:2c4e0050b732ee3dca3676a5f5cf7fbd0c131761c194f1bb1d24c055fad071cf \
--hash=sha256:2e7fbd98443f28a5ed8004f0b058edcc4720a3d344adf007c0b7f1adbff2f59f \
--hash=sha256:2f2d973d3c79fbd1066d63d1bafb2ade66934c0840ed149f6fac13c3fdf80793 \
--hash=sha256:323d5cf6df3ea724afcc3bfb07c73be06d2e8200a8b6b37979a300ae1e7836d0 \
--hash=sha256:326a7a0e3715c3ac24c21e7a3b831d6799cc795bff260aa49c23b69025852f99 \
--hash=sha256:34054580168b04e90e6c7c0f6c80173fa2d4f72c4db91c9095598454f96d6389 \
--hash=sha256:366f5efe95a6149ecbcebf779c2594a6a4ff6fc116402826c72ed0eccd6aabe9 \
--hash=sha256:390ef7c7e018c0abb8c0ec2d28ee137567ff50c3706facf6d115cac832ac993b \
--hash=sha256:39229c222445415db07a0be4dff8ad1addc3126644d7aa72d73f1575b637d69e \
--hash=sha256:396fdf2d4367674531a7c8d54ecabbc8e5131e3a1a06270285eb99f3140143df \
--hash=sha256:39e019884c8f857393df954d35f42bf99c5ab85af226fe74d1410188c6fec31f \
--hash=sha256:3ce4e4587e451ebc7d9899a7a1f539ea30a3c712d7bc8e0d256923c697fd5dcc \
--hash=sha256:3e8da696ef1935a019c10ec16555a062183ddf6d5901e296edeca4b2a8f84e1d \
--hash=sha256:40b2ba91f0851aa864994b3c7022e4d96d09026717e6a72e44410d6fb3a74a13 \
--hash=sha256:45aa4ccf5a6caba138dd0f8bf36fa3e26654585d534881b62ce5e4fea2487772 \
--hash=sha256:4831fb33e98e92140fa17d4d673a9f49f9c0ddd056115b722858793e4b86b0c5 \
--hash=sha256:48f7c7f537246bb3af2b3139f44716a30b21e78c2fd1cff0f3e392fbd55d8044 \
--hash=sha256:499e4bbeb1e79b14756311a1d12cb88112f244423e152d80981d9bcaff3279fa \
--hash=sha256:4a991dbd7aec868fe10802b02bddbf898173a47ba236f2d6afb4ab1f98243534 \
--hash=sha256:4ff5e27478681ef1b13b036baaf9beaf9b4c6990e903c752ad3b8764692c6d6c \
--hash=sha256:56405211fa124c393eea14b3aeacf5b90de72b1f69b0a60c9bc40b01dfe71a42 \
--hash=sha256:581d6e7df9b58d34147e21efde42a480b5087fe54f31e42550c26321566ba1e4 \
--hash=sha256:5970d148182b6b7c22b8290a81f02fb521c4e7aee6747743b3e645db58d5001a \
--hash=sha256:5f86753952f7de3abc7ce871f8239ce4e0d32a91c84d22f3a667e669907c3897 \
--hash=sha256:6118055f4ad0d94e016eadbb86caed9caf2c9033631ed70964ba631c1336984f \
--hash=sha256:61e32fdbf56f4cd25a1efa451c8b5fe886fc5e00143ccaacafdf21f301fad059 \
--hash=sha256:61f3258f700412c68fde407e7c749ed6930e795ea8f5ead9a40afddefbec12c4 \
--hash=sha256:6423accb6ecd1456bf824bbac98ba919398523a69ee5f1680dd1da88769de866 \
--hash=sha256:643724071b01cc0369026e259850791212cc187c6031d0e930abcd253f128e0c \
--hash=sha256:656b9744bac4493561d28b56d7d646afd7a8471254ef7004d849aa8368020037 \
--hash=sha256:6651fecdac146ecfa52700e02a5fa3b3677bddf5fced4983b43e904244de3f6a \
--hash=sha256:67bb767a8de7a2b1164c74fdbe5cdc32b9c15d7142efd9a6dc77ff63da94e846 \
--hash=sha256:6b702d36c565f6c650f4b479488f475b2982132ab8d0840d42b1442462c21056 \
--hash=sha256:6bfbbb9414dd0f5b81c259deb7e50b4b44e65e05879eee482351bdabed49d7f4 \
--hash=sha256:6c80b4e83e2fbddd25fe27804cdfc45ef71bb387522caa575af42118d72dc970 \
--hash=sha256:6c8abe7d59bbc891e5080b8b142c36db93154f840c4baf7c83ad6273a1a15397 \
--hash=sha256:6dde7edd9ba5005389bc7c0ab461411f281dbacb2b06e52bd23592eba42bb503 \
--hash=sha256:6eea31136fd924ecbb4e7c4f3df4b18230409629a22b3896f38a6754d5857794 \
--hash=sha256:70f65dd0c2ed79ea2d9776096e9c7d25e398c2c03eb31877753598d201d91784 \
--hash=sha256:73b4ddf1230df56c9e7017a16e3f5171b6ef0e4ff554a418a370d7ac7245bd84 \
--hash=sha256:747e83d415939612284afdc99f15295382639c0d3fc69a73aeb84b380d1f4af3 \
--hash=sha256:7a7e5bb8974842ad747d4a2b9fb928f84c3cdbe2c2fd7e405197fc1a1badaeaa \
--hash=sha256:7c313b46730b4a68bb31450973467313b2c496fefa42ae316b86c186cba74613 \
--hash=sha256:7fd816f466883dcaac196ac77271d0292eee4a81f4db1191b95d15328f335937 \
--hash=sha256:7fdd11094a0b07bce306b359fa7311c71d93466d967b3b345f2e9f03d8b2c959 \
--hash=sha256:806e72ebaeef54d7faa03414be9e8409eb3dcae49fba089d62063a60c0b5a4e5 \
--hash=sha256:81132eaffa984f0a399233df4cd383caad18e8cadc6c24c568cf9324732a9768 \
--hash=sha256:8231365b03b702b516aad35c9515694177ac31c9dc6240326f07308a4c45c708 \
--hash=sha256:826d82356907350f345cf0aa744d43a69ac7948bd60f460f997cde86928beadf \
--hash=sha256:84356c7b7ddf090e3e4692cb99fc820e6189b5f6662ca7e8589f41095cc8efca \
--hash=sha256:87d5a237d6531c654e7b9b319be9ba7e368665c466e02a03cfd4d3d77730782e \
--hash=sha256:87f7d6c595465a25d33fa3d5215a571a98c4cad00ead3ad18ebfb62adb3d3e6e \
--hash=sha256:885f202d6e4e2298bea9802ffc6d8c7dc45394199a8dd9e1492f05fe32dce311 \
--hash=sha256:8b969f0309de905101bc3d2471c112e9ccbba711a7590b12d51f372b4163688a \
--hash=sha256:8baddc6349faf49edae4d1322f12b681b9e86acacd01874457c997437ef4ccaa \
--hash=sha256:8c4dfcd3269f13dff7f29f9c332d54a4a21f17be818b49e769e111befd4d39e6 \
--hash=sha256:90b1ff6cb9c7a204a3b79b1b0ed6ac8a1d8fed3b6dc69e50ae5de0f358ee81d4 \
--hash=sha256:92bf85ecec3ad6374ae50d870bd1deb34de12bc1158b5fd09036d4c435c6f58c \
--hash=sha256:92ddc32b6a1508ea145f4f7995e00666db454b8fd3e2cae6c2ecbde4f4d44616 \
--hash=sha256:948fb3649416a70bcdbb267d79c7048e8aa16e989ab9da09f416e67cdd3d6b8c \
--hash=sha256:94b595e64bc2927f679774de50df340b7828dc1c07c99149ba7c2d0828dd8bf3 \
--hash=sha256:94c9d5d91c16554f6397b823d9e47181ba100d830ab16b5d720adc229e17b2e2 \
--hash=sha256:9510da88bdebc903be7844f31523ac8d7b3f63e167db54b6045104a2354afa6a \
--hash=sha256:96387278c3b17bc1170f80693398d0babac7b41df128ced8e27588a7155d95b2 \
--hash=sha256:96e268b0cbda016ac519513294fcd17032264085b600abaac58b93049477e132 \
--hash=sha256:9902e80096a94cf70fb72d12ae40e3b187b40e96fa722873d4d62afcd0333c46 \
--hash=sha256:9a6b95b1737f9b5942c35676c52db0c302d60fa806efde3fc2d9f54247ecf4be \
--hash=sha256:9b887e8a7103ae2171dccbab00a4bb2bf1560f5c10c28227e5513bc90a608cad \
--hash=sha256:9c1bd8321a840729a6b2620774cf4000fafe66c54cac9064972a10c4f607794b \
--hash=sha256:9eba4613d45b49196af04a5cbadfc5e9379ba94aac85184b72cb1107ad31af0d \
--hash=sha256:a094178c51530c9ebd1775e72d160af0eac4be244fb06ff1b6f182128c71903c \
--hash=sha256:a09ca76391f6e17b12d55c1068b4b5f8f6c9b44b432d936075372fa12782292d \
--hash=sha256:a250888753faa289e2997962fbb17c4960cbdb58575533ca6fceee68c224bdff \
--hash=sha256:a312fedd182357f2c22f066d17dcd7413b6a205ee3d063d36950e94e3019d3de \
--hash=sha256:a36bba41dc7fd263417688c4daf95a1091f93e1f6957c0f71ad7798907c5a10c \
--hash=sha256:a3f4044dd5d2f7b958be6b9903cb432e6a0fd944d673707ca5cab68137d0592c \
--hash=sha256:a43831574e14423103d69fb1357e76e4f2347041c98e8357ab88ef21812e80d9 \
--hash=sha256:a491d4afb361aba32d55d7df7ccde766a3aa9a34c002d2c32c2743bf6e77c13c \
--hash=sha256:a5a7e0326566759f9a7bc44f4b9a179cc40a297e09e759b0bc7c848c06347527 \
--hash=sha256:a6eba94fc00d899f8d268712772c8dcafc40215aa9b51701a397afc9426e012b \
--hash=sha256:a8f92cc9080bff47555c79b88e7fb8655438ce3bcf29c5f01ed2ed5efdf174a4 \
--hash=sha256:aa2476abf8669be493689634bdb79f468a6fe57b005a5126db7e9f61d1954fe2 \
--hash=sha256:aa8be1f24fbc03a07cfe002b70ba0716effc6b3011fd9e5560ca399d3d0605ad \
--hash=sha256:aa9390d89822dd06f9920ae3038819cb121643a72f4753b2eee1a79b2f1215f8 \
--hash=sha256:acaa0e100f39287dc5d13de96e33ba0786f1cdfb5b4ca28918913ab0eec3af72 \
--hash=sha256:ad1becd776f5a41a4d91cb9ee51778f4fd687ef15e4919779e00a33c6cff6948 \
--hash=sha256:af217012cfdaf6ea5dc0c538aac29b7bd030eb865056cc60f1d973b982b7917b \
--hash=sha256:b013417037c931583578639cab2523d5a2efc35a584c192d07f4c909b133f6b0 \
--hash=sha256:b0aa6b81bc632af7cac7b270c933298cb5ee858506dcf344e0da006667e0c351 \
--hash=sha256:b30e5496e453ac971bb17f5e096b84fbaae16d09e2613f6148ff528c08a54a0c \
--hash=sha256:b66a0e045cf859d7418f26a554509b65f21ebb6d90a95152460781939e8264f4 \
--hash=sha256:b6dad86d938104f9d43404029e5fc8392f82762d171933be4f192a6008bffa53 \
--hash=sha256:b6ea5bf7e3c39f6e56957d82274ac7cfab469590085883fdbc86e754cde76b11 \
--hash=sha256:b8fc4fe56992b089d6177021fe6db641321bb2bc2fc7a1abf815c29a80ca2137 \
--hash=sha256:ba26e4d073a4f7f2594676f2ff20ab80a7f03332b81c3f9964e9e53bf2305329 \
--hash=sha256:bed05639ae1bc23df7996a4fd13ea5064ddf60dc7dabd754f8badf060daec63f \
--hash=sha256:c08e06fc69750827d7ccebba63ebc97a85e479cd5c9dbdb80f5e08a77b774fdb \
--hash=sha256:c39a4fe28a16e8fa667c55c154f62c6c3cd9ca2491cca9f16330dd7360d05b76 \
--hash=sha256:c437ed8775d201d37206f37d233f547506e3aef60b9711584c65444c686b4905 \
--hash=sha256:c43d9737c3b85ccd16b1862b1e7aa5c4bf30a6033068403713c0a2bba5bda979 \
--hash=sha256:c9d1f467d121b33b06865c94ed5ed8388a9ef76f5e1acc1c8a854ac653493f5d \
--hash=sha256:caefc441edff6070a9f9749ca880a22731a1715d9e74b24304a546eec44bfc16 \
--hash=sha256:cb18428af7399e0a6f7e3b45f110d57a1a47cf07fd4b3ce50e2366d99a38959a \
--hash=sha256:cb4c25a9d3410262216b5c7447e51bfd2de0efae0a7640772dc6d2a8741590de \
--hash=sha256:cbd09b22b340f846671e79e8d832167fac60c1884be4c71fd667211486a3b58e \
--hash=sha256:cd5422fd4f8a7859846c9289e310dd95c0d1890c31819667942753e510f88f69 \
--hash=sha256:d12571adb9ceeb9ba0640db46433430062f5f1dec89e39713a2a5a8ce3016c37 \
--hash=sha256:d1b7a3fe4cf679eb3870b91b86b8ce12cacd5cf4d74bc114864a5cd65319ddac \
--hash=sha256:d313494077f849d8199f36166947785da1eeb36335fda15fde2e8f801ef271b6 \
--hash=sha256:d3c9d5284d64f4c1015d95b751577b260fd6d14e3f8edf21710f4436e7ac4c49 \
--hash=sha256:d4e7ecaa25f0dae672ac783c2e5aa9054a62e011749d64ff47b887af360a3e82 \
--hash=sha256:d57f1b6affc3581fbf0bc6d783cc60e7c9957adfd9c7b89f8a9f3573ad1cd49a \
--hash=sha256:d8f85e019c9f08ec134648a378ddd3f6f073c1e4b5ce9bdacd9a9e7b60749cd2 \
--hash=sha256:d93403a13c8f6f2d027185d90ab695e81d95e3ebd000f0078e201a1c3159d4d1 \
--hash=sha256:da606e3015dbd4b9a31c0468898a0c4c998846197ddfda78308821dc8c9e9be3 \
--hash=sha256:db2eedef732424346f98d0aba5c6ad688b648bc79847f4cc70dfca830130b1e6 \
--hash=sha256:dbdd407104ebf2360464ce02c7933c6ffac58bd5b64cdf6ef7dc0e787e782aaf \
--hash=sha256:ddea089587432e3df6771a4a405ef249cc9727f7becb1de3f00ab571b2432002 \
--hash=sha256:dfbde696fb427301ec40cd82b8eec0b528e44c6af8239f33ede2b2552d9a085a \
--hash=sha256:e1cdbde56f9fa6d426b78941c381e2ba160c1214809baa47e02c1d0d8881d598 \
--hash=sha256:e282983b8def5ada758fa1f18bf9060bb8ce6cdd73be32f62a2de59820d3286d \
--hash=sha256:e34f591669498a03cd70993b0a79b9f0ef40c4e6f8232466bac33c42f0c15742 \
--hash=sha256:e405cce4170de1fe520d9a92de9d7ececc23dfcf6888c62ab608a21be50838eb \
--hash=sha256:e4a0f2adf29a69dd8fe58e42bb191f3c87067b05fcc63279983e8c9ce5092abd \
--hash=sha256:e4f85c34f9be32ec5568a0668fb8bc029d3e729285fb8fccc38695e185379a9b \
--hash=sha256:e5e4785d8a0adeadfbdf75f4efc357911842674651cbafd7e97f69b11ec3cbc6 \
--hash=sha256:e86a27ab632d2e888c22b79263864eaff8b7dea9e87328a9bb0ea04eff24786f \
--hash=sha256:ea880ae1a692ae694c11bca7be74864614ff1a58bdfff4605f36d1956b4b1588 \
--hash=sha256:ee9de080e8d6221bbe4ba2667367b1cee0f47a53f60ffc5e431b698cd2f2b214 \
--hash=sha256:ef8b925f2b331a1f17d6fb32625e09fd571cf41844f578379f934dab0067cf0d \
--hash=sha256:f06e257ee0cc85a7e4ec44f171ae2595fd901c34212f3c9e7ab8fd8621401e99 \
--hash=sha256:f1214052966421a88ed526ba93e4463b39346862fa4721be5306434b33dae795 \
--hash=sha256:f160f03e15bd1e3c35db9bfc20c42ff83155d37f9b0c79806cb10051ca725f13 \
--hash=sha256:f1b357340e4cd29011683bd81226175611ad835fec22e5b7df83b96701571226 \
--hash=sha256:f39290a0c2e3f4196563189bb45e6ef5d5badf50864e1bfaafa9003f0595573f \
--hash=sha256:f5a5c311e5de6954c36230a37863b5ca58ce232589bd637ad2881c4056897b12 \
--hash=sha256:f7a841170fde40b0e1345884bee09ceca7db49a9291fa340089bec66a366c243 \
--hash=sha256:f7fb9a3275f1a1528e542a0f5a3d2c89fcaf68e797fc5c6530434cbd92a852c4 \
--hash=sha256:fc540d1618c5638fcf5aea97060cf011467918b010bf682a84ecc0c9474e6cd0 \
--hash=sha256:fcb17f1d40c38912a2cdb56ea47aadac3527cd0b06fe24f3a0c4896febbea063 \
--hash=sha256:fd0341b9dea133d187d7c5a2cd7e21ae6449a7b68ea8c2454f9cf77def11ec1b
colorama==0.4.6 ; os_name == 'nt' or sys_platform == 'win32' \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
cryptography==44.0.3 \
--hash=sha256:02f55fb4f8b79c1221b0961488eaae21015b69b210e18c386b69de182ebb1259 \
--hash=sha256:157f1f3b8d941c2bd8f3ffee0af9b049c9665c39d3da9db2dc338feca5e98a43 \
--hash=sha256:192ed30fac1728f7587c6f4613c29c584abdc565d7417c13904708db10206645 \
--hash=sha256:21a83f6f35b9cc656d71b5de8d519f566df01e660ac2578805ab245ffd8523f8 \
--hash=sha256:25cd194c39fa5a0aa4169125ee27d1172097857b27109a45fadc59653ec06f44 \
--hash=sha256:3883076d5c4cc56dbef0b898a74eb6992fdac29a7b9013870b34efe4ddb39a0d \
--hash=sha256:3bb0847e6363c037df8f6ede57d88eaf3410ca2267fb12275370a76f85786a6f \
--hash=sha256:3be3f649d91cb182c3a6bd336de8b61a0a71965bd13d1a04a0e15b39c3d5809d \
--hash=sha256:3f07943aa4d7dad689e3bb1638ddc4944cc5e0921e3c227486daae0e31a05e54 \
--hash=sha256:479d92908277bed6e1a1c69b277734a7771c2b78633c224445b5c60a9f4bc1d9 \
--hash=sha256:4ffc61e8f3bf5b60346d89cd3d37231019c17a081208dfbbd6e1605ba03fa137 \
--hash=sha256:5639c2b16764c6f76eedf722dbad9a0914960d3489c0cc38694ddf9464f1bb2f \
--hash=sha256:58968d331425a6f9eedcee087f77fd3c927c88f55368f43ff7e0a19891f2642c \
--hash=sha256:5d186f32e52e66994dce4f766884bcb9c68b8da62d61d9d215bfe5fb56d21334 \
--hash=sha256:5d20cc348cca3a8aa7312f42ab953a56e15323800ca3ab0706b8cd452a3a056c \
--hash=sha256:6866df152b581f9429020320e5eb9794c8780e90f7ccb021940d7f50ee00ae0b \
--hash=sha256:7d5fe7195c27c32a64955740b949070f21cba664604291c298518d2e255931d2 \
--hash=sha256:896530bc9107b226f265effa7ef3f21270f18a2026bc09fed1ebd7b66ddf6375 \
--hash=sha256:962bc30480a08d133e631e8dfd4783ab71cc9e33d5d7c1e192f0b7c06397bb88 \
--hash=sha256:978631ec51a6bbc0b7e58f23b68a8ce9e5f09721940933e9c217068388789fe5 \
--hash=sha256:9b4d4a5dbee05a2c390bf212e78b99434efec37b17a4bff42f50285c5c8c9647 \
--hash=sha256:ab0b005721cc0039e885ac3503825661bd9810b15d4f374e473f8c89b7d5460c \
--hash=sha256:af653022a0c25ef2e3ffb2c673a50e5a0d02fecc41608f4954176f1933b12359 \
--hash=sha256:b0cc66c74c797e1db750aaa842ad5b8b78e14805a9b5d1348dc603612d3e3ff5 \
--hash=sha256:b424563394c369a804ecbee9b06dfb34997f19d00b3518e39f83a5642618397d \
--hash=sha256:c138abae3a12a94c75c10499f1cbae81294a6f983b3af066390adee73f433028 \
--hash=sha256:c6cd67722619e4d55fdb42ead64ed8843d64638e9c07f4011163e46bc512cf01 \
--hash=sha256:c91fc8e8fd78af553f98bc7f2a1d8db977334e4eea302a4bfd75b9461c2d8904 \
--hash=sha256:cad399780053fb383dc067475135e41c9fe7d901a97dd5d9c5dfb5611afc0d7d \
--hash=sha256:cb90f60e03d563ca2445099edf605c16ed1d5b15182d21831f58460c48bffb93 \
--hash=sha256:dad80b45c22e05b259e33ddd458e9e2ba099c86ccf4e88db7bbab4b747b18d06 \
--hash=sha256:dd3db61b8fe5be220eee484a17233287d0be6932d056cf5738225b9c05ef4fff \
--hash=sha256:e28d62e59a4dbd1d22e747f57d4f00c459af22181f0b2f787ea83f5a876d7c76 \
--hash=sha256:e909df4053064a97f1e6565153ff8bb389af12c5c8d29c343308760890560aff \
--hash=sha256:f3ffef566ac88f75967d7abd852ed5f182da252d23fac11b4766da3957766759 \
--hash=sha256:fc3c9babc1e1faefd62704bb46a69f359a9819eb0292e40df3fb6e3574715cd4 \
--hash=sha256:fe19d8bc5536a91a24a8133328880a41831b6c5df54599a8417b62fe015d3053
execnet==2.1.2 \
--hash=sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd \
--hash=sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec
greenlet==3.5.6 \
--hash=sha256:0616b8f878098c5681fd8f0dc92d887551717402342a70f0abcbfea5f5ad8a44 \
--hash=sha256:06c0e933290fba8ffe53ead4ae1b8044b0e9754b75cebf381aa2bc3e50d82fac \
--hash=sha256:128813fc29f2336a21b4d06eedd5e16bcc7ea46f59e9ff1cb30ea70e48195d88 \
--hash=sha256:188bf333769b7145e2b0b4a7f09615ec550ed44d3a2a8395fb7b36f0e9901e13 \
--hash=sha256:1c20ea32a73d17b9b60e3371240e17b0068120c98a5ec01a224a7dd8c89733ba \
--hash=sha256:2ab5f42ac6c238eb71770715e6e909ad9a1a92b6c681ccb64cd5a0f07edb953f \
--hash=sha256:301102a49120b095e72a7838792b41233975fc1c155daec6d98f81c00c9280e0 \
--hash=sha256:311018b46472fb26ee85870847fb89eb64cc8aaddb617400789d87076f7cfeec \
--hash=sha256:3ac3494c381dab876cad7d0b22f3a722f3e0c8deb3a65b9e7f35ad7f58b8fcb3 \
--hash=sha256:3c6dede9133e1da41d561bc3fb14e92b47e2ce39ae60edefaad145658ea7c5e2 \
--hash=sha256:3dbb4596a6a4e5d47121a33ff20533a81e60f302d9e67b69909a8bc21a43f0a7 \
--hash=sha256:3deccbb57a481e3a408fe61cdfd5c13e0678fc0a30fdd09597917ca87b4be877 \
--hash=sha256:45663c01a4de48b9a64a2ee1509d92d1dfd3afb02b2ccfc9333029d11aef996a \
--hash=sha256:45bfd2b51e38aaa5f9849f114d9c7c1d75f69187c849b3549cd64c465283abfa \
--hash=sha256:460e70b033aba8ed47e2ac9b5d0d2157b05a34fbfa30a241400aef4118902cdc \
--hash=sha256:4fb8e59f68845d56c23c031dcd79c329f345e4a9d2ffac91c3d1ab366bdc457b \
--hash=sha256:520648db8fb92eef7b3e6013f5a6f901cdf0d6685f639c2f7a245879f865bef7 \
--hash=sha256:5599b380c1f28efeb724e81569eac80cd92f99a85bd9775456caaf3225d40b11 \
--hash=sha256:59deccd347735a7774223b05a93773fddbb298aba3cea21be4337fb4752dbe32 \
--hash=sha256:5a0b2791239c99992a86c1b635b787fe2a877d9eaaa26f8891ce943832b585ae \
--hash=sha256:5adcbbfe78bdc242c71740a02e0991cc1b2f34d33c8bb15ca45eee8fd1140942 \
--hash=sha256:5b602b4201b965a8354d74e232364a66ff243dd142e350d035f46169bb36e13d \
--hash=sha256:5bbda3c70dd35d60671bc33b01916802707a052130d9e50cdb871d34594d35cb \
--hash=sha256:602024dae6d77e161f4b89491b62ca1d4f19949d79d47b2db057e476d21179d6 \
--hash=sha256:61a61b4a95a4f97922c3a6f5606d3e360851584bd47e500a5161373c53810e3d \
--hash=sha256:63aff70fe5aac59c72215f42ec39fcb59ff46774fa966e717f8ecb6ee2273577 \
--hash=sha256:71890d5247020c25c21a6b65202782bfc281d4e6e244842419d30e3492bb6dcc \
--hash=sha256:73a29b5ba642e35433166a03a3e02935e7238c4b3467fbd77523b99edea23e5b \
--hash=sha256:7969bffa322c097bd46ae595ada6a931cefda613f18ba64587e9cff4cb320756 \
--hash=sha256:7ac4abb3877c43af320392c664774eef6fa2cc063c79a55fc02d844a3cbe7395 \
--hash=sha256:7f731ebac68ea06d628658295cb2d217b10186329fcf9a3b6a149045059bf92e \
--hash=sha256:7f924a5a9d5890649566f2f6682e0d8ad8ca23028bacffbbac36dbd7fd680176 \
--hash=sha256:874cea8bb1ec1ddccbacbd027856f6bf496f6bc18aba97a918c20e067edab236 \
--hash=sha256:876077e7ebb8c84ed068e2b23d4c62ebb010d60df84b9591af1be2f39010ffb2 \
--hash=sha256:886bcf1870af74c32bc310fd00a6b803445e17e51b7d5a107c7b35c0f362cc16 \
--hash=sha256:8b27df301f56e3b3d2298095c8f7d6b68f2521f6b1693e901fa039bdbae34424 \
--hash=sha256:8b7c73d1cef3d9ae963e9ff03f6222df43efbb9054ffd2f1969c935b7fc84c02 \
--hash=sha256:8cda13494d86a4f12429641117cb6ac4bbbc9c30a33f711f7d3a2e5fbe4b0b7e \
--hash=sha256:8cddea1b8339451c2fb3388e138347b6126744f33b611bdb55b7357361cfef46 \
--hash=sha256:8dba0129b93e7091dfefaf4cf7000172741bff7f47bf6326fcf17f32fbb54d6b \
--hash=sha256:8e67c43bdfc88d5fee6db0d3e40175b362fc95fb85f0412d233b9b203c53a575 \
--hash=sha256:9133d68624b1f2e89ec2f554d56aea8a5b0d7168cd9320200ba58d4d794845a4 \
--hash=sha256:916f92f2a8db10508f739d0b5e00b83defe5d1115a997c54532a6d7cf8c95404 \
--hash=sha256:9297fb9c39b9a2c039dbcd306c410bd6906b95244dec3bba4318d36c718c164c \
--hash=sha256:95e7c44d072db623a1aab04ce488cf9533294a77ed9d072cd503a3596f4106ac \
--hash=sha256:975736b002ed080d124cf81a79cb7e05cb26d6b3f5c7a7b651c0fcce70353aa1 \
--hash=sha256:97c5a53e8c1754df58e73f047a99e287d4da1bdfe64b0072fb25c87000897951 \
--hash=sha256:9a09d59bef1db94f384b5bcc2d523694d338f3df6b757aeeaf7baca5d0c0be88 \
--hash=sha256:a364c1ea75dc51b83a17f52fe0c79cf8bc4ddf740403bebd4581c7666eea017d \
--hash=sha256:a3b4a01c6da07ef9f80d4fe8933b994bc99747bcea3eab0330a9c34d3c12655b \
--hash=sha256:a5876d0a60355af98d535c47f6cd6eb0f8a432396dab26845d380b92f8412422 \
--hash=sha256:a6a4b98a9132e0f45c9fc245a63894cfd8c45fb7a0d6bffc5eab3ec327cf7324 \
--hash=sha256:a6b4ff33f7e011bbaa148238d131c4fd4f8afbab3c104ddfbdb2b12b74ff7016 \
--hash=sha256:a93ee7c6e8fd0f8a83525a51bd777be57ee17787e91d805bd8d6faf9dcada18e \
--hash=sha256:b374e79ffa7511afc11773aef40a4ccea6191fba1c856ea2f9c56738dca69d7a \
--hash=sha256:b7d501d5eb5d4f67207df364752ad697465b834268744be7581c18d81d35d41d \
--hash=sha256:c59acfa8eb73a1e0d484392dc002bdf001fd4ce73394e0132df3d1ab6093d7cb \
--hash=sha256:c75116c9de79949de23006e2d9b35ee82874c594fcf5c0311b439acaa14b8441 \
--hash=sha256:ca80a49b53ed1d22f7282da7255f7bb2fd1935fd0f623d8613fda38745f18961 \
--hash=sha256:cad5782f93f7f738b62c6527b6f32a60694d924029f299a8b524758cfa53d815 \
--hash=sha256:ccadce0130fd813ec86ebfe969a6c58b42acc1d0fe55a47525375b740e07b605 \
--hash=sha256:d701eab36200c36224833d07dbdb709adb7fd4253429548ddb5e547b8ed40586 \
--hash=sha256:dad3d233d441a022c1f7155f0fb9d5aff7b97c1ea8c7dfa02cce586b16ab2d0b \
--hash=sha256:dd0b83bed3405b586a3133629f1d1a5bc7bfd64822a3b7ab342bdc68e6dbc61b \
--hash=sha256:de3de000d459402cda015068fd135aa50c0bf6f2477a80d4da1e646f123b4e78 \
--hash=sha256:de9923832f2d8c1a5ecd8d7260465a6ca5a86888a0d129e3bd5cf0406d2fc5bf \
--hash=sha256:df19e2d0b1620039af5102563fbd96e8938c7f5c3f5828528d641d9fc585525e \
--hash=sha256:e85880b538e59a59f55117b81f208a6660ad5ac328aad9305f812d9b8bc67a0f \
--hash=sha256:ee7d9da3bf493909cf811a3f038840cb34fab5ae2956b8a263919f6e289ab188 \
--hash=sha256:eed88b64a5e5da72d6a71cdc5aaeefaa5ced9b748f8d19f89800b339961dad39 \
--hash=sha256:f0ba7c2a329d650628f4c8572fd1db29f0a59dd70a3e3e0710dcf18a35cce9d8 \
--hash=sha256:f8e63209c3e1e828ee6a457529b4a6d8b05d050fe0ae03a7ae49e967c5d312e0 \
--hash=sha256:f8f0bd690e1a41294ac87905e8121c81a3761ec2583c768f13467428606c8c7a \
--hash=sha256:f96f0e30b5a95c7631b12bfe214cbc90ec8fe8cfa36920596c10514a65743519 \
--hash=sha256:f98e8215e172f567ce80eeaed9107fb4d32b6c44f26983d9b8334658136a205a \
--hash=sha256:f9fe868463ec7e1363733af77e38a5fda3e9b63940337048c945d69e0c80ff24 \
--hash=sha256:fdacf26402389bdd89857ad3c045a26fe8f3314f9a8b28226f82f88463a65b77 \
--hash=sha256:fe3170a69fe039b18ad18171e66faa9a75f6fe9d78f968fd9b54e09fbd714d81 \
--hash=sha256:fea4427d1ffdb3b523d7daa6712038428a4c16c450b9777bdd1221cfee0eab49
h2==4.4.1 \
--hash=sha256:0e25f1462b23c9cb82d9eb02e28bc706dac2a68cb457c6a0d74d63c8a2a5d0e6 \
--hash=sha256:4e866ffb1a869ae14dd9b5e6beb5c24a13da0495ad72b65925ded182521c1516
hpack==4.2.0 \
--hash=sha256:0895cfa3b5531fc65fe439c05eb65144f123bf7a394fcaa56aa423548d8e45c0 \
--hash=sha256:858ac0b02280fa582b5080d68db0899c62a80375e0e5413a74970c5e518b6986
hyperframe==6.1.0 \
--hash=sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5 \
--hash=sha256:f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08
idna==3.20 \
--hash=sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44 \
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
iniconfig==2.3.1 \
--hash=sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960 \
--hash=sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7
maxminddb==3.3.0 \
--hash=sha256:02cc5c537c4114e28d016df20038782bb58ac8b2ff0c2b565c98b2d98b5f0fe5 \
--hash=sha256:07319eff57ffd7098e03134617ad5c7f914d142e480c8c94e03c1f6de5fac730 \
--hash=sha256:0bbe7c13bfbd2f31b07814af15aa3c00143f8ffb0d29395b9eea1be6455961e6 \
--hash=sha256:0ce3807a0152b15d3f21786df65b111a8125bbf6791116f8f7fc4bfa9400f1b3 \
--hash=sha256:0de3312ba04de27cadb94cb929a70e4e766e2c6ef2e03c7fe00d539aa37ac0f3 \
--hash=sha256:0e0ee21668fc19e363220f3ada0c711840d9a2113969196f72f839e693e04c71 \
--hash=sha256:0f5eb14e7aa94cd0a527d2204eec5300990dd625312ebc149fc3404dcaeeeb98 \
--hash=sha256:0faf21b6af26e16714c1a5a3bc25ed33fd54e36cc569a6d237fd933747c2bf88 \
--hash=sha256:1522beddd9469584592259adbeb7a8e9c245c711340e3d69ec119455122cc6d0 \
--hash=sha256:1ae6c42bb73a1d1fc49c444968226d7badc692da325bf7933fdd4914f3594f99 \
--hash=sha256:1d00629a61610b79049c58a038f2b153b753a3c49705feddddd5794e0fdb8ffe \
--hash=sha256:20f49792c0cbcc7ca471beb4fe2d672166f80214d995ca1904f7cdee9ec22a7f \
--hash=sha256:21f4f14eb7952be84ad8545c47b3dc6f74ec9c9376f558bfcc3010e8f39ab698 \
--hash=sha256:258dae2eaf1d41fd2cec24c35f4416db1fc5f229bf4e166e48b95ec63a56a14c \
--hash=sha256:27dcb821921058222f482a07e0197234acb20115f1d306ddc6a8366166119016 \
--hash=sha256:28dc9fdf062804d4f45f2a1db22a53bca4efb0a7819a91135e66f5a3128889f2 \
--hash=sha256:2c2ce11abe1e95024a89c94760363018117991c5beedabba31bdb8919233588b \
--hash=sha256:2c5b2e1d004bad06a5b69287b2f5e9dc62e627d53687add975fa2eb89e8935bc \
--hash=sha256:349efe73c27482bc2cf8102a54afbfb8d9edb354251f92f153f68ba37b337c90 \
--hash=sha256:365d4f1e278062669e67911c83a5e6cc0b6a7056eb809dab9510aaa2f3598039 \
--hash=sha256:3a04a057569c7a25f22bb09d2eb3642afdd68229f553d1fce45a5671ecb10933 \
--hash=sha256:3a9e909ea42c485f36827193a0c2e308b2507ec9f3dcc20a15007d9311da917a \
--hash=sha256:3e644605506108fc186b51cb4b8d0689a9b6e645e437d3a0d44aa9eaa703c929 \
--hash=sha256:3ff1a4df2f3bed1e59cc2e6d133b5958cc8ef0809099ea1832ef9254a512e704 \
--hash=sha256:40b3221611c5e7f4e2ea763f126750f0d07cd9008cf4dcbd2be556e2bcfef1df \
--hash=sha256:4116b442797b7abe627e0602a2bd18962f6334b6de9c8ac84975be1b1275cf57 \
--hash=sha256:41c76b7477242d750ba445cc546ba4f35b5e0c25697c5152394ada7a1e09201b \
--hash=sha256:467dbdc1057ef3654d67caf5786aefca06875601620d9b82b431863d95caf29b \
--hash=sha256:46bf4d61e7756c05eeaded62f1c4972937fd1f78565e2506a186819ba066b46c \
--hash=sha256:476f017ef7de4297c67e53e2f09797e467932192308e7076db5b1e92c875c3db \
--hash=sha256:49c265a28764299c80c42c571d61d04c636a2a2ba12cd9b03ef8ab7ba6da2405 \
--hash=sha256:4dcc5db21722eda1ef390da04ac07b404776f9883c04266ebfdeb0bda2d45173 \
--hash=sha256:509249b07366262792532ec08191eb342a50310001ce9a14ecb1750b82392f10 \
--hash=sha256:5a3a7921ab8c3d9ee885ece3111b91722fa5a376413de10caff61331108c6714 \
--hash=sha256:5c35330ff224d61c10a3d3b3d34eeb9b21cbb1639a8bfe7a7a8dc9eda745ca33 \
--hash=sha256:5cefe4162a1a61dc4a9e2b9dccfe24bc6e5e5f49f713f6d4fcb062bdba1bb326 \
--hash=sha256:5d07281b67c3db198073780657e452a7d75664bddc75b462246335569475b8d1 \
--hash=sha256:5ecacf5d13421d5222368874e98bec96b634aca4743f92384f0aead15fa16147 \
--hash=sha256:5efc65479e474059ae7f85aede693ad3a8e31c255437d39aa03528dc17d369cf \
--hash=sha256:5f82f74e1e15cd828a55ab392d0fd80d4fc6d51eb31b5262d3481b7027c18efc \
--hash=sha256:610fc2a2e62037e4b23b17391897b63be600fae99a92a7ae68169c73e7a4a4ae \
--hash=sha256:61acddb7247a405fe944368574d44e11bc0d1dcd6b61008abab75d0f5472e6bd \
--hash=sha256:6267226f6664c3f0260841295ef0c9af70a6ba05b70f2dc7475ac560aa3fbb90 \
--hash=sha256:64f2d3635d2cc9dc5271d84c4d05a4577b60e10abff5af52b2fd6b60959107b8 \
--hash=sha256:71aba1b8f867e62724beae2a23fa92cbf4276375067abfd225d0ac1f021ee500 \
--hash=sha256:7a9ad4ddddf7bc20798975a1171cbccf7c0f50cecb3e86be30659253d2d8bee7 \
--hash=sha256:7b81da613941cc7d9e82db57c1772f6bef5c100954cacc7d9876232aca59505e \
--hash=sha256:833121c30e701edf8ac2464b1c310607e51a3f54c0f26b2b9922344f363e596a \
--hash=sha256:8827cd2d85ef250460d9dd96a0e67c57ef8deaa14599caa3f06e290cc1838389 \
--hash=sha256:88d6c904009e5bec0e6a38ab5dfe421646a0d14f7084fa86a8b36142117418ce \
--hash=sha256:890bc8115b8750fa4af1cd548b1064e844f4804ec39527b11c794830bade51fd \
--hash=sha256:8ab285825e128d211f31d11a46517e44235bf5dca79cba9a2cb1f10bcf99ad27 \
--hash=sha256:8ab7572acf78e2ef8d630b667a0b85690278221cca76339803488fa6c1272786 \
--hash=sha256:8ac0f9fdd7e27f5b9815684616759bd6fb367bd37cd7f4217c5aa5c0541f0aed \
--hash=sha256:8cb0027692908d9c302ba8dd0dae0eb8a9955b7ccf72335b4651ef66778df284 \
--hash=sha256:8f12c30c765cd6181bcd91affc2f0138f5364daff567f4672a9ae7b77e631480 \
--hash=sha256:91c1cc2989d4e392a37c26de67505a79ba213c90eecc83740b7c81e2df3e60db \
--hash=sha256:9639ca7810411293c9c576ed9843d3e7a8666474a1371fd9982a6f62728e6c35 \
--hash=sha256:99620535d26c8da868bae2018affde754e59e5b43b8705902f0f4a6003356a13 \
--hash=sha256:9a1bebada95181fd1602ef554e9d5d36da00403691dc8520efb99751c52d9162 \
--hash=sha256:9a9c7ada72b6af6dc2920be812867ff17cb6168892f3cba87f052986d2125f2a \
--hash=sha256:9add6485ddb57071d919dcb8ee98617392d143ac39dad797d9786701d8397c7c \
--hash=sha256:9cc2c7c166f87080f1471f1c1b256fef57ff9f3db436d69f1659837b98793d98 \
--hash=sha256:a00220f8c1b5427eb541fed03329ed122b731de571f9379ce1c7b235ef43e75d \
--hash=sha256:a04d62ae564795a630e4e375b30ef2166933ba887862f825494b2ad40cfcf622 \
--hash=sha256:a2438674f20fa9a86961ef121d0e07baa27000e186356ebf29cebf1af3ea9db3 \
--hash=sha256:aae50ff65f1252476587c351af9b6509bef7931bafe2cb90bf76f14fc4a2c1af \
--hash=sha256:ac035833b9792e045eb425c887b95a2e31ef657edf7923c5e80989580c69c604 \
--hash=sha256:b0006b64890a98a88faf89cad185deb7b519c0bfbf405a8273ede74a521b64fb \
--hash=sha256:b4b808b90b6f7a360d7bd7a3c5093e072b8a7f5c8e58bad9747e7f072dec9434 \
--hash=sha256:b7ba63a56028e629205ecf09820a92247a43f2ec90177aebbc745a36d7504805 \
--hash=sha256:bb4bc63ec6599362f7d8dcef412b17d7231a828af4ae0961f570a99a13096f72 \
--hash=sha256:bda0e715d702b847ab2082be1ef298f2b4a6cdffb72435d9967b057e88e8d8ec \
--hash=sha256:bf0d031ae8536c3f255db2677712f32802a3075e19c5638fb39868e439fd8dfd \
--hash=sha256:c56dacc8b9a4c85c62e5363ba718f628c93ae542df9e2d4c806362ac823d99be \
--hash=sha256:c85a62953aece0e4ae5ae54bfef64bd6b5af5945febfb9d587cbca848b9e4bd9 \
--hash=sha256:c8d81122ae0c7433ff40b32ae15b033e092ab2d00a2dfdd14f1a281e5d34015c \
--hash=sha256:c928a8ec2bf02166fdb7ea2f7c34221a4cd7870efe9eb9880adb85c994e9d044 \
--hash=sha256:c9ac07bb579fe86b61eaf1afebacc814be9310735e57764b18ccdb4988ef18d8 \
--hash=sha256:c9caa99bc6c724d83b28ecb047ecf4025df3fca551dc55361277fa24fcb41294 \
--hash=sha256:caa27e2adfaf74e9543f7cab81c1ce7247ff6a916fa122aa5af9e2bf9ebfd074 \
--hash=sha256:d09e124045edeaa0d81f3682e58b7b7e4c661f7a4b5ca1fad51746ef3b88df60 \
--hash=sha256:d2c45dc64167e177241c875e43d6baef2c36add9e1494bbb695a802eb8958e1d \
--hash=sha256:d926424a2ab007733913698f85d229e3cc5063fc95fc425b9088ec565de35a84 \
--hash=sha256:db36ff8dad59bc58882ea3374f191557783203588cf9aa2f9c4542adce36eb63 \
--hash=sha256:de07a78680594a9b4c49bab13c7b3d280068ee4846a1580787ed3ca800e1604f \
--hash=sha256:df8121c8af59e9ec51810f54d47d3bf9b89ac20a8305a890d5b97133325d10c1 \
--hash=sha256:e0971046ef19aa64e77446e45d8a87a7aa4a7b867312253d0ae90f12dd53ab6c \
--hash=sha256:e1dc4c12292fc9629a95daa7c98ebf74cf59368e62b5eec79975a2598c91b5e5 \
--hash=sha256:e30ded32a953398b001a8856ddd2eae2ff79656cf25db62b26fdf8fc3e7597f5 \
--hash=sha256:e31dd47a404093a3b257285c70e230bcd76952ab11c1b326c21abe400a252a12 \
--hash=sha256:e4bf04ee9373307becc3e6cb70ae47b4c0dcf9e566d5f9bf59a97e569ef7d38e \
--hash=sha256:e621394915e565f671958e2453e5fb6cc7e34552c1e51a2768686d4b1501c2c3 \
--hash=sha256:e72ae1be344ee834ba6e9951b2a2b4866968f85443505078847b139549921884 \
--hash=sha256:ec86c26da32501ba0fa0ed47de784c61500614b1b2d9e2a78e6c621bdd17d2c1 \
--hash=sha256:ed94f267f0c5caaac4ab2430b11cad3af7b98a882498ea73101776ac881735eb \
--hash=sha256:eda4be57322b09230af7e3cbec89f8f3f90709835137902d5d741cfecda862fd \
--hash=sha256:edda68f4ea05a3ac537bc1505f916019d7a9eb47d88244904713aec5a2761421 \
--hash=sha256:f0fdc32d7b2e9890de5bf5c24d11f0740bbc7d137b97764a2e47374bbd581efb \
--hash=sha256:f198f726c515dac34a9a75fe663a475506f30b430631e10ea8f14dc15370154e \
--hash=sha256:f19a0a42d3c99a80edd14d0bd972cb83993989c714d54d41f5fe170031aca7b8 \
--hash=sha256:f21ff2e354e15b865af7cf393366c2c5b1169eacd5d5b1ca3660ac10a04706f1 \
--hash=sha256:f22a60827975d1ef37cfadf87cafda030e669c1b298deaee823e1f45cef7f886 \
--hash=sha256:f5a7a57ad94f2ac03cdd8f345c1d17f33a97f12fe75ff04c3a0d050fce91cad0 \
--hash=sha256:fc6bb1b23a4614377d6ca090e01da624d5141193abcc58be27b9bbe67ae86d02 \
--hash=sha256:fcaf3aa27b2872da169818c5f44bd55161ef509f83216cb9669499a0aa0f41cb \
--hash=sha256:fd7a6faa680a285f2747d22185401f09dbde094e40267201e743c91a8c6e2813 \
--hash=sha256:fff5ae9e651fb2098b8634e6a1bbec07077279d2fd0f20a1da529b9353515336
packaging==26.4 \
--hash=sha256:81383611a09c1bc0b08b76e0fd5829d7c6824c65b27a6aee339da133f4233ea2 \
--hash=sha256:c4b671c41ddb9bf26e543c37723610d28fb6bf7affc4da17cf048d419d2c062a
platformdirs==4.14.8 \
--hash=sha256:1e34af590de4d978631b751eb2202f2fee4497537a17c1720b12fcf57b331392 \
--hash=sha256:96893d686e84e9e6f358a9ea41a8de544df66dbf2ba6cda250e7dc73acf85b9b
playwright==1.61.0 \
--hash=sha256:009588c2a7e499bc5a8b425b61fa65490968bbda9cd69e0cf2cff10f8304659a \
--hash=sha256:35c6cc4589a5d00964a59d7b3e59641e0aac0c02f15479a7af77d20f6bc79597 \
--hash=sha256:372d55a6f1248fa1dd47599686980cb8fb5bbe6fcda59eab793eb657c11d8a9b \
--hash=sha256:54f3b39f6eab832e33458c1dd7da0b5682aedab3b09ae731b5c59fa12fd2024e \
--hash=sha256:93454322ade8c11d5d6c211bfd91bdfb9ffb4810e3e026371bcbc4bec1b7ee4c \
--hash=sha256:9f7de4536088d12037c13a52b7ea34b59270b78926bb56935070597ffac6b1af \
--hash=sha256:e9fcbffcf557a8620fdedd92491eb59a32d18e23d6f3b4f6214b952be324fe51 \
--hash=sha256:ff138c3a604f69911e9d42fd036e55c2a171e5616edf04c1e7f60a2a285540b0
pluggy==1.7.0 \
--hash=sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec \
--hash=sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8
psutil==7.2.2 \
--hash=sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372 \
--hash=sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9 \
--hash=sha256:11fe5a4f613759764e79c65cf11ebdf26e33d6dd34336f8a337aa2996d71c841 \
--hash=sha256:1a571f2330c966c62aeda00dd24620425d4b0cc86881c89861fbc04549e5dc63 \
--hash=sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979 \
--hash=sha256:1fa4ecf83bcdf6e6c8f4449aff98eefb5d0604bf88cb883d7da3d8d2d909546a \
--hash=sha256:2edccc433cbfa046b980b0df0171cd25bcaeb3a68fe9022db0979e7aa74a826b \
--hash=sha256:7b6d09433a10592ce39b13d7be5a54fbac1d1228ed29abc880fb23df7cb694c9 \
--hash=sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee \
--hash=sha256:917e891983ca3c1887b4ef36447b1e0873e70c933afc831c6b6da078ba474312 \
--hash=sha256:ab486563df44c17f5173621c7b198955bd6b613fb87c71c161f827d3fb149a9b \
--hash=sha256:ae0aefdd8796a7737eccea863f80f81e468a1e4cf14d926bd9b6f5f2d5f90ca9 \
--hash=sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e \
--hash=sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc \
--hash=sha256:c7663d4e37f13e884d13994247449e9f8f574bc4655d509c3b95e9ec9e2b9dc1 \
--hash=sha256:e452c464a02e7dc7822a05d25db4cde564444a67e58539a00f929c51eddda0cf \
--hash=sha256:e78c8603dcd9a04c7364f1a3e670cea95d51ee865e4efb3556a3a63adef958ea \
--hash=sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988 \
--hash=sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486 \
--hash=sha256:eed63d3b4d62449571547b60578c5b2c4bcccc5387148db46e0c2313dad0ee00 \
--hash=sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8
pyasn1==0.6.5 \
--hash=sha256:4017b0fce125096b8573b39c989fdb1a4b19cf761e683398184550fea0e66587 \
--hash=sha256:6b11616a6bcf3a40e635f082bb232fa57b5e0dd7f517bd7ddd69ec3794508a47
pyasn1-modules==0.4.2 \
--hash=sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a \
--hash=sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6
pycparser==3.12 ; implementation_name != 'PyPy' and platform_python_implementation != 'PyPy' \
--hash=sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e \
--hash=sha256:f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6
pyee==13.0.1 \
--hash=sha256:0b931f7c14535667ed4c7e0d531716368715e860b988770fc7eb8578d1f67fc8 \
--hash=sha256:af2f8fede4171ef667dfded53f96e2ed0d6e6bd7ee3bb46437f77e3b57689228
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
pylsqpack==1.1.3 \
--hash=sha256:11242dfb87124853c1af0931dc766c34f99e000ceca9cf1912883297b19509c5 \
--hash=sha256:20e870f903bfad70c3b65536049091d5d325367bcde6855dd6d2b7b419c45ae6 \
--hash=sha256:4cac49c32d9f455bea012223b8e2bc64e79d4b94eb8a8a7f60a239947b09df97 \
--hash=sha256:6ba422e788309d0564f80cde1704d8857ae288951b7707f9fee7ab660ae56109 \
--hash=sha256:8fdb02cb2d4c7e5b31ad6959398ccc2d6963f449f5776bf754a3425fbbb830f2 \
--hash=sha256:b220afff798cf59baf15489a4f1bd8d5f167d0f3224695380b767e8dffe8316b \
--hash=sha256:b733be9fc7ea9ac37945a3333a11c79838d8d9886fb9f6169376fc258333530b \
--hash=sha256:bc3967c423fbba759b4353d0b467753b8f510c6f769bf3f68317ac4b8dfef9db \
--hash=sha256:c1f1c495c161415a371535e524ab1a68753fe15c6534aaf87a3a50bfd804e85c \
--hash=sha256:cd4de1c914be239e99b6251f0c03ceeca5fe4d19dc67b727e921dcf3d3587d4d \
--hash=sha256:f25a63d645a3e3ad59c5d453048f91b2d9b0f3655b146d1491c18c783d584a56 \
--hash=sha256:ff53d63bf96a90973fbfceb7381c11bf1656bd9704f703259f9ba38f71c6040d
pyopenssl==25.1.0 \
--hash=sha256:2b11f239acc47ac2e5aca04fd7fa829800aeee22a2eb30d744572a157bd8a1ab \
--hash=sha256:8d031884482e0c67ee92bf9a4d8cceb08d92aba7136432ffb0703c5280fc205b
pyproject-hooks==1.3.3 \
--hash=sha256:5fc53fdac9f7bd63fbcdc868fb5f90b4784d78a53a3d3388cd738b807441a20b \
--hash=sha256:defda19b854fa0d3bd4f76ea4ddcba8abd7dcfcdd585a6690ade050744fc5f43
pysocks==1.7.1 \
--hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \
--hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \
--hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0
pytest==9.2.0 \
--hash=sha256:07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588 \
--hash=sha256:97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b
pytest-timeout==2.4.0 \
--hash=sha256:7e68e90b01f9eff71332b25001f85c75495fc4e3a836701876183c4bcfd0540a \
--hash=sha256:c42667e5cdadb151aeb5b26d114aff6bdf5a907f176a007a30b940d3d865b5c2
pytest-xdist==3.8.0 \
--hash=sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88 \
--hash=sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1
requests==2.34.2 \
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \
--hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed
ruff==0.17.6 \
--hash=sha256:0692088e6b33455572fb18465e891b443f196e98dc1986825685c77ff6f4c5ac \
--hash=sha256:084d9c8f5ec718e7eba007dba339e7cb4f7571d2f267558ae080bf428fb6a69b \
--hash=sha256:1939b3d701c7b6981b7cf93473de5bf88b129b9ba84efaed5154cc517c44634d \
--hash=sha256:1a0bea6aa1216e0ec4cd35d3dbccec0d772a7c2aad28ec9c6e82571dff2c20b0 \
--hash=sha256:2b04276561331300325040bdca21460770029ec574d4c479099e39e8ad1ed43c \
--hash=sha256:3db61f5015600543a581b07fa7f6f64afa0eeedefe16034cadd88c4074087582 \
--hash=sha256:435241c61af5909a022f76219d3d1bf24730dc1bf0acabb5ddf4b569ab3cbb30 \
--hash=sha256:6a12c50a33936dc00db2be21ba25fb168a8b95c55eda2a3ac85005af69885e4b \
--hash=sha256:9cd2fd9923e9806b8b6b67a3469e2258e84bd4d21e45d5a1a690afdfb9c8e57d \
--hash=sha256:9d44ef2140402043fd6f689ef541858b80883a8b0a02e38539ef0614ebe57d0c \
--hash=sha256:9fbddc08577592e283c265d865e0182de6e33db185494db7b06290d989d888e5 \
--hash=sha256:aa3b08254a732acba246891089a152c47c5733dc36b8ecb76ce8602f8326e5e4 \
--hash=sha256:b5aba93b3db4b70c5697e4fee6e0d5b9c8452a9a3a03679611cadc25915a2173 \
--hash=sha256:c2f4af6670b7a0501904e881bb3f1f24bd0d964dec1eedbd85f0eb73786e1128 \
--hash=sha256:d006bbb2945edb17b0ce6a0c1b5f5a8d81ba11dbac294a0a925effa22ce34feb \
--hash=sha256:d8b14e1473dc86ab9069cf7a2ba5041dc012f59110201844ed04cfddf07055a0 \
--hash=sha256:fb589e032806bb942e4fb526f30b80a1a64112147ed9f1d38cc3de2e255b6f45 \
--hash=sha256:fd661702202a89c00a4c9d0339008805fa5876bfa1c57e165495c2e62230dfbf
service-identity==24.2.0 \
--hash=sha256:6b047fbd8a84fd0bb0d55ebce4031e400562b9196e1e0d3e0fe2b8a59f6d4a85 \
--hash=sha256:b8683ba13f0d39c6cd5d625d2c5f65421d6d707b013b375c355751557cbe8e09
typing-extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
tzdata==2026.6 \
--hash=sha256:0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec \
--hash=sha256:85d2cd9c09f81f0bb29db27759fc83af4f1e620efb814f8c5bf8b4cc4feece6d
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
--hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63
uv==0.13.10 \
--hash=sha256:19a76fd50a6a2bba38ee088d8336566856569be08196865f98132a08806581fc \
--hash=sha256:2a9ff188b442419c7aadebc445fcc1f287b25f99af50fa6d563b90cc0047b7cf \
--hash=sha256:30e75714a9cff3aa56281c7bf533a4e93cb5bdfcc0325d3aae54b9106460bd63 \
--hash=sha256:3bf1c1b13cac2533a342ca16b1c5f41347cd399404c9477a04ff79c5f7cb4dea \
--hash=sha256:50bee2a59ea9422b493aabc0cde9288f58fbcf6e8d688c30c4ecd8309459cac1 \
--hash=sha256:5bcf77c50760146ff7b41022ab7aeb1954d42dd47b89fad36b43a1a8a43da994 \
--hash=sha256:771a749b34477501092c9fe6d5e52f45cef944d875b0f2e2c989047a2ee647ab \
--hash=sha256:7cc9c41b43d583e34c781fd3446405b06e9c5fa2db468ce2a534d353db6429e5 \
--hash=sha256:7fa025c4b0f33b9a5357252e1be058d94157e13bfb8ae45d7e27cfce3759c65d \
--hash=sha256:8b0a15613aae9a3e1c134bb5ee706583af0addced7eb1add992f8b1b3e3a92a0 \
--hash=sha256:a52ee170c00d4de1d42026c4dbb00c5d7f327edcf2b2bddeecd0cfb169868ac7 \
--hash=sha256:a9636b4430a9b8a37ecc4d85111d1fd2560ef616edf5301b84f474073bf89e2f \
--hash=sha256:bf7174b00c88879d4a1019b51256bbdb2dd61c55c7dc896031e16d090e380ce6 \
--hash=sha256:c85a2ecb62d09d61904f5405b525fcc51f971d081f8508a881fa2f9bae7543a7 \
--hash=sha256:d87b9cf8165f2b3cc596e856b5bf794da9cfad6d1b110ca9d87eed42a15b3684 \
--hash=sha256:e52a1af7f97b717572f9e2bd69e54eb253b2c88a705500e35811c21106c439d4 \
--hash=sha256:e89dd26ea831dde70639ba0a798fa04a4c7c0226fd2b241da86218bfa370e495 \
--hash=sha256:ee3bca6523ed93c3ae0d1a90c2733be307f5f7cc5287c746214e93a3bae0da13 \
--hash=sha256:ee403b6bbcfda1bc7db269be5c40c1624df27b3b838d3f8a416648e00e2de5d4
websockets==17.4 \
--hash=sha256:00ad98e4bb0df7a6711c645eec16d5a9fdf99f0692bd4f5b6cb85a68677ba8df \
--hash=sha256:0132e3cbd3f5cfc1ec77588961b302d72a02e2603b82c2c23fd5fb59dc4fa206 \
--hash=sha256:023dc13bdc42a55e152acc81c39c90ec6cc4159ed17d23c6d73460fa2a73ab16 \
--hash=sha256:02f380df26de14999ecace203fe1396ac14d1c6132afc7924eb6f8c8b646c69d \
--hash=sha256:03ddf4eb76ced8725dcbb000ff60b0fb8d7330ed011f6dc725a1925c5fe02051 \
--hash=sha256:043945a43873c7c11a3f75238d475c95f902e967de329eb8763704546cfaa6b6 \
--hash=sha256:046ed16d3d83d64594e4a40655fef061ccf36059d8c30a01feca8a9481fe13b8 \
--hash=sha256:06ea46717553cdd10f2682126cf7a66e91c8ed17b6969f4a95e94b4e01d06188 \
--hash=sha256:09d3939b70df0c8ad2da145ebd50978bccaee1d565e838b0e7921a34d38571eb \
--hash=sha256:0a57b99f2e28922b5a2434317580fd23fdf118caff4c5b752f5452836426205a \
--hash=sha256:0c22a9c6b2349204f56123dd0ca7779e989d68e336d0dc02ad823485d44925de \
--hash=sha256:0dcce83837328e6795225ead920d3aa8d867cc9d6922aa558b0e9111599fdbb9 \
--hash=sha256:0e51546a3bedadd80dfa5c2efaed840ac51b8632d8db7f9f502175f5349382a9 \
--hash=sha256:156221ad7638b5abccefd6f798916bf3f8ffd6ac51480eb4ba5b05df914ccbf3 \
--hash=sha256:16550e24ac22c27e0a728100d8de196b5f054bab6748ef9f0b168fb8b3c32e35 \
--hash=sha256:18d3710becc612ec6f0229425bd6495133dfcbf30f7b6569585acc8ed2f1b452 \
--hash=sha256:1962f3bfde085af18878f1bb1aafb300c9a6ac33da886d0b0d97e33c9ce7a222 \
--hash=sha256:203e42eb77e06f85778a908b34c5ad032f34e98a68ef33920d6685c1e65a9420 \
--hash=sha256:2103982762460a764a7ef0021443bb471f46d45ecc6858276e4fe699ebac6b94 \
--hash=sha256:25eb661d8ba7e2b85ebb4e7a1bb9f6a3280910ed10b84330a7abfb5ed32d2764 \
--hash=sha256:29b615c2d5dd883f89c107a782681b73a7aa8b2bd894130310e45eb09b143913 \
--hash=sha256:2a9cb5bbfc33b4ebd3c8d3714d6e09805437f60a14977774e4bd11b5ace46c23 \
--hash=sha256:2b23dacf7a8a88afe92f77bcdbf4cf043a84692bac2f2da02f4011c687e19b48 \
--hash=sha256:2fd562372d4afaf18d1c7f1c68e39bd32818bb16d5f57f778a4a4ed88eedcaae \
--hash=sha256:32110d954d9d0e51f36edb0396673bf4d35193a0a80ba7013bf7f7d58a33ca07 \
--hash=sha256:332b88022d0acd47c44158bcd43f47f14eaddcd979247f242b1a33291c45cdd1 \
--hash=sha256:361f9a21a33191d5287e7a75f508fc3b9bf47aaffb0241198d6b7be3384f294e \
--hash=sha256:37ed7782972545e67d97ef9a172e9499d25459b1e32cb99d1c2a30c572f2441b \
--hash=sha256:3acc45494c08a4d27375a2c28474537f68910219f42624a08011221b04623d04 \
--hash=sha256:3b76837cd051d8875913f3934b27205f7a592f78b8a4f4a1f3abc36a2420c5bc \
--hash=sha256:3b78b39377630a70aa2198e5f03be416e690364a046b1d8af80a9263733083d0 \
--hash=sha256:3d27153a0413696767b98b5d96173a2a7e27cbfca02000a6069cea7b977765a7 \
--hash=sha256:3d512e3a6c528c42ce220ed9c3caff83c6fdcd98a1b98249f08ccfc66ad111b1 \
--hash=sha256:4073ab7cefe5a2e7dc368c1f01eb27716dc8ea8f1c69e9b7725ebce05aa53cf7 \
--hash=sha256:42d7a6e818214336cf7af9a3aae5c6923f94f09fa07ac5aab98268ba2a98a6d5 \
--hash=sha256:4441d655a53185ef1b01b1d42ad9b3a96b905110a9219043e3fdaec855ba3b6e \
--hash=sha256:47beedf07a706140b50786457e082497ee6b5970c41e49bcd1572ee3f4c73f80 \
--hash=sha256:48c83103f82fce36191a9e3a8a80731d4340e2da544eae8c5aaaf6a45280e7d0 \
--hash=sha256:4b79ea31cf277c72d2307c6cb8bd32a2c151959e80a2f24fa85df620c5f2860c \
--hash=sha256:4c792e6cce24d08f92199d907785c9e64f74c357deeed3dbaf7d699ed5930b64 \
--hash=sha256:4d2636a5b61c69e32db0e74b57073dd4a66f1ad195e9398c5f01bba41090deea \
--hash=sha256:4fb2db1f649b6464711846b5bb9c1611bd906ce939d9460cbd1fa419552cd6c3 \
--hash=sha256:506623128d7a55b726a5a46e4c9a8eae4c9dd0f04ff60b041fe7df85b9d034fe \
--hash=sha256:51adfc30f467077293a6695d8149bcef501c0728386f3a491054f835dadb60b2 \
--hash=sha256:52c31d123f5adf14dec694c2a4036bf42c523df7cefc641d31cd05653de56e49 \
--hash=sha256:5830f94a7190a33e55d06d89242ea951ee2009c3a27fc31538f3ac9386b27edd \
--hash=sha256:5cec3e7fbc911ff4fcf43b24aaf1b96906381ad36030f42897def3ff4b78729e \
--hash=sha256:5da7f7f1ecf866186f195f7ecc374c915e1838496b86f2f3b41da27c798a25c3 \
--hash=sha256:5ec906bb21b35e66cfdcc2ea0133f249f52b7d89e3e45ec8d2bd2d84a0255d7d \
--hash=sha256:5f772007dfba8941873dbd276b6a6845428cc740888b5c6c37bf483b1ea34b42 \
--hash=sha256:648adde345cfd13335342e23cfe94871c7f7f55a43fb254f3b95acb071072968 \
--hash=sha256:6531540aa63e6864cb0615a3a5da70ae03191334507852a5385320bb7916df3f \
--hash=sha256:6597a1f7413189b4bc58437babcdf39b79da416e5c477ae98323a88ecc108188 \
--hash=sha256:6686d29eaafddeeab9e48af92103dc0d26161035faa4be083b8b488f1ab47219 \
--hash=sha256:679eef0123861ca381dd8fd9bdc1920e87636ac55eae6cff875c53dcb05fbcf8 \
--hash=sha256:6afc32a7a1a40b071070419537df3559d26907086556769683fa97b7b6e90fd5 \
--hash=sha256:6b061ea7ca94966af7cd7a87cb189ff15972c103244611a2b1e8408c04f1dbe6 \
--hash=sha256:6cf4c002268da5c11cae9083aec71ac943bce9d95e0f83c8bf9a95a3ce421fbb \
--hash=sha256:6e6558efbb256b532c9f06a21ba42bcac729718e365c505819f181f25e5c0eca \
--hash=sha256:6fd8cac4907fec8302726d49e6969acfffaf720bc39b1cee23f473b81f4dce01 \
--hash=sha256:70293c25d79d1f084fdd665894481547575e429d2a75e8d72caec2f6b6b07af8 \
--hash=sha256:71f76bb8e59be847330b8a8d3753f85397677e128f9f9692c215f8cf721cefc7 \
--hash=sha256:725be1aff55f1c873a79cea0f612df9dff21a9d2c2e05783665b824b8aa7c24e \
--hash=sha256:72d0a731eccf482d5661c6711abfcd5921f3dbfbbb0789061e1918ef4bc89c70 \
--hash=sha256:7390e060f830b3d132f484b21ac2783a2d227b682ef62bb8146e1c1b4ca0e45a \
--hash=sha256:73b00645316121105274fd266ed54a20e6514650126d399cdea39876ab1e7b04 \
--hash=sha256:74e46409666c358b93fce0d8c6f4cb107d8dd7cba1302a38d49adf6fa8193c7e \
--hash=sha256:75b32cf33ea40f945f226f97bc1d43151e1a5adff21f420b5e63c468b1a28114 \
--hash=sha256:769e4f7b090e10cae4c082e3e39b9458ec2444505df84953c16c0468b16539c4 \
--hash=sha256:7849a096d6fdba3f2bdf849eb89f2d233a24400c92faa3efb25fa8dc615b706c \
--hash=sha256:799c5a23126c9589cb10b6c6b54f9087246940dad20cd74bf3f06fc9ae3bbab5 \
--hash=sha256:7a7e9321822ca59ba56fa8744c3e3f01ef74d547aafe0d383d000d7a4d11eb79 \
--hash=sha256:7b23db4b469d9e051ac74d96db9bf61e27c9054de64f8263fefa32bf72867ba1 \
--hash=sha256:7b4ee34acefa9ba1333f02b817982f1e4127f6f9b975017a707c4e738d7f9fb9 \
--hash=sha256:829bcaa90be8737c132d9515d6a466e8528e3b3d050d3f3466f36ea94d3beb48 \
--hash=sha256:8588edf317fbe4f16a949bc5a6ccdd22b6e6fd5b4745d128bc40bccf31024ce5 \
--hash=sha256:868744c68e9342768888c7326604da2228c19bb6946aa46b5f9e1ac32ea8d40b \
--hash=sha256:88ba8a439b2bad97bb69c38db5bf0ec16a061ee834cf0f244089186ee803e899 \
--hash=sha256:8b45d40f07081b377f0b837ddbfba4a9ab4a89a7b569d3c095436564e767a27b \
--hash=sha256:8c00c5c49f80a588a2c4f99d519d2abed4ce26cdca11273041bc8b7e60af60de \
--hash=sha256:8c51ac7b31578a7275650f580aac985940985b6d2e57247ac6d5e07f2c936cd6 \
--hash=sha256:8d148b4b295224d3a19e7bd9f02ebe7344de254b3b2c4d0628ce42ade0bca119 \
--hash=sha256:8f32a6cb0b101170abc2d8053af1473a2a29ef2a06d7130994ee8455a50f5dbf \
--hash=sha256:8fd30d217a4275107667fe1d4f601e2d50c797d0727148cfbb384536d65f04d3 \
--hash=sha256:927d602fb8fb595a69e6b1ae998a6ec19851d0fb9391759456e6425090996647 \
--hash=sha256:94622cf24e80d03054ceb69a06a86c950e12fe993ed06b933f7895232cacbc3e \
--hash=sha256:954d43574f72be244b65f0fa61e2f814214b024f2ec849f487aa2f553f7c6e71 \
--hash=sha256:98f16db5e79f2605194c0f899d0532005bb12269e698bf96f62a5635bcf33010 \
--hash=sha256:9a4e95d56994a45ac76541853796720436ffe462957d0b1b89e87ff3d3b1627e \
--hash=sha256:9ae1429ee9e52b139167ed0169757806a27ed7307e942e8c62037a9184e9843b \
--hash=sha256:9e282f35ece8895b9fa5af406fc6a4cb42f01e1009525cf46641de584781c83b \
--hash=sha256:9ff89e36451a19775e7556d95ebfa4a0b24b84cc87565d6b5d0ec8ea82bf3f2c \
--hash=sha256:a0457561e8a87a6a3b509e21c35084d7d207ced262139de3f738e9676a476bbd \
--hash=sha256:a50bd9b44dd9b7b845802030b4d88610c01c7f95571b4cbd3a1aeec17a34c9fd \
--hash=sha256:a703f23ca15a51251fc94f1774683f5aa511588a7ad6bbb83960cdb2a4dcd978 \
--hash=sha256:a920e99155d75d1b1c08172da8aaa7200e7b30871fb628d1631d7891a333e30e \
--hash=sha256:a9b0026538719f7a532998d84640ab2e91ca1a051ce4b8d924fdcb607307e921 \
--hash=sha256:ab9e4bd60796866c578e3afa0a17c98636887827a39c2e238a61989c18fd8e7b \
--hash=sha256:accb5e9492b9bc9c9aeec5b72ea8f2ddcbefc6143d1c626fba960ecbdc89807e \
--hash=sha256:ad2e9e152bec6c4f7e4cdb4adcea6b708400090eec04bfe5ee5b30d368ffd721 \
--hash=sha256:adc30e5d064c9e33049e825408fa4e952f4e8a0cf4c329dc2ded72e1bb5bae08 \
--hash=sha256:b529ad6c81ad21db2f4e3d6e33db78ce3b9f272066b438b5d673361f9282898d \
--hash=sha256:b6c7f91520c29420639925fd1cecceac9ca07366b50c09ea24eac1cd116b4866 \
--hash=sha256:b7ea61af293a153f2d67430038cf0efc10140caa623f2bdf5a9f5a457ff20f57 \
--hash=sha256:b8451f31ae24620cc9372acd2728d87922f2bb0cae3fa57aed68b152844cdf08 \
--hash=sha256:bbb6bed49f083e2ec8ae0bb21c00c7c5171ab8e08a8b008c61a43fc6c944fdac \
--hash=sha256:bc581579885728bb54ef15000295c20e6a64a200b1b73d5cfca71879a3eb3e1f \
--hash=sha256:bcad49104711f88b2b7c3ba166de172857d837248205e541b044a552558fecc3 \
--hash=sha256:bfc86dff091104eec770c29ea1831dbe191968a70aa2d8ae8eda3240d863970a \
--hash=sha256:c00f0c45851a2c61efffd03dde8fb4d594026b5cc18196c94e15460f1225f2ed \
--hash=sha256:c0cc2cb47face4dae64bd70a9268dbebddb3e48c1b48cf6d7b6ac1471609fd88 \
--hash=sha256:c2db7b9e2d726f7e051bedb67abcf460b84b11437b2f9fdacda7e6931dace85b \
--hash=sha256:c44776f82b04e623eb9e1b81fcd17ac6e9808ae1ba5cdf8edce1f7c869a95a9b \
--hash=sha256:c564d1e6531611bf87078c28780456ecc75459dcca189629fff2fe7c020d8e67 \
--hash=sha256:c568e72f5425a74616daeb824afe28da460cbeea036432f41c6af5380b83300d \
--hash=sha256:c5e970d3996c597186c9dbb6e77a8048737a834ac03cb13186a54999e0e1c31e \
--hash=sha256:c634053459278cf31fb404ddb5ecd38124e4609e8b609166da621edc2d5796db \
--hash=sha256:c63c0d7832956d5f3bb77888b93c854569d13f806289ff75c43926d25c6e5fd2 \
--hash=sha256:c6bd2c9781915592b209160d0f017d4c7c82ad53075e6b0c24d2a89299e7f9e9 \
--hash=sha256:c74954409ea5789f7a60daa5f94580c00ad0b60b20751c47b35c4784877b5057 \
--hash=sha256:c7a56140fcbf4662cb263754a754c651a16fe2196cae1fd232d18f89acd30c83 \
--hash=sha256:c7b996c02de5e032cb63dc65482b73693b7ecaa586654126be2749ddea239c40 \
--hash=sha256:c7f66a53e9b7ec831abb15e3d9b6cee8f52d6a24cd0a374786bf46c3ec218bc6 \
--hash=sha256:c8052c3058c402d53602583da5ddcf1a15a63ab1efe0222f47c7be59944e6463 \
--hash=sha256:c9f8fdb7bbefc4907c2bb3593f810f2b67a2d5329e1d38724a1aa3d763cf63eb \
--hash=sha256:cbdf4b42f4514422051889424fd03bc269be8c5d751bf39ec29ad761590bd10d \
--hash=sha256:cc0cd4065a65ac98f3e2742ee9f314da9d224db49b07dc17d3a20cef0d79658d \
--hash=sha256:cebad8f4796248b91fc2168515e507e5cb6b663a32befd09f3b1e7920acdcb1a \
--hash=sha256:cf99debb17227a50620aee16647bb33a0387f5fa5418d628666c0f05745e0d2a \
--hash=sha256:cfbbba4597f19ad717f79fd3f2a67ae7efae647bd6a61e14554e1b5ad242a5bf \
--hash=sha256:d0acd8191c0e5a61d1c27bfa33b6ec8431982299f5d71c02129aa4f16f182ad0 \
--hash=sha256:d0b6a9bd86f865ebc9d847a1eb0a655a0e2b447cbcde743dda97c4298415cc0b \
--hash=sha256:d0f943b53bb1d7389d72a5380078670e5fcc34a1328142148b72d20fd82031c7 \
--hash=sha256:d48795c7d64ca1c42e3d61fcc6478cb15a19b6ad3f9c882bc8d8dee49d4a420f \
--hash=sha256:d8255971f6789cf0cb365e3e22b9b166eba978548a26241eaa5b7af0440d885a \
--hash=sha256:ddab54dc0ec46ed09ef9ac131252cb5740ed21fbe6fc145f3c6fed0b575a8f15 \
--hash=sha256:dde9cd67f18803949ebf96de8aba12b8ec5ee3115e34c75a2db85a3b0a6c20d5 \
--hash=sha256:de29795f23833cdfb68ba45c8a5cc0ec49778ea5deb670188f4465bba5930d25 \
--hash=sha256:e0feb03a338f8f5e819ae23a73aabb7b46fd3b73f15f7df782dd12d99e2b02ad \
--hash=sha256:e30550965c78223439815dbdf40c93eb8931dfbf12427110dcfcaeebef76feb6 \
--hash=sha256:e3e80cad85ba68c07c1e8d4ccc9cf51e63bf6a73d6bf631640be947bd72b6b63 \
--hash=sha256:e4beaef2f4796558e738e15ca0b8802e35f419a9fa374a978e41706f43c48b26 \
--hash=sha256:e6d2a185ec4ff0478089305abd833da3a9fda8803eb77325b89ebeae5585a3b7 \
--hash=sha256:ed7fe197b8bb66eef4f62c052e33752d456d2fdda74805469d4bd954950ab339 \
--hash=sha256:ee48728a07566c32e097d267f4d4d01b85123c9ae748a42da02185b908cbedc4 \
--hash=sha256:ee6c4e0085bff5f6621bf9c53452584dcb91ebd993ce841e1f4061ac12b6b556 \
--hash=sha256:ef03fb4b3685df0ed9dc6a074a090f030345cad2c23c61818da3e08e693a9caa \
--hash=sha256:f01a680d4b66fd15cc7513fae55c673cc8cc340d41340305b7f9a782abdbefed \
--hash=sha256:f0494d3d97502e270282cc6a1f8648cd7335b4fe8d5c452006e5b7f9d62b8892 \
--hash=sha256:f24bed98595b9d854da8d6debaf82754abf3e8fe63ec90505ef560566814df7e \
--hash=sha256:f42671900e0b602d05a074c52fd3d757c2f8e5c4f73f771794dae1aa4aea5f0e \
--hash=sha256:f5b1d315a615cec81a79e2ce3a94221dc5c23e7fd4012897085d3b5e5a5638d0 \
--hash=sha256:f5f06f59e19aa0770aaf651ce91c196fa620b35aed49a7e6c36e7335f3f83db7 \
--hash=sha256:fcac44d917672ad6257ad64b80b5168306f168a78cab5c0612e4c699caed18cf
+34
View File
@@ -0,0 +1,34 @@
{
"playwright": "1.61.0",
"platforms": {
"ubuntu24.04-x64": [
{
"path": "builds/firefox/1532/firefox-ubuntu-24.04.zip",
"sha256": "8f3c97b95caf84cec1e83acdbee5079156cce338fc21bf2f4bc6afe3eec616c0",
"size": 110001368
},
{
"path": "builds/ffmpeg/1011/ffmpeg-linux.zip",
"sha256": "ebc74fc5b94830176a3c2914ae96bd8bc7f6a91f4f33890230f84a172ee61ccc",
"size": 2376500
}
],
"win64": [
{
"path": "builds/firefox/1532/firefox-win64.zip",
"sha256": "c02daa45e8af1164cba27301f076a877d9419f0d40b51b9fab4fe415daf6f77f",
"size": 122449192
},
{
"path": "builds/ffmpeg/1011/ffmpeg-win64.zip",
"sha256": "8d08827c019ad36e7b9d49d3648447d884534cb2acf200e71c715f6dd834cc50",
"size": 1411741
},
{
"path": "builds/winldd/1007/winldd-win64.zip",
"sha256": "0069f0d11d4ad6df068a068c003d22fe7dbec192a47bba64b2e115e9c8ce41d8",
"size": 128684
}
]
}
}
+9
View File
@@ -0,0 +1,9 @@
# The PUBLISHED SET, the control side of the A/B oracles (scripts/ci_published_set.py): the last published invisible-playwright and the invisible-core it pins (its seal pins the engine). Written by `python scripts/ci_published_set.py resolve --write`; .github/workflows/published-set.yml keeps it equal to the index.
# wrapper-requires: greenlet<4.0.0,>=3.1.1 | psutil>=5.9 | pyee<14,>=13
# core-requires: maxminddb>=2.2 | platformdirs>=4 | psutil>=5.9 | requests[socks]>=2.31 | tzdata>=2024.1
invisible-core==70.83.0 \
--hash=sha256:1dff040e41f5aba5aa07e086328ca436291fddbd31514d1bc9a9dbfc4ba7fb6a \
--hash=sha256:f7144262686adf54a4a1c85a8d17f76b31dc4ddcfbd6636d777c5c39963d3293
invisible-playwright==0.60.0 \
--hash=sha256:00509578944ff0d742761d4d5f19fcde21b7657197fa24ab0718e076ebdf9aa6 \
--hash=sha256:7285f5756ad2031087d12f339c2e89b76bdb953449c9151c0edc11a58d96d9c6
+28 -11
View File
@@ -1,19 +1,36 @@
[
{"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", "giro": "G2", "os": ["linux", "windows"], "min_tests": 44, "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_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all"], "marker": "e2e", "needs_root": false, "note": "Needs the candidate binary (STEALTHFOX_E2E_BINARY) and the engine that carries the UDP line. 57 = 1+7+6+1+21 from the five files + 21 from the 10 UDP-line tests of test_webrtc_realness.py (parametrized). The chain by name is here in its variant with the lab's exit on loopback (127.0.0.2) and the pref `media.peerconnection.ice.loopback`, on Linux and Windows: the exit of the lab is loopback, and a loopback mapped address is thrown away by nICEr unless the ICE context allows it. The variant without the pref (an exit that is not loopback) is the suite wrapper.e2e.udp.exit, Linux only; the address added to the interface of the Windows runner is work of the release after firefox-63. The preload_newtab test (2) is here: seen green on Linux as root (Docker) and on Windows 10 runs of 10 (windows-2022, round 5 engine); it reads the engine's own process log."},
{"id": "wrapper.e2e.udp.exit", "giro": "G2", "os": ["linux"], "min_tests": 7, "exact": true, "tests": ["tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick", "tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux only, and not collected on Windows: the exit of the lab is a documentation address (198.51.100.9) added to lo with `ip addr add`, which needs root and iproute2; a mapped address in 127/8 would be thrown away by nICEr as bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) and the pref that allows it is off in a product. The page reads a srflx equal to the gateway exit and the relay of the TURN server, the TURN name resolved by the DoH through the proxy, in the tick of 2 s. On the Windows runner of GitHub (administrator, the network of the runner) it could run too: not yet. A skipped test would turn the verdict red, hence a suite of its own. Its twin with the lab's exit on loopback and the pref stays in wrapper.e2e.udp on both systems, so that Windows keeps the walk of the chain by name.", "linux_only": "The lab's exit is a documentation address the host must hold besides its loopback (nICEr throws away a mapped address in 127/8). Linux holds it on lo as root; Windows takes no extra address on its loopback pseudo-interface, and adding it to the runner's adapter took the runner off the network (runs 43314251547 and 43334169682 died in the test step). A Windows twin waits for a way that leaves the runner's network alone."},
{"id": "wrapper.e2e.udp.sandbox", "giro": "G2", "os": ["linux"], "min_tests": 13, "exact": true, "tests": ["tests/test_the_socket_process_is_sandboxed_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"], "marker": "e2e", "needs_root": false, "note": "The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed.", "linux_only": "It reads the seccomp filter of the socket and tab processes in /proc. The Windows twin reads the sandbox token of the same processes (integrity level, restrictions) and needs a measurement of the retail Firefox's tokens first; until then Linux only."},
{"id": "wrapper.e2e.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.udp.sandbox", "giro": "G2", "os": ["linux"], "min_tests": 13, "exact": true, "tests": ["tests/test_the_socket_process_is_sandboxed_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"], "marker": "e2e", "needs_root": false, "note": "The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed.", "linux_only": "It reads the seccomp filter of the socket and tab processes in /proc. The Windows twin reads the sandbox token of the same processes (integrity level, restrictions) and needs a measurement of the retail Firefox's tokens first; until then Linux only.", "needs_userns": true},
{"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).", "moz_log": "nsHttp:5,neqo_http3:5"},
{"id": "wrapper.e2e.doh", "giro": "G2", "os": ["linux", "windows"], "min_tests": 19, "exact": true, "tests": ["tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_ice_names_by_the_context_proxy_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux needs root: the resolver trap of the file (ResolverTrap) points /etc/resolv.conf at a counting resolver on port 53. Su Windows il resolver trap non gira: l'asserzione sul resolver di sistema è l'unica omessa. Run it without xdist (port 53 is one per host). On the Linux leg the gate exports INVPW_REQUIRE_TRAP=1: a trap that cannot run or bind port 53 is a failure, not a skipped assertion."},
{"id": "wrapper.e2e.context.egress", "giro": "G2", "os": ["linux", "windows"], "min_tests": 14, "exact": true, "tests": ["tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Taken from the minimal-engine port (branch tests/minimal-port) unchanged but for the removed engine gate: 12 = 6 kinds of page work (hints, image/fetch/WebSocket/EventSource, WebRTC STUN and TURN-udp by name, geolocation, a service worker with push, a page still loading when its context closes) x 2 schemes (no proxy at launch and a gateway on the context; a launch gateway and a different one on the context), and 2 = the TURN server named over TCP in those two schemes. EXPECTED RED on the published firefox-63: the 2 TURN-by-name cases (the lookup of the TCP socket takes user context 0; fixed by commits ac0214bff4 and 058edd6cc6 of firefox-64). The 12 have not run on any engine yet. Like wrapper.e2e.doh: the Linux leg runs as root for the resolver trap (INVPW_REQUIRE_TRAP=1); on Windows the DoH log and the gateway's CONNECTs are the sink."},
{"id": "wrapper.e2e.context.sink", "giro": "G2", "os": ["linux", "windows"], "min_tests": 36, "exact": true, "tests": ["tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "The behavioural half of the class gate 'nothing of a context leaves but through its proxy', with a witness at an address of this host (no root, no address on lo) and the engine's own resolver log as the native-lookup sink. 35 = 31 + the 4 OCSP cases; the 31 are 19 probes (fetch, WebSocket, stun, turn over UDP, turn and turns over TCP, each by name, by IP and by a .local name, behind SOCKS5 and behind an HTTP proxy where the road differs) + 3 controls (the same probe by IP with no proxy IS heard by the witness) + 1 control of the native sink. + 4 PeerConnections built from a torn-down window (a detached iframe, a closed popup; behind SOCKS5 and behind HTTP; defect B3: EXPECTED RED on firefox-63, green on firefox-64) + 2 controls of them (the same PeerConnection from an attached iframe, green on both). + 2 cases of two contexts alive at once (each with its own proxy and DoH, a TURN server over TCP by a different name in each; behind SOCKS5 EXPECTED RED on firefox-63 like turn_tcp-name-socks5, behind HTTP green on both). EXPECTED RED on firefox-63: turn_tcp-name-socks5, turns_tcp-name-socks5 (user context 0, fixed in firefox-64) and the three .local cases fetch-local-socks5, stun-local-socks5, stun-local-http (audit B4, also red on firefox-64 until decided). The Linux leg runs as root so the resolver trap is a second sink. Windows reads the same engine log (its getaddrinfo lines are in the parent process file under the sandbox: run 43574494194), with the no-proxy native control as its positive control. THE OCSP CASES (4): a TLS page whose leaf, signed by a lab CA the engine trusts (put in the profile by the engine's xpcshell, no ignore_https_errors), names its OCSP responder by a NAME (ocsp-<nonce>.lab.test) and by an IP; a context behind the gateway loads it and the request must go through the gateway, never be looked up natively, in user context 0, or reach the responder (2 cases, EXPECTED RED on firefox-63, green on firefox-64); the same page in a context with no proxy IS asked of the responder (control); a page of an issuer the engine does not trust makes no OCSP request (negative control). THE CLOSED CONTEXT CASE (1, gated firefox-65): a beacon sent on pagehide as a proxied context closes, to a name never looked up, is resolved over the DoH through the context's gateway after the close; on firefox-64 it went to the machine's resolver every time (hunt 43733181674)."},
{"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": 259, "exact": true, "tests": ["tests/test_doh_session_prefs_unit.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_preload_newtab_is_written_only_when_asked.py", "tests/test_the_doh_e2e_launch_on_a_virtual_display.py", "tests/test_the_egress_sink_helpers.py", "tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py", "tests/test_the_fake_doh_answers.py", "tests/test_the_fake_doh_delays_and_refuses.py", "tests/test_the_h3_line_helpers.py", "tests/test_the_host_address_helper.py", "tests/test_the_http_proxy_helper_asks_for_credentials.py", "tests/test_the_lab_ca_and_its_ocsp_leaf.py", "tests/test_the_leak_watcher_sees_a_direct_connection.py", "tests/test_the_network_declaration_reaches_the_engine.py", "tests/test_the_realness_helpers.py", "tests/test_the_resolver_trap_counts_its_own_users.py", "tests/test_the_resolver_trap_is_required_by_the_gate.py", "tests/test_the_server_says_nothing_about_the_launch_counter.py", "tests/test_the_udp_bench_survives_what_a_loaded_machine_does_to_it.py", "tests/test_the_udp_chain_helper.py", "tests/test_the_witness_hears_a_direct_send.py", "tests/test_the_witness_picks_a_port_both_sockets_bind.py"], "marker": "unit", "needs_root": false, "note": "92 = 6+32+21+7+8+3+9+6. The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added. The sink of the egress gate (tests/test_the_egress_sink_helpers.py, 20): the engine's log (the same on Linux and Windows) and the witness read on known inputs, and a blind log that must raise, never answer 'nothing'. The lab CA of its OCSP case (tests/test_the_lab_ca_and_its_ocsp_leaf.py, 17; tests/test_the_fake_doh_answers.py +1, the DoH serving a lab-CA leaf): the leaf's AIA, trusted and untrusted issuers, the responder, the xpcshell step."},
{"id": "wrapper.e2e.page", "giro": "G2", "os": ["linux", "windows"], "min_tests": 130, "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", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py"], "marker": "e2e", "needs_root": false, "note": "130 = 126 + the 4 of test_a_drag_keeps_its_buttons_pressed_e2e.py (a drag reaches the page with the button it holds: event.buttons is 1 on every mousemove of a left drag, 2 on a right one, 0 after the release; with and without humanize). The 126 before it: 116 + the 9 of test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py (four browsers in one process, one closes: the loop is never seen inside a step of the close, the removal of the profile is held still and reached on a thread of the reaper while the close has returned, the other three keep answering; one control holds the loop on purpose, the other leaves it late in its selector and must not be charged). 116 = 100 + the 16 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; 2 of them the strict networkidle cases, a document still arriving that moves). 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.e2e.realness", "giro": "G2", "os": ["linux", "windows"], "min_tests": 31, "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": 282, "exact": true, "tests": ["tests/test_a_served_browser_keeps_the_udp_verdicts_of_its_proxies.py", "tests/test_doh_session_prefs_unit.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_preload_newtab_is_written_only_when_asked.py", "tests/test_the_doh_e2e_launch_on_a_virtual_display.py", "tests/test_the_egress_sink_helpers.py", "tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py", "tests/test_the_fake_doh_answers.py", "tests/test_the_fake_doh_delays_and_refuses.py", "tests/test_the_h3_line_helpers.py", "tests/test_the_host_address_helper.py", "tests/test_the_http_proxy_helper_asks_for_credentials.py", "tests/test_the_lab_ca_and_its_ocsp_leaf.py", "tests/test_the_leak_watcher_sees_a_direct_connection.py", "tests/test_the_network_declaration_reaches_the_engine.py", "tests/test_the_realness_helpers.py", "tests/test_the_resolver_trap_counts_its_own_users.py", "tests/test_the_resolver_trap_is_required_by_the_gate.py", "tests/test_the_server_says_nothing_about_the_launch_counter.py", "tests/test_the_udp_bench_survives_what_a_loaded_machine_does_to_it.py", "tests/test_the_udp_chain_helper.py", "tests/test_the_witness_hears_a_direct_send.py", "tests/test_the_witness_picks_a_port_both_sockets_bind.py"], "marker": "unit", "needs_root": false, "note": "The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added. The sink of the egress gate (tests/test_the_egress_sink_helpers.py, 20): the engine's log (the same on Linux and Windows) and the witness read on known inputs, and a blind log that must raise, never answer 'nothing'. The lab CA of its OCSP case (tests/test_the_lab_ca_and_its_ocsp_leaf.py, 17; tests/test_the_fake_doh_answers.py +1, the DoH serving a lab-CA leaf): the leaf's AIA, trusted and untrusted issuers, the responder, the xpcshell step."},
{"id": "wrapper.e2e.page", "giro": "G2", "os": ["linux", "windows"], "min_tests": 130, "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", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py"], "marker": "e2e", "needs_root": false, "note": "130 = 126 + the 4 of test_a_drag_keeps_its_buttons_pressed_e2e.py (a drag reaches the page with the button it holds: event.buttons is 1 on every mousemove of a left drag, 2 on a right one, 0 after the release; with and without humanize). The 126 before it: 116 + the 9 of test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py (four browsers in one process, one closes: the loop is never seen inside a step of the close, the removal of the profile is held still and reached on a thread of the reaper while the close has returned, the other three keep answering; one control holds the loop on purpose, the other leaves it late in its selector and must not be charged). 116 = 100 + the 16 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; 2 of them the strict networkidle cases, a document still arriving that moves). 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.", "moz_log": "DocumentChannel:5,ProcessIsolation:5,nsDocShell:4,DocLoader:4", "juggler_trace": true},
{"id": "wrapper.unit.page", "giro": "G1", "os": ["linux", "windows"], "min_tests": 72, "exact": true, "tests": ["tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_page_number_follows_the_call.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_the_hand_over_of_a_popup_holds_under_concurrency.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py"], "marker": "unit", "needs_root": false, "note": "72 = 44 + 3+9+5+1+10 of the popup hand-over (24 counted at the collection before; was 20 = 3+8+1+8 before 6200bc2). The page dispatcher's wait for Page.ready and what it hands over; the drive gate goes through the core (the engine waits for the session's road)."},
{"id": "wrapper.e2e.compositing", "giro": "G2", "os": ["linux", "windows"], "min_tests": 9, "exact": true, "tests": ["tests/test_software_compositing_is_declared_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The engine DECLARES software compositing on every machine (core: the compositing entries of zoom.stealth.gfx.feature_status carry the VM decision, and on Windows gfx.webrender.software=true, gfx.webrender.software.d3d11=false). 3 = (1) the compositor read from a privileged context is 'WebRender (Software)' on Windows and on Linux (windowUtils.layerManagerType of each window: Troubleshoot.snapshot().graphics throws on this engine, `ext is null`, so it is not the route); (2) the GPU process uses under 1.5 s of CPU on the fixed 10-scene loop of one browser (Windows runner: 0.32 s declared, 2.7-4.2 s not, runs 43652292533 and 43642744101; on Linux it is held to the bound if a GPU process exists); (3) the 86 keys of the page-bytes probe plus the canvas 2D scenes (drawImage scaled with smoothing off/low/medium/high, text with linear/radial/conic gradients) equal tests/data/page_bytes_<os>.json, PNGs on decoded pixels. EXPECTED RED on the core 64.71.0 (tests 1 and 2 on Windows). The reference of Windows holds the 75 stable keys and 6 of the 11 PNG keys of run 43652292533; the five other PNG keys and the new canvas keys, and all of Linux, are written from the first run on the engine of the reference (the failure of test 3 prints RECORD-BEGIN ... RECORD-END with the entries to merge): a reference that is not complete is red, never skipped. 9 = those 3 + the 6 families of tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py (from firefox-66, engine_at_least): a screenshot draws the text of Arial, Times New Roman, Consolas and Segoe UI, with accents, the typographic apostrophe, the euro sign, Chinese, Arabic and Russian, and of MS PGothic (face 2 of msgothic5_32.ttc: Japanese and Latin) and NSimSun (face 1 of simsun.ttc: Chinese), two faces that are not the first of their collection, with the same bytes as the content process drew them in a canvas (an SVG image with a foreignObject of the same markup), cut from the same page.screenshot, on both systems and with no threshold. EXPECTED RED on every engine that rebuilds the text in the parent with another font than the bundle (Linux: fontconfig answers DejaVu Sans), and skipped, hence red here, on an engine older than firefox-66. It saves the screenshot, the two boxes and a result.json under RUNNER_TEMP/invpw-evidence."},
{"id": "wrapper.e2e.fakeweb", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_fakeweb_p2_e2e.py", "tests/test_fakeweb_p4_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The fake web, offline: our browser on the hard pages (profile P2: a reused routed page reaches networkidle every time, also under a load of three other browsers; the other site is another process) and on the 17-step journey of a person (profile P4), each judged against what stock Firefox does, as tests/fakeweb/pages.json declares it. 4 = 3 + 1. Stock itself is held to that declaration, and compared with ours step by step, by scripts/run_fakeweb.py in .github/workflows/fakeweb.yml. Needs the candidate binary (STEALTHFOX_E2E_BINARY)."},
{"id": "wrapper.e2e.fontconfig", "giro": "G2", "os": ["linux"], "min_tests": 2, "exact": true, "tests": ["tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "Fontconfig exists only on Linux: the parent of the engine shows <GRE>/fonts to it (FcConfigAppFontAddDir) to rebuild a font from a path and a face index. On Windows DirectWrite opens the file from its path, with no folder to scan and no cache to read, so this test has no Windows counterpart.", "note": "2 = (1) the stand-in that runs the engine under strace stays in the engine's place, as the core launches it (the leader of a process group of its own): a fake engine with a child, no browser; the process the launcher holds lives as long as the fake engine, and the group killed holds strace and the child (the stand-in that exec'd setsid forked and exited 0 at once: candidate 44161687675); (2) the warm launch of the parent reads the bundle from fontconfig's cache and does not scan it again (from firefox-66, engine_at_least). Two launches under strace with the same XDG_CACHE_HOME of the test, the first cold and the second warm: the cold parent opens every font file of <GRE>/fonts (the folder as the disk lists it) before any page and fontconfig writes its cache; the warm parent does not open every one of them, and it opens a *.cache-* file of fontconfig (a few files are opened to be used, so the verdict asks about the whole folder, as a scan does). Scan and drawing are told apart by position: only what the parent opens before the first page counts (the opens that draw are written as after_startup). Evidence in RUNNER_TEMP/invpw-evidence/fontconfig-cache: the interval and the number of opens of the bundle, the names of the files of the bundle each launch opened before the first page, the size of the cache file, the VmRSS of the parent after about:blank and after a page with every family, and a third launch with gfx.bundled-fonts.activate=0 (the behaviour before), which is evidence only. Needs strace on the runner: without it both are red, not skipped. No threshold."},
{"id": "wrapper.e2e.compositing", "giro": "G2", "os": ["linux", "windows"], "min_tests": 9, "exact": true, "tests": ["tests/test_software_compositing_is_declared_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The engine DECLARES software compositing on every machine (core: the compositing entries of zoom.stealth.gfx.feature_status carry the VM decision, and on Windows gfx.webrender.software=true, gfx.webrender.software.d3d11=false). 3 = (1) the compositor read from a privileged context is 'WebRender (Software)' on Windows and on Linux (windowUtils.layerManagerType of each window: Troubleshoot.snapshot().graphics throws on this engine, `ext is null`, so it is not the route); (2) the GPU process uses under 1.5 s of CPU on the fixed 10-scene loop of one browser (Windows runner: 0.32 s declared, 2.7-4.2 s not, runs 43652292533 and 43642744101; on Linux it is held to the bound if a GPU process exists); (3) the 86 keys of the page-bytes probe plus the canvas 2D scenes (drawImage scaled with smoothing off/low/medium/high, text with linear/radial/conic gradients) equal tests/data/page_bytes_<os>.json, PNGs on decoded pixels. EXPECTED RED on the core 64.71.0 (tests 1 and 2 on Windows). The reference of Windows holds the 75 stable keys and 6 of the 11 PNG keys of run 43652292533; the five other PNG keys and the new canvas keys, and all of Linux, are written from the first run on the engine of the reference (the failure of test 3 prints RECORD-BEGIN ... RECORD-END with the entries to merge): a reference that is not complete is red, never skipped. 9 = those 3 + the 6 families of tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py (from firefox-66, engine_at_least): a screenshot draws the text of Arial, Times New Roman, Consolas and Segoe UI, with accents, the typographic apostrophe, the euro sign, Chinese, Arabic and Russian, and of MS PGothic (face 2 of msgothic5_32.ttc: Japanese and Latin) and NSimSun (face 1 of simsun.ttc: Chinese), two faces that are not the first of their collection, with the same bytes as the content process drew them in a canvas (an SVG image with a foreignObject of the same markup), cut from the same page.screenshot, on both systems and with no threshold. EXPECTED RED on every engine that rebuilds the text in the parent with another font than the bundle (Linux: fontconfig answers DejaVu Sans), and skipped, hence red here, on an engine older than firefox-66. It saves the screenshot, the two boxes and a result.json under RUNNER_TEMP/invpw-evidence.", "runner_image": {"windows": "windows-2022"}},
{"id": "wrapper.e2e.fakeweb", "giro": "G2", "os": ["linux", "windows"], "min_tests": 7, "exact": true, "tests": ["tests/test_fakeweb_p2_e2e.py", "tests/test_fakeweb_p4_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The fake web, offline: our browser on the hard pages (profile P2: a reused routed page reaches networkidle every time, also under a load of three other browsers; the other site is another process) and on the 17-step journey of a person (profile P4: every step as stock, and every page left only once its noise is done), each judged against what stock Firefox does, as tests/fakeweb/pages.json declares it. 7 = 3 + 4 (the last two: a `load` that takes 20 s is a step that succeeds, and a `load` that never comes ends in an error that names the wait and the page). Stock itself is held to that declaration, and compared with ours step by step, by scripts/run_fakeweb.py in .github/workflows/fakeweb.yml. Needs the candidate binary (STEALTHFOX_E2E_BINARY).", "stock_firefox": true, "extra_steps": ["fakeweb_profiles"]},
{"id": "wrapper.e2e.stock_twin.dnd", "giro": "G2", "os": ["linux", "windows"], "min_tests": 8, "exact": true, "tests": ["tests/test_a_drag_from_the_top_into_a_frame_of_another_site_e2e.py", "tests/test_a_press_outside_an_open_datalist_list_ends_as_on_stock_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Split from the row wrapper.e2e.stock_twin, which ran past the 25-minute limit of a leg: one leg. The twin of the real drag from the top into a frame of another site (4 scales): the same steps first on Playwright's own Firefox (stock_firefox), headed, driven by the stock Playwright client, and second on ours; the verdict is 'the same as the reference' (tests/_stock_twin.py). Each record keeps the page's and the chrome's devicePixelRatio and the real scale of the screen. The file is in no whole-suite row: the references are installed only for this row's legs. Second file: the twin of a press outside the open list of a datalist (4 scales): the list must be open in chrome on both before the press (else BROKEN CONTROL), and the events the page hears and the state of the list after must be the reference's (the leg took 2 minutes with one file).", "stock_firefox": true},
{"id": "wrapper.e2e.stock_twin.select", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_a_select_dropdown_opens_at_its_element_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Split from the row wrapper.e2e.stock_twin, which ran past the 25-minute limit of a leg: one file, one leg. The twin of the select dropdown (4 scales), measured from chrome scope against RETAIL Firefox 159 driven by Marionette alone, headed (the leg sets INVPW_RETAIL_FIREFOX to its firefox.exe), the reference first and ours second; the verdict is 'the same as the reference' (tests/_stock_twin.py, tests/_retail_reference.py). Each record keeps the page's and the chrome's devicePixelRatio and the real scale of the screen. The file is in no whole-suite row: the references are installed only for this row's legs.", "stock_firefox": true},
{"id": "wrapper.e2e.stock_twin.tooltip", "giro": "G2", "os": ["linux", "windows"], "min_tests": 6, "exact": true, "tests": ["tests/test_a_tooltip_opens_at_the_pointer_e2e.py", "tests/test_temp_a_listener_of_a_sandbox_world_is_recorded_on_retail_and_on_ours_e2e.py", "tests/test_temp_the_planted_getters_are_recorded_on_retail_and_on_ours_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Split from the row wrapper.e2e.stock_twin, which ran past the 25-minute limit of a leg: one file, one leg. The twin of the tooltip (4 scales), measured from chrome scope against RETAIL Firefox 159 driven by Marionette alone, headed (the leg sets INVPW_RETAIL_FIREFOX to its firefox.exe), the reference first and ours second; the verdict is 'the same as the reference' (tests/_stock_twin.py, tests/_retail_reference.py). Each record keeps the page's and the chrome's devicePixelRatio and the real scale of the screen. The file is in no whole-suite row: the references are installed only for this row's legs. Second file (TEMPORARY, remove with the control it explains): the plant and the page's own read of the getters planted by tests/test_a_pages_own_hasinstance_is_never_called_while_the_client_listens_to_console_e2e.py, run on retail and on ours, dumped side by side to the evidence folder, no verdict about ours. Third file (TEMPORARY, same): what window.onerror is told when a listener registered from another script world (retail: the default sandbox of Marionette's ExecuteScript; ours: the client's evaluate) throws an Error and a non-error, against the page's own throwing listener as control, for the two listener cases of tests/test_a_page_function_called_by_the_client_sees_only_page_frames_e2e.py.", "stock_firefox": true},
{"id": "wrapper.e2e.stock_twin.intersection", "giro": "G2", "os": ["linux", "windows"], "min_tests": 8, "exact": true, "tests": ["tests/test_intersection_and_lazy_loading_in_a_frame_of_another_site_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Split from the row wrapper.e2e.stock_twin, which ran past the 25-minute limit of a leg: one file, one leg. The twin of what the IntersectionObserver of a scrolled frame of another site reads (8 steps, 4 scales) and of when a lazy frame is requested (4 distances, 4 scales): the same steps first on Playwright's own Firefox (stock_firefox), headed, driven by the stock Playwright client, and second on ours; the verdict is 'the same as the reference' (tests/_stock_twin.py). Each record keeps the page's and the chrome's devicePixelRatio and the real scale of the screen. The file is in no whole-suite row: the references are installed only for this row's legs.", "stock_firefox": true},
{"id": "wrapper.e2e.fontconfig", "giro": "G2", "os": ["linux"], "min_tests": 9, "exact": true, "tests": ["tests/test_no_fontconfig_file_of_the_host_is_opened_and_the_screenshot_draws_the_bundle_linux_e2e.py", "tests/test_the_host_fontconfig_rules_do_not_reach_the_text_pixels_linux_e2e.py", "tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "Fontconfig exists only on Linux: the engine runs it on its own empty configuration, and the rules of a user and the files of the host are what these tests try to make reach it. On Windows DirectWrite draws the text from the path of the font, with no rule of a user and no configuration or cache of fonts to read, so these tests have no Windows counterpart.", "note": "7 = (1-3) the fontconfig rules of a user do not reach the pixels of the text a page reads: seven launches of one seed, each with its own system-wide rule file (/etc/fonts/local.conf, written with sudo before the launch and put back after it; not the environment, which the core owns: it strips FONTCONFIG_*, and points XDG_CONFIG_HOME and XDG_CONFIG_DIRS at empty folders): nothing; rgba=none with lcdfilter=lcdnone; rgba=bgr; embeddedbitmap=false; autohint=true; hintstyle=hintfull with antialias=false; a strong prepend rule on system-ui. fc-match, in the same environment, must show each rule in force (a launch that measures nothing is red). Three tests: every rule in force in fc-match on the host; the hashes of the pixels of getImageData (an opaque canvas and the default one, Arial, SimSun, MS Gothic at 9-16 px) equal to those of the launch with nothing; the computed family and the widths of system-ui equal. (4-7) no fontconfig file of the host is opened and the screenshot draws the bundle: the stand-in that runs the engine under strace stays in the engine's place (a fake engine with a child, no browser); the caches $HOME/.fontconfig and $XDG_CACHE_HOME/fontconfig hold a valid cache of the bundle that lacks msgothic5_32.ttc (fc-list proves it); under strace no process opens a path under /etc/fonts, a fonts.conf or a *.cache-* file; the screenshot of Japanese text in MS PGothic equals the content's own drawing. Needs strace, fc-cache, fc-list, fc-match and sudo without a password on the runner: without them the tests are red, not skipped. Evidence in RUNNER_TEMP/invpw-evidence/fontconfig-rules and fontconfig-host-files. Also in the row until the 72 is released: the old file of the warm-cache test (2 tests, same ids), rewritten to assert the 72's behaviour: the stand-in, and two launches with the same XDG_CACHE_HOME and HOME under strace write no fontconfig cache file (*.cache-*, .NEW, .TMP-*) and no process opens one. E1 and E2 replace it; its retirement entry goes to main after the release of the 72."},
{"id": "wrapper.unit.compositing", "giro": "G1", "os": ["linux", "windows"], "min_tests": 30, "exact": true, "tests": ["tests/test_the_page_bytes_reference_compares_decoded_pixels.py"], "marker": "unit", "needs_root": false, "note": "The helpers of wrapper.e2e.compositing on known inputs, no browser: the PNG compared on decoded pixels (another deBG chunk and compression are the same, one pixel is not, every scanline filter), the comparison with a reference (changed, missing and extra keys named, the entry to record), the type of an engine process, an engine process known by its executable and not by the name it gives itself (Linux), and the CPU of a window, and the shape of the committed Windows reference, and the box cut out of a screenshot (its pixels, a box outside the picture refused, written as a PNG and read back, two boxes told apart by a pixel that is named, the pixels that are not grey)."},
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 2183, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_css_calc_is_windows_e2e.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_math_sin_cos_tan_are_windows_e2e.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_no_legacy_in_the_wrapper.py", "tests/test_no_override_leaves_the_persona_scheme.py", "tests/test_no_thread_is_started_on_the_reader.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pin.py", "tests/test_pin_dicts_are_valid.py", "tests/test_pinning_doc.py", "tests/test_pointer_server.py", "tests/test_popup_adoption_unit.py", "tests/test_prefs_composition_arm.py", "tests/test_preload_newtab_is_written_only_when_asked.py", "tests/test_protocol_names_are_declared.py"Line truncated
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 2184, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_verdict.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_css_calc_is_windows_e2e.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_refusal_is_declared.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_every_suite_runs_on_linux_and_windows.py", "tests/test_expose_binding_refusal.py", "tests/test_fakeweb_p4_report.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fixtures_name_why_the_package_is_missing.py", "tests/test_fork.py", "tests/test_frame_dispatch.py", "tests/test_geoip_used.py", "tests/test_goto_follows_the_base_url.py", "tests/test_hook_wiring.py", "tests/test_imports.py", "tests/test_integration.py", "tests/test_juggler_event_buffer.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py", "tests/test_juggler_lives_in_the_core.py", "tests/test_juggler_transport.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_launch_counters_run_on_github.py", "tests/test_launcher_config.py", "tests/test_launcher_helpers.py", "tests/test_math_sin_cos_tan_are_windows_e2e.py", "tests/test_motion_never_hides_a_programming_error.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_no_event_of_any_family_is_lost_by_the_hand_over.py", "tests/test_no_legacy_in_the_wrapper.py", "tests/test_no_override_leaves_the_persona_scheme.py", "tests/test_no_thread_is_started_on_the_reader.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pin.py", "tests/test_pin_dicts_are_valid.py", "tests/test_pinning_doc.py", "tests/test_pointer_server.py", "tests/test_popup_adoption_unit.py", "tests/test_prefs_composition_arm.py", "tests/test_prefs_composition_arm_on_windows.py", "tests/test_preload_newtab_is_written_only_when_asked.py", "tests/test_protocol_nameLine truncated
{"id": "wrapper.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 4595, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_gil_free_thread_dump_kills_a_busy_process_and_the_stack_watchdog_does_not.py", "tests/test_a_handle_action_walks_like_a_selector_action.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_marionette_session_is_asked_after_the_first_window.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_popup_under_the_declared_viewport_is_not_pinned.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_refuses_what_would_touch_the_page.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_served_browser_keeps_the_udp_verdicts_of_its_proxies.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_test_that_is_not_e2e_never_leaves_the_machine.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_host_aa_stable.py", "tests/test_ab_network.py", "tests/test_ab_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.py", "tests/test_ab_oracle.py", "tests/test_ab_oracle_declared_differences.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_an_expired_popupshown_wait_fails_the_e2e_test_that_launched_the_browser.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_linux_legs_read_no_mirror.py", "tests/test_ci_poison_host.py", "tests/test_ci_published_set.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_windows_temp_is_on_d.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_action_is_pinned_by_commit_sha.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_fixture_a_test_pins_is_checked_out_byte_for_byte.py", Line truncated
{"id": "wrapper.unit.all.windows", "giro": "G1", "os": ["windows"], "min_tests": 4607, "exact": true, "tests": ["tests/test_a_162_message_is_read_like_a_161_one.py", "tests/test_a_click_makes_one_mousemove_at_its_point.py", "tests/test_a_closed_context_leaves_nothing_in_the_registry.py", "tests/test_a_closed_page_says_nothing.py", "tests/test_a_closed_pipe_is_a_closed_target.py", "tests/test_a_commit_at_any_point_of_the_hand_over_reaches_the_client_once.py", "tests/test_a_context_proxy_carries_its_measured_udp_exit.py", "tests/test_a_context_route_disables_the_cache.py", "tests/test_a_detached_frame_answers_detached.py", "tests/test_a_dialog_is_a_protocol_object.py", "tests/test_a_dialog_is_answered_after_a_pause.py", "tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_a_failed_expect_carries_its_call_log.py", "tests/test_a_failed_generation_of_the_security_state_keeps_its_evidence.py", "tests/test_a_failed_launch_stops_the_display.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_file_chooser_is_never_dropped_in_silence.py", "tests/test_a_frame_tap_needs_a_context_with_touch.py", "tests/test_a_gil_free_thread_dump_kills_a_busy_process_and_the_stack_watchdog_does_not.py", "tests/test_a_handle_action_walks_like_a_selector_action.py", "tests/test_a_launch_asks_nobody_on_the_internet_where_it_leaves_from.py", "tests/test_a_launch_gives_the_core_its_engine_for_the_security_state.py", "tests/test_a_launch_has_one_deadline.py", "tests/test_a_launch_without_a_session_gets_one.py", "tests/test_a_live_event_does_not_overtake_the_replay_of_a_new_page.py", "tests/test_a_marionette_session_is_asked_after_the_first_window.py", "tests/test_a_module_that_leaves_a_browser_open_fails.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_a_non_finite_number_crosses_the_wire_as_a_tag.py", "tests/test_a_page_closed_before_its_announcement_is_not_announced.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_path_leaves_as_one_stroke.py", "tests/test_a_popup_under_the_declared_viewport_is_not_pinned.py", "tests/test_a_port_number_is_held_until_it_is_used.py", "tests/test_a_read_whose_probe_ran_out_is_the_callers_timeout.py", "tests/test_a_request_and_a_response_are_light.py", "tests/test_a_request_says_what_it_is.py", "tests/test_a_screenshot_refuses_what_would_touch_the_page.py", "tests/test_a_screenshot_sends_its_scale_to_the_engine.py", "tests/test_a_served_browser_keeps_the_udp_verdicts_of_its_proxies.py", "tests/test_a_session_ends_before_the_next_test_starts.py", "tests/test_a_streamed_upload_is_staged_in_the_session.py", "tests/test_a_stroke_is_judged_by_its_shape_not_its_length.py", "tests/test_a_test_that_is_not_e2e_never_leaves_the_machine.py", "tests/test_a_unit_test_does_not_read_the_seal_of_the_job.py", "tests/test_ab_host.py", "tests/test_ab_host_aa_stable.py", "tests/test_ab_network.py", "tests/test_ab_network_turn_credential.py", "tests/test_ab_network_turn_deallocation.py", "tests/test_ab_network_webrtc_evidence.py", "tests/test_ab_oracle.py", "tests/test_ab_oracle_declared_differences.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client.py", "tests/test_an_expect_reads_its_value_once.py", "tests/test_an_expired_popupshown_wait_fails_the_e2e_test_that_launched_the_browser.py", "tests/test_async_api.py", "tests/test_browser_output_is_drained.py", "tests/test_ci_downloads_are_authenticated.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_ci_host_gate.py", "tests/test_ci_host_gate_ab.py", "tests/test_ci_lab_geoip.py", "tests/test_ci_lab_geoip_verify.py", "tests/test_ci_lab_intermediates.py", "tests/test_ci_lab_security_state.py", "tests/test_ci_linux_legs_read_no_mirror.py", "tests/test_ci_poison_host.py", "tests/test_ci_published_set.py", "tests/test_ci_real_geoip_check.py", "tests/test_ci_real_geoip_exit_code.py", "tests/test_ci_runs_once_per_commit.py", "tests/test_ci_suite_run.py", "tests/test_ci_verdict.py", "tests/test_ci_windows_temp_is_on_d.py", "tests/test_ci_workflows_build_the_geoip_database.py", "tests/test_ci_workflows_set_the_intermediates_list.py", "tests/test_ci_workflows_set_the_security_state.py", "tests/test_cli.py", "tests/test_click_rhythm.py", "tests/test_connect_does_not_start_threads_on_the_loop.py", "tests/test_context_locale_is_a_list.py", "tests/test_core_pin.py", "tests/test_cpu_by_type_window.py", "tests/test_cross_origin_iframe.py", "tests/test_cursor_dispatch.py", "tests/test_cursor_wiring.py", "tests/test_docs_name_the_mcp_repo_as_it_is.py", "tests/test_doh_session_prefs_unit.py", "tests/test_drag_motion.py", "tests/test_e2e_hermetic.py", "tests/test_element_handle_actions.py", "tests/test_every_action_is_pinned_by_commit_sha.py", "tests/test_every_argument_reaches_the_page_as_playwright_sends_it.py", "tests/test_every_fixture_a_test_pins_is_checked_out_byte_for_byte.pLine truncated
{"id": "wrapper.e2e.securitystate", "giro": "G2", "os": ["linux", "windows"], "min_tests": 4, "exact": true, "tests": ["tests/test_security_state_engine_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The security state the core declares, against the engine: the engine launched directly in its generate mode makes what it is given (the contract's result, security_state/ with the bytes of the full filter and of the delta, the core's own validation of it); a normal launch declares no pref of the mode and re-imports nothing; a certificate that Mozilla's CRLite test data say is revoked in a delta is refused at the first navigation (SEC_ERROR_REVOKED_CERTIFICATE) while a valid one loads, and the revoked one loads when the ready directory has no data; a ready directory with no or an empty security_state/ starts. Certificates made on the run (a fresh root trusted in cert9.db by the engine's own xpcshell, Mozilla's default test key as the key of CN=int), servers on loopback, no network. Red on firefox-67 (no generate mode).", "core_dumps": "invpw-cores"},
{"id": "wrapper.e2e.suite.linux.1", "giro": "G2", "os": ["linux"], "min_tests": 447, "exact": true, "tests": ["tests/test_a_closed_browser_leaves_the_others_alone_e2e.py", "tests/test_a_context_that_ends_leaves_no_process_e2e.py", "tests/test_a_cors_preflight_is_not_a_request_of_the_page_e2e.py", "tests/test_a_declared_webgl_extension_survives_its_use_e2e.py", "tests/test_a_granted_permission_is_the_one_the_page_asks_for_e2e.py", "tests/test_a_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_launch_without_a_session_gets_one_e2e.py", "tests/test_a_left_documents_body_is_evicted_e2e.py", "tests/test_a_mouse_click_makes_one_mousemove_on_its_point_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py", "tests/test_a_screenshot_honours_its_scale_e2e.py", "tests/test_a_screenshot_refuses_what_would_touch_the_page_e2e.py", "tests/test_a_served_browser_answers_a_plain_client_e2e.py", "tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_accept_language_on_the_wire_e2e.py", "tests/test_browser_output_is_drained.py", "tests/test_click_rhythm.py", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_control_a_selects_all_in_a_field_e2e.py", "tests/test_cross_origin_iframe.py", "tests/test_declared_host_network_e2e.py", "tests/test_detectors_e2e.py", "tests/test_e2e.py", "tests/test_element_handle_actions.py", "tests/test_element_screenshot_e2e.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_file_chooser.py", "tests/test_fingerprint_surface.py", "tests/test_fission_frames_history_and_processes_e2e.py", "tests/test_fission_frames_workers_storage_and_special_frames_e2e.py", "tests/test_frames_outlive_the_back_forward_cache_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_display_linux.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_ignore_https_errors_e2e.py", "tests/test_injected_node_surface.py", "tests/test_juggler_connection.py", "tests/test_juggler_posix_pipe.py", "tests/test_juggler_transport.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_navigation_response.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_oop_frame_element.py", "tests/test_oop_frame_geometry.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pointer_position.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_realness_behind_a_declared_exit_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_header_order_e2e.py", "tests/test_same_document_goto_e2e.py", "tests/test_screencast.py", "tests/test_screencast_stop_e2e.py", "tests/test_screenshot_looks_where_you_are.py", "tests/test_security_state_engine_e2e.py", "tests/test_service_worker.py", "tests/test_service_worker_controller_e2e.py", "tests/test_set_offline_e2e.py", "tests/test_shadow_trusted_input.py", "tests/test_strict_and_force.py", "tests/test_the_callers_code_is_not_counted_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_a_launch_scans_no_process_of_the_machine", "tests/test_the_engine_is_born_in_the_job_e2e.py::test_after_close_no_process_of_the_session_is_left", "tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_trial_does_not_act.py", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_ua_widget_not_selectable.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_webgl_draws_on_the_engine_s_own_gl_e2e.py", "tests/test_webgl_noise_active.py", "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_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "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_relay_never_answers_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_not_blocked_behind_tcp_only_socks", "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_the_turn_over_tcp_of_a_context_goes_throuLine truncated
{"id": "wrapper.e2e.suite.linux.2", "giro": "G2", "os": ["linux"], "min_tests": 463, "exact": true, "tests": ["tests/test_a_click_under_the_login_autocomplete_list_reaches_the_page_e2e.py", "tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py", "tests/test_a_context_init_script_runs_once_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_keepalive_request_reaches_the_client_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_page_cannot_probe_the_juggler_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py", "tests/test_a_press_on_an_open_select_follows_windows_rollup_e2e.py", "tests/test_a_request_says_what_it_is_e2e.py", "tests/test_a_select_dropdown_stays_open_after_the_release_e2e.py", "tests/test_a_worker_comes_back_with_its_page_from_the_cache_e2e.py", "tests/test_actions_without_a_point.py", "tests/test_add_script_tag.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_bypass_csp_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_context_locale_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_download_is_intercepted_e2e.py", "tests/test_drag_motion.py", "tests/test_expose_binding_e2e.py", "tests/test_fakeweb_p4_e2e.py", "tests/test_fingerprint_consistency.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fission_frames_route_and_bindings_e2e.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fission_iframe_crash_e2e.py", "tests/test_fission_strategy1_bench.py", "tests/test_goto_to_the_same_url_e2e.py", "tests/test_http3_through_the_proxy_e2e.py", "tests/test_input_is_born_before_the_page_sees_it_e2e.py", "tests/test_juggler_actions.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py::test_a_javascript_that_THROWS_arrives_as_an_error_not_as_None", "tests/test_juggler_injected.py::test_actionability_DISTINGUISHES_instead_of_always_saying_yes", "tests/test_juggler_injected.py::test_reads_that_make_no_sense_are_REJECTED", "tests/test_juggler_injected.py::test_states_DISCRIMINATE_instead_of_always_saying_true", "tests/test_juggler_injected.py::test_the_DOM_READING_group", "tests/test_juggler_injected.py::test_the_selector_engines_respond", "tests/test_juggler_injected.py::test_the_text_reads", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_keyboard_rhythm.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_mouse_events_keep_their_values_e2e.py", "tests/test_new_page_defaults.py", "tests/test_no_fontconfig_file_of_the_host_is_opened_and_the_screenshot_draws_the_bundle_linux_e2e.py", "tests/test_no_popup_is_left_when_a_page_closes_e2e.py", "tests/test_popup_destinations_e2e.py", "tests/test_popup_pages.py", "tests/test_proxy_http_auth_e2e.py", "tests/test_proxy_reaches_the_browser.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_requestless_navigation.py", "tests/test_route_abort_code.py", "tests/test_route_e2e.py", "tests/test_route_post_data_e2e.py", "tests/test_route_sends_a_navigation_elsewhere_e2e.py", "tests/test_route_superseded_e2e.py", "tests/test_same_document_navigation.py", "tests/test_screenshot_of_text_returns_linux_e2e.py", "tests/test_scroll_into_view.py", "tests/test_scroll_only_if_needed_e2e.py", "tests/test_service_workers_blocked.py", "tests/test_set_input_files_payloads.py", "tests/test_software_compositing_is_declared_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_the_callers_code_runs_once_e2e.py", "tests/test_the_close_returns_when_the_browser_has_exited_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_host_fontconfig_rules_do_not_reach_the_text_pixels_linux_e2e.py", "tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "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_typing_a_character_without_a_key_e2e.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of Line truncated
{"id": "wrapper.e2e.suite.linux.3", "giro": "G2", "os": ["linux"], "min_tests": 396, "exact": true, "tests": ["tests/test_a_click_in_an_iframe_lands_at_the_frames_own_screen_origin_e2e.py", "tests/test_a_context_language_is_the_accept_language_of_every_request_e2e.py", "tests/test_a_file_chooser_reaches_every_client_e2e.py", "tests/test_a_frame_reads_only_declared_origins_while_it_loads_e2e.py", "tests/test_a_goto_to_a_refused_port_ends_with_its_reason_e2e.py", "tests/test_a_handle_action_walks_like_a_selector_action_e2e.py", "tests/test_a_launch_and_a_context_timezone_reach_the_page_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_page_function_called_by_the_client_sees_only_page_frames_e2e.py", "tests/test_a_page_sees_no_pointer_event_before_the_first_input_on_the_hidden_display_e2e.py", "tests/test_a_pages_own_hasinstance_is_never_called_while_the_client_listens_to_console_e2e.py", "tests/test_a_password_field_is_as_wide_as_on_retail_windows_e2e.py", "tests/test_a_popup_moves_and_resizes_as_declared_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_a_popup_reads_the_retail_sizes_of_a_maximized_main_window_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_an_element_handle_serves_every_method_of_the_client_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_audio_noise_e2e.py", "tests/test_audio_sample_rate_is_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_canvas_create_pattern_projection_e2e.py", "tests/test_canvas_measure_text_metrics_e2e.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_dom_iterables_from_evaluate_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_every_reader_of_a_webgl_canvas_agrees_e2e.py", "tests/test_exslt_date_time_through_an_imported_stylesheet_is_in_the_declared_zone_e2e.py", "tests/test_fakeweb_p2_e2e.py", "tests/test_fission_frames_tree_input_and_pixels_e2e.py", "tests/test_focus_survives_os_deactivation_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_geolocation_reads_nothing_of_the_host_windows_e2e.py", "tests/test_goto_and_every_way_it_is_stopped_e2e.py", "tests/test_hardware_values_are_declared_e2e.py", "tests/test_input_reaches_the_top_and_a_frame_of_another_site_at_every_scale_e2e.py", "tests/test_ipv6_literal_connect_e2e.py", "tests/test_moz_element_paints_a_webgl_canvas_as_drawn_e2e.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_nested_frame_actions.py", "tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_page_element_atoms_run_in_a_sandbox_e2e.py", "tests/test_popup_geometry_is_the_declared_frame_e2e.py", "tests/test_script_cache_written_is_adopted_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_host_gl_probe_runs_only_on_an_undeclared_engine_linux_e2e.py", "tests/test_the_launch_counter_is_one_plain_get_before_any_page_e2e.py", "tests/test_the_maximized_window_frames_and_popups_read_retail_e2e.py", "tests/test_the_parent_methods_of_the_window_origin_are_not_exposed_to_a_page_e2e.py", "tests/test_the_shutdown_ping_leaves_by_the_background_task_e2e.py", "tests/test_webgl_declared_parameters_e2e.py", "tests/test_webgl_shader_language_e2e.py", "tests/test_webgpu_adapter_is_declared_e2e.py", "tests/test_webgpu_canvas_readback_is_noised_e2e.py", "tests/test_webgpu_external_texture_e2e.py", "tests/test_window_occlusion_e2e.py"], "marker": "e2e", "needs_root": false, "windows_twin": "wrapper.e2e.suite.windows.3", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 2 rows of linux are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 565 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on linux (a skip is red in the verdict).", "run": "suite_run"},
{"id": "wrapper.e2e.suite.windows.1", "giro": "G2", "os": ["windows"], "min_tests": 332, "exact": true, "tests": ["tests/test_a_click_waits_for_the_navigation_it_plans_e2e.py", "tests/test_a_closed_browser_leaves_the_others_alone_e2e.py", "tests/test_a_context_init_script_runs_once_e2e.py", "tests/test_a_goto_to_a_refused_port_ends_with_its_reason_e2e.py", "tests/test_a_granted_permission_is_the_one_the_page_asks_for_e2e.py", "tests/test_a_held_ice_port_blinds_the_loopback_checks_e2e.py", "tests/test_a_left_documents_body_is_evicted_e2e.py", "tests/test_a_page_cannot_probe_the_juggler_e2e.py", "tests/test_a_screenshot_honours_its_scale_e2e.py", "tests/test_a_screenshot_refuses_what_would_touch_the_page_e2e.py", "tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_worker_comes_back_with_its_page_from_the_cache_e2e.py", "tests/test_browser_output_is_drained.py", "tests/test_canvas_create_pattern_projection_e2e.py", "tests/test_click_rhythm.py", "tests/test_closing_one_of_four_browsers_does_not_hold_the_loop_e2e.py", "tests/test_context_locale_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_detectors_e2e.py", "tests/test_download_is_intercepted_e2e.py", "tests/test_e2e.py", "tests/test_element_handle_actions.py", "tests/test_every_page_draws_its_own_acts.py", "tests/test_every_reader_of_a_webgl_canvas_agrees_e2e.py", "tests/test_fission_identity_parity_e2e.py", "tests/test_fission_iframe_crash_e2e.py", "tests/test_focus_survives_os_deactivation_e2e.py", "tests/test_geolocation_reads_nothing_of_the_host_windows_e2e.py", "tests/test_goto_to_the_same_url_e2e.py", "tests/test_ignore_https_errors_e2e.py", "tests/test_juggler_actions.py", "tests/test_juggler_transport.py", "tests/test_keyboard_rhythm.py", "tests/test_moz_element_paints_a_webgl_canvas_as_drawn_e2e.py", "tests/test_nested_frame_actions.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_route_superseded_e2e.py", "tests/test_scroll_only_if_needed_e2e.py", "tests/test_security_state_engine_e2e.py", "tests/test_service_worker.py", "tests/test_service_workers_blocked.py", "tests/test_strict_and_force.py", "tests/test_the_engine_is_born_in_the_job_e2e.py", "tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_the_shutdown_ping_leaves_by_the_background_task_e2e.py", "tests/test_trial_does_not_act.py", "tests/test_ua_widget_not_selectable.py", "tests/test_webgpu_canvas_readback_is_noised_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "Part 1 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 609 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict).", "runner_image": {"windows": "windows-2022"}, "run": "suite_run"},
{"id": "wrapper.e2e.suite.windows.2", "giro": "G2", "os": ["windows"], "min_tests": 327, "exact": true, "tests": ["tests/test_a_click_under_the_login_autocomplete_list_reaches_the_page_e2e.py", "tests/test_a_file_chooser_reaches_every_client_e2e.py", "tests/test_a_goto_to_a_response_with_no_document_ends_e2e.py", "tests/test_a_latin_letter_on_a_cyrillic_persona_e2e.py", "tests/test_a_navigation_that_moved_is_told_by_the_engine_e2e.py", "tests/test_a_press_on_an_open_select_follows_windows_rollup_e2e.py", "tests/test_a_regional_indicator_pair_measures_the_same_first_and_after_other_families_e2e.py", "tests/test_a_select_dropdown_stays_open_after_the_release_e2e.py", "tests/test_a_turn_name_over_tcp_goes_through_the_proxy_of_the_context_e2e.py", "tests/test_add_script_tag.py", "tests/test_an_element_handle_serves_every_method_of_the_client_e2e.py", "tests/test_an_isolated_page_and_the_next_e2e.py", "tests/test_audio_context_values_are_declared_e2e.py", "tests/test_bundle_font_names_e2e.py", "tests/test_caller_world_handles_e2e.py", "tests/test_canvas_reads_as_drawn.py", "tests/test_canvas_render_stealth.py", "tests/test_css_media_reads_the_declared_screen_and_pointer_e2e.py", "tests/test_declared_host_network_e2e.py", "tests/test_every_argument_reaches_the_page_e2e.py", "tests/test_expose_binding_e2e.py", "tests/test_fission_frames_dialogs_downloads_popups_e2e.py", "tests/test_fullscreen_without_wm_e2e.py", "tests/test_goto_networkidle_after_spa_e2e.py", "tests/test_goto_script_redirect_e2e.py", "tests/test_hidden_desktop.py", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_the_ice_name_of_a_context_goes_by_the_proxy_of_that_context", "tests/test_juggler_lifecycle_e2e.py", "tests/test_key_delay_reaches_the_keyboard.py", "tests/test_long_session_e2e.py", "tests/test_mouse.py", "tests/test_native_line_endings_are_windows_e2e.py", "tests/test_navigation_across_processes_e2e.py", "tests/test_networkidle_reaches_the_client_e2e.py", "tests/test_no_popup_is_left_when_a_page_closes_e2e.py", "tests/test_nothing_leaves_but_the_proxy_e2e.py", "tests/test_nothing_of_a_context_leaves_but_through_its_proxy_e2e.py", "tests/test_oop_frame_geometry.py", "tests/test_proxy_socks_auth_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_route_e2e.py", "tests/test_screencast_stop_e2e.py", "tests/test_the_branding_a_page_loads_is_the_declared_archive_e2e.py", "tests/test_the_device_enumeration_takes_the_declared_time_e2e.py", "tests/test_the_evaluated_code_has_no_debugger_name_e2e.py", "tests/test_the_favicon_stays_out_of_sight_e2e.py", "tests/test_the_font_list_is_the_bundle_e2e.py", "tests/test_the_scheme_is_the_personas_e2e.py", "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_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_voices_e2e.py", "tests/test_wait_for_function.py", "tests/test_wait_for_timeout.py", "tests/test_web_fonts_of_closed_contexts_e2e.py", "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_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "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_relay_never_answers_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_not_blocked_behind_tcp_only_socks", "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_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.2", "note": "Part 2 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 610 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the fLine truncated
{"id": "wrapper.e2e.suite.windows.3", "giro": "G2", "os": ["windows"], "min_tests": 299, "exact": true, "tests": ["tests/test_a_click_in_an_iframe_lands_at_the_frames_own_screen_origin_e2e.py", "tests/test_a_context_that_ends_leaves_no_process_e2e.py", "tests/test_a_cors_preflight_is_not_a_request_of_the_page_e2e.py", "tests/test_a_launch_without_a_session_gets_one_e2e.py", "tests/test_a_mouse_click_makes_one_mousemove_on_its_point_e2e.py", "tests/test_a_page_function_called_by_the_client_sees_only_page_frames_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_a_page_sees_no_pointer_event_before_the_first_input_on_the_hidden_display_e2e.py", "tests/test_a_pages_own_hasinstance_is_never_called_while_the_client_listens_to_console_e2e.py", "tests/test_a_password_field_is_as_wide_as_on_retail_windows_e2e.py", "tests/test_a_served_browser_answers_a_plain_client_e2e.py", "tests/test_actions_without_a_point.py", "tests/test_audio_noise_e2e.py", "tests/test_audio_sample_rate_is_declared_e2e.py", "tests/test_bypass_csp_e2e.py", "tests/test_control_a_selects_all_in_a_field_e2e.py", "tests/test_cross_origin_iframe.py", "tests/test_dom_iterables_from_evaluate_e2e.py", "tests/test_drag_motion.py", "tests/test_element_screenshot_e2e.py", "tests/test_fakeweb_p4_e2e.py", "tests/test_fingerprint_consistency.py", "tests/test_first_launch_from_a_new_path.py", "tests/test_fission_frames_history_and_processes_e2e.py", "tests/test_fission_frames_workers_storage_and_special_frames_e2e.py", "tests/test_fission_strategy1_bench.py", "tests/test_goto_and_every_way_it_is_stopped_e2e.py", "tests/test_http3_through_the_proxy_e2e.py", "tests/test_input_is_born_before_the_page_sees_it_e2e.py", "tests/test_ipv6_literal_connect_e2e.py", "tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_page_number_follows_the_call.py", "tests/test_persistent_profile_keeps_state.py", "tests/test_pointer_position.py", "tests/test_popup_destinations_e2e.py", "tests/test_popup_pages.py", "tests/test_proxy_http_auth_e2e.py", "tests/test_requestless_navigation.py", "tests/test_route_abort_code.py", "tests/test_route_post_data_e2e.py", "tests/test_same_document_navigation.py", "tests/test_screencast.py", "tests/test_screenshot_looks_where_you_are.py", "tests/test_service_worker_controller_e2e.py", "tests/test_set_input_files_payloads.py", "tests/test_set_offline_e2e.py", "tests/test_the_callers_code_is_not_counted_e2e.py", "tests/test_the_callers_code_runs_once_e2e.py", "tests/test_the_close_returns_when_the_browser_has_exited_e2e.py", "tests/test_the_launch_counter_is_one_plain_get_before_any_page_e2e.py", "tests/test_webgl_declared_parameters_e2e.py", "tests/test_webgl_shader_language_e2e.py", "tests/test_webgpu_adapter_is_declared_e2e.py", "tests/test_webgpu_external_texture_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "Part 3 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 610 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict).", "runner_image": {"windows": "windows-2022"}, "run": "suite_run"},
{"id": "wrapper.e2e.suite.windows.4", "giro": "G2", "os": ["windows"], "min_tests": 334, "exact": true, "tests": ["tests/test_a_context_language_is_the_accept_language_of_every_request_e2e.py", "tests/test_a_declared_webgl_extension_survives_its_use_e2e.py", "tests/test_a_drag_keeps_its_buttons_pressed_e2e.py", "tests/test_a_field_is_typed_after_a_pause.py", "tests/test_a_frame_reads_only_declared_origins_while_it_loads_e2e.py", "tests/test_a_handle_action_walks_like_a_selector_action_e2e.py", "tests/test_a_keepalive_request_reaches_the_client_e2e.py", "tests/test_a_launch_and_a_context_timezone_reach_the_page_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_pointer_event_is_handled_before_the_call_returns_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_popup_moves_and_resizes_as_declared_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_a_popup_reads_the_retail_sizes_of_a_maximized_main_window_e2e.py", "tests/test_a_request_says_what_it_is_e2e.py", "tests/test_a_screenshot_draws_the_text_of_the_bundled_fonts_as_the_content_does_e2e.py", "tests/test_accept_language_on_the_wire_e2e.py", "tests/test_canvas_measure_text_metrics_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_exslt_date_time_through_an_imported_stylesheet_is_in_the_declared_zone_e2e.py", "tests/test_fakeweb_p2_e2e.py", "tests/test_file_chooser.py", "tests/test_fingerprint_surface.py", "tests/test_fission_frames_route_and_bindings_e2e.py", "tests/test_fission_frames_tree_input_and_pixels_e2e.py", "tests/test_frames_outlive_the_back_forward_cache_e2e.py", "tests/test_hardware_values_are_declared_e2e.py", "tests/test_injected_node_surface.py", "tests/test_input_reaches_the_top_and_a_frame_of_another_site_at_every_scale_e2e.py", "tests/test_juggler_connection.py", "tests/test_juggler_event_listeners.py", "tests/test_juggler_injected.py::test_a_javascript_that_THROWS_arrives_as_an_error_not_as_None", "tests/test_juggler_injected.py::test_actionability_DISTINGUISHES_instead_of_always_saying_yes", "tests/test_juggler_injected.py::test_reads_that_make_no_sense_are_REJECTED", "tests/test_juggler_injected.py::test_states_DISCRIMINATE_instead_of_always_saying_true", "tests/test_juggler_injected.py::test_the_DOM_READING_group", "tests/test_juggler_injected.py::test_the_selector_engines_respond", "tests/test_juggler_injected.py::test_the_text_reads", "tests/test_mouse_events_keep_their_values_e2e.py", "tests/test_navigation_response.py", "tests/test_new_page_defaults.py", "tests/test_oop_frame_element.py", "tests/test_page_element_atoms_run_in_a_sandbox_e2e.py", "tests/test_popup_geometry_is_the_declared_frame_e2e.py", "tests/test_proxy_reaches_the_browser.py", "tests/test_realness_behind_a_declared_exit_e2e.py", "tests/test_route_header_order_e2e.py", "tests/test_route_sends_a_navigation_elsewhere_e2e.py", "tests/test_same_document_goto_e2e.py", "tests/test_script_cache_written_is_adopted_e2e.py", "tests/test_scroll_into_view.py", "tests/test_shadow_trusted_input.py", "tests/test_software_compositing_is_declared_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_the_maximized_window_frames_and_popups_read_retail_e2e.py", "tests/test_the_parent_methods_of_the_window_origin_are_not_exposed_to_a_page_e2e.py", "tests/test_typing_a_character_without_a_key_e2e.py", "tests/test_webgl_noise_active.py", "tests/test_window_occlusion_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.2", "note": "Part 4 of the whole e2e suite of the wrapper (every test that opens the browser: what e2e.yml runs on the published engine), on the engine under test, as two passes through scripts/ci_suite_run.py (4 browsers at once, then the wall_clock tests alone; no rerun). The files of the 4 rows of windows are the files of tests/ that tests/test_the_e2e_suite_is_accounted_for.py holds one by one: a file whole when every test of it is here, else its tests by name. Partition from the junits of runs 44942540063 and 44985244053, test time balanced (about 609 s of estimated wall time, 4 browsers). A new file is added by hand to a row of each system and the minimum of the row goes up by hand. Left out of every row, with the reason in the accounting test: the files and tests of wrapper.e2e.udp.exit and wrapper.e2e.udp.sandbox (root and user namespaces, their own rows), the files of the round after the publication (tests/_post_publication.py), and the tests that skip on windows (a skip is red in the verdict).", "runner_image": {"windows": "windows-2022"}, "run": "suite_run"},
{"id": "wrapper.e2e.suite.windows.control_a", "giro": "G2", "os": ["windows"], "min_tests": 20, "exact": true, "tests": ["tests/test_control_a_selects_all_in_a_field_e2e.py"], "marker": "e2e", "needs_root": false, "linux_twin": "wrapper.e2e.suite.linux.1", "note": "The keyboard shortcut Control+A selects all in a field (5 ways to press it x an input and a textarea, in-process and served to the stock client), alone on its own Windows runner (windows-latest), as e2e.yml runs it on the published engine: the Windows keyboard of a real user is what it needs. The same file is in one of wrapper.e2e.suite.windows.1..4 and in wrapper.e2e.suite.linux.1.", "run": "suite_run"},
{"id": "wrapper.e2e.ab_oracle", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_oracle_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Same seed, same bytes: the engine of the published set (the last published engine, with its own core and wrapper) against the candidate (with core_ref and wrapper_ref), on one machine, after the control: the published engine against ITSELF (the A/A; a difference is a broken control, exit 2, and the A/B is not run). On a pull request (no candidate: INVPW_BINARY_PATH is the published engine, no INVISIBLE_SEAL_FILE) the A/A is the whole test, on the first two seeds of the candidate set (all five when the pull request changes a file of this oracle: the step of e2e.yml that runs scripts/ci_ab_pr_seeds.py exports AB_ORACLE_PR_SEEDS), and saves both dumps and the diff under $AB_ORACLE_OUT or $RUNNER_TEMP/invpw-evidence/ab-oracle. scripts/ci_ab_oracle.py runs the host gate's dump (scripts/ci_host_gate.py dump: the persona seeds of ci/persona-seeds.json, each at its own DPR with nothing pinned, the whole page of scripts/host_gate; the `candidate` set of 5 seeds that reach every webgl renderer and every DPR, or with AB_ORACLE_SEED_SET=final and AB_ORACLE_SHARD=i/n the 20 seeds that reach every value of every dimension split over n jobs) twice, once with the published engine (fetched by the published set's own core under its own seal, which checks the archive's sha256, and dumped in that set's venv) and once with the candidate binary of the leg under its own seal, and compares every leaf of every visit: the only differences allowed are the `noise` entries of scripts/host_gate/exceptions.json and the diag. keys; anything else is red with the leaf, the two values and the seed; fewer leaves than the host gate's reference holds (16439 per visit; a DPR the reference does not record is held to the least of those it does) is red. The files (dump-<N>.json, dump-<N>-again.json for the tag of the published set, diff-a-a.json and, with a candidate, dump-candidate.json and diff.json) are the artifact ab-oracle-<os> of the leg. 1 = the one test; the comparator's own cases (51, the A/A's among them) are in tests/test_ab_oracle.py, the persona seeds' (15) in tests/test_persona_cover.py, in the rows of the whole unit suite. Needs the engine's binary (INVPW_BINARY_PATH) and, for the A/B, the candidate's seal (INVISIBLE_SEAL_FILE) and the network (the release assets of the published engine, and INVPW_PUBLISHED_PYTHON). Each engine runs with the core it was built for: a core that declares less than the published engine requires is no longer a red of this suite (it was: engine candidate 5, every A/B a broken control). THE CONTROL IS THE PUBLISHED SET, as a user installs it: the last invisible-playwright on the index, the invisible-core it pins exactly and the engine that core's seal pins, in a venv of their own (ci/py-lock/published.txt, installed by hash from the run's wheelhouse; scripts/ci_published_set.py; INVPW_PUBLISHED_PYTHON is its python). The candidate's side is the candidate engine with core_ref and wrapper_ref. No tag is written in a harness file.", "timeout_minutes": 50, "core_dumps": "cores", "extra_steps": ["keep_oracle_files"], "artifact": "ab-oracle"},
{"id": "wrapper.e2e.ab_network", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_network_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Network A/B oracle: the P4 journey, HTTPS h1/h2 (ClientHello, h2 frames, header order), HTTP/3 (transport parameters, H3 SETTINGS), WebRTC through the coherent SOCKS5 lab gateway, DNS through the fake DoH, and an idle launch; transcripts compared leaf by leaf, direct connections red on either side. A/A first (the published engine twice: a difference is a broken control; ci/ab-network-volatile.json holds the leaves the A/A proved volatile, and may only shrink), then the published engine against the candidate. Without a candidate (a PR's e2e) the A/A alone, on the first seed (all five when the pull request changes a file of this oracle: AB_NETWORK_PR_SEEDS), in jobs of its own in e2e.yml on Linux and on Windows (the shared e2e jobs leave this file out). THE CONTROL IS THE PUBLISHED SET, as a user installs it: the last invisible-playwright on the index, the invisible-core it pins exactly and the engine that core's seal pins, in a venv of their own (ci/py-lock/published.txt, installed by hash from the run's wheelhouse; scripts/ci_published_set.py; INVPW_PUBLISHED_PYTHON is its python). The candidate's side is the candidate engine with core_ref and wrapper_ref. No tag is written in a harness file.", "timeout_minutes": 75, "core_dumps": "cores", "extra_steps": ["keep_oracle_files"]},
{"id": "wrapper.e2e.ab_host", "giro": "G2", "os": ["linux", "windows"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_host_e2e.py"], "marker": "e2e", "needs_root": false, "note": "Host A/B oracle: the whole TRACE of a closed run, from the launch to the exit of the browser, after the same journey. Compared: the processes by kind (the parent, -contentproc type, sandboxingKind, isForBrowser, the helpers by what they ran) with their count, except for the kinds of type tab whose count follows the idle time (only their presence counts), and the host paths the tree touched, judged by one rule (red if and only if a path is in all the measured launches of one engine and in no launch of the other, the long launches included; every other path that differs is listed in not-judged.json, not judged); what is ours (the package, the profile and temp dirs of the launch, the run cache, its own shared memory) leaves the comparison as a class. Linux: strace of the whole tree. Windows: the process-creation audit (event 4688, with the command line) and an ETW file trace of Kernel-File, which need an administrator. It has jobs of its own in e2e.yml on Linux and on Windows (a measurement shares the machine with no other browser), and its footprints keep the lifecycle of the tree (who started and ended when, how) and how the close ended. Each engine run starts with a discarded warm-up launch whose trace is kept and listed apart (what only the warm-up did, with the process that did it); only the tree of the launch is compared (a Windows service's paths are counted by process name and left out), and a path or a kind that differs names the processes to blame. A/A first, then the published engine against the candidate; the one declared difference (Linux glxtest, gone on the 69) is in ci/ab-host-expected.json, applied by kind, a list that may only shrink. There is no list of noise. Without a candidate (a PR e2e) the A/A alone, on the first two seeds (all five when the pull request changes a file of this oracle: AB_HOST_PR_SEEDS). THE CONTROL IS THE PUBLISHED SET, as a user installs it: the last invisible-playwright on the index, the invisible-core it pins exactly and the engine that core's seal pins, in a venv of their own (ci/py-lock/published.txt, installed by hash from the run's wheelhouse; scripts/ci_published_set.py; INVPW_PUBLISHED_PYTHON is its python). The candidate's side is the candidate engine with core_ref and wrapper_ref. No tag is written in a harness file.", "runner_image": {"windows": "windows-2022"}, "timeout_minutes": 50, "core_dumps": "cores", "stock_firefox": ["windows"], "location_service": ["windows"], "extra_steps": ["keep_oracle_files"]},
{"id": "wrapper.e2e.ab_host_crash", "giro": "G2", "os": ["linux"], "min_tests": 1, "exact": true, "tests": ["tests/test_ab_host_crash_linux_e2e.py"], "marker": "e2e", "needs_root": false, "linux_only": "A signal sent to the parent of the browser with os.kill, the core the kernel writes and gdb reads, and the signal line of strace exist on Linux only: Windows has no counterpart of this test. What a Windows launch that did not end with 0 leaves (the `.extra` files and the minidump names, read from the crash folders) is held by the unit tests of the recorder with fake launches, and by every Windows leg of the three oracles, which are red on any parent that does not end with 0.", "note": "The recorder of the host oracle, tested on a launch that dies on purpose: scripts/ci_ab_host.py crash-probe launches the engine once under the oracle's stand-in (strace of the tree, cores enabled, a crash watcher), sends SIGSEGV to the browser's parent with os.kill and closes it as the oracle closes its launches; the test passes when the oracle reports RED (exit 1, `FAIL the parent process exited with code ...: seed N, launch crash`) and the artifact (RUNNER_TEMP/invpw-evidence/ab-host-crash) holds the signal line of the strace log (strace-signals.txt, strace-tail.txt), the core run through gdb (gdb-core.*.txt: `thread apply all bt`, the MOZ_CRASH reason, `info sharedlibrary`), the build ids and what the collectors did not find (said.txt). It fails when the oracle says green for a launch that died, when the evidence is missing and when the probe did not run; the red of the probe does not make the job red. It runs in the job of the host oracle on Linux (e2e-host: strace, gdb and elfutils installed, kernel.core_pattern pointed at INVPW_CORE_DIR), after the A/A, and is left out of the shared e2e job (OWN_JOB_FILES).", "timeout_minutes": 35, "core_dumps": "cores", "extra_steps": ["keep_oracle_files"]}
]
+43
View File
@@ -0,0 +1,43 @@
{
"about": "What retail Firefox on Windows reads on a password field in the page tests/data/password_mask_page.html (the width of 40 x 'a' in Arial 16px, which is 40 times the advance of the mask character), extracted by scripts/extract_retail_password_mask.py. Never edited by hand.",
"capture": {
"folder": "captures/firefox-159.0/windows-server-2025/password-mask/2026-12-02",
"retail_captures_commit": "e81da117a01c8d05b00beb62cd544dc057d40f85",
"run": "https://github.com/oss-invisible/core/actions/runs/46769343558",
"browser": {
"firefox_version": "159.0",
"build_id": "20261022150525",
"installer_sha256": "8776887b79925abbdd407fcdfe257d8382b54e24be52a6466426b95a804d6790",
"firefox_exe_sha256": "d8b5ed82fcd9c0f159dc86dc1c4526ceae981c4d9651f21908b6de90d0a56d85",
"xul_dll_sha256": "fec21f3e7c281c836ff4fb9658bf321857e101750bc4a6280d1b419996ce7e29"
},
"host": {
"runner_image": "windows-2025",
"os_version": "10.0.26100",
"os_ubr": "33828"
}
},
"files": [
{
"path": "result.json",
"sha256": "980ac7f4ee06ffeef80c3aa3ddb594216b30c4b221b43156b1fa39f92153571a"
},
{
"path": "meta.json",
"sha256": "3ecefececdca063d84b48f7bb8905039077356b5c6c46e59e2a7551e1bdaf2ad"
}
],
"page": {
"path": "tests/data/password_mask_page.html",
"sha256": "4b0c454f723392003e75325036effc576627a71f29c8d82cb01033a963e8de2a"
},
"n": 40,
"cases": {
"arial16": {
"password_scrollWidth": 387,
"mask": "U+25CF",
"devicePixelRatio": 1,
"platform": "Win32"
}
}
}
File diff suppressed because it is too large. Load diff
+541
View File
@@ -0,0 +1,541 @@
{
"about": "What retail Firefox reads in a popup opened from a maximized main window, per display case and feature string, extracted by scripts/extract_retail_popup_sizes.py. Never edited by hand.",
"capture": {
"round": "2026-12-01-window-geometry-r12",
"run": "https://github.com/oss-invisible/core/actions/runs/46545487209",
"retail_captures_commit": "ef2250dee8704d3023c36661e39ea9525fe41a04",
"browser": {
"firefox_version": "159.0",
"build_id": "20261022150525",
"installer_sha256": "8776887b79925abbdd407fcdfe257d8382b54e24be52a6466426b95a804d6790"
}
},
"files": [
{
"path": "dpr1/1920x1080/a/raw.json",
"sha256": "1e4413e6e06ff1a8fc49eba8d87cd2c1e3642550bd67242fcd8ebd03777baf6a"
},
{
"path": "dpr1/1920x1080/b/raw.json",
"sha256": "ee2d4d2b60dea8e56450fca62446a5c3135e358b6f47ead030b55eea174a35a8"
},
{
"path": "dpr1.25/1920x1080/a/raw.json",
"sha256": "440d03adc9782905764e34e983c202f816d79059e81f298316e7a0d9d19f29ab"
},
{
"path": "dpr1.25/1920x1080/b/raw.json",
"sha256": "4110bbc9b49f5f5c47b340b4a3e6f91328fe14f10247f888fbb301f9f3ff6f80"
},
{
"path": "dpr1.5/1920x1080/a/raw.json",
"sha256": "69ba9333f235aab0cf6ef86ddf14f076d67e23aec22616b5a95dabd67680a19f"
},
{
"path": "dpr1.5/1920x1080/b/raw.json",
"sha256": "ac9200c9ed122b35ba448149f08e2a560b868e80e20fa92fc2864a3b3856a1f3"
},
{
"path": "dpr2/1600x1200/a/raw.json",
"sha256": "947921aac122dd18dab3227b83b47146a9016ac5591adaa956a6bd11d9c3aa64"
},
{
"path": "dpr2/1600x1200/b/raw.json",
"sha256": "7566628ff7822d7de6d9233cb4d2e94e3d129fd79df6920dd39cee3c96c07dac"
}
],
"csv_checked": {
"path": "WINDOW_GEOMETRY_POPUP_FRAME.csv",
"sha256": "205b2f62aa4d721967a011738fefb505e6a09bfc79e014d2479010756ed2ea77"
},
"cases": {
"1920x1080-dpr1.0": {
"width=500,height=400": {
"inner": [
500,
400
],
"outer": [
516,
480
],
"screen": [
4,
4
],
"vv_height": 400
},
"popup": {
"inner": [
1920,
968
],
"outer": [
1936,
1048
],
"screen": [
-8,
-8
],
"vv_height": 968
},
"width=500": {
"inner": [
500,
856
],
"outer": [
516,
936
],
"screen": [
4,
4
],
"vv_height": 856
},
"height=400": {
"inner": [
1280,
400
],
"outer": [
1296,
480
],
"screen": [
4,
4
],
"vv_height": 400
},
"width=300,height=200": {
"inner": [
300,
200
],
"outer": [
316,
280
],
"screen": [
4,
4
],
"vv_height": 200
},
"width=800,height=600": {
"inner": [
800,
600
],
"outer": [
816,
680
],
"screen": [
4,
4
],
"vv_height": 600
},
"left=100,top=100": {
"inner": [
1280,
856
],
"outer": [
1296,
936
],
"screen": [
100,
96
],
"vv_height": 856
},
"left=5000,top=5000": {
"inner": [
1280,
856
],
"outer": [
1296,
936
],
"screen": [
624,
96
],
"vv_height": 856
}
},
"1920x1080-dpr1.25": {
"width=500,height=400": {
"inner": [
500,
400
],
"outer": [
514,
478
],
"screen": [
3,
3
],
"vv_height": 400
},
"popup": {
"inner": [
1536,
752
],
"outer": [
1550,
830
],
"screen": [
-7,
-7
],
"vv_height": 752
},
"width=500": {
"inner": [
500,
662
],
"outer": [
514,
741
],
"screen": [
3,
3
],
"vv_height": 662.4000244140625
},
"height=400": {
"inner": [
1280,
401
],
"outer": [
1294,
479
],
"screen": [
3,
3
],
"vv_height": 400.79998779296875
},
"width=300,height=200": {
"inner": [
300,
200
],
"outer": [
314,
278
],
"screen": [
3,
3
],
"vv_height": 200
},
"width=800,height=600": {
"inner": [
800,
600
],
"outer": [
814,
678
],
"screen": [
3,
3
],
"vv_height": 600
},
"left=100,top=100": {
"inner": [
1280,
662
],
"outer": [
1294,
741
],
"screen": [
100,
75
],
"vv_height": 662.4000244140625
},
"left=5000,top=5000": {
"inner": [
1280,
662
],
"outer": [
1294,
741
],
"screen": [
242,
75
],
"vv_height": 662.4000244140625
}
},
"1920x1080-dpr1.5": {
"width=500,height=400": {
"inner": [
500,
400
],
"outer": [
515,
478
],
"screen": [
3,
3
],
"vv_height": 400
},
"popup": {
"inner": [
1280,
609
],
"outer": [
1295,
687
],
"screen": [
-7,
-7
],
"vv_height": 608.6666870117188
},
"width=500": {
"inner": [
501,
533
],
"outer": [
515,
611
],
"screen": [
3,
3
],
"vv_height": 533.3333129882812
},
"height=400": {
"inner": [
1153,
400
],
"outer": [
1168,
478
],
"screen": [
3,
3
],
"vv_height": 400
},
"width=300,height=200": {
"inner": [
300,
200
],
"outer": [
315,
278
],
"screen": [
3,
3
],
"vv_height": 200
},
"width=800,height=600": {
"inner": [
800,
594
],
"outer": [
815,
672
],
"screen": [
3,
0
],
"vv_height": 594
},
"left=100,top=100": {
"inner": [
1153,
533
],
"outer": [
1168,
611
],
"screen": [
100,
61
],
"vv_height": 533.3333129882812
},
"left=5000,top=5000": {
"inner": [
1153,
533
],
"outer": [
1168,
611
],
"screen": [
112,
61
],
"vv_height": 533.3333129882812
}
},
"1600x1200-dpr2.0": {
"width=500,height=400": {
"inner": [
500,
400
],
"outer": [
513,
476
],
"screen": [
2,
2
],
"vv_height": 399.5
},
"popup": {
"inner": [
800,
489
],
"outer": [
813,
565
],
"screen": [
-6,
-6
],
"vv_height": 488.5
},
"width=500": {
"inner": [
500,
428
],
"outer": [
513,
504
],
"screen": [
2,
2
],
"vv_height": 427.5
},
"height=400": {
"inner": [
720,
400
],
"outer": [
733,
476
],
"screen": [
2,
2
],
"vv_height": 399.5
},
"width=300,height=200": {
"inner": [
300,
200
],
"outer": [
313,
276
],
"screen": [
2,
2
],
"vv_height": 199.5
},
"width=800,height=600": {
"inner": [
787,
476
],
"outer": [
800,
552
],
"screen": [
0,
0
],
"vv_height": 475.5
},
"left=100,top=100": {
"inner": [
720,
428
],
"outer": [
733,
504
],
"screen": [
67,
48
],
"vv_height": 427.5
},
"left=5000,top=5000": {
"inner": [
720,
428
],
"outer": [
733,
504
],
"screen": [
67,
48
],
"vv_height": 427.5
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
[
{"file": "tests/test_css_calc_is_windows_e2e.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 1, "wrapper.unit.all.windows": 1}},
{"file": "tests/test_math_sin_cos_tan_are_windows_e2e.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 1, "wrapper.unit.all.windows": 1}},
{"file": "tests/test_system_fonts_and_colors_are_windows_e2e.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 1, "wrapper.unit.all.windows": 1}},
{"file": "tests/test_webgl_dot_has_the_declared_gpu_s_bits_e2e.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 3, "wrapper.unit.all.windows": 3}},
{"file": "tests/unit/test_canvas_icc_refs.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 9, "wrapper.unit.all.windows": 9}},
{"file": "tests/unit/test_canvas_text_colors_refs.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 8, "wrapper.unit.all.windows": 8}},
{"file": "tests/unit/test_canvas_text_refs.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 7, "wrapper.unit.all.windows": 7}},
{"file": "tests/unit/test_compare_canvas_text_runs.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 3, "wrapper.unit.all.windows": 3}},
{"file": "tests/unit/test_fontconfig_criterion.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 5, "wrapper.unit.all.windows": 5}},
{"file": "tests/unit/test_theme_refusal_drop.py", "reason": "feature cancelled with the 69 backlog (21/11)", "date": "2026-11-21", "tests": {"wrapper.unit.all.linux": 3, "wrapper.unit.all.windows": 3}},
{"nodeid": "tests/test_detectors_e2e.py::test_the_headless_detector_sees_no_headless_and_no_proxy_tell", "suite": "wrapper.e2e.suite.linux.1", "count": 1, "from_min_tests": 449, "reason": "removed with the vendored bundle whose licence notice cannot ship without a studied system's name (pm, 27/11)", "decided_by": "pm", "date": "2026-11-27"},
{"nodeid": "tests/test_realness_behind_a_declared_exit_e2e.py::test_the_vendored_detection_page_finds_nothing_behind_the_gateway", "suite": "wrapper.e2e.suite.linux.1", "count": 1, "from_min_tests": 449, "reason": "removed with the vendored bundle whose licence notice cannot ship without a studied system's name (pm, 27/11)", "decided_by": "pm", "date": "2026-11-27"},
{"nodeid": "tests/test_detectors_e2e.py::test_the_headless_detector_sees_no_headless_and_no_proxy_tell", "suite": "wrapper.e2e.suite.windows.1", "count": 1, "from_min_tests": 333, "reason": "removed with the vendored bundle whose licence notice cannot ship without a studied system's name (pm, 27/11)", "decided_by": "pm", "date": "2026-11-27"},
{"nodeid": "tests/test_realness_behind_a_declared_exit_e2e.py::test_the_vendored_detection_page_finds_nothing_behind_the_gateway", "suite": "wrapper.e2e.suite.windows.4", "count": 1, "from_min_tests": 274, "reason": "removed with the vendored bundle whose licence notice cannot ship without a studied system's name (pm, 27/11)", "decided_by": "pm", "date": "2026-11-27"},
{"nodeid": "tests/test_realness_behind_a_declared_exit_e2e.py::test_the_vendored_detection_page_finds_nothing_behind_the_gateway", "suite": "wrapper.e2e.realness", "count": 1, "from_min_tests": 32, "reason": "removed with the vendored bundle whose licence notice cannot ship without a studied system's name (pm, 27/11)", "decided_by": "pm", "date": "2026-11-27"}
]
+6
View File
@@ -0,0 +1,6 @@
{
"comment": "The ready security state every job of ci.yml launches with (STEALTHFOX_SECURITY_STATE, set at the top of the workflow): a result with NO data (format 1, ok, no CRLite hashes, zero timestamps, no engine) and no security_state/ directory, so a launch copies nothing and no job asks Mozilla for anything or runs the engine's generate mode (the core neither downloads nor generates when the variable is set). To change it, change ci/security-state/securitystate-result.json and sha256 here in one commit; tests/test_ci_sets_the_security_state.py fails when they differ.",
"file": "ci/security-state/securitystate-result.json",
"sha256": "15bed64b8d0d0db9e6e5cceeec231bbca5300cdc6715280a647895dd6f6f14a4",
"bytes": 260
}
@@ -0,0 +1 @@
{"format":1,"ok":true,"error":null,"engine":{"version":"","build_id":""},"collections":{"intermediates":{"collection_timestamp":0},"onecrl":{"collection_timestamp":0},"cert-revocations":{"collection_timestamp":0,"channel":"default"}},"crlite_filter_hashes":[]}
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "invisible_playwright"
version = "0.57.1"
version = "0.61.0"
description = "Playwright wrapper for a patched Firefox with deterministic stealth profile."
readme = "README.md"
requires-python = ">=3.11"
@@ -69,7 +69,7 @@ dependencies = [
# metadata; nothing in src/ hardcodes a second copy (tests/test_core_pin.py
# fails if one appears). What stays invisible to install-time machinery is the
# --no-deps / lockfile residue, and _pin.py is the only layer that sees it.
"invisible_core==67.79.0",
"invisible_core==71.85.0",
# ⛔ playwright is NO LONGER a dependency: since the full fork, the Python
# client lives in src/invisible_playwright/_pw/ and its server in
# src/invisible_playwright/_juggler/ (no Node driver). Reintroducing it would not visibly
-172
View File
@@ -1,172 +0,0 @@
"""Builds tests/data/canvas_icc_ref/refs.json, the reference of the canvas ICC readback test.
One measurement of retail Firefox 159.0 on Windows with the default prefs (the run
``a_win_default``: qcms converts a tagged image to the monitor profile, here the stock
"sRGB Color Space Profile.icm"), and one control run on the same machine with
gfx.color_management.force_srgb=true (``b_win_force_srgb``: the bytes without that
conversion), both made by index.html and the images of gen_images.py:
python -I scripts/build_canvas_icc_refs.py <a_win_default.json> <b_win_force_srgb.json> \
--repeat <a2_win_default_repeat.json> --host-profile <host_display_profile.json> \
--source <name of the capture> [--out tests/data/canvas_icc_ref/refs.json]
The script stops if the repeat run has other hashes than the reference run, if the runs
were not made on the same Firefox build, or if the prefs of the two runs are not the default
and force_srgb=true. The probes are the 72 of the page: for each of the 10 images drawImage,
drawImage at 32 px, createImageBitmap with the default colour space conversion and with
``none``; the 22 fill colours; the canvas colorSpace probe; the 9 environment values.
Standard library only: it does not import invisible_core, and the repository holds no PNG
and no run's pixel hex, only hashes and sizes.
"""
from __future__ import annotations
import argparse
import hashlib
import importlib.util
import json
import sys
from pathlib import Path
DEFAULT_OUT = Path(__file__).resolve().parents[1] / "tests" / "data" / "canvas_icc_ref" / "refs.json"
IMAGE_PROBES = ("drawImage", "drawImage_scaled32", "bitmap_default", "bitmap_none")
#: Value probes that are not colour management: the host's theme, which the retail machine
#: had dark; the test does not compare it (the persona's colour scheme is checked elsewhere).
NOT_COMPARED = ("env | prefers-color-scheme:dark",)
GEN_IMAGES = DEFAULT_OUT.parent / "gen_images.py"
def image_files():
"""{image id: {file, bytes, sha256}} of the ten images gen_images.py writes: the reference
names them, so a generator that drifts is seen before the engine is blamed."""
spec = importlib.util.spec_from_file_location("gen_images", GEN_IMAGES)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
imgs, _profiles = mod.build_images()
return {iid: {"file": "images/%s.%s" % (iid, ext), "bytes": len(data),
"sha256": hashlib.sha256(data).hexdigest()}
for iid, ext, data, _what in imgs}
class RefError(ValueError):
"""The runs cannot be one reference."""
def env_sha256(value):
"""The hash of an environment value: SHA-256 of its compact JSON (as JSON.stringify)."""
return hashlib.sha256(json.dumps(value, separators=(",", ":")).encode()).hexdigest()
def probes(R):
"""{probe name: {kind, sha256, bytes (pixel probes), value (env)}} of a page result R
(``window.R`` of index.html). ``bytes`` is the RGBA length: 4 x width x height."""
out = {}
for iid, v in R["images"].items():
for k in IMAGE_PROBES:
e = v.get(k)
if not isinstance(e, dict) or "sha256" not in e:
raise RefError("image %s probe %s has no hash: %r" % (iid, k, e))
size = 32 if k == "drawImage_scaled32" else 16
out["%s | %s" % (iid, k)] = {"kind": "image", "sha256": e["sha256"],
"bytes": 4 * size * size}
for f, v in R["fills"].items():
if "sha256" not in v:
raise RefError("fill %s has no hash: %r" % (f, v))
out["fill | " + f] = {"kind": "fill", "sha256": v["sha256"], "bytes": 4 * 16 * 16}
p3 = R["canvas_colorspace"].get("p3_fill_p3_canvas") or {}
if "sha256" not in p3:
raise RefError("the canvas colorSpace probe has no hash")
out["canvas colorSpace p3 fill"] = {"kind": "colorspace", "sha256": p3["sha256"],
"bytes": 4 * 16 * 16}
for k, v in R["env"].items():
out["env | " + k] = {"kind": "env", "sha256": env_sha256(v), "value": v}
return out
def build(a, b, repeat, host_profile, source):
"""The reference from the default run ``a``, the control run ``b`` (force_srgb), the
repeat of ``a`` and the host profile description; all as loaded JSON."""
for key in ("buildid", "exe_sha256", "version", "os"):
if a["firefox"][key] != b["firefox"][key] or a["firefox"][key] != repeat["firefox"][key]:
raise RefError("the runs differ in the Firefox %s" % key)
pa, pb, pr = probes(a["R"]), probes(b["R"]), probes(repeat["R"])
if pa != pr:
bad = sorted(k for k in pa if pa[k] != pr.get(k))
raise RefError("the repeat run differs from the reference run on %d probes: %s"
% (len(bad), ", ".join(bad[:5])))
if set(pa) != set(pb):
raise RefError("the control run has other probes than the reference run")
prefs_a, prefs_b = a["prefs_read_back"], b["prefs_read_back"]
if prefs_a.get("gfx.color_management.display_profile") not in ("", None):
raise RefError("the reference run has a display_profile pref: it must read the host's")
if prefs_a.get("gfx.color_management.force_srgb") is not False:
raise RefError("the reference run is not made with the default force_srgb (false)")
if prefs_b.get("gfx.color_management.force_srgb") is not True:
raise RefError("the control run is not made with force_srgb=true")
for k, v in prefs_a.items():
if k != "gfx.color_management.force_srgb" and prefs_b.get(k) != v:
raise RefError("the control run differs in %s" % k)
out = {}
dependent = []
for name, p in pa.items():
e = dict(p)
if pb[name]["sha256"] != p["sha256"]:
e["without_conversion_sha256"] = pb[name]["sha256"]
dependent.append(name)
if name in NOT_COMPARED:
e["compared"] = False
out[name] = e
return {
"test_page": "index.html",
"image_generator": "gen_images.py",
"source": {
"capture": source,
"reference_run": "runs/a_win_default.json",
"repeat_run": "runs/a2_win_default_repeat.json (same hashes on all probes)",
"control_run": "runs/b_win_force_srgb.json (gfx.color_management.force_srgb=true)",
"date": "2026-11-09",
},
"firefox": {**a["firefox"], "prefs": prefs_a},
"display_profile": {"file": host_profile["file"], "size": host_profile["size"],
"sha256": host_profile["sha256"], "api": "GetICMProfileW"},
"images": image_files(),
"probe_count": len(out),
"profile_dependent_count": len(dependent),
"profile_dependent": sorted(dependent),
"probes": out,
}
def main(argv):
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("reference", help="run json of the retail default run (a_win_default)")
ap.add_argument("control", help="run json of the force_srgb run (b_win_force_srgb)")
ap.add_argument("--repeat", required=True, help="run json of the repeat of the default run")
ap.add_argument("--host-profile", required=True, help="host_display_profile.json")
ap.add_argument("--source", default="canvas-color/canvas-color-icc-readback",
help="name of the capture the runs come from")
ap.add_argument("--out", default=str(DEFAULT_OUT))
a = ap.parse_args(argv[1:])
def load(p):
return json.loads(Path(p).read_text(encoding="utf-8"))
try:
refs = build(load(a.reference), load(a.control), load(a.repeat),
load(a.host_profile), a.source)
except RefError as e:
print("error: %s" % e, file=sys.stderr)
return 1
Path(a.out).write_text(json.dumps(refs, ensure_ascii=False, indent=1) + "\n",
encoding="utf-8")
print("%d probes (%d depend on the display profile) -> %s"
% (refs["probe_count"], refs["profile_dependent_count"], a.out))
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
-184
View File
@@ -1,184 +0,0 @@
"""Builds tests/data/canvas_text_ref_colors/refs.json from the bytes retail Firefox drew.
The reference of tests/test_canvas_text_colors_and_cleartype_is_windows_e2e.py: coloured
canvas text, and 39 cases (25 of black text on white, 14 coloured) under three ClearType
keys, all measured on retail Firefox 159.0 on Windows with tests/data/canvas_text_ref_colors/
index.html (the 14 coloured cases) and tests/data/canvas_text_ref/index.html (the 25 black
ones). The measuring harness saved, for every case, the RGBA bytes of the canvas
(<name>.rgba) and a <name>.json with its id, width, height and sha256:
<BYTES>/colors/retail/<name>.{json,rgba} the 14 coloured cases, retail's own
ClearType state (the seed's)
<BYTES>/keys/<gamma>_<contrast>/retail/<name>.{json,rgba}
the 39 cases under that key; the case
id of a coloured one is "color:<id>"
python -I scripts/build_canvas_text_colors_refs.py --bytes <BYTES> \
[--keys 1800_100,1400_50,2200_0] [--out tests/data/canvas_text_ref_colors/refs.json]
The repository holds no .rgba: they are 270 kB each. The script hashes an .rgba when the
directory has it (and stops if that is not the sha256 its .json says, or the size is not
width x height x 4); when only the .json is there (a byte file kept only where the engine
differed) it takes the hash the harness wrote. It stops too when the black cases under
1800/100 are not the ones tests/data/canvas_text_ref/refs.json holds for the same ids, or
when the coloured cases under 1800/100 differ from the ones of colors/retail (same machine,
same key: they are one measurement). Standard library only.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import re
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
DATA = ROOT / "tests" / "data" / "canvas_text_ref_colors"
BASE_REFS = ROOT / "tests" / "data" / "canvas_text_ref" / "refs.json"
DEFAULT_KEYS = "1800_100,1400_50,2200_0"
SEED_KEY = "1800_100"
DATE = "2026-11-09"
#: The prefs of the retail profile for the keys (user.js), gamma and contrast per key.
RETAIL_PREFS = {
"gfx.canvas.accelerated": False,
"gfx.font_rendering.cleartype_params.gamma": "<gamma>",
"gfx.font_rendering.cleartype_params.enhanced_contrast": "<contrast>",
"gfx.font_rendering.cleartype_params.cleartype_level": 100,
"gfx.font_rendering.cleartype_params.pixel_structure": 1,
"gfx.font_rendering.cleartype_params.rendering_mode": 0,
}
#: The coloured cases of colors/retail were measured with the machine's own ClearType prefs,
#: and gfx.canvas.accelerated off.
COLORS_RETAIL_PREFS = {"gfx.canvas.accelerated": False}
class BuildError(ValueError):
"""The saved bytes cannot be this reference."""
def colors_of_page(html):
"""[[name, fg, bg], ...] and [sizes] from the measuring page, as the page declares them."""
m = re.search(r"const COLORS = (\[\[.*?\]\]);", html, re.S)
s = re.search(r"const SIZES = (\[[^\]]*\]);", html)
if not m or not s:
raise BuildError("index.html declares no COLORS / SIZES")
return json.loads(m.group(1)), json.loads(s.group(1))
def read_dir(d):
"""{case id: {"width", "height", "sha256"}} of the .json files of one directory."""
d = Path(d)
if not d.is_dir():
raise BuildError("%s is not a directory" % d)
out = {}
for j in sorted(d.glob("*.json")):
m = json.loads(j.read_text(encoding="utf-8"))
sha, w, h = m["sha256"], int(m["w"]), int(m["h"])
rgba = j.with_suffix(".rgba")
if rgba.is_file():
data = rgba.read_bytes()
if len(data) != w * h * 4:
raise BuildError("%s: %d bytes, not %d x %d x 4" % (rgba, len(data), w, h))
got = hashlib.sha256(data).hexdigest()
if got != sha:
raise BuildError("%s: sha256 %s, its json says %s" % (rgba, got, sha))
if not re.fullmatch(r"[0-9a-f]{64}", sha):
raise BuildError("%s: sha256 %r is not 64 hex digits" % (j, sha))
if m["id"] in out:
raise BuildError("%s: case %r twice in %s" % (j.name, m["id"], d))
out[m["id"]] = {"width": w, "height": h, "sha256": sha}
return out
def build(bytes_dir, keys, page_html, base):
colors, sizes = colors_of_page(page_html)
color_ids = ["%s|%s" % (c[0], s) for c in colors for s in sizes]
bytes_dir = Path(bytes_dir)
seed = read_dir(bytes_dir / "colors" / "retail")
if sorted(seed) != sorted(color_ids):
raise BuildError("colors/retail has %s, the page draws %s" % (sorted(seed), sorted(color_ids)))
spec = {"%s|%s" % (c[0], s): {"name": c[0], "fg": c[1], "bg": c[2], "size": s}
for c in colors for s in sizes}
out_colors = {i: {"id": i, **spec[i], **seed[i]} for i in color_ids}
out_keys = {}
for tag in keys:
gamma, contrast = (int(x) for x in tag.split("_"))
cases = read_dir(bytes_dir / "keys" / tag / "retail")
black = {i: v for i, v in cases.items() if not i.startswith("color:")}
col = {i[len("color:"):]: v for i, v in cases.items() if i.startswith("color:")}
if sorted(col) != sorted(color_ids):
raise BuildError("key %s: coloured cases %s, the page draws %s"
% (tag, sorted(col), sorted(color_ids)))
for i in black:
if i not in base["cases"]:
raise BuildError("key %s: %r is not a case of canvas_text_ref" % (tag, i))
out_keys[tag] = {
"gamma": gamma, "contrast": contrast, "count": len(black) + len(col),
"black": {i: {"id": i, **black[i]} for i in sorted(black)},
"colors": {i: {"id": i, **col[i]} for i in color_ids},
}
if SEED_KEY in out_keys:
k = out_keys[SEED_KEY]
for i, v in k["black"].items():
if v["sha256"] != base["cases"][i]["sha256"]:
raise BuildError("%s under %s: %s, canvas_text_ref/refs.json has %s"
% (i, SEED_KEY, v["sha256"], base["cases"][i]["sha256"]))
for i, v in k["colors"].items():
if v["sha256"] != out_colors[i]["sha256"]:
raise BuildError("%s under %s differs from colors/retail: %s vs %s"
% (i, SEED_KEY, v["sha256"], out_colors[i]["sha256"]))
arial = [f for f in base["fonts"] if f["family"] == "Arial"]
if len(arial) != 1:
raise BuildError("canvas_text_ref/refs.json has no single Arial entry")
return {
"test_page": "index.html",
"black_page": "../canvas_text_ref/index.html",
"text": base["text"],
"firefox": base["firefox"],
"canvas": base["canvas"],
"cleartype": base["cleartype"],
"fonts": arial,
"capture": {
"date": DATE,
"origin": "retail Firefox 159.0 (build %s, firefox.exe sha256 %s) on Windows, "
"headless, canvases read back with getImageData; bytes saved by the "
"measuring harness: colors/retail (the 14 coloured cases) and "
"keys/<gamma>_<contrast>/retail (39 cases per key) of the win-asset "
"analysis of 2026-11-09"
% (base["firefox"]["buildid"], base["firefox"]["exe_sha256"]),
"colors_prefs": COLORS_RETAIL_PREFS,
"keys_prefs": RETAIL_PREFS,
},
"colors": {"count": len(out_colors), "cases": out_colors},
"keys": out_keys,
}
def main(argv):
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("--bytes", required=True, metavar="DIR",
help="directory with colors/retail and keys/<gamma>_<contrast>/retail")
ap.add_argument("--keys", default=DEFAULT_KEYS,
help="ClearType keys, gamma_contrast, comma separated (default %(default)s)")
ap.add_argument("--out", default=str(DATA / "refs.json"))
a = ap.parse_args(argv[1:])
keys = [k for k in a.keys.split(",") if k]
try:
refs = build(a.bytes, keys, (DATA / "index.html").read_text(encoding="utf-8"),
json.loads(BASE_REFS.read_text(encoding="utf-8")))
except (BuildError, KeyError, ValueError) as e:
print("error: %s" % e, file=sys.stderr)
return 1
Path(a.out).write_text(json.dumps(refs, ensure_ascii=False, indent=1) + "\n",
encoding="utf-8", newline="\n")
print("%d coloured cases, %d keys x %d cases -> %s"
% (refs["colors"]["count"], len(refs["keys"]),
next(iter(refs["keys"].values()))["count"], a.out))
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
-106
View File
@@ -1,106 +0,0 @@
"""Builds tests/data/canvas_text_ref/refs.json, the one reference of the canvas text test.
Two measurements of retail Firefox 159.0 on Windows, made with the same page code, the same
bundled font files and the same machine, are merged by case id:
python -I scripts/build_canvas_text_refs.py <canvas_ref_bundle/refs.json> \
<canvas_ref_ext/refs.json> [--out tests/data/canvas_text_ref/refs.json]
The bundle file has the base cases (no ``gruppo`` field: they become group ``0_base``), the
extension file has the cases of the other groups. A case id that is in both files is kept
once, with the extension's group; the script stops if the two hashes of such a case differ,
or if the two files were not measured on the same Firefox build, with the same ClearType
state and the same font files. Fields that name a file of the measuring machine (the PNG
paths) are dropped: the repository holds no PNG and no font.
"""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
BASE_GROUP = "0_base"
DEFAULT_OUT = Path(__file__).resolve().parents[1] / "tests" / "data" / "canvas_text_ref" / "refs.json"
_DROP = ("png",)
class MergeError(ValueError):
"""The two measurements cannot be one reference."""
def _case(case, group):
out = {k: v for k, v in case.items() if k not in _DROP}
out.setdefault("alpha", True)
out.setdefault("stretch", "normal")
out.setdefault("text", "TEXT")
out["gruppo"] = group
return out
def merge(bundle, ext):
"""One reference from the bundle measurement and the extension measurement."""
for key in ("firefox", "canvas", "cleartype", "text"):
if bundle[key] != ext[key]:
raise MergeError("the two measurements differ in %r: %r vs %r"
% (key, bundle[key], ext[key]))
ext_fonts = {f["bundle_file"]: f for f in ext["fonts"]}
for f in bundle["fonts"]:
other = ext_fonts.get(f["bundle_file"])
if other is None or other["sha256"] != f["sha256"]:
raise MergeError("font %s is not the same file in the two measurements"
% f["bundle_file"])
cases = {}
for cid, c in bundle["cases"].items():
cases[cid] = _case(c, c.get("gruppo") or BASE_GROUP)
for cid, c in ext["cases"].items():
if not c.get("gruppo"):
raise MergeError("extension case %r has no group" % cid)
if cid in cases and cases[cid]["sha256"] != c["sha256"]:
raise MergeError("case %r has two different hashes: %s and %s"
% (cid, cases[cid]["sha256"], c["sha256"]))
cases[cid] = _case(c, c["gruppo"])
groups = {}
for c in cases.values():
groups[c["gruppo"]] = groups.get(c["gruppo"], 0) + 1
status = {**bundle.get("font_load_status", {}), **ext.get("font_load_status", {})}
return {
"test_page": "index.html",
"font_source": "bundle",
"text": bundle["text"],
"firefox": bundle["firefox"],
"canvas": bundle["canvas"],
"cleartype": bundle["cleartype"],
"fonts": ext["fonts"],
"font_load_status": status,
"case_count": len(cases),
"groups": dict(sorted(groups.items())),
"cases": cases,
}
def main(argv):
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("bundle", help="refs.json of the base measurement (canvas_ref_bundle)")
ap.add_argument("ext", help="refs.json of the extension measurement (canvas_ref_ext)")
ap.add_argument("--out", default=str(DEFAULT_OUT))
a = ap.parse_args(argv[1:])
load = lambda p: json.loads(Path(p).read_text(encoding="utf-8"))
try:
refs = merge(load(a.bundle), load(a.ext))
except MergeError as e:
print("error: %s" % e, file=sys.stderr)
return 1
Path(a.out).write_text(json.dumps(refs, ensure_ascii=False, indent=1) + "\n",
encoding="utf-8")
print("%d cases -> %s" % (refs["case_count"], a.out))
for g, n in refs["groups"].items():
print(" %-30s %3d" % (g, n))
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+774
View File
@@ -0,0 +1,774 @@
#!/usr/bin/env python3
"""A/B oracle: same seed, same bytes, the published engine against the candidate.
A page reads the same values from two engines that differ only by the work of one
release. This runs the host gate's dump (scripts/ci_host_gate.py dump: the page in
scripts/host_gate, whole APIs) twice on the SAME machine, each engine with ITS OWN core and wrapper
(the published engine with the published set, the candidate with core_ref and wrapper_ref), over the persona seeds (ci/persona-seeds.json, computed by scripts/persona_cover.py
from the prefs the core emits: the `candidate` set, 5 seeds that reach every webgl renderer
and every DPR, or the `final` set, 20 seeds that reach every value of every dimension). Each
seed runs at its OWN DPR (nothing is pinned):
1. with the published engine: the one the PUBLISHED SET carries (scripts/ci_published_set.py:
the last wrapper on the index, the core it pins, the engine that core's seal pins). The
set's venv fetches its own engine the way a user's core does (ensure_binary under its
own seal, which checks the sha256 of the archive and the engine against the seal) and
the dump runs in that venv: the engine is launched by the core it was built for;
2. with the candidate binary the gate already holds, under its own seal, in the venv of
the job (core_ref, wrapper_ref).
The dump also reads what the host gate's retail comparison leaves alone, the ab. leaves (ci_host_gate.is_ab): ab.poison on every seed (zone, language, colour scheme, a
canary font and the audio context, which scripts/ci_poison_host.py holds to the declared identity on a poisoned host) and, on seeds 0 and 63, the extra visit of every realm and
window a page can make (--ab; ci_host_gate.ab_visit). They are compared like every other leaf; the diag. ones are not.
Then every leaf of every visit is compared. Everything must be equal. The only
differences allowed are the `noise` entries of host_gate/exceptions.json (values that
differ between two launches of one engine) and keys under the diag. prefix (what the
page records about the host). Any other difference is red and is printed with the leaf,
the two values and the seed. It is also red when a visit is missing on one side, or when a
visit compares fewer leaves than MIN_LEAVES says: a page that dumped less than the host gate's
own reference would pass anything.
DECLARED DIFFERENCES. ci/ab-oracle-expected.json (format ab-oracle-expected/1) lists, one row per os x seed x dpr x leaf, the differences between the published engine and the candidate that a
release is known to make, each with the two values and the reason. They are applied to the A/B only, never to the A/A (the engine against itself has none). A difference is allowed only
when a row matches it exactly: the same os (the leg's), seed, dpr and leaf, and both values. Any other difference is red, and so is a row that does not show in the run (its os, a visit the
run made, and no matching difference): it is STALE and the verdict says "remove it". The rows say what the published engine reads and what the candidate reads, never a tag: when the published set
moves to the release that holds the candidate's work, the two sides agree on those leaves, every row is stale, and the stale check forces them out. A row for a visit this run did not make (another
shard, another seed set) is not judged here.
python ci_ab_oracle.py run <candidate-firefox> --candidate-seal gate.seal.json \\
--leg linux-x86_64 --out ab-oracle [--engine-tag <the set's tag>] [--seed-set candidate|final] [--shard i/n]
python ci_ab_oracle.py run --published-binary <firefox> --leg linux-x86_64 --out ab-oracle --limit 2 (the A/A alone)
python ci_ab_oracle.py compare ab-oracle [--a-a] [--seed-set ...] [--shard i/n] (again, from the dumps)
--shard i/n (1-based) takes every n-th seed of the set, from the i-th: the final set can be split over n jobs
(more runners, not more browsers per runner). The seed set and the shard of `compare` must be those of the run:
they say which visits were asked for.
THE CONTROL. `run` first dumps the published engine TWICE and compares the two (the A/A): a difference there says the
oracle is broken (what is compared is not stable, or the engine is not repeatable), not that the candidate is wrong. It is
exit 2 and the A/B is not run. Without a candidate (a pull request: the engine under test IS the published one, given with
--published-binary) the A/A is the whole run; with a candidate (the gate's leg) the A/B follows, against the first dump of
the published engine. Exit codes: 0 green, 1 red (a finding), 2 broken control or a run that could not run.
--limit N visits only the first N seeds of the set (the A/A of a pull request, which has a time budget per test).
THE SECOND LAUNCH. The visit of seed 0 (RELAUNCH_SEED) is also launched twice on ONE profile folder (the wrapper's persistent context, the profile a user
keeps between runs): the dump keeps the items of the second launch in that visit under the prefix `relaunch.`, next to the visit's own items (a fresh
profile), so the retail comparison of the host gate is never touched. They are compared apart: the visit must have them on both sides, and as many as the
floor (they are not counted in the visit's own leaves, so a page that dumped less cannot hide behind them). The A/A and the A/B hold them to equality like the rest.
HOW EACH LAUNCH ENDS. Every browser a dump launches (the visits, the two launches of the pair on one profile, the ab visit) is seen by a probe in the dump process
(scripts/ci_crash_evidence.py: it reads the exit code of the browser's parent after the close the launch already makes, and a watcher reads the crash folders while it lives). A
parent that did not end with 0, or whose code was not seen, is a RED line that names the side, the seed, the dpr, the launch and the code, in the A/A and in the A/B alike; a dump
process whose probe wrote nothing is red too. What the launch left is kept in `<out>/crash/<run>/`: the core run through `gdb -batch` with the build ids, the `.extra` and the minidump
names, `said.txt` for what the collectors did not find, and `exits.json` with how every launch ended. This oracle runs no strace (a trace would slow the browser and change the
outcome it observes): the strace tail is the host oracle's.
WHAT A LAUNCH LEAVES, ALWAYS. The probe also saves, for EVERY launch of both engines (and of the A/A), what the browser wrote on stdout and stderr (the core merges them on one pipe) in
`<out>/crash/<run>/stderr/<launch>.txt`, green or not, and the cores written since the launch began (Linux) are run through gdb whatever code the parent ended with: a content process can
die and the parent still end with 0, and then the launch is red and names the core. A launch without a core says where it looked (`core_said` in exits.json). A TAB THAT DIED, or a session lost
during a visit (the core's `cannot find session`, a closed target), is the leaf `crash.tab.<launch>` of that visit, with the error and the step (`.error`, `.step`), and the comparison puts it FIRST:
`TAB CRASH side B seed 12 dpr 1.5 launch visit at step ...`. That leaf alone makes the verdict red; the leaves the dead tab could not read (or that only the other side has) are not listed as a
cascade of `<missing>`: they are counted in that line.
python ci_ab_oracle.py touched BASE_SHA (prints touched=true|false: does a pull request change a file of this oracle; e2e.yml's final-set job reads it)
Writes, in --out: dump-<N>.json and dump-<N>-again.json (the published engine's items, twice), diff-a-a.json (the A/A),
and with a candidate dump-candidate.json and diff.json (the verdict, the compared leaves per visit, every difference).
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import shutil
import subprocess
import sys
import tempfile
import time
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
import ci_crash_evidence as crash # noqa: E402
import ci_host_gate as gate # noqa: E402
import ci_published_set as published_set # noqa: E402
import persona_cover as personas # noqa: E402
FORMAT = "ab-oracle/1"
EXPECTED_FORMAT = "ab-oracle-expected/1"
EXPECTED_FILE = Path(__file__).resolve().parents[1] / "ci" / "ab-oracle-expected.json"
#: What a row of the file has, and nothing else.
EXPECTED_KEYS = ("id", "os", "seed", "dpr", "leaf", "published", "candidate", "reason")
#: The legs the gate runs, and the os a row names for each.
LEG_OS = {"linux-x86_64": "linux", "win-x86_64": "windows"}
#: The control side is the PUBLISHED SET (scripts/ci_published_set.py): the wrapper the index published last, the core that wrapper pins, and the engine that core's seal pins, in a venv
#: of their own. The variable names that venv's python; the job sets it (or the oracle's test makes the venv from the run's wheelhouse). No tag is written in this file: the engine the
#: candidate is held to is the one the set carries, so a new release is the new baseline.
PUBLISHED_PYTHON_ENV = "INVPW_PUBLISHED_PYTHON"
SET_SCRIPT = Path(__file__).resolve().parent / "ci_published_set.py"
CANDIDATE = "candidate"
#: What the host gate's own reference holds per visit (non-diag leaves at each DPR, today).
#: A visit that compares fewer leaves than this is red. Moves by hand with the reference
#: (tests/test_ab_oracle.py holds the two together). A DPR the reference does not record (the personas
#: also have 1.25) is held to the least of the ones it does.
MIN_LEAVES = {1.0: 16439, 1.5: 16439}
#: The seeds a run visits, from ci/persona-seeds.json: the smallest set that reaches every webgl renderer and every DPR,
#: or the one that reaches every value of every dimension the core declares.
SEED_SETS = ("candidate", "final")
SEED_SET = "candidate"
#: The seed whose visit is also launched twice on one profile folder, and the prefix its second launch's leaves have (scripts/ci_host_gate.py holds it).
RELAUNCH_SEED = 0
RELAUNCH = gate.RELAUNCH
#: A value in diff.json longer than this is replaced by its length and its sha256 (the full value is in the dumps).
CLIP = 400
#: How many differences one run prints; diff.json has all of them.
PRINT_LIMIT = 200
#: What a leaf that is not in a visit reads as.
MISSING = "<missing>"
#: How the verdict names a tab that died (or a session that was lost) during a visit, first of all the lines: the dump records it as the leaf `crash.tab.<launch>`
#: (scripts/ci_crash_evidence.py), and the leaves the dead tab could not read are consequences, not differences.
TAB_CRASH = "TAB CRASH"
#: Said by the run when no visit is dumped within this time (the host gate's own budget is 180 s per page).
DUMP_TIMEOUT_S = 40 * 60
def dump_name(engine_tag: str) -> str:
"""dump-68.json for firefox-68."""
return "dump-%s.json" % engine_tag.rsplit("-", 1)[-1]
# -
# The comparison: two sets of visits, leaf by leaf.
def _clip(value):
text = json.dumps(value, sort_keys=True)
if len(text) <= CLIP:
return value
return {"clipped": text[:CLIP // 2], "len": len(text), "sha256": hashlib.sha256(text.encode()).hexdigest()}
def visit_name(dpr, seed) -> str:
return "dpr%s_seed%d" % (dpr, seed)
def parse_shard(text: str | None) -> tuple:
"""(i, n) from "i/n" (1-based, 1 <= i <= n); None is the whole set, (1, 1)."""
if text is None:
return (1, 1)
try:
i, n = (int(x) for x in text.split("/"))
except ValueError:
raise SystemExit("--shard is i/n, two whole numbers, not %r" % (text,)) from None
if not 1 <= i <= n:
raise SystemExit("--shard is i/n with 1 <= i <= n, not %r" % (text,))
return (i, n)
def select_visits(seed_set: str = SEED_SET, shard: str | None = None, path: Path = personas.DEFAULT_PATH,
limit: int | None = None) -> list:
"""[(dpr, seed)] of the seed set, each seed at its own DPR, the i-th of n shards (every n-th seed from the i-th),
the first `limit` of them when a limit is given."""
if seed_set not in SEED_SETS:
raise SystemExit("--seed-set is one of %s, not %r" % ("/".join(SEED_SETS), seed_set))
i, n = parse_shard(shard)
every = [(dpr, seed) for seed, dpr in personas.load_visits(seed_set, path)]
mine = every[i - 1::n][:limit]
if not mine:
raise SystemExit("shard %d/%d of the %d seeds of %r is empty" % (i, n, len(every), seed_set))
return mine
def relaunch_visits(visits) -> tuple:
"""The visits (dpr, seed) that are launched twice on one profile folder: the ones of RELAUNCH_SEED."""
return tuple(key for key in visits if key[1] == RELAUNCH_SEED)
def _bare(leaf: str) -> str:
"""The leaf without the prefix of the second launch: what exceptions.json names."""
return leaf[len(RELAUNCH):] if leaf.startswith(RELAUNCH) else leaf
def comparable(items: dict) -> dict:
"""The leaves of one visit that are held to equality: everything but diag (a second launch's leaves keep their prefix)."""
return {k: v for k, v in gate.leaves(items).items() if not gate.is_diag(_bare(k))}
def split_launches(leaves: dict) -> tuple:
"""(the leaves of the visit on a fresh profile, the leaves of the second launch)."""
first = {k: v for k, v in leaves.items() if not k.startswith(RELAUNCH)}
return first, {k: v for k, v in leaves.items() if k.startswith(RELAUNCH)}
def tab_crashes(leaves: dict) -> list:
"""[(launch, error, step)] of the tab crashes one side's visit recorded: the leaves `crash.tab.<launch>.error` and `.step` (a second launch's keep their prefix)."""
found: dict = {}
for leaf, value in leaves.items():
bare = _bare(leaf)
if bare.startswith(crash.TAB_PREFIX):
launch, _, field = bare[len(crash.TAB_PREFIX):].partition(".")
found.setdefault((leaf.startswith(RELAUNCH), launch), {})[field or "error"] = value
return [(launch, f.get("error"), f.get("step")) for (_second, launch), f in sorted(found.items())]
def os_of_leg(leg: str) -> str:
"""The os a row of the declared differences names for this leg ("linux-x86_64" is linux, "win-x86_64" is windows); any other leg is refused."""
if leg not in LEG_OS:
raise SystemExit("--leg is one of %s, not %r: the declared differences are per os" % ("/".join(sorted(LEG_OS)), leg))
return LEG_OS[leg]
def load_expected(path: Path | None = None) -> list:
"""The rows of ci/ab-oracle-expected.json (EXPECTED_FILE when no path is given). Refused: another format, a row that does not have exactly EXPECTED_KEYS, an os that is not
linux or windows, an empty reason, two rows with one id or with one (os, seed, dpr, leaf)."""
path = Path(path or EXPECTED_FILE)
document = json.loads(path.read_text(encoding="utf-8"))
if document.get("format") != EXPECTED_FORMAT:
raise SystemExit("%s is not an %s file" % (path, EXPECTED_FORMAT))
rows, ids, places = document["differences"], set(), set()
for row in rows:
if sorted(row) != sorted(EXPECTED_KEYS):
raise SystemExit("%s: the row %r has the keys %s, it must have exactly %s" % (path, row.get("id"), sorted(row), sorted(EXPECTED_KEYS)))
if row["os"] not in LEG_OS.values():
raise SystemExit("%s: the row %r names the os %r, it is linux or windows" % (path, row["id"], row["os"]))
if not str(row["reason"]).strip():
raise SystemExit("%s: the row %r has no reason" % (path, row["id"]))
place = (row["os"], row["seed"], row["dpr"], row["leaf"])
if row["id"] in ids or place in places:
raise SystemExit("%s: the row %r is declared twice (by id, or by os, seed, dpr and leaf)" % (path, row["id"]))
ids.add(row["id"])
places.add(place)
return rows
def _same_value(a, b) -> bool:
"""Equal as JSON says it (1 is not true, a list is its elements in order)."""
return json.dumps(a, sort_keys=True) == json.dumps(b, sort_keys=True)
def declared_covers(entry: dict, os_name: str, diff: dict) -> bool:
"""A row covers a difference only when os, seed, dpr, leaf and BOTH values are the row's."""
return (entry["os"] == os_name and entry["seed"] == diff["seed"] and entry["dpr"] == diff["dpr"] and entry["leaf"] == diff["leaf"]
and _same_value(entry["published"], diff["a"]) and _same_value(entry["candidate"], diff["b"]))
def apply_declared(differences: list, declared: list, os_name: str, seen: set, expected) -> tuple:
"""(the differences no row covers, the differences the rows cover with the id of the row, the stale rows).
A row is judged only when it names this os and a visit this run asked for and both sides have (`seen`); it is stale when no difference of the run is exactly its own."""
left, covered, stale = list(differences), [], []
for entry in declared:
visit = (entry["dpr"], entry["seed"])
if entry["os"] != os_name or visit not in expected or visit not in seen:
continue
hit = [d for d in left if declared_covers(entry, os_name, d)]
if not hit:
stale.append(entry)
for d in hit:
left.remove(d)
covered.append(dict(d, id=entry["id"]))
return left, covered, stale
def compare_visits(a: dict, b: dict, noise: list, min_leaves: dict | None = None,
expected: tuple | None = None, relaunch: tuple | None = None,
declared: list | None = None, os_name: str | None = None) -> dict:
"""a and b map (dpr, seed) to the items of that visit (as the dump returns them).
Returns the report: {"verdict": "green"|"red", "problems": [str], "differences":
[{"seed", "dpr", "leaf", "a", "b", "what"}], "compared": {visit: leaves}, "excused": n}.
`noise` is the list of entries of exceptions.json's "noise". `min_leaves` maps a dpr to the
fewest leaves a visit of that dpr may compare; `expected` is the visits both sides must have
(default: every seed at every DPR of the host gate). `relaunch` is the visits that were launched twice on one profile (default: those of RELAUNCH_SEED among the expected ones): each side must have the
second launch's leaves (prefix `relaunch.`) in them, as many as the floor, counted apart (report["relaunch"]), and a side must not have them in a visit that
was not asked to.
`declared` is the rows of ci/ab-oracle-expected.json, applied only with the `os_name` of the leg: the A/B passes them, the A/A never does. A difference that a row covers exactly
is not a problem and is listed in report["declared"] with the row's id; a row that this run does not show is a problem (stale) and its id is in report["stale"]."""
if declared and os_name is None:
raise ValueError("declared differences are per os: say which (os_name)")
min_leaves = MIN_LEAVES if min_leaves is None else min_leaves
if expected is None:
expected = tuple((dpr, seed) for dpr in gate.DPRS for seed in gate.SEEDS)
relaunch = relaunch_visits(expected) if relaunch is None else relaunch
problems, differences, compared, excused, relaunched = [], [], {}, 0, {}
crashes, cascade = [], {}
for side, visits in (("A", a), ("B", b)):
gone = [visit_name(*k) for k in expected if k not in visits]
if gone:
problems.append("side %s has no dump of %s" % (side, ", ".join(gone)))
stray = [visit_name(*k) for k in sorted(visits) if k not in expected]
if stray:
problems.append("side %s has dumps that were not asked for: %s" % (side, ", ".join(stray)))
for key in expected:
if key not in a or key not in b:
continue
dpr, seed = key
la, lb = comparable(a[key]), comparable(b[key])
count, again, skipped = 0, 0, 0
floor = min_leaves.get(dpr, min(min_leaves.values(), default=0))
died = {"A": tab_crashes(la), "B": tab_crashes(lb)}
crashed = bool(died["A"] or died["B"])
for side, found in died.items():
crashes += [{"side": side, "seed": seed, "dpr": dpr, "launch": launch, "error": error, "step": step} for launch, error, step in found]
for leaf in sorted(set(la) | set(lb)):
if gate.matching(noise, _bare(leaf)):
excused += 1
continue
if _bare(leaf).startswith(crash.TAB_PREFIX):
continue # said as a TAB CRASH, once, with its error and its step: not a difference of values
if crashed and (leaf not in la or leaf not in lb):
skipped += 1 # what the dead tab could not read (or the other side read and this one never got to): a consequence, said once below
continue
second = leaf.startswith(RELAUNCH)
count, again = count + (not second), again + second
va, vb = la.get(leaf, MISSING), lb.get(leaf, MISSING)
if va != vb:
differences.append({"seed": seed, "dpr": dpr, "leaf": leaf, "a": _clip(va), "b": _clip(vb),
"what": gate.describe(va, vb)})
compared[visit_name(dpr, seed)] = count
if skipped:
cascade[visit_name(dpr, seed)] = skipped
if count < floor and not crashed:
problems.append("%s compared %d leaves, fewer than the %d of the host gate's reference: "
"the page dumped less than it should" % (visit_name(dpr, seed), count, floor))
for side, leaves_of in (("A", la), ("B", lb)):
has = len(split_launches(leaves_of)[1])
if key in relaunch and has < floor and not crashed:
problems.append("side %s: the second launch of %s on a reused profile has %d leaves under %s, fewer than the %d of the host gate's "
"reference: it did not run, or the page dumped less than it should" % (side, visit_name(dpr, seed), has, RELAUNCH, floor))
if key not in relaunch and has and not crashed:
problems.append("side %s has the second launch of %s on a reused profile, which was not asked for" % (side, visit_name(dpr, seed)))
if key in relaunch:
relaunched[visit_name(dpr, seed)] = again
tab_lines = ["%s side %s seed %d dpr %s launch %s at step %s: %s%s" % (
TAB_CRASH, c["side"], c["seed"], c["dpr"], c["launch"], c["step"], c["error"],
" (the %d leaves of this visit that the tab could not read, or that only the other side has, are not compared)" % cascade[visit_name(c["dpr"], c["seed"])]
if visit_name(c["dpr"], c["seed"]) in cascade else "") for c in crashes]
problems = tab_lines + problems # the tab crash is the first line of the verdict, before anything it caused
covered, stale = [], []
if declared:
differences, covered, stale = apply_declared(differences, declared, os_name, {k for k in a if k in b}, expected)
problems += ["the declared difference %r (%s) does not show in this run: it is stale, remove it" % (e["id"], e["reason"]) for e in stale]
for d in differences:
problems.append("seed %d dpr %s %s: %s" % (d["seed"], d["dpr"], d["leaf"], d["what"]))
return {"verdict": "red" if problems else "green", "problems": problems, "differences": differences, "tab_crashes": crashes,
"compared": compared, "relaunch": relaunched, "excused": excused, "declared": covered, "stale": [e["id"] for e in stale]}
# -
# The files: what a run writes and what compare reads back.
def read_visits(directory: Path) -> dict:
"""(dpr, seed) -> items, from the *.json the host gate's dump wrote in directory."""
visits = {}
for path in sorted(directory.glob("*.json")):
d = json.loads(path.read_text(encoding="utf-8"))
visits[(d["dpr"], d["seed"])] = d["result"]["items"]
return visits
def pack(engine: str, visits: dict) -> dict:
return {"format": FORMAT, "engine": engine,
"visits": [{"dpr": dpr, "seed": seed, "items": visits[(dpr, seed)]} for dpr, seed in sorted(visits)]}
def unpack(document: dict) -> dict:
if document.get("format") != FORMAT:
raise SystemExit("not an %s dump: format %r" % (FORMAT, document.get("format")))
return {(v["dpr"], v["seed"]): v["items"] for v in document["visits"]}
def judge(published: dict, candidate: dict, noise: list, extra_problems=(), expected: tuple | None = None,
relaunch: tuple | None = None, declared: list | None = None, os_name: str | None = None) -> dict:
"""The verdict on two sets of visits. `declared` and `os_name` are the A/B's: the rows of ci/ab-oracle-expected.json and the os of the leg; the A/A is judged without them."""
report = compare_visits(published, candidate, noise, expected=expected, relaunch=relaunch, declared=declared, os_name=os_name)
if extra_problems:
crashed = [x for x in report["problems"] if x.startswith(TAB_CRASH)] # a tab that died is named before the exit code of the dump it left
report["problems"] = crashed + list(extra_problems) + report["problems"][len(crashed):]
report["verdict"] = "red"
return report
def write_json(path: Path, document) -> None:
path.write_text(json.dumps(document, sort_keys=True), encoding="utf-8")
def print_report(report: dict, published: str, other: str = CANDIDATE, title: str = "AB ORACLE") -> None:
n = len(report["differences"])
print("compared %d visits, leaves per visit: %s; %d leaves excused as noise"
% (len(report["compared"]), ", ".join("%s %d" % kv for kv in sorted(report["compared"].items())) or "none",
report["excused"]))
if report.get("relaunch"):
print("second launch on a reused profile, leaves per visit: %s" % ", ".join("%s %d" % kv for kv in sorted(report["relaunch"].items())))
if report.get("declared"):
print("%d differences declared in ci/ab-oracle-expected.json (the A/B only), each one exactly as its row says:" % len(report["declared"]))
for d in report["declared"]:
print("DECLARED %s seed %d dpr %s leaf %s: %s | %s" % (d["id"], d["seed"], d["dpr"], d["leaf"],
json.dumps(d["a"], sort_keys=True)[:80], json.dumps(d["b"], sort_keys=True)[:80]))
for d in report["differences"][:PRINT_LIMIT]:
print("DIFF seed %d dpr %s leaf %s: %s %s | %s %s" % (d["seed"], d["dpr"], d["leaf"], published,
json.dumps(d["a"], sort_keys=True)[:160],
other, json.dumps(d["b"], sort_keys=True)[:160]))
if n > PRINT_LIMIT:
print("... and %d more differences in diff.json" % (n - PRINT_LIMIT))
for p in report["problems"][:len(report["problems"]) - n]: # the differences are the last n problems
print("FAIL " + p)
print("%s %s: %d differences, %d problems"
% (title, "OK" if report["verdict"] == "green" else "FAILED", n, len(report["problems"])))
# -
# The run: two dumps, one per engine, as subprocesses (the seal a process runs under is read at import).
def published_python() -> str:
"""The python of the published set's venv (INVPW_PUBLISHED_PYTHON). RuntimeError when there is none: a candidate held to a control that is not the published set is
the broken control this file used to run (the candidate's core with the published engine, which refuses a launch whose declarations that core does not emit)."""
python = os.environ.get(PUBLISHED_PYTHON_ENV)
if not python or not Path(python).is_file():
raise RuntimeError("%s names no python (%r): the control side of an A/B is the PUBLISHED SET in a venv of its own (scripts/ci_published_set.py install --house <the "
"run's wheelhouse> --venv <dir>, then export the python it prints), never the core and the wrapper of the candidate" % (PUBLISHED_PYTHON_ENV, python))
return python
def set_command(python: str, *argv: str) -> list:
"""`python scripts/ci_published_set.py <argv>`, run BY the set's python: stdlib and its own invisible_core."""
return [python, str(SET_SCRIPT)] + list(argv)
def default_tag() -> str:
"""The tag of the engine the control side runs: the one the seal of the published set's core names; without a set (a pull request, whose engine IS the published one and
runs under the core the wrapper pins) the seal of the core of this process."""
python = os.environ.get(PUBLISHED_PYTHON_ENV)
if python and Path(python).is_file():
done = subprocess.run(set_command(python, "tag"), capture_output=True, text=True, env=published_set.clean_env(), timeout=120)
if done.returncode != 0:
raise RuntimeError("the published set's core names no seal tag: %s" % (done.stderr or done.stdout)[-600:])
return done.stdout.strip().splitlines()[-1]
from invisible_core.seal import active_seal
return active_seal().tag
def fetch_published(tag: str | None, work: Path) -> tuple:
"""(binary, None, python) of the published set: the engine its own core fetches under its own seal, and the python that is its venv's. `tag`, when given, is held
to the seal of the set (a label that names another engine than the one the set carries is a wrong control, said here)."""
python = published_python()
done = subprocess.run(set_command(python, "fetch", "--work", str(work)), capture_output=True, text=True, env=published_set.clean_env(), timeout=DUMP_TIMEOUT_S)
if done.returncode != 0:
raise RuntimeError("the published set could not fetch its engine (exit %s): %s" % (done.returncode, (done.stderr or done.stdout)[-800:]))
fetched = json.loads(done.stdout.strip().splitlines()[-1])
if tag and fetched["tag"] != tag:
raise RuntimeError("the control is labelled %s but the published set carries %s" % (tag, fetched["tag"]))
print("published engine %s: %s (core and wrapper of the published set, %s)" % (fetched["tag"], fetched["describe"], python))
sys.stdout.flush()
return fetched["binary"], None, python
def process_env(seal, python: str | None = None) -> dict:
"""The environment of a process that runs ONE engine: no autofix, no browser logging, and the seal of that engine. With `python` (the published set's venv) the process is the
set's: nothing of the candidate's job that could make it import another core or run another seal reaches it, and the core's pin check stays ON (a set whose wrapper and
core do not agree is refused, as it is on a user's machine). Without it (the candidate, or a pull request's published engine) it is as it always was."""
if python:
env = published_set.clean_env({"INVISIBLE_CORE_AUTOFIX": "off"})
else:
env = dict(os.environ, INVISIBLE_CORE_AUTOFIX="off", INVISIBLE_CORE_PIN="allow")
if seal: # None: the engine runs under the seal of the core it is launched with (the published set's, a pull request's published engine)
env["INVISIBLE_SEAL_FILE"] = str(seal)
for name in ("MOZ_LOG", "MOZ_LOG_FILE"): # the e2e legs log the engine; a run is as the host gate's
env.pop(name, None)
return env
def split_published(published: tuple) -> tuple:
"""(binary, seal, python or None) of a `published` tuple: two items (a binary given, run in this process's environment) or three (the published set)."""
return (published[0], published[1], published[2] if len(published) > 2 else None)
def own_cache_env(env: dict, folder: str, platform: str | None = None) -> dict:
"""`env` with the engine's per-user cache in a folder of this run (Linux: `XDG_CACHE_HOME`), and the wrapper's own cache where it was.
Why. fontconfig names the cache of the bundle's font folder by the md5 of its path, and writes it to the first writable cache folder
it knows, `$XDG_CACHE_HOME/fontconfig` or the legacy `~/.fontconfig`; it reads all of them. Every launch of the published engine of a
job has the same bundle path, so a launch that shares the user's folders leaves the cache of the bundle where a later launch of the
job reads it and finds it warm: tests/test_the_parent_reads_the_bundle_from_fontconfig_s_cache_linux_e2e.py needs its first launch
COLD (its run 44946411675 found `~/.fontconfig/<md5>-le64.cache-9` already there). The oracles' launches use a folder of their own, so
they neither read what an earlier test left nor leave what a later one would read. Both engines of an A/A start from the same empty
cache, which is also what makes their first launch the same.
`XDG_CACHE_HOME` is also where the wrapper looks for its engine (`platformdirs`): `INVISIBLE_PLAYWRIGHT_CACHE_DIR` is pinned to where
that is now, and an engine folder or a cache folder the caller set is kept. Windows has no fontconfig: `env` comes back as it was."""
if (platform or sys.platform) == "win32":
return env
import platformdirs
out = dict(env)
out.setdefault("INVISIBLE_PLAYWRIGHT_CACHE_DIR", platformdirs.user_cache_dir("invisible-playwright"))
out["XDG_CACHE_HOME"] = str(folder)
return out
def visits_complete(rc, target: Path, expected) -> tuple:
"""`(True, [])` when the dump ended with 0 and every visit of `expected` ([(dpr, seed)]) has its result in `target` and none of them lost its tab; else `(False, [what is missing])`.
This is where a run learns that its measurements are all there: the A/A's verdict on a known Mozilla defect depends on it (a crash that cost a measurement stays red)."""
missing = [] if rc == 0 else ["the dump process ended with %s" % (rc,)]
try:
got = read_visits(target) if target.is_dir() else {}
except (OSError, ValueError, KeyError, TypeError) as exc:
got = {}
missing.append("the dumps of %s cannot be read (%s: %s)" % (target.name, type(exc).__name__, exc))
missing += ["no dump of %s" % visit_name(*key) for key in expected if key not in got]
for key in expected:
if key in got and tab_crashes(comparable(got[key])):
missing.append("the tab of %s died: its leaves are not all there" % visit_name(*key))
return not missing, missing
def dump_with_exits(name: str, exe: str, seal_file, leg: str, visits, target: Path, out: Path, python: str | None = None, notes: list | None = None, control: bool = False) -> tuple:
"""The dump of one engine run as `run_dump` makes it, with the folder where its probe writes how each browser ended (`<out>/crash/<name>`, named to the dump process by
AB_CRASH_DIR): `(rc or "timeout", the red lines of the launches that did not end with 0, or that nobody saw)`. A dump process whose probe wrote nothing is red: an oracle
that does not see how its browsers end does not see them.
`control` is the A/A's: a core a browser left while its parent ended with 0 is then judged against the known Mozilla defects (ci/mozilla-defects.json), with the run's measurements
complete only when every visit has its result (`visits_complete`); a crash that matches is a line of `notes` and not a red line. Any other dump judges no core: every core is red."""
crash_dir = out / "crash" / name
try:
with crash.environment(**{crash.CRASH_DIR_ENV: crash_dir}):
rc = run_dump(exe, Path(seal_file) if seal_file else None, leg, target, visits, **({"python": python} if python else {}))
except subprocess.TimeoutExpired:
rc = "timeout"
complete, missing = visits_complete(rc, target, visits) if control else (None, [])
return rc, crash.exits_of_run(crash_dir, name, windows=leg.startswith("win"), needed=(rc == 0), notes=notes, measurements_complete=complete, missing=missing, binary=exe)
def run_dump(binary: str, seal: Path | None, leg: str, out: Path, visits: list | None = None, python: str | None = None) -> int:
"""The host gate's dump of `visits` ([(dpr, seed)], each seed at its own DPR) as a subprocess; None is the host gate's own grid. `python` is the published set's: the
dump of the control side runs in the venv that holds the published core and wrapper, never in the candidate's."""
env = process_env(seal, python)
cmd = [python or sys.executable, str(Path(gate.__file__)), "dump", binary, "--leg", leg, "--out", str(out)]
if visits is not None:
if relaunch_visits(visits):
cmd += ["--relaunch-seed", str(RELAUNCH_SEED)]
cmd += ["--no-pin", "--ab"] + [a for dpr, seed in visits for a in ("--visit", "%d:%s" % (seed, dpr))]
with tempfile.TemporaryDirectory(prefix="ab-oracle-cache-") as cache:
return subprocess.run(cmd, env=own_cache_env(env, cache), timeout=DUMP_TIMEOUT_S).returncode
def run(candidate: str, candidate_seal: Path, leg: str, out: Path, engine_tag: str,
published: tuple | None = None, visits: list | None = None) -> int:
"""`visits` is [(dpr, seed)] (default: the candidate set of the persona seeds, each at its own DPR)."""
visits = select_visits() if visits is None else visits
out.mkdir(parents=True, exist_ok=True)
work = Path(tempfile.mkdtemp(prefix="ab-oracle-"))
started = time.time()
problems, dumps = [], {}
try:
binary, seal, python = split_published(published or fetch_published(engine_tag, work))
for name, exe, seal_file, side_python in ((engine_tag, binary, seal, python), (CANDIDATE, candidate, candidate_seal, None)):
target = work / name
print("=== dump with %s: %s (seal %s), seeds %s"
% (name, exe, seal_file, " ".join("%d@%s" % (seed, dpr) for dpr, seed in visits)))
sys.stdout.flush()
rc, exits = dump_with_exits(name, exe, seal_file, leg, visits, target, out, side_python)
if rc != 0:
problems.append("the dump with %s ended with %s" % (name, rc))
problems += exits
dumps[name] = read_visits(target) if target.is_dir() else {}
write_json(out / (dump_name(engine_tag) if name == engine_tag else "dump-%s.json" % CANDIDATE),
pack(name, dumps[name]))
except SystemExit:
raise
except Exception as e: # noqa: BLE001 - a run that could not get its engine is red and says why
problems.append("%s: %s" % (type(e).__name__, str(e)[:500]))
for name in (engine_tag, CANDIDATE):
dumps.setdefault(name, {})
finally:
shutil.rmtree(work, ignore_errors=True)
noise = gate.load_exceptions().get("noise", [])
report = judge(dumps[engine_tag], dumps[CANDIDATE], noise, problems, expected=tuple(visits), declared=load_expected(), os_name=os_of_leg(leg))
report.update(format=FORMAT, engine=engine_tag, leg=leg, seconds=round(time.time() - started),
visits=["%d@%s" % (seed, dpr) for dpr, seed in visits])
write_json(out / "diff.json", report)
print_report(report, engine_tag)
return 0 if report["verdict"] == "green" else 1
def again_name(engine_tag: str) -> str:
"""dump-68-again.json for firefox-68: the second dump of the published engine, the A/A's other side."""
return dump_name(engine_tag)[:-len(".json")] + "-again.json"
def _dump_visits(name: str, exe: str, seal_file, leg: str, visits: list, work: Path, out: Path, file_name: str, python: str | None = None,
notes: list | None = None, control: bool = False) -> tuple:
"""One engine's dump of `visits`: ({(dpr, seed): items}, problems); the packed dump is written to out/file_name. `control` (the A/A's dumps) and `notes` are `dump_with_exits`'."""
target = work / name
print("=== dump with %s: %s (seal %s), seeds %s"
% (name, exe, seal_file or "of the core", " ".join("%d@%s" % (seed, dpr) for dpr, seed in visits)))
sys.stdout.flush()
rc, exits = dump_with_exits(name, exe, seal_file, leg, visits, target, out, python, notes, control)
problems = ([] if rc == 0 else ["the dump with %s ended with %s" % (name, rc)]) + exits
dumped = read_visits(target) if target.is_dir() else {}
write_json(out / file_name, pack(name, dumped))
return dumped, problems
def run_ab(leg: str, out: Path, engine_tag: str, published: tuple | None = None, candidate: str | None = None,
candidate_seal: Path | None = None, visits: list | None = None) -> int:
"""The A/A (the published engine twice), then, with a candidate, the A/B against the first dump. 0 green, 1 a finding,
2 a broken control (the A/A differs, or a dump of it did not run: the A/B is not run) .
`published` is (binary, seal or None) of a binary the caller gave, run in this process's environment, or (binary, None, python) of the published set; without it the
set the job made (INVPW_PUBLISHED_PYTHON) fetches its own engine."""
visits = select_visits() if visits is None else visits
expected = tuple(visits)
out.mkdir(parents=True, exist_ok=True)
work = Path(tempfile.mkdtemp(prefix="ab-oracle-"))
started = time.time()
noise = gate.load_exceptions().get("noise", [])
asked = ["%d@%s" % (seed, dpr) for dpr, seed in visits]
notes: list = [] # the cores of the A/A that the list of known Mozilla defects names: said, not red
try:
try:
binary, seal, python = split_published(published or fetch_published(engine_tag, work))
first, p1 = _dump_visits(engine_tag, binary, seal, leg, visits, work, out, dump_name(engine_tag), notes=notes, control=True, **({"python": python} if python else {}))
again, p2 = _dump_visits(engine_tag + "-again", binary, seal, leg, visits, work, out, again_name(engine_tag), notes=notes, control=True,
**({"python": python} if python else {}))
problems = p1 + p2
except SystemExit:
raise
except Exception as e: # noqa: BLE001 - a run that could not get its engine is red and says why
first, again, problems = {}, {}, ["%s: %s" % (type(e).__name__, str(e)[:500])]
control = judge(first, again, noise, problems, expected=expected)
control.update(format=FORMAT, engine=engine_tag, leg=leg, control=True, seconds=round(time.time() - started), visits=asked, known_defects=notes)
write_json(out / "diff-a-a.json", control)
print_report(control, engine_tag, engine_tag + "-again", "AB ORACLE A/A")
for note in notes:
print("NOTE " + note)
if control["verdict"] != "green":
print("BROKEN CONTROL: the published engine differs from itself (or did not run twice), so what is compared is not stable: "
"the A/B is not run, and the candidate is not judged")
return 2
if candidate is None:
return 0
cand, pc = _dump_visits(CANDIDATE, candidate, candidate_seal, leg, visits, work, out, "dump-%s.json" % CANDIDATE)
report = judge(first, cand, noise, pc, expected=expected, declared=load_expected(), os_name=os_of_leg(leg))
report.update(format=FORMAT, engine=engine_tag, leg=leg, seconds=round(time.time() - started), visits=asked)
write_json(out / "diff.json", report)
print_report(report, engine_tag)
return 0 if report["verdict"] == "green" else 1
finally:
shutil.rmtree(work, ignore_errors=True)
def clean_name(engine_tag: str) -> str:
"""poison-clean-68.json for firefox-68: the published engine's dump on the CLEAN runner, kept beside the poisoned run's (scripts/ci_poison_host.py)."""
return "poison-clean-" + dump_name(engine_tag)[len("dump-"):]
def run_clean(leg: str, out: Path, engine_tag: str, visits: list, published: tuple | None = None) -> int:
"""The published engine's dump of `visits` on this machine, written to out/clean_name(engine_tag), before the poison is applied. It judges nothing: 0
when it dumped, 1 when it did not (the by-product of the poisoned run is then missing and says so)."""
out.mkdir(parents=True, exist_ok=True)
work = Path(tempfile.mkdtemp(prefix="ab-oracle-clean-"))
try:
binary, seal, python = split_published(published or fetch_published(engine_tag, work))
_, problems = _dump_visits(engine_tag + "-clean", binary, seal, leg, visits, work, out, clean_name(engine_tag), **({"python": python} if python else {}))
except SystemExit:
raise
except Exception as e: # noqa: BLE001 - said, not raised: this is a by-product
problems = ["%s: %s" % (type(e).__name__, str(e)[:500])]
finally:
shutil.rmtree(work, ignore_errors=True)
for p in problems:
print("CLEAN DUMP: " + p)
return 1 if problems else 0
def recompare(directory: Path, engine_tag: str, visits: list | None = None, a_a: bool = False, leg: str | None = None) -> int:
"""`leg` (default: the os this runs on) says which rows of the declared differences apply to the A/B; the A/A takes none."""
visits = select_visits() if visits is None else visits
published = unpack(json.loads((directory / dump_name(engine_tag)).read_text(encoding="utf-8")))
if a_a:
again = unpack(json.loads((directory / again_name(engine_tag)).read_text(encoding="utf-8")))
report = judge(published, again, gate.load_exceptions().get("noise", []), expected=tuple(visits))
report.update(format=FORMAT, engine=engine_tag, control=True, visits=["%d@%s" % (seed, dpr) for dpr, seed in visits])
write_json(directory / "diff-a-a.json", report)
print_report(report, engine_tag, engine_tag + "-again", "AB ORACLE A/A")
return 0 if report["verdict"] == "green" else 2
candidate = unpack(json.loads((directory / ("dump-%s.json" % CANDIDATE)).read_text(encoding="utf-8")))
leg = leg or ("win-x86_64" if sys.platform == "win32" else "linux-x86_64")
report = judge(published, candidate, gate.load_exceptions().get("noise", []), expected=tuple(visits), declared=load_expected(), os_name=os_of_leg(leg))
report.update(format=FORMAT, engine=engine_tag, visits=["%d@%s" % (seed, dpr) for dpr, seed in visits])
write_json(directory / "diff.json", report)
print_report(report, engine_tag)
return 0 if report["verdict"] == "green" else 1
def touched(changed) -> bool:
"""Does a change to `changed` (paths of a pull request) touch a file of this oracle (scripts/ci_ab_pr_seeds.py holds the list)?"""
import ci_ab_pr_seeds as pr
return bool(pr.touches(changed, pr.ORACLES["AB_ORACLE_PR_SEEDS"][2]))
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
sub = ap.add_subparsers(dest="cmd", required=True)
r = sub.add_parser("run")
r.add_argument("candidate", nargs="?", help="the candidate's firefox binary (none: the A/A of the published engine alone)")
r.add_argument("--candidate-seal", type=Path, default=os.environ.get("INVISIBLE_SEAL_FILE"),
help="the candidate's seal (default: INVISIBLE_SEAL_FILE)")
r.add_argument("--leg", required=True)
r.add_argument("--out", type=Path, required=True)
r.add_argument("--engine-tag", default=None, help="the label of the control side (default: the tag the published set's seal names)")
r.add_argument("--seed-set", choices=SEED_SETS, default=SEED_SET,
help="the persona seeds to visit (ci/persona-seeds.json), each at its own DPR")
r.add_argument("--shard", help="i/n: every n-th seed of the set from the i-th (the final set over n jobs)")
r.add_argument("--limit", type=int, help="visit only the first N seeds of the set (the A/A of a pull request)")
r.add_argument("--published-binary", type=Path, help="use this binary for the published engine instead of fetching it")
r.add_argument("--published-seal", type=Path, help="with --published-binary: the seal of that engine")
t = sub.add_parser("touched", help="touched=true|false: does the pull request (BASE_SHA..HEAD) change a file of this oracle")
t.add_argument("base")
k = sub.add_parser("clean", help="the published engine's dump on this (clean) machine, for the poisoned run's by-product")
k.add_argument("--leg", required=True)
k.add_argument("--out", type=Path, required=True)
k.add_argument("--engine-tag", default=None, help="the label of the control side (default: the tag the published set's seal names)")
k.add_argument("--seed-set", choices=SEED_SETS, default=SEED_SET)
k.add_argument("--shard")
k.add_argument("--limit", type=int)
c = sub.add_parser("compare")
c.add_argument("directory", type=Path)
c.add_argument("--engine-tag", default=None, help="the label of the control side (default: the tag the published set's seal names)")
c.add_argument("--seed-set", choices=SEED_SETS, default=SEED_SET)
c.add_argument("--shard")
c.add_argument("--limit", type=int)
c.add_argument("--a-a", action="store_true", help="compare the two dumps of the published engine (the control)")
c.add_argument("--leg", help="the leg the dumps are of, which says the os of the declared differences (default: this machine's)")
args = ap.parse_args(argv)
if args.cmd == "touched":
import ci_ab_pr_seeds as pr
sys.stdout.reconfigure(newline="\n") # the line goes to $GITHUB_OUTPUT: a carriage return would be part of the value
print("touched=%s" % ("true" if touched(pr.changed_files(args.base)) else "false"))
return 0
args.engine_tag = args.engine_tag or default_tag()
if args.cmd == "clean":
return run_clean(args.leg, args.out, args.engine_tag, select_visits(args.seed_set, args.shard, limit=args.limit))
if args.cmd == "compare":
return recompare(args.directory, args.engine_tag, select_visits(args.seed_set, args.shard, limit=args.limit), args.a_a, args.leg)
if args.published_seal and not args.published_binary:
ap.error("--published-seal goes with --published-binary")
if args.candidate:
if not args.candidate_seal:
ap.error("--candidate-seal (or INVISIBLE_SEAL_FILE) is required: the candidate runs under its own seal")
if args.published_binary and not args.published_seal:
ap.error("--published-binary and --published-seal go together when there is a candidate")
elif not args.published_binary:
ap.error("a candidate, or --published-binary (the A/A of the published engine alone)")
given = (str(args.published_binary), args.published_seal) if args.published_binary else None
return run_ab(args.leg, args.out, args.engine_tag, given, args.candidate,
Path(args.candidate_seal) if args.candidate else None, select_visits(args.seed_set, args.shard, limit=args.limit))
if __name__ == "__main__":
sys.exit(main())
+93
View File
@@ -0,0 +1,93 @@
#!/usr/bin/env python3
"""How many persona seeds the A/A of each oracle visits on a pull request.
The page, network and host oracles run their A/A (the published engine against itself) on a pull request, where a test has a time budget: a few seeds. The A/A is
the control that every A/B verdict rests on, so when the pull request changes the code or the data of an oracle, its A/A runs on every seed of the `candidate` set
of ci/persona-seeds.json (the seeds the gate's leg runs), not on the first few: a change that makes the control unstable on one seed is found on the pull request.
`e2e.yml` runs this once per job, on a pull request, with the base commit of the pull request:
python scripts/ci_ab_pr_seeds.py "$BASE_SHA" >> "$GITHUB_ENV"
It fetches that commit (the checkout is shallow), lists the files the pull request changed (`git diff --name-only <base> HEAD`: HEAD is the merge commit the
runner checks out, so this is exactly what the pull request changes), and prints one `VARIABLE=N` line per oracle: N is every seed of the set when a file of the
oracle (ORACLES below, with what it shares with the others) is in the list, else the oracle's default. The tests read the variable with `pr_seed_count`; without it
(a push to main, a manual run) they use the default.
"""
from __future__ import annotations
import fnmatch
import json
import os
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
#: What every oracle depends on: the page oracle's driver (the others use its fetch of the published engine and its cache folder), the recorder of how a launch ended, this file and the seeds.
SHARED = ("scripts/ci_ab_oracle.py", "scripts/ci_crash_evidence.py", "scripts/ci_ab_pr_seeds.py", "scripts/persona_cover.py", "ci/persona-seeds.json")
#: variable -> (oracle, seeds by default on a pull request that does not touch it, the files of the oracle: exact paths or fnmatch patterns).
ORACLES = {
"AB_ORACLE_PR_SEEDS": ("page", 2, SHARED + ("scripts/ci_host_gate.py", "scripts/ci_poison_host.py", "scripts/host_gate/*", "ci/ab-oracle-expected.json", "tests/test_ab_oracle*", "tests/test_ci_host_gate*",
"tests/test_ci_poison_host.py")),
"AB_NETWORK_PR_SEEDS": ("network", 1, SHARED + ("scripts/ci_ab_network.py", "ci/ab-network-volatile.json", "tests/test_ab_network*")),
"AB_HOST_PR_SEEDS": ("host", 2, SHARED + ("scripts/ci_ab_host.py", "tests/_strace_stand_in.py", "tests/_ab_host_declared.py", "ci/ab-host-expected.json", "tests/test_ab_host*")),
}
FALLBACK_SEEDS = 5
def candidate_seed_count() -> int:
"""How many seeds the `candidate` set of ci/persona-seeds.json has (5 when the file cannot be read)."""
try:
seeds = json.loads((ROOT / "ci" / "persona-seeds.json").read_text(encoding="utf-8")).get("candidate")
return len(seeds) if seeds else FALLBACK_SEEDS
except (OSError, ValueError, AttributeError):
return FALLBACK_SEEDS
def touches(changed, patterns) -> list:
"""The changed files that are one of `patterns` (exact paths or fnmatch patterns, `/` separated)."""
return sorted(p for p in changed if any(fnmatch.fnmatchcase(p, pattern) for pattern in patterns))
def pr_seed_counts(changed, every: int | None = None) -> dict:
"""{variable: how many seeds} for a pull request that changed `changed`: every seed for an oracle whose own files are in it, else its default."""
every = candidate_seed_count() if every is None else every
return {variable: (every if touches(changed, files) else default) for variable, (_name, default, files) in ORACLES.items()}
def pr_seed_count(variable: str, default: int, environ=None) -> int:
"""What a test reads: the number in `variable` (set by the step of e2e.yml), else `default`. A value that is not a whole number of at least 1 is an error."""
raw = (os.environ if environ is None else environ).get(variable, "").strip()
if not raw:
return default
if not raw.isdigit() or int(raw) < 1:
raise ValueError("%s=%r: the number of seeds is a whole number of at least 1" % (variable, raw))
return int(raw)
def changed_files(base: str, run=subprocess.run) -> list:
"""The files that differ between the base commit of the pull request and HEAD (the merge commit of the checkout)."""
run(["git", "fetch", "--no-tags", "--depth=1", "origin", base], check=True, capture_output=True, text=True)
done = run(["git", "diff", "--name-only", base, "HEAD"], check=True, capture_output=True, text=True)
return [line.strip() for line in done.stdout.splitlines() if line.strip()]
def main(argv=None) -> int:
args = sys.argv[1:] if argv is None else argv
if len(args) != 1:
print("usage: ci_ab_pr_seeds.py BASE_SHA", file=sys.stderr)
return 2
sys.stdout.reconfigure(newline="\n") # the lines go to $GITHUB_ENV: a carriage return would be part of the value
changed = changed_files(args[0])
counts = pr_seed_counts(changed)
for variable, (name, default, files) in ORACLES.items():
hit = touches(changed, files)
print("%s oracle: %d seeds (%s)" % (name, counts[variable], ("its files changed: " + ", ".join(hit[:6])) if hit else "default %d" % default),
file=sys.stderr)
print("%s=%d" % (variable, counts[variable]))
return 0
if __name__ == "__main__":
sys.exit(main())
File diff suppressed because it is too large. Load diff
+446 -36
View File
@@ -41,6 +41,10 @@ legitimately differ on them and the retail reference does not record them.
compare() skips them by name; dump() prints them into the job log, so a run
tells why without its artifacts being downloaded.
Values under the ab. prefix are read for the A/B oracle: what a page reads of values a host may hold and the engine must never read
(ab.poison, with scripts/ci_poison_host.py) and, on the oracle's visits of seeds 0 and 63, the surfaces of every realm and window a page
can make (ab_visit). compare() skips them by name, as it skips diag.: the A/B compares them between the two engines.
Values under the state. prefix are the window in the states a page can drive
it to: state.normal, state.fullscreen (entered through a real click, a user
gesture) and state.after_fullscreen. The dump measures them after the page is
@@ -56,6 +60,12 @@ the same rule.
python ci_host_gate.py dump <firefox> --leg linux-x86_64 --out dumps/
python ci_host_gate.py compare dumps/ (reference: host_gate/reference/firefox-159)
python ci_host_gate.py compare dumps/ --junit gate-junit/host-gate.xml
--junit writes the verdict as a junit (xunit2) file, one testcase per invariant
(name `invariant:<name>`) and one per other check (`check:<name>`), classname
`scripts.ci_host_gate`: a failed check is a <failure>, a check with nothing to look at
(no dumps) is a <skipped/>, never a pass. The exit status is the gate's own.
"""
from __future__ import annotations
@@ -64,11 +74,19 @@ import base64
import fnmatch
import gzip
import json
import os
import shutil
import sys
import tempfile
import threading
import xml.etree.ElementTree as ET
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import Callable, NamedTuple
from urllib.parse import parse_qs, urlsplit
sys.path.insert(0, str(Path(__file__).resolve().parent))
import ci_crash_evidence as crash # noqa: E402 (how each launch's parent ended: the A/B oracle of the page turns a code other than 0 into a red line)
HERE = Path(__file__).resolve().parent / "host_gate"
PAGE = HERE / "host_gate_page.html"
@@ -88,11 +106,31 @@ ANCHOR = "win-x86_64"
#: Keys under this prefix are information, never compared (see the module docstring).
DIAG = "diag."
#: The items of a visit's SECOND launch on a profile that a first launch already used (`--relaunch-seed`, the A/B oracle's) live under this prefix, next to the
#: items of the visit on a fresh profile: the retail comparison (`compare`) never reads a dump made without that option, and the oracle compares the two
#: sets of leaves apart. The diag. items of the second launch are not kept: what the page records about the host is information, never compared.
RELAUNCH = "relaunch."
def relaunch_items(items: dict) -> dict:
"""The items of a second launch as they are stored in the visit: every key under RELAUNCH, the diag. ones left out."""
return {RELAUNCH + k: v for k, v in items.items() if not is_diag(k)}
def is_diag(key: str) -> bool:
return key.startswith(DIAG)
#: Keys under this prefix are read for the A/B oracle (scripts/ci_ab_oracle.py compares them between two engines on one machine). The host gate
#: does not hold them to either of its properties: the retail reference does not record them, and they are made on the oracle's machine
#: (a poisoned host, a launch in another locale), not on the gate's.
AB = "ab."
def is_ab(key: str) -> bool:
return key.startswith(AB)
def diag_lines(items: dict, before: dict | None = None) -> list:
"""The diag. leaves of one visit as 'key = value' lines; with before (an
earlier visit's diag leaves), only the keys whose value changed."""
@@ -375,61 +413,363 @@ def reference_zone(reference: Path) -> str:
return reference_items(reference, 1.0)["surface.intl"]["DateTimeFormat"]["timeZone"]
def visit_options(firefox: str, seed: int, dpr: float, zone: str) -> dict:
def visit_options(firefox: str, seed: int, dpr: float | None, zone: str, profile_dir: str | None = None) -> dict:
"""The launch of one (dpr, seed) visit. The DPR is PINNED in the persona
(screen.dpr), so the core declares a screen, a work area and a window made
at that scale. It used to be forced through
extra_prefs={"layout.css.devPixelsPerPx": ...} on whatever persona the seed
drew: a 100% persona at 1.5 read innerWidth 1920 inside an outerWidth of
1291 (run 41325657085), an identity no machine has, which the engine now
refuses to start with."""
return {"seed": seed, "binary_path": firefox, "headless": True, "show_cursor": False,
"locale": "en-US", "timezone": zone, "pin": {"screen.dpr": dpr}}
refuses to start with. With dpr None nothing is pinned: the seed's own persona decides the scale.
With a profile_dir the launch is the wrapper's persistent context on that folder (the profile a user keeps between runs)."""
options = {"seed": seed, "binary_path": firefox, "headless": True, "show_cursor": False,
"locale": "en-US", "timezone": zone}
if dpr is not None:
options["pin"] = {"screen.dpr": dpr}
if profile_dir is not None:
options["profile_dir"] = str(profile_dir)
return options
def dump(firefox: str, leg: str, out: Path, reference: Path, timeout_ms: int = 180_000) -> int:
#: Which launch of the dump is being made, for the name of the leaf a tab that died is recorded under (`crash.tab.<launch>`): the visit, the two launches of the pair on one profile,
#: the ab visit. Set with the probe's own label (`_mark`), so that the leaf and the evidence of the launch have one name.
_LAUNCH = ["visit"]
def _mark(seed, dpr, launch: str) -> None:
_LAUNCH[0] = launch
crash.mark(seed=seed, dpr=dpr, launch=launch)
class Steps:
"""Which step of a launch is being made, so that a tab that dies says WHERE: `step` is the last one begun, and `failed` the (step, error) of the last call of `wrap` that raised."""
def __init__(self, step: str = "launch") -> None:
self.step, self.failed = step, None
def wrap(self, name: str, fn: Callable) -> Callable:
def run(*args, **kwargs):
self.step = "%s %s" % (name, ", ".join(str(a)[:60] for a in args))
try:
return fn(*args, **kwargs)
except Exception as e: # noqa: BLE001 - noted, and raised again
self.failed = (self.step, e)
raise
return run
def leaves_of_crash(items: dict) -> dict:
"""{key: {"error", "step"}} of the items that record a tab that died or a session that was lost (also those of the second launch, under RELAUNCH)."""
out = {}
for key, value in items.items():
bare = key[len(RELAUNCH):] if key.startswith(RELAUNCH) else key
if bare.startswith(crash.TAB_PREFIX) and isinstance(value, dict):
out[key] = value
return out
def tab_crash_lines(visit: str, items: dict) -> list:
"""The tab crashes a visit's items hold, as the lines a dump prints."""
return ["TAB CRASH %s %s: %s, at the step %s" % (visit, k, v.get("error"), v.get("step")) for k, v in sorted(leaves_of_crash(items).items())]
def read_page(options: dict, port: int, dpr: float, timeout_ms: int) -> dict:
"""One launch: the page's result (with the states driven when the page answered the format), the browser closed. With a profile_dir in
`options` the wrapper hands back a persistent context, not a browser, and the page is opened in it.
A tab that died, or a session that was lost, while the page was read (the error says it: `crash.tab_lost`) is not an exception of the dump: it is the leaf
`crash.tab.<launch>` of this visit, with the error and the step, and the dump goes on. It used to be a `{"error": ...}` in each state the drive had not reached, which the
comparison read as a cascade of leaves that were missing (candidate run: «cannot find session» in every `state.*`)."""
from invisible_playwright import InvisiblePlaywright
launch, trace, result = _LAUNCH[0], Steps("new page"), None
with InvisiblePlaywright(**options) as browser:
try:
page = browser.new_page() if "profile_dir" in options else browser.new_context().new_page()
# The same budget as the wait below: a cold Windows runner took
# more than goto's default 30 s to reach `load` on the first
# visit (candidate 42410156024), and passed locally 6/6.
trace.step = "goto"
page.goto("http://127.0.0.1:%d/?dpr%s" % (port, dpr), timeout=timeout_ms)
trace.step = "wait for the page's result"
page.wait_for_function("document.title === 'done'", timeout=timeout_ms)
trace.step = "read the page's result"
result = page.evaluate("window.__hostGate")
if result.get("format") == FORMAT:
result["items"].update(drive_states(trace.wrap("evaluate", page.evaluate), trace.wrap("mouse move", page.mouse.move), trace.wrap("mouse click", page.mouse.click)))
if trace.failed is not None and crash.tab_lost(trace.failed[1]):
result["items"].update(crash.tab_crash_item(launch, "states: " + trace.failed[0], trace.failed[1]))
except Exception as e: # noqa: BLE001 - only a tab that died is recorded; anything else is raised as it always was
if not crash.tab_lost(e):
raise
result = {"format": FORMAT, "items": dict(result["items"]) if isinstance(result, dict) and isinstance(result.get("items"), dict) else {}}
result["items"].update(crash.tab_crash_item(launch, trace.step, e))
return result
def second_launch(options: dict, port: int, dpr: float, timeout_ms: int, read=None) -> dict:
"""The page's result of a SECOND launch on a profile the first one used: the same options and the same seed, on a folder of this call
that is made, launched on once (what that launch leaves in it is the point: cookies, cache, prefs.js, the session seed), closed,
launched on again, and removed. A first launch that did not answer the format is what comes back, for the caller to refuse."""
read = read or read_page
profile = tempfile.mkdtemp(prefix="host-gate-profile-")
try:
with_profile = dict(options, profile_dir=profile)
_mark(options.get("seed"), dpr, "relaunch-first")
first = read(with_profile, port, dpr, timeout_ms)
if first.get("format") != FORMAT:
return first
_mark(options.get("seed"), dpr, "relaunch-second")
again = read(with_profile, port, dpr, timeout_ms)
if again.get("format") == FORMAT: # a tab that died in the first launch is not lost because the second one was read
again["items"].update(leaves_of_crash(first.get("items") or {}))
return again
finally:
shutil.rmtree(profile, ignore_errors=True)
def dump(firefox: str, leg: str, out: Path, reference: Path, timeout_ms: int = 180_000,
visits: list | None = None, pin_dpr: bool = True, relaunch_seeds: tuple = (), ab: bool = False) -> int:
"""`visits` is [(dpr, seed)] (default: every seed of SEEDS at every DPR of DPRS, the DPR pinned). With pin_dpr
False the DPR is not pinned: it is the one the seed's persona has, and `dpr` of a visit only names the file and
the page's query. A seed of `relaunch_seeds` is visited once more, launched twice on one profile folder, and the
items of that second launch are added to the visit under RELAUNCH (the visit's own items stay those of a fresh profile).
With `ab`, the seeds of AB_SEEDS also get the extra visit of the A/B oracle (ab_visit): its leaves join the visit's items.
When the oracle that runs this dump names a folder for it (`AB_CRASH_DIR`, scripts/ci_ab_oracle.py), a probe sees how each launch's parent ends (scripts/ci_crash_evidence.py)
and writes it to `exits.json` there, whatever the dump's own result: a launch that did not end with 0 is red in the oracle, and what it left is saved in that folder."""
out.mkdir(parents=True, exist_ok=True)
crash_dir = os.environ.get(crash.CRASH_DIR_ENV)
probe = crash.start_probe(firefox, crash_dir) if crash_dir else None
server = ThreadingHTTPServer(("127.0.0.1", 0), _Page)
threading.Thread(target=server.serve_forever, daemon=True).start()
port = server.server_address[1]
zone = reference_zone(reference)
first_diag = None
try:
for dpr in DPRS:
for seed in SEEDS:
with InvisiblePlaywright(**visit_options(firefox, seed, dpr, zone)) as browser:
page = browser.new_context().new_page()
# The same budget as the wait below: a cold Windows runner took
# more than goto's default 30 s to reach `load` on the first
# visit (candidate 42410156024), and passed locally 6/6.
page.goto("http://127.0.0.1:%d/?dpr%s" % (server.server_address[1], dpr),
timeout=timeout_ms)
page.wait_for_function("document.title === 'done'", timeout=timeout_ms)
result = page.evaluate("window.__hostGate")
if result.get("format") == FORMAT:
result["items"].update(drive_states(page.evaluate, page.mouse.move, page.mouse.click))
if result.get("format") != FORMAT:
print("the page answered format %r, not %r" % (result.get("format"), FORMAT))
for dpr, seed in (visits if visits is not None else [(d, sd) for d in DPRS for sd in SEEDS]):
options = visit_options(firefox, seed, dpr if pin_dpr else None, zone)
_mark(seed, dpr, "visit")
result = read_page(options, port, dpr, timeout_ms)
if result.get("format") != FORMAT:
print("the page answered format %r, not %r" % (result.get("format"), FORMAT))
return 2
if seed in relaunch_seeds:
again = second_launch(options, port, dpr, timeout_ms)
if again.get("format") != FORMAT:
print("the second launch on a reused profile: the page answered format %r, not %r" % (again.get("format"), FORMAT))
return 2
path = out / ("%s_dpr%s_seed%d.json" % (leg, dpr, seed))
path.write_text(json.dumps({"leg": leg, "dpr": dpr, "seed": seed, "result": result}),
encoding="utf-8")
print("dumped %s: %d items" % (path.name, len(result["items"])))
visit = "%s dpr %s seed %d" % (leg, dpr, seed)
for line in diag_report(visit, result["items"], first_diag):
print(line)
# told here too, so the job log says it without the compare step
for line in invariant_lines(visit, result["items"]):
print(line)
sys.stdout.flush()
if first_diag is None:
first_diag = {k: v for k, v in leaves(result["items"]).items() if is_diag(k)}
result["items"].update(relaunch_items(again["items"]))
print("second launch of seed %d on a reused profile: %d items" % (seed, len(again["items"])))
if ab and seed in AB_SEEDS:
_mark(seed, dpr, "ab-visit")
result["items"].update(ab_visit(firefox, seed, zone, dpr if pin_dpr else None))
path = out / ("%s_dpr%s_seed%d.json" % (leg, dpr, seed))
path.write_text(json.dumps({"leg": leg, "dpr": dpr, "seed": seed, "result": result}),
encoding="utf-8")
print("dumped %s: %d items" % (path.name, len(result["items"])))
visit = "%s dpr %s seed %d" % (leg, dpr, seed)
for line in tab_crash_lines(visit, result["items"]):
print(line)
for line in diag_report(visit, result["items"], first_diag):
print(line)
# told here too, so the job log says it without the compare step
for line in invariant_lines(visit, result["items"]):
print(line)
sys.stdout.flush()
if first_diag is None:
first_diag = {k: v for k, v in leaves(result["items"]).items() if is_diag(k)}
finally:
server.shutdown()
if probe is not None:
crash.stop_probe()
probe.write()
for line in crash.exit_problems(probe.launches, "this dump", windows=leg.startswith("win")):
print("EXIT " + line)
return 0
# -
# The A/B oracle's extra visit: every realm and every kind of window a page can make, in a launch of another locale and in a context of yet
# another, on seeds 0 and 63. Its leaves are under ab. (see is_ab): scripts/ci_ab_oracle.py compares them between the two engines. It is a
# separate launch per seed, with its own server and its own functions: nothing here changes how the visits above are made.
#
# Seed 63 is the CONTROL of seed 0: an identity that is not seed 0's must read other values, so the same block on both must differ on at least
# AB_CONTROL_MIN ab. leaves (ab_control). A block that answered the same for two identities would pass an engine that ignores the identity.
AB_DIR = HERE / "ab"
AB_SEEDS = (0, 63)
AB_LAUNCH_LOCALE = "ja-JP"
#: (name of the context, what the context is made with). The first is the launch's own default context (locale ja-JP); the second overrides
#: both the language and the zone.
AB_CONTEXTS = (("launch", {}), ("context", {"locale": "de-DE", "timezone_id": "America/Lima"}))
AB_BUDGET_MS = 240_000
#: How many ab. leaves seed 63 must differ from seed 0 on. PROVISIONAL, from the core's prefs and not from a run: the two personas differ in their core
#: count (12 and 32), their GPU, their screen and their DPR, so hardwareConcurrency alone differs in every realm that must have read (top, cross-site
#: iframe, srcdoc iframe, worker, in each of the 2 contexts: 8 leaves) and the page-read GPU, the screen and the canvas leaves come on top of them.
#: The first run on GitHub prints the measured count (ab_control's line in the oracle's log, and ab-control.json): this number then moves to a safe
#: fraction of it, written here with the run it came from.
AB_CONTROL_MIN = 8
AB_CONTROL_NAMESPACES = tuple("%s%s." % (AB, name) for name, _ in AB_CONTEXTS)
_AB_TYPES = {".html": "text/html; charset=utf-8", ".js": "text/javascript; charset=utf-8"}
#: A one-pixel GIF: what /ab/probe answers to a fetch and to an image alike.
_GIF = base64.b64decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")
class _AbSite(BaseHTTPRequestHandler):
"""The site of the ab visit: the files of scripts/host_gate/ab, /ab/probe (a pixel) and /ab/seen (the Accept-Language the server saw,
per context, by kind of request: `<Sec-Fetch-Dest>:<path>` -> the sorted distinct values)."""
def _send(self, status, content_type, body):
self.send_response(status)
self.send_header("Content-Type", content_type)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def do_GET(self):
url = urlsplit(self.path)
ctx = (parse_qs(url.query).get("ctx") or [""])[0]
if url.path == "/ab/seen":
with self.server.ab_lock:
seen = {k: sorted(v) for k, v in self.server.ab_seen.get(ctx, {}).items()}
return self._send(200, "application/json", json.dumps(seen, sort_keys=True).encode())
if url.path.startswith("/ab/"):
with self.server.ab_lock:
kind = "%s:%s" % (self.headers.get("Sec-Fetch-Dest") or "none", url.path)
self.server.ab_seen.setdefault(ctx, {}).setdefault(kind, set()).add(self.headers.get("Accept-Language") or "<none>")
if url.path.startswith("/ab/probe"):
return self._send(200, "image/gif", _GIF)
name = url.path[len("/ab/"):] if url.path.startswith("/ab/") else ""
path = AB_DIR / name
if not name or "/" in name or "\\" in name or path.suffix not in _AB_TYPES or not path.is_file():
return self._send(404, "text/plain", b"not found")
return self._send(200, _AB_TYPES[path.suffix], path.read_bytes())
def log_message(self, *args):
pass
def ab_options(firefox: str, seed: int, dpr: float | None, zone: str) -> dict:
"""The launch of the ab visit: the host gate's own, in ja-JP."""
options = {"seed": seed, "binary_path": firefox, "headless": True, "show_cursor": False,
"locale": AB_LAUNCH_LOCALE, "timezone": zone}
if dpr is not None:
options["pin"] = {"screen.dpr": dpr}
return options
def ab_items(context: str, result, back) -> dict:
"""The items of one context of the ab visit: what the page recorded (ab.<context>.<step>...), what a page that came back from the history reads
again (ab.<context>.bfcache: whether it was restored from the back/forward cache is the engine's, not the identity's, and goes to diag.)."""
body = dict(result) if isinstance(result, dict) else {"result": result}
body["bfcache"] = back.get("data") if isinstance(back, dict) else back
return {AB + context: body, DIAG + AB + context: {"bfcache_persisted": back.get("persisted") if isinstance(back, dict) else None}}
def ab_visit(firefox: str, seed: int, zone: str, dpr: float | None = None, timeout_ms: int = AB_BUDGET_MS) -> dict:
"""Launch `firefox` with the seed in ja-JP, and read the ab site in its default context and in a context of de-DE and America/Lima;
returns {key: value} to add to the visit's items."""
from invisible_playwright import InvisiblePlaywright
server = ThreadingHTTPServer(("127.0.0.1", 0), _AbSite)
server.ab_seen, server.ab_lock = {}, threading.Lock()
threading.Thread(target=server.serve_forever, daemon=True).start()
base = "http://127.0.0.1:%d/ab/" % server.server_address[1]
items = {}
lost = None
try:
with InvisiblePlaywright(**ab_options(firefox, seed, dpr, zone)) as browser:
for name, options in AB_CONTEXTS:
context, step = None, "new context"
try:
context = browser.new_context(**options)
step = "new page"
page = context.new_page()
step = "goto surfaces"
page.goto(base + "surfaces.html?ctx=" + name, timeout=timeout_ms)
step = "wait for the page's result"
page.wait_for_function("document.title === 'ab-done'", timeout=timeout_ms)
step = "read the page's result"
result = page.evaluate("window.__abResult")
# away and back: the page that comes back reads again (pageshow), restored from the cache or loaded anew
step = "goto leave"
page.goto(base + "leave.html?ctx=" + name, timeout=timeout_ms)
step = "go back"
page.go_back(timeout=timeout_ms)
step = "wait for the page that came back"
page.wait_for_function("window.__abBf && window.__abBf.n >= 2", timeout=timeout_ms)
step = "read the page that came back"
back = page.evaluate("window.__abBf")
except Exception as e: # noqa: BLE001 - a tab that died is the leaf `crash.tab.ab-visit`; anything else is raised as it always was
if not crash.tab_lost(e):
raise
lost = crash.tab_crash_item("ab-visit", "%s (context %s)" % (step, name), e)
finally:
if context is not None:
try:
context.close()
except Exception: # noqa: BLE001 - closing a context whose tab died says nothing more
if lost is None:
raise
if lost is not None:
items.update(lost)
break
items.update(ab_items(name, result, back))
finally:
server.shutdown()
server.server_close()
return items
def ab_control(items_by_seed: dict, seeds: tuple = AB_SEEDS, minimum: int | None = None) -> dict:
"""The control of the ab visit: on how many leaves of the ab visit seeds[1] differs from seeds[0]. `items_by_seed` maps a seed to its items.
Returns {"status": "ok"|"too_few"|"not_visited", "differing", "compared", "minimum", "line"}; not_visited (a run that did not visit both,
the pull request's two seeds) is said, and the caller decides whether that is allowed."""
minimum = AB_CONTROL_MIN if minimum is None else minimum
a, b = seeds
mine = {}
for seed in seeds:
items = items_by_seed.get(seed)
mine[seed] = None if items is None else {k: v for k, v in leaves(items).items() if k.startswith(AB_CONTROL_NAMESPACES)}
if not mine[a] or not mine[b]:
missing = [s for s in seeds if not mine[s]]
return {"status": "not_visited", "differing": None, "compared": None, "minimum": minimum,
"line": "ab control: seed %s has no ab. leaves in this run" % " and ".join(map(str, missing))}
keys = sorted(set(mine[a]) | set(mine[b]))
differing = [k for k in keys if mine[a].get(k, "<missing>") != mine[b].get(k, "<missing>")]
status = "ok" if len(differing) >= minimum else "too_few"
return {"status": status, "differing": len(differing), "compared": len(keys), "minimum": minimum, "sample": differing[:12],
"line": "ab control: seed %d differs from seed %d on %d of %d ab. leaves (at least %d are required)%s"
% (b, a, len(differing), len(keys), minimum, "" if status == "ok" else ": an identity that is not seed %d's read the same" % a)}
#: The steps of the ab visit that must have read something in every context: a realm that answers `timeout` or an error says the page did not
#: read, and an A/B of two such answers compares nothing. The others (the service worker, the audio worklet, the popups) may be missing on a
#: host that has none of it; what they answered is compared like any leaf.
AB_REQUIRED_STEPS = ("top", "iframe_cross", "iframe_srcdoc", "worker", "accept_language")
def ab_coverage(items_by_seed: dict, seeds: tuple = AB_SEEDS) -> list:
"""What is missing from the ab visit of the seeds of this run that have one: [problem]. A seed of `seeds` that the run visited without an
ab visit, a context without its leaves, and a required step that did not read a dict are problems."""
problems = []
for seed in seeds:
items = items_by_seed.get(seed)
if items is None:
continue
for name, _ in AB_CONTEXTS:
body = items.get(AB + name)
if not isinstance(body, dict):
problems.append("seed %d: no %s%s leaves (the ab visit did not run, or the page recorded none)" % (seed, AB, name))
continue
for step in AB_REQUIRED_STEPS:
if not isinstance(body.get(step), dict):
problems.append("seed %d %s%s.%s: %s" % (seed, AB, name, step, json.dumps(body.get(step))[:160]))
return problems
# -
# Compare: every leg, every visit, against each other and against retail.
@@ -494,7 +834,7 @@ def compare(dumps: Path, reference: Path, exceptions: dict, notes: list | None =
for path in sorted(dumps.glob("*.json")):
d = json.loads(path.read_text(encoding="utf-8"))
items = d["result"]["items"]
visits[(d["leg"], d["dpr"], d["seed"])] = {k: v for k, v in leaves(items).items() if not is_diag(k)}
visits[(d["leg"], d["dpr"], d["seed"])] = {k: v for k, v in leaves(items).items() if not is_diag(k) and not is_ab(k)}
# the invariants: every leg, every visit, every state; no exception and no reference applies
failures += invariant_lines("%s dpr %s seed %d" % (d["leg"], d["dpr"], d["seed"]), items)
if not visits:
@@ -506,7 +846,7 @@ def compare(dumps: Path, reference: Path, exceptions: dict, notes: list | None =
items = reference_items(reference, dpr)
if items is None:
return ["no retail reference for dpr %s in %s" % (dpr, reference)]
refs[dpr] = {k: v for k, v in leaves(items).items() if not is_diag(k)}
refs[dpr] = {k: v for k, v in leaves(items).items() if not is_diag(k) and not is_ab(k)}
pending[dpr] = tuple(p for p in REFERENCE_PENDING if not any(k.startswith(p) for k in refs[dpr]))
for p in pending[dpr]:
if notes is not None:
@@ -578,6 +918,61 @@ def compare(dumps: Path, reference: Path, exceptions: dict, notes: list | None =
return failures
# -
# The junit: the verdict of compare() as one testcase per invariant and per
# other check, so a judge can ask "did this invariant pass" by name.
#: The classname is the script's path as a dotted module (the hook tests judge turns it back into
#: scripts/ci_host_gate.py, the file a hook names).
JUNIT_CLASSNAME = "scripts.ci_host_gate"
#: The checks of compare() other than the invariants, with the prefix of the
#: failure lines each one owns.
CHECKS = (
("dumps_complete", ("no dumps", "no retail reference")),
("host_independence", ("host ",)),
("retail_equality", ("retail ",)),
("exceptions_current", ("known defect",)),
)
def junit_cases(failures: list, dumps_seen: int) -> list:
"""The verdict as [(name, status, lines)], status being passed, failed or
skipped. Nothing to look at (no dump) skips an invariant; a failure line
is owned by the invariant or check it names."""
cases = []
for inv in INVARIANTS:
lines = [f for f in failures if f.startswith("invariant %s " % inv.name)]
cases.append(("invariant:" + inv.name, "failed" if lines else ("passed" if dumps_seen else "skipped"), lines))
no_dumps = any(f.startswith("no dumps") for f in failures)
no_reference = any(f.startswith("no retail reference") for f in failures)
for name, prefixes in CHECKS:
lines = [f for f in failures if f.startswith(prefixes) or (name == "dumps_complete" and ": no dump for seeds" in f)]
skipped = no_dumps or (no_reference and name != "dumps_complete")
cases.append(("check:" + name, "failed" if lines else ("skipped" if skipped else "passed"), lines))
return cases
def write_junit(path: Path, cases: list, suite: str = "host-gate") -> None:
"""cases: [(name, status, lines)] as a junit (xunit2) file at path."""
root = ET.Element("testsuites")
counts = {"failed": 0, "skipped": 0}
for _, status, _lines in cases:
if status in counts:
counts[status] += 1
ts = ET.SubElement(root, "testsuite", name=suite, tests=str(len(cases)), failures=str(counts["failed"]),
errors="0", skipped=str(counts["skipped"]), time="0")
for name, status, lines in cases:
tc = ET.SubElement(ts, "testcase", classname=JUNIT_CLASSNAME, name=name, time="0")
if status == "failed":
f = ET.SubElement(tc, "failure", message=lines[0][:300] if lines else "failed")
f.text = "\n".join(lines[:50])
elif status == "skipped":
ET.SubElement(tc, "skipped", message="nothing to check: the gate had no dumps or no reference")
path.parent.mkdir(parents=True, exist_ok=True)
ET.ElementTree(root).write(path, encoding="utf-8", xml_declaration=True)
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
sub = ap.add_subparsers(dest="cmd", required=True)
@@ -586,18 +981,33 @@ def main(argv=None) -> int:
d.add_argument("--leg", required=True)
d.add_argument("--out", type=Path, required=True)
d.add_argument("--reference", type=Path, default=REFERENCE)
d.add_argument("--visit", action="append", metavar="SEED:DPR",
help="visit this seed (repeatable; default: the host gate's own seeds at its own DPRs)")
d.add_argument("--ab", action="store_true",
help="the seeds of AB_SEEDS also get the A/B oracle's extra visit (ab. leaves)")
d.add_argument("--no-pin", action="store_true",
help="do not pin the DPR: the seed's persona has its own (the DPR of --visit only names the file)")
d.add_argument("--relaunch-seed", action="append", type=int, default=[], metavar="SEED",
help="also launch this seed twice on one profile folder and keep the second launch's items under relaunch. (repeatable)")
c = sub.add_parser("compare")
c.add_argument("dumps", type=Path)
c.add_argument("--reference", type=Path, default=REFERENCE)
c.add_argument("--junit", type=Path, help="also write the verdict as a junit (xunit2) file")
args = ap.parse_args(argv)
if args.cmd == "dump":
return dump(args.firefox, args.leg, args.out, args.reference)
visits = None
if args.visit:
visits = [(float(dpr), int(seed)) for seed, dpr in (v.split(":", 1) for v in args.visit)]
return dump(args.firefox, args.leg, args.out, args.reference, visits=visits, pin_dpr=not args.no_pin,
relaunch_seeds=tuple(args.relaunch_seed), ab=args.ab)
notes = []
failures = compare(args.dumps, args.reference, load_exceptions(), notes)
for n in notes:
print("NOTE " + n)
for f in failures:
print("FAIL " + f)
if args.junit:
write_junit(args.junit, junit_cases(failures, len(list(args.dumps.glob("*.json")))))
print("HOST GATE %s: %d failures" % ("OK" if not failures else "FAILED", len(failures)))
return 1 if failures else 0
-82
View File
@@ -1,82 +0,0 @@
"""The preloaded-intermediates list of a CI leg: a fixed (empty) file of the repository, and the variable that makes the core use it.
python scripts/ci_lab_intermediates.py set [--pin ci/intermediates.pin.json] # checks the file against the pin, exports STEALTHFOX_INTERMEDIATES
Why this exists: without ``STEALTHFOX_INTERMEDIATES`` the core downloads Mozilla's intermediates list on a cold cache (in line, at the first launch or at
`invisible_playwright fetch`) and asks once a week whether it changed, from the python of the test. A CI leg reaches no site for its data and every run has to
have the same bytes, so the leg launches with ``ci/intermediates.json``: a valid list in the engine's format 1 with no certificate. With the variable set the
core neither downloads nor checks, ever. ``ci/intermediates.pin.json`` holds the sha256 of the file: ``set`` refuses to go on when the file is not that.
``set`` writes ``STEALTHFOX_INTERMEDIATES=<absolute path>`` to ``$GITHUB_ENV`` (every later step of the job sees it) and, when there is no
``$GITHUB_ENV``, to stdout. The paths of the pin are relative to the repository, not to the working directory of the caller.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import sys
from pathlib import Path
ENV = "STEALTHFOX_INTERMEDIATES"
ROOT = Path(__file__).resolve().parents[1]
class Refused(Exception):
pass
def sha256_of(path) -> str:
return hashlib.sha256(Path(path).read_bytes()).hexdigest()
def load_pin(path) -> dict:
try:
pin = json.loads(Path(path).read_text(encoding="utf-8"))
except (OSError, ValueError) as exc:
raise Refused("the pin %s cannot be read: %s" % (path, exc))
sha = pin.get("sha256") if isinstance(pin, dict) else None
if not isinstance(sha, str) or len(sha) != 64 or any(c not in "0123456789abcdef" for c in sha):
raise Refused("the pin %s has no sha256 that is a sha256" % path)
if not isinstance(pin.get("file"), str) or not pin["file"]:
raise Refused("the pin %s names no file" % path)
return pin
def resolve(pin: dict, pin_path) -> Path:
"""The file the pin names, checked against its sha256: a file that is not the pinned one is refused."""
target = Path(pin["file"])
if not target.is_absolute():
target = ROOT / target
if not target.is_file():
raise Refused("the file %s of the pin cannot be found" % pin["file"])
got = sha256_of(target)
if got != pin["sha256"]:
raise Refused("%s has sha256 %s, the pin says %s: change both in one commit" % (pin["file"], got, pin["sha256"]))
return target.resolve()
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n", 1)[0])
sub = ap.add_subparsers(dest="cmd", required=True)
s = sub.add_parser("set")
s.add_argument("--pin", default="ci/intermediates.pin.json")
ns = ap.parse_args(argv)
try:
path = resolve(load_pin(ns.pin), ns.pin)
except Refused as exc:
print("ci_lab_intermediates: %s" % exc, file=sys.stderr)
return 1
line = "%s=%s" % (ENV, path)
env_file = os.environ.get("GITHUB_ENV")
if env_file:
with open(env_file, "a", encoding="utf-8", newline="\n") as fh:
fh.write(line + "\n")
else:
print(line)
return 0
if __name__ == "__main__":
sys.exit(main())
+87
View File
@@ -0,0 +1,87 @@
"""The security state of a CI leg: a fixed, ready directory of the repository, and the variable that makes the core use it.
python scripts/ci_lab_security_state.py set [--pin ci/security-state.pin.json] # checks the directory against the pin, exports STEALTHFOX_SECURITY_STATE
Why this exists: without ``STEALTHFOX_SECURITY_STATE`` the core downloads Mozilla's security-state collections on a cold cache (in line, at the first launch or at
`invisible_playwright fetch`), has the engine generate the state from them and copies it into every profile. A CI leg reaches no site for its data, runs no generation and
every run has to have the same bytes, so the leg launches with ``ci/security-state/``: a ready directory that holds ONLY ``securitystate-result.json`` (a result with no
data: format 1, ok, no CRLite hashes, zero timestamps, no engine) and no ``security_state/``, so a launch copies nothing. With the variable set the core neither downloads
nor generates, ever. ``ci/security-state.pin.json`` holds the sha256 of that file: ``set`` refuses to go on when the file is not that, or when the directory holds
anything else.
``set`` writes ``STEALTHFOX_SECURITY_STATE=<absolute directory>`` to ``$GITHUB_ENV`` (every later step of the job sees it) and, when there is no ``$GITHUB_ENV``, to
stdout. The paths of the pin are relative to the repository, not to the working directory of the caller.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import sys
from pathlib import Path
ENV = "STEALTHFOX_SECURITY_STATE"
ROOT = Path(__file__).resolve().parents[1]
class Refused(Exception):
pass
def sha256_of(path) -> str:
return hashlib.sha256(Path(path).read_bytes()).hexdigest()
def load_pin(path) -> dict:
try:
pin = json.loads(Path(path).read_text(encoding="utf-8"))
except (OSError, ValueError) as exc:
raise Refused("the pin %s cannot be read: %s" % (path, exc))
sha = pin.get("sha256") if isinstance(pin, dict) else None
if not isinstance(sha, str) or len(sha) != 64 or any(c not in "0123456789abcdef" for c in sha):
raise Refused("the pin %s has no sha256 that is a sha256" % path)
if not isinstance(pin.get("file"), str) or not pin["file"]:
raise Refused("the pin %s names no file" % path)
return pin
def resolve(pin: dict, pin_path) -> Path:
"""The directory of the file the pin names, checked: the file has the pinned sha256 and it is the ONLY entry of its directory."""
target = Path(pin["file"])
if not target.is_absolute():
target = ROOT / target
if not target.is_file():
raise Refused("the file %s of the pin cannot be found" % pin["file"])
got = sha256_of(target)
if got != pin["sha256"]:
raise Refused("%s has sha256 %s, the pin says %s: change both in one commit" % (pin["file"], got, pin["sha256"]))
others = sorted(p.name for p in target.parent.iterdir() if p.name != target.name)
if others:
raise Refused("the directory %s holds more than %s: %s" % (target.parent, target.name, ", ".join(others)))
return target.parent.resolve()
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n", 1)[0])
sub = ap.add_subparsers(dest="cmd", required=True)
s = sub.add_parser("set")
s.add_argument("--pin", default="ci/security-state.pin.json")
ns = ap.parse_args(argv)
try:
path = resolve(load_pin(ns.pin), ns.pin)
except Refused as exc:
print("ci_lab_security_state: %s" % exc, file=sys.stderr)
return 1
line = "%s=%s" % (ENV, path)
env_file = os.environ.get("GITHUB_ENV")
if env_file:
with open(env_file, "a", encoding="utf-8", newline="\n") as fh:
fh.write(line + "\n")
else:
print(line)
return 0
if __name__ == "__main__":
sys.exit(main())
+135
View File
@@ -0,0 +1,135 @@
#!/usr/bin/env python3
"""Writes ci/py-lock/playwright-browsers.json: the sha256 of every archive of Playwright's own Firefox that the engine series' gate installs (ci-03).
The rows of the gate that compare the engine with the stock Firefox install it from Playwright's CDN. A third-party download is checked by a hash pinned in a
repository, so the archives are pinned HERE, at the wrapper_ref the gate selects, for the Playwright of scripts/playwright_pin.txt: what
`python -m playwright install --dry-run firefox` lists on each platform (Firefox, FFmpeg, and winldd on Windows), each downloaded once and hashed.
python scripts/ci_playwright_browsers.py [--python python] [--out ci/py-lock/playwright-browsers.json]
The interpreter must have the pinned Playwright installed (the dry-run is what names the archives, so a different version names different ones). The output is
sorted by platform, entries in the order the dry-run lists them, LF, two-space indent, so the same input gives the same bytes.
tests/test_the_playwright_browsers_pin_follows_the_pin.py reads the committed file with `problems`, offline.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import re
import subprocess
import sys
import urllib.request
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
OUT_PATH = ROOT / "ci" / "py-lock" / "playwright-browsers.json"
PLAYWRIGHT_PIN = ROOT / "scripts" / "playwright_pin.txt"
#: The CDN the dry-run is asked to name (the gate downloads from the same host).
DOWNLOAD_HOST = "https://cdn.playwright.dev/dbazure/download/playwright"
#: platform name in the file -> PLAYWRIGHT_HOST_PLATFORM_OVERRIDE of the dry-run.
PLATFORMS = {"ubuntu24.04-x64": "ubuntu24.04-x64", "win64": "win64"}
#: The archive kinds the dry-run lists for each platform (the first path segment after builds/).
KINDS = {"ubuntu24.04-x64": ["firefox", "ffmpeg"], "win64": ["firefox", "ffmpeg", "winldd"]}
PATH_RE = re.compile(r"^builds/([a-z0-9_-]+)/[0-9]+/[A-Za-z0-9._-]+\.zip$")
SHA_RE = re.compile(r"^[0-9a-f]{64}$")
def problems(data: object, pin: str) -> list:
"""What is wrong with a parsed playwright-browsers.json, given the Playwright pin; an empty list when it is sound."""
out = []
if not isinstance(data, dict) or set(data) != {"playwright", "platforms"}:
return ["the file is not an object with exactly `playwright` and `platforms`"]
if data["playwright"] != pin.strip():
out.append("playwright is %r but scripts/playwright_pin.txt pins %r: regenerate with scripts/ci_playwright_browsers.py" % (data["playwright"], pin.strip()))
platforms = data["platforms"]
if not isinstance(platforms, dict) or set(platforms) != set(PLATFORMS):
return out + ["platforms are %r, expected %r" % (sorted(platforms) if isinstance(platforms, dict) else platforms, sorted(PLATFORMS))]
for name in sorted(PLATFORMS):
entries = platforms[name]
if not isinstance(entries, list):
out.append("%s: not a list" % name)
continue
kinds = []
for e in entries:
path = e.get("path") if isinstance(e, dict) else None
m = PATH_RE.match(path) if isinstance(path, str) else None
if not m:
out.append("%s: %r is not a relative `builds/<kind>/<revision>/<archive>.zip` path" % (name, path))
continue
kinds.append(m.group(1))
if not isinstance(e.get("sha256"), str) or not SHA_RE.match(e["sha256"]):
out.append("%s: %s has no 64-hex sha256" % (name, path))
if "size" in e and not (isinstance(e["size"], int) and not isinstance(e["size"], bool) and e["size"] > 0):
out.append("%s: %s has a size that is not a positive integer" % (name, path))
if set(e) - {"path", "sha256", "size"}:
out.append("%s: %s has unknown fields %s" % (name, path, sorted(set(e) - {"path", "sha256", "size"})))
if sorted(kinds) != sorted(KINDS[name]):
out.append("%s: the archives are %s, the dry-run lists %s" % (name, sorted(kinds), sorted(KINDS[name])))
return out
def installed_version(py: str) -> str:
return subprocess.run([py, "-c", "import importlib.metadata as m; print(m.version('playwright'))"], capture_output=True, text=True, check=True).stdout.strip()
def dry_run_paths(py: str, platform: str) -> list:
env = dict(os.environ, PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=PLATFORMS[platform], PLAYWRIGHT_DOWNLOAD_HOST=DOWNLOAD_HOST)
dry = subprocess.run([py, "-m", "playwright", "install", "--dry-run", "firefox"], capture_output=True, text=True, env=env, check=True).stdout
urls = re.findall(r"Download url:\s+(\S+)", dry)
prefix = DOWNLOAD_HOST + "/"
bad = [u for u in urls if not u.startswith(prefix)]
if bad or not urls:
raise SystemExit("%s: the dry-run names %r, not archives of %s" % (platform, bad or urls, DOWNLOAD_HOST))
return [u[len(prefix):] for u in urls]
def fetch_hash(path: str) -> tuple:
h, size = hashlib.sha256(), 0
with urllib.request.urlopen(DOWNLOAD_HOST + "/" + path, timeout=300) as r:
while chunk := r.read(1 << 20):
h.update(chunk)
size += len(chunk)
return h.hexdigest(), size
def render(data: object) -> str:
"""The bytes of the file for a parsed content: two-space indent, LF, one trailing newline (the same content always gives the same bytes)."""
return json.dumps(data, indent=2) + "\n"
def build(py: str, pin: str) -> str:
version = installed_version(py)
if version != pin.strip():
raise SystemExit("the interpreter has playwright %s, scripts/playwright_pin.txt pins %s: install the pinned one" % (version, pin.strip()))
platforms = {}
for name in sorted(PLATFORMS):
entries = []
for path in dry_run_paths(py, name):
sha, size = fetch_hash(path)
entries.append({"path": path, "sha256": sha, "size": size})
print(name, path, size, sha, flush=True)
platforms[name] = entries
data = {"playwright": version, "platforms": platforms}
bad = problems(data, pin)
if bad:
raise SystemExit("the generated file is not sound: " + "; ".join(bad))
return render(data)
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
ap.add_argument("--python", default=sys.executable, help="interpreter with the pinned playwright installed (default: this one)")
ap.add_argument("--out", default=str(OUT_PATH))
a = ap.parse_args(argv)
text = build(a.python, PLAYWRIGHT_PIN.read_text(encoding="utf-8"))
Path(a.out).write_text(text, encoding="utf-8", newline="\n")
print("%s written" % Path(a.out).name)
return 0
if __name__ == "__main__":
sys.exit(main())
+852
View File
@@ -0,0 +1,852 @@
#!/usr/bin/env python3
"""The poisoned host of the page A/B oracle.
The page oracle compares two engines on one machine, so a value both read from that machine passes the comparison. This puts values on the
machine that the engine must never read, for the run of the page oracle only (the job of that leg: the host oracle's parsers read
tracerpt and strace output and are not in it), and proves that they are there with a NEGATIVE CONTROL: Playwright's own Firefox on the
same runner reads them. The engine's dumps are then held to the identity the core declares, never to the poison.
poison where Firefox reads it what the engine declares instead
time zone Lima (UTC-5, no DST): Windows `tzutil`, Linux `TZ` the zone of the host gate's reference (Asia/Bangkok), by the launch
language ja-JP: Windows `Set-Culture` and the user language list, en-US, by the launch
Linux `LANG`
colour scheme dark: Windows AppsUseLightTheme=0, Linux `GTK_THEME` the scheme of the seed's persona (dark for 40% of them)
fonts a user-installed CANARY font, family `ZZHostCanary`: no such family: a user font is not the declared machine's
Windows machine-wide fonts (the Fonts folder of the system and HKLM; the runner is an administrator), Linux ~/.local/share/fonts
audio (Linux) a null sink at 96000 Hz and 6 channels, the default sink the persona's sample rate (44100 or 48000) and channel count
The canary is generated here, byte for byte the same every time (`canary_font()`: a TrueType font of three glyphs, written from the
specification, no third-party font and so no licence): every letter and digit is a box 1.5 em wide, so a page that reads the family
measures a text far wider than any fallback. Its sha256 is CANARY_SHA256 and the tests hold the two together.
python ci_poison_host.py apply [--state FILE] [--no-audio] put the poison on this machine (and verify it); writes the undo state
python ci_poison_host.py verify [--expect-env] the poison is in force (--expect-env: this process also inherited the variables)
python ci_poison_host.py undo --state FILE put back what apply found
python ci_poison_host.py control --out FILE the negative control: stock Firefox of Playwright reads the poison, or exit 2 (broken control)
python ci_poison_host.py font --out FILE write the canary font
Windows warning. `Set-Culture` changes the number and date formats of every process started after it. Every PowerShell this script runs
starts by forcing the invariant culture on its own thread, and the state it keeps is text it read before the change: nothing here
parses a formatted number or a date. The poison belongs to the page oracle's job and `undo` runs before that job's judge.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import re
import struct
import subprocess
import sys
from pathlib import Path
from typing import Callable
HERE = Path(__file__).resolve().parent
PAGE = HERE / "host_gate" / "host_gate_page.html"
FAMILY = "ZZHostCanary"
FONT_FILE = FAMILY + ".ttf"
#: Where Firefox must read Lima from, in the two spellings: the Windows id and the IANA name (the offsets are what a page tells apart).
WINDOWS_ZONE, IANA_ZONE = "SA Pacific Standard Time", "America/Lima"
LIMA_OFFSETS = [300, 300]
CULTURE, LINUX_LANG = "ja-JP", "ja_JP.UTF-8"
GTK_THEME = "Adwaita:dark"
SINK, SINK_RATE, SINK_CHANNELS = "hostcanary", 96000, 6
SINK_MAP = "front-left,front-right,front-center,lfe,rear-left,rear-right"
#: The variables a Linux poison puts in the environment of the later steps ($GITHUB_ENV), and the one that says it is on.
LINUX_ENV = {"TZ": IANA_ZONE, "LANG": LINUX_LANG, "LANGUAGE": "ja", "GTK_THEME": GTK_THEME}
#: A text of 12 'm' at 12px in the canary: 12 boxes of 1.5 em. A generic family that measures this is the canary.
CANARY_TEXT_WIDTH = 216.0
GENERICS = ("sans-serif", "serif", "monospace")
SWITCH = "AB_ORACLE_POISON"
#: The variable that names the file `apply` wrote its undo state to.
STATE_SWITCH = "AB_ORACLE_POISON_STATE"
THEME_KEY = r"HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
FONTS_KEY = r"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"
FONT_VALUE = FAMILY + " (TrueType)"
Run = Callable[[list], tuple]
# -
# The canary font.
def _checksum(data: bytes) -> int:
data += b"\0" * (-len(data) % 4)
return sum(struct.unpack(">%dI" % (len(data) // 4), data)) & 0xFFFFFFFF
def _pad(data: bytes) -> bytes:
return data + b"\0" * (-len(data) % 4)
def canary_font() -> bytes:
"""A TrueType font, family ZZHostCanary, of three glyphs: .notdef and every character of U+0021..U+007E are boxes, U+0020 is blank.
The advance of a box is 1500 units of 1000 per em, the space's 500. Deterministic: no clock, no randomness."""
upem, box_advance, space_advance = 1000, 1500, 500
box = struct.pack(">hhhhh", 1, 100, 0, 1400, 700) + struct.pack(">H", 3) + struct.pack(">H", 0) + bytes([1, 1, 1, 1]) \
+ struct.pack(">4h", 100, 0, 1300, 0) + struct.pack(">4h", 0, 700, 0, -700)
glyf = _pad(box) + _pad(box) # .notdef and the box: the same drawing
loca = struct.pack(">4I", 0, len(_pad(box)), 2 * len(_pad(box)), 2 * len(_pad(box))) # .notdef, box, space (empty)
hmtx = struct.pack(">HhHhHh", box_advance, 100, box_advance, 100, space_advance, 0)
head = struct.pack(">IIIIHHqqhhhhHHhhh", 0x00010000, 0x00010000, 0, 0x5F0F3CF5, 0x000B, upem,
3_700_000_000, 3_700_000_000, 0, 0, 1400, 700, 0, 8, 2, 1, 0)
hhea = struct.pack(">IhhhHhhhhhhhhhhhH", 0x00010000, 800, -200, 0, box_advance, 100, 100, 1400, 1, 0, 0, 0, 0, 0, 0, 0, 3)
maxp = struct.pack(">IHHHHHHHHHHHHHH", 0x00010000, 3, 4, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)
os2 = struct.pack(">HhHHH11h", 4, 1500, 400, 5, 0, 650, 600, 0, 75, 650, 600, 0, 350, 50, 250, 0)
os2 += bytes(10) + struct.pack(">IIII", 1, 0, 0, 0) + b"NONE"
os2 += struct.pack(">HHHhhhHHII", 0x40, 0x20, 0x7E, 800, -200, 0, 800, 200, 1, 0) + struct.pack(">hhHHH", 500, 700, 0, 0x20, 1)
post = struct.pack(">IIhhIIIII", 0x00030000, 0, -100, 50, 0, 0, 0, 0, 0)
# cmap: format 4, one segment per character (a constant glyph needs no glyph-index array)
chars = [(0x20, 2)] + [(c, 1) for c in range(0x21, 0x7F)]
ends = [c for c, _ in chars] + [0xFFFF]
deltas = [(g - c) & 0xFFFF for c, g in chars] + [1]
seg = len(ends)
sub = (struct.pack(">HHHHHHH", 4, 16 + 8 * seg, 0, seg * 2, 128, 6, 2 * seg - 128)
+ struct.pack(">%dH" % seg, *ends) + struct.pack(">H", 0) + struct.pack(">%dH" % seg, *ends)
+ struct.pack(">%dH" % seg, *deltas) + struct.pack(">%dH" % seg, *([0] * seg)))
cmap = struct.pack(">HHHHI", 0, 1, 3, 1, 12) + sub
names = {1: FAMILY, 2: "Regular", 3: FAMILY + "-Regular-1.000", 4: FAMILY + " Regular", 5: "Version 1.000", 6: FAMILY + "-Regular"}
strings, records = b"", b""
for nid in sorted(names):
text = names[nid].encode("utf-16-be")
records += struct.pack(">HHHHHH", 3, 1, 0x409, nid, len(text), len(strings))
strings += text
name = struct.pack(">HHH", 0, len(names), 6 + 12 * len(names)) + records + strings
tables = {b"OS/2": os2, b"cmap": cmap, b"glyf": glyf, b"head": head, b"hhea": hhea, b"hmtx": hmtx,
b"loca": loca, b"maxp": maxp, b"name": name, b"post": post}
n = len(tables)
out = struct.pack(">IHHHH", 0x00010000, n, 128, 3, n * 16 - 128)
offset = 12 + 16 * n
body = b""
for tag in sorted(tables):
data = tables[tag]
out += struct.pack(">4sIII", tag, _checksum(data), offset + len(body), len(data))
body += _pad(data)
font = bytearray(out + body)
head_at = offset + sum(len(_pad(tables[t])) for t in sorted(tables) if t < b"head") + 8
struct.pack_into(">I", font, head_at, (0xB1B0AFBA - _checksum(bytes(font))) & 0xFFFFFFFF)
return bytes(font)
#: The sha256 of canary_font(): a font that changed is a different poison, said here and held by a test.
CANARY_SHA256 = "fc1a766e6253f2791fb422f241db7e14a9793a8975ebd867c13e1257110e4045"
def canary_sha256() -> str:
return hashlib.sha256(canary_font()).hexdigest()
def read_tables(font: bytes) -> dict:
"""{tag: bytes} of an sfnt, after checking the directory's checksums and the whole-file checksum (head.checkSumAdjustment)."""
n = struct.unpack_from(">H", font, 4)[0]
tables = {}
for i in range(n):
tag, csum, off, length = struct.unpack_from(">4sIII", font, 12 + 16 * i)
data = font[off:off + length]
if tag != b"head" and _checksum(data) != csum:
raise ValueError("table %r: bad checksum" % tag)
tables[tag.decode("latin-1")] = data
if _checksum(font) != 0xB1B0AFBA:
raise ValueError("the whole-file checksum is not the one head.checkSumAdjustment makes")
return tables
# -
# What the page reads: the probe lives in the page (host_gate_page.html, between the two markers) and the control evaluates the same text.
PROBE_BEGIN, PROBE_END = "// ab.poison:begin", "// ab.poison:end"
def probe_source(page: Path = PAGE) -> str:
"""The probe function of the page, `const abPoisonProbe = async () => {...};`, exactly as the page runs it."""
text = page.read_text(encoding="utf-8")
if text.count(PROBE_BEGIN) != 1 or text.count(PROBE_END) != 1 or text.index(PROBE_BEGIN) > text.index(PROBE_END):
raise SystemExit("%s must hold the probe between one %r and one %r" % (page.name, PROBE_BEGIN, PROBE_END))
return text.split(PROBE_BEGIN, 1)[1].split(PROBE_END, 1)[0]
# -
# The engine under the poison: what its dumps must say instead.
def declared(seed: int, reference=None, dpr: float = 1.0) -> dict:
"""What the identity of `seed` declares for each poisoned value: from the core's prefs of the seed (the dark scheme, the audio chain) and
from the retail reference of the host gate (the zone and the language the launch declares, the strings they make)."""
import ci_host_gate as gate
import persona_cover as personas
prefs = {k: json.loads(v) for k, v in personas.seed_features(seed)[1].items()}
intl = gate.reference_items(reference or gate.REFERENCE, dpr)["surface.intl"]
return {"timezone": intl["DateTimeFormat"]["timeZone"], "offsets": intl["offsets"], "locale": intl["DateTimeFormat"]["locale"],
"language": intl["languages"][0], "date_full": intl["strings"][4], "number": intl["strings"][3],
"dark": bool(prefs["ui.systemUsesDarkTheme"]),
"sample_rate": prefs[personas.P + "audio.sample_rate"], "max_channels": prefs[personas.P + "audio.max_channel_count"]}
def _is_canary_width(width) -> bool:
return isinstance(width, (int, float)) and abs(width - CANARY_TEXT_WIDTH) < 0.5
def findings(probe, want: dict) -> list:
"""What an engine's `ab.poison` leaves say about the host, against `want` (declared()): every line is a value that is the machine's
(or that is not what the persona declares), empty when the page read none of the poison. A page that dumped no probe is a finding too:
it would pass anything."""
if not isinstance(probe, dict) or not probe:
return ["the dump has no ab.poison leaves: the page did not read the poison, so nothing was checked"]
out = []
def expect(key, value, what):
if probe.get(key) != value:
out.append("%s: the page read %s, the identity declares %s" % (what, json.dumps(probe.get(key)), json.dumps(value)))
expect("timezone", want["timezone"], "time zone")
expect("offsets", want["offsets"], "UTC offsets of January and July")
if probe.get("offsets") == LIMA_OFFSETS and want["offsets"] != LIMA_OFFSETS:
out.append("time zone: the offsets are the host's Lima (UTC-5, no DST)")
expect("language", want["language"], "navigator.language")
expect("intl_locale", want["locale"], "the default Intl locale")
expect("date_full", want["date_full"], "a full date")
expect("number", want["number"], "a formatted number")
expect("dark", want["dark"], "prefers-color-scheme dark")
canary = probe.get("canary")
if not isinstance(canary, dict) or "present" not in canary:
out.append("canary font: the probe did not measure it")
elif canary["present"]:
out.append("canary font: a page measures the user-installed family %s (its text is %s wide, a fallback's %s)"
% (FAMILY, json.dumps(canary.get("with")), json.dumps(canary.get("without"))))
generic = probe.get("generic")
if not isinstance(generic, list) or len(generic) != len(GENERICS):
out.append("generic families: the probe did not measure them: %s" % json.dumps(generic))
else:
out += ["generic family %s: a page measures %s wide, the canary's width: the host's fontconfig chose it" % (g, w)
for g, w in zip(GENERICS, generic) if _is_canary_width(w)]
audio = probe.get("audio")
if not isinstance(audio, dict):
out.append("audio: the probe did not read the audio context: %s" % json.dumps(audio))
else:
if audio.get("sampleRate") != want["sample_rate"]:
out.append("audio: sampleRate %s, the persona declares %s" % (audio.get("sampleRate"), want["sample_rate"]))
if audio.get("maxChannelCount") != want["max_channels"]:
out.append("audio: maxChannelCount %s, the persona declares %s" % (audio.get("maxChannelCount"), want["max_channels"]))
return out
def dump_findings(dump: dict, wants: Callable = declared) -> list:
"""findings() of every visit of a packed dump (ci_ab_oracle.pack), as 'seed N dprD: line'."""
out = []
for visit in dump.get("visits", []):
probe = visit["items"].get("ab.poison")
out += ["seed %d dpr %s: %s" % (visit["seed"], visit["dpr"], line) for line in findings(probe, wants(visit["seed"]))]
return out
# -
# The by-product: what the published engine reads from the host that the poison changes.
#
# The same job dumps the published engine on the CLEAN runner (before the poison is applied) and, in the oracle's own run, on the POISONED one,
# the same seeds. Every leaf that differs is a host dependency the published engine ALREADY has: not a failure of the candidate and never red,
# a finding, kept in a file of its own and summarised in the job's summary.
def clean_file(engine_tag: str) -> str:
"""poison-clean-70.json for firefox-70: the published engine's dump on the clean runner (ci_ab_oracle.clean_name). The tag is the one the published set carries."""
return "poison-clean-%s.json" % engine_tag.rsplit("-", 1)[-1]
def dependence_file(engine_tag: str) -> str:
return "poison-host-dependence-%s.json" % engine_tag.rsplit("-", 1)[-1]
DEPENDENCE_FORMAT = "poison-host-dependence/1"
CLIP = 300
def _clip(value):
text = json.dumps(value, sort_keys=True, ensure_ascii=False)
return value if len(text) <= CLIP else {"clipped": text[:CLIP], "len": len(text)}
def host_dependence(clean: dict, poisoned: dict) -> dict:
"""The leaves of the published engine that differ between its dump on the clean runner and on the poisoned one (both packed dumps,
ci_ab_oracle.pack), over the visits both have: {"visits", "missing", "leaves_compared", "differences": [{seed, dpr, leaf, clean, poisoned}]}."""
import ci_host_gate as gate
def by_visit(dump):
return {(v["dpr"], v["seed"]): {k: x for k, x in gate.leaves(v["items"]).items() if not gate.is_diag(k)} for v in dump.get("visits", [])}
a, b = by_visit(clean), by_visit(poisoned)
both = sorted(set(a) & set(b), key=lambda k: (k[1], k[0]))
differences, compared = [], 0
for dpr, seed in both:
for leaf in sorted(set(a[(dpr, seed)]) | set(b[(dpr, seed)])):
compared += 1
x, y = a[(dpr, seed)].get(leaf, "<missing>"), b[(dpr, seed)].get(leaf, "<missing>")
if x != y:
differences.append({"seed": seed, "dpr": dpr, "leaf": leaf, "clean": _clip(x), "poisoned": _clip(y)})
return {"format": DEPENDENCE_FORMAT, "visits": ["seed %d dpr %s" % (s, d) for d, s in both],
"missing": ["seed %d dpr %s" % (s, d) for d, s in sorted(set(a) ^ set(b), key=lambda k: (k[1], k[0]))],
"leaves_compared": compared, "differences": differences}
def dependence_markdown(report: dict | None) -> str:
"""The summary section of the job: the count, the leaves by family and the first few with both values."""
lines = ["### Host dependencies of the published engine (clean runner against poisoned runner)", ""]
if report is None:
return "\n".join(lines + ["No dump of the published engine on the clean runner: the step before the poison did not write one, "
"so the by-product is not available in this run.", ""])
diffs = report["differences"]
lines.append("%d of %d leaves differ over %d visits (%s). Each is a value the engine read from the host that the poison changed: "
"a finding about the published engine, not a failure of the candidate." % (len(diffs), report["leaves_compared"], len(report["visits"]),
", ".join(report["visits"]) or "none"))
if report["missing"]:
lines.append("Visits that only one of the two dumps has: %s." % ", ".join(report["missing"]))
families = {}
for d in diffs:
families[".".join(d["leaf"].split(".")[:2])] = families.get(".".join(d["leaf"].split(".")[:2]), 0) + 1
if families:
lines += ["", "| family | leaves |", "|---|---|"] + ["| %s | %d |" % kv for kv in sorted(families.items(), key=lambda kv: (-kv[1], kv[0]))[:30]]
lines += ["", "| seed | leaf | clean | poisoned |", "|---|---|---|---|"]
for d in diffs[:40]:
lines.append("| %s | %s | %s | %s |" % (d["seed"], d["leaf"], json.dumps(d["clean"], ensure_ascii=False)[:80].replace("|", "/"),
json.dumps(d["poisoned"], ensure_ascii=False)[:80].replace("|", "/")))
return "\n".join(lines + [""])
def write_dependence(out: Path, summary: Path | None = None, engine_tag: str | None = None) -> dict | None:
"""Write the dependence file in `out` from the clean dump and the published engine's dump there (named for `engine_tag`, by default the tag the published set carries),
and the markdown to `summary` (the job's $GITHUB_STEP_SUMMARY). Returns the report, or None when there is no clean dump. Never a verdict."""
import ci_ab_oracle as oracle
engine_tag = engine_tag or oracle.default_tag()
clean, poisoned = out / clean_file(engine_tag), out / oracle.dump_name(engine_tag)
report = None
if clean.is_file() and poisoned.is_file():
report = host_dependence(json.loads(clean.read_text(encoding="utf-8")), json.loads(poisoned.read_text(encoding="utf-8")))
(out / dependence_file(engine_tag)).write_text(json.dumps(report, sort_keys=True, ensure_ascii=False), encoding="utf-8")
text = dependence_markdown(report)
if summary:
with open(summary, "a", encoding="utf-8", newline="\n") as f:
f.write(text + "\n")
print(text)
return report
# -
# The negative control: what stock Firefox must read on the poisoned runner.
#: The requirements of the control: what stock Firefox must read of the poison on the poisoned runner, or the control is broken.
REQUIRED = ("timezone", "dark", "canary", "audio", "generic", "language")
#: IN TRIAL: requirements whose reading by stock Firefox is not yet shown on GitHub. They are still measured and printed (poison-control.json, "in_trial",
#: and the job summary), never silently, but they do not make the control broken until a run shows that stock reads them. {requirement: the systems where
#: it is in trial}. Empty since the two causes of run 45026082150 were taken away (the theme pref of Playwright's cfg, see reference_firefox; the per-user
#: font, now machine-wide); a requirement that a run shows unread goes back here, never silently dropped.
IN_TRIAL: dict = {}
def in_trial(requirement: str, system: str) -> bool:
return system in IN_TRIAL.get(requirement, ())
def control_failures(probe, system: str) -> list:
"""[(requirement, message)] of what stock Firefox did NOT read of the poison and must have. `system` is 'linux' or 'windows' (audio is Linux's)."""
if not isinstance(probe, dict):
return [("probe", "the probe returned %s" % json.dumps(probe))]
return [(name, message) for name, message in _control_misses(probe, system) if name in REQUIRED and not in_trial(name, system)]
def _control_misses(probe: dict, system: str) -> list:
"""Every requirement stock Firefox did not read, whether required, in trial or neither."""
out = []
if probe.get("offsets") != LIMA_OFFSETS:
out.append(("timezone", "stock Firefox read the offsets %s, not Lima's %s" % (json.dumps(probe.get("offsets")), LIMA_OFFSETS)))
if not language_reads(probe)["japanese"]:
out.append(("language", "stock Firefox read no Japanese language, date or number format: %s" % json.dumps(language_reads(probe)["reads"], ensure_ascii=False)))
if probe.get("dark") is not True:
out.append(("dark", "stock Firefox read prefers-color-scheme dark = %s" % json.dumps(probe.get("dark"))))
canary = probe.get("canary")
if not isinstance(canary, dict) or canary.get("present") is not True:
out.append(("canary", "stock Firefox did not measure the user-installed family %s: %s" % (FAMILY, json.dumps(canary))))
if system == "linux":
generic = probe.get("generic")
if not isinstance(generic, list) or not generic or not all(_is_canary_width(w) for w in generic):
out.append(("generic", "stock Firefox measured the generic families %s, not the canary's %s: the user's fonts.conf was not read"
% (json.dumps(generic), CANARY_TEXT_WIDTH)))
audio = probe.get("audio")
if not isinstance(audio, dict) or audio.get("sampleRate") != SINK_RATE:
out.append(("audio", "stock Firefox read the audio %s, not the null sink's %d Hz" % (json.dumps(audio), SINK_RATE)))
return out
def control_trials(probe, system: str) -> list:
"""[(requirement, message)] of the requirements IN TRIAL that stock Firefox did not read: measured and told, never a verdict."""
if not isinstance(probe, dict):
return []
every = _control_misses(probe, system)
return [(name, message) for name, message in every if in_trial(name, system)]
def language_reads(probe) -> dict:
"""What stock read of the language, for the log: the leaves and whether any of them is Japanese."""
keys = ("language", "languages", "intl_locale", "date_full", "number")
reads = {k: probe.get(k) for k in keys} if isinstance(probe, dict) else {}
text = json.dumps(reads, ensure_ascii=False)
return {"reads": reads, "japanese": bool(re.search(r'"ja\b|"ja-|[぀-ヿ一-鿿]', text))}
def control_markdown(report: dict) -> str:
"""The control's section of the job summary: what stock Firefox read, the broken requirements, and the ones in trial that it did not read."""
lines = ["### Negative control (stock Firefox of Playwright on the poisoned %s runner)" % report["system"], "",
"Verdict: **%s**." % report["verdict"]]
lines += ["- BROKEN (%s): %s" % (f["requirement"], f["message"]) for f in report["failures"]]
trial = report["in_trial"]
lines.append("In trial (measured, not required): %s." % (", ".join("%s on %s" % (k, "/".join(v)) for k, v in sorted(trial["requirements"].items())) or "none"))
lines += ["- not read, in trial (%s): %s" % (f["requirement"], f["message"]) for f in trial["not_read"]]
if not trial["not_read"]:
lines.append("- every requirement in trial was read")
return "\n".join(lines) + "\n\n"
def system_name() -> str:
return "windows" if sys.platform == "win32" else "linux"
#: What Playwright's Firefox forces in its own playwright.cfg that the poison is about: a pref, set before anything reads the host, answers the scheme
#: whatever the system says (widget/nsXPLookAndFeel.cpp GetIntValue reads the pref first, NativeGetInt after). The reference is a Firefox WITHOUT it.
CFG_DARK_PREF = "ui.systemUsesDarkTheme"
def reference_firefox(executable: str, dest: Path) -> tuple:
"""A copy of Playwright's own Firefox in `dest` whose playwright.cfg does not force the colour scheme; returns (path of its executable,
[the lines taken out]). The copy is the same build with the same other prefs: only the pref that overrides the system's theme is gone, so the
reference is a Firefox that reads the machine. Raises when the cfg is not where Playwright puts it or has no such line (the reference would not
be what it is said to be)."""
import shutil
source = Path(executable).resolve().parent
shutil.copytree(source, dest / source.name, symlinks=True)
root = dest / source.name
cfgs = sorted(root.glob("playwright.cfg")) or sorted(root.rglob("playwright.cfg"))
if not cfgs:
raise RuntimeError("Playwright's Firefox has no playwright.cfg under %s: the reference cannot be made" % source.name)
removed, kept = [], []
text = cfgs[0].read_bytes().decode("utf-8")
for line in text.splitlines(keepends=True):
if re.match(r"\s*(pref|lockPref|defaultPref)\(\"%s\"" % re.escape(CFG_DARK_PREF), line):
removed.append(line.strip())
else:
kept.append(line)
if not removed:
raise RuntimeError("playwright.cfg does not force %s: the reference was expected to differ from it" % CFG_DARK_PREF)
cfgs[0].write_bytes("".join(kept).encode("utf-8"))
return str(root / Path(executable).name), removed
def control(out: Path, headless: bool = False) -> int:
"""Launch Playwright's own Firefox (headed: a headless Firefox has no theme to read) on this runner, read the probe, write `out`.
0 when it read the poison, 2 BROKEN CONTROL (the poison is not in force or the control cannot see it)."""
from playwright.sync_api import sync_playwright
out.parent.mkdir(parents=True, exist_ok=True)
probe = None
error = None
removed = []
try:
import tempfile
with sync_playwright() as p, tempfile.TemporaryDirectory(prefix="poison-control-", ignore_cleanup_errors=True) as work:
executable, removed = reference_firefox(p.firefox.executable_path, Path(work))
browser = p.firefox.launch(executable_path=executable, headless=headless, firefox_user_prefs={"intl.regional_prefs.use_os_locales": True})
try:
# Playwright's default is a LIGHT scheme (an emulation): the control must follow the system, as a user's browser does
page = browser.new_context(color_scheme="no-override").new_page()
page.goto("about:blank")
probe = page.evaluate("(async () => {%s; return await abPoisonProbe(); })()" % probe_source())
finally:
browser.close()
except Exception as e: # noqa: BLE001 - a control that could not run is a broken control, with the reason
error = "%s: %s" % (type(e).__name__, str(e)[:500])
failures = [("run", error)] if error else control_failures(probe, system_name())
trials = control_trials(probe, system_name())
report = {"format": "poison-control/1", "system": system_name(), "probe": probe, "language": language_reads(probe),
"failures": [{"requirement": n, "message": m} for n, m in failures], "verdict": "green" if not failures else "broken",
"in_trial": {"requirements": {k: list(v) for k, v in IN_TRIAL.items()}, "not_read": [{"requirement": n, "message": m} for n, m in trials]},
"reference": {"taken_out_of_playwright_cfg": removed}}
out.write_text(json.dumps(report, sort_keys=True, indent=1, ensure_ascii=False), encoding="utf-8")
print("stock Firefox read: %s" % json.dumps(probe, sort_keys=True, ensure_ascii=False))
print("language, informational: %s" % json.dumps(report["language"], sort_keys=True, ensure_ascii=False))
for name, message in failures:
print("BROKEN CONTROL (%s): %s" % (name, message))
for name, message in trials:
print("IN TRIAL, not required (%s): %s" % (name, message))
summary = os.environ.get("GITHUB_STEP_SUMMARY")
if summary:
with open(summary, "a", encoding="utf-8", newline="\n") as f:
f.write(control_markdown(report))
print("POISON CONTROL %s" % ("OK" if not failures else "BROKEN"))
return 0 if not failures else 2
# -
# Putting the poison on a machine, and taking it off.
def _run(cmd: list) -> tuple:
try:
done = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=180)
except (OSError, subprocess.SubprocessError) as e: # the program is not on this machine, or did not answer
return 127, "%s: %s" % (type(e).__name__, e)
return done.returncode, (done.stdout or "") + (done.stderr if done.returncode else "")
#: Every PowerShell of this script: the invariant culture on its own thread first (the culture of the machine is what the poison changes).
PS_PRELUDE = ("[System.Threading.Thread]::CurrentThread.CurrentCulture = [System.Globalization.CultureInfo]::InvariantCulture; "
"$ErrorActionPreference = 'Stop'; ")
def ps(script: str) -> list:
return ["powershell.exe", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", PS_PRELUDE + script]
def _ok(run: Run, cmd: list, what: str) -> str:
rc, text = run(cmd)
if rc != 0:
raise SystemExit("the poison could not %s (exit %s): %s" % (what, rc, text.strip()[:400]))
return text.strip()
def _try(run: Run, cmd: list) -> str:
rc, text = run(cmd)
return text.strip() if rc == 0 else ""
def font_path_windows(env=None) -> Path:
"""Where the canary goes on Windows: the Fonts folder of the system, which every user and every process reads (HKLM lists it, FONTS_KEY)."""
env = env or os.environ
return Path(env.get("SystemRoot") or env.get("WINDIR") or "C:" + chr(92) + "Windows") / "Fonts" / FONT_FILE
def font_dir_linux(env=None) -> Path:
env = env or os.environ
base = env.get("XDG_DATA_HOME") or str(Path(env.get("HOME") or Path.home()) / ".local" / "share")
return Path(base) / "fonts"
def _reg_get(name: str) -> list:
return ps("$v = (Get-ItemProperty -Path '%s' -Name %s -ErrorAction SilentlyContinue).%s; if ($null -ne $v) { $v }" % (THEME_KEY, name, name))
def _reg_set(name: str, value) -> list:
if value in ("", None):
return ps("Remove-ItemProperty -Path '%s' -Name %s -ErrorAction SilentlyContinue" % (THEME_KEY, name))
return ps("New-ItemProperty -Path '%s' -Name %s -Value %s -PropertyType DWord -Force | Out-Null" % (THEME_KEY, name, int(value)))
def apply_windows(run: Run = _run, font_dir: Path | None = None) -> dict:
"""Put the poison on this Windows machine; returns the state `undo_windows` needs (what was there before, as text read before any change)."""
font = font_path_windows() if font_dir is None else Path(font_dir) / FONT_FILE
state = {"system": "windows", "font": str(font),
"timezone": _ok(run, ["tzutil", "/g"], "read the time zone"),
"culture": _ok(run, ps("(Get-Culture).Name"), "read the culture"),
"languages": _ok(run, ps("(Get-WinUserLanguageList | ForEach-Object { $_.LanguageTag }) -join ','"), "read the user languages"),
"theme": {n: _try(run, _reg_get(n)) for n in ("AppsUseLightTheme", "SystemUsesLightTheme")}}
_ok(run, ["tzutil", "/s", WINDOWS_ZONE], "set the time zone")
_ok(run, ps("Set-Culture -CultureInfo '%s'" % CULTURE), "set the culture")
_ok(run, ps("Set-WinUserLanguageList -LanguageList '%s' -Force" % CULTURE), "set the user language list")
for name in state["theme"]:
_ok(run, _reg_set(name, 0), "set " + name)
font.parent.mkdir(parents=True, exist_ok=True)
font.write_bytes(canary_font())
_ok(run, ps("New-ItemProperty -Path '%s' -Name '%s' -Value '%s' -PropertyType String -Force | Out-Null" % (FONTS_KEY, FONT_VALUE, font)),
"register the canary font")
_announce_font(str(font))
state["after"] = windows_reads(run)
return state
def primary_language(tag: str) -> str:
"""The language of a tag, whatever its form: 'ja', 'ja-JP' and 'ja_JP' are Japanese."""
return re.split(r"[-_]", (tag or "").strip(), maxsplit=1)[0].lower()
def windows_reads(run: Run = _run) -> dict:
"""What this Windows machine reports about the poison, in the form it reports it (Windows keeps the tag 'ja' for the list that was set from
'ja-JP'): the apply records it and verify holds the machine to it later, besides the semantic check that it is Japanese."""
return {"timezone": _try(run, ["tzutil", "/g"]),
"culture": _try(run, ps("(Get-Culture).Name")),
"languages": _try(run, ps("(Get-WinUserLanguageList | ForEach-Object { $_.LanguageTag }) -join ','")),
"theme": {n: _try(run, _reg_get(n)) for n in ("AppsUseLightTheme", "SystemUsesLightTheme")}}
def _announce_font(path: str) -> None:
"""Tell the running session about the font (AddFontResourceW and WM_FONTCHANGE); a process started later reads the registry anyway."""
try:
import ctypes
ctypes.windll.gdi32.AddFontResourceW(path)
ctypes.windll.user32.SendMessageTimeoutW(0xFFFF, 0x001D, 0, 0, 2, 1000, None)
except Exception: # noqa: BLE001 - best effort: the registry entry is what a new process reads
pass
def _forget_font(path: str) -> None:
try:
import ctypes
ctypes.windll.gdi32.RemoveFontResourceW(path)
except Exception: # noqa: BLE001 - best effort, as the announcement
pass
def undo_windows(state: dict, run: Run = _run) -> None:
font = Path(state["font"])
_try(run, ps("Remove-ItemProperty -Path '%s' -Name '%s' -ErrorAction SilentlyContinue" % (FONTS_KEY, FONT_VALUE)))
_forget_font(str(font))
try:
font.unlink()
except OSError:
pass
for name, value in state["theme"].items():
_try(run, _reg_set(name, value))
if state.get("languages"):
_try(run, ps("Set-WinUserLanguageList -LanguageList %s -Force" % ",".join("'%s'" % t for t in state["languages"].split(","))))
if state.get("culture"):
_try(run, ps("Set-Culture -CultureInfo '%s'" % state["culture"]))
if state.get("timezone"):
_try(run, ["tzutil", "/s", state["timezone"]])
def verify_windows(run: Run = _run, state: dict | None = None) -> list:
problems = []
font = Path(state["font"]) if state else font_path_windows()
tz = _try(run, ["tzutil", "/g"])
if tz != WINDOWS_ZONE:
problems.append("time zone is %r, not %r" % (tz, WINDOWS_ZONE))
reads = windows_reads(run)
recorded = (state or {}).get("after") or {}
for what, value in (("culture", reads["culture"]), ("first user language", reads["languages"].split(",")[0])):
if primary_language(value) != primary_language(CULTURE):
problems.append("the %s is %r, which is not Japanese" % (what, value))
for key, what in (("culture", "culture"), ("languages", "user language list")):
if recorded.get(key) and reads[key] != recorded[key]:
problems.append("the %s is %r, the apply recorded %r" % (what, reads[key], recorded[key]))
for name in ("AppsUseLightTheme", "SystemUsesLightTheme"):
value = _try(run, _reg_get(name))
if value != "0":
problems.append("%s is %r, not 0 (dark)" % (name, value))
registered = _try(run, ps("(Get-ItemProperty -Path '%s' -Name '%s' -ErrorAction SilentlyContinue).'%s'" % (FONTS_KEY, FONT_VALUE, FONT_VALUE)))
if os.path.normcase(registered) != os.path.normcase(str(font)):
problems.append("the canary font is registered at %r, not %r" % (registered, str(font)))
problems += _font_file_problems(font)
return problems
def _font_file_problems(font: Path) -> list:
if not font.is_file():
return ["the canary font file %s is missing" % font.name]
if hashlib.sha256(font.read_bytes()).hexdigest() != CANARY_SHA256:
return ["the canary font file is not the canary (sha256 differs from %s)" % CANARY_SHA256]
return []
def _sudo(cmd: list) -> list:
return cmd if getattr(os, "geteuid", lambda: 0)() == 0 else ["sudo", "-n"] + cmd
def _sink_server(info: str) -> str:
m = re.search(r"^Server String:\s*(\S+)", info, re.M)
return m.group(1) if m else ""
def fonts_conf() -> str:
"""The user's fontconfig file of the Linux poison: the canary is the first choice of the three generic families, and the rendering
settings are ones no desktop has (no antialiasing, full hinting, rgb subpixels, the light LCD filter). The engine's default FcConfig is
still the host's (FcConfigSubstitute(nullptr, ...) in gfxFcPlatformFontList and ScaledFontFontconfig), so a page that reads what this
changes read the host."""
aliases = "".join(' <alias binding="strong"><family>%s</family><prefer><family>%s</family></prefer></alias>\n' % (g, FAMILY) for g in GENERICS)
return ('<?xml version="1.0"?>\n<!DOCTYPE fontconfig SYSTEM "fonts.dtd">\n<fontconfig>\n' + aliases
+ ' <match target="font">\n'
' <edit name="antialias" mode="assign"><bool>false</bool></edit>\n'
' <edit name="hinting" mode="assign"><bool>true</bool></edit>\n'
' <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>\n'
' <edit name="rgba" mode="assign"><const>rgb</const></edit>\n'
' <edit name="lcdfilter" mode="assign"><const>lcdlight</const></edit>\n'
' </match>\n</fontconfig>\n')
def fonts_conf_path(env=None) -> Path:
env = env or os.environ
base = env.get("XDG_CONFIG_HOME") or str(Path(env.get("HOME") or Path.home()) / ".config")
return Path(base) / "fontconfig" / "fonts.conf"
def apply_linux(run: Run = _run, font_dir: Path | None = None, audio: bool = True, conf_file: Path | None = None) -> dict:
"""Put the poison on this Linux machine; returns the state `undo_linux` needs. The environment part is for the later steps of the job
(state["env"], appended to $GITHUB_ENV by `apply`)."""
fonts = font_dir_linux() if font_dir is None else Path(font_dir)
state = {"system": "linux", "font": str(fonts / FONT_FILE), "env": dict(LINUX_ENV),
"before_env": {k: os.environ.get(k, "") for k in list(LINUX_ENV) + ["PULSE_SERVER"]}, "module": ""}
if "ja_jp.utf8" not in _try(run, ["locale", "-a"]).lower().replace("-", ""):
_ok(run, _sudo(["locale-gen", LINUX_LANG]), "generate the %s locale" % LINUX_LANG)
fonts.mkdir(parents=True, exist_ok=True)
(fonts / FONT_FILE).write_bytes(canary_font())
conf = fonts_conf_path() if conf_file is None else Path(conf_file)
state["fonts_conf"] = {"path": str(conf), "before": conf.read_text(encoding="utf-8") if conf.is_file() else None}
conf.parent.mkdir(parents=True, exist_ok=True)
conf.write_text(fonts_conf(), encoding="utf-8", newline="\n")
_ok(run, ["fc-cache", "-f", str(fonts)], "refresh the font cache")
if audio:
_try(run, ["pulseaudio", "--daemonize=yes", "--exit-idle-time=-1", "--disallow-exit"])
module = _ok(run, ["pactl", "load-module", "module-null-sink", "sink_name=" + SINK, "rate=%d" % SINK_RATE,
"channels=%d" % SINK_CHANNELS, "channel_map=" + SINK_MAP, "sink_properties=device.description=" + SINK],
"load the null sink")
state["module"] = module
_ok(run, ["pactl", "set-default-sink", SINK], "make the null sink the default")
server = _sink_server(_try(run, ["pactl", "info"]))
if server:
state["env"]["PULSE_SERVER"] = server if "://" in server or ":" in server.split("/")[0] else "unix:" + server
return state
def undo_linux(state: dict, run: Run = _run) -> None:
if state.get("module"):
_try(run, ["pactl", "unload-module", state["module"]])
_try(run, ["pulseaudio", "--kill"])
font = Path(state["font"])
try:
font.unlink()
except OSError:
pass
saved = state.get("fonts_conf")
if saved: # the file that was there comes back, or the one this wrote goes
conf = Path(saved["path"])
try:
if saved["before"] is None:
conf.unlink()
else:
conf.write_text(saved["before"], encoding="utf-8", newline="\n")
except OSError:
pass
_try(run, ["fc-cache", "-f", str(font.parent)])
def verify_linux(run: Run = _run, state: dict | None = None, expect_env: bool = False, audio: bool = True, env=None) -> list:
problems = []
font = Path(state["font"]) if state else font_dir_linux() / FONT_FILE
if "ja_jp.utf8" not in _try(run, ["locale", "-a"]).lower().replace("-", ""):
problems.append("the %s locale is not installed" % LINUX_LANG)
problems += _font_file_problems(font)
if FAMILY not in _try(run, ["fc-list", ":", "family"]):
problems.append("fontconfig does not list the family %s" % FAMILY)
conf = Path(state["fonts_conf"]["path"]) if state and state.get("fonts_conf") else fonts_conf_path()
if not conf.is_file() or conf.read_text(encoding="utf-8") != fonts_conf():
problems.append("the user's fonts.conf is not the poison's")
for generic in GENERICS:
picked = _try(run, ["fc-match", "-f", "%{family}", generic])
if FAMILY not in picked:
problems.append("fontconfig answers %r for %s, not the canary" % (picked, generic))
if audio:
sinks = _try(run, ["pactl", "list", "short", "sinks"])
line = next((ln for ln in sinks.splitlines() if SINK in ln), "")
if "%dch %dHz" % (SINK_CHANNELS, SINK_RATE) not in line:
problems.append("the null sink %s is not %d channels at %d Hz: %r" % (SINK, SINK_CHANNELS, SINK_RATE, line))
if SINK not in _try(run, ["pactl", "get-default-sink"]):
problems.append("the null sink is not the default sink")
if expect_env:
e = os.environ if env is None else env
problems += ["%s is %r in this process, not %r" % (k, e.get(k), v) for k, v in LINUX_ENV.items() if e.get(k) != v]
if audio and not e.get("PULSE_SERVER"):
problems.append("PULSE_SERVER is not set in this process: Firefox would not find the null sink's server")
return problems
def verify_here(expect_env: bool = False, run: Run = _run) -> list:
"""Is the poison in force on this machine, for a process that wants to know (the page oracle's test): what apply wrote in the state file
named by AB_ORACLE_POISON_STATE tells where the font is and whether there is a null sink."""
state_file = os.environ.get(STATE_SWITCH)
state = json.loads(Path(state_file).read_text(encoding="utf-8")) if state_file and Path(state_file).is_file() else None
if system_name() == "windows":
return verify_windows(run, state)
return verify_linux(run, state, expect_env, audio=bool(state and state.get("audio")))
def github_env_lines(env: dict) -> str:
return "".join("%s=%s\n" % (k, v) for k, v in env.items())
def apply(state_file: Path | None, audio: bool = True, run: Run = _run) -> int:
system = system_name()
state = apply_windows(run) if system == "windows" else apply_linux(run, audio=audio)
state["audio"] = audio and system == "linux"
if state_file:
state_file.parent.mkdir(parents=True, exist_ok=True)
state_file.write_text(json.dumps(state, sort_keys=True, indent=1), encoding="utf-8")
target = os.environ.get("GITHUB_ENV")
if target and state_file: # what was changed must be undoable even when it is not in force: the undo step reads this
with open(target, "a", encoding="utf-8", newline="\n") as f:
f.write(github_env_lines({STATE_SWITCH: str(state_file.resolve())}))
problems = verify_windows(run, state) if system == "windows" else verify_linux(run, state, audio=state["audio"])
for p in problems:
print("POISON NOT IN FORCE: " + p)
if problems:
return 2
env = dict(state.get("env", {}), **{SWITCH: "1"})
if state_file:
env[STATE_SWITCH] = str(state_file.resolve())
if target:
with open(target, "a", encoding="utf-8", newline="\n") as f:
f.write(github_env_lines(env))
print("the host is poisoned (%s): %s" % (system, json.dumps({k: v for k, v in state.items() if k not in ("before_env",)}, sort_keys=True)))
return 0
def undo(state_file: Path, run: Run = _run) -> int:
state = json.loads(state_file.read_text(encoding="utf-8"))
if state["system"] == "windows":
undo_windows(state, run)
else:
undo_linux(state, run)
target = os.environ.get("GITHUB_ENV")
if target: # the later steps of the job read what it was
with open(target, "a", encoding="utf-8", newline="\n") as f:
f.write(github_env_lines(dict(state["before_env"], **{SWITCH: "", STATE_SWITCH: ""})))
print("the poison is taken off (%s)" % state["system"])
return 0
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
sub = ap.add_subparsers(dest="cmd", required=True)
a = sub.add_parser("apply")
a.add_argument("--state", type=Path)
a.add_argument("--no-audio", action="store_true", help="Linux: no null audio sink")
v = sub.add_parser("verify")
v.add_argument("--state", type=Path)
v.add_argument("--expect-env", action="store_true")
v.add_argument("--no-audio", action="store_true")
u = sub.add_parser("undo")
u.add_argument("--state", type=Path, required=True)
c = sub.add_parser("control")
c.add_argument("--out", type=Path, required=True)
c.add_argument("--headless", action="store_true")
f = sub.add_parser("font")
f.add_argument("--out", type=Path, required=True)
args = ap.parse_args(argv)
if args.cmd == "apply":
return apply(args.state, audio=not args.no_audio)
if args.cmd == "undo":
return undo(args.state)
if args.cmd == "control":
return control(args.out, args.headless)
if args.cmd == "font":
args.out.write_bytes(canary_font())
print(canary_sha256())
return 0
state = json.loads(args.state.read_text(encoding="utf-8")) if args.state else None
system = system_name()
problems = verify_windows(_run, state) if system == "windows" else verify_linux(_run, state, args.expect_env, not args.no_audio)
for p in problems:
print("POISON NOT IN FORCE: " + p)
return 2 if problems else 0
if __name__ == "__main__":
sys.exit(main())
+442
View File
@@ -0,0 +1,442 @@
#!/usr/bin/env python3
"""The PUBLISHED SET: the control side of every A/B oracle, exactly as a user installs it.
An A/B oracle holds a candidate against the engine published before it. That engine is not a binary alone: it is launched by the core that declares the prefs it
requires (the engine refuses a launch whose declarations are not the ones it was built for), and that core is the one the published wrapper pins. So the control
side is a SET, and nothing in it is chosen by hand: the last published `invisible-playwright` on PyPI pins its core exactly, and that core's seal pins its engine.
ci/py-lock/published.txt the set as a lock (ci-03): the wrapper and the core it pins, each at an exact version with the sha256 of EVERY file of that
version on the index, and the requirements each declares (the headers), which the gate's own lock must satisfy.
python scripts/ci_published_set.py resolve [--write] reads PyPI (the only command that does), prints the lock, or writes it
python scripts/ci_published_set.py check PyPI's last release against the committed lock: red when they differ (.github/workflows/published-set.yml)
python scripts/ci_published_set.py install --house DIR --venv DIR [--lock FILE]
OFFLINE and hash-checked: a venv of its own with the gate's third-party lock (DIR/lock.txt), then the two wheels of the set by their hashes
(`--no-deps`, from DIR/published: the wheelhouse of the run, whose job downloaded the files this lock names there). Prints the venv's python.
DIR itself holds the candidate's wheels of the same two packages (built from core_ref and wrapper_ref, and at an equal version with the SAME
file names): the set never takes a file of invisible-core or invisible-playwright from DIR, only from DIR/published.
python scripts/ci_published_set.py verify --python PY what that python imports is the lock's set, from its own venv and from nowhere else
python scripts/ci_published_set.py fetch --work DIR (run BY the set's python) fetches the engine the way a user's core does: its own seal
python scripts/ci_published_set.py tag (run BY the set's python) the tag its seal names
Exit codes: 0 green, 1 red (a finding), 2 the command could not run.
The candidate's side is untouched: its core is core_ref's, its wrapper is wrapper_ref's, its engine is the candidate.
"""
from __future__ import annotations
import argparse
import base64
import hashlib
import json
import os
import re
import subprocess
import sys
import urllib.request
import zipfile
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
LOCK_PATH = ROOT / "ci" / "py-lock" / "published.txt"
GATE_LOCK_PATH = ROOT / "ci" / "py-lock" / "gate.txt"
#: Where the wheelhouse of the run keeps the two wheels of the published set (the wheelhouse's own folder holds the candidate's wheels of the same names).
PUBLISHED_DIR = "published"
#: What install writes in the venv: which wheel of each package it installed (file name, sha256) and the digest of every file of the package as that wheel holds it. verify reads it
#: and holds it to the lock and to the disk: the lock and the candidate's lock can name the same package at the same version, so a version says nothing of WHICH file is installed.
RECORD_FILE = "published-set.json"
RECORD_FORMAT = "published-set-installed/1"
WRAPPER = "invisible-playwright"
CORE = "invisible-core"
INDEX = "https://pypi.org/pypi"
HASH_RE = re.compile(r"^--hash=sha256:([0-9a-f]{64})$")
PIN_RE = re.compile(r"^([A-Za-z0-9][A-Za-z0-9._-]*)==([0-9][A-Za-z0-9.!+_-]*)$")
HEADER = ("The PUBLISHED SET, the control side of the A/B oracles (scripts/ci_published_set.py): the last published invisible-playwright and the invisible-core it pins "
"(its seal pins the engine). Written by `python scripts/ci_published_set.py resolve --write`; .github/workflows/published-set.yml keeps it equal to the index.")
#: What a process of the published set must not inherit from the candidate's job: anything that makes its python import another wrapper or another core, or run
#: another engine's seal. The set is what its venv holds, as it is on a user's machine.
SET_LEAKS = ("PYTHONPATH", "PYTHONHOME", "PYTHONSTARTUP", "PYTHONUSERBASE", "VIRTUAL_ENV", "INVISIBLE_SEAL_FILE", "INVISIBLE_CORE_PIN", "INVISIBLE_CORE_AUTOFIX",
"INVISIBLE_PLAYWRIGHT_ENGINE_DIR")
def norm(name: str) -> str:
return re.sub(r"[-_.]+", "-", name).lower()
# -
# The lock: text <-> parts (pure, no network)
def _release_parts(release: dict, name: str) -> tuple:
"""(version, [sha256 of every file], [requirements without extras]) of a PyPI release document (`/pypi/<name>/<version>/json`)."""
info = release.get("info") or {}
if norm(info.get("name") or "") != norm(name):
raise ValueError("the document is of %r, not %s" % (info.get("name"), name))
files = [f for f in release.get("urls") or [] if not f.get("yanked")]
hashes = sorted({(f.get("digests") or {}).get("sha256", "") for f in files})
if not files or not all(re.fullmatch(r"[0-9a-f]{64}", h) for h in hashes):
raise ValueError("%s %s has no file with a sha256 on the index" % (name, info.get("version")))
if not any(f.get("packagetype") == "bdist_wheel" for f in files):
raise ValueError("%s %s has no wheel on the index" % (name, info.get("version")))
requires = [r for r in (info.get("requires_dist") or []) if "extra ==" not in r]
return info["version"], hashes, requires
def core_pin_of(requires: list) -> str:
"""The version of `invisible-core==X` among the requirements of the wrapper; ValueError when there is not exactly one exact pin."""
pins = []
for r in requires:
m = re.fullmatch(r"\s*invisible[-_.]core\s*==\s*([0-9][A-Za-z0-9.!+_-]*)\s*(?:;.*)?", r)
if m:
pins.append(m.group(1))
if len(pins) != 1:
raise ValueError("the published wrapper does not pin invisible-core exactly once with `==` (it declares %s)" % (requires or "nothing"))
return pins[0]
def lock_text(wrapper_release: dict, core_release: dict) -> str:
version, hashes, requires = _release_parts(wrapper_release, WRAPPER)
core_version, core_hashes, core_requires = _release_parts(core_release, CORE)
pin = core_pin_of(requires)
if pin != core_version:
raise ValueError("%s %s pins invisible-core==%s but the core document is of %s" % (WRAPPER, version, pin, core_version))
others = [r for r in requires if not re.match(r"\s*invisible[-_.]core\b", r, re.I)]
out = ["# " + HEADER,
"# wrapper-requires: " + " | ".join(sorted(others)),
"# core-requires: " + " | ".join(sorted(core_requires))]
for name, v, hs in ((CORE, core_version, core_hashes), (WRAPPER, version, hashes)):
out.append("%s==%s \\" % (name, v))
out.append(" \\\n".join(" --hash=sha256:" + h for h in hs))
return "\n".join(out) + "\n"
def parse_lock(text: str) -> dict:
"""{"wrapper": (version, hashes), "core": (version, hashes), "wrapper_requires": [...], "core_requires": [...]}; ValueError names what is wrong.
Every entry is `name==version` with at least one sha256: no range, no URL, no entry without a hash."""
meta, entries, current = {}, {}, None
joined = text.replace("\\\n", " ")
for raw in joined.splitlines():
line = raw.strip()
if not line:
continue
m = re.match(r"^#\s*(wrapper-requires|core-requires):\s*(.*)$", line)
if m:
meta[m.group(1)] = [r.strip() for r in m.group(2).split(" | ") if r.strip()]
continue
if line.startswith("#"):
continue
parts = line.split()
pin = PIN_RE.match(parts[0])
if not pin:
raise ValueError("a line that is not `name==version --hash=sha256:...`: %r" % line[:80])
hashes = []
for p in parts[1:]:
h = HASH_RE.match(p)
if not h:
raise ValueError("%s: %r is not a --hash=sha256:<64 hex>" % (parts[0], p[:40]))
hashes.append(h.group(1))
if not hashes:
raise ValueError("%s has no hash: an entry without a hash is an unchecked install" % parts[0])
current = norm(pin.group(1))
if current in entries:
raise ValueError("%s is listed twice" % current)
entries[current] = (pin.group(2), sorted(hashes))
if sorted(entries) != sorted([CORE, WRAPPER]):
raise ValueError("the lock holds %s, it must hold exactly %s and %s" % (sorted(entries), CORE, WRAPPER))
for key in ("wrapper-requires", "core-requires"):
if key not in meta:
raise ValueError("the header line `# %s:` is missing" % key)
return {"wrapper": entries[WRAPPER], "core": entries[CORE], "wrapper_requires": meta["wrapper-requires"], "core_requires": meta["core-requires"]}
def locked_versions(gate_text: str) -> dict:
"""{normalized name: version} of the pinned entries of a lock (ci/py-lock/gate.txt)."""
out = {}
for line in gate_text.replace("\\\n", " ").splitlines():
m = PIN_RE.match(line.split()[0]) if line.strip() and not line.lstrip().startswith("#") else None
if m:
out[norm(re.sub(r"\[.*\]", "", m.group(1)))] = m.group(2)
return out
def problems_of_lock(parsed: dict, gate_text: str) -> list:
"""What makes the set not installable, offline, over the gate's lock: the wrapper's pin of the core is not the core in the lock, or a requirement of either is
not met by the third-party package the gate's lock holds (the venv of the set is the gate's lock plus these two wheels, `--no-deps`)."""
from packaging.requirements import Requirement # the gate lock installs it (pytest needs it); resolve/check do not come here
problems = []
try:
pin = core_pin_of(parsed["wrapper_requires"] + ["%s==%s" % (CORE, parsed["core"][0])])
if pin != parsed["core"][0]:
problems.append("the lock names core %s" % parsed["core"][0])
except ValueError as e:
problems.append(str(e))
held = locked_versions(gate_text)
for owner, requires in (("the published wrapper", parsed["wrapper_requires"]), ("the published core", parsed["core_requires"])):
for text in requires:
req = Requirement(text)
if req.marker is not None and not req.marker.evaluate({"extra": ""}):
continue
version = held.get(norm(req.name))
if version is None:
problems.append("%s requires %s: the gate's lock (ci/py-lock/gate.txt) does not hold it, so the set cannot be installed offline" % (owner, text))
elif not req.specifier.contains(version, prereleases=True):
problems.append("%s requires %s: the gate's lock holds %s==%s" % (owner, text, req.name, version))
return problems
# -
# The index (the only network here)
def fetch_json(url: str) -> dict:
request = urllib.request.Request(url, headers={"User-Agent": "ci-published-set"})
with urllib.request.urlopen(request, timeout=60) as response: # noqa: S310 - the index of the package, https
return json.loads(response.read().decode("utf-8"))
def resolve(get=fetch_json) -> str:
"""The lock of the last published set: PyPI's latest release of the wrapper, and the core that wrapper pins."""
latest = get("%s/%s/json" % (INDEX, WRAPPER))
version = (latest.get("info") or {}).get("version")
if not version:
raise ValueError("the index names no latest version of %s" % WRAPPER)
wrapper = get("%s/%s/%s/json" % (INDEX, WRAPPER, version))
pin = core_pin_of(_release_parts(wrapper, WRAPPER)[2])
return lock_text(wrapper, get("%s/%s/%s/json" % (INDEX, CORE, pin)))
def check(get=fetch_json, path: Path = LOCK_PATH) -> list:
"""[] when the committed lock is the index's last release; else the lines that say how it differs (and how to fix it)."""
committed = path.read_text(encoding="utf-8") if path.is_file() else ""
try:
wanted = resolve(get)
except (ValueError, OSError) as e:
return ["the index could not be read or is not what a release is: %s" % e]
if committed == wanted:
return []
old = parse_lock(committed) if committed else None
new = parse_lock(wanted)
now = "%s %s + %s %s" % (WRAPPER, new["wrapper"][0], CORE, new["core"][0])
was = "%s %s + %s %s" % (WRAPPER, old["wrapper"][0], CORE, old["core"][0]) if old else "nothing"
return ["%s holds %s but the index's last release is %s. Fix: python scripts/ci_published_set.py resolve --write, and commit it. "
"Rule: the control side of an A/B is the last published set" % (path.name, was, now)]
# -
# The venv of the set (offline) and what it must be
def venv_python(venv: Path) -> Path:
return venv / ("Scripts/python.exe" if os.name == "nt" else "bin/python")
def clean_env(extra: dict | None = None) -> dict:
env = {k: v for k, v in os.environ.items() if k not in SET_LEAKS}
env.update(extra or {})
return env
def install(house: Path, venv: Path, lock: Path = LOCK_PATH, run=subprocess.run) -> Path:
"""A venv of its own: the gate's third-party lock from the wheelhouse (`house/lock.txt`, the lock of the run), then the two wheels of the set by their hashes, from
`house/published` ONLY. Offline: `--no-index` and `--require-hashes` on both; the two are installed `--no-deps` because the first step holds everything they need.
The wheelhouse's own folder holds the candidate's wheels of invisible-core and invisible-playwright, built from core_ref and wrapper_ref; at an equal version they have
the file names of the published ones, so the published ones live in their own folder and are the only place the second step looks: a wheel of ours taken from the wheelhouse
would be the candidate's core in the control's venv, or a hash refused. pip never sees the wheelhouse's folder and `published/` in one call: with two `--find-links` it takes
the first local file of a name and fails on a hash mismatch, it does not choose by hash. Then `pip check` over the venv: red, with what pip reports, when a requirement of
the two wheels is not met."""
parse_lock(lock.read_text(encoding="utf-8")) # a lock that does not read is no install
house_lock = house / "lock.txt"
if not house_lock.is_file():
raise FileNotFoundError("the wheelhouse %s has no lock.txt (the gate's lock): it is not a py-deps wheelhouse" % house)
published = house / PUBLISHED_DIR
if not published.is_dir():
raise FileNotFoundError("the wheelhouse %s has no %s/ folder: the two wheels of the published set (the files ci/py-lock/published.txt names) are kept there, "
"apart from the candidate's wheels of the same names" % (house, PUBLISHED_DIR))
parsed = parse_lock(lock.read_text(encoding="utf-8"))
chosen = {name: published_wheel(published, name, *parsed[key]) for key, name in (("core", CORE), ("wrapper", WRAPPER))}
run([sys.executable, "-m", "venv", str(venv)], check=True)
python = str(venv_python(venv))
base = [python, "-m", "pip", "install", "--quiet", "--no-index", "--require-hashes"]
run(base + ["--find-links", str(house), "-r", str(house_lock)], check=True, env=clean_env())
run(base + ["--find-links", str(published), "--no-deps", "-r", str(lock)], check=True, env=clean_env())
# `--no-deps` installs the two wheels without looking at what they declare: pip check does, over the whole venv (the third-party lock and the two wheels).
checked = run([python, "-m", "pip", "check"], capture_output=True, text=True, env=clean_env())
if checked.returncode != 0:
raise RuntimeError("pip check of the published set's venv %s is red (the requirements of the published wheels are not met by the wheelhouse's dependencies): %s"
% (venv, (checked.stdout + checked.stderr).strip()[-1500:]))
write_record(venv, chosen)
return venv_python(venv)
def file_digest(data: bytes) -> str:
"""The digest of a file as a wheel's RECORD writes it: `sha256=<urlsafe base64, no padding>`."""
return "sha256=" + base64.urlsafe_b64encode(hashlib.sha256(data).digest()).rstrip(b"=").decode()
def published_wheel(published: Path, name: str, version: str, hashes: list) -> tuple:
"""(path, sha256) of the wheel of `name` `version` in `published` whose sha256 is one the lock holds. FileNotFoundError names what was there and what the lock holds."""
stem = name.replace("-", "_").lower() + "-" + version + "-"
seen = []
for path in sorted(published.glob("*.whl")):
if path.name.lower().startswith(stem):
sha = hashlib.sha256(path.read_bytes()).hexdigest()
if sha in hashes:
return path, sha
seen.append("%s sha256 %s" % (path.name, sha))
raise FileNotFoundError("%s %s: no wheel in %s has a sha256 the lock (ci/py-lock/published.txt) holds (%s); there %s"
% (name, version, published, ", ".join(hashes), "is " + "; ".join(seen) if seen else "is none of that name"))
def package_digests(wheel: Path, package: str) -> dict:
"""{path: digest} of every file of the package `package` in the wheel, taken from the bytes of the wheel (its RECORD is not believed)."""
with zipfile.ZipFile(wheel) as z:
return {n: file_digest(z.read(n)) for n in sorted(z.namelist()) if n.startswith(package + "/") and not n.endswith("/")}
def write_record(venv: Path, chosen: dict) -> Path:
"""`chosen` is {distribution: (wheel path, sha256)}: what was installed into `venv`, written where verify reads it."""
packages = {name: {"wheel": path.name, "sha256": sha, "files": package_digests(path, name.replace("-", "_"))} for name, (path, sha) in chosen.items()}
target = Path(venv) / RECORD_FILE
Path(venv).mkdir(parents=True, exist_ok=True)
target.write_text(json.dumps({"format": RECORD_FORMAT, "packages": packages}, sort_keys=True, indent=1) + "\n", encoding="utf-8", newline="\n")
return target
def installed_problems(prefix: str, parsed: dict, site_files: dict) -> list:
"""What the record of the venv `prefix` says was installed, against the lock and against the disk. `site_files` is {distribution: the folder that holds its package}.
A package the record names with a sha256 the lock does not hold is red, naming the file and both hashes; so is a file of the package that is not, byte for byte, the wheel's."""
path = Path(prefix) / RECORD_FILE
if not path.is_file():
return ["%s has no %s: nothing says which wheel of invisible-core and invisible-playwright was installed (install writes it); the same version can be a "
"different file (the candidate's wheels have the names of the published ones)" % (prefix, RECORD_FILE)]
record = json.loads(path.read_text(encoding="utf-8"))
problems = []
for key, name in (("core", CORE), ("wrapper", WRAPPER)):
entry = (record.get("packages") or {}).get(name)
if not entry:
problems.append("%s: the record of the venv does not name the wheel it installed" % name)
continue
lock_hashes = parsed[key][1]
if entry["sha256"] not in lock_hashes:
problems.append("%s: the file installed is %s with sha256 %s, and ci/py-lock/published.txt holds %s (the published set is %s %s)"
% (name, entry["wheel"], entry["sha256"], ", ".join(lock_hashes), name, parsed[key][0]))
for rel, digest in sorted(entry["files"].items()):
target = Path(site_files[name]) / rel
actual = file_digest(target.read_bytes()) if target.is_file() else "missing"
if actual != digest:
problems.append("%s: %s on disk is %s, the wheel %s (sha256 %s) holds %s" % (name, rel, actual, entry["wheel"], entry["sha256"], digest))
break
return problems
IDENTITY_CODE = """
import importlib.metadata as md, json, sys
import invisible_core, invisible_playwright
from invisible_core.seal import active_seal
seal = active_seal()
print(json.dumps({"prefix": sys.prefix, "core": md.version("invisible-core"), "core_version": invisible_core.__version__, "core_file": invisible_core.__file__,
"wrapper": md.version("invisible-playwright"), "wrapper_file": invisible_playwright.__file__, "seal_tag": seal.tag, "seal_local": seal.is_local}))
"""
def identity(python: str, run=subprocess.run) -> dict:
"""What `python` is when it imports the set: versions, files and the tag of the seal its core carries (read in isolated mode, with no variable of the job)."""
done = run([python, "-I", "-c", IDENTITY_CODE], capture_output=True, text=True, env=clean_env(), timeout=120)
if done.returncode != 0:
raise RuntimeError("%s could not import the published set (exit %s): %s" % (python, done.returncode, (done.stderr or done.stdout)[-800:]))
return json.loads(done.stdout.strip().splitlines()[-1])
def verify(python: str, lock: Path = LOCK_PATH, run=subprocess.run) -> list:
"""[] when `python` runs the lock's wrapper and the lock's core, both from its own prefix, under the seal its core was published with, and the files they are made of
are the wheels the lock's sha256 name (read from the record install wrote and from the disk, never assumed from the version)."""
parsed = parse_lock(lock.read_text(encoding="utf-8"))
ident = identity(python, run)
problems = []
if ident["wrapper"] != parsed["wrapper"][0] or not ident["wrapper_file"].startswith(ident["prefix"]):
problems.append("the wrapper it runs is %s from %s, the set says %s from its own venv" % (ident["wrapper"], ident["wrapper_file"], parsed["wrapper"][0]))
if ident["core"] != parsed["core"][0] or ident["core_version"] != parsed["core"][0] or not ident["core_file"].startswith(ident["prefix"]):
problems.append("the core it runs is %s (reports %s) from %s, the set says %s from its own venv"
% (ident["core"], ident["core_version"], ident["core_file"], parsed["core"][0]))
if ident["seal_local"]:
problems.append("its core runs under a local seal: a published core carries a release seal")
problems += installed_problems(ident["prefix"], parsed, {CORE: str(Path(ident["core_file"]).parent.parent), WRAPPER: str(Path(ident["wrapper_file"]).parent.parent)})
return problems
# -
# What the set's own python does (the commands below are run BY it: they import the published core)
def fetch(work: Path) -> dict:
"""The engine of the core this python has, fetched the way a user's core fetches it: its own seal, its own download, its own verification."""
from invisible_core import download
from invisible_core.seal import active_seal
work = Path(work)
os.environ[download.ENGINE_DIR_ENV] = str(work / "engines")
seal = active_seal()
binary = download.ensure_binary()
return {"binary": str(binary), "tag": seal.tag, "describe": seal.describe()}
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
sub = ap.add_subparsers(dest="cmd", required=True)
r = sub.add_parser("resolve")
r.add_argument("--write", action="store_true")
sub.add_parser("check")
i = sub.add_parser("install")
i.add_argument("--house", type=Path, required=True)
i.add_argument("--venv", type=Path, required=True)
i.add_argument("--lock", type=Path, default=LOCK_PATH)
v = sub.add_parser("verify")
v.add_argument("--python", required=True)
v.add_argument("--lock", type=Path, default=LOCK_PATH)
f = sub.add_parser("fetch")
f.add_argument("--work", type=Path, required=True)
sub.add_parser("tag")
args = ap.parse_args(argv)
try:
if args.cmd == "resolve":
text = resolve()
if args.write:
LOCK_PATH.write_text(text, encoding="utf-8", newline="\n")
print("wrote %s" % LOCK_PATH)
else:
sys.stdout.write(text)
return 0
if args.cmd == "check":
problems = check()
print("\n".join("FAIL " + p for p in problems) if problems else "OK the committed published set is the index's last release")
return 1 if problems else 0
if args.cmd == "install":
python = install(args.house, args.venv, args.lock)
problems = verify(str(python), args.lock)
for name, entry in sorted(json.loads((args.venv / RECORD_FILE).read_text(encoding="utf-8"))["packages"].items()):
print("installed %s: %s sha256 %s" % (name, entry["wheel"], entry["sha256"]), file=sys.stderr)
if problems:
print("\n".join("FAIL " + p for p in problems))
return 1
print(python)
return 0
if args.cmd == "verify":
problems = verify(args.python, args.lock)
print("\n".join("FAIL " + p for p in problems) if problems else "OK")
return 1 if problems else 0
if args.cmd == "fetch":
print(json.dumps(fetch(args.work)))
return 0
if args.cmd == "tag":
from invisible_core.seal import active_seal
print(active_seal().tag)
return 0
except (ValueError, OSError, RuntimeError, subprocess.CalledProcessError) as e:
print("ERROR %s: %s" % (type(e).__name__, e))
return 2
return 2
if __name__ == "__main__":
sys.exit(main())
+208
View File
@@ -0,0 +1,208 @@
#!/usr/bin/env python3
"""Writes ci/py-lock/gate.in from its sources and compiles ci/py-lock/gate.txt, the lock of the `gate` environment (ci-03).
The engine series' gate installs the wrapper's environment from a wheelhouse resolved once per image, Python and lock, offline: no unpinned `pip install`
anywhere. The lock of that environment lives HERE, because what it must cover is declared here and is read at the wrapper_ref the gate selects. It holds every
THIRD-PARTY distribution the gate installs from the wrapper:
* the wrapper's dependencies (`[project].dependencies` of pyproject.toml, without `invisible_core`, which is built as a wheel of ours) and its `dev` extra;
* the dependencies of the core the wrapper pins (`invisible_core==X`: the `[project].dependencies` of the core's pyproject.toml at the tag vX);
* playwright at scripts/playwright_pin.txt (the stock client the gate drives the engine with) and cryptography at CRYPTOGRAPHY (the lab's PKI);
* the installer the install-from-index job needs beside pytest (HARNESS: `uv`, which the release test installs the package with and the wait asks), so that
job installs its test harness from this lock and from nothing else (tests/test_the_install_job_has_every_module_its_tests_import.py).
One command regenerates both files after a dependency change or a bump of the core pin:
python scripts/ci_py_lock.py --core-pyproject <pyproject.toml of the core at the tag vX> [--exclude-newer 2026-11-25T00:00:00Z] [--uv uv]
The resolver is the series' (`uv pip compile --universal --generate-hashes --no-build`, every file of every version hashed), so the same input gives the same
bytes there and here. tests/test_the_gate_lock_follows_the_sources.py reads the committed files with this module, offline.
"""
from __future__ import annotations
import argparse
import hashlib
import re
import subprocess
import sys
import tempfile
import tomllib
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
LOCK_DIR = ROOT / "ci" / "py-lock"
IN_PATH = LOCK_DIR / "gate.in"
TXT_PATH = LOCK_DIR / "gate.txt"
PYPROJECT = ROOT / "pyproject.toml"
PLAYWRIGHT_PIN = ROOT / "scripts" / "playwright_pin.txt"
#: What the lab's PKI needs, as the series' gate installs it today.
CRYPTOGRAPHY = "cryptography==44.0.3"
#: Installers the install-from-index job (user-install.yml) needs and no dependency of the wrapper brings: the README's way in (`uv`) and the wait on the index.
HARNESS = ["uv>=0.5"]
#: The floor of the lock: the Python the unit job judges; `--universal` covers every Linux and Windows wheel of every Python from it.
PYTHON_VERSION = "3.11"
DEFAULT_EXCLUDE_NEWER = "2026-11-25T00:00:00Z"
#: The separator of the core's requirements in a header line (a requirement can contain commas).
SEP = " | "
HASH_RE = re.compile(r"^--hash=sha256:[0-9a-f]{64}$")
PIN_RE = re.compile(r"^([A-Za-z0-9][A-Za-z0-9._-]*(?:\[[A-Za-z0-9,._-]+\])?)==([A-Za-z0-9][A-Za-z0-9.!+_-]*)(?: ; (.+))?$")
CORE_PIN_RE = re.compile(r"^invisible[-_]core==([0-9][0-9A-Za-z.!+_-]*)$")
def norm(name: str) -> str:
return re.sub(r"[-_.]+", "-", name).lower()
def base_name(requirement: str) -> str:
return norm(re.split(r"[\[<>=!~ ;]", requirement, maxsplit=1)[0])
def sha256_text(text: str) -> str:
"""sha256 of the text with LF line ends: the bytes the index stores, whatever a Windows checkout did to them."""
return hashlib.sha256(text.replace("\r\n", "\n").encode("utf-8")).hexdigest()
def read_in(text: str) -> dict:
"""The input file: `# key: value` header lines, then one requirement per line."""
meta, reqs = {}, []
for line in text.replace("\r\n", "\n").splitlines():
line = line.strip()
if not line:
continue
m = re.match(r"^#\s*([a-z-]+):\s*(.*)$", line)
if m:
meta[m.group(1)] = m.group(2).strip()
elif not line.startswith("#"):
reqs.append(line)
return {"meta": meta, "requirements": reqs}
def parse_lock(text: str) -> list:
"""[(name, version, marker, [hashes])] of a lock. A line that is not `name==version [; marker]` with hashes under it is an error: a range, a URL, an
editable, an index option, an entry with no hash."""
entries, current = [], None
for lineno, raw in enumerate(text.replace("\r\n", "\n").splitlines(), 1):
line = raw.rstrip()
if not line.strip() or line.lstrip().startswith("#"):
continue
body = line.strip()
if body.endswith("\\"):
body = body[:-1].rstrip()
if body.startswith("--hash="):
if current is None or not HASH_RE.match(body):
raise ValueError("line %d: a hash that is not sha256:<64 hex>, or none to hold it: %r" % (lineno, body))
current[3].append(body.split(":", 1)[1])
continue
m = PIN_RE.match(body)
if not m or line[0] in " \t":
raise ValueError("line %d: not `name==version`: %r" % (lineno, body))
current = (m.group(1), m.group(2), m.group(3) or "", [])
entries.append(current)
for name, version, _, hashes in entries:
if not hashes:
raise ValueError("%s==%s has no --hash" % (name, version))
return entries
# ── the sources ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
def wrapper_sources(pyproject_text: str) -> dict:
"""What pyproject.toml declares: the core pin, the other dependencies, the dev extra."""
project = tomllib.loads(pyproject_text)["project"]
pins = [d for d in project["dependencies"] if CORE_PIN_RE.match(d.strip())]
if len(pins) != 1:
raise SystemExit("pyproject.toml must carry exactly one `invisible_core==X` pin, found %r" % pins)
return {
"core_version": CORE_PIN_RE.match(pins[0].strip()).group(1),
"dependencies": [d for d in project["dependencies"] if d != pins[0]],
"dev": list(project["optional-dependencies"]["dev"]),
}
def core_dependencies(core_pyproject_text: str) -> list:
return list(tomllib.loads(core_pyproject_text)["project"]["dependencies"])
def expected_requirements(pyproject_text: str, core_requires: list, playwright_pin: str) -> list:
"""The requirements the lock must cover, in the order the input prints them."""
src = wrapper_sources(pyproject_text)
reqs = set(src["dependencies"]) | set(src["dev"]) | set(core_requires) | set(HARNESS) | {"playwright==%s" % playwright_pin.strip(), CRYPTOGRAPHY}
return sorted(reqs, key=lambda r: (base_name(r), r))
def make_in(pyproject_text: str, core_pyproject_text: str, playwright_pin: str, exclude_newer: str) -> str:
src = wrapper_sources(pyproject_text)
core_requires = core_dependencies(core_pyproject_text)
head = [
"# Input of the gate lock; `python scripts/ci_py_lock.py` writes it and gate.txt from the sources below. Wrapper-owned (ci-03), read at the wrapper_ref.",
"# python-version: %s" % PYTHON_VERSION,
"# exclude-newer: %s" % exclude_newer,
"# wrapper: pyproject.toml sha256 %s (at generation); its dependencies without invisible_core, and its `dev` extra" % sha256_text(pyproject_text),
"# core: invisible_core==%s, tag v%s, pyproject.toml sha256 %s (at generation); the core is a wheel of ours, only what it depends on is locked" % (
src["core_version"], src["core_version"], sha256_text(core_pyproject_text)),
"# core-requires: %s" % SEP.join(core_requires),
"# playwright: %s from scripts/playwright_pin.txt (the stock client the gate drives the engine with)" % playwright_pin.strip(),
"# cryptography: %s (the lab's PKI)" % CRYPTOGRAPHY.split("==")[1],
"# harness: %s (the installers of the install-from-index job)" % SEP.join(HARNESS),
]
return "\n".join(head + expected_requirements(pyproject_text, core_requires, playwright_pin)) + "\n"
# ── the lock ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
def lock_header(in_text: str, meta: dict) -> str:
return "\n".join([
"# Generated by `python scripts/ci_py_lock.py`: do not edit. Wrapper-owned (ci-03).",
"# input: ci/py-lock/gate.in sha256 %s" % sha256_text(in_text),
"# resolver: uv pip compile --universal --generate-hashes --no-build --python-version %s --exclude-newer %s" % (meta["python-version"], meta["exclude-newer"]),
"# Every file of each version is hashed (Linux and Windows wheels of every Python from %s, and the sdist): one lock for every OS." % meta["python-version"],
"# A consumer installs it with: pip install --no-index --find-links <wheelhouse> --require-hashes -r <this file>",
]) + "\n"
def normalise(raw: str, header: str) -> str:
"""What uv printed (no header, no annotations) as a lock: entries by name, hashes sorted, the given header. Same input, same bytes."""
entries = sorted(parse_lock(raw), key=lambda e: (norm(e[0]), e[1], e[2]))
lines = [header.rstrip("\n")]
for name, version, marker, hashes in entries:
lines.append("%s==%s%s \\" % (name, version, (" ; " + marker) if marker else ""))
hs = sorted(set(hashes))
lines += [" --hash=sha256:%s%s" % (h, " \\" if i < len(hs) - 1 else "") for i, h in enumerate(hs)]
return "\n".join(lines) + "\n"
def compile_lock(in_text: str, uv: str = "uv") -> str:
parsed = read_in(in_text)
meta = parsed["meta"]
with tempfile.TemporaryDirectory() as tmp:
src = Path(tmp) / "in.txt"
src.write_text("\n".join(parsed["requirements"]) + "\n", encoding="utf-8")
out = subprocess.run([uv, "pip", "compile", str(src), "--universal", "--generate-hashes", "--no-build", "--no-header", "--no-annotate", "--quiet",
"--python-version", meta["python-version"], "--exclude-newer", meta["exclude-newer"]],
check=True, capture_output=True, text=True).stdout
return normalise(out, lock_header(in_text, meta))
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
ap.add_argument("--core-pyproject", required=True, help="pyproject.toml of the core at the tag of the pin (invisible_core==X -> tag vX)")
ap.add_argument("--exclude-newer", default=None, help="ignore releases newer than this (default: the one of the committed gate.in, else %s)" % DEFAULT_EXCLUDE_NEWER)
ap.add_argument("--uv", default="uv", help="the uv executable")
a = ap.parse_args(argv)
exclude = a.exclude_newer
if exclude is None:
exclude = read_in(IN_PATH.read_text(encoding="utf-8"))["meta"].get("exclude-newer") if IN_PATH.exists() else None
in_text = make_in(PYPROJECT.read_text(encoding="utf-8"), Path(a.core_pyproject).read_text(encoding="utf-8"),
PLAYWRIGHT_PIN.read_text(encoding="utf-8"), exclude or DEFAULT_EXCLUDE_NEWER)
LOCK_DIR.mkdir(parents=True, exist_ok=True)
IN_PATH.write_text(in_text, encoding="utf-8", newline="\n")
txt = compile_lock(in_text, a.uv)
TXT_PATH.write_text(txt, encoding="utf-8", newline="\n")
print("ci/py-lock/gate.in and gate.txt written (%d direct requirements, %d locked distributions)" % (len(read_in(in_text)["requirements"]), len(parse_lock(txt))))
return 0
if __name__ == "__main__":
sys.exit(main())
+116
View File
@@ -0,0 +1,116 @@
#!/usr/bin/env python3
"""Run ONE row of the whole-e2e suite against a binary, for the candidate's gate, and write ONE junit for the judge.
ci_suite_run.py --required ci/required-suites.json --suite wrapper.e2e.suite.linux.1 --os linux --binary FF --junit result/x.xml
The run is the run of ``scripts/run_e2e.py`` (``invisible_core.testing.e2e``: the two passes, ``-m "e2e and not wall_clock"`` with 4 browsers at once and then
``-m "e2e and wall_clock"`` alone, ``--dist loadfile``, the deadline per test, no rerun) on the files and node ids of the row; this script does not copy it, it calls it.
What it adds is the end: that run writes one junit per pass, and the judge (``scripts/ci_verdict.py judge``) reads one. The two are merged into ONE xunit2 file, every
testcase as pytest wrote it (``classname`` kept, no ``file``/``line``).
The exit code is 0 when the passes reached their end, red tests included: the verdict is the judge's, and a failed test is a line of its list, not a reason to lose the
junit. It is not 0 when a pass did not run to its end (interrupted, an internal error, a usage error: the code of that pass) or when no junit was written at all.
"""
from __future__ import annotations
import argparse
import copy
import os
import sys
import tempfile
import xml.etree.ElementTree as ET
from pathlib import Path
from typing import Callable, Optional, Sequence
sys.path.insert(0, str(Path(__file__).resolve().parent))
import ci_verdict # noqa: E402 (the judge: the row is read the way it reads it)
#: pytest's exit codes that mean "the pass reached its end": all passed, some failed, nothing collected (a client with no `wall_clock` test has an empty pass).
_REACHED_THE_END = (0, 1, 5)
def row_arguments(required: str, suite: str, os_name: str) -> list:
"""The files and node ids of the row, in its order (what ``ci_verdict.py args`` prints, without the marker: the passes bring their own)."""
return list(ci_verdict.find_suite(ci_verdict.load_required(required), suite, os_name)["tests"])
def pass_junits(directory: Path, procs: str = "4") -> list:
"""The junit file of each pass of the run, in the order of the passes (``invisible_core.testing.e2e`` names them)."""
from invisible_core.testing import e2e
return [e2e.junit_file(Path(directory), selection) for _width, selection in e2e.passes(procs)]
def merge_junits(paths: Sequence, out: Path) -> int:
"""Write ONE xunit2 junit with every testcase of the junit files that exist, in the order given. -> the number of testcases.
The counts of the testsuite are those of the testcases written, not the sum of the headers read: a header that disagrees with its own cases is not copied.
A path that does not exist is a pass that wrote nothing (it is not an error here: the judge counts what is in the file)."""
cases = []
for path in paths:
if not Path(path).is_file():
continue
cases += [copy.deepcopy(c) for c in ET.parse(path).getroot().iter("testcase")]
tags = [{child.tag for child in c} for c in cases]
failures = sum(1 for t in tags if "failure" in t and "error" not in t)
errors = sum(1 for t in tags if "error" in t)
skipped = sum(1 for t in tags if "skipped" in t and not ({"failure", "error"} & t))
seconds = sum(float(c.get("time") or 0) for c in cases)
suite = ET.Element("testsuite", {"name": "pytest", "errors": str(errors), "failures": str(failures), "skipped": str(skipped),
"tests": str(len(cases)), "time": "%.3f" % seconds})
suite.extend(cases)
root = ET.Element("testsuites", {"name": "pytest tests"})
root.append(suite)
out = Path(out)
out.parent.mkdir(parents=True, exist_ok=True)
ET.ElementTree(root).write(out, encoding="utf-8", xml_declaration=True)
return len(cases)
def run(required: str, suite: str, os_name: str, binary: str, junit: str, *, repo: Path, procs: Optional[str] = None,
run_e2e: Optional[Callable] = None, junit_directory: Optional[Path] = None) -> int:
"""Run the row and write the merged junit. ``run_e2e`` is ``invisible_core.testing.e2e.main`` (a fake in the unit tests)."""
from invisible_core.testing import e2e
run_e2e = run_e2e or e2e.main
arguments = row_arguments(required, suite, os_name)
directory = Path(junit_directory or tempfile.mkdtemp(prefix="invpw-suite-junit-"))
# the core reads the directory of the junit from the environment (its own order: this variable, the watchdog's folder, the checkout): one name, set for this run
before = os.environ.get(e2e.JUNIT_DIR_ENV)
os.environ[e2e.JUNIT_DIR_ENV] = str(directory)
try:
code = run_e2e([binary] + (["-n", procs] if procs else []) + arguments, repo)
finally:
if before is None:
os.environ.pop(e2e.JUNIT_DIR_ENV, None)
else:
os.environ[e2e.JUNIT_DIR_ENV] = before
written = merge_junits(pass_junits(directory, procs or "4"), Path(junit))
print("[ci_suite_run] %s on %s: %d test(s) in %s" % (suite, os_name, written, junit), flush=True)
if code not in _REACHED_THE_END:
print("[ci_suite_run] a pass did not run to its end (exit %s)" % code, file=sys.stderr)
return code
if not written:
print("[ci_suite_run] no pass wrote a junit", file=sys.stderr)
return 3
return 0
def main(argv: Optional[Sequence[str]] = None) -> int:
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("--required", required=True, help="ci/required-suites.json")
parser.add_argument("--suite", required=True, help="the id of the row")
parser.add_argument("--os", required=True, choices=ci_verdict.OSES)
parser.add_argument("--binary", required=True, help="the engine under test")
parser.add_argument("--junit", required=True, help="the one junit written for the judge")
parser.add_argument("--procs", default=None, help="browsers at once, for the first pass (default: the run's own, 4)")
ns = parser.parse_args(argv)
try:
return run(ns.required, ns.suite, ns.os, ns.binary, ns.junit, repo=Path(__file__).resolve().parent.parent, procs=ns.procs)
except ci_verdict.Usage as exc:
print("ci_suite_run.py: %s" % exc, file=sys.stderr)
return 2
if __name__ == "__main__":
sys.exit(main())
+235 -12
View File
@@ -21,6 +21,14 @@ pytest wrote and fails on every one of them.
missing (--binary is mandatory: without it exit 2) or the commit cannot be known; the --seal is unreadable.
With --main-required (the list of main) the list only grows: a suite of main is gone, its minimum went down,
its `exact` went from true to false, its os or tests lost an element, or its marker changed is red.
The one exception is `retired-tests.json` NEXT TO main's list (read from main, never from the judged branch): a file it names that
no longer exists in the checkout may leave the rows, and the minimum of a row may go down by the tests main counted for it in that
row (`tests: {row id: n}`), and by no more. A retired file still on disk, or any other lost test, stays red.
The same file may also retire single tests whose file stays: {"nodeid": "<file>::<test>", "suite": <row id>, "count": n, "reason",
"decided_by", "date", "from_min_tests"}. The minimum of that row may go down by the sum of the `count` of its entries and by no more, and
only for a nodeid whose file the row of main lists, and only while main's minimum of that row still equals `from_min_tests` (once the removal
is on main and its floor is lower, the entry is inert); a declared nodeid that the judged leg still collects is red, and so is any test that
goes without an entry.
What the file of main is can be said only by the gate, which checks main out (a failed download is not
"main has no list"): the file exists -> it is compared; it does not exist and the gate passed
--main-has-no-list (main was checked out and has no such file) -> passed, declared; it does not exist
@@ -41,6 +49,23 @@ The list is validated by all three commands (a malformed one is exit 2, with the
row `os` a non-empty subset of {linux, windows}, `tests` a non-empty list of unique strings, `min_tests` an integer > 0,
`exact` a bool, `marker` a string, `needs_root` a bool or a list of the row's OSes.
Optional fields of a row, read by the gate to build the leg of the row (absent = the plain behaviour; a field that is
present with a wrong type or value is a malformed list, exit 2, naming the row and the field; a name that is not listed
here is ignored as it always was):
runner_image object OS -> runner image name, only OSes of the row, e.g. {"windows": "windows-2022"}
(default: ubuntu-24.04 on Linux, windows-latest on Windows)
timeout_minutes integer 1..360, the timeout of the job (default 25)
needs_userns bool or list of the row's OSes: user namespaces for a normal user (the sandbox suite)
core_dumps false, "cores" or "invpw-cores" (Linux only): where the kernel writes the cores of a crashed
browser, $RUNNER_TEMP/cores or $RUNNER_TEMP/invpw-cores
stock_firefox bool or list of the row's OSes: Playwright's own Firefox is installed for the leg
location_service bool or list of the row's OSes: the Windows location service is turned on
run "pytest" (default) or "suite_run" (scripts/ci_suite_run.py, two passes)
extra_steps list of names from the closed set {fakeweb_profiles, keep_oracle_files}
moz_log string of MOZ_LOG modules appended to the suite's MOZ_LOG, no space
juggler_trace bool: the Juggler's own trace is kept with the result
artifact name of the artifact that keeps the oracle files (default: the suite id)
A required entry of "tests" is a file (at least one test of it must exist and EVERY one collected must pass) or a node
id `tests/x.py::name` (that test must pass; a parametrized test is matched on the name before `[`, and every one of its
parameters must pass).
@@ -66,6 +91,12 @@ import xml.etree.ElementTree as ET
from pathlib import Path
OSES = ("linux", "windows")
#: The optional row fields of the form "bool or a list of the row's OSes" (besides needs_root).
OS_FLAGS = ("needs_userns", "stock_firefox", "location_service")
CORE_DUMPS = ("cores", "invpw-cores")
RUN_MODES = ("pytest", "suite_run")
#: The closed set of the extra steps a row may ask of the gate (a name here is a step the gate knows how to run).
EXTRA_STEPS = ("fakeweb_profiles", "keep_oracle_files")
class Usage(Exception):
@@ -119,14 +150,70 @@ def validate_list(data):
problems.append("%s: exact must be true or false, not %r" % (where, row.get("exact")))
if not isinstance(row.get("marker"), str) or not row.get("marker").strip():
problems.append("%s: marker must be a non-empty string, not %r" % (where, row.get("marker")))
root = row.get("needs_root", False)
if not isinstance(root, bool):
if not (isinstance(root, list) and all(isinstance(o, str) for o in root) and set(root) <= set(OSES)
and (not oses_ok or set(root) <= set(oses))):
problems.append("%s: needs_root must be a bool or a list of the OSes of the row, not %r" % (where, root))
for name in ("needs_root",) + OS_FLAGS:
if name in row or name == "needs_root":
value = row.get(name, False)
if not _is_os_flag(value, oses, oses_ok):
problems.append("%s: %s must be a bool or a list of the OSes of the row, not %r" % (where, name, value))
problems.extend(_row_field_problems(row, where, oses, oses_ok))
return problems
def _is_os_flag(value, oses, oses_ok):
"""A bool, or a list of OSes that are all OSes of the row."""
if isinstance(value, bool):
return True
return (isinstance(value, list) and all(isinstance(o, str) for o in value) and set(value) <= set(OSES)
and (not oses_ok or set(value) <= set(oses)))
def _row_field_problems(row, where, oses, oses_ok):
"""The optional fields of a row that tell the gate how to build the leg (see the docstring): absent is the plain
behaviour; a field that is present with a value outside its type or its closed set is a problem, named."""
out = []
if "runner_image" in row:
image = row["runner_image"]
if not (isinstance(image, dict) and image and all(isinstance(k, str) and isinstance(v, str) and v.strip()
for k, v in image.items())):
out.append("%s: runner_image must be a non-empty object of OS -> image name, not %r" % (where, image))
else:
wrong = sorted(k for k in image if k not in OSES or (oses_ok and k not in oses))
if wrong:
out.append("%s: runner_image names an OS the row does not have: %s" % (where, ", ".join(wrong)))
if "timeout_minutes" in row:
minutes = row["timeout_minutes"]
if not _is_int(minutes) or not 0 < minutes <= 360:
out.append("%s: timeout_minutes must be an integer between 1 and 360, not %r" % (where, minutes))
if "core_dumps" in row:
dumps = row["core_dumps"]
if dumps is not False and dumps not in CORE_DUMPS:
out.append("%s: core_dumps must be false or one of %s, not %r" % (where, "/".join(CORE_DUMPS), dumps))
elif dumps is not False and oses_ok and "linux" not in oses:
out.append("%s: core_dumps is a Linux setting and the row has no linux leg" % where)
if "run" in row and (row["run"] not in RUN_MODES):
out.append("%s: run must be one of %s, not %r" % (where, "/".join(RUN_MODES), row["run"]))
if "extra_steps" in row:
steps = row["extra_steps"]
if not (isinstance(steps, list) and all(isinstance(x, str) for x in steps) and len(set(steps)) == len(steps)):
out.append("%s: extra_steps must be a list of distinct names, not %r" % (where, steps))
else:
unknown = sorted(set(steps) - set(EXTRA_STEPS))
if unknown:
out.append("%s: extra_steps names %s, outside the closed set %s"
% (where, ", ".join(unknown), ", ".join(EXTRA_STEPS)))
if "moz_log" in row:
modules = row["moz_log"]
if not (isinstance(modules, str) and modules and not any(c.isspace() for c in modules)):
out.append("%s: moz_log must be a non-empty string of MOZ_LOG modules with no space, not %r" % (where, modules))
if "juggler_trace" in row and not isinstance(row["juggler_trace"], bool):
out.append("%s: juggler_trace must be true or false, not %r" % (where, row["juggler_trace"]))
if "artifact" in row:
name = row["artifact"]
if not (isinstance(name, str) and name and all(c.isalnum() or c in "._-" for c in name)):
out.append("%s: artifact must be a non-empty name of letters, digits, '.', '_' and '-', not %r" % (where, name))
return out
def _read_json_list(path):
try:
return json.loads(Path(path).read_text(encoding="utf-8"))
@@ -248,12 +335,138 @@ def _int(value):
return value if _is_int(value) else 0
def against_main(current, main):
RETIRED_NAME = "retired-tests.json"
def validate_retired(data, suite_ids=None):
"""-> the reasons why `data` is not a well-formed list of retired tests (empty if it is). Two kinds of entry, in one list:
a FILE that is gone ({file, reason, date, tests: {row id: number of tests the file had in that row on main, counted with the row's marker}}), and
a single TEST whose file stays ({nodeid: "<file>::<test>", suite: row id, count > 0, reason, decided_by, date, from_min_tests: the minimum of
the row on main when the entry was written, an integer >= count, the same for every entry of a suite}). `suite_ids`, when given, are the row
ids of main's list: the suite of a nodeid entry must be one of them."""
if not isinstance(data, list):
return ["the retired list must be a JSON list"]
problems, seen, seen_nodes, froms = [], set(), set(), {}
for i, e in enumerate(data):
where = "retired entry %d" % i
if not isinstance(e, dict):
problems.append("%s is not an object" % where)
continue
if "nodeid" in e or "suite" in e:
problems += _validate_retired_node(e, where, suite_ids, seen_nodes)
if isinstance(e.get("suite"), str) and _is_int(e.get("from_min_tests")):
froms.setdefault(e["suite"], set()).add(e["from_min_tests"])
continue
f = e.get("file")
if not isinstance(f, str) or not f.strip():
problems.append("%s has no file" % where)
elif f in seen:
problems.append("%s: the file %s appears more than once" % (where, f))
else:
seen.add(f)
where = "retired %s" % f
for key in ("reason", "date"):
if not isinstance(e.get(key), str) or not e.get(key).strip():
problems.append("%s: %s must be a non-empty string" % (where, key))
counts = e.get("tests")
if not (isinstance(counts, dict) and counts and all(isinstance(k, str) and _is_int(v) and v > 0 for k, v in counts.items())):
problems.append("%s: tests must be {row id: number of tests of the file in that row (> 0)}" % where)
for suite, values in sorted(froms.items()):
if len(values) > 1:
problems.append("the retired tests of %s disagree on from_min_tests (%s): one suite, one floor of main" % (suite, sorted(values)))
return problems
def _validate_retired_node(e, where, suite_ids, seen):
problems = []
nid, suite = e.get("nodeid"), e.get("suite")
if "file" in e or "tests" in e:
problems.append("%s: an entry is a retired file (file, tests) or a retired test (nodeid, suite, count), not both" % where)
parts = nid.split("::", 1) if isinstance(nid, str) else []
if len(parts) != 2 or not parts[0].strip() or not parts[1].strip():
problems.append("%s: nodeid must be \"<file>::<test>\"" % where)
else:
where = "retired test %s" % nid
if not isinstance(suite, str) or not suite.strip():
problems.append("%s: suite must be a non-empty string (the id of a row)" % where)
elif suite_ids is not None and suite not in suite_ids:
problems.append("%s: the suite %s is not a row of main's required list" % (where, suite))
if isinstance(nid, str) and isinstance(suite, str):
if (nid, suite) in seen:
problems.append("%s: appears more than once for the suite %s" % (where, suite))
seen.add((nid, suite))
if not _is_int(e.get("count")) or e.get("count") < 1:
problems.append("%s: count must be an integer >= 1 (the tests the suite loses)" % where)
for key in ("reason", "decided_by", "date"):
if not isinstance(e.get(key), str) or not e.get(key).strip():
problems.append("%s: %s must be a non-empty string" % (where, key))
frm = e.get("from_min_tests")
if not _is_int(frm) or frm < 1 or (_is_int(e.get("count")) and frm < e["count"]):
problems.append("%s: from_min_tests must be an integer >= count (the minimum of the suite on main when the entry was written)" % where)
return problems
def retired_of_main(main_required):
"""The retired files and tests of main: ``ci/retired-tests.json`` next to main's list, read from main and never from the judged branch. It may
not exist (main older than the format): nothing is retired. A malformed one is a problem, never an empty list. -> (entries, problems)."""
path = Path(main_required).with_name(RETIRED_NAME)
if not path.is_file():
return [], []
try:
data = json.loads(path.read_text(encoding="utf-8"))
except (OSError, ValueError) as exc:
return [], ["the retired list of main %s cannot be read: %s" % (path, exc)]
try:
rows = json.loads(Path(main_required).read_text(encoding="utf-8"))
suite_ids = {r.get("id") for r in rows if isinstance(r, dict)} if isinstance(rows, list) else None
except (OSError, ValueError):
suite_ids = None # the list of main itself is read (and refused) by the caller
bad = validate_retired(data, suite_ids)
if bad:
return [], ["the retired list of main %s is malformed: %s" % (path, "; ".join(bad))]
return data, []
def _retired_tests_of(row, retired, collected, judged):
"""-> (the number of tests the row may lose because main retired them one by one, problems). An entry counts only if the file of its nodeid is
in the row of main (a nodeid that the row does not run is not a test the row loses). The judge has the junit of the leg it judges and only
counts of main, so a declared nodeid that the judged leg still collects is red (and counts for nothing), and the nodeid of another row is taken
on its count, the leg of that row checking it. An entry counts only while the minimum of the row on main is still its `from_min_tests`: once
the removal is on main the floor is lower and the entry is inert (it allows nothing and asks nothing)."""
allowed, problems = 0, []
listed = row.get("tests", [])
for e in retired:
if not (isinstance(e, dict) and isinstance(e.get("nodeid"), str) and e.get("suite") == row.get("id")):
continue
nid = e["nodeid"]
if _int(row.get("min_tests")) != e.get("from_min_tests"):
continue
if nid not in listed and nid.split("::", 1)[0] not in listed:
continue
if collected is not None and judged == row.get("id") and any(n == nid or _base(n) == nid for n in collected):
problems.append("the test %s is declared retired for %s, but the suite still collects it: it did not leave" % (nid, row.get("id")))
continue
allowed += _int(e.get("count"))
return allowed, problems
def against_main(current, main, retired=(), exists=os.path.exists, collected=None, judged=None):
"""The list only grows: every suite of main is still here, with no lower minimum, no exact turned off, no lost
test or OS and the same marker. `main` is read leniently (it may be older than the current format)."""
test or OS and the same marker. `main` is read leniently (it may be older than the current format).
The one way a test leaves a row is `retired` (the list of MAIN, never of the branch): a file that main retired and that no longer exists
(`exists`, in the checkout judged) is not a lost test, and the minimum of the row may go down by exactly the tests main counted for that file
in that row (``tests[row id]``), and by no more. A retired file that is still on disk is not excused: it must stay in its rows.
The other way is a single retired test (``nodeid``, ``suite``, ``count``) whose file stays in the row: the minimum of the suite may go down by
the ``count`` of its entries, and by no more. ``collected`` (the node ids of the junit of the judged leg) and ``judged`` (that leg's suite) let
the judge see that a declared nodeid is gone from the leg; of the collection of main it has only the count."""
problems = []
if not isinstance(main, list):
return ["the list of main is not a JSON list: it cannot be compared"]
retired = list(retired)
gone = {e["file"]: e["tests"] for e in retired if isinstance(e, dict) and isinstance(e.get("file"), str)
and isinstance(e.get("tests"), dict) and not exists(e["file"])}
by_id = {s.get("id"): s for s in current if isinstance(s, dict)}
for old in main:
if not isinstance(old, dict):
@@ -263,12 +476,19 @@ def against_main(current, main):
if new is None:
problems.append("the suite %s of main is gone from the list" % sid)
continue
if _int(new.get("min_tests")) < _int(old.get("min_tests")):
problems.append("the minimum of %s went down: %s on main, %s here"
% (sid, old.get("min_tests"), new.get("min_tests")))
lost = [t for t in old.get("tests", []) if t not in new.get("tests", [])]
excused = [t for t in lost if t in gone]
lost = [t for t in lost if t not in gone]
allowed = sum(_int(gone[t].get(sid)) for t in excused)
by_test, why = _retired_tests_of(old, retired, collected, judged)
allowed += by_test
problems += why
if _int(new.get("min_tests")) < _int(old.get("min_tests")) - allowed:
problems.append("the minimum of %s went down: %s on main, %s here%s"
% (sid, old.get("min_tests"), new.get("min_tests"),
" (retired files and tests account for %d of it)" % allowed if allowed else ""))
if old.get("exact") is True and new.get("exact") is not True:
problems.append("the suite %s is no longer exact, as it is on main" % sid)
lost = [t for t in old.get("tests", []) if t not in new.get("tests", [])]
if lost:
problems.append("the suite %s lost %d required test(s) that main has: %s" % (sid, len(lost), ", ".join(lost)))
lost_os = [o for o in old.get("os", []) if o not in new.get("os", [])]
@@ -406,7 +626,10 @@ def cmd_judge(ns):
problems.append("the list of main %s exists, but --main-has-no-list says main has none" % ns.main_required)
elif exists:
try:
problems += against_main(suites, _read_json_list(ns.main_required))
retired, retired_problems = retired_of_main(ns.main_required)
problems += retired_problems
problems += against_main(suites, _read_json_list(ns.main_required), retired,
collected={n for n, _o in cases}, judged=ns.suite)
except Usage as exc:
problems.append(str(exc))
elif ns.main_has_no_list:
+122
View File
@@ -0,0 +1,122 @@
r"""Read the full user-mode dumps Windows Error Reporting left for a python.exe that died, and say what each one holds (CI evidence, no debugger needed).
The Windows e2e jobs set ``HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\python.exe`` (full dump, folder ``<evidence>/dumps/python``)
before their tests; when a pytest-xdist worker dies from an unhandled exception ("node down: Not properly terminated", "Windows fatal exception: access violation")
WER writes ``python.exe.<pid>.dmp`` there and the evidence artifact carries it. This script runs after the tests (``if: always()``): it lists every dump with its size
and reads the header of the MINIDUMP file, with ``struct`` only, to name what a debugger would name first: the thread that raised, the exception code, the faulting
address and the module that holds it (with the offset in it), plus the access that failed for an access violation. The summary goes to stdout and to
``summary.txt`` beside the dumps. It never fails the job: no dump is the normal case.
Format of the file: https://learn.microsoft.com/windows/win32/api/minidumpapiset/ (MINIDUMP_HEADER, MINIDUMP_DIRECTORY, MINIDUMP_EXCEPTION_STREAM,
MINIDUMP_MODULE). Dump types and the LocalDumps key: https://learn.microsoft.com/windows/win32/wer/collecting-user-mode-dumps
"""
from __future__ import annotations
import shutil
import struct
import sys
import time
from pathlib import Path
SIGNATURE = b"MDMP"
MODULE_LIST_STREAM = 4
EXCEPTION_STREAM = 6
MODULE_SIZE = 108 # sizeof(MINIDUMP_MODULE)
EXCEPTION_NAMES = {
0xC0000005: "EXCEPTION_ACCESS_VIOLATION",
0xC0000374: "STATUS_HEAP_CORRUPTION",
0xC0000409: "STATUS_STACK_BUFFER_OVERRUN (fail fast)",
0xC00000FD: "EXCEPTION_STACK_OVERFLOW",
0xC000001D: "EXCEPTION_ILLEGAL_INSTRUCTION",
0xC0000094: "EXCEPTION_INT_DIVIDE_BY_ZERO",
0xC0000026: "STATUS_INVALID_DISPOSITION",
0xC0000096: "EXCEPTION_PRIV_INSTRUCTION",
0xC0000006: "EXCEPTION_IN_PAGE_ERROR",
0x80000003: "EXCEPTION_BREAKPOINT",
0xE06D7363: "C++ exception",
}
ACCESS = {0: "read", 1: "write", 8: "execute (DEP)"}
def read_dump(path: Path) -> dict:
"""The facts of one minidump: thread id, exception code and address, the module holding the address. Raises ValueError on a file that is not a minidump."""
with open(path, "rb") as f:
head = f.read(32)
if len(head) < 32 or head[:4] != SIGNATURE:
raise ValueError("not a minidump (no MDMP signature)")
_sig, _version, n_streams, dir_rva = struct.unpack_from("<4sIII", head, 0)
f.seek(dir_rva)
directory = [struct.unpack("<III", f.read(12)) for _ in range(n_streams)]
out: dict = {"streams": n_streams}
modules: list[tuple[int, int, str]] = []
for kind, size, rva in directory:
if kind == MODULE_LIST_STREAM:
f.seek(rva)
(count,) = struct.unpack("<I", f.read(4))
records = f.read(count * MODULE_SIZE)
for i in range(count):
base, image_size, _cs, _ts, name_rva = struct.unpack_from("<QIIII", records, i * MODULE_SIZE)
here = f.tell()
f.seek(name_rva)
(nbytes,) = struct.unpack("<I", f.read(4))
name = f.read(nbytes).decode("utf-16-le", "replace")
f.seek(here)
modules.append((base, image_size, name))
elif kind == EXCEPTION_STREAM:
f.seek(rva)
raw = f.read(8 + 8 + 8 + 8 + 8 + 15 * 8)
tid, _pad, code, flags, _chain, address, n_params, _pad2 = struct.unpack_from("<IIIIQQII", raw, 0)
params = struct.unpack_from("<15Q", raw, 8 + 32)
out.update(thread_id=tid, code=code, flags=flags, address=address, params=list(params[:n_params]))
out["module_count"] = len(modules)
if "address" in out:
for base, image_size, name in modules:
if base <= out["address"] < base + image_size:
out["module"] = name
out["offset"] = out["address"] - base
break
return out
def describe(path: Path) -> str:
size = path.stat().st_size
head = "%s: %.1f MB" % (path.name, size / 1e6)
try:
d = read_dump(path)
except (ValueError, OSError, struct.error) as e:
return "%s, unreadable header: %s" % (head, e)
if "code" not in d:
return "%s, %d modules, no exception stream (a dump taken on request, not on a fault)" % (head, d["module_count"])
name = EXCEPTION_NAMES.get(d["code"], "unknown")
lines = [
head,
" exception 0x%08X %s on thread %d" % (d["code"], name, d["thread_id"]),
" at 0x%016X in %s" % (d["address"], ("%s+0x%X" % (d["module"], d["offset"])) if "module" in d else "no module of the dump (JIT or freed code)"),
]
p = d["params"]
if d["code"] in (0xC0000005, 0xC0000006) and len(p) >= 2:
lines.append(" failed access: %s of 0x%016X" % (ACCESS.get(p[0], str(p[0])), p[1]))
return "\n".join(lines)
def summarize(folder: Path) -> str:
dumps = sorted(folder.glob("*.dmp")) if folder.is_dir() else []
cdb = shutil.which("cdb") or shutil.which("windbg")
lines = ["WER dumps of python.exe in %s: %d" % (folder, len(dumps)), "debugger on the runner: %s" % (cdb or "none (the header reader above is all there is)")]
for p in dumps:
lines.append(describe(p) + "\n written %s" % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(p.stat().st_mtime)))
return "\n".join(lines) + "\n"
def main(argv: list[str]) -> int:
folder = Path(argv[1]) if len(argv) > 1 else Path(".")
text = summarize(folder)
sys.stdout.write(text)
if folder.is_dir():
(folder / "summary.txt").write_text(text, encoding="utf-8", newline="\n")
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
-50
View File
@@ -1,50 +0,0 @@
"""Which canvas text cases two runs draw differently.
tests/test_canvas_text_is_windows_e2e.py writes canvas_text_<tag>.json (case id -> SHA-256
of the RGBA bytes) into INVISIBLE_CANVAS_TEXT_OUT. Run it on Debian 12 and on Ubuntu 24.04
(and the retail reference, tests/data/canvas_text_ref/refs.json, is accepted too), then:
python scripts/compare_canvas_text_runs.py debian.json ubuntu.json
The exit status is 0 when every case is equal on both sides and both draw the same set.
"""
from __future__ import annotations
import json
import sys
def load(path):
"""case id -> sha256, from a run file or from refs.json."""
data = json.loads(open(path, encoding="utf-8").read())
if "cases" in data:
return {k: v["sha256"] for k, v in data["cases"].items()}
return data
def compare(a, b):
"""(only in a, only in b, ids whose hash differs)."""
only_a = sorted(set(a) - set(b))
only_b = sorted(set(b) - set(a))
differ = sorted(k for k in set(a) & set(b) if a[k] != b[k])
return only_a, only_b, differ
def main(argv):
if len(argv) != 3:
print(__doc__)
return 2
a, b = load(argv[1]), load(argv[2])
only_a, only_b, differ = compare(a, b)
for label, ids in (("only in %s" % argv[1], only_a), ("only in %s" % argv[2], only_b),
("differ", differ)):
if ids:
print("%s (%d):" % (label, len(ids)))
for k in ids:
print(" " + k)
print("%d cases compared, %d differ" % (len(set(a) & set(b)), len(differ)))
return 1 if (only_a or only_b or differ) else 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
+227
View File
@@ -0,0 +1,227 @@
#!/usr/bin/env python3
"""Extracts, from Mozilla's own sources at a release tag, the names a chrome-scope script of a test may call, into ci/mozilla-chrome-api.json.
A twin of the retail Firefox runs chrome JS (through Marionette) on a Firefox that is NOT ours. A call to a name that this Firefox does not have fails there only, at the run:
``win.windowUtils.sendMouseEvent`` is not in Firefox 159 (its chrome input is ``Window.synthesizeMouseEvent``), and nothing red said so before the twins ran. The names are therefore read
from the source of the release the twins use, never typed:
* ``dom/interfaces/base/nsIDOMWindowUtils.idl``: the methods, attributes and constants of ``nsIDOMWindowUtils`` (what ``win.windowUtils.<name>`` reaches);
* ``dom/webidl/Window.webidl``: the members of ``interface Window`` and ``partial interface Window`` (with the parameter types and whether the member is ``ChromeOnly``), and every
dictionary with its fields, parents included (what the options of ``win.synthesizeMouseEvent`` may carry).
The same two files of OUR engine tree are read the same way, and what they carry that Mozilla's do not is written apart, under ``ours``: ``jugglerSendMouseEvent``, the fields of the
latency line. A call to one of those from code that runs on retail Firefox is red (tests/test_the_chrome_calls_of_the_tests_exist_in_firefox.py).
The file records, for every source, its path, the tag or commit and the sha256 of the bytes read. The wrapper's CI has no Firefox source, so the test reads the committed file and this
module's functions are tested on a small sample (tests/test_the_extractor_of_the_chrome_names_reads_idl_and_webidl.py). One command regenerates the file:
python scripts/extract_mozilla_chrome_api.py --mozilla-repo <git repository with the Mozilla tag> --tag FIREFOX_159_0_RELEASE --ours-repo <our engine tree> --ours-ref <commit> --write
"""
from __future__ import annotations
import argparse
import hashlib
import json
import re
import subprocess
import sys
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
ROOT = Path(__file__).resolve().parent.parent
DATA_PATH = ROOT / "ci" / "mozilla-chrome-api.json"
WINDOW_UTILS_IDL = "dom/interfaces/base/nsIDOMWindowUtils.idl"
WINDOW_WEBIDL = "dom/webidl/Window.webidl"
SOURCES = (WINDOW_UTILS_IDL, WINDOW_WEBIDL)
_BLOCK_COMMENT = re.compile(r"/\*.*?\*/", re.S)
_LINE_COMMENT = re.compile(r"//[^\n]*")
_LEADING_ATTRS = re.compile(r"^\s*(?:\[[^\]]*\]\s*)*")
_WORD = re.compile(r"[A-Za-z_]\w*")
def strip_comments(text: str) -> str:
"""The text without comments and without preprocessor lines."""
text = _BLOCK_COMMENT.sub(" ", text)
text = _LINE_COMMENT.sub("", text)
return "\n".join(line for line in text.splitlines() if not line.lstrip().startswith("#"))
def _bodies(text: str, header: "re.Pattern[str]") -> List[Tuple[re.Match, str]]:
"""Every ``header { body }`` of ``text`` (braces matched), with the header's match."""
out: List[Tuple[re.Match, str]] = []
for m in header.finditer(text):
depth, i = 1, m.end()
while i < len(text) and depth:
depth += {"{": 1, "}": -1}.get(text[i], 0)
i += 1
out.append((m, text[m.end():i - 1]))
return out
def _statements(body: str) -> List[str]:
"""The ``;``-terminated statements at the top level of ``body`` (a nested ``{}`` or ``()`` does not end one)."""
out, depth, cur = [], 0, []
for ch in body:
if ch in "{(":
depth += 1
elif ch in "})":
depth -= 1
if ch == ";" and depth == 0:
out.append("".join(cur).strip())
cur = []
else:
cur.append(ch)
return [s for s in out if s]
def _split_params(text: str) -> List[str]:
out, depth, cur = [], 0, []
for ch in text:
if ch in "<([":
depth += 1
elif ch in ">)]":
depth -= 1
if ch == "," and depth == 0:
out.append("".join(cur).strip())
cur = []
else:
cur.append(ch)
tail = "".join(cur).strip()
return out + [tail] if tail else out
def _params(signature: str) -> List[List[str]]:
"""``[[name, type], ...]`` of the parameters of the call in ``signature`` (``optional`` and defaults dropped, ``in`` of the IDL dropped)."""
start = signature.index("(")
depth, i = 0, start
while i < len(signature):
depth += {"(": 1, ")": -1}.get(signature[i], 0)
if depth == 0:
break
i += 1
out = []
for raw in _split_params(signature[start + 1:i]):
raw = re.sub(r"\[[^\]]*\]", " ", raw.split("=")[0])
words = [w for w in raw.replace("<", " < ").replace(">", " > ").split() if w not in ("optional", "in", "out", "inout", "required")]
text = " ".join(words).replace(" < ", "<").replace(" > ", ">").replace(" ,", ",")
if not text:
continue
m = re.search(r"(\w+)$", text)
out.append([m.group(1), text[:m.start()].strip()])
return out
def window_utils(idl_text: str) -> Dict[str, List[str]]:
"""The methods, attributes and constants of ``nsIDOMWindowUtils`` in the text of its IDL file."""
text = strip_comments(idl_text)
methods, attributes, constants = set(), set(), set()
for _m, body in _bodies(text, re.compile(r"interface\s+nsIDOMWindowUtils\b[^{;]*\{")):
for statement in _statements(body):
rest = _LEADING_ATTRS.sub("", statement).strip()
if rest.startswith("const "):
constants.add(_WORD.findall(rest.split("=")[0])[-1])
elif re.search(r"\battribute\b", rest):
attributes.add(_WORD.findall(rest.split("=")[0])[-1])
elif "(" in rest:
methods.add(_WORD.findall(rest.split("(")[0])[-1])
return {"methods": sorted(methods), "attributes": sorted(attributes), "constants": sorted(constants)}
def window(webidl_text: str) -> Dict[str, Any]:
"""The members of ``Window`` (``interface`` and ``partial interface``) and every dictionary, parents folded in, from the text of a WebIDL file."""
text = strip_comments(webidl_text)
methods: Dict[str, Dict[str, Any]] = {}
attributes: Dict[str, Dict[str, Any]] = {}
for _m, body in _bodies(text, re.compile(r"(?:partial\s+)?interface\s+Window\b[^{;]*\{")):
for statement in _statements(body):
attrs = re.match(r"^\s*((?:\[[^\]]*\]\s*)*)", statement).group(1)
rest = _LEADING_ATTRS.sub("", statement).strip()
chrome_only = bool(re.search(r"\bChromeOnly\b", attrs))
if re.search(r"\battribute\b", rest):
attributes[_WORD.findall(rest.split("=")[0])[-1]] = {"chrome_only": chrome_only}
elif "(" in rest and not rest.startswith("constructor"):
name = _WORD.findall(rest.split("(")[0])[-1]
methods[name] = {"chrome_only": chrome_only, "params": _params(rest)}
own: Dict[str, Tuple[Optional[str], List[str]]] = {}
for m, body in _bodies(text, re.compile(r"dictionary\s+(\w+)\s*(?::\s*(\w+))?\s*\{")):
fields = []
for statement in _statements(body):
rest = _LEADING_ATTRS.sub("", statement.split("=")[0]).strip()
if rest:
fields.append(_WORD.findall(rest)[-1])
own[m.group(1)] = (m.group(2), fields)
def flat(name: str) -> List[str]:
parent, fields = own[name]
return sorted(set(fields) | (set(flat(parent)) if parent in own else set()))
return {
"methods": {k: methods[k] for k in sorted(methods)},
"attributes": {k: attributes[k] for k in sorted(attributes)},
"dictionaries": {k: flat(k) for k in sorted(own)},
}
def extract(idl_text: str, webidl_text: str) -> Dict[str, Any]:
return {"window_utils": window_utils(idl_text), "window": window(webidl_text)}
def only_in_ours(mozilla: Dict[str, Any], ours: Dict[str, Any]) -> Dict[str, Any]:
"""What the extraction of our tree carries and Mozilla's does not."""
out: Dict[str, Any] = {"window_utils": {}, "window": {"methods": [], "attributes": [], "dictionaries": {}}}
for kind in ("methods", "attributes", "constants"):
out["window_utils"][kind] = sorted(set(ours["window_utils"][kind]) - set(mozilla["window_utils"][kind]))
for kind in ("methods", "attributes"):
out["window"][kind] = sorted(set(ours["window"][kind]) - set(mozilla["window"][kind]))
for name, fields in ours["window"]["dictionaries"].items():
extra = sorted(set(fields) - set(mozilla["window"]["dictionaries"].get(name, [])))
if extra:
out["window"]["dictionaries"][name] = extra
return out
def _git_show(repo: Path, ref: str, path: str) -> bytes:
return subprocess.run(["git", "-C", str(repo), "show", "%s:%s" % (ref, path)], check=True, capture_output=True).stdout
def _read_source(repo: Path, ref: str) -> Tuple[Dict[str, Any], Dict[str, Any]]:
blobs = {path: _git_show(repo, ref, path) for path in SOURCES}
parsed = extract(blobs[WINDOW_UTILS_IDL].decode("utf-8"), blobs[WINDOW_WEBIDL].decode("utf-8"))
sources = [{"path": path, "sha256": hashlib.sha256(blobs[path]).hexdigest()} for path in SOURCES]
commit = subprocess.run(["git", "-C", str(repo), "rev-parse", "%s^{commit}" % ref], check=True, capture_output=True, text=True).stdout.strip()
return parsed, {"ref": ref, "commit": commit, "files": sources}
def build(mozilla_repo: Path, tag: str, ours_repo: Path, ours_ref: str) -> Dict[str, Any]:
mozilla, mozilla_source = _read_source(mozilla_repo, tag)
ours, ours_source = _read_source(ours_repo, ours_ref)
return {
"about": "Names a chrome-scope script of a test may call on the retail Firefox of the twins, extracted by scripts/extract_mozilla_chrome_api.py. Never edited by hand.",
"mozilla": dict(mozilla_source, **mozilla),
"ours": dict(ours_source, **only_in_ours(mozilla, ours)),
}
def main(argv: Optional[List[str]] = None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
ap.add_argument("--mozilla-repo", type=Path, required=True)
ap.add_argument("--tag", required=True)
ap.add_argument("--ours-repo", type=Path, required=True)
ap.add_argument("--ours-ref", required=True)
ap.add_argument("--write", action="store_true", help="write ci/mozilla-chrome-api.json; without it the file is compared and the exit is 1 when it differs")
args = ap.parse_args(argv)
data = build(args.mozilla_repo, args.tag, args.ours_repo, args.ours_ref)
text = json.dumps(data, indent=2, sort_keys=True) + "\n"
if args.write:
DATA_PATH.write_text(text, encoding="utf-8", newline="\n")
print("wrote %s" % DATA_PATH)
return 0
same = DATA_PATH.read_text(encoding="utf-8") == text
print("%s %s" % (DATA_PATH, "is what the sources give" if same else "DIFFERS from what the sources give: regenerate it with --write"))
return 0 if same else 1
if __name__ == "__main__":
sys.exit(main())
+134
View File
@@ -0,0 +1,134 @@
#!/usr/bin/env python3
"""Extracts, from the retail capture of the password-mask probe, the width retail Firefox on Windows gives a password field, into ci/retail-password-mask.json.
The e2e test ``tests/test_a_password_field_is_as_wide_as_on_retail_windows_e2e.py`` compares the width a page reads on a password field of our engine with the width RETAIL Firefox 159 on
Windows read in the same page. That number is typed nowhere: it is read here from the capture,
``captures/firefox-159.0/windows-server-2025/password-mask/<date>/result.json``: the page's whole reading (``fonts.arial16.password["40"].scrollWidth``, the ``scrollWidth`` of an
``<input type=password>`` of 40 x "a" in Arial 16px, the number a page reads) and ``meta.json`` (the sha256 of every file of the capture, of the page, of the binaries).
What is refused rather than filled in: a ``result.json`` whose sha256 is not the one ``meta.json`` lists; a page that is not the page of the capture (the sha256 of
``tests/data/password_mask_page.html`` must be ``meta.json``'s ``page.sha256``); a result with an ``error``, another ``n``, or no ``arial16`` reading; a reading that disagrees with itself (the width of
the password field in its own box and in the box of the 1, 10, 40 series; the verdict of the page, which must name U+25CF alone, the character Windows masks with).
The file records the capture's commit and run, the browser (version, build id, installer, ``firefox.exe`` and ``xul.dll`` sha256) and the sha256 of every file read. The wrapper's CI has no capture, so the
tests read the committed file and this module's functions are tested on a small sample (tests/test_the_retail_password_mask_width_is_extracted_from_the_capture_not_typed.py). One command regenerates it:
python scripts/extract_retail_password_mask.py --capture <RetailCaptures>/captures/firefox-159.0/windows-server-2025/password-mask/2026-12-02 --commit <RetailCaptures commit> --write
and the same without ``--write`` compares the committed file with what the capture gives (the check).
"""
from __future__ import annotations
import argparse
import hashlib
import json
import sys
from pathlib import Path
from typing import Any, Dict, List, Optional
ROOT = Path(__file__).resolve().parent.parent
DATA_PATH = ROOT / "ci" / "retail-password-mask.json"
PAGE_PATH = ROOT / "tests" / "data" / "password_mask_page.html"
#: The characters of the field: ``N`` copies of "a", read in the font case ``arial16`` (``font-family:Arial;font-size:16px``).
N = 40
FONT_CASE = "arial16"
#: What Windows masks a password field with, and what the page's verdict must therefore name.
MASK = "U+25CF"
FORMAT = "password-mask/1"
class ExtractError(Exception):
"""What the capture does not give, or gives two ways: nothing is invented in its place."""
def sha256_of(path: Path) -> str:
return hashlib.sha256(path.read_bytes()).hexdigest()
def reading(result: Dict[str, Any], where: str) -> Dict[str, Any]:
"""The width of the password field in ``arial16``, after the checks of the reading against itself."""
if "error" in result:
raise ExtractError("%s: the page recorded an error: %s" % (where, str(result["error"])[:200]))
if result.get("format") != FORMAT or result.get("n") != N:
raise ExtractError("%s: format %r and n %r, not %r and %r" % (where, result.get("format"), result.get("n"), FORMAT, N))
try:
font = result["fonts"][FONT_CASE]
width = font["password"][str(N)]["scrollWidth"]
main = font["password"][str(N)]["scrollWidth_main"]
mask_width = font["refs"][MASK]["text_input"][str(N)]["scrollWidth"]
verdict = font["verdict"]["by_text_input_scrollWidth"]
platform, dpr = result["env"]["platform"], result["env"]["devicePixelRatio"]
except (KeyError, TypeError) as exc:
raise ExtractError("%s: the reading lacks %s: no retail value, none invented" % (where, exc))
if not isinstance(width, int) or width <= 0:
raise ExtractError("%s: the width %r is not a positive integer" % (where, width))
if main != width:
raise ExtractError("%s: the password field reads %r in its own box and %r in the series box" % (where, main, width))
if mask_width != width or verdict != [MASK]:
raise ExtractError("%s: the password field is %r wide, %s in a text input is %r and the page's verdict is %r: not the mask character of Windows" % (where, width, MASK, mask_width, verdict))
if platform != "Win32":
raise ExtractError("%s: navigator.platform is %r, not Win32: not a Windows capture" % (where, platform))
return {"password_scrollWidth": width, "mask": MASK, "devicePixelRatio": dpr, "platform": platform}
def build(capture: Path, commit: str, page: Path = PAGE_PATH) -> Dict[str, Any]:
result_path, meta_path = capture / "result.json", capture / "meta.json"
for path in (result_path, meta_path, page):
if not path.is_file():
raise ExtractError("missing %s" % path)
meta = json.loads(meta_path.read_text(encoding="utf-8"))
listed = meta.get("files", {}).get("result.json", {}).get("sha256")
if listed != sha256_of(result_path):
raise ExtractError("%s is %s and meta.json lists %r: not the file the capture recorded" % (result_path, sha256_of(result_path), listed))
page_sha = sha256_of(page)
if page_sha != meta.get("page", {}).get("sha256"):
raise ExtractError("%s is %s and the capture's page is %r: the test would not read the page retail read" % (page, page_sha, meta.get("page", {}).get("sha256")))
got = reading(json.loads(result_path.read_text(encoding="utf-8")), str(result_path))
binaries = meta.get("binaries", {})
return {
"about": "What retail Firefox on Windows reads on a password field in the page tests/data/password_mask_page.html (the width of 40 x 'a' in Arial 16px, which is 40 times the advance of the mask character), extracted by scripts/extract_retail_password_mask.py. Never edited by hand.",
"capture": {
"folder": "captures/firefox-159.0/windows-server-2025/password-mask/%s" % capture.name,
"retail_captures_commit": commit,
"run": "https://github.com/%s/actions/runs/%s" % (meta["source_run"]["repo"], meta["source_run"]["run_id"]),
"browser": {"firefox_version": meta["firefox_version"], "build_id": meta["build_id"], "installer_sha256": binaries.get("installer_sha256"),
"firefox_exe_sha256": binaries.get("firefox_exe_sha256"), "xul_dll_sha256": binaries.get("xul_dll_sha256")},
"host": {"runner_image": meta["host"]["runner_image"], "os_version": meta["host"]["os_version"], "os_ubr": meta["host"]["os_ubr"]},
},
"files": [{"path": "result.json", "sha256": sha256_of(result_path)}, {"path": "meta.json", "sha256": sha256_of(meta_path)}],
"page": {"path": "tests/data/password_mask_page.html", "sha256": page_sha},
"n": N,
"cases": {FONT_CASE: got},
}
def dumps(data: Dict[str, Any]) -> str:
return json.dumps(data, indent=2, sort_keys=False) + "\n"
def main(argv: Optional[List[str]] = None) -> int:
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
parser.add_argument("--capture", required=True, type=Path, help="the folder of the capture in RetailCaptures (result.json and meta.json)")
parser.add_argument("--commit", required=True, help="the RetailCaptures commit the capture is in")
parser.add_argument("--write", action="store_true", help="write ci/retail-password-mask.json; without it the committed file is compared with the capture")
args = parser.parse_args(argv)
try:
text = dumps(build(args.capture.resolve(), args.commit))
except ExtractError as exc:
print("EXTRACTION FAILED: %s" % exc, file=sys.stderr)
return 2
if args.write:
DATA_PATH.write_text(text, encoding="utf-8", newline="\n")
print("wrote %s" % DATA_PATH)
return 0
if DATA_PATH.read_text(encoding="utf-8") != text:
print("%s is not what the capture gives" % DATA_PATH, file=sys.stderr)
return 1
print("%s is what the capture gives" % DATA_PATH)
return 0
if __name__ == "__main__":
sys.exit(main())
+337
View File
@@ -0,0 +1,337 @@
#!/usr/bin/env python3
"""Extracts, from the retail capture ``popup-move-to``, what a popup of the maximized window reads after ``resizeBy(0, 0)``, ``moveBy(10, 10)`` and ``moveTo(99999, 0)``, per display case, per phase of the wrapper test and
per POSITION in the browser's life, into ci/retail-popup-move-resize.json.
The e2e test ``tests/test_a_popup_moves_and_resizes_as_declared_e2e.py`` compares a popup of ours with what RETAIL Firefox 159 on Windows read. An expected value comes from a capture of the SAME sequence,
position in the browser's life included: at a real 150% retail opens the FIRST popup of a browser one device pixel narrower (inner width 499, outer 514) than every popup after it (500, 515), ``resizeBy(0, 0)``
leaves the first at 499 and takes a later one to 501, and ``moveTo(99999, 0)`` stops at 766 for the first and 765 for a later one. The numbers are read from the capture, never typed:
* ``popup-move-to/<date>/<dpr>/<panel>/<launch>/raw.json`` (format ``retail-popup-move-to/1``), four launches per display case, each popup opened by a real click with ``width=500,height=400`` and closed before the next:
``a`` the test's order (phase 1 ``resizeBy(0, 0)``, phase 2 ``moveBy(10, 10)``, phase 3 ``moveBy(10, 10)`` then ``moveTo(99999, 0)``: phase 1 is the first popup of the browser), ``b`` phase 3 alone, ``c`` a throwaway
popup (no call) and then the three phases, ``d`` phase 2 alone. Every phase is thus read as the first popup of a browser (``first``: a, d, b) and as a later popup (``later``: c; a and c; a and c). Each step carries
its ordinal; the plan of every launch, the calls, the features, the close of every popup and the order of the moments are checked, and popups of the same phase and position must read the same, or the extraction fails.
* The sha256 of every raw.json is checked against the ``meta.json`` of its scale before it is read, and the run id, the browser (version, build id, installer sha256) and the sha256 of ``firefox.exe`` and
``xul.dll`` (``run-info.json``) are recorded.
* The window-geometry rounds named on the command line (``--rounds``; step ``popup_move_resize``: ``initial`` and ``resized`` as a later popup after many steps) are cross-checked: what they read after
``resizeBy(0, 0)`` must be what some position of the capture reads (at 1.5: 500 then 501, the ``later`` popup), or the extraction fails, an anomaly reported and not chosen. They must agree with each other
(all rounds, launches ``a`` and ``b``). The test does not read them.
Each phase of the test asserts against the position it has in the test: phase 1 is the first popup of its browser (``first``), phases 2 and 3 are later ones.
The wrapper's CI has no capture, so the tests read the committed file and this module's functions are tested on a small sample (tests/test_the_retail_popup_moves_and_resizes_are_extracted_from_the_capture_not_typed.py).
One command regenerates the file:
python scripts/extract_retail_popup_move_resize.py --captures <RetailCaptures>/captures --rounds 2026-11-29-window-geometry-r8 2026-11-30-window-geometry-r9 2026-11-30-window-geometry-r11 2026-12-01-window-geometry-r12 --commit <RetailCaptures commit> --move-to-capture <RetailCaptures>/captures/firefox-159.0/windows-server-2025/popup-move-to/2026-12-02 --move-to-run-id <id of the run> --move-to-commit <RetailCaptures commit> --write
and the same without ``--write`` compares the committed file with what the captures give (the check).
"""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
sys.path.insert(0, str(Path(__file__).resolve().parent))
from extract_retail_popup_sizes import BROWSER_DIR, DISPLAYS, ExtractError, case_id, sha256_of # noqa: E402
ROOT = Path(__file__).resolve().parent.parent
DATA_PATH = ROOT / "ci" / "retail-popup-move-resize.json"
MOMENTS = ("initial", "resized", "moved", "moved_to")
FEATURES = "width=500,height=400"
#: ``popup-move-to`` capture: the format of its raw.json and meta.json, the phase, and the order of phases of launch ``a`` (the test's order: phase 3 is the third popup).
MOVE_TO_FORMAT = "retail-popup-move-to/1"
MOVE_TO_META_FORMAT = "retail-popup-move-to-meta/1"
POSITION_FIRST = "first"
POSITION_LATER = "later"
MOVE_TO_PHASES = ["resize_by_zero", "move_by", "move_to_far_right"]
#: The launches of the capture and the popups each opens in order (``scripts/popup_move_to/run.py``, LAUNCHES): a is the test's order (phase 1 is the first popup of the browser); b phase 3 alone; c a throwaway
#: popup opened and closed first (no call), then the three phases; d phase 2 alone. Every phase is thus read as the first popup of a browser and as a later one.
MOVE_TO_LAUNCHES = {
"a": ["resize_by_zero", "move_by", "move_to_far_right"],
"b": ["move_to_far_right"],
"c": ["throwaway", "resize_by_zero", "move_by", "move_to_far_right"],
"d": ["move_by"],
}
MOVE_TO_MOMENTS = {
"throwaway": ("initial",),
"resize_by_zero": ("initial", "resized"),
"move_by": ("initial", "moved"),
"move_to_far_right": ("initial", "moved", "moved_to"),
}
MOVE_TO_CALLS = {
"throwaway": {},
"resize_by_zero": {"resized": "window.resizeBy(0, 0)"},
"move_by": {"moved": "window.moveBy(10, 10)"},
"move_to_far_right": {"moved": "window.moveBy(10, 10)", "moved_to": "window.moveTo(99999, 0)"},
}
MOVE_TO_BINARIES = ("firefox.exe", "xul.dll")
def moment_reading(moment: Dict[str, Any], where: str) -> Dict[str, Any]:
try:
return {
"inner": [moment["innerWidth"], moment["innerHeight"]],
"outer": [moment["outerWidth"], moment["outerHeight"]],
"screen": [moment["screenX"], moment["screenY"]],
"avail": [moment["availLeft"], moment["availWidth"]],
}
except (KeyError, TypeError) as exc:
raise ExtractError("%s: the moment lacks %s" % (where, exc))
def read_step(raw: Dict[str, Any], where: str) -> Dict[str, Dict[str, Any]]:
try:
step = raw["steps"]["popup_move_resize"]
moments = step["moments"]
except (KeyError, TypeError):
raise ExtractError("%s has no step popup_move_resize with moments" % where)
if step.get("features") != FEATURES:
raise ExtractError("%s: the popup was opened with %r, not %r" % (where, step.get("features"), FEATURES))
missing = [m for m in MOMENTS if m not in moments]
if missing:
raise ExtractError("%s lacks the moments %r: no retail value, none invented" % (where, missing))
readings = {m: moment_reading(moments[m], "%s %s" % (where, m)) for m in MOMENTS}
opened, resized, moved, moved_to = (readings[m]["screen"] for m in MOMENTS)
if not (opened == resized and moved != opened and moved_to != moved):
raise ExtractError("%s: the positions %r do not follow the order initial, resized, moved, moved_to" % (where, {m: readings[m]["screen"] for m in MOMENTS}))
return readings
def build(captures: Path, rounds: List[str], commit: str) -> Dict[str, Any]:
if len(rounds) < 2:
raise ExtractError("at least two rounds are needed to say that rounds agree")
cases: Dict[str, Dict[str, Any]] = {}
files: List[Dict[str, str]] = []
browser: Optional[Dict[str, Any]] = None
for dpr_dir, panel, scale in DISPLAYS:
first: Optional[Dict[str, Any]] = None
for round_name in rounds:
for launch in ("a", "b"):
path = captures / BROWSER_DIR / round_name / dpr_dir / panel / launch / "raw.json"
if not path.is_file():
raise ExtractError("missing %s" % path)
raw = json.loads(path.read_text(encoding="utf-8"))
if raw.get("dpr_asked") != scale:
raise ExtractError("%s asks scale %r, not %r" % (path, raw.get("dpr_asked"), scale))
meta = {"firefox_version": raw["firefox_version"], "build_id": raw["build_id"], "installer_sha256": raw["installer_sha256"]}
if browser not in (None, meta):
raise ExtractError("%s is not the same browser as the others: %r and %r" % (path, meta, browser))
browser = meta
readings = read_step(raw, str(path))
if first is None:
first = readings
elif readings != first:
raise ExtractError("%s %s: round %s launch %s reads %r, the first one read %r" % (dpr_dir, panel, round_name, launch, readings, first))
files.append({"path": "%s/%s/%s/%s/raw.json" % (round_name, dpr_dir, panel, launch), "sha256": sha256_of(path)})
cases[case_id(panel, scale)] = first or {}
return {
"about": "What retail Firefox reads in a popup of the maximized window after resizeBy(0, 0), moveBy(10, 10) and moveTo(99999, 0), per display case, extracted by scripts/extract_retail_popup_move_resize.py. Never edited by hand.",
"capture": {"rounds": rounds, "retail_captures_commit": commit, "popup_features": FEATURES, "moments_in_order": list(MOMENTS), "browser": browser},
"files": files,
"cases": cases,
}
def move_to_reading(moment: Dict[str, Any], where: str) -> Dict[str, Any]:
"""One moment of the ``popup-move-to`` format (short keys: ``iw``, ``ih``, ``ow``, ``oh``, ``sx``, ``sy``, ``availL``, ``availW``), in the shape of ``moment_reading``."""
try:
return {
"inner": [moment["iw"], moment["ih"]],
"outer": [moment["ow"], moment["oh"]],
"screen": [moment["sx"], moment["sy"]],
"avail": [moment["availL"], moment["availW"]],
}
except (KeyError, TypeError) as exc:
raise ExtractError("%s: the moment lacks %s" % (where, exc))
def position_of(ordinal: int) -> str:
"""``first``: the first popup the browser opens; ``later``: any popup after it (a throwaway popup counts)."""
return POSITION_FIRST if ordinal == 1 else POSITION_LATER
def read_launch(raw: Dict[str, Any], launch: str, where: str) -> List[Tuple[str, int, Dict[str, Dict[str, Any]]]]:
"""``[(phase, ordinal, readings)]`` of one launch of the ``popup-move-to`` capture, each phase checked against the plan of the launch, its calls and the order of its moments."""
if raw.get("format") != MOVE_TO_FORMAT:
raise ExtractError("%s has the format %r, not %r" % (where, raw.get("format"), MOVE_TO_FORMAT))
if raw.get("error") is not None:
raise ExtractError("%s ends with the error %r" % (where, raw.get("error")))
if raw.get("launch") != launch:
raise ExtractError("%s is launch %r, not %r" % (where, raw.get("launch"), launch))
if raw.get("phases_planned") != MOVE_TO_LAUNCHES[launch]:
raise ExtractError("%s ran the popups %r, not %r: the position of a phase in the browser's life is not the one this launch is for" % (
where, raw.get("phases_planned"), MOVE_TO_LAUNCHES[launch]))
found = []
for ordinal, phase in enumerate(MOVE_TO_LAUNCHES[launch], 1):
label = "%s step phase_%s" % (where, phase)
try:
step = raw["steps"]["phase_" + phase]
moments = step["moments"]
except (KeyError, TypeError):
raise ExtractError("%s is missing: no retail value, none invented" % label)
if step.get("ordinal") != ordinal:
raise ExtractError("%s is popup number %r of the browser, the plan says %r" % (label, step.get("ordinal"), ordinal))
if step.get("features") != FEATURES:
raise ExtractError("%s: the popup was opened with %r, not %r" % (label, step.get("features"), FEATURES))
if step.get("closed") is not True:
raise ExtractError("%s: the popup was not closed (%r), the next popup would not be the next one of a test that closes each" % (label, step.get("closed")))
if step.get("calls") != MOVE_TO_CALLS[phase]:
raise ExtractError("%s: the calls are %r, not %r" % (label, step.get("calls"), MOVE_TO_CALLS[phase]))
wanted = MOVE_TO_MOMENTS[phase]
missing = [m for m in wanted if m not in moments]
if missing:
raise ExtractError("%s lacks the moments %r: no retail value, none invented" % (label, missing))
readings = {m: move_to_reading(moments[m], "%s %s" % (label, m)) for m in wanted}
at = {m: readings[m]["screen"] for m in wanted}
if phase == "resize_by_zero":
in_order = at["resized"] == at["initial"]
elif phase == "move_by":
in_order = at["moved"] != at["initial"]
elif phase == "move_to_far_right":
in_order = at["moved"] != at["initial"] and at["moved_to"] != at["moved"]
else:
in_order = True
if not in_order:
raise ExtractError("%s: the positions %r do not follow the order %r" % (label, at, list(wanted)))
if phase != "throwaway":
found.append((phase, ordinal, readings))
return found
def build_move_to(capture: Path, run_id: str, commit: str) -> Dict[str, Any]:
"""The readings of every phase as the first popup of a browser and as a later popup: the four launches of the four display cases of one ``popup-move-to`` capture folder (the date folder), each
raw.json checked against the sha256 of its ``meta.json``. Popups of the same phase and the same position (``first``, ``later``) must read the same, or the extraction fails."""
run_info_path = capture / "run-info.json"
if not run_info_path.is_file():
raise ExtractError("missing %s" % run_info_path)
run_info = json.loads(run_info_path.read_text(encoding="utf-8"))
try:
binaries = {name: run_info["binaries"][name]["sha256"] for name in MOVE_TO_BINARIES}
except (KeyError, TypeError) as exc:
raise ExtractError("%s lacks the sha256 of %s" % (run_info_path, exc))
cases: Dict[str, Dict[str, Dict[str, Dict[str, Any]]]] = {}
sources: Dict[str, Dict[str, Dict[str, List[str]]]] = {}
files: List[Dict[str, str]] = []
browser: Optional[Dict[str, Any]] = None
for dpr_dir, panel, scale in DISPLAYS:
meta_path = capture / dpr_dir / "meta.json"
if not meta_path.is_file():
raise ExtractError("missing %s" % meta_path)
meta_file = json.loads(meta_path.read_text(encoding="utf-8"))
if meta_file.get("format") != MOVE_TO_META_FORMAT:
raise ExtractError("%s has the format %r, not %r" % (meta_path, meta_file.get("format"), MOVE_TO_META_FORMAT))
groups: Dict[Tuple[str, str], List[Tuple[str, int, Dict[str, Dict[str, Any]]]]] = {}
for launch in MOVE_TO_LAUNCHES:
path = capture / dpr_dir / panel / launch / "raw.json"
if not path.is_file():
raise ExtractError("missing %s" % path)
want = (meta_file.get("raw_sha256") or {}).get("%s/%s/raw.json" % (panel, launch))
have = sha256_of(path)
if want != have:
raise ExtractError("%s has the sha256 %s, its meta.json says %s: the file is not the one the capture wrote" % (path, have, want))
raw = json.loads(path.read_text(encoding="utf-8"))
if raw.get("dpr_asked") != scale:
raise ExtractError("%s asks scale %r, not %r" % (path, raw.get("dpr_asked"), scale))
found = {"firefox_version": raw["firefox_version"], "build_id": raw["build_id"], "installer_sha256": raw["installer_sha256"]}
if found != {k: meta_file.get(k) for k in found}:
raise ExtractError("%s is not the browser its meta.json names: %r" % (path, found))
if browser not in (None, found):
raise ExtractError("%s is not the same browser as the others: %r and %r" % (path, found, browser))
browser = found
for phase, ordinal, readings in read_launch(raw, launch, str(path)):
groups.setdefault((phase, position_of(ordinal)), []).append((launch, ordinal, readings))
files.append({"path": "%s/%s/%s/raw.json" % (dpr_dir, panel, launch), "sha256": have})
case: Dict[str, Dict[str, Dict[str, Any]]] = {}
origin: Dict[str, Dict[str, List[str]]] = {}
for phase in MOVE_TO_PHASES:
for position in (POSITION_FIRST, POSITION_LATER):
group = groups.get((phase, position))
if not group:
raise ExtractError("%s %s: no capture of %s as the %s popup of a browser: no retail value, none invented" % (dpr_dir, panel, phase, position))
first_launch, first_ordinal, first_readings = group[0]
for launch, ordinal, readings in group[1:]:
if readings != first_readings:
raise ExtractError("%s %s %s: the %s popup number %d of launch %s reads %r, popup number %d of launch %s read %r: popups of one position must agree" % (
dpr_dir, panel, phase, position, ordinal, launch, readings, first_ordinal, first_launch, first_readings))
case.setdefault(phase, {})[position] = first_readings
origin.setdefault(phase, {})[position] = ["%s#%d" % (launch, ordinal) for launch, ordinal, _ in group]
cases[case_id(panel, scale)] = case
sources[case_id(panel, scale)] = origin
named = (run_info.get("build") or {}).get("build_id")
if named != (browser or {}).get("build_id"):
raise ExtractError("%s names the build %r, the raw files %r" % (run_info_path, named, (browser or {}).get("build_id")))
return {
"about": "What retail Firefox reads in a popup of the maximized window, per display case, per phase of the wrapper test (resize_by_zero, move_by, move_to_far_right) and per position in the browser's life "
"(first: the first popup the browser opens; later: any popup after it), from the popup-move-to capture; a test phase asserts against the position it has in the test. Extracted by "
"scripts/extract_retail_popup_move_resize.py. Never edited by hand.",
"capture": {
"run_id": run_id,
"retail_captures_commit": commit,
"folder": capture.name,
"format": MOVE_TO_FORMAT,
"popup_features": FEATURES,
"launches": MOVE_TO_LAUNCHES,
"browser": browser,
"binaries_sha256": binaries,
},
"files": files,
"sources": sources,
"cases": cases,
}
def cross_check(rounds: Dict[str, Any], cases: Dict[str, Any]) -> Dict[str, List[str]]:
"""What the window-geometry rounds read for a popup after ``resizeBy(0, 0)`` (``initial``, ``resized``) must be what SOME position of the popup-move-to capture reads (the rounds ran it as a later popup,
after other popups): a value no position reproduces is an anomaly, reported, not chosen. Returns, per case, the positions that reproduce it."""
reproduced_by: Dict[str, List[str]] = {}
for case, moments in rounds["cases"].items():
reproduced_by[case] = [pos for pos, got in cases[case]["resize_by_zero"].items() if all(got[m] == moments[m] for m in ("initial", "resized"))]
if not reproduced_by[case]:
raise ExtractError("%s: the rounds read %r after resizeBy(0, 0), no position of the popup-move-to capture reads that (%r)" % (
case, {m: moments[m] for m in ("initial", "resized")}, cases[case]["resize_by_zero"]))
return reproduced_by
def dumps(data: Dict[str, Any]) -> str:
return json.dumps(data, indent=2) + "\n"
def main(argv: Optional[List[str]] = None) -> int:
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
parser.add_argument("--captures", required=True, type=Path, help="the captures folder of RetailCaptures")
parser.add_argument("--rounds", required=True, nargs="+")
parser.add_argument("--commit", required=True, help="the RetailCaptures commit the rounds are in")
parser.add_argument("--move-to-capture", required=True, type=Path, help="the date folder of the popup-move-to capture (with run-info.json and the dpr folders)")
parser.add_argument("--move-to-run-id", required=True, help="the id of the run that made the popup-move-to capture")
parser.add_argument("--move-to-commit", required=True, help="the RetailCaptures commit the popup-move-to capture is in")
parser.add_argument("--write", action="store_true", help="write ci/retail-popup-move-resize.json; without it the committed file is compared with the captures")
args = parser.parse_args(argv)
try:
rounds = build(args.captures, args.rounds, args.commit)
data = build_move_to(args.move_to_capture, args.move_to_run_id, args.move_to_commit)
data["rounds_cross_check"] = {
"about": "The window-geometry rounds (a popup after resizeBy(0, 0) as a later popup of a long browser life) read what the positions listed in reproduced_by read in the popup-move-to capture; they are not read by the test.",
"capture": rounds["capture"],
"files": rounds["files"],
"reproduced_by": cross_check(rounds, data["cases"]),
}
text = dumps(data)
except ExtractError as exc:
print("EXTRACTION FAILED: %s" % exc, file=sys.stderr)
return 2
if args.write:
DATA_PATH.write_text(text, encoding="utf-8", newline="\n")
print("wrote %s" % DATA_PATH)
return 0
if DATA_PATH.read_text(encoding="utf-8") != text:
print("%s is not what the captures give" % DATA_PATH, file=sys.stderr)
return 1
print("%s is what the captures give" % DATA_PATH)
return 0
if __name__ == "__main__":
sys.exit(main())
+175
View File
@@ -0,0 +1,175 @@
#!/usr/bin/env python3
"""Extracts, from a retail capture of the window geometry, the sizes retail Firefox gives a popup opened from a maximized main window, into ci/retail-popup-sizes.json.
The e2e test ``tests/test_a_popup_reads_the_retail_sizes_of_a_maximized_main_window_e2e.py`` compares what a popup reads with what RETAIL Firefox 159 on Windows read. Those numbers were a table typed
by hand, and one was wrong (outer width 514 at scale 1.5, the value of 1.25; retail read 515). They are therefore read from the capture, never typed:
* ``<round>/<dpr>/<panel>/<launch>/raw.json``, step ``popup_sizes``, variant by variant (one variant per feature string; the variant says which string it is in ``features``): the popup at
one second after its load (``at_1s``: inner, outer, ``screenX``/``screenY``) and the visual viewport at ``load`` (``early.load``). Launch ``a`` is the one extracted; launch ``b`` (a second
launch of the same display case) must give the same values, or the extraction fails: a value the two launches disagree on is not a value.
* ``captures/WINDOW_GEOMETRY_POPUP_FRAME.csv`` (when given): its rows of step ``popup`` (``width=500,height=400``, launch ``a``, every round) must give the inner, outer and screen position that
``popup_sizes`` gives for the same string, or the extraction fails.
The file records the round, the browser (version, build id, installer sha256), the sha256 of every raw.json and of the CSV that were read. The wrapper's CI has no capture, so the tests read the
committed file and this module's functions are tested on a small sample (tests/test_the_retail_popup_sizes_are_extracted_from_the_capture_not_typed.py). One command regenerates the file:
python scripts/extract_retail_popup_sizes.py --captures <RetailCaptures>/captures --round 2026-12-01-window-geometry-r12 --run-url <url of the run> --commit <RetailCaptures commit> --write
and the same without ``--write`` compares the committed file with what the capture gives (the check).
"""
from __future__ import annotations
import argparse
import csv
import hashlib
import json
import sys
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
ROOT = Path(__file__).resolve().parent.parent
DATA_PATH = ROOT / "ci" / "retail-popup-sizes.json"
BROWSER_DIR = "firefox-159.0/github-runner"
CSV_NAME = "WINDOW_GEOMETRY_POPUP_FRAME.csv"
#: The four display cases, in the order of their scale: (folder of the dpr, panel, scale).
DISPLAYS = (("dpr1", "1920x1080", 1.0), ("dpr1.25", "1920x1080", 1.25), ("dpr1.5", "1920x1080", 1.5), ("dpr2", "1600x1200", 2.0))
#: The feature strings the e2e test opens popups with (the tab, ``''``, is not a popup).
FEATURES = ("width=500,height=400", "popup", "width=500", "height=400", "width=300,height=200", "width=800,height=600", "left=100,top=100", "left=5000,top=5000")
class ExtractError(Exception):
"""What the capture does not give, or gives two ways: nothing is invented in its place."""
def case_id(panel: str, scale: float) -> str:
return "%s-dpr%s" % (panel, scale)
def sha256_of(path: Path) -> str:
return hashlib.sha256(path.read_bytes()).hexdigest()
def variants_of(raw: Dict[str, Any], where: str) -> Dict[str, Dict[str, Any]]:
"""``{features: variant}`` of the step ``popup_sizes`` of one raw.json."""
try:
found = raw["steps"]["popup_sizes"]["variants"]
except (KeyError, TypeError):
raise ExtractError("%s has no step popup_sizes with variants" % where)
return {v["features"]: v for v in found.values() if isinstance(v, dict) and "features" in v}
def reading(variant: Dict[str, Any], where: str) -> Dict[str, Any]:
"""What retail read for one variant: inner, outer, screen (one second after the load) and the visual viewport height (at ``load``)."""
try:
at, load = variant["at_1s"], variant["early"]["load"]
return {
"inner": [at["innerWidth"], at["innerHeight"]],
"outer": [at["outerWidth"], at["outerHeight"]],
"screen": [at["screenX"], at["screenY"]],
"vv_height": load["visualViewportHeight"],
}
except (KeyError, TypeError) as exc:
raise ExtractError("%s: the variant lacks %s" % (where, exc))
def extract_display(capture: Path, dpr_dir: str, panel: str, scale: float) -> Tuple[Dict[str, Dict[str, Any]], List[Dict[str, str]], Dict[str, Any]]:
"""The readings of one display case, from launch ``a``, checked against launch ``b``; the files read; the browser they come from."""
files, per_launch, meta = [], {}, {}
for launch in ("a", "b"):
path = capture / dpr_dir / panel / launch / "raw.json"
if not path.is_file():
raise ExtractError("missing %s" % path)
raw = json.loads(path.read_text(encoding="utf-8"))
if raw.get("dpr_asked") != scale:
raise ExtractError("%s asks scale %r, not %r" % (path, raw.get("dpr_asked"), scale))
found = variants_of(raw, str(path))
per_launch[launch] = {}
for features in FEATURES:
if features not in found:
raise ExtractError("%s has no popup_sizes variant for %r: no retail value, none invented" % (path, features))
per_launch[launch][features] = reading(found[features], "%s %r" % (path, features))
files.append({"path": "%s/%s/%s/raw.json" % (dpr_dir, panel, launch), "sha256": sha256_of(path)})
meta[launch] = {"firefox_version": raw["firefox_version"], "build_id": raw["build_id"], "installer_sha256": raw["installer_sha256"]}
for features in FEATURES:
if per_launch["a"][features] != per_launch["b"][features]:
raise ExtractError("%s %s %r: launch a reads %r and launch b reads %r" % (dpr_dir, panel, features, per_launch["a"][features], per_launch["b"][features]))
if meta["a"] != meta["b"]:
raise ExtractError("%s %s: the two launches are not the same browser: %r" % (dpr_dir, panel, meta))
return per_launch["a"], files, meta["a"]
def check_csv(csv_path: Path, cases: Dict[str, Dict[str, Dict[str, Any]]]) -> None:
"""Every ``popup`` row of launch ``a`` of the CSV (``width=500,height=400``, every round) agrees with the extracted reading of the same display case."""
seen = 0
with csv_path.open(encoding="utf-8", newline="") as handle:
for number, row in enumerate(csv.DictReader(handle), start=2):
if row["step"] != "popup" or row["launch"] != "a":
continue
panel = row["path"].split("/")[-3]
case = case_id(panel, float(row["dpr_asked"]))
got = cases.get(case, {}).get(row["features"])
if got is None:
raise ExtractError("%s row %d: no extracted reading for %s, %r" % (csv_path.name, number, case, row["features"]))
seen += 1
have = {"inner": [int(row["innerWidth"]), int(row["innerHeight"])], "outer": [int(row["outerWidth"]), int(row["outerHeight"])], "screen": [int(row["screenX"]), int(row["screenY"])]}
for key, value in have.items():
if got[key] != value:
raise ExtractError("%s row %d (%s, %r): %s is %r in the CSV and %r in popup_sizes" % (csv_path.name, number, case, row["features"], key, value, got[key]))
if not seen:
raise ExtractError("%s has no popup row of launch a" % csv_path.name)
def build(captures: Path, round_name: str, run_url: str, commit: str) -> Dict[str, Any]:
capture = captures / BROWSER_DIR / round_name
cases: Dict[str, Dict[str, Dict[str, Any]]] = {}
files: List[Dict[str, str]] = []
browser: Optional[Dict[str, Any]] = None
for dpr_dir, panel, scale in DISPLAYS:
readings, read, meta = extract_display(capture, dpr_dir, panel, scale)
if browser not in (None, meta):
raise ExtractError("the display cases come from two browsers: %r and %r" % (browser, meta))
browser = meta
cases[case_id(panel, scale)] = readings
files.extend(read)
csv_path = captures / CSV_NAME
check_csv(csv_path, cases)
return {
"about": "What retail Firefox reads in a popup opened from a maximized main window, per display case and feature string, extracted by scripts/extract_retail_popup_sizes.py. Never edited by hand.",
"capture": {"round": round_name, "run": run_url, "retail_captures_commit": commit, "browser": browser},
"files": files,
"csv_checked": {"path": CSV_NAME, "sha256": sha256_of(csv_path)},
"cases": cases,
}
def dumps(data: Dict[str, Any]) -> str:
return json.dumps(data, indent=2, sort_keys=False) + "\n"
def main(argv: Optional[List[str]] = None) -> int:
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
parser.add_argument("--captures", required=True, type=Path, help="the captures folder of RetailCaptures")
parser.add_argument("--round", required=True)
parser.add_argument("--run-url", required=True)
parser.add_argument("--commit", required=True, help="the RetailCaptures commit the round is in")
parser.add_argument("--write", action="store_true", help="write ci/retail-popup-sizes.json; without it the committed file is compared with the capture")
args = parser.parse_args(argv)
try:
text = dumps(build(args.captures, args.round, args.run_url, args.commit))
except ExtractError as exc:
print("EXTRACTION FAILED: %s" % exc, file=sys.stderr)
return 2
if args.write:
DATA_PATH.write_text(text, encoding="utf-8", newline="\n")
print("wrote %s" % DATA_PATH)
return 0
if DATA_PATH.read_text(encoding="utf-8") != text:
print("%s is not what the capture gives" % DATA_PATH, file=sys.stderr)
return 1
print("%s is what the capture gives" % DATA_PATH)
return 0
if __name__ == "__main__":
sys.exit(main())
+4
View File
@@ -0,0 +1,4 @@
<!doctype html>
<meta charset=utf-8>
<title>not controlled</title>
<p>The service worker did not answer this navigation.</p>
+14
View File
@@ -0,0 +1,14 @@
<!doctype html>
<meta charset=utf-8>
<title>frame</title>
<script>
document.write('<script src="/ab/realm.js' + location.search + '"><\/script>');
</script>
<script>
(async () => {
const q = new URLSearchParams(location.search);
const data = await abRealm();
data.host = location.hostname;
parent.postMessage({id: q.get('id'), data}, '*');
})();
</script>
+4
View File
@@ -0,0 +1,4 @@
<!doctype html>
<meta charset=utf-8>
<title>leave</title>
<p>The page of the back and forward step.</p>
+16
View File
@@ -0,0 +1,16 @@
<!doctype html>
<meta charset=utf-8>
<title>opened</title>
<script>
document.write('<script src="/ab/realm.js' + location.search + '"><\/script>');
</script>
<script>
(async () => {
const q = new URLSearchParams(location.search);
const data = await abRealm();
const bar = n => { try { return window[n].visible; } catch (e) { return 'ERR'; } };
data.geometry = {innerWidth, innerHeight, outerWidth, outerHeight, screenX, screenY, screen: [screen.width, screen.height, screen.availWidth, screen.availHeight],
bars: ['menubar', 'toolbar', 'locationbar', 'statusbar', 'scrollbars', 'personalbar'].map(bar), hasOpener: !!window.opener, name: window.name};
try { opener.postMessage({id: q.get('id'), data}, '*'); } catch (e) {}
})();
</script>
+95
View File
@@ -0,0 +1,95 @@
// The surface subset one realm reads: the same text is loaded by the page, a cross-site iframe, a srcdoc iframe, a worker, a shared worker, a
// service worker and an audio worklet, so that a value the engine declares for one realm and forgets for another shows as a difference.
// Everything here is a plain read of what the realm exposes; a realm that lacks an API says 'absent'.
(function (root) {
'use strict';
const errs = e => 'ERR ' + ((e && e.name) || '') + ': ' + ((e && e.message) || String(e));
const bytesHash = u8 => {
let a = 0x811c9dc5, b = 0xdeadbeef;
for (let i = 0; i < u8.length; i++) { a = Math.imul(a ^ u8[i], 0x01000193) >>> 0; b = Math.imul(b ^ u8[i], 0x5bd1e995) >>> 0; b ^= b >>> 13; }
return u8.length + ':' + a.toString(16) + b.toString(16);
};
// A PNG of Firefox carries a per-launch "deBG" chunk (the host gate's noise.png_deBG): the bytes are hashed without it, so that two launches of one engine agree.
const pngHash = u8 => {
const keep = [u8.subarray(0, 8)];
for (let i = 8; i + 12 <= u8.length;) {
const n = (u8[i] << 24 | u8[i + 1] << 16 | u8[i + 2] << 8 | u8[i + 3]) >>> 0, t = String.fromCharCode(u8[i + 4], u8[i + 5], u8[i + 6], u8[i + 7]);
if (t !== 'deBG') keep.push(u8.subarray(i, i + 12 + n));
i += 12 + n;
}
const out = new Uint8Array(keep.reduce((a, x) => a + x.length, 0)); let o = 0; for (const k of keep) { out.set(k, o); o += k.length; }
return bytesHash(out);
};
const dataUrlHash = url => pngHash(Uint8Array.from(atob(url.split(',')[1]), ch => ch.charCodeAt(0)));
const TEXT = 'Hamburgefonstiv 0123 ZZ';
const draw = g => {
g.fillStyle = '#fff'; g.fillRect(0, 0, 160, 40); g.fillStyle = '#036'; g.font = '16px sans-serif'; g.fillText(TEXT, 4, 16);
g.font = '14px serif'; g.fillText('\u65e5\u672c\u8a9e Stra\u00dfe', 4, 34);
};
const measure = g => ['sans-serif', 'serif', 'monospace', 'ZZHostCanary, sans-serif'].map(f => { g.font = '16px ' + f; return g.measureText(TEXT).width; });
const scene = c => {
const gl = c.getContext('webgl');
if (!gl) return 'no webgl';
const sh = (type, src) => { const s = gl.createShader(type); gl.shaderSource(s, src); gl.compileShader(s); return s; };
const p = gl.createProgram();
gl.attachShader(p, sh(gl.VERTEX_SHADER, 'attribute vec2 a;void main(){gl_Position=vec4(a,0.,1.);}'));
gl.attachShader(p, sh(gl.FRAGMENT_SHADER, 'precision mediump float;void main(){gl_FragColor=vec4(.9,.3,.1,1.);}'));
gl.linkProgram(p); gl.useProgram(p);
const buf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buf);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-0.8, -0.8, 0.8, -0.8, 0, 0.8]), gl.STATIC_DRAW);
const a = gl.getAttribLocation(p, 'a'); gl.enableVertexAttribArray(a); gl.vertexAttribPointer(a, 2, gl.FLOAT, false, 0, 0);
gl.viewport(0, 0, 32, 32); gl.clearColor(0.2, 0.4, 0.6, 1); gl.clear(gl.COLOR_BUFFER_BIT); gl.drawArrays(gl.TRIANGLES, 0, 3);
const px = new Uint8Array(32 * 32 * 4); gl.readPixels(0, 0, 32, 32, gl.RGBA, gl.UNSIGNED_BYTE, px);
const dbg = gl.getExtension('WEBGL_debug_renderer_info');
return {pixels: bytesHash(px), vendor: gl.getParameter(gl.VENDOR), renderer: gl.getParameter(gl.RENDERER),
unmasked: dbg ? [gl.getParameter(dbg.UNMASKED_VENDOR_WEBGL), gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL)] : 'absent'};
};
// What needs no await: the only part an audio worklet can read.
const readSync = () => {
const o = {};
const t = (k, f) => { try { o[k] = f(); } catch (e) { o[k] = errs(e); } };
const nav = root.navigator;
if (nav) {
t('language', () => nav.language); t('languages', () => Array.from(nav.languages)); t('platform', () => nav.platform);
t('hardwareConcurrency', () => nav.hardwareConcurrency); t('userAgent', () => nav.userAgent);
} else { o.navigator = 'absent'; }
t('intl', () => { const r = new Intl.DateTimeFormat().resolvedOptions(); return [r.locale, r.timeZone, r.calendar, r.numberingSystem]; });
const d = new Date(Date.UTC(2026, 0, 15, 12)), s = new Date(Date.UTC(2026, 6, 15, 12));
t('dates', () => [d.toString(), s.toString(), d.toLocaleString(), d.toLocaleDateString(undefined, {dateStyle: 'full'}), (1234567.891).toLocaleString(),
d.getTimezoneOffset(), s.getTimezoneOffset()]);
t('sampleRate', () => typeof root.sampleRate === 'number' ? root.sampleRate : 'absent');
return o;
};
const read = async () => {
const o = readSync();
const ta = async (k, f) => { try { o[k] = await f(); } catch (e) { o[k] = errs(e); } };
if (root.document && root.document.createElement) {
await ta('canvas', async () => {
const c = root.document.createElement('canvas'); c.width = 160; c.height = 40; const g = c.getContext('2d'); draw(g);
return {toDataURL: dataUrlHash(c.toDataURL()), pixels: bytesHash(g.getImageData(0, 0, 160, 40).data), measure: measure(g)};
});
await ta('webgl', async () => { const c = root.document.createElement('canvas'); c.width = 32; c.height = 32; return scene(c); });
} else { o.canvas = 'absent'; }
if (typeof root.OffscreenCanvas === 'function') {
await ta('offscreen', async () => {
const c = new root.OffscreenCanvas(160, 40), g = c.getContext('2d'); draw(g);
const m = measure(g), blob = await c.convertToBlob();
return {measure: m, png: pngHash(new Uint8Array(await blob.arrayBuffer()))};
});
await ta('offscreen_webgl', async () => scene(new root.OffscreenCanvas(32, 32)));
} else { o.offscreen = 'absent'; }
return o;
};
root.abRealm = read;
root.abRealmSync = readSync;
// An audio worklet runs this file as a module: its processor reports what the worklet's own realm reads, when it is created.
if (typeof root.registerProcessor === 'function' && typeof root.AudioWorkletProcessor === 'function') {
root.registerProcessor('ab-probe', class extends root.AudioWorkletProcessor {
constructor() { super(); this.port.postMessage(readSync()); }
process() { return false; }
});
}
})(typeof globalThis !== 'undefined' ? globalThis : self);
+5
View File
@@ -0,0 +1,5 @@
importScripts('/ab/realm.js' + location.search);
onconnect = e => {
const port = e.ports[0];
port.onmessage = async () => { port.postMessage(await abRealm()); };
};
+89
View File
@@ -0,0 +1,89 @@
<!doctype html>
<meta charset=utf-8>
<title>ab</title>
<body>
<script>
// The A/B oracle's visit of the surfaces a plain read of the top window does not reach: every realm and every kind of window a page can make
// reads the same subset (realm.js), and the server says which Accept-Language it saw for each kind of request. The page is served from
// http://127.0.0.1 (a secure context: service workers and the audio worklet need one); `?ctx=` names the context it runs in.
// What it records goes to window.__abResult; the title says when it is done. A step that does not answer says 'timeout: <step>' after its own
// budget, never silence, so that the two engines of an A/B compare the same leaves.
document.write('<script src="/ab/realm.js' + location.search + '"><\/script>');
</script>
<script>
(async () => {
const Q = new URLSearchParams(location.search), CTX = Q.get('ctx') || 'none', ID = '?ctx=' + encodeURIComponent(CTX);
const errs = e => 'ERR ' + ((e && e.name) || '') + ': ' + ((e && e.message) || String(e));
const within = (p, ms, what) => Promise.race([p, new Promise(res => setTimeout(() => res('timeout: ' + what), ms))]);
const step = async (R, k, f, ms = 15000) => { try { R[k] = await within(Promise.resolve().then(f), ms, k); } catch (e) { R[k] = errs(e); } };
const waiting = {};
addEventListener('message', e => { const m = e.data; if (m && typeof m.id === 'string' && waiting[m.id]) { waiting[m.id](Object.assign({origin: e.origin.replace(/:\d+$/, ':<port>')}, m.data)); delete waiting[m.id]; } });
const popups = [];
const pop = (id, name, features) => new Promise(res => {
waiting[id] = res;
const url = '/ab/opened.html' + ID + '&id=' + id;
const w = features === undefined ? window.open(url, name) : window.open(url, name, features);
if (w) popups.push(w); else res('blocked');
});
addEventListener('pageshow', async e => {
let n = 1;
try { n = (Number(sessionStorage.getItem('abPs')) || 0) + 1; sessionStorage.setItem('abPs', String(n)); } catch (x) {}
let data; try { data = JSON.parse(JSON.stringify(await abRealm())); } catch (x) { data = errs(x); }
window.__abBf = {n, persisted: e.persisted, data};
});
let done = false;
try { done = sessionStorage.getItem('abDone') === '1'; } catch (x) {}
if (done) { document.title = 'ab-done'; return; }
const R = {};
await step(R, 'top', () => abRealm());
await step(R, 'iframe_cross', () => new Promise(res => {
waiting.cross = res;
const f = document.createElement('iframe'); f.src = 'http://localhost:' + location.port + '/ab/frame.html' + ID + '&id=cross'; document.body.appendChild(f); }));
await step(R, 'iframe_srcdoc', () => new Promise((res, rej) => {
const f = document.createElement('iframe');
f.srcdoc = '<!doctype html><script src="/ab/realm.js' + ID + '"><\/script>';
f.onload = async () => { try { res(await f.contentWindow.abRealm()); } catch (e) { rej(e); } };
document.body.appendChild(f); }));
await step(R, 'worker', () => new Promise((res, rej) => {
const w = new Worker('/ab/worker.js' + ID); w.onmessage = e => { res(e.data); w.terminate(); }; w.onerror = () => { rej(new Error('worker error')); w.terminate(); }; w.postMessage('go'); }));
await step(R, 'shared_worker', () => new Promise((res, rej) => {
const w = new SharedWorker('/ab/shared.js' + ID); w.port.onmessage = e => res(e.data); w.onerror = () => rej(new Error('shared worker error')); w.port.postMessage('go'); }));
await step(R, 'service_worker', async () => {
if (!navigator.serviceWorker) return 'absent';
const reg = await navigator.serviceWorker.register('/ab/sw.js' + ID, {scope: '/ab/'});
try {
await navigator.serviceWorker.ready;
const f = document.createElement('iframe'), loaded = new Promise(r => { f.onload = r; });
f.src = '/ab/controlled.html' + ID; document.body.appendChild(f); await loaded;
const el = f.contentDocument.getElementById('sw');
return el ? JSON.parse(el.textContent) : 'the worker did not answer the navigation';
} finally { try { await reg.unregister(); } catch (e) {} }
}, 20000);
await step(R, 'audio_worklet', async () => {
const ac = new AudioContext();
try {
await ac.audioWorklet.addModule('/ab/realm.js' + ID);
const node = new AudioWorkletNode(ac, 'ab-probe');
const got = new Promise(res => { node.port.onmessage = e => res(e.data); });
ac.resume().catch(() => {});
return await got;
} finally { try { await ac.close(); } catch (e) {} }
}, 8000);
await step(R, 'popup_plain', () => pop('plain', 'abPlain'));
await step(R, 'popup_features', () => pop('features', 'abFeatures', 'popup,width=500,height=420,left=40,top=30'));
for (const w of popups) { try { w.close(); } catch (e) {} }
// two more kinds of request, so that the server has seen a fetch and an image next to the documents, scripts and workers
await step(R, 'requests', async () => {
await fetch('/ab/probe' + ID + '&k=fetch');
await new Promise(res => { const i = new Image(); i.onload = i.onerror = res; i.src = '/ab/probe' + ID + '&k=image'; });
return 'made'; }, 5000);
await step(R, 'accept_language', async () => (await fetch('/ab/seen' + ID)).json(), 5000);
window.__abResult = JSON.parse(JSON.stringify(R));
try { sessionStorage.setItem('abDone', '1'); } catch (e) {}
document.title = 'ab-done';
})();
</script>
+17
View File
@@ -0,0 +1,17 @@
// A service worker that answers one navigation itself: the page it builds carries what the worker's own realm reads and the headers the
// worker saw on the request, so a controlled navigation is read through the worker, not around it.
importScripts('/ab/realm.js' + location.search);
self.addEventListener('install', () => self.skipWaiting());
self.addEventListener('activate', e => e.waitUntil(self.clients.claim()));
self.addEventListener('fetch', e => {
const u = new URL(e.request.url);
if (u.pathname !== '/ab/controlled.html') return;
e.respondWith((async () => {
const data = await abRealm();
data.request = {acceptLanguage: e.request.headers.get('accept-language'), mode: e.request.mode, destination: e.request.destination};
try { data.own_fetch = (await fetch('/ab/probe' + u.search)).status; } catch (x) { data.own_fetch = 'ERR ' + ((x && x.name) || ''); }
const json = JSON.stringify(data).replace(/</g, '\\u003c');
return new Response('<!doctype html><meta charset=utf-8><title>controlled</title><script type="application/json" id="sw">' + json + '</script>',
{headers: {'Content-Type': 'text/html; charset=utf-8'}});
})());
});
+2
View File
@@ -0,0 +1,2 @@
importScripts('/ab/realm.js' + location.search);
onmessage = async () => { postMessage(await abRealm()); };
+38
View File
@@ -281,6 +281,44 @@ await safe('surface.branding', () => Promise.all(['chrome://branding/locale/bran
noise('history_length', history.length);
noise('main_loop_ms', await new Promise(r => { const t = performance.now(); setTimeout(() => r(Math.round(performance.now() - t)), 20); }));
// ================================================================= AB (read by the A/B oracle only, never by the retail comparison)
// ab.poison: what the page reads of values a host may hold and the engine must never read: the zone, the language, the colour scheme, a
// user-installed canary font (scripts/ci_poison_host.py puts them on the oracle's runner and holds the engine's dumps to the declared identity).
// The probe between the two markers is self-contained: the negative control evaluates the same text in Playwright's own Firefox.
// ab.poison:begin
const abPoisonProbe = async () => {
const o = {}, f = (k, g) => { try { o[k] = g(); } catch (e) { o[k] = 'ERR ' + ((e && e.name) || ''); } };
const jan = new Date(Date.UTC(2026, 0, 15, 12)), jul = new Date(Date.UTC(2026, 6, 15, 12));
f('timezone', () => Intl.DateTimeFormat().resolvedOptions().timeZone);
f('offsets', () => [jan.getTimezoneOffset(), jul.getTimezoneOffset()]);
f('language', () => navigator.language);
f('languages', () => Array.from(navigator.languages));
f('intl_locale', () => Intl.DateTimeFormat().resolvedOptions().locale);
f('date_full', () => jan.toLocaleDateString(undefined, {dateStyle: 'full'}));
f('number', () => (1234567.891).toLocaleString());
f('dark', () => matchMedia('(prefers-color-scheme: dark)').matches);
// document.fonts.check answers true for a family nobody has (the specification: nothing to load), so it is recorded and the WIDTH decides
f('canary_check', () => document.fonts.check('12px ZZHostCanary'));
f('canary', () => {
const box = document.createElement('div'); box.style.cssText = 'position:absolute;left:-9999px;top:0;visibility:hidden;white-space:nowrap';
document.documentElement.appendChild(box);
const width = fam => { const e = document.createElement('span'); e.style.cssText = 'font:12px ' + fam; e.textContent = 'mmmmmmmmmmmm'; box.appendChild(e); const w = e.getBoundingClientRect().width; e.remove(); return w; };
const out = {with: [width('ZZHostCanary, monospace'), width('ZZHostCanary, serif')], without: [width('monospace'), width('serif')]};
box.remove(); out.present = out.with.some(w => Math.abs(w - 216) < 1); return out; }); // 12 boxes of 1.5 em at 12px: the canary's own width, whatever the fallbacks are
// the width of a text in each generic family: a host whose fontconfig prefers a user font for them answers that font's width
f('generic', () => {
const box = document.createElement('div'); box.style.cssText = 'position:absolute;left:-9999px;top:0;visibility:hidden;white-space:nowrap';
document.documentElement.appendChild(box);
const out = ['sans-serif', 'serif', 'monospace'].map(fam => { const e = document.createElement('span'); e.style.cssText = 'font:12px ' + fam; e.textContent = 'mmmmmmmmmmmm';
box.appendChild(e); const w = e.getBoundingClientRect().width; e.remove(); return w; });
box.remove(); return out; });
try { const c = new AudioContext(); o.audio = {sampleRate: c.sampleRate, maxChannelCount: c.destination.maxChannelCount}; try { c.close(); } catch (e) {} }
catch (e) { o.audio = 'ERR ' + ((e && e.name) || ''); }
return o;
};
// ab.poison:end
await safe('ab.poison', abPoisonProbe);
// ================================================================= DIAG (information, never compared)
// diag.*: why this host's WebGL is what it is (no WebGL2, no MSAA). Last, so its extra contexts
// cannot disturb anything measured above; each is lost again once read.
-738
View File
@@ -1,738 +0,0 @@
#!/usr/bin/env python3
"""A MAP of what a launch does, from the user's call to the first page, with the time of every step.
One question: where does the time of `InvisiblePlaywright(...)` go, from the call to a page that has loaded a first page? It is a measurement and nothing else: no
threshold, no verdict, and nothing of the product is changed. The product is measured from the outside: each function that is a step is wrapped by a timer that
calls the original (`time.perf_counter_ns` before and after, the thread's name), installed on the modules' attributes in the worker process only. A step the product
renames makes a target that is not found: it is said in the report (`unpatched`), never silently skipped.
Two modes of one file.
driver (default) starts a worker process per launch (a fresh interpreter each: the import of the packages is a step of a launch), `--runs` times on a warm
cache after one warm-up launch that is not counted, for each scenario; then ONE launch on a cold cache (a new cache directory, the engine kept: the
engine's download is not this map's, the workflow times `fetch` apart); then ONE launch under cProfile; then writes `init-map-<system>.json` and
`init-map-<system>.md` in `--out`.
worker (--worker) one launch: imports, the wrapped steps, `InvisiblePlaywright(...)` -> `__enter__` -> `browser.new_page()` -> two `goto` of a page on 127.0.0.1 ->
`__exit__`, and writes its spans as JSON.
Scenarios (`--scenarios`):
direct `InvisiblePlaywright(seed=...)`: no proxy, the exit asked of the internet (what a user without a proxy pays), the engine on the surface of the system.
proxy the same behind a SOCKS5 gateway of this machine (`tests/_socks_servers.py`, the fake web's: no real proxy; it forwards the question of the exit for real): the TCP exit is asked THROUGH the proxy and the
UDP exit is measured beside it, on a thread (the product's decision: they stay parallel).
headless `headless=True`: the hidden surface (an Xvfb on Linux, a Win32 desktop on Windows) is made by the launch.
What a time is. Every time is milliseconds of `time.perf_counter_ns`, relative to the instant before `InvisiblePlaywright(...)` is called. A step's `self` time is its
time minus the time of the steps inside it. A step runs `in parallel` with another when they are not one inside the other and they overlap in half of the runs or more.
The tree is made by containment of the intervals, so a span that a background thread makes while the caller waits sits under whichever step was open (its thread is in
the column `thread`).
"""
from __future__ import annotations
import argparse
import contextlib
import functools
import importlib
import json
import math
import os
import platform
import shutil
import signal
import statistics
import subprocess
import sys
import tempfile
import threading
import time
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
ROOT = Path(__file__).resolve().parent.parent
HERE = Path(__file__).resolve()
# ── what is wrapped ─────────────────────────────────────────────────────────
# (module, "Class.attr" or "attr", label). The labels are the names of the steps in the map. An entry whose target is not found is reported as `unpatched`.
TARGETS: List[Tuple[str, str, str]] = [
# the wrapper: the three calls of the user and what `__enter__` does
("invisible_playwright.launcher", "InvisiblePlaywright.__init__", "ctor"),
("invisible_playwright.launcher", "generate_profile", "ctor.generate_profile"),
("invisible_playwright.launcher", "guard_for", "ctor.lifetime_guard"),
("invisible_playwright._session", "declared_network", "ctor.declared_network"),
("invisible_playwright.launcher", "InvisiblePlaywright.__enter__", "enter"),
("invisible_playwright.launcher", "prepare_session_geo", "geo"),
("invisible_core._geo", "discover_egress_ip", "geo.tcp_egress_discovery"),
("invisible_core._udp_exit", "start_measurement", "geo.udp_measurement_start"),
("invisible_core._udp_exit", "PendingMeasurement._run", "geo.udp_probe_thread"),
("invisible_core._udp_exit", "PendingMeasurement.result", "geo.udp_join"),
("invisible_core._geo", "ensure_geoip_mmdb", "geo.geoip_database"),
("invisible_core._geo", "ip_to_timezone", "geo.ip_to_timezone"),
("invisible_core._geo", "ip_to_coordinates", "geo.ip_to_coordinates"),
("invisible_core._geo", "position_to_declare", "geo.declared_position"),
("invisible_core._geo", "_decide", "geo.decide_locale"),
("invisible_playwright.launcher", "resolve_executable", "engine_check"),
("invisible_playwright._engine", "ensure_binary", "engine_check.ensure_binary"),
("invisible_core.download", "read_stamp", "engine_check.read_stamp"),
("invisible_core.download", "verify_engine", "engine_check.verify_engine"),
("invisible_core.seal", "read_engine_identity", "engine_check.read_engine_identity"),
("invisible_core.seal", "engine_problems", "engine_check.engine_problems"),
("invisible_playwright._session", "CommonLaunch._resolve_headless", "resolve_headless"),
("invisible_playwright._session", "make_virtual_display", "resolve_headless.make_virtual_display"),
("invisible_playwright._session", "CommonLaunch._build_prefs", "build_prefs"),
("invisible_playwright._session", "compose_session_prefs", "build_prefs.compose_session_prefs"),
("invisible_playwright.launcher", "_configure_proxy_shared", "configure_proxy"),
("invisible_playwright._session", "CommonLaunch._build_env", "build_env"),
("invisible_playwright._session", "resolve_executable", "build_env.engine_check_again"),
("invisible_playwright._session", "verify_font_manifest", "build_env.verify_font_manifest"),
("invisible_playwright._session", "cached_font_manifest_path", "build_env.font_manifest_file"),
("invisible_playwright._session", "build_launch_env", "build_env.build_launch_env"),
# the client and the in-process server
("invisible_playwright._pw.sync_api._context_manager", "PlaywrightContextManager.__enter__", "playwright_start"),
("invisible_playwright._pw.sync_api._generated", "BrowserType.launch", "client_launch"),
("invisible_playwright._pw.sync_api._generated", "BrowserType.launch_persistent_context", "client_launch_persistent"),
("invisible_playwright._juggler.server", "BrowserTypeDispatcher.op_launch", "server_launch"),
("invisible_playwright._juggler.server", "session_for_launch", "server_launch.session_for_launch"),
("invisible_core.juggler._profile", "SessionFiles.__init__", "server_launch.session_files"),
("invisible_playwright._juggler.server", "take_session_motion", "server_launch.take_session_motion"),
("invisible_playwright._juggler.server", "write_user_js", "write_profile"),
("invisible_core._intermediates", "ensure_intermediates", "write_profile.intermediates_list"),
("invisible_playwright._juggler.server", "launch_proxy_command", "server_launch.launch_proxy_command"),
("invisible_core.juggler.connection", "launch", "engine_start"),
("invisible_core._engine_env", "compose", "engine_start.compose_environment"),
("invisible_core.juggler.connection", "_spawn_windows", "engine_start.spawn_process"),
("invisible_core.juggler.connection", "_spawn_posix", "engine_start.spawn_process"),
("invisible_core.juggler.connection", "ProcessOutput.wait_for_ready", "engine_start.wait_listening"),
("invisible_core.juggler.connection", "Connection.__init__", "engine_start.connection_init"),
("invisible_core.juggler.connection", "Connection.send_placed", "send"),
("invisible_playwright._juggler.server", "read_version", "server_launch.read_version"),
("invisible_playwright._juggler.server", "BrowserDispatcher.__init__", "server_launch.browser_dispatcher"),
("invisible_playwright.launcher", "assert_wire_version", "assert_wire_version"),
("invisible_playwright.launcher", "InvisiblePlaywright._patch_new_context_defaults", "patch_new_context_defaults"),
("invisible_playwright._session", "CommonLaunch._arm_cursor_engine", "arm_cursor_engine"),
# the first page
("invisible_playwright._pw.sync_api._generated", "Browser.new_page", "client_new_page"),
("invisible_playwright.launcher", "InvisiblePlaywright._assert_uscita_invariata", "egress_recheck"),
("invisible_playwright._juggler.server", "BrowserDispatcher.op_new_context", "server_new_context"),
("invisible_playwright._juggler.server", "BrowserDispatcher._apply_context_options", "server_new_context.apply_options"),
("invisible_playwright._juggler.server", "BrowserContextDispatcher.op_new_page", "server_new_page"),
("invisible_playwright._juggler.server", "BrowserDispatcher._wait_for_page", "server_new_page.wait_for_page"),
# the first goto
("invisible_playwright._pw.sync_api._generated", "Page.goto", "client_goto"),
("invisible_playwright._juggler.server", "FrameDispatcher.op_goto", "server_goto"),
# the end (not part of the map: told for the record)
("invisible_playwright.launcher", "InvisiblePlaywright.__exit__", "exit"),
]
#: Steps that run on a thread of their own by design; the others are in the line of the caller.
BACKGROUND = {"geo.udp_probe_thread"}
#: One line for each step: what it does.
DESC = {
"ctor": "constructor: seed, profile (fingerprint) and guard",
"ctor.generate_profile": "the profile generated from the seed",
"ctor.lifetime_guard": "the process lifetime guard",
"ctor.declared_network": "the network declared by the seed",
"enter": "__enter__: everything up to the browser being ready",
"geo": "prepare_session_geo: exit, zone, language, position",
"geo.tcp_egress_discovery": "discovery of the exit IP (TCP, an HTTPS request)",
"geo.udp_measurement_start": "start of the UDP measurement thread",
"geo.udp_probe_thread": "UDP measurement of the exit (a thread, beside the TCP discovery)",
"geo.udp_join": "wait for the UDP measurement and its verdict",
"geo.geoip_database": "GeoIP database (cache, daily check)",
"geo.ip_to_timezone": "zone from the IP",
"geo.ip_to_coordinates": "coordinates from the IP",
"geo.declared_position": "position declared from the seed",
"geo.decide_locale": "language decided from the exit",
"engine_check": "choice and verification of the engine (the seal)",
"engine_check.ensure_binary": "ensure_binary: the engine's cache",
"engine_check.read_stamp": "read the cache stamp",
"engine_check.verify_engine": "verify_engine: the engine against the seal",
"engine_check.read_engine_identity": "application.ini and provenance of the engine",
"engine_check.engine_problems": "comparison with the seal",
"resolve_headless": "hidden surface (headless=True)",
"resolve_headless.make_virtual_display": "makes the Xvfb / Win32 desktop",
"build_prefs": "composition of the prefs",
"build_prefs.compose_session_prefs": "the core's compose_session_prefs",
"configure_proxy": "proxy configuration",
"build_env": "construction of the environment",
"build_env.engine_check_again": "second verification of the engine (made by _build_env)",
"build_env.verify_font_manifest": "the font list against the engine",
"build_env.font_manifest_file": "the font list file",
"build_env.build_launch_env": "the process environment",
"playwright_start": "sync_playwright().start(): in-process server and client",
"client_launch": "BrowserType.launch, client side",
"client_launch_persistent": "launch_persistent_context, client side",
"server_launch": "op_launch of the in-process server",
"server_launch.session_for_launch": "the launch's session",
"server_launch.session_files": "profile and temporary directories",
"server_launch.take_session_motion": "takes the session prefs out",
"write_profile": "writing user.js",
"write_profile.intermediates_list": "the intermediates list (cache)",
"server_launch.launch_proxy_command": "the proxy command",
"engine_start": "engine start (connection.launch)",
"engine_start.compose_environment": "the engine's environment (_engine_env.compose)",
"engine_start.spawn_process": "process creation",
"engine_start.wait_listening": "wait for the engine to be ready (the listening line)",
"engine_start.connection_init": "Juggler connection",
"send": "Juggler message (round trip)",
"server_launch.read_version": "the engine's version",
"server_launch.browser_dispatcher": "BrowserDispatcher (Browser.enable)",
"assert_wire_version": "version on the wire against the seal",
"patch_new_context_defaults": "context defaults",
"arm_cursor_engine": "cursor engine",
"client_new_page": "browser.new_page(), client side",
"egress_recheck": "check of the exit (with a proxy only)",
"server_new_context": "first context",
"server_new_context.apply_options": "context options",
"server_new_page": "first page",
"server_new_page.wait_for_page": "wait for Page.ready",
"client_goto": "page.goto, client side",
"server_goto": "goto, server side",
"exit": "closing (outside the map)",
}
# ── the worker ──────────────────────────────────────────────────────────────
class Recorder:
def __init__(self) -> None:
self.spans: List[Dict[str, Any]] = []
self.lock = threading.Lock()
def add(self, label: str, t0: int, t1: int, extra: Optional[str] = None) -> None:
span = {"label": label, "t0": t0, "t1": t1, "thread": threading.current_thread().name}
if extra:
span["extra"] = extra
with self.lock:
self.spans.append(span)
def _timed(recorder: Recorder, label: str, fn):
@functools.wraps(fn)
def wrapper(*args, **kwargs):
start = time.perf_counter_ns()
extra = None
if label == "send":
method = args[1] if len(args) >= 2 else kwargs.get("method")
extra = method if isinstance(method, str) else None
try:
return fn(*args, **kwargs)
finally:
recorder.add(label if extra is None else "send:" + extra, start, time.perf_counter_ns())
return wrapper
def install(recorder: Recorder) -> List[str]:
"""Wrap every target; the labels of the targets that were not found."""
unpatched: List[str] = []
for module_name, dotted, label in TARGETS:
try:
module = importlib.import_module(module_name)
owner: Any = module
parts = dotted.split(".")
for part in parts[:-1]:
owner = getattr(owner, part)
original = getattr(owner, parts[-1])
setattr(owner, parts[-1], _timed(recorder, label, original))
except Exception as exc: # noqa: BLE001
unpatched.append("%s %s -> %s: %s" % (module_name, dotted, label, type(exc).__name__))
return unpatched
class _Page(BaseHTTPRequestHandler):
def do_GET(self): # noqa: N802
body = b"<!doctype html><title>init map</title><p>hello</p>"
self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, *args):
pass
def worker(args: argparse.Namespace) -> int:
started = time.perf_counter_ns()
result: Dict[str, Any] = {"status": "error", "scenario": args.scenario}
out = Path(args.out)
try:
t = time.perf_counter_ns()
import invisible_core # noqa: F401
marks = {"import_core": time.perf_counter_ns() - t}
t = time.perf_counter_ns()
from invisible_playwright.sync_api import InvisiblePlaywright
import invisible_playwright.launcher # noqa: F401
import invisible_playwright._juggler.server # noqa: F401
marks["import_wrapper"] = time.perf_counter_ns() - t
result["marks_ns"] = marks
recorder = Recorder()
if args.dry:
_dry()
result["unpatched"] = install(recorder)
httpd = ThreadingHTTPServer(("127.0.0.1", 0), _Page)
threading.Thread(target=httpd.serve_forever, daemon=True, name="init-map-page").start()
url = "http://127.0.0.1:%d/" % httpd.server_address[1]
kwargs: Dict[str, Any] = {"seed": args.seed}
if args.scenario == "headless":
kwargs["headless"] = True
if args.scenario == "proxy":
kwargs["proxy"] = {"server": args.proxy}
if args.stun:
kwargs["udp_stun_servers"] = [args.stun]
profiler = None
if args.profile:
import cProfile
profiler = cProfile.Profile()
instance = None
entered = False
call_start = time.perf_counter_ns()
try:
if profiler:
profiler.enable()
instance = InvisiblePlaywright(**kwargs)
browser = instance.__enter__()
entered = True
page = browser.new_page()
call_end = time.perf_counter_ns()
if profiler:
profiler.disable()
t = time.perf_counter_ns()
page.goto(url + "?1")
recorder.add("goto1", t, time.perf_counter_ns())
t = time.perf_counter_ns()
page.goto(url + "?2")
recorder.add("goto2", t, time.perf_counter_ns())
result["status"] = "ok"
result["call_ns"] = [call_start, call_end]
finally:
if profiler:
with contextlib.suppress(Exception):
profiler.disable()
if instance is not None:
with contextlib.suppress(Exception):
if entered:
instance.__exit__(None, None, None)
else:
instance._teardown()
if profiler and args.profile_out:
import io
import pstats
text = io.StringIO()
for key in ("cumulative", "tottime"):
stats = pstats.Stats(profiler, stream=text)
text.write("\n=== sorted by %s (main thread only; the first 45) ===\n" % key)
stats.sort_stats(key).print_stats(45)
Path(args.profile_out).write_text(text.getvalue(), encoding="utf-8")
result["spans"] = recorder.spans
result["call_ns"] = result.get("call_ns") or [call_start, time.perf_counter_ns()]
except BaseException as exc: # noqa: BLE001
import traceback
result["error"] = "%s: %s" % (type(exc).__name__, exc)
result["traceback"] = traceback.format_exc()[-3000:]
if "recorder" in locals():
result["spans"] = recorder.spans
result.setdefault("call_ns", [started, time.perf_counter_ns()])
result["python"] = sys.version.split()[0]
out.write_text(json.dumps(result), encoding="utf-8")
return 0
def _dry() -> None:
"""Local check of the wrapping only (never in a workflow): the engine is not started, `launch` raises after the steps before it."""
import invisible_core.juggler.connection as connection
import invisible_playwright._engine as engine
import invisible_playwright._session as session
import invisible_playwright.launcher as launcher
class Dry(RuntimeError):
pass
def fake_launch(*a, **k):
raise Dry("dry run: the engine is not started")
fake = lambda *a, **k: Path(sys.executable) # noqa: E731
for owner in (engine, session, launcher):
setattr(owner, "resolve_executable", fake)
connection.launch = fake_launch
# ── the driver ──────────────────────────────────────────────────────────────
def kill_tree(proc: subprocess.Popen) -> None:
try:
if os.name == "nt":
subprocess.run(["taskkill", "/F", "/T", "/PID", str(proc.pid)], capture_output=True, timeout=30)
else:
os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
except Exception: # noqa: BLE001
with contextlib.suppress(Exception):
proc.kill()
def run_worker(scenario: str, seed: int, workdir: Path, tag: str, *, proxy: str = "", stun: str = "", env_extra: Optional[Dict[str, str]] = None,
profile: bool = False, timeout: int = 300) -> Dict[str, Any]:
out = workdir / ("run-%s.json" % tag)
cmd = [sys.executable, "-u", str(HERE), "--worker", "--scenario", scenario, "--seed", str(seed), "--out", str(out)]
if proxy:
cmd += ["--proxy", proxy]
if stun:
cmd += ["--stun", stun]
if profile:
cmd += ["--profile", "--profile-out", str(workdir / ("profile-%s.txt" % tag))]
env = dict(os.environ, **(env_extra or {}))
kwargs: Dict[str, Any] = {"env": env, "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT}
if os.name != "nt":
kwargs["start_new_session"] = True
proc = subprocess.Popen(cmd, **kwargs)
try:
text, _ = proc.communicate(timeout=timeout)
except subprocess.TimeoutExpired:
kill_tree(proc)
text, _ = proc.communicate()
return {"status": "timeout", "scenario": scenario, "log": (text or b"").decode("utf-8", "replace")[-2000:]}
if proc.poll() is None:
kill_tree(proc)
if not out.exists():
return {"status": "no-result", "scenario": scenario, "log": (text or b"").decode("utf-8", "replace")[-2000:]}
data = json.loads(out.read_text(encoding="utf-8"))
if data.get("status") != "ok":
data["log"] = (text or b"").decode("utf-8", "replace")[-1500:]
return data
def build_run(data: Dict[str, Any]) -> Dict[str, Any]:
"""One run's spans as a tree, in ms relative to the call."""
call0, call1 = data["call_ns"]
spans = []
for s in data.get("spans", []):
if s["t1"] < call0:
continue
spans.append({"label": s["label"], "t0": (s["t0"] - call0) / 1e6, "t1": (s["t1"] - call0) / 1e6, "thread": s["thread"]})
spans.append({"label": "call", "t0": 0.0, "t1": (call1 - call0) / 1e6, "thread": "MainThread"})
spans.sort(key=lambda s: (s["t0"], -s["t1"]))
stack: List[Dict[str, Any]] = []
for s in spans:
if s["label"] in BACKGROUND:
# not in the line of the caller: it hangs under the step it started inside, and never holds another open
holder = [p for p in stack if p["t0"] <= s["t0"] and s["t1"] <= p["t1"] + 1e-9]
s["parent"] = holder[-1] if holder else None
s["bg"] = True
continue
while stack and not (stack[-1]["t0"] <= s["t0"] and s["t1"] <= stack[-1]["t1"] + 1e-9):
stack.pop()
s["parent"] = stack[-1] if stack else None
s["bg"] = False
stack.append(s)
seen: Dict[Tuple[int, str], int] = {}
for s in spans:
parent = s["parent"]
key = (id(parent), s["label"])
seen[key] = seen.get(key, 0) + 1
s["path"] = ((parent["path"] + "/") if parent else "") + s["label"] + ("" if seen[key] == 1 else "#%d" % seen[key])
s["depth"] = (parent["depth"] + 1) if parent else 0
for s in spans:
kids = [k["t1"] - k["t0"] for k in spans if k["parent"] is s and not k["bg"]]
s["self"] = max(0.0, (s["t1"] - s["t0"]) - sum(kids))
marks = data.get("marks_ns", {})
return {"spans": spans, "call_ms": (call1 - call0) / 1e6,
"import_core_ms": marks.get("import_core", 0) / 1e6, "import_wrapper_ms": marks.get("import_wrapper", 0) / 1e6}
def pct(values: List[float], q: float) -> float:
v = sorted(values)
return v[max(0, math.ceil(q * len(v)) - 1)]
def ancestors(s: Dict[str, Any]) -> set:
out = set()
while s["parent"] is not None:
s = s["parent"]
out.add(s["path"])
return out
def aggregate(runs: List[Dict[str, Any]]) -> Dict[str, Any]:
n = len(runs)
by_path: Dict[str, Dict[str, Any]] = {}
for r in runs:
for s in r["spans"]:
e = by_path.setdefault(s["path"], {"path": s["path"], "label": s["label"], "depth": s["depth"], "dur": [], "self": [], "start": [],
"threads": set(), "bg": s["bg"], "parent": s["parent"]["path"] if s["parent"] else None})
e["dur"].append(s["t1"] - s["t0"])
e["self"].append(s["self"])
e["start"].append(s["t0"])
e["threads"].add(s["thread"])
# overlaps: two steps neither of which holds the other, overlapping in half of the runs or more
overlap_runs: Dict[Tuple[str, str], int] = {}
for r in runs:
spans = [s for s in r["spans"] if s["t1"] - s["t0"] >= 2.0]
up = {s["path"]: ancestors(s) for s in spans}
for i, a in enumerate(spans):
for b in spans[i + 1:]:
if a["path"] in up[b["path"]] or b["path"] in up[a["path"]]:
continue
common = min(a["t1"], b["t1"]) - max(a["t0"], b["t0"])
if common >= max(1.0, 0.5 * min(a["t1"] - a["t0"], b["t1"] - b["t0"])):
key = tuple(sorted((a["path"], b["path"])))
overlap_runs[key] = overlap_runs.get(key, 0) + 1
parallel: Dict[str, List[str]] = {}
for (a, b), count in overlap_runs.items():
if count * 2 >= n:
parallel.setdefault(a, []).append(b)
parallel.setdefault(b, []).append(a)
total = [r["import_core_ms"] + r["import_wrapper_ms"] + r["call_ms"] + _goto1(r) for r in runs]
total_median = statistics.median(total)
steps = []
for e in by_path.values():
steps.append({
"path": e["path"], "label": e["label"], "depth": e["depth"], "parent": e["parent"], "count": len(e["dur"]),
"median_ms": round(statistics.median(e["dur"]), 3), "p90_ms": round(pct(e["dur"], 0.9), 3),
"min_ms": round(min(e["dur"]), 3), "max_ms": round(max(e["dur"]), 3),
"self_median_ms": round(statistics.median(e["self"]), 3),
"start_median_ms": round(statistics.median(e["start"]), 3),
"pct_total": round(100.0 * statistics.median(e["dur"]) / total_median, 2) if total_median else 0.0,
"thread": ",".join(sorted(e["threads"])), "background": e["bg"],
"in_parallel_with": sorted(parallel.get(e["path"], [])),
})
steps.sort(key=lambda x: (x["start_median_ms"], x["depth"]))
return {
"runs": n,
"total_ms": {"median": round(total_median, 1), "p90": round(pct(total, 0.9), 1), "min": round(min(total), 1), "max": round(max(total), 1)},
"import_core_ms": _stat([r["import_core_ms"] for r in runs]),
"import_wrapper_ms": _stat([r["import_wrapper_ms"] for r in runs]),
"call_ms": _stat([r["call_ms"] for r in runs]),
"steps": _in_tree_order(steps),
}
def _goto1(r: Dict[str, Any]) -> float:
for s in r["spans"]:
if s["label"] == "goto1":
return s["t1"] - s["t0"]
return 0.0
def _stat(values: List[float]) -> Dict[str, float]:
return {"median": round(statistics.median(values), 2), "p90": round(pct(values, 0.9), 2), "min": round(min(values), 2), "max": round(max(values), 2)}
def _in_tree_order(steps: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
children: Dict[Optional[str], List[Dict[str, Any]]] = {}
for s in steps:
children.setdefault(s["parent"], []).append(s)
out: List[Dict[str, Any]] = []
def walk(parent: Optional[str]) -> None:
for s in sorted(children.get(parent, []), key=lambda x: x["start_median_ms"]):
out.append(s)
walk(s["path"])
walk(None)
return out
def describe(label: str) -> str:
if label.startswith("send:"):
return "Juggler: " + label[5:]
return DESC.get(label, "")
def markdown(report: Dict[str, Any]) -> str:
meta = report["meta"]
lines = ["# Map of the launch of invisible (%s)" % meta["system"], ""]
lines.append("A measurement, not a verdict: no threshold. Times in milliseconds, median and p90 of %s launches on a warm cache (one warm-up launch that is not counted; every launch in a new interpreter)." % report["config"]["runs"])
lines.append("")
lines.append("- system: %s, Python %s, %s CPUs" % (meta["platform"], meta["python"], meta["cpus"]))
lines.append("- core %s, wrapper %s, engine %s (%s)" % (meta["core"], meta["wrapper"], meta["engine_tag"], meta["engine_upstream"]))
lines.append("- run: %s" % meta.get("run_url", "local"))
if meta.get("fetch_seconds") is not None:
lines.append("- download of the engine on a cold cache (`fetch`, outside the map): %.1f s" % meta["fetch_seconds"])
lines.append("- time 0 is the instant before `InvisiblePlaywright(...)`; the total is the import + the call up to the first page + the first goto")
if meta.get("unpatched"):
lines.append("- steps that could not be measured (targets not found): %s" % "; ".join(sorted(set(meta["unpatched"]))))
lines.append("")
for name, sc in report["scenarios"].items():
lines += _scenario_md("Scenario `%s` (warm cache)" % name, sc)
cold = report.get("cold")
if cold:
lines += _scenario_md("Cold cache, scenario `direct`: ONE launch (a new cache directory: GeoIP database, intermediates list, font files; the engine was there)", cold)
for name, why in report.get("failed", {}).items():
lines += ["## %s: not measured" % name, "", why, ""]
return "\n".join(lines) + "\n"
def _scenario_md(title: str, sc: Dict[str, Any]) -> List[str]:
out = ["## " + title, ""]
t = sc["total_ms"]
out.append("Total (import to first goto): median %.0f ms, p90 %.0f ms (min %.0f, max %.0f). Import of the core %.0f ms, of the wrapper %.0f ms; the call up to the first page %.0f ms (p90 %.0f)." % (
t["median"], t["p90"], t["min"], t["max"], sc["import_core_ms"]["median"], sc["import_wrapper_ms"]["median"], sc["call_ms"]["median"], sc["call_ms"]["p90"]))
out.append("")
out.append("| step | what | median ms | p90 ms | % of total | own ms | in parallel with | thread |")
out.append("|---|---|---:|---:|---:|---:|---|---|")
total = t["median"]
out.append("| import of the core and the wrapper | the packages are imported | %.0f | %.0f | %.1f | %.0f | | MainThread |" % (
sc["import_core_ms"]["median"] + sc["import_wrapper_ms"]["median"],
sc["import_core_ms"]["p90"] + sc["import_wrapper_ms"]["p90"],
100.0 * (sc["import_core_ms"]["median"] + sc["import_wrapper_ms"]["median"]) / total if total else 0,
sc["import_core_ms"]["median"] + sc["import_wrapper_ms"]["median"]))
hidden: Dict[Optional[str], List[float]] = {}
visible = []
for s in sc["steps"]:
if s["median_ms"] < 0.3 and s["label"] != "call":
hidden.setdefault(s["parent"], []).append(s["median_ms"])
else:
visible.append(s)
for s in visible:
parallel = ", ".join(p.split("/")[-1] for p in s["in_parallel_with"])
name = ("&nbsp;&nbsp;" * s["depth"]) + "`" + s["path"].split("/")[-1] + "`"
names = s["thread"].split(",")
thread = "" if names == ["MainThread"] else ", ".join(names[:2]) + (" +%d" % (len(names) - 2) if len(names) > 2 else "")
out.append("| %s | %s | %.1f | %.1f | %.1f | %.1f | %s | %s |" % (
name, describe(s["label"]), s["median_ms"], s["p90_ms"], s["pct_total"], s["self_median_ms"], parallel, thread))
extra = hidden.get(s["path"])
if extra:
out.append("| %s+ %d steps under 0.3 ms | | %.1f | | | | | |" % ("&nbsp;&nbsp;" * (s["depth"] + 1), len(extra), sum(extra)))
out.append("")
return out
def top_three(sc: Dict[str, Any]) -> List[Dict[str, Any]]:
"""The three steps with the most time of their own in the line of the caller (not the ones that wait for what is under them)."""
cands = [s for s in sc["steps"] if not s["background"] and s["label"] not in ("call",)]
return sorted(cands, key=lambda s: -s["self_median_ms"])[:3]
def meta_of(unpatched: List[str]) -> Dict[str, Any]:
from invisible_core.seal import active_seal
import invisible_core
import invisible_playwright
seal = active_seal()
return {
"system": "Windows" if os.name == "nt" else "Linux", "platform": platform.platform(), "python": platform.python_version(),
"cpus": os.cpu_count(), "core": getattr(invisible_core, "__version__", "?"), "wrapper": getattr(invisible_playwright, "__version__", "?"),
"engine_tag": seal.tag, "engine_upstream": seal.upstream_version,
"run_url": os.environ.get("INIT_MAP_RUN_URL") or "locale", "unpatched": unpatched,
"date_utc": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
"temp": tempfile.gettempdir(),
}
def count_browsers() -> int:
try:
if os.name == "nt":
text = subprocess.run(["tasklist", "/FI", "IMAGENAME eq firefox.exe"], capture_output=True, text=True, timeout=30).stdout
return text.lower().count("firefox.exe")
text = subprocess.run(["pgrep", "-c", "-f", "firefox"], capture_output=True, text=True, timeout=30).stdout
return int(text.strip() or 0)
except Exception: # noqa: BLE001
return -1
def driver(args: argparse.Namespace) -> int:
out = Path(args.out)
out.mkdir(parents=True, exist_ok=True)
work = Path(tempfile.mkdtemp(prefix="init-map-"))
scenarios = [s for s in args.scenarios.split(",") if s]
report: Dict[str, Any] = {"config": {"runs": args.runs, "seed": args.seed, "scenarios": scenarios}, "scenarios": {}, "failed": {}}
gateway = None
proxy = stun = ""
exit_ip = ""
if "proxy" in scenarios:
sys.path.insert(0, str(ROOT / "tests"))
import _socks_servers
# The gateway of the tests refuses the question "what is my exit" (the lab declares it instead of asking the internet). Here the question is the step that
# is measured, so the gateway forwards it for real: the TCP discovery goes through it to the services, as it does through a real proxy.
_socks_servers.asks_the_world = lambda server, host, port: False
try:
from invisible_core._geo import discover_egress_ip
exit_ip = discover_egress_ip(None)
except Exception as exc: # noqa: BLE001
print("the exit address of this machine could not be asked (%s): the fake STUN answers its default" % exc)
gateway = _socks_servers.coherent(exit_ip=exit_ip) if exit_ip else _socks_servers.coherent()
proxy, stun = gateway.server, gateway.measure_servers[0]
report["config"]["proxy_gateway"] = "coherent SOCKS5 on loopback (tests/_socks_servers.py), TCP forwarded for real, UDP to a fake STUN that answers the machine's exit"
unpatched: List[str] = []
try:
for name in scenarios:
kw = {"proxy": proxy, "stun": stun} if name == "proxy" else {}
print("== %s: warm-up" % name, flush=True)
warm = run_worker(name, args.seed, work, name + "-warm", **kw)
if warm.get("status") != "ok":
report["failed"][name] = "the warm-up launch failed: %s %s" % (warm.get("error") or warm.get("status"), (warm.get("log") or warm.get("traceback") or "")[-600:])
print(report["failed"][name], flush=True)
continue
unpatched += warm.get("unpatched", [])
good: List[Dict[str, Any]] = []
failures = []
for i in range(args.runs):
data = run_worker(name, args.seed, work, "%s-%02d" % (name, i), **kw)
if data.get("status") == "ok":
good.append(build_run(data))
print("== %s run %d/%d: call %.0f ms" % (name, i + 1, args.runs, good[-1]["call_ms"]), flush=True)
else:
failures.append(data.get("error") or data.get("status"))
print("== %s run %d/%d FAILED: %s" % (name, i + 1, args.runs, failures[-1]), flush=True)
if good:
report["scenarios"][name] = aggregate(good)
report["scenarios"][name]["raw"] = [{"call_ms": r["call_ms"], "spans": [{k: s[k] for k in ("label", "path", "t0", "t1", "thread")} for s in r["spans"]]} for r in good]
if failures:
report["scenarios"][name]["failed_runs"] = failures
else:
report["failed"][name] = "no launch succeeded: %s" % failures[:3]
if "direct" in scenarios and "direct" in report["scenarios"]:
from invisible_core.download import engine_root
cold_cache = work / "cold-cache"
print("== cold cache (one launch, a new cache directory, the engine kept)", flush=True)
data = run_worker("direct", args.seed, work, "cold", env_extra={
"INVISIBLE_PLAYWRIGHT_CACHE_DIR": str(cold_cache), "INVISIBLE_PLAYWRIGHT_ENGINE_DIR": str(engine_root())})
if data.get("status") == "ok":
report["cold"] = aggregate([build_run(data)])
else:
report["failed"]["cold"] = "the cold-cache launch failed: %s %s" % (data.get("error") or data.get("status"), (data.get("log") or "")[-600:])
print("== profile (one launch under cProfile)", flush=True)
data = run_worker("direct", args.seed, work, "profile", profile=True)
if data.get("status") == "ok" and (work / "profile-profile.txt").exists():
shutil.copy(work / "profile-profile.txt", out / ("init-map-profile-%s.txt" % ("windows" if os.name == "nt" else "linux")))
finally:
if gateway is not None:
with contextlib.suppress(Exception):
gateway.close()
report["meta"] = meta_of(unpatched)
report["meta"]["browsers_left"] = count_browsers()
for name, sc in list(report["scenarios"].items()) + ([("cold", report["cold"])] if report.get("cold") else []):
sc["top_three_by_own_time"] = [{"path": s["path"], "self_median_ms": s["self_median_ms"], "median_ms": s["median_ms"]} for s in top_three(sc)]
if os.environ.get("INIT_MAP_FETCH_SECONDS"):
report["meta"]["fetch_seconds"] = float(os.environ["INIT_MAP_FETCH_SECONDS"])
system = "windows" if os.name == "nt" else "linux"
(out / ("init-map-%s.json" % system)).write_text(json.dumps(report, indent=1), encoding="utf-8")
text = markdown(report)
(out / ("init-map-%s.md" % system)).write_text(text, encoding="utf-8")
print(text)
shutil.rmtree(work, ignore_errors=True)
return 0 if report["scenarios"] else 1
def main() -> int:
for stream in (sys.stdout, sys.stderr):
with contextlib.suppress(Exception):
stream.reconfigure(encoding="utf-8")
ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
ap.add_argument("--worker", action="store_true")
ap.add_argument("--dry", action="store_true", help="local check of the wrapping: the engine is not started (worker only)")
ap.add_argument("--scenario", default="direct")
ap.add_argument("--scenarios", default="direct,proxy,headless")
ap.add_argument("--runs", type=int, default=10)
ap.add_argument("--seed", type=int, default=4242)
ap.add_argument("--proxy", default="")
ap.add_argument("--stun", default="")
ap.add_argument("--profile", action="store_true")
ap.add_argument("--profile-out", default="")
ap.add_argument("--out", default="init-map")
args = ap.parse_args()
return worker(args) if args.worker else driver(args)
if __name__ == "__main__":
sys.exit(main())
-47
View File
@@ -1,47 +0,0 @@
import socket,json,subprocess,time,os,sys,base64
base=os.getcwd(); prof=base+'/prof'; os.makedirs(prof,exist_ok=True)
exe=base+'/ex3/core/firefox.exe'
open(prof+'/user.js','w').write('user_pref("marionette.port",2828);user_pref("browser.shell.checkDefaultBrowser",false);user_pref("datareporting.policy.dataSubmissionEnabled",false);user_pref("app.update.auto",false);user_pref("app.update.enabled",false);\n')
p=subprocess.Popen([exe,'-headless','-marionette','-remote-allow-system-access','-no-remote','-profile',prof,'about:blank'],env=dict(os.environ,MOZ_REMOTE_ALLOW_SYSTEM_ACCESS='1'),stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
try:
s=None
for i in range(60):
try:
s=socket.create_connection(('127.0.0.1',2828),timeout=5);break
except Exception: time.sleep(1)
f=s.makefile('rwb',buffering=0)
def rd():
n=b''
while True:
c=s.recv(1)
if c==b':':break
n+=c
n=int(n);d=b''
while len(d)<n: d+=s.recv(n-len(d))
return json.loads(d)
mid=[0]
def cmd(name,params=None):
mid[0]+=1
m=json.dumps([0,mid[0],name,params or {}]).encode()
s.sendall(str(len(m)).encode()+b':'+m)
while True:
r=rd()
if r[0]==1 and r[1]==mid[0]: return r[2] if r[2] else r[3]
s.settimeout(60)
rd()
cmd('WebDriver:NewSession',{'capabilities':{}})
h=cmd('WebDriver:GetWindowHandles'); cmd('WebDriver:SwitchToWindow',{'handle':h[0]})
cmd('WebDriver:Navigate',{'url':'data:text/html,<body><p id=p>text</p>'})
js="""
const fonts=['menu','caption','icon','message-box','small-caption','status-bar','system-ui'];
const colors=['Canvas','CanvasText','LinkText','VisitedText','ActiveText','ButtonFace','ButtonText','ButtonBorder','Field','FieldText','GrayText','Highlight','HighlightText','Mark','MarkText','SelectedItem','SelectedItemText','AccentColor','AccentColorText','ActiveBorder','ActiveCaption','AppWorkspace','Background','ButtonHighlight','ButtonShadow','CaptionText','InactiveBorder','InactiveCaption','InactiveCaptionText','InfoBackground','InfoText','Menu','MenuText','Scrollbar','ThreeDDarkShadow','ThreeDFace','ThreeDHighlight','ThreeDLightShadow','ThreeDShadow','Window','WindowFrame','WindowText'];
const o={fonts:{},light:{},dark:{},selection:{}};
for(const f of fonts){const d=document.createElement('div');d.style.font=f==='system-ui'?'16px system-ui':f;document.body.appendChild(d);const c=getComputedStyle(d);o.fonts[f]={family:c.fontFamily,size:c.fontSize,weight:c.fontWeight,style:c.fontStyle,stretch:c.fontStretch};d.remove();}
for(const sch of ['light','dark']){for(const k of colors){const d=document.createElement('div');d.style.colorScheme=sch;d.style.color=k;d.style.backgroundColor=k;document.body.appendChild(d);o[sch][k]=getComputedStyle(d).color;d.remove();}
const d=document.createElement('div');d.style.colorScheme=sch;d.textContent='x';document.body.appendChild(d);const c=getComputedStyle(d,'::selection');o.selection[sch]={color:c.color,bg:c.backgroundColor};d.remove();}
return o;"""
r=cmd('WebDriver:ExecuteScript',{'script':js,'args':[]})
json.dump(r['value'] if 'value' in r else r,open(base+'/retail_theme.json','w'),indent=1)
print(json.dumps(r)[:1500])
finally:
subprocess.run(['taskkill','/F','/T','/PID',str(p.pid)],capture_output=True)
+393
View File
@@ -0,0 +1,393 @@
#!/usr/bin/env python3
"""The seeds that cover the personas the core can declare.
The core turns a seed into an identity (invisible_core._fpforge.profile.generate_profile) and the identity into
the prefs the engine is launched with (invisible_core.prefs.translate_profile_to_prefs). A page can only see what
those prefs make it see, so the values a seed can make a page read are the values of the prefs that VARY across
seeds. This computes them from the prefs themselves, never from a list of the tables:
* every seed 0..MAX_SEED-1 goes through generate_profile and translate_profile_to_prefs (en-US, one zone: neither
is a seed dimension);
* every pref whose value differs between two seeds must belong to a DIMENSION below (a group of prefs read
together: the renderer, the screen panel, the audio chain...) or be named in EXCLUDED with its reason. A pref
that varies and is in neither is an error, so a new pref of a later core cannot go uncovered unnoticed. A pref that
is a function of a dimension (the bar of a maximized window is of the panel) is in DERIVED instead: it is checked to
take one value per value of its dimension, and it is no part of the stored features;
* a dimension's value for a seed is the joint value of its prefs; the reachable values of a dimension are the
ones some seed in range produces.
From that, two sets of seeds (a greedy set cover, ties to the smallest seed, then a reverse delete of every seed
the rest does without):
final covers every reachable value of every dimension: the whole persona space the core declares;
candidate the smallest set that covers every webgl renderer and every DPR (exact: every set of that size is
searched, the smallest seeds win): what the candidate run of the A/B oracle visits.
The result is ci/persona-seeds.json, with the sha256 of the canonical JSON of its dimensions and features.
`check` recomputes everything and exits 1 with what changed: a change of the core's tables (or of the code that
reads them) is red until `write` has been run again.
python persona_cover.py write [--path ci/persona-seeds.json] [--max-seed 100000]
python persona_cover.py check [--path ...]
python persona_cover.py show [--path ...]
"""
from __future__ import annotations
import argparse
import hashlib
import itertools
import json
import os
import sys
from concurrent.futures import ProcessPoolExecutor
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
DEFAULT_PATH = ROOT / "ci" / "persona-seeds.json"
FORMAT = "persona-seeds/1"
MAX_SEED = 100_000
#: Neither is a seed dimension (locale and zone come from the exit), so one value of each is used for every seed.
LOCALE = "en-US"
ZONE = "America/New_York"
P = "zoom.stealth."
#: dimension -> the prefs that are read together. A pref may be in more than one dimension (the DPR is in the panel and
#: in the scale). "webgl_renderer" is every webgl.* pref: they must be a function of the renderer (checked).
DIMENSIONS = {
"webgl_renderer": (P + "webgl.renderer",),
"gfx_feature_status": (P + "gfx.feature_status",),
"screen_panel": (P + "screen.width", P + "screen.height", P + "screen.avail_device_width",
P + "screen.avail_device_height", "layout.css.devPixelsPerPx"),
"dpr": ("layout.css.devPixelsPerPx", P + "screen.frame_border", P + "screen.popup_ui", P + "screen.popup_client_top"),
"cores": (P + "hw_concurrency",),
"audio": (P + "audio.sample_rate", P + "audio.output_latency_ms", P + "audio.max_channel_count"),
"codecs": ("media.av1.enabled", "media.encoder.webm.enabled", "media.mp4.enabled", "media.webm.enabled",
P + "media.decode_support"),
"dark_theme": ("ui.systemUsesDarkTheme", "layout.css.prefers-color-scheme.content-override"),
"render_noise": (P + "fpp.hw_seed",),
}
#: Dimensions that are not prefs: the label of the device the persona declares (the prefs carry only its blocklist
#: outcome, gfx_feature_status, which has fewer values than there are devices).
PROFILE_DIMENSIONS = ("gfx_device",)
ALL_DIMENSIONS = tuple(DIMENSIONS) + PROFILE_DIMENSIONS
#: Prefs that vary and are not covered, with the reason: a dimension with hundreds of values cannot be visited.
EXCLUDED = {
P + "media.enumeration_ms": "the time of the first enumerateDevices(): a draw from its own stream, hundreds of values, "
"no class of seeds to cover",
}
#: Prefs that are a function of a dimension: {pref: the dimension}. They are not part of the dimension's value (so the
#: stored features do not depend on which core emits them) and compute() CHECKS that, across the seeds, each takes exactly
#: one value per value of its dimension, like the webgl prefs per renderer. A derived pref the core does not emit at all is
#: fine: it is the pref of a core that comes later than the one in use (or earlier than the one that added it), and the pair
#: of cores must give the same file. maximized_ui is of the panel because the core declares the bar from the work area's
#: height as well as from the scale (declared_maximized_ui: compact when the work area is short in CSS px).
#: The screen's size in device pixels is of the panel too: the core declares it as the whole panel (device_width and
#: device_height of ScreenProfile, invisible_core/_fpforge/profile.py:121 and :126; the prefs, invisible_core/prefs.py:1293-1294)
#: and the work area as the screen minus the taskbar (profile.py:131-145). So, from the panel's own prefs, the width is
#: avail_device_width and the height is avail_device_height plus the taskbar in device pixels. The test compares the prefs with
#: the core's own ScreenProfile for each seed: no copy of the taskbar or of the formula lives here.
DERIVED = {
P + "screen.maximized_ui": "screen_panel",
P + "screen.device_width": "screen_panel",
P + "screen.device_height": "screen_panel",
}
#: What the candidate run visits: the smallest set that reaches every one of these dimensions' values.
CANDIDATE_DIMENSIONS = ("webgl_renderer", "dpr")
WEBGL = P + "webgl."
#: A value longer than this is shown as its sha256 prefix.
LONG = 40
def _short(value) -> str:
text = json.dumps(value, sort_keys=True)
if isinstance(value, str) and len(value) > LONG:
return "sha:" + hashlib.sha256(value.encode("utf-8")).hexdigest()[:10]
return text
def _dimension_value(prefs: dict, keys: tuple) -> str:
return "|".join("%s=%s" % (k.removeprefix(P), _short(prefs.get(k, "<absent>"))) for k in keys)
# -
# One seed, and a range of seeds (a worker computes a range).
def seed_features(seed: int) -> tuple:
"""(features of the seed, {pref: its value as JSON}). The features are {dimension: value}."""
from invisible_core._fpforge.profile import generate_profile
from invisible_core.prefs import translate_profile_to_prefs
profile = generate_profile(seed)
prefs = translate_profile_to_prefs(profile, locale=LOCALE, timezone=ZONE)
features = {dim: _dimension_value(prefs, keys) for dim, keys in DIMENSIONS.items()}
features["webgl_renderer"] = prefs[P + "webgl.renderer"] # readable: the whole string
features["gfx_device"] = profile.gpu.device or "<none>"
webgl = {k: json.dumps(v, sort_keys=True) for k, v in prefs.items() if k.startswith(WEBGL)}
features["_webgl"] = hashlib.sha256(json.dumps(webgl, sort_keys=True).encode()).hexdigest()[:12]
features["_derived"] = {k: json.dumps(prefs.get(k, "<absent>"), sort_keys=True) for k in DERIVED}
return features, {k: json.dumps(v, sort_keys=True) for k, v in prefs.items()}
def _range(bounds: tuple) -> tuple:
"""(features per seed, {pref: up to 3 distinct values}) for seeds lo..hi-1."""
lo, hi = bounds
features, seen = {}, {}
for seed in range(lo, hi):
f, prefs = seed_features(seed)
features[seed] = f
for k, v in prefs.items():
s = seen.setdefault(k, set())
if len(s) < 3:
s.add(v)
for k in set(seen) - set(prefs): # a pref this seed does not have varies too
seen[k].add("<absent>")
return features, seen
def check_derived(features: dict) -> None:
"""Raises when a DERIVED pref takes two values within one value of its dimension. features: {seed: {dimension: value,
"_derived": {pref: value}}}. A pref no seed has is skipped (a core that does not emit it)."""
for pref, dim in DERIVED.items():
seen = {}
for seed in sorted(features):
value = features[seed]["_derived"][pref]
if seen.setdefault(features[seed][dim], (value, seed))[0] != value:
first = seen[features[seed][dim]]
raise SystemExit("the derived pref %s is not a function of the dimension %s (seed %d: %s, seed %d: %s, "
"both with %s): it belongs to a wider dimension" % (
pref, dim, first[1], first[0], seed, value, features[seed][dim]))
def compute(max_seed: int = MAX_SEED, workers: int | None = None) -> dict:
"""The features of every seed 0..max_seed-1: {seed: {dimension: value}} (the dimensions of ALL_DIMENSIONS).
Raises when a pref varies across the seeds and is in no dimension and not in EXCLUDED or DERIVED, when a DERIVED
pref is not a function of its dimension, or when the webgl prefs are not a function of the renderer."""
workers = workers or max(1, min(os.cpu_count() or 1, 8))
step = max(1, -(-max_seed // (workers * 4)))
bounds = [(lo, min(lo + step, max_seed)) for lo in range(0, max_seed, step)]
if workers == 1:
parts = [_range(b) for b in bounds]
else:
with ProcessPoolExecutor(max_workers=workers) as pool:
parts = list(pool.map(_range, bounds))
features, seen = {}, {}
for f, s in parts:
features.update(f)
for k, vs in s.items():
seen.setdefault(k, set()).update(vs)
covered = {k for keys in DIMENSIONS.values() for k in keys}
varying = sorted(k for k, vs in seen.items() if len(vs) > 1)
loose = [k for k in varying if k not in covered and k not in EXCLUDED and k not in DERIVED and not k.startswith(WEBGL)]
if loose:
raise SystemExit("prefs that vary across seeds and belong to no dimension and are not excluded: %s\n"
"add each to a DIMENSION, to DERIVED (a function of one) or to EXCLUDED (with the reason) in "
"scripts/persona_cover.py" % loose)
check_derived(features)
byrenderer = {}
for seed in sorted(features):
f = features[seed]
if byrenderer.setdefault(f["webgl_renderer"], f["_webgl"]) != f["_webgl"]:
raise SystemExit("the webgl prefs are not a function of the renderer (seed %d, %s): split the dimension"
% (seed, f["webgl_renderer"]))
del f["_webgl"]
for f in features.values():
del f["_derived"]
stale = [k for k in EXCLUDED if k not in seen or len(seen[k]) < 2]
if stale:
raise SystemExit("excluded prefs that no longer vary: %s: remove them from EXCLUDED" % stale)
return features
# -
# The covers.
def reachable(features: dict, dims=ALL_DIMENSIONS) -> dict:
"""{dimension: sorted reachable values}."""
out = {d: set() for d in dims}
for f in features.values():
for d in dims:
out[d].add(f[d])
return {d: sorted(v) for d, v in out.items()}
def counts(features: dict) -> dict:
out = {d: {} for d in ALL_DIMENSIONS}
for f in features.values():
for d in ALL_DIMENSIONS:
out[d][f[d]] = out[d].get(f[d], 0) + 1
return {d: dict(sorted(c.items())) for d, c in out.items()}
def _elements(f: dict, dims) -> frozenset:
return frozenset((d, f[d]) for d in dims)
def greedy_cover(features: dict, dims=ALL_DIMENSIONS) -> list:
"""Greedy set cover over the (dimension, value) pairs, ties to the smallest seed. Seeds that produce the same
pairs are one candidate (their smallest)."""
first = {}
for seed in sorted(features):
first.setdefault(_elements(features[seed], dims), seed)
todo = set().union(*first)
chosen = []
while todo:
best = max(sorted(first.items(), key=lambda kv: kv[1]), key=lambda kv: len(kv[0] & todo))
chosen.append(best[1])
todo -= best[0]
return chosen
def reverse_delete(features: dict, seeds: list, dims=ALL_DIMENSIONS) -> list:
"""Drops, last chosen first, every seed whose pairs the others cover."""
keep = list(seeds)
for seed in reversed(seeds):
rest = [s for s in keep if s != seed]
if rest and _elements(features[seed], dims) <= set().union(*(_elements(features[s], dims) for s in rest)):
keep = rest
return sorted(keep)
def final_cover(features: dict) -> list:
return reverse_delete(features, greedy_cover(features))
def candidate_cover(features: dict, dims=CANDIDATE_DIMENSIONS) -> list:
"""The smallest set covering every value of dims: the exact minimum (every combination of the seeds that are the
smallest of their kind is tried, size by size), the lexicographically smallest seeds of that size."""
kinds = {}
for seed in sorted(features):
kinds.setdefault(_elements(features[seed], dims), seed)
todo = set().union(*kinds)
seeds = sorted(kinds.values())
for size in range(1, len(seeds) + 1):
for combo in itertools.combinations(seeds, size):
if set().union(*(_elements(features[s], dims) for s in combo)) >= todo:
return list(combo)
raise AssertionError("unreachable: all the seeds cover everything")
def covers(features: dict, seeds, dims=ALL_DIMENSIONS) -> list:
"""The (dimension, value) pairs of the reachable space that `seeds` do not reach."""
want = set().union(*(_elements(f, dims) for f in features.values()))
got = set().union(*(_elements(features[s], dims) for s in seeds)) if seeds else set()
return sorted(want - got)
# -
# The file.
def canonical(document) -> str:
return json.dumps(document, sort_keys=True, separators=(",", ":"), ensure_ascii=True)
def build(features: dict, max_seed: int) -> dict:
import invisible_core
final, candidate = final_cover(features), candidate_cover(features)
stored = sorted(set(final) | set(candidate))
dimensions = reachable(features)
kept = {str(s): features[s] for s in stored}
dpr = {str(s): float(json.loads(features[s]["dpr"].split("|")[0].split("=", 1)[1])) for s in stored}
sha = hashlib.sha256(canonical({"dimensions": dimensions, "features": kept}).encode("utf-8")).hexdigest()
return {
"format": FORMAT, "core_version": invisible_core.__version__, "max_seed": max_seed,
"candidate": candidate, "final": final, "dpr": dpr, "features": kept, "dimensions": dimensions,
"counts": counts(features), "excluded": dict(sorted(EXCLUDED.items())), "sha256": sha,
}
def render(document: dict) -> bytes:
return (json.dumps(document, sort_keys=True, indent=1, ensure_ascii=True) + "\n").encode("utf-8")
def write(path: Path = DEFAULT_PATH, max_seed: int = MAX_SEED, workers: int | None = None) -> dict:
document = build(compute(max_seed, workers), max_seed)
Path(path).write_bytes(render(document))
return document
def differences(stored: dict, fresh: dict) -> list:
"""What differs between the file and a recompute, as lines (empty when they agree). core_version alone is no
difference: the same values from another version of the core are the same personas."""
out = []
for key in sorted(set(stored) | set(fresh)):
if key == "core_version" or stored.get(key) == fresh.get(key):
continue
a, b = stored.get(key), fresh.get(key)
if key == "dimensions" and isinstance(a, dict) and isinstance(b, dict):
for dim in sorted(set(a) | set(b)):
gone = sorted(set(a.get(dim, [])) - set(b.get(dim, [])))
new = sorted(set(b.get(dim, [])) - set(a.get(dim, [])))
if gone or new:
out.append("dimension %s: %d values no seed reaches any more %s; %d new %s"
% (dim, len(gone), gone[:3], len(new), new[:3]))
elif key == "features" and isinstance(a, dict) and isinstance(b, dict):
for seed in sorted(set(a) | set(b), key=int):
if a.get(seed) != b.get(seed):
moved = sorted(d for d in set(a.get(seed) or {}) | set(b.get(seed) or {})
if (a.get(seed) or {}).get(d) != (b.get(seed) or {}).get(d))
out.append("seed %s: %s changed" % (seed, ", ".join(moved) or "is not in one of the two"))
else:
out.append("%s: %s -> %s" % (key, json.dumps(a)[:160], json.dumps(b)[:160]))
return out
def check(path: Path = DEFAULT_PATH, workers: int | None = None) -> list:
stored = json.loads(Path(path).read_text(encoding="utf-8"))
fresh = build(compute(stored["max_seed"], workers), stored["max_seed"])
lines = differences(stored, fresh)
if not lines and Path(path).read_bytes() != render(fresh):
lines.append("the file is not the canonical rendering of its own content: run `write`")
return lines
def load(path: Path = DEFAULT_PATH) -> dict:
return json.loads(Path(path).read_text(encoding="utf-8"))
def load_seeds(kind: str = "candidate", path: Path = DEFAULT_PATH) -> list:
"""The seeds of `kind` ("candidate" or "final"), ascending."""
document = load(path)
if kind not in ("candidate", "final"):
raise ValueError("kind must be 'candidate' or 'final', not %r" % (kind,))
return sorted(document[kind])
def load_visits(kind: str = "candidate", path: Path = DEFAULT_PATH) -> list:
"""[(seed, the seed's own DPR)] of `kind`, ascending."""
document = load(path)
return [(s, document["dpr"][str(s)]) for s in load_seeds(kind, path)]
def show(document: dict) -> str:
lines = ["core %s, seeds 0..%d, sha256 %s" % (document["core_version"], document["max_seed"] - 1, document["sha256"][:16])]
for kind in ("candidate", "final"):
lines.append("%s (%d): %s" % (kind, len(document[kind]), document[kind]))
for dim, values in document["dimensions"].items():
lines.append("%-20s %2d values" % (dim, len(values)))
return "\n".join(lines)
def main(argv=None) -> int:
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
ap.add_argument("cmd", choices=("write", "check", "show"))
ap.add_argument("--path", type=Path, default=DEFAULT_PATH)
ap.add_argument("--max-seed", type=int, default=MAX_SEED)
ap.add_argument("--workers", type=int)
args = ap.parse_args(argv)
if args.cmd == "show":
print(show(load(args.path)))
return 0
if args.cmd == "write":
print(show(write(args.path, args.max_seed, args.workers)))
return 0
lines = check(args.path, args.workers)
for line in lines:
print("CHANGED " + line)
print("PERSONA SEEDS %s" % ("OK" if not lines else "STALE: run `python scripts/persona_cover.py write` and commit ci/persona-seeds.json"))
return 1 if lines else 0
if __name__ == "__main__":
sys.exit(main())
+25 -4
View File
@@ -10,6 +10,12 @@ red when our engine does not idle where stock does. Profile P4: a user journey o
(tests/fakeweb/journey_site.py); stock Firefox runs first, then our engine, and the verdict compares every step field by
field (ok, url, title, marker, cookies, history length, open pages, idle, the step's own values). --repetitions is the
number of walks (P4: default 1). The stock client drives both.
The bound of a P2 wait: a P2 page is finite (MAX_DELAY_MS, 3000 ms, is its longest response) and networkidle needs 500 ms of quiet,
so the 10 s default is a cap with margin, never to be read as a cause. A stock cell that does not idle is a broken control or, by
pages.json `stock_firefox_may_lose` (a request the page itself aborts, which stock may never report the end of), stock unsettled:
not red, and ours is then judged against the outcome the page declares. The report keeps `stock_unsettled`, `platform` and the
`stock_unsettled_rate` per pattern, so the rate per platform can be followed across runs from the artifacts.
"""
from __future__ import annotations
@@ -101,16 +107,31 @@ def main(argv=None):
if args.no_stock: # stock is what pages.json says it is
stock = [dict(c, idle=declared.get(c["pattern"], "idle") == "idle") for c in candidate]
fails, broken = profile_p2.verdict(candidate, stock, declared)
report = {"profile": args.profile, "patterns": patterns, "repetitions": args.repetitions,
"candidate": candidate, "stock": stock, "fails": fails, "broken_control": broken}
may_lose = pages.get("stock_firefox_may_lose", {})
fails, broken, unsettled = profile_p2.verdict(candidate, stock, declared, may_lose)
return finish_p2(args, patterns, candidate, stock, fails, broken, unsettled, may_lose)
def finish_p2(args, patterns, candidate, stock, fails, broken, unsettled, may_lose):
"""The report of a P2 run (written to --out), the lines printed, and the exit code: 1 on a fail or a broken control, never on unsettled alone."""
by_key = {(c["round"], c["pattern"], c["canary"], c["after"]): c for c in stock}
unsettled_cells = [{"round": key[0], "pattern": key[1], "in_flight": [r.get("url") for r in by_key[key].get("in_flight") or []]}
for key, _err in unsettled]
rate = {pattern: {"unsettled": sum(1 for u in unsettled_cells if u["pattern"] == pattern),
"rounds": sum(1 for c in stock if c["pattern"] == pattern and not c["canary"])}
for pattern in may_lose}
report = {"profile": args.profile, "patterns": patterns, "repetitions": args.repetitions, "platform": sys.platform,
"candidate": candidate, "stock": stock, "fails": fails, "broken_control": broken,
"stock_unsettled": unsettled_cells, "stock_unsettled_rate": rate}
if args.out:
pathlib.Path(args.out).write_text(json.dumps(report, indent=1), encoding="utf-8")
for key, err in fails:
print("FAIL round %d %s%s: %s" % (key[0], key[1], " (canary after %s)" % key[3] if key[2] else "", err))
for key, err in broken:
print("BROKEN CONTROL stock did not idle on %s round %d: %s" % (key[1], key[0], err))
print("cells: %d, fails: %d, broken controls: %d" % (len(candidate), len(fails), len(broken)))
for cell in unsettled_cells:
print("STOCK UNSETTLED %s round %d: %s (pages.json stock_firefox_may_lose)" % (cell["pattern"], cell["round"], ", ".join(map(str, cell["in_flight"]))))
print("cells: %d, fails: %d, broken controls: %d, stock unsettled: %d" % (len(candidate), len(fails), len(broken), len(unsettled_cells)))
return 1 if (fails or broken) else 0
-218
View File
@@ -1,218 +0,0 @@
"""The expected values of tests/test_css_calc_is_windows_e2e.py.
Run it with `python -I`. Two steps, because a number is only worth testing if
the two C libraries give a different page-visible text for it:
python -I scripts/ucrt_css_calc.py dump OUT # on Windows: ucrtbase.dll's f32 functions
python -I scripts/ucrt_css_calc.py dump OUT # on Linux: the host's libm
python -I scripts/ucrt_css_calc.py pick WIN LINUX tests/data/ucrt_css_calc.txt
`dump` computes, for a fixed grid of inputs, what the style engine (Servo's
calc.rs) makes of ``calc(1px * sin(x))`` and the others, and the text it then
serializes. The style engine does every step in f32 (CSSFloat): the library
function is the f32 one (sinf, cosf, tanf, asinf, acosf, atanf, atan2f, expf,
logf, powf), an angle is converted to degrees with one f32 multiplication, and
a number is written by cssparser's dtoa_short: the shortest decimal that
reads back as that f32, rounded half up to 6 significant digits. So two
libraries whose results differ in the last f32 bit only show on the page when
that bit moves the 6th digit - which `pick` looks for.
`pick` keeps every input whose text differs between the two dumps, and a few
that do not (the control: the same text from both libraries), in the format
the test reads:
<fn> <args...> <text on Windows>
The reference is ucrtbase's FMA3 code path, the one every Windows 11 CPU runs
(the same one idwr_math reproduces); the SSE2 fallback of older CPUs can differ in
the last bit and is not what a page on Windows 11 reads.
Inputs are exact in f32 (multiples of a power of two), so the page and this
script read the same number whatever the CSS parser does with decimals.
"""
from __future__ import annotations
import ctypes
import math
import struct
import sys
from decimal import ROUND_HALF_UP, Decimal
from pathlib import Path
#: Rust's f32::to_degrees multiplier, as an f32.
RAD_TO_DEG = struct.unpack("<f", struct.pack("<f", 57.2957795130823208767981548141051703))[0]
#: How many differing inputs of each function `pick` keeps, and how many of the
#: ones that agree.
KEEP_DIFFERENT = 6
KEEP_SAME = 3
def f32(x: float) -> float:
return struct.unpack("<f", struct.pack("<f", x))[0]
def load_libm():
if sys.platform == "win32":
lib = ctypes.CDLL("ucrtbase.dll")
else:
lib = ctypes.CDLL("libm.so.6")
funcs = {}
for name, nargs in (("sinf", 1), ("cosf", 1), ("tanf", 1), ("asinf", 1), ("acosf", 1),
("atanf", 1), ("atan2f", 2), ("expf", 1), ("logf", 1), ("powf", 2)):
fn = getattr(lib, name)
fn.restype = ctypes.c_float
fn.argtypes = [ctypes.c_float] * nargs
funcs[name] = fn
return funcs
def shortest_f32(x: float) -> str:
"""The shortest decimal text that reads back as this f32."""
for digits in range(1, 10):
text = "%.*e" % (digits - 1, x)
if f32(float(text)) == x:
return text
return "%.8e" % x
def serialize(x: float) -> str:
"""cssparser's number text for an f32: 6 significant digits, half up,
no trailing zeros, no exponent in the range the grid stays in."""
if x == 0:
return "0"
d = Decimal(shortest_f32(x))
exp = d.adjusted()
q = d.quantize(Decimal(1).scaleb(exp - 5), rounding=ROUND_HALF_UP)
text = format(q.normalize(), "f")
return "0" if text in ("-0", "") else text
def decimal(k: int, shift: int) -> str:
"""k / 2**shift as an exact decimal text."""
d = Decimal(k) / Decimal(2 ** shift)
return format(d.normalize(), "f")
def grid():
"""(fn, args as texts) for every case of the dump."""
out = []
for fn, lim, shift in (("sin", 16, 10), ("cos", 16, 10), ("tan", 16, 10)):
for k in range(-lim << shift, (lim << shift) + 1):
out.append((fn, [decimal(k, shift)]))
# Finer, over the stretch where the functions bend the most.
for k in range(-(4 << 13), (4 << 13) + 1):
out.append(("tan", [decimal(k, 13)]))
for k in range(-(8 << 12), (8 << 12) + 1):
out.append(("atan", [decimal(k, 12)]))
for k in range(-(4 << 12), (4 << 12) + 1):
out.append(("exp", [decimal(k, 12)]))
for k in range(1, 32 * 1024 + 1):
out.append(("log", [decimal(k, 10)]))
for a in range(-128, 129):
for b in range(-128, 129):
if a or b:
out.append(("atan2", [decimal(a, 6), decimal(b, 6)]))
for k in range(-4096, 4097):
out.append(("asin", [decimal(k, 12)]))
out.append(("acos", [decimal(k, 12)]))
for k in range(-8 * 512, 8 * 512 + 1):
out.append(("atan", [decimal(k, 9)]))
for a in range(-64, 65):
for b in range(-64, 65):
if a or b:
out.append(("atan2", [decimal(a, 4), decimal(b, 4)]))
for k in range(-10 * 256, 10 * 256 + 1):
out.append(("exp", [decimal(k, 8)]))
for k in range(1, 64 * 64 + 1):
out.append(("log", [decimal(k, 6)]))
for a in range(2, 513):
for b in (2, 3, 5, 7, 10):
out.append(("log", [decimal(a, 3), str(b)]))
for a in range(-32, 33):
for b in range(-32, 33):
out.append(("hypot", [decimal(a * 3, 4), decimal(b * 5, 4)]))
for a in range(4, 257):
for b in range(-64, 65):
out.append(("pow", [decimal(a, 4), decimal(b, 4)]))
return out
def evaluate(lib, fn, args):
"""(text, unit) the page shows, from f32 steps."""
v = [f32(float(a)) for a in args]
if fn in ("sin", "cos", "tan", "exp"):
return serialize(f32(lib[fn + "f"](v[0]))), "px"
if fn == "log":
if len(v) == 1:
return serialize(f32(lib["logf"](v[0]))), "px"
return serialize(f32(f32(lib["logf"](v[0])) / f32(lib["logf"](v[1])))), "px"
if fn == "hypot":
# powi(2) is a product, the sum is f32, sqrt is exact in IEEE: no library
# function here, so no difference between the two - the control.
return serialize(f32(math.sqrt(f32(f32(v[0] * v[0]) + f32(v[1] * v[1]))))), "px"
if fn == "pow":
return serialize(f32(lib["powf"](v[0], v[1]))), "px"
if fn in ("asin", "acos", "atan"):
return serialize(f32(f32(lib[fn + "f"](v[0])) * RAD_TO_DEG)), "deg"
if fn == "atan2":
return serialize(f32(f32(lib["atan2f"](v[0], v[1])) * RAD_TO_DEG)), "deg"
raise ValueError(fn)
def dump(out: Path) -> None:
lib = load_libm()
lines = []
for fn, args in grid():
text, unit = evaluate(lib, fn, args)
if text in ("nan", "inf", "-inf") or "e" in text.lower():
continue
lines.append("%s %s %s%s" % (fn, " ".join(args), text, unit))
out.write_text("\n".join(lines) + "\n")
print("wrote %s: %d cases (%s)" % (out, len(lines), sys.platform))
def read(path: Path) -> dict:
cases = {}
for line in path.read_text().splitlines():
parts = line.split()
cases[tuple(parts[:-1])] = parts[-1]
return cases
def pick(win: Path, linux: Path, out: Path) -> None:
a, b = read(win), read(linux)
chosen = ["# Expected text of getComputedStyle for calc(1px * f(args)) (word-spacing)",
"# and of rotate: f(args) for the angle functions, from ucrtbase.dll's f32",
"# functions. Generated by scripts/ucrt_css_calc.py (python -I) - do not edit.",
"# <fn> <args...> <text on Windows>"]
stats = []
for fn in ("sin", "cos", "tan", "asin", "acos", "atan", "atan2", "exp", "log", "pow", "hypot"):
keys = sorted(k for k in a if k[0] == fn and k in b)
different = [k for k in keys if a[k] != b[k]]
same = [k for k in keys if a[k] == b[k]]
# Spread over the list, not the first ones.
step_d = max(1, len(different) // KEEP_DIFFERENT)
quarter = max(1, len(same) // 4)
take = different[::step_d][:KEEP_DIFFERENT] + same[quarter::quarter][:KEEP_SAME]
stats.append("%s: %d of %d differ" % (fn, len(different), len(keys)))
for k in take:
chosen.append("%s %s" % (" ".join(k), a[k]))
out.write_text("\n".join(chosen) + "\n")
print("\n".join(stats))
print("wrote %s" % out)
def main(argv) -> int:
if len(argv) == 3 and argv[1] == "dump":
dump(Path(argv[2]))
elif len(argv) == 5 and argv[1] == "pick":
pick(Path(argv[2]), Path(argv[3]), Path(argv[4]))
else:
print(__doc__)
return 2
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
@@ -0,0 +1,415 @@
"""The argument of `page.evaluate(fn, arg)` and its kin, on its way into the page.
The client sends `{"value": <tagged>, "handles": [{guid}, ...]}`. THE ONE PLACE it is read for the caller's code: `_run_callers_code`, the element-scoped
calls, `wait_for_function` and the result of an exposed function all take it through `Argument`.
⛔ UNTIL THIS MODULE, THE SERVER KEPT A NUMBER, A STRING, A BOOLEAN, AN ARRAY AND AN OBJECT AND MADE EVERYTHING ELSE `null`: a handle (`h`), a date
(`d`), a URL (`u`), a regular expression (`r`), an error (`e`), a typed array (`ta`), a BigInt (`bi`), a reference to an object already seen (`ref`:
a repeat and a cycle), `undefined`, and `-0` (the Python client sends `-0` for EVERY float `0.0`). A bare Python `nan` went into the JSON. The call
went on with the wrong argument and answered.
What stock Playwright 1.61 does (driver bundle `coreBundle.js`, by function name):
* NODE SIDE. `parseArgument` -> `parseSerializedValue` builds the real values; `evaluateExpression` serialises them again with `serializeAsCallArgument`
(a number, a string and a boolean lose their tag, a Date is `{d: toJSON()}`, which is milliseconds, an Error's stack is normalised) and takes each
handle through `adoptIfNeeded`. A primitive handle falls through as its value (`fallThrough: handle._value`).
* The handle errors are thrown there: a handle that is not an element and is of another context or world is `JSHandles can be evaluated only in the
context they were created!`; an element of another frame or world is adopted (`Page.adoptNode`), and if the adoption answers nothing it is `Unable to
adopt element handle from a different document`; a disposed or unknown guid is `arg.handles[0]: no object with guid <guid>` (the path starts with the
parameter's name).
* PAGE SIDE. `UtilityScript.evaluate` runs `parseEvaluationResultValue` on every argument, BEFORE it evaluates the caller's text.
HERE, the same two steps. A tree of plain JSON (number, string, boolean, null, array, object; no reference, no handle, nothing special) goes as the
protocol value it always went as. A top-level NaN, Infinity, -Infinity or -0 is the engine's `unserializableValue`; a top-level `undefined` is an
argument with no `value`; a top-level object handle is its `objectId`. EVERYTHING ELSE is decoded in the page by one extra `Runtime.callFunction` in the
same caller context, whose declaration is stock's own `parseEvaluationResultValue` (below, verbatim: a test compares it with the text the core ships
and the bundle's), called with the spec and the handles' objects; what it made is the ONE argument of the unchanged `(f, ...a) => f(...a)` and is
released after the call. The decoder runs before the caller's function and leaves no global.
LIMITS, SAID. A BigInt as the WHOLE argument cannot be decoded here: the decoder would have to return a BigInt, and the protocol's JSON has no BigInt
(inside an array or an object it is fine). A utility-world value that is not a node (the properties `get_property` and `get_property_list` hand back)
cannot cross to the caller's world, which stock never needed because its handles are all of one world.
"""
from __future__ import annotations
import re
from typing import Any, Callable, Dict, List, Optional
from .dispatcher import ProtocolException
#: The text stock throws, node side.
NOT_IN_THE_CONTEXT = "JSHandles can be evaluated only in the context they were created!"
NOT_ADOPTED = "Unable to adopt element handle from a different document"
#: Playwright's `parseEvaluationResultValue`, `base64ToTypedArray` and the typed-array table, VERBATIM from the utility script the core ships
#: (`invisible_core/juggler/injected.js`, the same text as the driver bundle's `packages/isomorphic/utilityScriptSerializers.ts`).
_STOCK = r'''const typedArrayConstructors = {
i8: Int8Array,
ui8: Uint8Array,
ui8c: Uint8ClampedArray,
i16: Int16Array,
ui16: Uint16Array,
i32: Int32Array,
ui32: Uint32Array,
// TODO: add Float16Array once it's in baseline
f32: Float32Array,
f64: Float64Array,
bi64: BigInt64Array,
bui64: BigUint64Array
};
function base64ToTypedArray(base64, TypedArrayConstructor) {
const binary = atob(base64);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++)
bytes[i] = binary.charCodeAt(i);
return new TypedArrayConstructor(bytes.buffer);
}
function parseEvaluationResultValue(value, handles = [], refs = /* @__PURE__ */ new Map()) {
if (Object.is(value, void 0))
return void 0;
if (typeof value === "object" && value) {
if ("ref" in value)
return refs.get(value.ref);
if ("v" in value) {
if (value.v === "undefined")
return void 0;
if (value.v === "null")
return null;
if (value.v === "NaN")
return NaN;
if (value.v === "Infinity")
return Infinity;
if (value.v === "-Infinity")
return -Infinity;
if (value.v === "-0")
return -0;
return void 0;
}
if ("d" in value) {
return new Date(value.d);
}
if ("u" in value)
return new URL(value.u);
if ("bi" in value)
return BigInt(value.bi);
if ("e" in value) {
const error = new Error(value.e.m);
error.name = value.e.n;
error.stack = value.e.s;
return error;
}
if ("r" in value)
return new RegExp(value.r.p, value.r.f);
if ("a" in value) {
const result = [];
refs.set(value.id, result);
for (const a of value.a)
result.push(parseEvaluationResultValue(a, handles, refs));
return result;
}
if ("o" in value) {
const result = {};
refs.set(value.id, result);
for (const { k, v } of value.o) {
if (k === "__proto__")
continue;
result[k] = parseEvaluationResultValue(v, handles, refs);
}
return result;
}
if ("h" in value)
return handles[value.h];
if ("ta" in value)
return base64ToTypedArray(value.ta.b, typedArrayConstructors[value.ta.k]);
if ("ab" in value)
return base64ToTypedArray(value.ab.b, Uint8Array).buffer;
}
return value;
}'''
#: The declaration of the one extra call: the spec first, then the objects of the handles, in the order the spec names them (`{"h": i}` is the
#: i-th). Run in the caller's context, by reference.
DECODER = "(spec, ...handles) => {\n" + _STOCK + "\nreturn parseEvaluationResultValue(spec, handles);\n}"
#: THE VALUE TAGS THIS MODULE HANDLES, each one a node `_to_spec` knows. They are the keys of the driver's protocol validator for a serialized value (`scheme.SerializedValue`
#: in `coreBundle.js`: `n b s v d u bi ta e r a o h ref`; `id` only marks an array or an object and is no value) and one more, `ab` (an ArrayBuffer): the validator
#: does not list it, the page side of stock (`parseEvaluationResultValue`, embedded above) decodes it, so it is passed to the decoder as it came. A test reads the
#: validator from the installed driver and compares it with this set.
VALUE_TAGS = ("n", "b", "s", "v", "d", "u", "bi", "ab", "ta", "e", "r", "a", "o", "h", "ref")
_SPECIAL_NUMBERS = ("NaN", "Infinity", "-Infinity", "-0")
_ISO_MILLISECONDS = re.compile(r"^(\d{4,6}-\d\d-\d\dT\d\d:\d\d:\d\d)(?:\.(\d+))?Z$")
_BIGINT_REMOTE = re.compile(r"^-?\d+n$")
def split(raw: Any):
"""`(tagged value, handle channels)` of what the client sent: the envelope `{value, handles}`, or a bare tagged value, or nothing."""
if isinstance(raw, dict) and "value" in raw and "handles" in raw:
return raw["value"], list(raw.get("handles") or [])
return raw, []
def refuse_handles(raw: Any, what: str, where: str) -> None:
"""A call whose argument stays a plain value (it goes into the page as JSON, through a command that has no object to carry) says so when
the caller passed a handle, instead of sending `null` in its place."""
handles = split(raw)[1]
if handles:
raise ProtocolException(
"%s cannot carry a JSHandle: it is read in %s, where the handle's object does not exist, and used to arrive as null. Pass the "
"handle's value (json_value) or its properties instead" % (what, where))
def _is_plain(node: Any) -> bool:
if not isinstance(node, dict):
return True
if "ref" in node or "h" in node:
return False
for tag in ("n", "s", "b"):
if tag in node:
value = node[tag]
return not (isinstance(value, float) and (value != value or value in (float("inf"), float("-inf"))))
if "v" in node:
return node["v"] == "null"
if "a" in node:
return all(_is_plain(x) for x in node["a"])
if "o" in node:
return all(entry["k"] != "__proto__" and _is_plain(entry["v"]) for entry in node["o"])
return False
def _plain(node: Any) -> Any:
if not isinstance(node, dict):
return node
for tag in ("n", "s", "b"):
if tag in node:
return node[tag]
if "v" in node:
return None
if "a" in node:
return [_plain(x) for x in node["a"]]
return {entry["k"]: _plain(entry["v"]) for entry in node["o"]}
def _milliseconds(iso: Any) -> Any:
"""A date as the node side re-emits it: `Date.prototype.toJSON`, milliseconds, truncated."""
found = _ISO_MILLISECONDS.match(iso) if isinstance(iso, str) else None
if not found:
return iso
return "%s.%sZ" % (found.group(1), ((found.group(2) or "") + "000")[:3])
def _error(entry: Dict) -> Dict:
"""`{e: {n, m, s}}` as `serializeAsCallArgument` emits it: the stack stays when it starts with `name: message`, else the head is put on it."""
name, message, stack = entry.get("n"), entry.get("m"), entry.get("s")
name = "" if name is None else str(name)
message = "" if message is None else str(message)
stack = "" if stack is None else str(stack)
head = name + ": " + message
return {"e": {"n": name, "m": message, "s": stack if stack.startswith(head) else head + "\n" + stack}}
def _argument_of(remote: Dict) -> Dict:
"""A RemoteObject as the engine's `CallFunctionArgument`."""
if remote.get("objectId"):
return {"objectId": remote["objectId"]}
if "unserializableValue" in remote:
return {"unserializableValue": remote["unserializableValue"]}
if "value" in remote:
return {"value": remote["value"]}
return {}
class Argument:
"""One argument, resolved against the caller's world `context` of the frame `frame_id` and ready to be the last argument of a call there.
Built before the caller's code runs (the handle errors are stock's, thrown before the script), so the code never runs on a refused argument. The
one extra command, the decoder, is made at `call_argument()` and once: a poll asks it every turn and gets the same object. `release()` lets go
of what this made (the decoded object and the copies of the elements it carried) and nothing of the caller's own handles; it is safe twice."""
def __init__(self, injected, context: str, frame_id: Optional[str], raw: Any, lookup: Optional[Callable[[str], Any]] = None, *,
what: str = "arg", handles_allowed: bool = True) -> None:
self.injected = injected
self.context = context
self.frame_id = frame_id
self.lookup = lookup
self.what = what
self.handles_allowed = handles_allowed
tagged, self._channels = split(raw)
self._plain: Any = None
self._spec: Any = None
self._root_is_handle = False
self._objects: List[str] = []
self._by_guid: Dict[str, Any] = {}
self._copies: List[str] = []
self._decoded: Optional[str] = None
self._argument: Optional[Dict] = None
self._is_plain = _is_plain(tagged)
try:
if self._is_plain:
self._plain = _plain(tagged)
else:
self._root_is_handle = isinstance(tagged, dict) and "h" in tagged and "ref" not in tagged
self._spec = self._to_spec(tagged)
if isinstance(self._spec, dict) and set(self._spec) == {"bi"}:
raise ProtocolException(
"a BigInt as the whole argument cannot be handed to the page: the engine's protocol carries no BigInt. Put it in an "
"array or an object, or pass it as a string")
except BaseException:
self.release()
raise
# ── the spec: what the page side reads ───────────────────────────────────
def _to_spec(self, node: Any) -> Any:
if not isinstance(node, dict):
return node
if "ref" in node:
return {"ref": node["ref"]}
if "n" in node:
number = node["n"]
if isinstance(number, float) and number != number:
return {"v": "NaN"}
if isinstance(number, float) and number in (float("inf"), float("-inf")):
return {"v": "Infinity" if number > 0 else "-Infinity"}
return number
if "s" in node:
return node["s"]
if "b" in node:
return node["b"]
if "v" in node:
return {"v": node["v"]}
if "d" in node:
return {"d": _milliseconds(node["d"])}
if "u" in node:
return {"u": node["u"]}
if "bi" in node:
return {"bi": node["bi"]}
if "e" in node:
return _error(node["e"])
if "r" in node:
return {"r": {"p": node["r"].get("p"), "f": node["r"].get("f")}}
if "ta" in node:
return {"ta": {"b": node["ta"]["b"], "k": node["ta"]["k"]}}
if "ab" in node:
return {"ab": node["ab"]}
if "a" in node:
spec = {"a": [self._to_spec(x) for x in node["a"]]}
if "id" in node:
spec["id"] = node["id"]
return spec
if "o" in node:
spec = {"o": [{"k": entry["k"], "v": self._to_spec(entry["v"])} for entry in node["o"]]}
if "id" in node:
spec["id"] = node["id"]
return spec
if "h" in node:
return self._handle(node["h"])
raise ProtocolException("Attempting to deserialize unexpected value: %r" % (node,))
# ── the handles ──────────────────────────────────────────────────────────
def _handle(self, index: int) -> Any:
"""`{"h": position}` (the position among the objects the decoder gets), or the value of a primitive handle."""
try:
channel = self._channels[index]
except (IndexError, TypeError):
raise ProtocolException("%s.handles[%s]: no object with guid undefined" % (self.what, index)) from None
guid = channel.get("guid") if isinstance(channel, dict) else None
if guid not in self._by_guid:
self._by_guid[guid] = self._resolve(index, guid)
kind, value = self._by_guid[guid]
if kind == "inline":
return value
return {"h": value}
def _resolve(self, index: int, guid: Optional[str]):
if not self.handles_allowed:
raise ProtocolException(
"%s carries a JSHandle, which cannot be delivered here: its object lives in the caller's world, and this answer is read in the "
"page's own" % self.what)
missing = ProtocolException("%s.handles[%d]: no object with guid %s" % (self.what, index, guid))
try:
handle = self.lookup(guid) if self.lookup is not None else None
except ProtocolException:
handle = None
if handle is None or getattr(handle, "disposed", False):
raise missing
frame = getattr(handle, "frame", None)
if frame is None:
raise missing
frame_id = frame.frame_id
if getattr(handle, "world", "utility") == "caller":
if not handle.object_id:
return ("inline", self._primitive(handle.remote or {}))
held_in = getattr(handle, "context", None)
if frame_id != self.frame_id or (held_in is not None and held_in != self.context):
raise ProtocolException(NOT_IN_THE_CONTEXT)
return ("object", self._place(handle.object_id))
if not getattr(handle, "node", True):
raise ProtocolException(NOT_IN_THE_CONTEXT)
if frame_id == self.frame_id:
copy = self.injected.node_to_caller(self.frame_id, handle.object_id)
else:
road = self.injected.adopt(frame_id, handle.object_id, into=self.frame_id)
if not road:
raise ProtocolException(NOT_ADOPTED)
try:
copy = self.injected.node_to_caller(self.frame_id, road)
finally:
self.injected.dispose(self.frame_id, road)
if not copy:
raise ProtocolException(NOT_ADOPTED)
self._copies.append(copy)
return ("object", self._place(copy))
def _place(self, object_id: str) -> int:
self._objects.append(object_id)
return len(self._objects) - 1
@staticmethod
def _primitive(remote: Dict) -> Any:
"""A primitive of the caller's world as a node of the spec: stock's `fallThrough: handle._value`."""
special = remote.get("unserializableValue")
if special in _SPECIAL_NUMBERS:
return {"v": special}
if isinstance(special, str) and _BIGINT_REMOTE.match(special):
return {"bi": special[:-1]}
if "value" in remote:
value = remote["value"]
if value is None:
return {"v": "null"}
if isinstance(value, float) and value != value:
return {"v": "NaN"}
return value
return {"v": "undefined"}
# ── the call ─────────────────────────────────────────────────────────────
def call_argument(self) -> Dict:
"""The engine's `CallFunctionArgument` for this argument. The decoder is called here, once."""
if self._argument is None:
self._argument = self._build()
return self._argument
def _build(self) -> Dict:
if self._is_plain:
return {"value": self._plain}
spec = self._spec
if self._root_is_handle and isinstance(spec, dict) and set(spec) == {"h"}:
return {"objectId": self._objects[spec["h"]]}
if isinstance(spec, dict) and set(spec) == {"v"}:
if spec["v"] in _SPECIAL_NUMBERS:
return {"unserializableValue": spec["v"]}
return {"value": None} if spec["v"] == "null" else {}
if not isinstance(spec, dict):
return {"value": spec}
decoded = self.injected.call_raw(
self.context, DECODER, [{"value": spec}] + [{"objectId": o} for o in self._objects], by_value=False)
if decoded.get("objectId"):
self._decoded = decoded["objectId"]
return _argument_of(decoded)
def release(self) -> None:
decoded, copies = self._decoded, self._copies
self._decoded, self._copies = None, []
if decoded:
self.injected.release(self.context, decoded)
for copy in copies:
self.injected.release(self.context, copy)
@@ -85,7 +85,12 @@ def _as_script(expression: str) -> str:
def _deserialize(value: Any) -> Any:
"""The tagged union Playwright sends for an ARGUMENT, back to a value."""
"""The tagged union Playwright sends for an ARGUMENT, back to a plain value.
⛔ ONLY FOR THE CONSUMERS THAT CARRY THEIR VALUE AS JSON (an event's init, an expected value): the argument of the caller's code is
`_arguments.Argument`, which keeps what this cannot (a handle, a date, `undefined`, a reference). `undefined` is `None` here because a
JSON value has no `undefined`; `-0` is `-0.0`, which JSON does carry (it was `None` until the Python client's `0.0` came through here).
"""
if not isinstance(value, dict):
return value
if "value" in value and "handles" in value:
@@ -96,7 +101,7 @@ def _deserialize(value: Any) -> Any:
return convert(value[tag])
if "v" in value:
return {"null": None, "undefined": None, "NaN": float("nan"),
"Infinity": float("inf"),
"Infinity": float("inf"), "-0": -0.0,
"-Infinity": float("-inf")}.get(value["v"])
if "a" in value:
return [_deserialize(x) for x in value["a"]]
@@ -109,6 +109,57 @@ class ExpectNotMet(ProtocolException):
self.log = list(log or [])
class Deferred:
"""An answer that comes LATER: what a command returns when it has to wait for something long and must not hold the worker that
took it.
⛔ THE TRANSPORT'S WORKERS ARE FEW (`InProcessTransport.WORKERS` is 4, the remote server's 8) and shared by every command of a
client. A command that waits (a proxied `newContext` waits for the final UDP verdict of its proxy: ~11 s for a first endpoint)
held one for the whole wait, and four of them left no worker for a `page.evaluate`. A command that answers LATER hands its work to a
thread of its own (started by the server's one starter, like the engine reader's adoptions) and returns this object at once; the
worker is free, and the transport posts the reply when the work ends, the way a worker posts it (`begin`). Nothing else changes:
the object that answers is still the one the client addressed, and the reply is still the one with the client's id.
The work runs in the context the call had (`contextvars`: the call's log, the remote server's client), and the thread ends with
the work. It is counted by the server, and `Server.shutdown` waits for it (bounded) after the engine's connection is closed, so
a session that ends leaves none behind."""
def __init__(self, server: "Server", work: Callable[[], Any]) -> None:
self._server = server
self._work = work
self._context = contextvars.copy_context()
#: Set when the work has ended and its answer has been handed over (or when it could never begin).
self.finished = threading.Event()
def begin(self, done: Callable[[Any, Optional[BaseException]], None]) -> None:
"""Run the work on its own thread and hand `done(result, failure)` its end. Called by the worker that took the command: it
returns at once (the thread is only queued to the starter)."""
server = self._server
def run() -> None:
try:
try:
result = self._context.run(self._work)
except Exception as failure: # noqa: BLE001 - the client is told, as for a command answered at once
done(None, failure)
else:
done(result, None)
finally:
server._deferred_ended(self)
def could_not_begin(why: str) -> None:
try:
done(None, ProtocolException("the answer could not be started: %s" % why))
finally:
server._deferred_ended(self)
if not server._deferred_begun(self):
self.finished.set() # the session is ending: there is nobody to answer
return
server.thread_starter.start_built(
threading.Thread(target=run, name="invpw-answer-later", daemon=True), could_not_begin)
class CallLog:
"""What one call did, line by line: the log Playwright's server keeps per
call (its progress, `metadata.log`) and sends with a failure, where the
@@ -229,6 +280,8 @@ class Dispatcher:
# ── routing ─────────────────────────────────────────────────────────────
def call(self, method: str, params: Dict) -> Any:
name = self.METHODS.get(method)
if name is not None and self.answers_later(method, params):
return self.server.later(lambda: getattr(self, name)(params))
if name is None:
# ⛔ NAME THE FEATURE, not just the missing method. "Page has no
# method X" reads like a bug in this package; "X is part of HAR,
@@ -245,6 +298,12 @@ class Dispatcher:
return getattr(self, name)(params)
def answers_later(self, method: str, params: Dict) -> bool:
"""Whether this call waits for something long and must be answered from a thread of its own (`Deferred`), not by the worker
that took it. Nothing does, unless an object says so."""
return False
class Server:
"""The guid registry, and the entry point the transport calls."""
@@ -281,6 +340,8 @@ class Server:
self._starter: Optional[ThreadStarter] = None
self._starter_lock = threading.Lock()
self._is_shut_down = False
#: The answers that are being worked out on a thread of their own (`later`), until each ends.
self._deferred: set = set()
#: Why a thread the starter was handed could not be started (the last few).
self.start_errors: list = []
@@ -302,6 +363,35 @@ class Server:
if len(self.start_errors) < 32:
self.start_errors.append(why)
#: How long `shutdown` waits for the answers still being worked out (`later`) once the engine's connection is closed: the longest wait of
#: a command (a proxy's UDP verdict ends at nICEr's schedule, ~11 s after the TCP exit is known) with a margin. Their threads are daemons:
#: past this the process is not held.
DEFERRED_WAIT_S = 15.0
def later(self, work: Callable[[], Any]) -> Deferred:
"""The answer of a command whose `work` takes long: a call returns this instead of its result and the transport posts the reply
when `work` ends (see `Deferred`). Called from the worker that took the command."""
return Deferred(self, work)
def _deferred_begun(self, deferred: Deferred) -> bool:
with self._starter_lock:
if self._is_shut_down:
return False
self._deferred.add(deferred)
return True
def _deferred_ended(self, deferred: Deferred) -> None:
with self._starter_lock:
self._deferred.discard(deferred)
deferred.finished.set()
def _wait_for_deferred(self) -> None:
deadline = time.monotonic() + self.DEFERRED_WAIT_S
with self._starter_lock:
pending = list(self._deferred)
for deferred in pending:
deferred.finished.wait(max(0.0, deadline - time.monotonic()))
def attach(self, transport: Any) -> None:
self._transport = transport
@@ -477,6 +567,9 @@ class Server:
except Exception:
pass
self._after_shutdown.clear()
# The engine's connection is closed (the hooks above): an answer still being worked out fails at its next command, and the wait
# of its own (a measurement) is the only thing left to wait for.
self._wait_for_deferred()
with self._starter_lock:
self._is_shut_down = True
starter = self._starter
+42 -3
View File
@@ -62,8 +62,6 @@ OUTSIDE = {
"clockRunFor": "clock",
"clockSetFixedTime": "clock",
"clockSetSystemTime": "clock",
# the streamed upload path - set_input_files with local paths works
"createTempFiles": "the streamed upload path - set_input_files with local paths works",
# recorder
"cancelPickLocator": "recorder",
"createSelectorForTest": "recorder",
@@ -103,7 +101,6 @@ OUTSIDE = {
"tracingStarted": "tracing",
"tracingStop": "tracing",
"tracingStopChunk": "tracing",
"write": "tracing",
"zip": "tracing",
# video annotations. ⛔ `screencastStart` and `screencastStop` are NOT
# here any more: since the engine's screencast came back (firefox-28) the
@@ -218,3 +215,45 @@ def refusal(operation):
"invisible_playwright does not implement: the package covers the "
"automation core, and " + feature + " is outside it by decision, "
"not by omission. See 32-stacco-da-playwright.md section 5.4.")
#: ⛔ A PARAMETER OF A SERVED OPERATION THAT IS REFUSED, keyed by (operation, parameter), and the sentence a caller reads.
#: The operations above are refused whole; these are refused one parameter (or one value of it) at a time, and the call
#: without them is served. They are raised in `server.py` by `_refuse_parameter(operation, parameter)`, the one function
#: that reads this table, and `tests/test_every_refusal_is_declared.py` holds the two sides to each other.
#:
#: ⛔ WHY THESE FIVE. Stock Playwright honours `mask`, `style` and `animations="disabled"` by MODIFYING THE PAGE (an overlay,
#: an injected `<style>`, animations finished or cancelled) before the picture and putting it back after. This package does
#: not touch a page to photograph it, and until now it did not read them either: the call succeeded and the picture was as
#: if they had not been written, which a caller cannot see. `caret="initial"` asks for the text caret to be drawn, and the
#: engine never draws it (the capture does not set the flag that draws it), so the picture it takes is the one `"hide"`
#: asks for, which is also Playwright's default: `"hide"` and an absent `caret` are served. `omitBackground` with png is
#: Firefox's own `Not implemented` in stock (`FFPage.setBackgroundColor`), word for word; with jpeg stock does nothing and
#: neither do we.
REFUSED_PARAMETERS = {
("screenshot", "mask"):
"screenshot(mask=...) is not served: Playwright covers the masked elements by modifying the page (an overlay is "
"put on it before the picture), and this package does not touch a page to take a picture. maskColor goes with "
"mask and is refused with it. Hide the elements yourself before the screenshot (for example set their "
"visibility to hidden in your own script) and restore them after.",
("screenshot", "style"):
"screenshot(style=...) is not served: Playwright applies it by modifying the page (a <style> element is "
"injected before the picture and removed after), and this package does not touch a page to take a picture. Add "
"the style yourself with page.add_style_tag() before the screenshot and remove the element it returns after.",
("screenshot", "animations"):
'screenshot(animations="disabled") is not served: Playwright does it by modifying the page (the finite '
"animations are finished and the infinite ones cancelled), and this package does not touch a page to take a "
"picture. Wait for the animations to end, or pause them in your own script (document.getAnimations()), before "
'the screenshot. animations="allow" is what is served.',
("screenshot", "caret"):
'screenshot(caret="initial") is not served: it asks for the text caret to be drawn in the picture, and the '
'engine never draws it (the picture is the one caret="hide" asks for, which is the default of Playwright). Leave '
'caret out or pass "hide".',
("screenshot", "omitBackground"):
"Not implemented",
}
def parameter_refusal(operation, parameter):
"""The sentence for a refused (operation, parameter): `KeyError` for one that is not declared."""
return REFUSED_PARAMETERS[(operation, parameter)]
+31 -11
View File
@@ -22,9 +22,12 @@ used to answer, carried over unchanged):
* NOT `Mouse.move`: an explicit move is the caller's. (The in-process client
marks its own with `humanise`, see `_cursor._wrap_mouse_move`; a client that
does not say so is answered with exactly the point it named.)
* NOT the actions of an ElementHandle (they name a node, never a selector, and
the in-process client never walked onto them either) and NOT `dragAndDrop`,
whose travel the core's `Actions` already draws.
* `ElementHandle.click / dblclick / hover / tap / check / uncheck` (and so
`set_checked`): the same walk, onto the node the handle already names
(`act(..., element=)`: the node is not looked up again and is not disposed).
One click path is one fingerprint, so a handle click and a selector click
arrive as the same kind of stroke;
* NOT `dragAndDrop`, whose travel the core's `Actions` already draws.
HOW IT STAYS THE SAME AS THE CLIENT WAS. The stroke generator, the planners
(`_behaviour`) and the discipline events are delivered under (`Pacer`) are the
@@ -391,9 +394,14 @@ class Pointer:
# -- the probes --------------------------------------------------------
def _element_box(self, frame_id: str, selector: str) -> Tuple[Optional[str], Optional[dict]]:
def _element_box(self, frame_id: str, selector: str,
element: Optional[str] = None) -> Tuple[Optional[str], Optional[dict]]:
"""Resolve the element and its box, or (None, None). Never raises.
``element`` is a node the caller already holds (an ElementHandle's): it is
measured as it is, never looked up again from ``selector``, and it is not
ours to dispose.
Deliberately non-blocking and deliberately forgiving: this is a hint
used to aim a mouse path, never a correctness step. It resolves the
element if it is already there and gives up otherwise, so it can
@@ -401,6 +409,12 @@ class Pointer:
failing one - the action itself still does its own waiting and raises
its own errors.
"""
if element is not None:
try:
box = self.injected.bounding_box(frame_id, element)
except _PROBE_ERRORS:
return None, None # the handle's node is gone: the action meets that itself
return (element, box) if box else (None, None)
try:
handle = self.injected.query_selector(frame_id, selector)
except _PROBE_ERRORS:
@@ -442,10 +456,11 @@ class Pointer:
return False
def _choose_landing(self, frame_id: str, selector: str,
position: Optional[dict]) -> Optional[_Aim]:
position: Optional[dict],
element: Optional[str] = None) -> Optional[_Aim]:
"""Pick the point on the element this action will land on."""
hand = self.hand
handle, box = self._element_box(frame_id, selector)
handle, box = self._element_box(frame_id, selector, element)
if handle is None or box is None:
return None
try:
@@ -476,7 +491,8 @@ class Pointer:
return _Aim(box, (box["x"] + box["width"] / 2.0,
box["y"] + box["height"] / 2.0), None)
finally:
self._dispose(frame_id, handle)
if element is None: # a node the caller holds stays the caller's
self._dispose(frame_id, handle)
# -- travelling --------------------------------------------------------
@@ -582,7 +598,8 @@ class Pointer:
# -- the entry points --------------------------------------------------
def approach(self, frame_id: str, selector: str, position: Optional[dict],
trial: bool = False) -> Optional[Dict[str, float]]:
trial: bool = False,
element: Optional[str] = None) -> Optional[Dict[str, float]]:
"""Walk the pointer onto the element this action is about to touch.
Returns the `position` the action should run with, or None.
@@ -598,7 +615,7 @@ class Pointer:
hand.busy = True
hand.action += 1
try:
aim = self._choose_landing(frame_id, selector, position)
aim = self._choose_landing(frame_id, selector, position, element)
if aim is None:
return None
w, h = self._viewport()
@@ -614,9 +631,12 @@ class Pointer:
def act(self, frame_id: str, selector: str, position: Optional[dict],
timeout: Optional[float], run: Callable[[Optional[dict], Optional[float]], Any],
*, trial: bool = False) -> Any:
*, trial: bool = False, element: Optional[str] = None) -> Any:
"""Run a pointer action on an element the way a hand would.
``element`` is the object id of a node the caller already holds (an
ElementHandle): the walk aims at THAT node and `selector` is not looked up.
`run(position, timeout)` performs the plain action with those two
arguments. The approach comes first; if it chose a landing point the
action is told to click it, within a bounded slice of the caller's
@@ -626,7 +646,7 @@ class Pointer:
"""
override = None
try:
override = self.approach(frame_id, selector, position, trial)
override = self.approach(frame_id, selector, position, trial, element)
except _PROBE_ERRORS as exc: # motion never fails an action for what the engine or the page answers; a bug of ours is not that
_cursor._warn_once(
"approach-failed",
+35 -11
View File
@@ -43,8 +43,12 @@ locale, timezone), and `context_options_override=True` makes the server's win.
LIMITS OF THIS FIRST VERSION, said instead of hidden.
* `launchPersistentContext` and `profile_dir` are not served.
* `x-playwright-proxy` (exposeNetwork) is recorded, not honoured.
* Downloads, file choosers and other fused types follow the in-process
client's path and are not carried to a remote client.
* Downloads and other fused types follow the in-process client's path and
are not carried to a remote client. A file chooser is: the `fileChooser`
event reaches the client, and `set_files` with a path streams the file
(`createTempFiles`, `WritableStream`) into the session's upload area, where
it lives as long as its context and goes with it, or with a client that
drops in the middle of the copy (`_client_gone` closes the contexts it owns).
* `RemoteServer.process` is the core's handle for the browser process
(`Connection._process`, a private attribute of the core: pid / poll / wait).
* Page numbers (`pageNumber`, which the in-process client reserves) are drawn
@@ -66,9 +70,9 @@ from typing import Any, Callable, Dict, List, Optional
from urllib.parse import parse_qs, urlsplit
from . import memprobe, wire
from .dispatcher import ProtocolException
from .dispatcher import Deferred, ProtocolException
from .server import (BrowserDispatcher, BrowserTypeDispatcher, JugglerServer,
LocalUtilsDispatcher, RefusingDispatcher)
LocalUtilsDispatcher, RefusingDispatcher, context_defaults_for)
from .transport import _error_payload
#: The client whose call a worker thread is answering.
@@ -446,7 +450,16 @@ class RemoteEndpoint:
except Exception as failure: # noqa: BLE001
self._reply_error(client, msg_id, failure)
else:
self._reply(client, msg_id, result)
if isinstance(result, Deferred):
# The answer comes later (see `Deferred`): this worker is free at once, the thread that works it out posts the reply.
def done(value: Any, failure: Optional[BaseException]) -> None:
if failure is not None:
self._reply_error(client, msg_id, failure)
else:
self._reply(client, msg_id, value)
result.begin(done)
else:
self._reply(client, msg_id, result)
def _dispatch(self, client: RemoteClient, message: Dict) -> Any:
guid = message.get("guid")
@@ -471,9 +484,7 @@ class RemoteEndpoint:
if method == "newPage" and "pageNumber" not in params:
params["pageNumber"] = next(self._pages)
if message.get("guid") == self.browser.guid:
for key, value in self.context_defaults.items():
if key in ("viewport", "screen") and params.get("noDefaultViewport"):
continue
for key, value in context_defaults_for(self.context_defaults, params.get("noDefaultViewport")).items():
if self.context_options_override or key not in params:
params[key] = value
return dict(message, params=params)
@@ -729,8 +740,16 @@ def _launch_params(session: Any, *, virtual_display: bool, headless: bool,
session._geolocation = geo.geolocation_override()
session._udp_exit = geo.udp_exit
executable = resolve_executable(session._binary_path)
pw_headless = bool(headless)
if not headless and virtual_display:
# The engine is never told `-headless`: the browser always has a real window. `headless=True` puts that window on the hidden
# display, by the one decision every entry point shares (`_resolve_headless`); `headless=False` keeps the window where the caller
# is, or on a private display when `virtual_display` asks for one.
pw_headless = False
if headless:
session._resolve_headless()
if session._virtual_display is None:
notes.append("headless: no hidden display to make on this platform "
"(the browser runs on the caller's desktop)")
elif virtual_display:
if sys.platform == "win32":
notes.append("virtual_display ignored: Windows has no virtual "
"display in this server (the browser runs on the "
@@ -795,7 +814,8 @@ def launch_server(host: str = DEFAULT_HOST, port: int = 0, *,
launch; the egress (exit IP -> timezone, locale
"auto"; the GeoIP database offline from
STEALTHFOX_GEOIP_MMDB) is measured here through it.
headless True = true headless; False = headed.
headless True = a real window on a hidden display (the browser is never
started with -headless); False = the window is shown.
virtual_display with headless=False: a private virtual display (Xvfb
with its own launch env). Windows: ignored, with the
reason in `server.notes`.
@@ -817,8 +837,12 @@ def launch_server(host: str = DEFAULT_HOST, port: int = 0, *,
and the launch FAILS if the version it reports is not the seal's.
"""
from invisible_playwright import InvisiblePlaywright
from invisible_playwright import _session
from invisible_playwright._engine import assert_wire_version
# A retired variable is refused before anything starts (the network, a display, a process).
_session.refuse_retired_true_headless()
if humanize and motion_budget_s:
humanize = float(motion_budget_s)
session = InvisiblePlaywright(
File diff suppressed because it is too large. Load diff
+15 -1
View File
@@ -56,6 +56,7 @@ from invisible_playwright._pw._impl._helper import parse_error
from invisible_playwright._pw._impl._transport import Transport
from . import wire
from .dispatcher import Deferred
def _error_payload(failure: BaseException) -> Dict[str, str]:
@@ -222,7 +223,20 @@ class InProcessTransport(Transport):
except Exception as failure:
self.reply_error(message.get("id"), failure)
else:
self.reply(message.get("id"), result)
if isinstance(result, Deferred):
# ⛔ THE ANSWER COMES LATER: this worker goes back to the queue at once, and the reply is posted from the thread that
# works it out, the same way (`reply`/`reply_error` hand it to the loop with `call_soon_threadsafe`).
result.begin(self._reply_later(message.get("id")))
else:
self.reply(message.get("id"), result)
def _reply_later(self, msg_id: Optional[int]) -> Any:
def done(result: Any, failure: Optional[BaseException]) -> None:
if failure is not None:
self.reply_error(msg_id, failure)
else:
self.reply(msg_id, result)
return done
# ── what the server calls back ──────────────────────────────────────────
def emit_message(self, message: Dict) -> None:
+29 -42
View File
@@ -11,7 +11,7 @@ That is a defect GENERATOR, and it has already produced three:
* the 0.4.0 process-leak fix reached the sync class only, and shipped to the
other half of the users under a release note saying it was fixed;
* `INVPW_TRUE_HEADLESS`, a documented env var, worked on the async API alone;
* `INVPW_TRUE_HEADLESS`, a documented env var, worked on the async API alone (it is retired now: see below);
* `_build_prefs` was a method on one side and twenty inline lines on the other.
Anything here must stay free of Playwright imports: it is the part that has
@@ -26,7 +26,8 @@ from ._cursor import (ENGINE_PYTHON,
enable_for as _enable_cursor_engine,
max_seconds_for as _cursor_max_seconds)
from ._engine import resolve_executable
from ._juggler.server import COMPOSED_PREF, MOTION_BUDGET_PREF, POINTER_PREF, SESSION_SEED_PREF, UDP_EXIT_PREF, UDP_STUN_PREF
from ._juggler.server import (COMPOSED_PREF, MOTION_BUDGET_PREF, POINTER_PREF, SESSION_SEED_PREF, UDP_EXIT_PREF, UDP_STUN_PREF,
declared_viewport, merged_context_kwargs)
from typing import Any, Dict, Optional
from invisible_core import compose_session_prefs, context_geometry, make_virtual_display
@@ -35,33 +36,14 @@ from invisible_core.launch import (FontManifestMismatch,
cached_font_manifest_path,
verify_font_manifest)
__all__ = ["build_prefs", "true_headless_requested", "TRUE_HEADLESS_ENV",
__all__ = ["build_prefs", "refuse_retired_true_headless", "TRUE_HEADLESS_ENV",
"ProxyEgressDrifted", "egress_ancora_valido"]
#: Opt-in to real headless. Read HERE rather than in one of the two classes,
#: because reading it in one of them is exactly how it came to work on the async
#: API only.
#:
#: ⛔ THE REASON THIS USED TO BE A WORKAROUND IS NOW KNOWN, AND FIXED. This
#: comment said: "the default headful+cloak path intermittently hangs
#: launch_persistent_context on Windows (~40%, a window/compositor race with a
#: persistent profile); true headless ... is reliable". It had the right
#: neighbourhood - window and compositor - and no mechanism, so it stood as an
#: escape hatch for months.
#:
#: The mechanism, measured 2026-08-14: Windows declared the chrome window FULLY
#: OCCLUDED and in the hanging runs the verdict was never revoked
#: (`nsWindow::NotifyOcclusionState() mIsFullyOccluded 1` with no later 0). An
#: inactive BrowsingContext never paints, so delayed startup never finishes,
#: `browser-delayed-startup-finished` never fires, no target is created and the
#: launch times out at 180 s. True headless was reliable for a reason nobody had
#: named: there is no window to occlude.
#:
#: Fixed by `widget.windows.window_occlusion_tracking.enabled=false`, applied to
#: EVERY session by invisible_core - 24 relaunches out of 24 against 6 hangs in 9.
#: So this variable is no longer a workaround for that hang; it remains as a
#: deliberate choice of a different rendering path. Full account:
#: `71-bug-archive.md` [B150].
#: The name of a retired variable. This product runs ONE path, the tested one: a real browser window on a hidden display. The
#: variable used to opt into a different rendering path (Firefox `-headless`, no window at all); that path is gone, and a variable
#: that is set and no longer does anything is a setting that does nothing while the caller believes it does something, so it is
#: refused at launch (`refuse_retired_true_headless`), never ignored. Read HERE rather than in one of the two classes: reading it
#: in one of them is exactly how it once came to work on the async API only.
TRUE_HEADLESS_ENV = "INVPW_TRUE_HEADLESS"
@@ -112,8 +94,16 @@ def declared_network(session: Any) -> str:
return network_to_declare(session.seed)
def true_headless_requested(env: Optional[Dict[str, str]] = None) -> bool:
return (env if env is not None else os.environ).get(TRUE_HEADLESS_ENV) == "1"
def refuse_retired_true_headless(env: Optional[Dict[str, str]] = None) -> None:
"""Raise ValueError when the retired `INVPW_TRUE_HEADLESS` is set to anything but empty.
Called first by every entry point (sync, async, the server's launch), before the network, a display or a process is
started, so the refusal costs nothing and leaves nothing behind."""
if (env if env is not None else os.environ).get(TRUE_HEADLESS_ENV):
raise ValueError(
"invisible_playwright: %s is set, but it was retired in this version. This product always runs a real "
"browser window on a hidden display; there is no other mode to choose. Unset %s."
% (TRUE_HEADLESS_ENV, TRUE_HEADLESS_ENV))
#: The IANA -> POSIX conversion comes from the core, which is where the table
@@ -387,7 +377,7 @@ class CommonLaunch:
⛔ THE DUPLICATION THIS CLOSES IS THE ONE THIS FILE WAS CREATED FOR, and it
survived the file's own creation. `_session` was written on 2026-07-27 to
hold what the sync and async classes share, and it did extract the
functions - `build_env`, `build_prefs`, `true_headless_requested`. What it
functions - `build_env`, `build_prefs`. What it
left behind were the METHODS that call them: six of them, in both classes,
with bodies that are identical byte for byte once the docstrings are
removed. 222 lines saying the same thing twice.
@@ -398,10 +388,8 @@ class CommonLaunch:
ratios between 32% and 69% - was entirely comments worded differently.
⛔ AND THE COST OF THE SPLIT IS NOT HYPOTHETICAL. The three defects listed
at the top of this file all have the same shape, and one of them is in the
code that moved here: `INVPW_TRUE_HEADLESS` was honoured by the async class
alone, so a documented environment variable worked or not depending on
which entry point the caller had picked.
at the top of this file all have the same shape: a documented knob that
worked or not depending on which entry point the caller had picked.
⛔ WHAT THIS CLASS EXPECTS, said out loud because a mixin's contract is
otherwise invisible: both subclasses set `seed`, `_binary_path`,
@@ -454,19 +442,13 @@ class CommonLaunch:
``pw_headless`` is what Playwright is told; ``display`` is the hidden
surface the caller must START (and then record in
``self._virtual_display``, which `_build_prefs` reads), or None when
none is wanted: headless off, true headless asked for, or a platform
none is wanted: headless off, or a platform
with no display to make. The two callers only decide WHERE the start
runs - inline in the sync client, in a worker in the async one - so
the decision cannot drift between them (B172 was one such drift).
"""
if not self._headless:
return False, None
# Opt-in TRUE headless, shared with the async class. It existed on the
# async API ONLY until 2026-07-27: a documented env var that worked
# depending on which entry point the caller happened to pick, which is
# the same drift that shipped the process-leak fix to half the users.
if true_headless_requested():
return True, None
return False, make_virtual_display()
async def _resolve_headless_async(self) -> bool:
@@ -514,8 +496,13 @@ class CommonLaunch:
# the profile's screen is the PANEL, and until wrapper 0.28.0 the
# panel's device pixels went out here as CSS (screen.width 1920 at
# DPR 1.25).
geometry = context_geometry(self._profile)
kwargs: Dict[str, Any] = {
**context_geometry(self._profile),
**geometry,
# ⛔ THE VIEWPORT IS MARKED AS THE CORE'S, not the user's: a viewport the user passes to `new_context` / `new_page` replaces
# this one whole, mark included, so what reaches the server without the mark is a choice. A popup that names no size is
# pinned to a chosen viewport as in Playwright and left to its own window under this one (`declared_viewport`).
"viewport": declared_viewport(geometry["viewport"]),
# ⛔ device_scale_factor and color_scheme are NO LONGER passed.
# They were a second source for two facts invisible_core already
# declares (layout.css.devPixelsPerPx and, since 2026-08-24,
+4 -4
View File
@@ -109,6 +109,8 @@ class InvisiblePlaywright(_session.CommonLaunch):
self._uscite_non_misurabili: int = 0
async def __aenter__(self) -> Union[Browser, BrowserContext]:
# A retired variable is refused before anything starts (the network, a display, a process).
_session.refuse_retired_true_headless()
# Resolve timezone="auto" AND discover the proxy egress IP in one
# round-trip, off the event loop, before anything reads self._timezone
# or builds prefs/env. Fail-early if a proxy is set but the egress
@@ -257,8 +259,7 @@ class InvisiblePlaywright(_session.CommonLaunch):
async def patched(**kw):
await self._assert_uscita_invariata()
merged = dict(defaults)
merged.update(kw)
merged = _session.merged_context_kwargs(defaults, kw)
ctx = await original(**merged)
if prep:
await seed_cookies(ctx)
@@ -295,8 +296,7 @@ class InvisiblePlaywright(_session.CommonLaunch):
# Reserved before the check, for `_new_page_guarded`'s reason.
with page_number_reserved(browser._impl_obj):
await self._assert_uscita_invariata()
merged = dict(defaults)
merged.update(kw) # user-supplied wins, same rule as new_context
merged = _session.merged_context_kwargs(defaults, kw)
page = await original_page(**merged)
ctx = page.context
if prep:
+7 -6
View File
@@ -38,7 +38,7 @@ import argparse
import sys
from . import __version__
from invisible_core import BINARY_VERSION, FIREFOX_UPSTREAM_VERSION, update_intermediates
from invisible_core import BINARY_VERSION, FIREFOX_UPSTREAM_VERSION, update_security_state
from invisible_core.download import cache_root, engine_root, ensure_binary # noqa: F401
from ._pin import (
@@ -86,13 +86,14 @@ def _cmd_fetch(_args: argparse.Namespace) -> int:
except Exception as e:
print(f"error: {e}", file=sys.stderr)
return 1
# The list of preloaded intermediate certificates the core declares to the engine: `fetch` is where the user asks for what is current, so it looks for a
# newer list EVERY time (a small request to the changes feed; the list is downloaded only when it changed) and puts it in the cache. A launch only reads the
# cache. A failure here is a warning and nothing more: it changes neither the exit code nor the last line (`update_intermediates` itself does not raise).
# The security state the core copies into every profile (the intermediates, OneCRL and the CRLite filters a retail Firefox has from its first second): `fetch` is
# where the user asks for what is current, so it looks for newer data EVERY time (a small request to the changes feed; a collection is downloaded only when it
# changed), has THIS engine generate the state from it and puts the result in the cache. A launch only copies from the cache. A failure here is a warning and
# nothing more: it changes neither the exit code nor the last line (`update_security_state` itself does not raise).
try:
update_intermediates()
update_security_state(engine=path)
except Exception as e:
print(f"warning: the intermediates list could not be fetched: {e}", file=sys.stderr)
print(f"warning: the security state could not be fetched: {e}", file=sys.stderr)
# Last line, alone, so `$(invisible-playwright fetch)` is a path.
print(path)
return 0
+4 -4
View File
@@ -264,6 +264,8 @@ class InvisiblePlaywright(_session.CommonLaunch):
self._uscite_non_misurabili: int = 0
def __enter__(self) -> Union[Browser, BrowserContext]:
# A retired variable is refused before anything starts (the network, a display, a process).
_session.refuse_retired_true_headless()
# Resolve timezone="auto" (and the proxy-set-but-unset default) to a
# concrete IANA zone AND discover the proxy egress IP - one round-trip,
# before anything reads self._timezone or builds prefs/env. Fail-early
@@ -501,8 +503,7 @@ class InvisiblePlaywright(_session.CommonLaunch):
def patched(**kw):
self._assert_uscita_invariata()
merged = dict(defaults)
merged.update(kw) # user-supplied wins
merged = _session.merged_context_kwargs(defaults, kw)
ctx = original(**merged)
if prep:
seed_cookies(ctx)
@@ -536,8 +537,7 @@ class InvisiblePlaywright(_session.CommonLaunch):
def patched_page(**kw):
self._assert_uscita_invariata()
merged = dict(defaults)
merged.update(kw) # user-supplied wins, same rule as new_context
merged = _session.merged_context_kwargs(defaults, kw)
page = original_page(**merged)
ctx = page.context
if prep:
+23
View File
@@ -0,0 +1,23 @@
"""The row the host oracle's declared list carried while the published engine was the 68 or the 69 and the candidate no longer spawned the graphics probe.
ci/ab-host-expected.json declares what the published engine of today and the candidate differ by, which is nothing now (the published engine is the 70, which does not spawn
gfxtest either, so the row would be stale in every run). The mechanism of a declared `proc` difference (the kind and the paths only that process touched, the A/B only, the stale
check) is tested with this row, as a row of the tests' own.
"""
from __future__ import annotations
import copy
GFXTEST_ROW = {
"id": "gfxtest-69",
"os": "linux",
"category": "proc",
"name": "gfxtest",
"published": "present",
"candidate": "absent",
"reason": "the 69 no longer spawns the graphics probe gfxtest (GFX_PROBE_BINARY, widget/gtk/GfxInfo.cpp:55; commit 0e896e4ee1, the probe never reads the host); the paths only that process touched go with it",
}
def gfxtest_rows() -> list:
return [copy.deepcopy(GFXTEST_ROW)]
+101
View File
@@ -0,0 +1,101 @@
"""What the browser writes to its output, read by every e2e test that launches the engine, and the lines that fail the test.
The core reads the browser's stdout and stderr (one pipe) through ``invisible_core.juggler.connection.ProcessOutput``, one reader for the whole life of the process, and keeps the last 200 lines. Nothing in the e2e suites looked at those
lines: a line the engine writes to say that it did something it should not have done passed in silence. The check is here: while an e2e test runs, a tee in front of that reader (the bytes are the ones the reader gets, and the browser cannot
tell) matches every line against ``FAILING_LINES``; the test fails, at its teardown, naming each line it saw.
``tests/conftest.py`` installs it for every test marked ``e2e`` (``_the_browser_log_holds_no_line_that_fails_the_test``). A browser that a test starts in a child process of its own (the A/B oracles) is not seen from here: its output is
kept by ``scripts/ci_crash_evidence.py`` and judged by the oracle.
THE LINES.
* An expired wait for ``popupshown``. The engine's Juggler (``juggler/protocol/PageHandler.js``, ``_waitForPopupOfPress``) holds the release of a click until the popup its press opened (a select dropdown) says ``popupshown``, at most one
second, and when the second passes it goes on and writes ``WARNING: popup <id> did not say popupshown within <ms> ms of its press, the release goes on``. The release that goes on is one the dropdown may drop, so a click that a test saw
pass can have lost its ``mouseup``. The text here is the engine's, character for character; the id is the popup's element id (or its tag name) and the number is ``POPUP_SHOWN_WAIT_MS``.
* An expired wait for the press of a release. The same handler holds a click's release at its gate until the page has handled the press (``_holdReleaseForItsPress``), at most five seconds, and then writes ``WARNING: the press of
this release was not handled by the page within 5 s, the release goes on``: the release may reach a page that never saw its press.
"""
from __future__ import annotations
import re
import threading
from typing import List
import pytest
#: The lines of the browser's output that fail an e2e test, each with what it means (the message names both the line and this).
FAILING_LINES = (
(re.compile(r"WARNING: popup \S+ did not say popupshown within \d+ ms of its press, the release goes on"),
"a release waited for the popup its press opened to say popupshown, and went on without it (the engine's bound passed)"),
(re.compile(r"WARNING: the press of this release was not handled by the page within \d+ s, the release goes on"),
"a release waited for its press to be handled by the page, and went on without it (the engine's bound passed)"),
)
def failing(text: str) -> List[str]:
"""The lines of ``text`` that fail a test, each as ``line <- what it means``."""
found = []
for line in text.splitlines():
for pattern, meaning in FAILING_LINES:
hit = pattern.search(line)
if hit:
found.append("%s <- %s" % (hit.group(0), meaning))
return found
class Sink:
"""What the browsers of one test wrote that fails it, and the readers that were tee'd."""
def __init__(self) -> None:
self.lines: List[str] = []
self.outputs: list = []
self._lock = threading.Lock()
def add(self, text: str) -> None:
found = failing(text)
if found:
with self._lock:
self.lines.extend(found)
def fail_if_any(self, wait: float = 0.5) -> None:
"""Fail the test, naming every line, when a browser of the test wrote one. A browser that has just closed has its last lines still in the pipe: its reader is given ``wait`` seconds to reach the end."""
for output in self.outputs:
thread = getattr(output, "_thread", None)
if thread is not None and thread.is_alive():
thread.join(wait)
with self._lock:
lines = list(self.lines)
if lines:
pytest.fail("the browser's output holds %d line(s) that fail an e2e test:\n %s" % (len(lines), "\n ".join(lines)), pytrace=False)
class ScanStream:
"""The stream the core's reader reads, with every line it reads matched against ``FAILING_LINES``: the same lines in the same order to the same reader, and nothing written to the browser."""
def __init__(self, stream, sink: Sink) -> None:
self._stream, self._sink = stream, sink
def readline(self, *args):
line = self._stream.readline(*args)
if line:
try:
self._sink.add(line.decode("utf-8", "replace") if isinstance(line, bytes) else str(line))
except Exception: # noqa: BLE001 - a check never breaks a launch
pass
return line
def __getattr__(self, name):
return getattr(self._stream, name)
def install(monkeypatch, sink: Sink) -> None:
"""Put the tee in front of the reader of every browser the process launches through the core, until ``monkeypatch`` undoes it."""
from invisible_core.juggler.connection import ProcessOutput
original = ProcessOutput.__init__
def init(self, stream, *args, **kwargs):
original(self, ScanStream(stream, sink), *args, **kwargs)
sink.outputs.append(self)
monkeypatch.setattr(ProcessOutput, "__init__", init)
+274
View File
@@ -0,0 +1,274 @@
"""What the canvas-reader e2e tests share: one scene, the readers of a canvas, the page that serves them, and the comparison of bytes.
The engine applies its canvas noise (``gfx::StealthProjectPixels``) to a WebGL or WebGPU canvas when a PAGE reads it, and only then. These
tests ask whether every road by which a page reads such a canvas gives the same bytes, so they need one scene that the noise touches, the same
scene drawn through every API, and the same list of readers for every kind of canvas.
THE SCENE. Ten triangles with random vertex colours (a fixed generator, the same numbers in every launch and in every API: ``starVertices``)
over a white clear. The noise touches only an edge pixel whose 3x3 neighbourhood holds a THIRD colour besides a blend of two, so a flat clear
is never touched; ten overlapping triangles make hundreds of such junctions, and the chance that two reads of a noised and an un-noised canvas
differ nowhere is nil. The 2D twin (``draw2D``) draws the same triangles with translucent fills and a shadow: a canvas that WOULD be noised if
the 2D road were projected, and is not (a 2D canvas reads as drawn).
THE CONTROL. ``noised=False`` declares ``zoom.stealth.canvas.substitute_pixels`` false: the canvas noise is declared off and NOTHING else changes
(same declared GPU, same antialiasing, same raster), so the difference between the two launches is the noise and nothing else, which is why
the tests may ask that it touches only the low bit of R, G and B. (A launch with ``hw_seed`` 0 would also change the declared GPU.)
THE READERS (``readersOf``): the canvas's own read (``readPixels`` / ``getImageData``), ``drawImage`` onto a 2D canvas, ``createImageBitmap``, the
PNG of ``toDataURL`` / ``toBlob`` / ``convertToBlob`` (decoded here, never by the browser, so the browser's image decoding is not a variable)
and, for an OffscreenCanvas, ``transferToImageBitmap``. Every entry is the base64 of RGBA bytes, top row first; a name that ends in ``.png`` is a
PNG file.
Nothing here waits on a clock: the page's async functions end on events, and the one wait that needs polling (``wait_until``) ends on a condition.
"""
from __future__ import annotations
import base64
import contextlib
import json
import threading
from http.server import BaseHTTPRequestHandler
from typing import Dict, List
import _page_bytes as pb
from _servers import LocalServer
#: The side of every canvas of the scene.
SIZE = 128
#: A noise seed that no runner has.
HW_SEED = 12345
#: The persona (identity) seed of every launch: not the noise seed.
SEED = 7
#: The JS of the scene and of the readers. Plain script: it runs in the page and, as the head of a worker's source, in a worker (no ``document`` in it).
SHARED_JS = r"""
const W = 128, H = 128;
// ten triangles, 30 vertices of (x, y, r, g, b), x and y in clip space: a fixed generator, so every launch and every API draws the same scene
function starVertices() {
const v = []; let s = 12345;
const rnd = () => (s = (s * 1103515245 + 12345) & 0x7fffffff) / 0x7fffffff;
for (let i = 0; i < 30; i++) v.push(rnd() * 1.8 - 0.9, rnd() * 1.8 - 0.9, rnd(), rnd(), rnd());
return v;
}
function drawGL(canvas, kind) {
const gl = canvas.getContext(kind || 'webgl', {preserveDrawingBuffer: true, antialias: true});
if (!gl) throw new Error('no ' + (kind || 'webgl') + ' context');
const shader = (type, src) => {
const s = gl.createShader(type); gl.shaderSource(s, src); gl.compileShader(s);
if (!gl.getShaderParameter(s, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s));
return s;
};
const pr = gl.createProgram();
gl.attachShader(pr, shader(gl.VERTEX_SHADER, 'attribute vec2 p; attribute vec3 c; varying vec3 v; void main(){v=c;gl_Position=vec4(p,0.,1.);}'));
gl.attachShader(pr, shader(gl.FRAGMENT_SHADER, 'precision mediump float; varying vec3 v; void main(){gl_FragColor=vec4(v,1.);}'));
gl.linkProgram(pr);
if (!gl.getProgramParameter(pr, gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(pr));
gl.useProgram(pr);
const b = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, b);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(starVertices()), gl.STATIC_DRAW);
const pl = gl.getAttribLocation(pr, 'p'), cl = gl.getAttribLocation(pr, 'c');
gl.enableVertexAttribArray(pl); gl.vertexAttribPointer(pl, 2, gl.FLOAT, false, 20, 0);
gl.enableVertexAttribArray(cl); gl.vertexAttribPointer(cl, 3, gl.FLOAT, false, 20, 8);
gl.clearColor(1, 1, 1, 1); gl.clear(gl.COLOR_BUFFER_BIT);
gl.drawArrays(gl.TRIANGLES, 0, 30);
gl.finish();
return gl;
}
// the same ten triangles on a 2D canvas, with translucent fills and a shadow
function draw2D(x) {
x.fillStyle = '#fff'; x.fillRect(0, 0, W, H);
const v = starVertices();
for (let t = 0; t < 10; t++) {
const q = v.slice(t * 15, t * 15 + 15);
x.fillStyle = 'rgba(' + Math.round(q[2] * 255) + ',' + Math.round(q[3] * 255) + ',' + Math.round(q[4] * 255) + ',' + (t % 2 ? 0.7 : 1) + ')';
x.beginPath();
for (let k = 0; k < 3; k++) {
const px = (q[k * 5] + 1) / 2 * W, py = (1 - q[k * 5 + 1]) / 2 * H;
if (k) x.lineTo(px, py); else x.moveTo(px, py);
}
x.closePath(); x.fill();
}
x.shadowColor = 'rgba(0, 0, 0, 0.6)'; x.shadowBlur = 4; x.shadowOffsetX = 3; x.shadowOffsetY = 2;
x.fillStyle = 'rgb(200, 120, 20)'; x.fillRect(40, 40, 30, 30);
}
// readPixels, top row first (readPixels gives the bottom row first)
function readGL(gl) {
const buf = new Uint8Array(W * H * 4);
gl.readPixels(0, 0, W, H, gl.RGBA, gl.UNSIGNED_BYTE, buf);
const out = new Uint8Array(W * H * 4);
for (let y = 0; y < H; y++) out.set(buf.subarray((H - 1 - y) * W * 4, (H - y) * W * 4), y * W * 4);
return out;
}
function readCtx(x) { return new Uint8Array(x.getImageData(0, 0, W, H).data); }
function b64(u8) {
let s = '';
for (let i = 0; i < u8.length; i += 8192) s += String.fromCharCode.apply(null, u8.subarray(i, i + 8192));
return btoa(s);
}
function blobB64(blob) {
return new Promise((ok, bad) => {
const r = new FileReader();
r.onload = () => ok(String(r.result).split(',')[1]);
r.onerror = () => bad(new Error('FileReader failed'));
r.readAsDataURL(blob);
});
}
// what a fresh 2D canvas (made by `make`) holds after `draw(context)`
function pixelsOf(make, draw) {
const c = make(); c.width = W; c.height = H;
const x = c.getContext('2d'); draw(x);
return readCtx(x);
}
// every road by which a page turns `src` into bytes: {name: base64 of RGBA, top row first}; a name ending in .png is a PNG file
async function readersOf(src, direct, make, withTransfer) {
const out = {direct: b64(direct())};
out.drawImage = b64(pixelsOf(make, x => x.drawImage(src, 0, 0)));
const bm = await createImageBitmap(src);
out.createImageBitmap = b64(pixelsOf(make, x => x.drawImage(bm, 0, 0)));
bm.close();
if (src.toDataURL) {
out['toDataURL.png'] = src.toDataURL('image/png').split(',')[1];
out['toBlob.png'] = await blobB64(await new Promise(r => src.toBlob(r, 'image/png')));
} else {
out['convertToBlob.png'] = await blobB64(await src.convertToBlob({type: 'image/png'}));
}
if (withTransfer && src.transferToImageBitmap) { // last: it empties the canvas
const tb = src.transferToImageBitmap();
out.transferToImageBitmap = b64(pixelsOf(make, x => x.drawImage(tb, 0, 0)));
tb.close();
}
return out;
}
const makeElement = () => document.createElement('canvas');
const makeOffscreen = () => new OffscreenCanvas(W, H);
"""
def page_html(page_js: str) -> str:
"""A page whose script holds SHARED_JS, ``WORKER_LIB`` (the same text, for the source of a worker) and the page's own functions."""
return ("<!doctype html><meta charset=utf-8><title>canvas readers</title><body><script>\n" + SHARED_JS
+ "\nconst WORKER_LIB = " + json.dumps(SHARED_JS) + ";\n" + page_js + "\n</script></body>")
@contextlib.contextmanager
def serve(html: str):
"""The page on a local http origin (a secure context, and a site a canvas has a principal on); port 0, the one the system gave."""
body = html.encode("utf-8")
class Page(BaseHTTPRequestHandler):
timeout = 5
def do_GET(self):
self.send_response(200)
self.send_header("Content-Type", "text/html; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
self.send_header("Cache-Control", "no-store")
self.end_headers()
self.wfile.write(body)
def log_message(self, *args):
pass
httpd = LocalServer(("127.0.0.1", 0), Page)
threading.Thread(target=httpd.serve_forever, daemon=True).start()
try:
yield "http://127.0.0.1:%d/" % httpd.server_address[1]
finally:
httpd.shutdown()
httpd.server_close()
@contextlib.contextmanager
def launched(firefox_binary, html: str, noised: bool = True, pin=None, viewport=None):
"""The page open in a browser of the product: the engine on (a declared noise seed no runner has), and, when ``noised`` is false, the
canvas noise declared off and nothing else. One browser, closed on leaving."""
from invisible_playwright import InvisiblePlaywright
prefs = {"zoom.stealth.fpp.hw_seed": HW_SEED}
if not noised:
prefs["zoom.stealth.canvas.substitute_pixels"] = False
with serve(html) as url:
with InvisiblePlaywright(seed=SEED, binary_path=firefox_binary, headless=True, extra_prefs=prefs, pin=pin) as browser:
context = browser.new_context(viewport=viewport) if viewport else browser.new_context()
page = context.new_page()
page.goto(url, wait_until="load", timeout=60_000)
yield page
def run(page, call: str, deadline_s: int = 120):
"""Runs the page's async function ``call`` (a JS expression that gives a promise) to its end and returns what it resolved to. The end is
the promise's own: the deadline is only how long a lost event is allowed before the test says so."""
page.evaluate("() => { window.DONE = false; window.ERR = null; window.R = null;"
" Promise.resolve().then(() => %s).then(r => { window.R = r; window.DONE = true; },"
" e => { window.ERR = String((e && e.stack) || e); window.DONE = true; }); }" % call)
page.wait_for_function("window.DONE === true", timeout=deadline_s * 1000)
err = page.evaluate("window.ERR")
assert err is None, "the page could not run %s: %s" % (call, err)
return page.evaluate("window.R")
# ------------------------------------------------------------------------------------------------------------------ bytes
def rgba_of_image(image) -> bytes:
"""RGBA bytes of an ``_page_bytes.unfiltered`` image (RGB gets an opaque alpha)."""
data, channels = image["data"], image["channels"]
if channels == 4:
return data
assert channels == 3, "a PNG of %d channels is not read here" % channels
out = bytearray()
for i in range(0, len(data), 3):
out += data[i:i + 3] + b"\xff"
return bytes(out)
def rgba(name: str, value: str) -> bytes:
"""The RGBA bytes of a reader's entry: its base64, or, for a PNG, the pixels it decodes to."""
raw = base64.b64decode(value)
if name.endswith(".png"):
image = pb.unfiltered(raw)
assert (image["w"], image["h"]) == (SIZE, SIZE), "%s is a %dx%d image, not %dx%d" % (name, image["w"], image["h"], SIZE, SIZE)
return rgba_of_image(image)
assert len(raw) == SIZE * SIZE * 4, "%s holds %d bytes, not %d" % (name, len(raw), SIZE * SIZE * 4)
return raw
def decode(readers: Dict[str, str], prefix: str = "") -> Dict[str, bytes]:
return {prefix + name: rgba(name, value) for name, value in readers.items()}
def differing_pixels(a: bytes, b: bytes) -> int:
assert len(a) == len(b), "two images of %d and %d bytes" % (len(a), len(b))
return sum(1 for i in range(0, len(a), 4) if a[i:i + 4] != b[i:i + 4])
def only_the_low_bit_of_rgb(a: bytes, b: bytes) -> List[int]:
"""The pixels where ``a`` and ``b`` differ by more than the low bit of R, G and B (or in alpha): the noise writes nothing else."""
return [i // 4 for i in range(0, len(a), 4)
if (a[i] | 1, a[i + 1] | 1, a[i + 2] | 1, a[i + 3]) != (b[i] | 1, b[i + 1] | 1, b[i + 2] | 1, b[i + 3])]
def distinct_colours(a: bytes) -> int:
return len({a[i:i + 4] for i in range(0, len(a), 4)})
def disagreements(readers: Dict[str, bytes], reference: str) -> List[str]:
"""The readers whose bytes are not those of ``reference``, each with how many pixels differ."""
want = readers[reference]
return ["%s (%d pixels differ)" % (name, differing_pixels(want, got)) for name, got in readers.items() if got != want]
def assert_agree(what: str, readers: Dict[str, bytes], reference: str = "direct") -> None:
bad = disagreements(readers, reference)
assert not bad, (
"%s: the readers %s do not read what %s reads (readers: %s). Every road by which a page reads a canvas gives the same bytes "
"when it is the same canvas" % (what, "; ".join(bad), reference, ", ".join(sorted(readers))))
-115
View File
@@ -1,115 +0,0 @@
"""What the canvas text e2e tests share: the persona pin, the bundled fonts and the server.
tests/test_canvas_text_is_windows_e2e.py (black text, 342 cases) and
tests/test_canvas_text_colors_and_cleartype_is_windows_e2e.py (coloured text and the
ClearType keys) both compare the RGBA bytes of a canvas drawn by the engine with the ones
retail Firefox 159.0 on Windows drew, for pages served on localhost with the engine's own
bundled font files. This module holds what the two do the same way.
"""
from __future__ import annotations
import hashlib
import http.server
import json
import threading
from pathlib import Path
DATA = Path(__file__).parent / "data" / "canvas_text_ref"
#: What the reference's ``cleartype`` field says the retail machine had: FontSmoothing 2 with
#: FontSmoothingType 2 is ClearType (system text quality 5). The other tuning values are an
#: untuned Windows machine's (gamma 1.8, contrast 1.0, level 1.0), which refs.json does not
#: record.
UNTUNED = {"font.cleartype_gamma": 1800, "font.cleartype_contrast": 100,
"font.cleartype_level": 100}
def pin(refs):
"""The prefs that make the engine the machine ``refs["cleartype"]`` describes."""
ct = refs["cleartype"]
smoothing, kind = str(ct["FontSmoothing"]), str(ct["FontSmoothingType"])
if smoothing == "2" and kind in ("2", "0x2"):
quality = 5
elif smoothing == "2":
quality = 4
else:
quality = 0
return {"screen.dpr": 1.0, "font.system_text_quality": quality, **UNTUNED}
def bundle_font(fonts_dir, entry):
"""The bundled file a reference entry names."""
return Path(fonts_dir) / entry["bundle_file"]
def wrong_fonts(fonts_dir, entries):
"""One line for each reference font whose bundled file is not the one measured."""
wrong = []
for e in entries:
f = bundle_font(fonts_dir, e)
got = hashlib.sha256(f.read_bytes()).hexdigest() if f.is_file() else None
if got != e["sha256"]:
wrong.append("%s: the engine's %s has sha256 %s, the reference was made with %s"
% (e["family"], f.name, got, e["sha256"]))
return wrong
def serve(fonts_dir, entries, pages):
"""``pages`` (url path -> HTML bytes) and, under /bundle/<name>, the engine's bundled
font files. Returns the running server; the caller shuts it down."""
by_url = {"/bundle/" + e["bundle_file"]: bundle_font(fonts_dir, e) for e in entries}
class _H(http.server.BaseHTTPRequestHandler):
def do_GET(self):
path = self.path.split("?")[0]
if path in pages:
body, kind = pages[path], "text/html"
elif path in by_url and by_url[path].is_file():
body, kind = by_url[path].read_bytes(), "font/ttf"
else:
self.send_error(404)
return
self.send_response(200)
self.send_header("Content-Type", kind)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, *args):
pass
server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), _H)
threading.Thread(target=server.serve_forever, daemon=True).start()
return server
_SPECS_LOOP = " window.R = {};\n for (const sp of SPECS) {"
def only_cases(html, ids):
"""canvas_text_ref/index.html as text, drawing only the cases ``ids``.
The page draws all 342 cases (the 400 px ones take minutes); a test that wants a few of
them serves this. The drawing code is untouched, so a case gives the bytes it gives in
the whole page."""
if _SPECS_LOOP not in html:
raise AssertionError("canvas_text_ref/index.html no longer has the loop over SPECS "
"that only_cases() narrows: update the helper")
return html.replace(
_SPECS_LOOP,
" window.R = {};\n const ONLY = new Set(%s);\n"
" for (const sp of SPECS.filter(s => ONLY.has(s.id))) {" % json.dumps(sorted(ids)))
def diff_lines(want, got, label=""):
"""One line for each case of ``want`` (id -> sha256) that ``got`` does not draw as
expected: its name, the hash retail gave, the hash the engine gave (or "not drawn")."""
lines = []
for cid in sorted(want):
have = got.get(cid)
if have != want[cid]:
lines.append("%s%s: expected %s, got %s"
% (label, cid, want[cid], have if have is not None else "not drawn"))
lines += ["%s%s: drawn but not in the reference" % (label, cid)
for cid in sorted(set(got) - set(want))]
return lines
+26 -12
View File
@@ -2,8 +2,8 @@
unit test feeds them the red case and the green case without a browser).
None of them reads how long something took: a loop that is held is told by WHERE the thread of the loop was (inside a blocking step of
the close), a browser that keeps answering is told by the ORDER of the events (a call that began and ended while the close was in
flight, and answers that came while the removal of the profile was held), and the removal of the profile is told by WHICH THREAD
the close), a browser that keeps answering is told by the ORDER of the events (a reply that arrived while the close was in flight,
and answers that came while the removal of the profile was held), and the removal of the profile is told by WHICH THREAD
reached it (the reaper's or its continuation's, never the loop's nor one of the close's) and by the order of the close's return and
the release of the hold. A machine that is slow stretches every duration and changes none of these.
@@ -85,21 +85,35 @@ def charged_more_than_ran_problem(held: float, busy_run: float) -> Optional[str]
"its selector (the machine did not schedule it) was counted as held" % (held * 1000, busy_run * 1000))
def others_answered_problem(others: Sequence[dict], gate: dict) -> Optional[str]:
def others_answered_problem(others: Sequence[dict], gate: dict, loop_inside: Dict[str, dict]) -> Optional[str]:
"""What is wrong with the way the other browsers answered while the first one closed, or None.
``others`` has one record per other browser: ``inside`` is the calls that began AFTER the close began and ended BEFORE it ended
(a call that was answered during the close, in the order of the events, not by how long it took), ``during_removal`` the calls
that began after the removal of the closing browser's profile was reached and ended while it was still held. ``gate`` says how that
hold ended: ``reached`` (the removal ran), ``released_by``: ``answered`` (the close had returned and every other browser had
answered a call that began after the removal was reached: the loop was free while the removal waited) or ``deadline`` (they had not,
in 30 s: the loop could not run while the removal was waiting, which is a removal made on the loop's thread)."""
``others`` has one record per other browser: ``answered`` is the replies that ARRIVED while the close was in flight, whenever the
call began (a reply read during the close is proof that the loop ran then; a call that began a moment before the close and ended
in it is one), ``inside`` the calls that began AND ended in it (printed, not judged), ``during_removal`` the calls that began after
the removal of the closing browser's profile was reached and ended while it was still held. ``gate`` says how that hold ended:
``reached`` (the removal ran), ``released_by``: ``answered`` (the close had returned and every other browser had answered a call
that began after the removal was reached: the loop was free while the removal waited) or ``deadline`` (they had not, in 30 s: the
loop could not run while the removal was waiting, which is a removal made on the loop's thread). ``loop_inside`` is what the
watcher saw of the loop's thread during the close (see the head of this file).
A browser that answered nothing inside the close is the loop's fault only if the loop was HELD: the watcher saw its thread inside
a step of the close that waits, or no browser answered at all (nothing shows that the loop ran). One engine that did not answer
while the others did, and the loop was seen free, is a browser the machine did not run: the removal's hold below still asks every
browser to answer, once the close is over."""
if len(others) != 3:
return "the client followed %d other browsers instead of 3: %r" % (len(others), others)
silent = [i for i, r in enumerate(others) if r["inside"] < 1]
silent = [i for i, r in enumerate(others) if r["answered"] < 1]
if silent:
return ("the other browsers %s did not answer a single call that began and ended inside the close (calls inside it, per "
"browser: %s): the loop that serves them did not run during the close" % (silent, [r["inside"] for r in others]))
held = blocked_by(loop_inside)
counts = [r["answered"] for r in others]
if held:
return ("the other browsers %s did not answer a single call inside the close (replies that arrived inside it, per "
"browser: %s) and the watcher saw the loop's thread inside %s: the loop that serves them did not run during "
"the close" % (silent, counts, held))
if len(silent) == len(others):
return ("no other browser answered a single call inside the close (replies that arrived inside it, per browser: %s): "
"nothing shows that the loop ran during the close" % counts)
if gate.get("reached") and gate.get("released_by") != "answered":
return ("the removal of the profile was held until every other browser answered, and they did not (%s): the loop that "
"serves them could not run while the removal waited, so the removal ran on it (answers during the removal, per "
+174
View File
@@ -0,0 +1,174 @@
"""TEMPORARY: the core of every crash of an engine the tests start, read by gdb after a test that fails. Remove it with tests/_generation_evidence.py once the
exit by SIGSEGV (-11) of the engine in generate mode on Linux (runs 44985244053 and 45014369018) is understood and fixed.
A release build crashes in silence: MOZ_CRASH, MOZ_RELEASE_ASSERT and a Rust panic write to a null address and print nothing, so stderr cannot tell a crash the
code wanted from a bad access. The core can: `gMozCrashReason` says the reason of a wanted crash, the faulting address and the thread that fell say the rest.
* `lift_the_core_limit_of_the_session()`: once, at the start of pytest (tests/conftest.py, `pytest_configure`), on Linux: the soft RLIMIT_CORE of the pytest
process raised to its hard limit. Every process a test starts inherits it, the engines the CORE launches included (its `generate` passes no limit of its own),
so a crash of any of them leaves a core where `kernel.core_pattern` says. The Linux e2e jobs (e2e.yml, and gate.yml of the engine series) point it at
`$INVPW_CORE_DIR` and install gdb.
* `after_the_report(nodeid, when, failed)`: tests/conftest.py calls it after each phase of every test (`pytest_runtest_makereport`). When `$INVPW_CORE_DIR` is set:
after a phase that FAILED, every `core*` there is read by gdb into `<evidence>/cores/<nodeid>/<core>.gdb.txt` and deleted, and `notes.txt` says what was found
(no core included); after the teardown of a test that did not fail, the cores left are deleted and listed in `<evidence>/cores/after-passing-tests.txt` (a crash
in a passing test is information too). `<evidence>` is `$RUNNER_TEMP/invpw-evidence`, the folder the e2e jobs upload.
* `gdb_text(core, into)`: the one gdb path of the tests: the executable is the one the core's header names (else `$INVPW_BINARY_PATH`), and the text holds the
backtrace of every thread, their names, the signal's address, `gMozCrashReason`, the registers, the shared libraries with their addresses and build ids, and the
mappings. Only the text is kept: a core of the engine is hundreds of MB.
Best effort: nothing here raises, and nothing here decides a test.
"""
from __future__ import annotations
import contextlib
import os
import re
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path
#: The folder under `$RUNNER_TEMP` the e2e workflows upload (`invpw-evidence-*`, "Keep what the tests saved").
EVIDENCE_FOLDER = "invpw-evidence"
CORES = "cores"
AFTER_PASSING = "after-passing-tests.txt"
#: How long gdb may take to read a core of the engine, and to read its header only.
GDB_TIMEOUT_S = 600
HEADER_TIMEOUT_S = 120
#: What gdb prints from the core: the crashing thread first, then every thread with its name, the signal, the reason of a wanted crash, where libxul is.
GDB_COMMANDS = (
"set pagination off",
"set width 0",
"bt",
"info threads",
"thread apply all bt",
"p $_siginfo",
"p $_siginfo._sifields._sigfault.si_addr",
"x/s *(char**)&gMozCrashReason",
"info registers",
"x/8i $pc",
"info sharedlibrary",
"python print('\\n'.join('%s %s' % (o.filename, o.build_id) for o in gdb.objfiles()))",
"info proc mappings",
)
_HEADER = re.compile(r"Core was generated by `([^']*)'")
#: The tests a phase of which failed: their teardown reads its cores too.
_FAILED = set()
def lift_the_core_limit_of_the_session():
"""Linux: the soft RLIMIT_CORE of this process raised to its hard limit, inherited by every child. Elsewhere, or if it is refused, nothing."""
if not sys.platform.startswith("linux"):
return
try:
import resource
_soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
resource.setrlimit(resource.RLIMIT_CORE, (hard, hard))
except (ImportError, OSError, ValueError):
pass
def core_pattern():
try:
return Path("/proc/sys/kernel/core_pattern").read_text(encoding="utf-8").strip()
except OSError as exc:
return "unreadable: %r" % (exc,)
def gdb():
"""The gdb command (a list), or None when gdb is not installed."""
found = shutil.which("gdb")
return [found] if found else None
def evidence_root():
base = os.environ.get("RUNNER_TEMP") or tempfile.gettempdir()
return Path(base) / EVIDENCE_FOLDER / CORES
def folder_name(nodeid):
return re.sub(r"[^A-Za-z0-9._-]+", "_", nodeid).strip("_")[:150] or "unnamed"
def _cores():
where = os.environ.get("INVPW_CORE_DIR")
if not where or not Path(where).is_dir():
return None, []
return Path(where), sorted((path for path in Path(where).glob("core*") if path.is_file()), key=lambda path: path.stat().st_mtime)
def executable_of(core, command):
"""The executable the core's header names when it is a file, else `$INVPW_BINARY_PATH` (or `$STEALTHFOX_E2E_BINARY`), else None. Returns (path, how)."""
header = ""
try:
done = subprocess.run(command + ["-batch", "-nx", "-c", str(core)], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
timeout=HEADER_TIMEOUT_S)
header = done.stdout.decode("utf-8", "replace")
except Exception as exc: # best effort
header = "header unreadable: %r" % (exc,)
match = _HEADER.search(header)
named = match.group(1).split()[0] if match and match.group(1).split() else None
if named and Path(named).is_file():
return named, "from the core's header"
for variable in ("INVPW_BINARY_PATH", "STEALTHFOX_E2E_BINARY"):
if os.environ.get(variable) and Path(os.environ[variable]).is_file():
return os.environ[variable], "from $%s (the header names %r)" % (variable, named)
return None, "none (the header names %r)" % (named,)
def gdb_text(core, into):
"""gdb's text of `core` in `into/<core>.gdb.txt`. One line saying what was done. Does not delete the core."""
command = gdb()
size = core.stat().st_size
if command is None:
return "core %s (%d bytes, kernel.core_pattern %r) but gdb is not installed" % (core.name, size, core_pattern())
exe, how = executable_of(core, command)
argv = command + ["-batch", "-nx"]
for line in GDB_COMMANDS:
argv += ["-ex", line]
argv += ([exe] if exe else []) + ["-c", str(core)]
target = into / (core.name + ".gdb.txt")
try:
done = subprocess.run(argv, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=GDB_TIMEOUT_S)
target.write_bytes(("executable: %s (%s)\n\n" % (exe, how)).encode("utf-8") + done.stdout)
return "core %s (%d bytes): gdb exited %d, %d bytes of text in %s; executable %s" % (core.name, size, done.returncode, len(done.stdout), target.name, how)
except Exception as exc:
return "core %s (%d bytes): gdb failed: %r" % (core.name, size, exc)
def after_the_report(nodeid, when, failed):
"""After a phase (`setup`, `call`, `teardown`) of the test `nodeid`: see the module's docstring. Never raises."""
try:
failed_before = nodeid in _FAILED
if failed:
_FAILED.add(nodeid)
if when == "teardown":
_FAILED.discard(nodeid)
where, cores = _cores()
if where is None:
return
if failed or (failed_before and cores):
into = evidence_root() / folder_name(nodeid)
into.mkdir(parents=True, exist_ok=True)
notes = ["%s failed (phase %s); INVPW_CORE_DIR %s, kernel.core_pattern %r, gdb %s" % (nodeid, when, where, core_pattern(), gdb())]
if not cores:
notes.append("no core file in %s" % where)
for core in cores:
notes.append(gdb_text(core, into))
with open(str(into / "notes.txt"), "a", encoding="utf-8") as sink:
sink.write("\n".join(notes) + "\n")
elif when == "teardown" and cores:
root = evidence_root()
root.mkdir(parents=True, exist_ok=True)
with open(str(root / AFTER_PASSING), "a", encoding="utf-8") as sink:
for core in cores:
sink.write("%s\t%s\t%d bytes (deleted, not read)\n" % (nodeid, core.name, core.stat().st_size))
else:
return
for core in cores:
with contextlib.suppress(OSError):
core.unlink()
except Exception: # the evidence is best effort: the test's own outcome is what counts
pass
+5 -2
View File
@@ -42,7 +42,7 @@ from pathlib import Path
from typing import Callable, Dict, List, NamedTuple, Optional, Set, Tuple
from urllib.parse import parse_qs, urlsplit
from _socks_servers import EXIT, Gateway, WEB_NAME, WHOAMI4, WHOAMI6
from _socks_servers import EXIT, Gateway, WEB_NAME, WHOAMI4, WHOAMI6, _REQUEST
try: # the HTTP/2 side needs it; a test that wants h2 says pytest.importorskip("h2")
import h2.config
@@ -602,7 +602,8 @@ class DohGateway(Gateway):
* CONNECT to a loopback address is relayed for real (the pages and the echo servers of a test);
* the egress endpoints of the base class (``api.ipify.org:80``) keep working;
* any other CONNECT is refused (reply 2 "not allowed", for an address; 4 "host unreachable", for a name) and
listed in :attr:`refused`: the gateway never resolves a name and never reaches past the loopback.
listed in :attr:`refused` (and in ``guard``, the record every gateway of ``_socks_servers`` writes under ``$RUNNER_TEMP/invpw-evidence/``):
the gateway never resolves a name and never reaches past the loopback. Its UDP relay is the base one: only the lab's, the rest dropped and recorded.
:attr:`connects` (inherited) lists EVERY CONNECT target in order, so ``("page-a.test", 80)`` in it means the
browser sent a name where it should have sent an address. :attr:`credentials_seen` lists every
@@ -696,6 +697,8 @@ class DohGateway(Gateway):
if not is_loopback(host):
self.connects.append((host, port))
self.refused.append((host, port))
self.guard.refuse(host, port, getattr(_REQUEST, "atyp", 3), "tcp",
reason="past loopback: the DoH gateway carries only loopback (besides the DoH, the exit questions and the web name it answers)")
self._send(c, self._reply(2 if _is_address(host) else 4))
return
self.connects.append((host, port))
+187
View File
@@ -0,0 +1,187 @@
"""What the drag twin records of a drag, and how two records are compared: every drag event the page hears, in the top document and in the frame, never a number of ours.
``RECORDER_JS`` is the script both pages run: for each of ``dragstart``, ``drag``, ``dragenter``, ``dragover``, ``dragleave``, ``drop`` and ``dragend`` (heard at the document, after the
page's own handlers, so ``dataTransfer.types`` is what the page has set by then) it keeps, in ``window.__events``, the fields of ``FIELDS``:
type, at (the id of the event's target), under (the id of ``document.elementFromPoint`` at the event's client point), cx/cy (clientX/Y), sx/sy (screenX/Y), buttons, input (mozInputSource),
types (dataTransfer.types), allowed (effectAllowed), effect (dropEffect), cancelled (mozUserCancelled), source_null (whether mozSourceNode is null), trusted (isTrusted).
``record(top_events, frame_events)`` is what one browser leaves: for each document (the top one, where the drag starts and ends and a drop can land, and the frame) the events that happen once
or a few times (``once``: dragstart, dragenter, dragleave, drop, dragend, in the order the page heard them) whole, and for ``drag`` and ``dragover``, which repeat as often as the mouse moves
and as a timer fires, their count, their first and last event and the ids they were dispatched at. ``end_minus_last`` is ``dragend``'s client point less the last ``drag``'s, in the top
document.
HOW TWO RECORDS ARE COMPARED (``compare``): with stock, only what stock decides the same way on every machine and in either process model: the routing and the targets (the event sequence, the
type, the target, what is under the point), the client points, ``rel``, the data transfer's types, trusted, the input source, and, in the top document, the effects (the same process on both
sides) of every event but the one the frame's process decides (see the twin rule). In a CSS pixel for the client points (``TOLERANCES``: the point of a drag is a device pixel that crosses a process and is rounded to CSS, the tolerance the twin has always had for the
drop point); and through the relation for the screen points. ``screenX/Y`` is where the window stands on the screen: stock's is the real place of its window and ours is the declared one, so the
two are not the same number and no number of ours is the expected one. What the page reads is the same in both: where a point is on the screen relative to where the top document's first event is
(``rel``: ``screen - client`` of the event, less that of the first event of the top document). It is 0 for every event of the top document and the frame's place in it for a frame's event, in a
browser whose window stands anywhere. The absolute screen points and the origin are in the record, printed when the two differ, and not in the comparison. The count of ``dragover`` events is in
the record and not in the comparison: it is timer-driven.
THE TWIN RULE (``DECLARED``): a field that depends on stock's frame being in the top's process, or on stock's drag being Juggler's synthetic one, is in the record and NOT compared with stock; the
list says which and why, and ``recorded`` returns what differs there, for the report. Retail decides those fields, through the capture of the round ``drag`` of the core's window-geometry workflow.
They are ``buttons`` (stock's synthetic drag has no OLE loop: 0), ``drag`` at the source (count and presence: no OLE loop, no timer-driven ``drag``), the ``dragend`` point less the last ``drag``
(no ``drag`` to be less of), and in the frame ``effectAllowed``, ``dropEffect`` and ``mozSourceNode`` (stock's frame is in-process and reads the source's own DataTransfer; ours is in another
process, where Mozilla's cross-process DataTransfer starts with effectAllowed ``uninitialized`` and the dropEffect is the action, nsContentUtils FilterDropEffect).
For the drop in the frame (``kind`` ``frame``), two more fields of the TOP document depend on the frame's process, and ``comparable`` moves them out of ``top.once`` before the comparison: every top
``dragleave`` whose ``under`` is the frame (``top.into_frame``: stock's frame is in its own process model, so the top's event manager fires a leave at the body when the cursor enters the
subdocument; retail with the frame out of process has none, and ours has none) and the ``dropEffect`` of the top ``dragend`` (``top.dragend_effect``: it is the frame's drop result, which crosses
processes). In the drop in the top document (``kind`` ``top``) the record is compared whole, ``dragend``'s effect included.
"""
from __future__ import annotations
import copy
import json
from typing import Any, Dict, List, Optional, Tuple
from _stock_twin import IN_PROCESS_FRAME, SYNTHETIC_DRAG, both, split_differences
#: The events of a drag, in the order a drag starts, goes over and ends.
TYPES = ("dragstart", "drag", "dragenter", "dragover", "dragleave", "drop", "dragend")
#: Events that repeat (every mouse move, every timer tick): the record keeps their count, their first and last event.
REPEATED = ("drag", "dragover")
#: What the page keeps of each event, and so what the record has of it.
FIELDS = ("type", "at", "under", "cx", "cy", "sx", "sy", "buttons", "input", "types", "allowed", "effect", "cancelled", "source_null", "trusted")
#: A CSS pixel for a client point and for the relation of the screen point to the client one; every other number exactly.
TOLERANCES: Dict[str, float] = {"cx": 1.0, "cy": 1.0, "rel": 1.0}
#: Keys of the record that are in it and not in the comparison, and why (the count of ``drag`` and of ``dragover`` is left out in ``_comparable``: a timer fires them, so it depends on the speed of the machine).
NOT_COMPARED = {
"sx": "the real place of stock's window and the declared one of ours: compared through rel",
"sy": "the real place of stock's window and the declared one of ours: compared through rel",
"screen_origin": "screen minus client of the first event of the top document: where the window stands",
}
#: THE TWIN RULE. Stock Playwright's Firefox sets ``fission.webContentIsolationStrategy=0``: its cross-site frame is in the top's process, ours is in another process, and stock's drag is Juggler's
#: synthetic one (no OLE drag loop). A field that depends on either is RECORDED, not compared with stock: the retail capture decides it (round ``drag`` of the core's window-geometry workflow, which
#: drives a real drag on retail). Each key is a pattern of canonical paths of the record (``top.once[].buttons``; ``*`` is any run of characters), each value is the reason.
#: What is compared with stock is the routing and the targets (the event sequence, ``type``, ``at``, ``under``), the client points and ``rel``, ``types``, ``trusted`` and ``input`` (mozInputSource),
#: in both documents, and ``effectAllowed`` and ``dropEffect`` of the top document, except, in the drop in the frame, the top's leave into the frame and the top ``dragend``'s ``dropEffect``.
DECLARED: Dict[str, str] = {
# stock's synthetic Juggler drag: no OLE loop, so the mouse buttons are 0 in its events and ``drag`` never fires at the source (and the dragend point less the last drag has no drag to be less of)
"*.buttons": SYNTHETIC_DRAG,
"top.repeated.drag.*": SYNTHETIC_DRAG,
"end_minus_last*": SYNTHETIC_DRAG,
# stock's frame is in-process: it reads the source's own DataTransfer; ours is in another process, where Mozilla's cross-process DataTransfer starts with effectAllowed 'uninitialized' and
# dropEffect is the action (nsContentUtils FilterDropEffect), and mozSourceNode is not reachable
"frame.*.allowed": IN_PROCESS_FRAME,
"frame.*.effect": IN_PROCESS_FRAME,
"frame.*.source_null": IN_PROCESS_FRAME,
# the frame drop only (``comparable`` makes these keys): stock's top hears a leave at the body when the cursor enters its in-process-model subdocument, and the top dragend's dropEffect is the
# frame's drop result, which crosses processes
"top.into_frame*": IN_PROCESS_FRAME,
"top.dragend_effect*": IN_PROCESS_FRAME,
}
RECORDER_JS = """
window.__events = [];
(function () {
const name = n => n ? (n.id || n.nodeName.toLowerCase()) : null;
for (const type of %s) {
document.addEventListener(type, e => {
const dt = e.dataTransfer;
window.__events.push({
type: e.type, at: name(e.target), under: name(document.elementFromPoint(e.clientX, e.clientY)),
cx: e.clientX, cy: e.clientY, sx: e.screenX, sy: e.screenY, buttons: e.buttons, input: e.mozInputSource,
types: dt ? Array.from(dt.types) : null, allowed: dt ? dt.effectAllowed : null, effect: dt ? dt.dropEffect : null,
cancelled: dt ? dt.mozUserCancelled : null, source_null: dt ? dt.mozSourceNode === null : null, trusted: e.isTrusted,
});
});
}
})();
""" % json.dumps(list(TYPES))
READ_JS = "() => window.__events"
def read_events(document) -> List[Dict[str, Any]]:
"""The raw events a page or frame heard (``document`` is a Playwright page or frame)."""
return document.evaluate(READ_JS)
def _event(raw: Dict[str, Any], origin: Optional[List[float]]) -> Dict[str, Any]:
missing = [f for f in FIELDS if f not in raw]
if missing:
raise ValueError("a drag event the page recorded has no %s (an absent field is a difference, never an agreement): %r" % (", ".join(missing), raw))
out = {f: raw[f] for f in FIELDS}
out["rel"] = None if origin is None else [raw["sx"] - raw["cx"] - origin[0], raw["sy"] - raw["cy"] - origin[1]]
return out
def _document(events: List[Dict[str, Any]], origin: Optional[List[float]]) -> Dict[str, Any]:
once = [_event(e, origin) for e in events if e.get("type") not in REPEATED]
repeated: Dict[str, Any] = {}
for kind in REPEATED:
of_kind = [_event(e, origin) for e in events if e.get("type") == kind]
repeated[kind] = ({"count": len(of_kind), "first": of_kind[0], "last": of_kind[-1], "at": sorted({str(e["at"]) for e in of_kind})}
if of_kind else {"count": 0})
return {"once": once, "repeated": repeated}
def record(top_events: List[Dict[str, Any]], frame_events: List[Dict[str, Any]]) -> Dict[str, Any]:
"""What one browser leaves of one drag: both documents' events, the end point less the last drag point, and the origin of the screen points."""
origin = [top_events[0]["sx"] - top_events[0]["cx"], top_events[0]["sy"] - top_events[0]["cy"]] if top_events else None
top = _document(top_events, origin)
drags = [e for e in top_events if e.get("type") == "drag"]
ends = [e for e in top_events if e.get("type") == "dragend"]
last, end = (drags[-1] if drags else None), (ends[-1] if ends else None)
return {"top": top, "frame": _document(frame_events, origin),
"end_minus_last": [end["cx"] - last["cx"], end["cy"] - last["cy"]] if (end and last) else None,
"screen_origin": origin}
def read_record(page, frame) -> Dict[str, Any]:
"""The record of a drag, read from the top page and from the frame."""
return record(read_events(page), read_events(frame))
def _comparable(node: Any, key: str = "") -> Any:
if isinstance(node, dict):
return {k: _comparable(v, k) for k, v in node.items() if k not in NOT_COMPARED and not (key in REPEATED and k == "count")}
if isinstance(node, list):
return [_comparable(v, key) for v in node]
return copy.deepcopy(node)
#: The id of the frame in the top page (``f``): the ``under`` of the top's leave into it.
FRAME_ID = "f"
def comparable(record: Dict[str, Any], kind: str) -> Dict[str, Any]:
"""The record as it is compared: for the drop in the frame (``kind`` ``frame``) the top's ``dragleave`` events under the frame leave ``top.once`` for ``top.into_frame`` and the top ``dragend``'s
``effect`` leaves its event for ``top.dragend_effect``; both keys are in ``DECLARED``. For the drop in the top document (``top``) the record is unchanged."""
if kind not in ("top", "frame"):
raise ValueError("the drop is in the 'top' document or in the 'frame', not %r" % (kind,))
out = _comparable(record)
if kind == "frame":
top = out["top"]
into_frame = [e for e in top["once"] if e["type"] == "dragleave" and e["under"] == FRAME_ID]
top["once"] = [e for e in top["once"] if not (e["type"] == "dragleave" and e["under"] == FRAME_ID)]
top["into_frame"] = into_frame
top["dragend_effect"] = [e.pop("effect") for e in top["once"] if e["type"] == "dragend"]
return out
def split(stock: Dict[str, Any], ours: Dict[str, Any], kind: str, path: str = "drag") -> Tuple[List[str], List[str]]:
"""``(red, recorded)``: the differences that decide, and those of the declared fields (``DECLARED``), kept for the report. ``kind`` is where the drop ended: ``top`` or ``frame``."""
return split_differences(comparable(stock, kind), comparable(ours, kind), DECLARED, TOLERANCES, path)
def compare(stock: Dict[str, Any], ours: Dict[str, Any], kind: str, path: str = "drag") -> List[str]:
"""Every place where ours is not what stock is in a field that is compared, as ``path: stock X, ours Y``; empty when the page reads the same there."""
return split(stock, ours, kind, path)[0]
def recorded(stock: Dict[str, Any], ours: Dict[str, Any], kind: str, path: str = "drag") -> List[str]:
"""The differences in the fields of ``DECLARED``: in the report, never in the verdict."""
return split(stock, ours, kind, path)[1]
def verdict(case: str, kind: str, stock: Dict[str, Any], ours: Dict[str, Any]) -> str:
"""The message of a red drag twin, with both records whole; empty when ours is what stock is."""
differing = compare(stock, ours, kind, "%s drop" % kind)
if not differing:
return ""
return ("%s: the drag that ends in the %s of ours does not read what stock's does (every event, that drag fired at the source, dragend less the last drag):\n %s%s"
% (case, "frame of another site" if kind == "frame" else "top document", "\n ".join(differing), both(case, stock, ours)))
+101 -1
View File
@@ -23,6 +23,11 @@ THE RULES (a stable name each; ``CLASS`` is the letter of the audit of the e2e t
time a healthy run is allowed, and a loaded runner takes longer than a developer's machine: 30 s is the one the whole suite uses (the unit is read from the callee:
milliseconds for the Playwright API, seconds for the standard library and for the helpers of ``tests/``). A wait for something that must NOT happen is accepted by its shape
(inside ``pytest.raises``, under a ``try`` that swallows the timeout, or a limit that is NAMED ``NEGATIVE_...``); any other is a reviewed ``entries`` item with its reason.
* ``lab-delay`` (A): an e2e test that gives a lab gateway or lab server a delay (``Gateway(..., rtt_ms=N)``, ``Chain(rtt_ms=N)``, ``first_connection_delay=N``, ``doh.delay_names[...] = N``,
``sites.route(..., delay=N)``, ``_serve(..., delay=N)``, a test parameter named ``rtt_ms``, or a fixture of the file that does) and is not marked ``wall_clock``. The delay is a sleep or a
timer of the lab's own threads, and what the test waits for is decided by the product with a time budget (the core's UDP measurement, a DoH timeout): on a runner with no CPU left the
threads are scheduled late and the answer comes after the budget (run 45058944650). The test belongs to the ``wall_clock`` lane (serial, the whole machine). A delay of a literal 0 is none;
a value the test computes counts until it is shown to be 0. One occurrence per test.
* ``egress`` (D): the conftest has no autouse session fixture that declares the exit of the lab (tests/_lab_egress.py), so a launch asks three services of the internet.
WHAT IS ACCEPTED WITHOUT A LIST, because it is recognised by its shape: a pause that is the step of a poll with a deadline (a ``while``/``for`` that compares with a clock
@@ -45,7 +50,7 @@ from typing import Dict, Iterable, List, Optional, Set, Tuple
TESTS = Path(__file__).resolve().parent
#: The rule -> the class of the audit.
CLASS = {"sleep": "A", "js-timer": "A", "bound": "B", "port": "C", "env": "C", "net": "D", "egress": "D", "count": "E", "timeout": "F"}
CLASS = {"sleep": "A", "js-timer": "A", "lab-delay": "A", "bound": "B", "port": "C", "env": "C", "net": "D", "egress": "D", "count": "E", "timeout": "F"}
RULES = tuple(CLASS)
#: The files that say what is forbidden (their own patterns would be found) and the files of the round after a publication (``net`` is theirs by design).
@@ -608,6 +613,98 @@ def _is_e2e_file(tree: ast.Module) -> bool:
for sub in ast.walk(tree))
#: The delay knobs of the lab servers: the keyword of a call -> the callees it is a delay of (None: any). ``delay`` alone is too common a word (``keyboard.type(delay=120)``): it is a delay
#: of the lab only on the two helpers that serve a late page.
LAB_DELAY_KEYWORDS: Dict[str, Optional[Set[str]]] = {"rtt_ms": None, "first_connection_delay": None, "delay": {"route", "_serve"}}
#: A test parameter that is one of those knobs: the distance a ``parametrize`` gives the gateway.
LAB_DELAY_PARAMETERS = {"rtt_ms", "first_connection_delay"}
#: The tables of the lab servers that a test fills with a delay by name (``doh.delay_names["slow.test"] = 2.0``).
LAB_DELAY_TABLES = {"delay_names"}
def _is_zero(node: ast.AST) -> bool:
return isinstance(node, ast.Constant) and (node.value is None or node.value is False or (isinstance(node.value, (int, float)) and node.value == 0))
def _first_lab_delay(function: ast.AST) -> Optional[ast.AST]:
"""The first node in the body of ``function`` that gives a lab server a delay (see :data:`LAB_DELAY_KEYWORDS`), or None."""
for node in ast.walk(function):
if isinstance(node, ast.Call):
callee = _dotted(node.func).rsplit(".", 1)[-1]
for keyword in node.keywords:
where = LAB_DELAY_KEYWORDS.get(keyword.arg or "", False)
if where is not False and (where is None or callee in where) and not _is_zero(keyword.value):
return node
elif isinstance(node, (ast.Assign, ast.AugAssign)):
for target in node.targets if isinstance(node, ast.Assign) else [node.target]:
if isinstance(target, ast.Subscript) and _dotted(target.value).rsplit(".", 1)[-1] in LAB_DELAY_TABLES and not _is_zero(node.value):
return node
return None
def _lab_delays(tree: ast.Module) -> List[Tuple[str, int, str]]:
"""``(scope, line, text)`` of each e2e test that gives a lab server a delay and does not carry ``wall_clock``: in its own body, through a parameter named like a knob, or through a
fixture of the same file (``usefixtures`` and the fixtures that fixture takes included)."""
module_marks: Set[str] = set()
for node in tree.body:
if isinstance(node, ast.Assign) and any(isinstance(t, ast.Name) and t.id == "pytestmark" for t in node.targets):
module_marks |= _marks(node.value)
functions: List[Tuple[str, ast.AST, Set[str]]] = [] # qualified name, node, the marks of its classes and module
def collect(body: List[ast.stmt], prefix: str, inherited: Set[str]) -> None:
for node in body:
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
functions.append((prefix + node.name, node, inherited))
elif isinstance(node, ast.ClassDef):
marks = set(inherited)
for decorator in node.decorator_list:
marks |= _marks(decorator)
for stmt in node.body:
if isinstance(stmt, ast.Assign) and any(isinstance(t, ast.Name) and t.id == "pytestmark" for t in stmt.targets):
marks |= _marks(stmt.value)
collect(node.body, prefix + node.name + ".", marks)
collect(tree.body, "", module_marks)
def is_a_fixture(node: ast.AST) -> bool:
return any(_dotted(d.func if isinstance(d, ast.Call) else d).rsplit(".", 1)[-1] == "fixture" for d in node.decorator_list) # type: ignore[attr-defined]
def parameters(node: ast.AST) -> List[str]:
arguments = node.args # type: ignore[attr-defined]
return [a.arg for a in list(arguments.posonlyargs) + list(arguments.args) + list(arguments.kwonlyargs)]
delaying = {name.rsplit(".", 1)[-1] for name, node, _ in functions if is_a_fixture(node) and _first_lab_delay(node) is not None}
grew = True
while grew: # a fixture that takes a delaying fixture delays too
grew = False
for name, node, _ in functions:
short = name.rsplit(".", 1)[-1]
if is_a_fixture(node) and short not in delaying and delaying & set(parameters(node)):
delaying.add(short)
grew = True
out: List[Tuple[str, int, str]] = []
for name, node, inherited in functions:
if not name.rsplit(".", 1)[-1].startswith("test_") or is_a_fixture(node):
continue
marks = set(inherited)
for decorator in node.decorator_list: # type: ignore[attr-defined]
marks |= _marks(decorator)
if "e2e" not in marks or "wall_clock" in marks:
continue
used = set(parameters(node))
for decorator in node.decorator_list: # type: ignore[attr-defined]
if isinstance(decorator, ast.Call) and _dotted(decorator.func).rsplit(".", 1)[-1] == "usefixtures":
used |= {a.value for a in decorator.args if isinstance(a, ast.Constant) and isinstance(a.value, str)}
own = _first_lab_delay(node)
if own is not None:
out.append((name, getattr(own, "lineno", node.lineno), ast.unparse(own).splitlines()[0][:80]))
elif used & LAB_DELAY_PARAMETERS:
out.append((name, node.lineno, "parameter " + sorted(used & LAB_DELAY_PARAMETERS)[0]))
elif used & delaying:
out.append((name, node.lineno, "fixture " + sorted(used & delaying)[0]))
return out
def analyze(source: str, file: str, *, force: bool = False) -> List[Violation]:
"""The occurrences of ``source`` (the content of ``tests/<file>``). A test file with no ``e2e`` marker is not read, unless ``force`` (the helpers always are)."""
tree = ast.parse(source)
@@ -615,6 +712,8 @@ def analyze(source: str, file: str, *, force: bool = False) -> List[Violation]:
if not e2e or file in SELF:
return []
reader = _Reader(file, tree, e2e)
if file.startswith("test_"):
reader.found.extend((scope, "lab-delay", line, text) for scope, line, text in _lab_delays(tree))
reader.found.sort(key=lambda item: item[2])
counts: Dict[Tuple[str, str], int] = {}
out: List[Violation] = []
@@ -684,6 +783,7 @@ DEBT_REASON = {
"net": "A real host in a gate is a third party: serve the page and the answer from the test's own server.",
"count": "The number of processes is not something the product promises: count by site name or against the pool the product keeps (tests/_processes.py, tests/_waits.py).",
"timeout": "A deadline under 30 s on a wait for something that must happen is a verdict on the machine: a loaded runner is slower than the one it was written on. Give it 30 s (or the deadline the product itself has), and read the result after it.",
"lab-delay": "A delay given to a lab gateway or server, and a wait for what the product decides with a time budget, read the wall clock: mark the test wall_clock (the serial lane, the whole machine), or take the delay out of the verdict.",
"egress": "The launch asks three services of the internet where it leaves from: declare the exit (tests/_lab_egress.py).",
}
+197
View File
@@ -0,0 +1,197 @@
"""What an e2e test that fails leaves for a reader, and nothing when it passes.
``with FailureEvidence("name") as evidence:`` around the body of a test: while the body runs, the helper collects, in a temporary folder,
the sources the test points it at (the fake web's own record, the Juggler wire of the served browser, the engine's own Juggler trace,
the client's view of every request); when the body raises (an assertion included), it copies what it holds to
``$RUNNER_TEMP/invpw-evidence/<name>/<pid>-<ms>/``, the folder the e2e jobs upload (``invpw-evidence-*``), with a ``meta.json``; when the
body passes, it deletes it all. Off a runner (no ``RUNNER_TEMP``) nothing is copied. It changes no assertion, wait or deadline of the
test: it only listens.
A test that passed slowly may keep the evidence too: ``evidence.keep(why)`` saves what the helper holds at that moment (the same folder, a
``meta.json`` whose ``kept`` says why, judged after the fact and never a verdict). ``arm(moz_log=...)`` also starts the engine's own log
(``MOZ_LOG``, one file per process in the evidence: ``MOZ_LOG_FILE`` carries ``%PID``), and ``note_records(name, state)`` adds a record the test keeps itself (``state.lock``,
``state.records``) as ``<name>.jsonl``.
The times written: ``t``, wall-clock seconds since the epoch (``time.time()``; the engine's own trace writes milliseconds in ``t``, its
``performance.timeOrigin + now``, also since the epoch), and ``m``, ``time.perf_counter()`` of the test process, finer on Windows (whose wall
clock ticks every 15 ms) and shared by the fake web's record, the client's log and the Juggler wire.
"""
from __future__ import annotations
import json
import os
import pathlib
import platform
import shutil
import sys
import tempfile
import threading
import time
import pytest
#: The folder under ``$RUNNER_TEMP`` the e2e workflows upload (``invpw-evidence-*``).
EVIDENCE_FOLDER = "invpw-evidence"
#: The most characters of one Juggler message kept in the wire log: a message longer than this is cut and says so.
WIRE_LIMIT = 4000
#: The engine's trace: the variable `Trace.js` of the engine reads in the parent process (off without it).
TRACE_ENV = "INVISIBLE_JUGGLER_TRACE_DIR"
#: The base name of the engine's log files in the evidence, and the name given to ``MOZ_LOG_FILE``: Firefox expands ``%PID`` into ``-main.<pid>`` or
#: ``-child.<pid>`` (and adds ``.moz_log``, ``ExpandLogFileName`` in ``xpcom/base/Logging.cpp``), so that every process of every session of a test writes a
#: file of its own. Without it two sessions of one test wrote the same file and the parent's one was 0 bytes.
MOZ_LOG_BASE = "engine"
MOZ_LOG_FILE_NAME = MOZ_LOG_BASE + "%PID"
class FailureEvidence:
def __init__(self, name: str):
self.name = name
self.work = pathlib.Path(tempfile.mkdtemp(prefix="invpw-failure-evidence-"))
self.trace_dir = self.work / "juggler-engine-trace"
self.wire_path = self.work / "juggler-wire.jsonl"
self.moz_log_dir = self.work / "moz-log"
#: The records the test keeps itself, by name (``note_records``).
self.records = {}
#: What the client heard of each request (a list ``profile_p2.drive(client_log=...)`` fills).
self.client_log = []
#: The cells of the run, once it has returned (``note_cells``).
self.cells = None
self._stop = None
self._patch = None
self._wire = None
self._wire_lock = threading.Lock()
self.saved_to = None
# ---- what the test points the helper at ---------------------------------------------------------------------------
def watch_server(self, stop) -> None:
"""The ``stop`` function ``tests/fakeweb/sites.start`` returned: it carries the server's own record (``stop.state``)."""
self._stop = stop
def note_cells(self, cells) -> None:
self.cells = cells
def note_records(self, name: str, state) -> None:
"""A record the test keeps itself (``state.lock``, ``state.records``: a list of dicts), saved as ``<name>.jsonl``."""
self.records[name] = state
def arm(self, moz_log: str = "") -> None:
"""Before the browser under test is launched: the engine writes its trace, and the Juggler wire of this process is logged.
Armed after the other processes of the test were started, so that they do not inherit the variable. ``moz_log``, a value of
``MOZ_LOG`` (modules and levels), also starts the engine's own log into the evidence (a diagnostic no page reads: the core passes it)."""
self.trace_dir.mkdir(parents=True, exist_ok=True)
self._patch = pytest.MonkeyPatch()
self._patch.setenv(TRACE_ENV, str(self.trace_dir))
if moz_log:
self.moz_log_dir.mkdir(parents=True, exist_ok=True)
self._patch.setenv("MOZ_LOG", moz_log)
self._patch.setenv("MOZ_LOG_FILE", str(self.moz_log_dir / MOZ_LOG_FILE_NAME))
self._wire = open(self.wire_path, "w", encoding="utf-8")
try:
from invisible_core.juggler import connection
except Exception as exc: # the trace of the engine is still written; say that the wire is not
self._write_wire({"dir": "note", "what": "the Juggler wire is not logged: %r" % (exc,)})
return
owner = self
original_deliver, original_write = connection.Connection._deliver, connection.Connection._write
def deliver(connection_self, raw):
owner._log_wire("in", raw)
return original_deliver(connection_self, raw)
def write(connection_self, msg):
owner._log_wire("out", msg)
return original_write(connection_self, msg)
self._patch.setattr(connection.Connection, "_deliver", deliver)
self._patch.setattr(connection.Connection, "_write", write)
# ---- the wire ------------------------------------------------------------------------------------------------------
def _write_wire(self, record: dict) -> None:
try:
with self._wire_lock:
if self._wire is not None:
self._wire.write(json.dumps(record, default=str) + "\n")
self._wire.flush()
except Exception:
pass
def _log_wire(self, direction: str, message) -> None:
try:
if isinstance(message, (bytes, bytearray)):
text = bytes(message).decode("utf-8", "replace")
else:
text = json.dumps(message, default=str)
cut = len(text) > WIRE_LIMIT
self._write_wire({"t": round(time.time(), 4), "m": round(time.perf_counter(), 6), "dir": direction, "len": len(text), "cut": cut,
"msg": text[:WIRE_LIMIT]})
except Exception:
pass
# ---- the end ---------------------------------------------------------------------------------------------------------
def keep(self, why: str) -> None:
"""Saves what the helper holds now, though the test has not failed: a run judged after the fact as one to read (a step slower
than any healthy run). Not a verdict: nothing is raised and the test goes on. Never raises."""
try:
self._save(None, None, kept=why)
except Exception as problem:
sys.stderr.write("evidence: could not be kept: %r\n" % (problem,))
def __enter__(self) -> "FailureEvidence":
return self
def __exit__(self, exc_type, exc, tb) -> bool:
try:
if self._patch is not None:
self._patch.undo()
with self._wire_lock:
if self._wire is not None:
self._wire.close()
self._wire = None
if exc_type is not None:
self._save(exc_type, exc)
except Exception as problem: # the evidence never hides the failure it is about
sys.stderr.write("failure evidence: could not be saved: %r\n" % (problem,))
finally:
shutil.rmtree(self.work, ignore_errors=True)
return False
def _save(self, exc_type, exc, kept: str = "") -> None:
base = os.environ.get("RUNNER_TEMP")
if not base:
return
target = pathlib.Path(base) / EVIDENCE_FOLDER / self.name / ("%d-%d" % (os.getpid(), int(time.time() * 1000)))
target.mkdir(parents=True, exist_ok=True)
if self._stop is not None and getattr(self._stop, "state", None) is not None:
state = self._stop.state
with state.lock:
records = list(state.records)
self._jsonl(target / "fakeweb-server-record.jsonl", records)
for name, state in self.records.items():
with state.lock:
records = list(state.records)
self._jsonl(target / ("%s.jsonl" % name), records)
self._jsonl(target / "client-request-log.jsonl", list(self.client_log))
if self.cells is not None:
(target / "cells.json").write_text(json.dumps(self.cells, indent=1, default=str), encoding="utf-8")
if self.wire_path.exists():
shutil.copyfile(self.wire_path, target / "juggler-wire.jsonl")
if self.trace_dir.exists():
shutil.copytree(self.trace_dir, target / "juggler-engine-trace", dirs_exist_ok=True)
if self.moz_log_dir.exists():
shutil.copytree(self.moz_log_dir, target / "moz-log", dirs_exist_ok=True)
meta = {"test": self.name, "platform": sys.platform,
"machine": platform.machine(), "python": platform.python_version(), "saved_at": round(time.time(), 4),
"times": "t: wall-clock seconds since the epoch (the engine's trace: milliseconds, in t); m: time.perf_counter() of the test process, the scale shared by the server record, the client log and the wire",
"files": sorted(p.name for p in target.iterdir())}
if exc_type is not None:
meta["failure"] = "%s: %s" % (exc_type.__name__, str(exc)[:1500])
if kept:
meta["kept"] = kept
(target / "meta.json").write_text(json.dumps(meta, indent=1), encoding="utf-8")
self.saved_to = target
@staticmethod
def _jsonl(path: pathlib.Path, records) -> None:
with open(path, "w", encoding="utf-8") as out:
for record in records:
out.write(json.dumps(record, default=str) + "\n")
+133
View File
@@ -0,0 +1,133 @@
"""``FailureEvidence`` that also keeps a folder of extra files (the engine's own log of the launch, a lab server's record, a page's timeline).
The test writes whatever it wants to keep into ``evidence.files`` while it runs. When the body fails, the folder is copied next to the
rest of the evidence (``<evidence folder>/files/``) and ``meta.json`` lists it; when the body passes, it is deleted with the rest.
Nothing else differs from ``tests/_evidence_on_failure.py``.
"""
from __future__ import annotations
import json
import re
import shutil
import subprocess
import sys
import threading
import time
from _evidence_on_failure import FailureEvidence
class FailureEvidenceWithFiles(FailureEvidence):
def __init__(self, name: str):
super().__init__(name)
#: Under the helper's own temporary folder: removed with it when the body passes.
self.files = self.work / "files"
self.files.mkdir(parents=True, exist_ok=True)
def _save(self, exc_type, exc) -> None:
super()._save(exc_type, exc)
if self.saved_to is None or not self.files.exists():
return
shutil.copytree(self.files, self.saved_to / "files", dirs_exist_ok=True)
meta_path = self.saved_to / "meta.json"
meta = json.loads(meta_path.read_text(encoding="utf-8"))
meta["files"] = sorted(p.name for p in self.saved_to.iterdir())
meta["extra_files"] = sorted(str(p.relative_to(self.files)).replace("\\", "/") for p in self.files.rglob("*") if p.is_file())
meta_path.write_text(json.dumps(meta, indent=1), encoding="utf-8")
class _TeeStream:
"""The browser's merged stdout and stderr as the core reads it, copied line by line to a file: ``<wall clock> <perf_counter> <line>``.
The core reads the pipe with ``readline`` for the whole life of the process (``invisible_core.juggler.connection.ProcessOutput``) and keeps only the last
200 lines, so this sits between the pipe and that reader: every line it returns is also appended to ``path``, nothing else changes. The content processes
inherit the parent's stdout (ipc/chromium/src/base/process_util_win.cc ``GetStdHandle(STD_OUTPUT_HANDLE)``; a plain fork on Linux), so what they
``printf`` arrives here. The file is opened for each line and closed again: the folder it is in can be removed at any moment (a launch that went right)
with nothing left open. It never raises."""
def __init__(self, stream, path):
self._stream = stream
self._path = path
self._lock = threading.Lock()
def readline(self, *args):
raw = self._stream.readline(*args)
if raw and self._path:
try:
with self._lock, open(self._path, "ab") as out:
out.write(("%.4f %.6f " % (time.time(), time.perf_counter())).encode("ascii") + raw.rstrip(b"\r\n") + b"\n")
except Exception:
pass
return raw
def __getattr__(self, name):
return getattr(self._stream, name)
_TEE = {"path": None}
def tee_browser_output(monkeypatch, path) -> bool:
"""From now on, until the end of the test, the stdout of the browser the core launches next is also written to ``path`` (see ``_TeeStream``). Test side
only: it wraps the stream the core hands to its own reader, in the test process, and touches nothing of the product. Called again with another
``path`` it only changes where the next launch's lines go. False (and nothing changed) when the core has no such reader."""
try:
from invisible_core.juggler import connection
output = connection.ProcessOutput
original = output.__init__
except Exception:
return False
_TEE["path"] = str(path)
if getattr(original, "_invpw_tee", False):
return True
def init(self, stream):
original(self, _TeeStream(stream, _TEE["path"]))
init._invpw_tee = True
monkeypatch.setattr(output, "__init__", init)
return True
#: The most a command of the probe is waited for, in seconds (the suite's 30 s: a command that hangs is cut and the file says so).
_PROBE_COMMAND_S = 30
def _run(argv):
started = time.perf_counter()
try:
done = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=_PROBE_COMMAND_S)
text = (done.stdout or "") + (("\n[stderr]\n" + done.stderr) if done.stderr and done.stderr.strip() else "")
return "$ %s\n[exit %s, %.2f s]\n%s\n" % (" ".join(argv), done.returncode, time.perf_counter() - started, text.rstrip())
except Exception as problem:
return "$ %s\n[could not run: %r]\n" % (" ".join(argv), problem)
_SHOW_PROCESSES = (
"foreach ($p in @(%s)) { try { Get-Process -Id $p -ErrorAction Stop | Select-Object Id,ProcessName,StartTime,Path | Format-List } "
"catch { 'pid ' + $p + ': ' + $_.Exception.Message } }")
def probe_machine(path) -> None:
"""Who holds UDP 5353 on this machine, now, written to ``path``: the failure evidence of the mDNS test (the engine's responder binds it, and so does any
other browser of the machine). Windows: ``Get-NetUDPEndpoint -LocalPort 5353`` and ``Get-Process`` of each owning pid. Linux: ``ss -uapn``. Meant to be
called while the browser of the launch is still up. It only reads, never raises and never changes a verdict."""
try:
text = "taken_t %.4f\ntaken_m %.6f\nplatform %s\n\n" % (time.time(), time.perf_counter(), sys.platform)
if sys.platform == "win32":
endpoints = _run(["powershell", "-NoProfile", "-Command",
"Get-NetUDPEndpoint -LocalPort 5353 | Select-Object LocalAddress,LocalPort,OwningProcess,CreationTime | Format-List"])
text += endpoints + "\n"
pids = sorted({int(n) for n in re.findall(r"OwningProcess\s*:\s*(\d+)", endpoints)})
if pids:
text += _run(["powershell", "-NoProfile", "-Command", _SHOW_PROCESSES % ",".join(str(n) for n in pids)])
else:
text += _run(["ss", "-uapn", "sport", "=", ":5353"])
with open(path, "w", encoding="utf-8") as out:
out.write(text)
except Exception as problem:
try:
with open(path, "w", encoding="utf-8") as out:
out.write("the machine probe failed: %r\n" % (problem,))
except Exception:
pass
+58
View File
@@ -0,0 +1,58 @@
"""A stock Playwright client that launches nothing and records what ``p.firefox.launch`` was called with, for the unit tests of the stock twins (no browser, no display)."""
from __future__ import annotations
from typing import Any, Dict, List
import _stock_twin
class _Page:
pass
class _Context:
def new_page(self) -> _Page:
return _Page()
class _Browser:
def __init__(self, events: List[str]) -> None:
self._events = events
def new_context(self, **kwargs: Any) -> _Context:
return _Context()
def close(self) -> None:
self._events.append("browser closed")
class _Firefox:
def __init__(self, launches: List[Dict[str, Any]], events: List[str], fail: bool) -> None:
self._launches, self._events, self._fail = launches, events, fail
def launch(self, **kwargs: Any) -> _Browser:
self._events.append("launch")
self._launches.append(kwargs)
if self._fail:
raise RuntimeError("the launch fails")
return _Browser(self._events)
class _Playwright:
def __init__(self, launches: List[Dict[str, Any]], events: List[str], fail: bool) -> None:
self.firefox = _Firefox(launches, events, fail)
def __enter__(self) -> "_Playwright":
return self
def __exit__(self, *exc: Any) -> bool:
return False
def install(monkeypatch, events: List[str] = None, fail: bool = False) -> List[Dict[str, Any]]:
"""``_stock_twin._on_stock`` on a client that records its launches (the keywords of each) in the list returned, and its steps in ``events``."""
launches: List[Dict[str, Any]] = []
events = [] if events is None else events
monkeypatch.setattr(_stock_twin, "stock_client", lambda: (lambda: _Playwright(launches, events, fail)))
monkeypatch.setattr(_stock_twin, "Chrome", type("FakeChrome", (), {"__init__": lambda self, page: None, "close": lambda self: None}))
return launches
+359
View File
@@ -0,0 +1,359 @@
"""What a failed far-away gather says about the machine and the core's own measurement (the recorders of ``_Watch`` in tests/test_webrtc_realness.py).
The gateway of these tests simulates distance with sleeps and timers inside the process of pytest, which also runs the core's UDP measurement.
When the gather fails the question is where the time went: in the gateway's own answers, in a stall of the whole worker process, or in a
runner with no CPU left. Three recorders answer it, each kept as a list of records the evidence saves (``FailureEvidence.note_records``) and
each said in a few lines of the failure message:
* the times of every control connection of the gateway (connect, greeting, authentication, ASSOCIATE asked and answered), read from the
records the watch already makes, and how long the gateway sat on an answer;
* the records of the core's logger ``invisible_core._udp_exit`` at DEBUG (the outcome of its UDP measurement), set and removed around the test,
next to the marks the test makes (the launch that runs the measurement starts and returns);
* a witness of the whole process (a daemon thread that beats every 50 ms and records the gaps over 200 ms) and the runner's CPU load,
sampled every 0.5 s.
Nothing here changes an assertion, a wait, a deadline or a measurement: a recorder only listens, never raises into the test or into a server,
and takes every record as ONE dict (no keyword that can collide with a field of the data).
"""
from __future__ import annotations
import logging
import threading
import time
#: The logger of the core whose DEBUG records say how its UDP measurement ended (``invisible_core/_udp_exit.py``: ``log = getLogger(__name__)``).
UDP_EXIT_LOGGER = "invisible_core._udp_exit"
#: The beat of the witness and the gap it calls a stall, in seconds.
BEAT_S, STALL_S = 0.05, 0.2
#: How often the runner's load is sampled, in seconds.
LOAD_EVERY_S = 0.5
#: The most control connections and stalls said in the message (the evidence has all of them).
MESSAGE_CONNECTIONS, MESSAGE_STALLS = 3, 4
class Records:
"""A list of records for ``FailureEvidence.note_records`` (``lock``, ``records``). ``add`` never raises: it is called from threads of the test
and, through the watch, from the gateway's own."""
def __init__(self):
self.lock = threading.Lock()
self.records = []
def add(self, record):
try:
record = dict(record)
record.setdefault("t", round(time.time(), 4))
with self.lock:
self.records.append(record)
except Exception as problem: # noqa: BLE001 - recorded, never raised
try:
with self.lock:
self.records.append({"origin": "probe", "event": "a record could not be kept", "error": repr(problem)})
except Exception: # noqa: BLE001
pass
def all(self):
with self.lock:
return list(self.records)
def _say(value):
return "?" if value is None else ("%.2f" % value)
# ---- the witness of the whole process ----------------------------------------------------------------------------------------------
class StallWitness:
"""A daemon thread that beats every ``beat_s`` and keeps the gaps over ``stall_s``. A call that holds the GIL (a long call into C) or a
machine with no CPU left for this process delays the beat of every thread alike, so a gap is a stall of the whole worker process, the one
that also holds the gateway's own threads. Times are seconds from ``epoch`` (``time.monotonic()`` of the start of the gateway: the scale
of its records) and ``t``, the wall clock."""
def __init__(self, records, epoch, beat_s=BEAT_S, stall_s=STALL_S, clock=time.monotonic):
self.records, self.epoch, self.beat_s, self.stall_s, self._clock = records, epoch, beat_s, stall_s, clock
self.beats = 0
self.first = self.last = None
self.longest_gap_s = 0.0
self._stop = threading.Event()
self._thread = None
def beat(self):
"""One beat. Never raises: a clock that fails is a record."""
try:
now = self._clock()
if self.last is None:
self.first = now
else:
gap = now - self.last
self.longest_gap_s = max(self.longest_gap_s, gap)
if gap > self.stall_s:
self.records.add({"origin": "witness", "event": "stall", "from_gw": round(self.last - self.epoch, 4),
"to_gw": round(now - self.epoch, 4), "gap_s": round(gap, 4)})
self.last = now
self.beats += 1
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "witness", "event": "a beat could not be made", "error": repr(problem)})
def _run(self):
try:
while not self._stop.wait(self.beat_s):
self.beat()
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "witness", "event": "the witness ended", "error": repr(problem)})
def start(self):
try:
self.beat()
self._thread = threading.Thread(target=self._run, name="far-away-stall-witness", daemon=True)
self._thread.start()
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "witness", "event": "the witness did not start", "error": repr(problem)})
def stop(self):
"""Ends the witness and says what it saw: the last gap (from its last beat to now) is a stall too if it is long."""
try:
self._stop.set()
if self._thread is not None:
self._thread.join(5)
self.beat()
self.records.add({"origin": "witness", "event": "the witness stopped", "beats": self.beats, "beat_s": self.beat_s,
"stall_s": self.stall_s, "longest_gap_s": round(self.longest_gap_s, 4),
"watched_s": None if self.first is None or self.last is None else round(self.last - self.first, 4)})
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "witness", "event": "the witness did not stop cleanly", "error": repr(problem)})
def stalls(self):
return [r for r in self.records.all() if r.get("event") == "stall"]
# ---- the load of the runner -------------------------------------------------------------------------------------------------------
class LoadSampler:
"""The runner's CPU load every ``every_s`` seconds: ``cpu_percent(percpu=False)`` since the previous sample and, where the system has it,
the load average. ``source`` is ``psutil`` (a stand-in in the unit tests)."""
def __init__(self, records, epoch, every_s=LOAD_EVERY_S, source=None, clock=time.monotonic):
self.records, self.epoch, self.every_s, self._clock = records, epoch, every_s, clock
self.source = source
self._stop = threading.Event()
self._thread = None
def sample(self):
"""One sample. Never raises: a source that fails is a record."""
try:
record = {"origin": "load", "event": "sample", "gw": round(self._clock() - self.epoch, 4)}
record["cpu_percent"] = self.source.cpu_percent(percpu=False)
if hasattr(self.source, "getloadavg"):
try:
record["loadavg_1_5_15"] = [round(v, 2) for v in self.source.getloadavg()]
except Exception as problem: # noqa: BLE001
record["loadavg_error"] = repr(problem)
self.records.add(record)
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "load", "event": "a sample could not be taken", "error": repr(problem)})
def _run(self):
try:
while not self._stop.wait(self.every_s):
self.sample()
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "load", "event": "the sampler ended", "error": repr(problem)})
def start(self):
try:
if self.source is None:
import psutil
self.source = psutil
self.source.cpu_percent(percpu=False) # the first reading has no window: it is only the start of the first one
if hasattr(self.source, "getloadavg"):
self.source.getloadavg() # on Windows the first call starts the thread that makes the average
self._thread = threading.Thread(target=self._run, name="far-away-load-sampler", daemon=True)
self._thread.start()
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "load", "event": "the sampler did not start", "error": repr(problem)})
def stop(self):
try:
self._stop.set()
if self._thread is not None:
self._thread.join(5)
self.sample()
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "load", "event": "the sampler did not stop cleanly", "error": repr(problem)})
def samples(self):
return [r for r in self.records.all() if r.get("event") == "sample" and isinstance(r.get("cpu_percent"), (int, float))]
# ---- the core's logger ------------------------------------------------------------------------------------------------------------
class _KeepRecords(logging.Handler):
def __init__(self, records, epoch, clock):
super().__init__(level=logging.DEBUG)
self.records, self.epoch, self._clock = records, epoch, clock
def emit(self, record):
try:
self.records.add({"origin": "core", "event": "log", "logger": record.name, "level": record.levelname,
"message": record.getMessage(), "thread": record.threadName, "gw": round(self._clock() - self.epoch, 4)})
except Exception as problem: # noqa: BLE001 - a message that cannot be formatted is a record, not an error of the core's thread
try:
self.records.add({"origin": "probe", "event": "a log record could not be kept", "logger": getattr(record, "name", None),
"error": repr(problem)})
except Exception: # noqa: BLE001 - not even that: nothing is raised into the logging call of the core
pass
class LogCapture:
"""The records of the logger ``name`` at DEBUG while it is on: its level is set and the handler added at ``start``, and both are put back at
``stop`` whatever happened in between. The logger keeps passing every record on to its parents as before."""
def __init__(self, records, epoch, name=UDP_EXIT_LOGGER, clock=time.monotonic):
self.records, self.name = records, name
self._handler = _KeepRecords(records, epoch, clock)
self._level = None
self._on = False
def start(self):
try:
logger = logging.getLogger(self.name)
self._level = logger.level
logger.addHandler(self._handler)
self._on = True
logger.setLevel(logging.DEBUG)
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "probe", "event": "the log capture did not start", "error": repr(problem)})
def stop(self):
try:
if self._on:
logger = logging.getLogger(self.name)
logger.removeHandler(self._handler)
logger.setLevel(self._level)
self._on = False
except Exception as problem: # noqa: BLE001
self.records.add({"origin": "probe", "event": "the log capture did not stop", "error": repr(problem)})
# ---- the times of the control connections ----------------------------------------------------------------------------------------
def control_times(records):
"""From the records of the watch's control journal (``gateway-control-connections``): for each control connection, in seconds from the start
of the gateway, when it was accepted (connect), when the greeting and the authentication were answered, when the ASSOCIATE was asked and
answered, and the longest time the gateway sat on an answer between the moment it was asked to send it and the moment it was sent.
``None`` is a step that was not seen. Never raises."""
table = {}
try:
for r in records:
conn = r.get("conn")
if conn is None or conn < 0:
continue
row = table.setdefault(conn, {"connect": None, "greeting": None, "authentication": None, "associate_asked": None,
"associate_answered": None, "longest_answer_wait_s": None})
event = r.get("event")
if event == "control connection accepted":
row["connect"] = r.get("gw")
elif event == "request" and r.get("command") == "UDP ASSOCIATE":
row["associate_asked"] = r.get("gw")
elif event == "answer sent":
what = str(r.get("what", ""))
if what.startswith("method selection"):
row["greeting"] = r.get("gw")
elif what.startswith("authentication status"):
row["authentication"] = r.get("gw")
elif r.get("kind") == "associate" and r.get("rep") == 0:
row["associate_answered"] = r.get("gw")
if r.get("gw") is not None and r.get("asked_gw") is not None:
wait = round(r["gw"] - r["asked_gw"], 4)
if row["longest_answer_wait_s"] is None or wait > row["longest_answer_wait_s"]:
row["longest_answer_wait_s"] = wait
except Exception as problem: # noqa: BLE001
table["error"] = repr(problem)
return table
def control_line(table):
"""The control connections in one line: ``#<n> connect|greeting|authentication|ASSOCIATE asked|ASSOCIATE answered`` in seconds from the start of
the gateway, the longest wait inside the gateway for an answer, and a reminder that #0 is the core's (the first accepted)."""
try:
rows = sorted((k, v) for k, v in table.items() if isinstance(k, int))
if not rows:
return "control connections of the gateway: none seen"
shown = " ".join("#%d %s|%s|%s|%s|%s (longest wait in the gateway %ss)" % (
k, _say(v["connect"]), _say(v["greeting"]), _say(v["authentication"]), _say(v["associate_asked"]), _say(v["associate_answered"]),
_say(v["longest_answer_wait_s"])) for k, v in rows[:MESSAGE_CONNECTIONS])
return ("control connections of the gateway, s from its start, connect|greeting answered|authentication answered|ASSOCIATE asked|"
"ASSOCIATE answered (#0 is the first accepted: the core's own measurement), %d of %d: %s" % (min(len(rows), MESSAGE_CONNECTIONS), len(rows), shown))
except Exception as problem: # noqa: BLE001
return "control connections of the gateway: not read (%r)" % (problem,)
def core_line(records):
"""The core's UDP measurement in one line: its DEBUG records and the marks of the test, each with its time in seconds from the start of the gateway."""
try:
parts = []
for r in records:
if r.get("event") == "log":
parts.append("%s: %r at %s" % (r.get("thread"), r.get("message"), _say(r.get("gw"))))
elif r.get("event") == "mark":
parts.append("%s at %s" % (r.get("what"), _say(r.get("gw"))))
return "the core's UDP measurement (logger %s, s from the gateway start): %s" % (UDP_EXIT_LOGGER, "; ".join(parts) or "no record")
except Exception as problem: # noqa: BLE001
return "the core's UDP measurement: not read (%r)" % (problem,)
def process_line(witness, sampler):
"""The stalls of the process and the runner's load in one line each."""
try:
stalls = sorted(witness.stalls(), key=lambda s: -s["gap_s"])
samples = sampler.samples() if sampler is not None else []
if stalls:
said = ", ".join("%.2fs (%.2f to %.2f)" % (s["gap_s"], s["from_gw"], s["to_gw"]) for s in stalls[:MESSAGE_STALLS])
stall = "%d stall(s) of the whole process over %.0f ms, longest first, gap (from to, s from the gateway start): %s" % (
len(stalls), witness.stall_s * 1000, said)
else:
stall = "no stall of the whole process over %.0f ms in %d beats of %.0f ms (longest gap %.3fs)" % (
witness.stall_s * 1000, witness.beats, witness.beat_s * 1000, witness.longest_gap_s)
if samples:
cpu = [s["cpu_percent"] for s in samples]
loads = [s["loadavg_1_5_15"][0] for s in samples if s.get("loadavg_1_5_15")]
load = "runner CPU every %.1fs: %d samples, max %.0f%%, mean %.0f%%, at least 90%% in %d%s" % (
sampler.every_s, len(cpu), max(cpu), sum(cpu) / len(cpu), sum(1 for c in cpu if c >= 90),
"; load average max %.2f" % max(loads) if loads else "")
else:
load = "runner CPU: no sample"
return stall + "\n" + load
except Exception as problem: # noqa: BLE001
return "stall witness and runner load: not read (%r)" % (problem,)
class FarAwayProbes:
"""The three recorders of one gather, started and stopped together. ``epoch`` is ``time.monotonic()`` at the start of the gateway."""
def __init__(self, epoch, load_source=None):
self.epoch = epoch
self.stall_records, self.load_records, self.core_records = Records(), Records(), Records()
self.witness = StallWitness(self.stall_records, epoch)
self.sampler = LoadSampler(self.load_records, epoch, source=load_source)
self.core = LogCapture(self.core_records, epoch)
def start(self):
self.core.start()
self.sampler.start()
self.witness.start()
def stop(self):
self.witness.stop()
self.sampler.stop()
self.core.stop()
def mark(self, what):
"""A moment of the test (the launch that runs the core's measurement starts, returns), on the scale of the core's records."""
self.core_records.add({"origin": "test", "event": "mark", "what": what, "gw": round(time.monotonic() - self.epoch, 4)})
def lines(self, control_records):
"""The failure message: the times of the control connections, the core's measurement, the stalls and the load."""
return "\n".join(["far-away probes:", control_line(control_times(control_records)), core_line(self.core_records.all()),
process_line(self.witness, self.sampler)])
def cells(self, control_records):
return {"control_connection_times_s_from_the_gateway_start": control_times(control_records),
"stalls_of_the_whole_process": self.witness.stalls(), "stall_beats": self.witness.beats,
"longest_gap_between_beats_s": round(self.witness.longest_gap_s, 4),
"runner_load_samples": self.sampler.samples(), "core_udp_exit_log_and_marks": self.core_records.all()}
+244
View File
@@ -0,0 +1,244 @@
"""What the e2e tests of the font list need to know about the bundle and about the host, read from files and never typed.
Two sources, both plain data:
* the bundle manifest the core hands to the engine (``invisible_core._fpforge.profile.FONT_MANIFEST``, the text of
``bundle-fonts.list``: ``F|<family>`` opens a family, ``f|<file>|<index>|...|<psname>|<upem>|<ascent>|<descent>|...`` is one of its faces,
``A|<alias>|<target>`` is a Windows font-substitute). The engine prefers this text to the copy in its own directory, so it is the list of
the families the engine answers to;
* the font files of the machine that runs the test (the host): the folders a system installs fonts in. Each file's ``name`` table gives the
family, PostScript and full names of each of its faces. A host font whose names are not in the bundle is a "host-only" face: the engine
must not know it, and a test that asks the page for it has a name that exists on this machine and in no bundle.
Only the header and the ``name`` table of a file are read (a font collection is several faces; ``simsun.ttc`` is 15 MB).
"""
from __future__ import annotations
import os
import struct
import sys
from pathlib import Path
from typing import Dict, Iterable, List, Optional, Set
#: What an sfnt file starts with: TrueType 1.0, OpenType with CFF outlines, the Apple TrueType tag, a collection.
_SFNT = (b"\x00\x01\x00\x00", b"OTTO", b"true")
_COLLECTION = b"ttcf"
_EXTENSIONS = {".ttf", ".otf", ".ttc", ".otc"}
#: name ids of the strings that name a face.
FAMILY, FULL, POSTSCRIPT, TYPOGRAPHIC_FAMILY = 1, 4, 6, 16
class Manifest:
"""The bundle manifest, parsed: families in order, the faces of each (file, index, PostScript name, metrics) and the aliases."""
def __init__(self, text: str):
self.families: List[str] = []
self.faces: Dict[str, List[dict]] = {}
self.aliases: Dict[str, str] = {}
current: Optional[str] = None
for line in text.splitlines():
if not line or line.startswith("#"):
continue
fields = line.split("|")
if fields[0] == "F" and len(fields) >= 2:
current = fields[1]
self.families.append(current)
self.faces[current] = []
elif fields[0] == "A" and len(fields) >= 3:
self.aliases[fields[1]] = fields[2]
elif fields[0] == "f" and current is not None and len(fields) >= 19:
self.faces[current].append({
"file": fields[1], "index": int(fields[2]), "psname": fields[8],
"upem": int(fields[9]), "ascent": int(fields[10]), "descent": int(fields[11]),
})
def family_of_psname(self, psname: str) -> Optional[str]:
for family, faces in self.faces.items():
if any(face["psname"] == psname for face in faces):
return family
return None
def face_with_psname(self, psname: str) -> dict:
for faces in self.faces.values():
for face in faces:
if face["psname"] == psname:
return face
raise AssertionError("the bundle manifest has no face with the PostScript name %r" % psname)
def known_names(self) -> Set[str]:
"""Every name the bundle answers to, lower case: its families, its aliases and the PostScript names of its faces."""
names = {family.lower() for family in self.families}
names |= {alias.lower() for alias in self.aliases}
names |= {face["psname"].lower() for faces in self.faces.values() for face in faces}
return names
def bundle_manifest() -> Manifest:
"""The manifest of the core installed with the wrapper under test, the one the engine is handed as ``zoom.stealth.fonts.manifest``."""
from invisible_core._fpforge.profile import FONT_MANIFEST
manifest = Manifest(FONT_MANIFEST)
assert manifest.families, "the manifest of the core has no family: the parser read nothing"
return manifest
def _decode(platform: int, encoding: int, raw: bytes) -> Optional[str]:
try:
if platform in (0, 3):
return raw.decode("utf-16-be")
if platform == 1 and encoding == 0:
return raw.decode("mac_roman")
except UnicodeDecodeError:
return None
return None
def _name_strings(table: bytes) -> Dict[int, List[tuple]]:
"""name id -> [(is english windows name, text)] of one ``name`` table."""
out: Dict[int, List[tuple]] = {}
if len(table) < 6:
return out
_format, count, string_offset = struct.unpack(">HHH", table[:6])
for i in range(count):
record = table[6 + 12 * i: 18 + 12 * i]
if len(record) < 12:
break
platform, encoding, language, name_id, length, offset = struct.unpack(">6H", record)
text = _decode(platform, encoding, table[string_offset + offset: string_offset + offset + length])
if text:
out.setdefault(name_id, []).append((platform == 3 and language == 0x409, text))
return out
def face_names(path: Path) -> List[dict]:
"""For each face of a font file: ``family`` (every family string, any language), ``psname`` and ``full`` (the English ones, or None).
An unreadable file, or a file that is not an sfnt, has no faces: a host folder holds other things than fonts."""
faces: List[dict] = []
try:
with open(path, "rb") as handle:
head = handle.read(12)
if len(head) < 12:
return faces
if head[:4] == _COLLECTION:
count = struct.unpack(">I", head[8:12])[0]
if count > 64:
return faces
offsets = struct.unpack(">%dI" % count, handle.read(4 * count))
elif head[:4] in _SFNT:
offsets = (0,)
else:
return faces
for base in offsets:
handle.seek(base + 4)
tables = struct.unpack(">H", handle.read(2))[0]
handle.seek(base + 12)
directory = handle.read(16 * tables)
name_table = None
for i in range(tables):
tag, _checksum, offset, length = struct.unpack(">4sIII", directory[16 * i: 16 * i + 16])
if tag == b"name" and 0 < length <= 1 << 20:
handle.seek(offset)
name_table = handle.read(length)
break
if name_table is None:
continue
strings = _name_strings(name_table)
def english(name_id: int) -> Optional[str]:
for is_english, text in strings.get(name_id, []):
if is_english:
return text
return None
families = []
for name_id in (FAMILY, TYPOGRAPHIC_FAMILY):
for _english, text in strings.get(name_id, []):
if text not in families:
families.append(text)
faces.append({"file": str(path), "families": families, "psname": english(POSTSCRIPT), "full": english(FULL)})
except (OSError, struct.error):
return []
return faces
def host_font_files() -> List[Path]:
"""The font files the host has installed, in a stable order."""
if sys.platform == "win32":
roots = [Path(os.environ.get("WINDIR", r"C:\Windows")) / "Fonts"]
local = os.environ.get("LOCALAPPDATA")
if local:
roots.append(Path(local) / "Microsoft" / "Windows" / "Fonts")
else:
roots = [Path("/usr/share/fonts"), Path("/usr/local/share/fonts"), Path.home() / ".fonts",
Path.home() / ".local" / "share" / "fonts"]
files: List[Path] = []
for root in roots:
if root.is_dir():
files += [p for p in root.rglob("*") if p.suffix.lower() in _EXTENSIONS and p.is_file()]
return sorted(files, key=lambda p: str(p).lower())
def _plain(name: Optional[str]) -> bool:
"""A name that goes into a CSS string between double quotes without an escape: printable ASCII, no quote, no backslash."""
return bool(name) and all(32 <= ord(ch) < 127 and ch not in "\"\\" for ch in name)
def bundle_file_names(manifest: Manifest, binary: str) -> Set[str]:
"""Every name (families of any language, PostScript, full), lower case, that the files of the bundle carry in their own ``name`` tables.
The engine answers to the other-language family names of a bundled face as it does to its family (a localized name is an alias of the
face it names), so a host font that carries such a name is not host-only. The folder is ``<engine>/fonts``; when the build has no such
folder the set is empty and the manifest alone decides."""
folder = Path(binary).resolve().parent / "fonts"
names: Set[str] = set()
if not folder.is_dir():
return names
for name in sorted({face["file"] for faces in manifest.faces.values() for face in faces}):
for face in face_names(folder / name):
names |= {family.lower() for family in face["families"]}
names |= {value.lower() for value in (face["psname"], face["full"]) if value}
return names
def host_only_faces(manifest: Manifest, extra_known: Iterable[str] = ()) -> List[dict]:
"""The faces of the host whose names the bundle does not know: no family, no alias and no PostScript name of the bundle."""
known = manifest.known_names() | set(extra_known)
out: List[dict] = []
for path in host_font_files():
for face in face_names(path):
names = [name.lower() for name in face["families"]]
if face["psname"]:
names.append(face["psname"].lower())
if names and not any(name in known for name in names):
out.append(face)
return out
def host_only_families(manifest: Manifest, extra_known: Iterable[str] = ()) -> List[str]:
"""The family names (every language) of the host-only faces, once each, in the order of the files."""
extra_known = set(extra_known)
known = manifest.known_names() | extra_known
seen: Set[str] = set()
out: List[str] = []
for face in host_only_faces(manifest, extra_known):
for family in face["families"]:
key = family.lower()
if key not in seen and key not in known and _plain(family):
seen.add(key)
out.append(family)
return out
def a_host_only_face(manifest: Manifest, prefer: Iterable[str] = (), extra_known: Iterable[str] = ()) -> dict:
"""One host-only face with a PostScript name and a full name a page can write: the first of the ``prefer`` families the host has, else the first.
The face is what a ``src: local()`` is given: its names exist on this machine (the file is on its disk) and in no bundle."""
faces = [f for f in host_only_faces(manifest, extra_known) if _plain(f["psname"]) and _plain(f["full"])]
assert faces, "the host has no font whose names are not the bundle's: there is nothing to ask the engine for that only the host knows"
for wanted in prefer:
for face in faces:
if wanted.lower() in (family.lower() for family in face["families"]):
return face
return faces[0]
Loaded 100 of 454 files, more files were not shown because too many files have changed in this diff. Show more