Compare commits

...
9 changed files with 1156 additions and 43 deletions

No files matched your search

+240
View File
@@ -744,6 +744,246 @@
"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-seed0-relaunch.surface.systemColors.Highlight",
"os": "linux",
"seed": 0,
"dpr": 1.0,
"leaf": "relaunch.surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed0-relaunch.surface.systemColors.SelectedItem",
"os": "linux",
"seed": 0,
"dpr": 1.0,
"leaf": "relaunch.surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed0-surface.systemColors.Highlight",
"os": "linux",
"seed": 0,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed0-surface.systemColors.SelectedItem",
"os": "linux",
"seed": 0,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed2-surface.systemColors.Highlight",
"os": "linux",
"seed": 2,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed2-surface.systemColors.SelectedItem",
"os": "linux",
"seed": 2,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed4-surface.systemColors.Highlight",
"os": "linux",
"seed": 4,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed4-surface.systemColors.SelectedItem",
"os": "linux",
"seed": 4,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed6-surface.systemColors.Highlight",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed6-surface.systemColors.SelectedItem",
"os": "linux",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed63-surface.systemColors.Highlight",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "linux-seed63-surface.systemColors.SelectedItem",
"os": "linux",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed0-relaunch.surface.systemColors.Highlight",
"os": "windows",
"seed": 0,
"dpr": 1.0,
"leaf": "relaunch.surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed0-relaunch.surface.systemColors.SelectedItem",
"os": "windows",
"seed": 0,
"dpr": 1.0,
"leaf": "relaunch.surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed0-surface.systemColors.Highlight",
"os": "windows",
"seed": 0,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed0-surface.systemColors.SelectedItem",
"os": "windows",
"seed": 0,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed2-surface.systemColors.Highlight",
"os": "windows",
"seed": 2,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed2-surface.systemColors.SelectedItem",
"os": "windows",
"seed": 2,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed4-surface.systemColors.Highlight",
"os": "windows",
"seed": 4,
"dpr": 1.0,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed4-surface.systemColors.SelectedItem",
"os": "windows",
"seed": 4,
"dpr": 1.0,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed6-surface.systemColors.Highlight",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed6-surface.systemColors.SelectedItem",
"os": "windows",
"seed": 6,
"dpr": 1.25,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed63-surface.systemColors.Highlight",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.systemColors.Highlight",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
},
{
"id": "windows-seed63-surface.systemColors.SelectedItem",
"os": "windows",
"seed": 63,
"dpr": 1.5,
"leaf": "surface.systemColors.SelectedItem",
"published": "rgb(0, 120, 215)",
"candidate": "rgb(0, 120, 212)",
"reason": "Windows 11 24H2/25H2 GetSysColor(COLOR_HIGHLIGHT) is #0078D4 (nsLookAndFeel.cpp:188); retail Firefox 159 reads rgb(0, 120, 212) on build 26100 (RetailCaptures captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01, xul.dll fec21f3e…) and on client build 26200 (captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02, run 46828919060, xul.dll 204f37aa…); core #376 declared it; only build 20348 reads 215"
}
]
}
+2 -2
View File
@@ -18,8 +18,8 @@
{"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": 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.unit.all.linux", "giro": "G1", "os": ["linux"], "min_tests": 4626, "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": 4638, "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
+98 -19
View File
@@ -97,6 +97,10 @@ there and removed after the run): the browser's processes read the link of every
Declared differences (ci/ab-host-expected.json) are applied to the A/B only, never to the A/A, by kind, and one that does not show is red as stale. A declared `proc` difference covers the
process kind and the file leaves whose only toucher on the published side is that kind (a leaf another process touched too is still a difference).
A row declares its direction, `published` and `candidate` (`present` or `absent`; default published present, candidate absent), and a row of the other direction (the published engine
does not have it, the candidate does: `proc.gpu` of the real window) covers the process kind alone. A `file` row covers the leaf `file.<path>` of its `name`, the path with the staged
engine folder as `<engine>` and the profile folder of the user as `<profile>` (`normalise_leaf`, with the `user_root` the footprint recorded), in that direction and no other. A row of either kind that does not show is stale.
The candidate is launched from a venv of its own made like the published set's (`candidate_python`, `ci_published_set.install_candidate`), not from the python of the job.
Evidence of the tree (Windows): every launch (the warm-up, each seed, the idle launch and the stock control) saves the raw events of the audit that its tree was read from, the 4688 births
and the 4689 ends, the excluded ones as well, in `<footprint>.audit/<launch>-<seed>.json` (`audit_listing`: record id, event, pid, creator's pid, image, `ParentProcessName`, time, command
@@ -129,6 +133,7 @@ ROOT = HERE.parent
sys.path.insert(0, str(HERE))
sys.path.insert(0, str(ROOT / "tests"))
import ci_ab_oracle as oracle # noqa: E402 (fetch_published, ENGINE_TAG)
import ci_published_set as published_set # noqa: E402 (install_candidate: the candidate's venv)
import ci_host_gate as gate # noqa: E402 (SEEDS)
import ci_crash_evidence as crash # noqa: E402 (the exit code is red, and what a bad end left is saved)
from ci_crash_evidence import CrashWatcher, crash_report_dirs # noqa: E402 (the collectors every launch shares)
@@ -1688,20 +1693,61 @@ def load_expected(path: Path = EXPECTED_FILE) -> list:
return document["differences"]
def _declared_covers(entry: dict, diff: dict, probe_seeds=()) -> bool:
"""A declared difference covers, by kind (a `proc` entry, the name of the process):
#: A declared `file` row names a path by what the run does not choose: the folder the engine is staged in is `<engine>` (the parent of its package, `STAGE_ENGINE`: the loader of
#: Windows asks for `<engine>\systemresources\<exe>.mun` there), and the profile folder of the user that ran it is `<profile>`.
ENGINE_PLACEHOLDER = "<engine>"
PROFILE_PLACEHOLDER = "<profile>"
_STAGE_ROOT = re.compile(r"^.*?\\ab-host\\engine(?=\\|$)", re.I)
* the leaf `proc.<name>` that is the published engine having it (count >= 1) and the candidate not having it;
* a file leaf of a seed in `probe_seeds` (the seeds where that leaf above differs) that only the published engine has and whose ONLY toucher on that side is that kind:
what a process the candidate no longer spawns alone touched goes with it. A leaf another process touched too stays a difference, and so does a leaf the
candidate touches or one the candidate alone has."""
def profile_root_of_this_machine() -> str:
"""The folder that holds the profile folders of the machine this runs on (the parent of the home folder), lower case, as a footprint spells a path: what a recorder puts in its
document as `user_root`, read from the environment of the run and typed nowhere."""
return os.path.dirname(os.path.expanduser("~")).replace("/", "\\").rstrip("\\").lower()
def normalise_leaf(path: str, user_root: str | None = None) -> str:
r"""`path` (a host path as a footprint spells it, without the `file.` of the leaf) with the staged engine folder replaced by `<engine>` and, given `user_root` (the folder that holds
the profile folders, as the recording run said it: the `user_root` of its footprint), the profile folder under it by `<profile>`:
`d:\a\_temp\ab-host\engine\systemresources\firefox.exe.mun` is `<engine>\systemresources\firefox.exe.mun`; with the root `x:\home-root`, `x:\home-root\someone\appdata\f` is
`<profile>\appdata\f`. Any other path is itself, with `\` for `/`."""
text = _STAGE_ROOT.sub(ENGINE_PLACEHOLDER, path.replace("/", "\\"), count=1)
root = (user_root or "").replace("/", "\\").rstrip("\\").lower()
if root and text.lower().startswith(root + "\\"):
_name, sep, tail = text[len(root) + 1:].partition("\\")
return PROFILE_PLACEHOLDER + sep + tail
return text
def _state(value) -> str:
return "absent" if value == MISSING or not value else "present"
def _declared_covers(entry: dict, diff: dict, probe_seeds=(), user_root: str | None = None) -> bool:
"""A declared difference covers, by kind. Its direction is `published` and `candidate` (each `present` or `absent`; the default is the first row's, published present and
candidate absent).
`proc` (the name of the process):
* published present, candidate absent: the leaf `proc.<name>` that is the published engine having it (count >= 1) and the candidate not having it, and the file leaves of a
seed in `probe_seeds` (the seeds where that leaf differs) that only the published engine has and whose ONLY toucher on that side is that kind: what a process the candidate
no longer spawns alone touched goes with it. A leaf another process touched too stays a difference, and so does a leaf the candidate touches or one the candidate alone has;
* published absent, candidate present: the leaf `proc.<name>` alone (the paths the process touched are rows of their own).
`file` (`name` is the path, normalised by `normalise_leaf`): the leaf `file.<path>` of any seed whose normalised path is `name` and whose two sides are the row's `published` and
`candidate`. Nothing else: not another path, not the same path with the sides the other way round."""
direction = (entry.get("published", "present"), entry.get("candidate", "absent"))
published, candidate = diff["a"], diff["b"]
if entry.get("category") == "file":
return (diff["category"] == "file" and diff["leaf"].startswith("file.") and normalise_leaf(diff["leaf"][len("file."):], user_root) == entry.get("name")
and published != candidate and (_state(published), _state(candidate)) == direction)
if entry.get("category") != "proc":
return False
published, candidate = diff["a"], diff["b"]
if diff["leaf"] == "proc." + entry["name"]:
return (published != MISSING and published >= 1) and candidate == MISSING
if direction == ("absent", "present"):
return published == MISSING and candidate != MISSING and candidate >= 1
return direction == ("present", "absent") and (published != MISSING and published >= 1) and candidate == MISSING
by = diff.get("by") or {}
return (diff["category"] == "file" and diff["seed"] in probe_seeds and published != MISSING and candidate == MISSING
return (direction == ("present", "absent") and diff["category"] == "file" and diff["seed"] in probe_seeds and published != MISSING and candidate == MISSING
and by.get("A") == [entry["name"]] and not by.get("B"))
@@ -1875,13 +1921,15 @@ def judge(a: dict, b: dict, expected: list | None = None, a_a: bool = False, pla
if x != y:
problems.append("warm-up: the pingsender destinations differ: A only %s | B only %s" % (sorted(set(x) - set(y))[:5], sorted(set(y) - set(x))[:5]))
stale = []
user_root = a.get("user_root") or b.get("user_root")
if not a_a:
for entry in expected or []:
if entry.get("os") != os_name:
continue
probe_seeds = {d["seed"] for d in differences if d["leaf"] == "proc." + entry.get("name", "") and _declared_covers(entry, d)}
hit = [d for d in differences if _declared_covers(entry, d, probe_seeds)]
if not any(d["leaf"] == "proc." + entry.get("name", "") for d in hit):
probe_seeds = {d["seed"] for d in differences if d["leaf"] == "proc." + entry.get("name", "") and _declared_covers(entry, d, (), user_root)}
hit = [d for d in differences if _declared_covers(entry, d, probe_seeds, user_root)]
shows = bool(hit) if entry.get("category") == "file" else any(d["leaf"] == "proc." + entry.get("name", "") for d in hit)
if not shows:
stale.append(entry)
problems.append("the declared difference %r (%s) does not show in this run: it is stale, remove it"
% (entry.get("id", entry.get("name")), entry.get("reason", "")))
@@ -1910,7 +1958,7 @@ def judge(a: dict, b: dict, expected: list | None = None, a_a: bool = False, pla
"differences": differences, "declared": declared, "ours": OURS, "tab": {"reason": TAB_REASON, "counts": tab},
"outside_tree": outside, "warmup": dict(warm, both=both), "idle": {side: _idle_summary(fp.get("idle")) for side, fp in (("A", a), ("B", b))}, "not_judged": not_judged,
"shortcuts": {side: _shortcuts_summary(((fp.get("idle") or {}).get("idle") or {}).get("shortcut_changes")) for side, fp in (("A", a), ("B", b))},
"stale": [e.get("id") for e in stale], "leaves": counts, "net": net}
"stale": [e.get("id") for e in stale], "leaves": counts, "net": net, "user_root": user_root}
def _launch_counts(counts: dict) -> str:
@@ -2570,7 +2618,7 @@ def run_engine(binary: str, leg: str, seeds: list, label: str, crash_dir=None, d
sys.stdout.flush()
finally:
shutil.rmtree(work, ignore_errors=True)
return {"format": FORMAT, "engine": label, "leg": leg, "platform": sys.platform, "seeds": out_seeds, "warmup": warm, "idle": idle, "problems": problems,
return {"format": FORMAT, "engine": label, "leg": leg, "platform": sys.platform, "seeds": out_seeds, "warmup": warm, "idle": idle, "problems": problems, "user_root": profile_root_of_this_machine(),
"binary": os.path.basename(os.path.dirname(os.path.realpath(binary)))}
@@ -2719,13 +2767,15 @@ def staged_engine(binary: str, base=None):
shutil.rmtree(dest, ignore_errors=True)
def run_subprocess(binary: str, seal: Path | None, leg: str, out: Path, label: str, seeds: list, crash_with: str | None = None, python: str | None = None) -> int:
def run_subprocess(binary: str, seal: Path | None, leg: str, out: Path, label: str, seeds: list, crash_with: str | None = None, python: str | None = None,
pin_allow: bool = False) -> int:
"""`run` in a process of its own, with a cache folder and a temp root of its own: they are the run's, so what the engine does in them is `ours`
(the cache of the bundle's fonts, the profile and the temp dirs of the launch) and the rest of the machine is the host's.
`crash_with` (a signal name) makes the run the recorder's own test: one launch, whose parent is sent that signal (`crash-probe`). `python` is the published set's
(scripts/ci_published_set.py): the control side runs in the venv that holds the published core and wrapper, never in the candidate's."""
env = oracle.process_env(seal, python)
(scripts/ci_published_set.py): the control side runs in the venv that holds the published core and wrapper, never in the candidate's; the candidate runs in a venv of its own,
made the same way (`candidate_python`, `pin_allow`)."""
env = oracle.process_env(seal, python, pin_allow)
cmd = [python or sys.executable, "-u", str(Path(__file__).resolve()), "run", binary, "--leg", leg, "--out", str(out), "--label", label,
"--seeds", ",".join(str(s) for s in seeds)]
if crash_with:
@@ -2847,6 +2897,34 @@ def run_stock_control(leg: str, out: Path) -> dict | None:
return stock
WHEELHOUSE_ENV = "INVPW_WHEELHOUSE"
#: The folder of the candidate's venv, beside the published set's (`$RUNNER_TEMP/published-set`): directly under the temp root of the job, with a name of its own that does not change from
#: run to run. The engine's processes read the ancestors of the install folder of the core they run with, so a venv under a folder with a random name would be a path of one side only.
CANDIDATE_VENV = "candidate-set"
def candidate_python(environ=None, install=None) -> str | None:
"""The python of a venv of the candidate's own, made like the published set's (`ci_published_set.install_candidate`: the run's wheelhouse, offline, the candidate's two wheels over the
gate's lock): the two sides of the A/B are launched from the same kind of python, so a read of the host that comes from the python (its library, the folders it loads from) is on both
sides or on neither. The wheelhouse is INVPW_WHEELHOUSE, else `$RUNNER_TEMP/py-deps` (the gate's). None, said on the output, when there is none and no published set is in use
(INVPW_PUBLISHED_PYTHON unset: a local run): the candidate then runs from this process's python as before. With a published set (the gate's oracle jobs) a missing wheelhouse is an
error: the set was installed from it, so it is there."""
environ = os.environ if environ is None else environ
install = install or published_set.install_candidate
house = environ.get(WHEELHOUSE_ENV) or (str(Path(environ["RUNNER_TEMP"]) / "py-deps") if environ.get("RUNNER_TEMP") else "")
if not house or not (Path(house) / "lock.txt").is_file():
if environ.get(oracle.PUBLISHED_PYTHON_ENV):
raise RuntimeError("the candidate's venv cannot be made: %s names no wheelhouse with a lock.txt (%r); the gate's job has the run's py-deps one" % (WHEELHOUSE_ENV, house))
print("the candidate runs from this process's python (%s names no wheelhouse): not a venv of its own like the published set's" % WHEELHOUSE_ENV)
return None
venv = Path(environ.get("RUNNER_TEMP") or tempfile.gettempdir()) / CANDIDATE_VENV
shutil.rmtree(venv, ignore_errors=True)
python = str(install(Path(house), venv))
print("the candidate's python: %s (a venv of its own from %s, as the published set's)" % (python, house))
sys.stdout.flush()
return python
def ab(candidate: str | None, candidate_seal: Path | None, leg: str, out: Path, engine_tag: str, seeds: list,
published: tuple | None = None, expected_file: Path = EXPECTED_FILE) -> int:
"""A/A first (the published engine twice), then, with a candidate, the published engine against it. 0 green, 1 the A/B is red,
@@ -2858,14 +2936,15 @@ def ab(candidate: str | None, candidate_seal: Path | None, leg: str, out: Path,
runs = [(engine_tag, "footprint-%s.json" % engine_tag.rsplit("-", 1)[-1], binary, seal, python),
(engine_tag + " again", "footprint-%s-again.json" % engine_tag.rsplit("-", 1)[-1], binary, seal, python)]
if candidate:
runs.append((oracle.CANDIDATE, "footprint-candidate.json", candidate, candidate_seal, None))
runs.append((oracle.CANDIDATE, "footprint-candidate.json", candidate, candidate_seal, candidate_python()))
failed = []
for label, name, exe, seal_file, side_python in runs:
print("=== footprint with %s: %s (run from %s)" % (label, exe, stage_dir()))
sys.stdout.flush()
try:
with staged_engine(exe) as staged:
rc = run_subprocess(staged, Path(seal_file) if seal_file else None, leg, out / name, label, seeds, **({"python": side_python} if side_python else {}))
rc = run_subprocess(staged, Path(seal_file) if seal_file else None, leg, out / name, label, seeds,
**({"python": side_python, **({"pin_allow": True} if label == oracle.CANDIDATE else {})} if side_python else {}))
except OSError as e:
print("the engine of %s could not be staged: %s" % (label, e))
rc = 125
+4 -3
View File
@@ -465,12 +465,13 @@ def fetch_published(tag: str | None, work: Path) -> tuple:
return fetched["binary"], None, python
def process_env(seal, python: str | None = None) -> dict:
def process_env(seal, python: str | None = None, pin_allow: bool = False) -> 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."""
core do not agree is refused, as it is on a user's machine). Without it (a pull request's published engine, or a candidate with no wheelhouse) it is as it always was.
The candidate's own venv (`published_set.install_candidate`) is a `python` too, with `pin_allow`: its core is core_ref's, which the wrapper of wrapper_ref may not pin."""
if python:
env = published_set.clean_env({"INVISIBLE_CORE_AUTOFIX": "off"})
env = published_set.clean_env(dict({"INVISIBLE_CORE_AUTOFIX": "off"}, **({"INVISIBLE_CORE_PIN": "allow"} if pin_allow else {})))
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)
+358
View File
@@ -0,0 +1,358 @@
#!/usr/bin/env python3
"""The footprint of an official RETAIL Firefox with a real window, and the declared rows of the host oracle that it explains.
python scripts/ci_ab_host.py retail <firefox.exe> --leg windows-x86_64 --out footprint-retail.json [--build build.json] [--launches 3]
python scripts/ci_ab_retail.py derive --diff diff.json --retail footprint-retail.json --capture <path of the capture> [--expected ci/ab-host-expected.json] [--write]
`retail` (Windows) is the host oracle's own recorder (`ci_ab_host`: the same process-creation audit and the same Kernel-File trace, the same staged folder, the same classification of
the paths and the same footprint document) run on a browser nobody drives: a retail Firefox, started with a fresh profile and one page of the oracle's lab, windowed (no `-headless`,
no Juggler), closed the way a user closes it (WM_CLOSE to its window). A discarded warm-up launch first, then `--launches` measured ones. Retail has no seed: the launches are
numbered from 0.
`derive` reads the A/B verdict of a candidate run (`diff.json`) and that capture, and writes one declared row for each difference that retail windowed ALSO shows, the sides the other
way round included: a difference is explained when the candidate has the path (or the kind of process) exactly when retail windowed has it. A difference that retail windowed
does not show stays undeclared and is listed. Each row carries its source: the path of the capture, the run that made it and the sha256 of the xul.dll of the retail build.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import re
import shutil
import subprocess
import sys
import tempfile
import time
from pathlib import Path
HERE = Path(__file__).resolve().parent
sys.path.insert(0, str(HERE))
sys.path.insert(0, str(HERE.parent / "tests"))
import ci_ab_host as host # noqa: E402
REASON = "real window, decided 01/12"
#: Differences that are the cost of the HIDDEN DESKTOP the headless-less candidate runs on, not of having a real window: never declared under REASON, whatever retail windowed shows. The
#: sandbox broker opens c:\windows\fonts only at content level >= 8 (sandboxBroker.cpp:1219-1224) and the core sets level 4 there (prefs.py:1981-1983); the jump list
#: (recent\customdestinations) is built for a window the user can see. They are listed apart from the rows.
HIDDEN_DESKTOP = {
("file", "c:\\windows\\fonts"): "c:\\windows\\fonts is opened by the sandbox broker only at content level >= 8 (sandboxBroker.cpp:1219-1224); the hidden desktop runs level 4",
("file", host.PROFILE_PLACEHOLDER + "\\appdata\\roaming\\microsoft\\windows\\recent\\customdestinations"): "the jump list of the hidden desktop (WindowsJumpLists.sys.mjs), not of a window",
}
RETAIL_LABEL = "retail"
#: What a fresh profile of a retail Firefox does that a user's does not repeat and that is no trace of a window: the welcome page and the default-browser question. They are written in the
#: profile's user.js, and the footprint carries them (`prefs`).
RETAIL_PREFS = {
"browser.aboutwelcome.enabled": False,
"browser.shell.checkDefaultBrowser": False,
"browser.startup.homepage_override.mstone": "ignore",
"datareporting.policy.firstRunURL": "",
}
#: Seconds a launch may take to show its browser parent, to load the last stage of the lab page, and to end after the close; the hold after the page has loaded.
PARENT_LIMIT_S = 60
PAGE_LIMIT_S = 60
CLOSE_LIMIT_S = 60
HOLD_AFTER_PAGE_S = 5
LAST_STAGE = "kind=css&id=ld3"
def user_js(prefs=None) -> str:
return "".join("user_pref(%s, %s);\n" % (json.dumps(k), json.dumps(v)) for k, v in sorted((RETAIL_PREFS if prefs is None else prefs).items()))
def sha256_file(path) -> str:
h = hashlib.sha256()
with open(path, "rb") as f:
for block in iter(lambda: f.read(1 << 20), b""):
h.update(block)
return h.hexdigest()
# -
# The launch.
def browser_parents_of(profile: Path, processes=None) -> list:
"""The pids, oldest first, of the browser parents that were started with `-profile <profile>`: a `firefox.exe` without `-contentproc` whose command line names the profile. On
Windows there are two: the launcher process the command started, and the browser it starts and waits for (run 46880238752: the oldest one has no window). Empty when none (yet)."""
if processes is None:
import psutil
processes = psutil.process_iter()
found = []
for p in processes:
try:
if p.name().lower() != "firefox.exe":
continue
cmd = [str(a) for a in p.cmdline()]
if "-contentproc" not in cmd and str(profile) in cmd:
found.append((p.create_time(), p.pid))
except Exception: # noqa: BLE001 - a process that is gone
continue
return [pid for _born, pid in sorted(found)]
def browser_parent_of(profile: Path, processes=None) -> int | None:
"""The oldest of `browser_parents_of`, None when there is none (yet)."""
found = browser_parents_of(profile, processes)
return found[0] if found else None
def close_windows_of(pid: int) -> int:
"""WM_CLOSE to every visible top-level window of the process `pid`, the close of a user's click on the X; returns how many were asked (Windows only)."""
import ctypes
from ctypes import wintypes
user32 = ctypes.windll.user32
asked = []
proc_type = ctypes.WINFUNCTYPE(wintypes.BOOL, wintypes.HWND, wintypes.LPARAM)
def each(hwnd, _lparam):
owner = wintypes.DWORD()
user32.GetWindowThreadProcessId(hwnd, ctypes.byref(owner))
if owner.value == pid and user32.IsWindowVisible(hwnd):
user32.PostMessageW(hwnd, 0x0010, 0, 0)
asked.append(hwnd)
return True
user32.EnumWindows(proc_type(each), 0)
return len(asked)
def wait_for(condition, limit_s: float, period: float = 0.25, sleep=time.sleep, now=time.monotonic):
"""The value of `condition()` as soon as it is truthy, else None after `limit_s`."""
deadline = now() + limit_s
while True:
value = condition()
if value:
return value
if now() >= deadline:
return None
sleep(period)
def last_stage_served(state) -> bool:
"""Whether the lab site has answered the request of the last stage of its page (the stylesheet ld3): what a window has when its page is done."""
return any(r.get("ev") == "request" and LAST_STAGE in r.get("path", "") for r in list(state.records))
def run_retail_seed(binary: str, index: int, work: Path, name: str, audit_dir=None) -> dict:
"""One launch of the retail Firefox at `binary`, windowed: a fresh profile, the lab's home page, the close of a user. Returns the footprint of the launch (`ci_ab_host._seed_result`),
its `seed` being the number of the launch; a launch that did not start, did not show its page or did not end by itself has it in its `problems`."""
import psutil
from fakeweb import journey_site
seed_work = work / name
profile = seed_work / "profile"
profile.mkdir(parents=True)
(profile / "user.js").write_text(user_js(), encoding="utf-8")
trace = host.WindowsTrace(seed_work)
try:
trace.start()
except host.TraceError as e:
trace.cleanup()
return {"seed": index, "steps": [], "kinds": {}, "files": [], "ours": {}, "trace": {"source": "etw+audit", "exited": False}, "problems": [host.trace_not_started(e)]}
origin_a, _origin_o, stop_site = journey_site.start((0, 0))
problems, process, parent, close = [], None, None, None
try:
print(host.crash.launch_line(index, name, RETAIL_LABEL))
sys.stdout.flush()
process = subprocess.Popen([binary, "-no-remote", "-profile", str(profile), origin_a + "/"], cwd=str(seed_work), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
parent = wait_for(lambda: browser_parent_of(profile), PARENT_LIMIT_S)
if parent is None:
problems.append("no browser parent (firefox.exe without -contentproc, -profile %s) in %d s of the start" % (profile, PARENT_LIMIT_S))
elif not wait_for(lambda: last_stage_served(journey_site.STATE), PAGE_LIMIT_S):
problems.append("the lab page's last stage (%s) was not requested in %d s: the window did not show the page" % (LAST_STAGE, PAGE_LIMIT_S))
else:
time.sleep(HOLD_AFTER_PAGE_S)
started = time.monotonic()
parents = browser_parents_of(profile)
asked = sum(close_windows_of(pid) for pid in parents)
if parent is not None and not asked:
problems.append("no browser parent of %s (%s) had a visible window to close" % (profile, ", ".join(str(p) for p in parents) or "none"))
ended = wait_for(lambda: not any(psutil.pid_exists(pid) for pid in parents), CLOSE_LIMIT_S) if parent is not None else True
if not ended:
problems.append("the browser did not end %d s after WM_CLOSE: it was ended by the oracle" % CLOSE_LIMIT_S)
close = {"windows_asked": asked, "close_s": round(time.monotonic() - started, 2), "ended_by_itself": bool(ended)}
for pid in (parent, process.pid):
if pid is not None:
kill_tree(pid)
result = host._seed_result(binary, index, seed_work, [], seed_work / "none.log", trace, process.pid, True, close,
lambda audit: host.save_audit(audit_dir, name, index, audit))
except host.TraceError as e:
result = {"seed": index, "steps": [], "kinds": {}, "files": [], "ours": {}, "trace": {"exited": False}, "problems": ["the trace of the run could not be taken: %s" % e]}
finally:
stop_site()
for pid in (parent, process.pid if process is not None else None):
if pid is not None:
kill_tree(pid)
trace.cleanup()
result["problems"] = result.get("problems", []) + problems
return result
def kill_tree(pid: int) -> None:
"""The process `pid` and what is left of its descendants ended (nothing is left of a browser that closed by itself)."""
import psutil
try:
parent = psutil.Process(pid)
victims = parent.children(recursive=True) + [parent]
except psutil.Error:
return
for p in victims:
try:
p.kill()
except psutil.Error:
pass
def run_retail(binary: str, leg: str, launches: int, label: str, audit_dir=None) -> dict:
"""The footprint document of the retail browser at `binary` (a staged copy: `host.staged_engine`): a warm-up and `launches` measured launches, one browser at a time."""
work = Path(tempfile.mkdtemp(prefix="ab-host-"))
problems, seeds = [], []
try:
warm = run_retail_seed(binary, 0, work, "warmup", audit_dir)
problems += ["warm-up: %s" % p for p in warm.get("problems", [])]
print("warm-up (discarded): %s; %d host paths" % (json.dumps(warm["kinds"], sort_keys=True), len(warm["files"])))
sys.stdout.flush()
for index in range(launches):
fp = run_retail_seed(binary, index, work, "measured%d" % index, audit_dir)
seeds.append(fp)
problems += ["launch %d: %s" % (index, p) for p in fp.get("problems", [])]
print("launch %d: %s; %d host paths" % (index, json.dumps(fp["kinds"], sort_keys=True), len(fp["files"])))
sys.stdout.flush()
finally:
shutil.rmtree(work, ignore_errors=True)
return {"format": host.FORMAT, "engine": label, "leg": leg, "platform": sys.platform, "seeds": seeds, "warmup": warm, "problems": problems,
"binary": os.path.basename(os.path.dirname(os.path.realpath(binary))), "prefs": RETAIL_PREFS,
"user_root": host.profile_root_of_this_machine()}
def capture(args) -> int:
"""`retail`: stage the build, run it, write the document with what names the build (`build.json` of the fetch: the installer's sha256 and the BuildID; the sha256 of its xul.dll) and the
run that made it (GITHUB_RUN_ID, GITHUB_SHA). 0 when the document was written and holds no problem, 1 when it holds one (it is written all the same), 2 when nothing could run."""
if sys.platform != "win32":
print("the retail capture is for Windows")
return 3
binary = Path(args.binary)
if not binary.is_file():
print("FAIL %s does not exist" % binary)
return 2
build = json.loads(Path(args.build).read_text(encoding="utf-8")) if args.build else {}
xul = binary.parent / "xul.dll"
args.out.parent.mkdir(parents=True, exist_ok=True)
with host.staged_engine(str(binary)) as staged:
document = run_retail(staged, args.leg, args.launches, args.label, args.out.parent / (args.out.stem + ".audit"))
document.update({"build": build, "xul_sha256": sha256_file(xul) if xul.is_file() else None,
"run": {"id": os.environ.get("GITHUB_RUN_ID"), "sha": os.environ.get("GITHUB_SHA"), "repository": os.environ.get("GITHUB_REPOSITORY")}})
host.write_json(args.out, document)
for line in document["problems"]:
print("FAIL " + line)
print("RETAIL CAPTURE %s: %d measured launches, %d problems" % ("FAILED" if document["problems"] else "OK", len(document["seeds"]), len(document["problems"])))
return 1 if document["problems"] else 0
# -
# The rows.
def retail_state(document: dict) -> dict:
"""{"files": {normalised path: n launches}, "kinds": {kind: n launches}, "launches": n}: how many of the measured launches of the retail capture have each host path (normalised
as the rows' names, `host.normalise_leaf`) and each kind of process."""
files: dict = {}
kinds: dict = {}
seeds = document.get("seeds", [])
for seed in seeds:
for path in {host.normalise_leaf(p, document.get("user_root")) for p in seed.get("files", [])}:
files[path] = files.get(path, 0) + 1
for kind in host.judged_kinds(seed):
kinds[kind] = kinds.get(kind, 0) + 1
return {"files": files, "kinds": kinds, "launches": len(seeds)}
def _slug(text: str) -> str:
return re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")
def source_of(document: dict, capture_path: str) -> dict:
build = document.get("build") or {}
return {"capture": capture_path, "run_id": (document.get("run") or {}).get("id"), "xul_sha256": document.get("xul_sha256"),
"installer_sha256": build.get("sha256") or build.get("installer_sha256"), "build_id": build.get("build_id") or build.get("buildid")}
def derive(diff: dict, document: dict, capture_path: str, os_name: str = "windows", user_root: str | None = None) -> tuple:
"""`(rows, undeclared)`: one row for each leaf of `diff["differences"]` (the A/B verdict of a candidate) whose two sides are the same in every seed it differs in and that retail
windowed explains (the candidate has the path or the kind exactly when retail has it in every measured launch); the others, with what retail does, are `undeclared`."""
retail = retail_state(document)
full = retail["launches"]
if not full:
raise ValueError("the retail capture has no measured launch")
grouped: dict = {}
for d in diff["differences"]:
grouped.setdefault(d["leaf"], []).append(d)
rows, undeclared = [], []
for leaf, items in sorted(grouped.items()):
category = items[0]["category"]
sides = {(host._state(d["a"]), host._state(d["b"])) for d in items}
name = host.normalise_leaf(leaf[len("file."):], user_root or diff.get("user_root")) if category == "file" else leaf[len("proc."):]
seen = retail["files" if category == "file" else "kinds"].get(name, 0)
retail_has = seen == full
entry = {"leaf": leaf, "name": name, "category": category, "seeds": sorted(d["seed"] for d in items), "sides": sorted(sides),
"retail_launches_with_it": "%d/%d" % (seen, full)}
if (category, name) in HIDDEN_DESKTOP:
undeclared.append(dict(entry, why="cost of the hidden desktop, not of a real window: " + HIDDEN_DESKTOP[(category, name)], cost="hidden-desktop"))
continue
if category not in ("file", "proc") or len(sides) != 1:
undeclared.append(dict(entry, why="the difference is not the same in every seed it shows in" if len(sides) != 1 else "not a path nor a process kind"))
continue
(published, candidate), = sides
if (candidate == "present") != retail_has or (seen not in (0, full)):
undeclared.append(dict(entry, why="retail windowed %s it, the candidate %s it" % ("has" if retail_has else "does not have", "has" if candidate == "present" else "does not have")
if seen in (0, full) else "retail windowed has it in %d of %d launches" % (seen, full)))
continue
rows.append({"id": "%s-%s" % (category, _slug(name)), "os": os_name, "category": category, "name": name, "published": published, "candidate": candidate,
"reason": REASON, "source": source_of(document, capture_path)})
return rows, undeclared
def derive_command(args) -> int:
diff = json.loads(args.diff.read_text(encoding="utf-8"))
document = json.loads(args.retail.read_text(encoding="utf-8"))
rows, undeclared = derive(diff, document, args.capture, user_root=args.user_root)
print("%d rows derived, %d differences retail windowed does not show (left undeclared)" % (len(rows), len(undeclared)))
for row in rows:
print("ROW %s: published %s, candidate %s" % (row["id"], row["published"], row["candidate"]))
for entry in undeclared:
print("UNDECLARED %s (seeds %s): %s; retail launches with it %s" % (entry["leaf"], entry["seeds"], entry["why"], entry["retail_launches_with_it"]))
if args.write:
current = json.loads(args.expected.read_text(encoding="utf-8"))
kept = [r for r in current["differences"] if r["id"] not in {x["id"] for x in rows}]
current["differences"] = kept + rows
args.expected.write_text(json.dumps(current, indent=2, sort_keys=False) + "\n", encoding="utf-8", newline="\n")
print("wrote %d rows in %s" % (len(current["differences"]), args.expected))
return 0
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("retail")
r.add_argument("binary")
r.add_argument("--leg", required=True)
r.add_argument("--out", type=Path, required=True)
r.add_argument("--build", type=Path, default=None, help="build.json of core's scripts/retail/firefox_build.py fetch")
r.add_argument("--launches", type=int, default=3)
r.add_argument("--label", default="retail windowed")
d = sub.add_parser("derive")
d.add_argument("--diff", type=Path, required=True)
d.add_argument("--retail", type=Path, required=True)
d.add_argument("--capture", required=True, help="the path of the capture in RetailCaptures")
d.add_argument("--expected", type=Path, default=host.EXPECTED_FILE)
d.add_argument("--user-root", default=None, help="the folder that holds the profile folders on the machine of the A/B run, when its diff.json does not say (user_root)")
d.add_argument("--write", action="store_true")
args = ap.parse_args(argv)
return capture(args) if args.cmd == "retail" else derive_command(args)
if __name__ == "__main__":
sys.exit(main())
+42
View File
@@ -14,6 +14,9 @@ side is a SET, and nothing in it is chosen by hand: the last published `invisibl
(`--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 install-candidate --house DIR --venv DIR
the same for the CANDIDATE's side: the gate's third-party lock, then the candidate's two wheels (the ones in DIR, never DIR/published), offline, in a venv
of its own. The host oracle launches the candidate's engine from it as it launches the control's from the set's venv. Prints the venv's python.
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
@@ -269,6 +272,39 @@ def install(house: Path, venv: Path, lock: Path = LOCK_PATH, run=subprocess.run)
return venv_python(venv)
def candidate_wheel(house: Path, name: str) -> tuple:
"""(path, sha256) of THE wheel of `name` in the wheelhouse's own folder (not `published/`): the candidate's, built from core_ref or wrapper_ref. FileNotFoundError when there is
none or more than one: which wheel is the candidate's is never a choice made here."""
stem = name.replace("-", "_").lower() + "-"
found = sorted(path for path in house.glob("*.whl") if path.name.lower().startswith(stem))
if len(found) != 1:
raise FileNotFoundError("%s: the wheelhouse %s must hold exactly one wheel of the candidate (built from its ref), it holds %d: %s"
% (name, house, len(found), ", ".join(p.name for p in found) or "none"))
return found[0], hashlib.sha256(found[0].read_bytes()).hexdigest()
def install_candidate(house: Path, venv: Path, run=subprocess.run) -> Path:
"""A venv for the CANDIDATE of the same kind as the set's (`install`): the gate's third-party lock from the wheelhouse (`house/lock.txt`), then the candidate's own two wheels
(the ones in `house`, built from core_ref and wrapper_ref; never `published/`), `--no-deps`, offline, over a clean environment, then `pip check`. The candidate's engine is
launched from this venv as the control's is launched from its own: the python that runs a side is the same kind of thing on both, so that what a side reads of the host is
the engine's and not the difference between a venv and the job's python. What was installed is recorded as in the set's venv (`RECORD_FILE`). Returns the python."""
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)
chosen = {name: candidate_wheel(house, name) for name in (CORE, WRAPPER)}
run([sys.executable, "-m", "venv", str(venv)], check=True)
python = str(venv_python(venv))
base = [python, "-m", "pip", "install", "--quiet", "--no-index"]
run(base + ["--require-hashes", "--find-links", str(house), "-r", str(house_lock)], check=True, env=clean_env())
run(base + ["--no-deps"] + [str(path) for path, _sha in chosen.values()], check=True, env=clean_env())
checked = run([python, "-m", "pip", "check"], capture_output=True, text=True, env=clean_env())
if checked.returncode != 0:
raise RuntimeError("pip check of the candidate's venv %s is red (the requirements of the candidate's 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()
@@ -390,6 +426,9 @@ def main(argv=None) -> int:
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)
c = sub.add_parser("install-candidate")
c.add_argument("--house", type=Path, required=True)
c.add_argument("--venv", type=Path, required=True)
v = sub.add_parser("verify")
v.add_argument("--python", required=True)
v.add_argument("--lock", type=Path, default=LOCK_PATH)
@@ -420,6 +459,9 @@ def main(argv=None) -> int:
return 1
print(python)
return 0
if args.cmd == "install-candidate":
print(install_candidate(args.house, args.venv))
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")
+330
View File
@@ -16,6 +16,7 @@ import inspect
import json
import shutil
import sysconfig
import types
import os
import re
import sys
@@ -3818,3 +3819,332 @@ def test_the_row_of_the_graphics_probe_is_stale_when_the_published_engine_no_lon
assert report["verdict"] == "red" and report["stale"] == ["gfxtest-69"] and report["declared"] == [] and report["differences"] == []
assert report["problems"] == ["the declared difference 'gfxtest-69' (%s) does not show in this run: it is stale, remove it" % GFXTEST_ROW["reason"]]
assert judge(a, b, expected=host.load_expected())["verdict"] == "green", "the file declares nothing: the same run is green"
# -
# The declared difference in the other direction (the published engine does not have it, the candidate does), and the `file` rows by leaf.
GPU_ROW = {"id": "gpu-windowed", "os": "linux", "category": "proc", "name": "gpu", "published": "absent", "candidate": "present", "reason": "real window, decided 01/12"}
WIN_FILE_ROWS = [
{"id": "file-dwmapi", "os": "windows", "category": "file", "name": "c:\\windows\\system32\\dwmapi.dll", "published": "absent", "candidate": "present", "reason": "real window, decided 01/12"},
{"id": "file-mun", "os": "windows", "category": "file", "name": "<engine>\\systemresources\\firefox.exe.mun", "published": "absent", "candidate": "present", "reason": "real window, decided 01/12"},
]
RUN_TEMP_MUN = "d:\\a\\_temp\\ab-host\\engine\\systemresources\\firefox.exe.mun"
DWMAPI = "c:\\windows\\system32\\dwmapi.dll"
WITHOUT_GPU = {k: n for k, n in KINDS.items() if k != "gpu"}
def windows_with_window_files(*extra):
return windows_footprints(candidate_files=WIN_FILES + list(extra))
def test_a_declared_proc_the_published_engine_lacks_and_the_candidate_has_passes_in_an_a_b():
report = judge(footprint("firefox-70", kinds=WITHOUT_GPU), footprint("candidate"), expected=[GPU_ROW])
assert report["verdict"] == "green", report["problems"]
assert [d["leaf"] for d in report["declared"]] == ["proc.gpu", "proc.gpu"] and report["stale"] == []
assert judge(footprint("firefox-70", kinds=WITHOUT_GPU), footprint("candidate"), expected=[])["verdict"] == "red", "undeclared it is a difference"
def test_a_proc_row_of_that_direction_is_red_the_other_way_round_and_stale_when_it_does_not_show():
other_way = judge(footprint("firefox-70"), footprint("candidate", kinds=WITHOUT_GPU), expected=[GPU_ROW])
assert other_way["verdict"] == "red" and other_way["stale"] == ["gpu-windowed"] and any(d["leaf"] == "proc.gpu" for d in other_way["differences"])
same = judge(footprint("firefox-70"), footprint("candidate"), expected=[GPU_ROW])
assert same["verdict"] == "red" and same["stale"] == ["gpu-windowed"]
def test_the_row_of_the_old_direction_still_means_published_present_candidate_absent():
row = dict(GFXTEST_ROW)
row.pop("published"), row.pop("candidate")
assert judge(footprint(), a_candidate_without_gfxtest(), expected=[row])["verdict"] == "green"
assert judge(a_candidate_without_gfxtest(), footprint(), expected=[row])["verdict"] == "red"
def test_a_file_row_covers_the_leaf_of_a_path_by_its_normalised_spelling_and_nothing_else():
published, candidate = windows_with_window_files(DWMAPI, RUN_TEMP_MUN)
report = judge(published, candidate, expected=WIN_FILE_ROWS)
assert report["verdict"] == "green", report["problems"]
assert sorted({d["leaf"] for d in report["declared"]}) == ["file." + DWMAPI, "file." + RUN_TEMP_MUN] and report["stale"] == []
assert len(report["declared"]) == 2 * len(SEEDS)
assert judge(published, candidate, expected=[])["verdict"] == "red"
other_temp = judge(*windows_with_window_files(DWMAPI, "e:\\work\\tmp\\ab-host\\engine\\systemresources\\firefox.exe.mun"), expected=WIN_FILE_ROWS)
assert other_temp["verdict"] == "green", "the run's temp folder is not part of the leaf"
def test_a_file_row_does_not_cover_another_path_and_a_path_next_to_it_is_still_a_difference():
next_to = "c:\\windows\\system32\\dwmapi.dll.mui"
report = judge(*windows_with_window_files(DWMAPI, next_to), expected=[WIN_FILE_ROWS[0]])
assert report["verdict"] == "red" and {d["leaf"] for d in report["differences"]} == {"file." + next_to}
assert [d["leaf"] for d in report["declared"]] == ["file." + DWMAPI] * len(SEEDS)
def test_a_file_row_is_red_the_other_way_round_and_stale_when_the_path_does_not_show():
published, candidate = windows_footprints(candidate_files=WIN_FILES)
reversed_run = judge(footprint(platform="win32", kinds=WIN_KINDS, files=WIN_FILES + [DWMAPI]), candidate, expected=[WIN_FILE_ROWS[0]])
assert reversed_run["verdict"] == "red" and reversed_run["stale"] == ["file-dwmapi"] and {d["leaf"] for d in reversed_run["differences"]} == {"file." + DWMAPI}
absent = judge(published, candidate, expected=[WIN_FILE_ROWS[0]])
assert absent["verdict"] == "red" and absent["stale"] == ["file-dwmapi"]
assert any("stale" in p and "file-dwmapi" in p for p in absent["problems"])
def test_a_file_row_can_declare_a_path_only_the_published_engine_has():
row = dict(WIN_FILE_ROWS[0], id="file-fonts", name="c:\\windows\\fonts", published="present", candidate="absent")
published = footprint(platform="win32", kinds=WIN_KINDS, files=WIN_FILES + ["c:\\windows\\fonts"])
candidate = footprint("candidate", platform="win32", kinds=WIN_KINDS, files=WIN_FILES)
assert judge(published, candidate, expected=[row])["verdict"] == "green"
assert judge(published, candidate, expected=[dict(row, published="absent", candidate="present")])["verdict"] == "red"
def test_a_file_row_of_another_os_is_not_applied_and_the_a_a_ignores_it():
published, candidate = windows_with_window_files(DWMAPI)
assert judge(footprint(), footprint("candidate"), expected=WIN_FILE_ROWS)["verdict"] == "green", "a Windows row is neither applied nor stale on Linux"
a_a = judge(published, candidate, expected=WIN_FILE_ROWS, a_a=True)
assert a_a["verdict"] == "red" and a_a["declared"] == [] and a_a["stale"] == []
def test_normalise_leaf_puts_the_engine_folder_and_the_profile_folder_in_a_placeholder():
assert host.normalise_leaf(RUN_TEMP_MUN) == "<engine>\\systemresources\\firefox.exe.mun"
tail = "\\appdata\\roaming\\microsoft\\windows\\recent\\customdestinations"
assert host.normalise_leaf(TEST_ROOT + "\\someone" + tail, TEST_ROOT) == "<profile>" + tail
assert host.normalise_leaf(TEST_ROOT.upper() + "\\someone" + tail, TEST_ROOT) == "<profile>" + tail, "the spelling of the case is the footprint's, the root is compared as such"
assert host.normalise_leaf(TEST_ROOT + "\\someone" + tail) == TEST_ROOT + "\\someone" + tail, "without the root the recorder named, nothing is a profile"
assert host.normalise_leaf(TEST_ROOT + "-other\\someone" + tail, TEST_ROOT) == TEST_ROOT + "-other\\someone" + tail, "a sibling folder of the root is not under it"
assert host.normalise_leaf("c:\\windows\\fonts", TEST_ROOT) == "c:\\windows\\fonts"
def test_the_footprint_of_this_machine_names_the_folder_that_holds_the_profiles_from_its_environment(monkeypatch):
monkeypatch.setenv("USERPROFILE", TEST_ROOT + "\\someone")
monkeypatch.setenv("HOME", TEST_ROOT + "\\someone")
assert host.profile_root_of_this_machine() == TEST_ROOT
def test_a_row_of_the_profile_folder_covers_the_leaf_under_the_root_the_footprint_recorded():
leaf = TEST_ROOT + "\\someone\\appdata\\x"
row = dict(WIN_FILE_ROWS[0], id="file-profile", name="<profile>\\appdata\\x")
published, candidate = windows_footprints(candidate_files=WIN_FILES + [leaf])
for fp in (published, candidate):
fp["user_root"] = TEST_ROOT
report = judge(published, candidate, expected=[row])
assert report["verdict"] == "green" and report["user_root"] == TEST_ROOT and [d["leaf"] for d in report["declared"]] == ["file." + leaf] * len(SEEDS)
del published["user_root"], candidate["user_root"]
assert judge(published, candidate, expected=[row])["verdict"] == "red", "no recorded root, no profile"
def test_the_candidate_is_launched_from_its_own_venv_with_the_pin_allowed_and_the_control_from_the_set_s(tmp_path, monkeypatch):
pub = fake_engine(tmp_path / "fetch", "pub")
cand = fake_engine(tmp_path / "checkout", "cand")
monkeypatch.setattr(host.oracle, "fetch_published", lambda tag, work: (pub, None, "SET-PYTHON"))
monkeypatch.setattr(host, "candidate_python", lambda: "CANDIDATE-PYTHON")
monkeypatch.setattr(host, "FLOORS", SMALL)
calls = {}
docs = {"firefox-70": footprint("firefox-70"), "firefox-70 again": footprint("again"), "candidate": footprint("candidate")}
def fake_run(exe, seal, leg, out, label, seeds, **kw):
calls[label] = kw
name = {"firefox-70": "footprint-70.json", "firefox-70 again": "footprint-70-again.json", "candidate": "footprint-candidate.json"}[label]
host.write_json(tmp_path / "o" / name, docs[label])
return 0
monkeypatch.setattr(host, "run_subprocess", fake_run)
host.ab(cand, Path("seal"), "linux-x86_64", tmp_path / "o", "firefox-70", [11, 12])
assert calls["firefox-70"] == {"python": "SET-PYTHON"} and calls["firefox-70 again"] == {"python": "SET-PYTHON"}
assert calls["candidate"] == {"python": "CANDIDATE-PYTHON", "pin_allow": True}, "its own venv, and its core is core_ref's, which the wrapper of wrapper_ref may not pin"
def test_the_process_of_the_candidate_s_venv_is_clean_of_the_job_and_allows_the_pin_where_the_set_s_does_not(monkeypatch):
monkeypatch.setenv("PYTHONPATH", "/job/site")
monkeypatch.setenv("VIRTUAL_ENV", "/job/venv")
candidate = host.oracle.process_env(Path("cand-seal"), "CANDIDATE-PYTHON", pin_allow=True)
published = host.oracle.process_env(None, "SET-PYTHON")
for env in (candidate, published):
assert "PYTHONPATH" not in env and "VIRTUAL_ENV" not in env and env["INVISIBLE_CORE_AUTOFIX"] == "off"
assert candidate["INVISIBLE_CORE_PIN"] == "allow" and candidate["INVISIBLE_SEAL_FILE"] == "cand-seal"
assert published.get("INVISIBLE_CORE_PIN") != "allow", "the set's pin check stays on"
def test_the_candidate_s_venv_is_made_from_the_run_s_wheelhouse_beside_the_published_set_s(tmp_path):
house = tmp_path / "py-deps"
house.mkdir()
(house / "lock.txt").write_text("", encoding="utf-8")
made = []
stale = tmp_path / host.CANDIDATE_VENV
stale.mkdir()
(stale / "left-over").write_text("an earlier run", encoding="utf-8")
python = host.candidate_python(environ={"RUNNER_TEMP": str(tmp_path)}, install=lambda h, v: made.append((h, v, v.exists())) or v / "bin" / "python")
assert made == [(house, tmp_path / "candidate-set", False)], "directly under the temp root, with a name that never changes, and nothing of an earlier run in it"
assert python == str(tmp_path / "candidate-set" / "bin" / "python")
elsewhere = tmp_path / "elsewhere"
elsewhere.mkdir()
(elsewhere / "lock.txt").write_text("", encoding="utf-8")
made.clear()
host.candidate_python(environ={"RUNNER_TEMP": str(tmp_path), host.WHEELHOUSE_ENV: str(elsewhere)}, install=lambda h, v: made.append(h) or v)
assert made == [elsewhere], "INVPW_WHEELHOUSE wins over the gate's default folder"
def test_without_a_wheelhouse_the_candidate_runs_as_before_but_never_next_to_a_published_set(tmp_path):
assert host.candidate_python(environ={}, install=lambda h, v: pytest.fail("no wheelhouse, nothing to install")) is None
with pytest.raises(RuntimeError, match="candidate's venv cannot be made"):
host.candidate_python(environ={host.oracle.PUBLISHED_PYTHON_ENV: "SET-PYTHON", "RUNNER_TEMP": str(tmp_path)}, install=lambda h, v: pytest.fail("no lock.txt"))
# -
# The retail capture and the rows it explains (scripts/ci_ab_retail.py).
retail = __import__("ci_ab_retail")
RETAIL_MUN = "d:\\a\\_temp\\ab-host\\engine\\systemresources\\firefox.exe.mun"
PYTHON_LIB = "c:\\hostedtoolcache\\windows\\python\\3.11.9\\x64\\lib"
FONTS = "c:\\windows\\fonts"
CAPTURE = "captures/firefox-159.0/windows-server-2025/footprint-windowed/2026-12-02/footprint-retail.json"
TEST_ROOT = "x:\\home-root" # not a form of any real profile folder: the root a recording run says is passed in, never typed as a path of this machine
def a_retail_capture(files=(), kinds=None, launches=3, partial=()):
"""The document `retail` writes: `launches` measured launches, each with `files` and `kinds` (a path of `partial` only in the first launch)."""
seeds = []
for index in range(launches):
have = list(WIN_FILES) + [f for f in files if f not in partial or index == 0]
seeds.append(seed_footprint(index, kinds=kinds or WIN_KINDS, files=have))
return {"format": host.FORMAT, "engine": "retail windowed", "platform": "win32", "seeds": seeds, "problems": [], "xul_sha256": "a" * 64,
"run": {"id": "123456", "sha": "b" * 40}, "build": {"sha256": "c" * 64, "build_id": "20261022150525"}, "user_root": TEST_ROOT}
def a_candidate_diff(candidate_files, candidate_kinds=None, published_files=None):
published = footprint(platform="win32", kinds=WIN_KINDS, files=published_files or WIN_FILES)
candidate = footprint("candidate", platform="win32", kinds=candidate_kinds or WIN_KINDS, files=candidate_files)
published["user_root"] = candidate["user_root"] = TEST_ROOT
return judge(published, candidate, expected=[]), published, candidate
def test_the_retail_profile_has_the_prefs_that_keep_the_welcome_page_and_the_default_browser_question_out():
text = retail.user_js()
assert 'user_pref("browser.aboutwelcome.enabled", false);\n' in text and 'user_pref("browser.shell.checkDefaultBrowser", false);\n' in text
assert text.count("user_pref") == len(retail.RETAIL_PREFS)
def test_the_browser_parent_is_the_oldest_firefox_without_contentproc_that_names_the_profile():
class P:
def __init__(self, name, cmd, born, pid):
self._name, self._cmd, self._born, self.pid = name, cmd, born, pid
def name(self):
return self._name
def cmdline(self):
return self._cmd
def create_time(self):
return self._born
profile = Path("work/profile")
processes = [P("firefox.exe", ["firefox.exe", "-contentproc", "-profile", str(profile)], 1, 10), P("firefox.exe", ["firefox.exe", "-profile", "other"], 2, 11),
P("firefox.exe", ["firefox.exe", "-profile", str(profile)], 5, 12), P("firefox.exe", ["firefox.exe", "-profile", str(profile)], 4, 13),
P("python.exe", ["python.exe", str(profile)], 0, 14)]
assert retail.browser_parent_of(profile, processes) == 13
assert retail.browser_parents_of(profile, processes) == [13, 12], "the launcher and the browser it starts: the window is the younger one's, so the close is asked of both"
assert retail.browser_parent_of(profile, processes[:2]) is None
def test_wait_for_gives_the_value_as_soon_as_it_is_there_and_none_when_the_limit_runs_out():
clock = [0.0]
calls = []
assert retail.wait_for(lambda: calls.append(1) or (len(calls) >= 3 and "up"), 10, sleep=lambda s: clock.__setitem__(0, clock[0] + s), now=lambda: clock[0]) == "up"
clock[0] = 0.0
assert retail.wait_for(lambda: None, 2, period=1, sleep=lambda s: clock.__setitem__(0, clock[0] + s), now=lambda: clock[0]) is None and clock[0] == 2.0
def test_the_last_stage_of_the_lab_page_is_the_request_of_its_stylesheet_ld3():
state = types.SimpleNamespace(records=[{"ev": "request", "path": "/"}, {"ev": "request", "path": "/r?kind=css&id=ld2"}])
assert not retail.last_stage_served(state)
state.records.append({"ev": "request", "path": "/r?kind=css&id=ld3"})
assert retail.last_stage_served(state)
def test_a_difference_retail_windowed_also_shows_becomes_a_row_with_its_source_and_the_rest_is_listed():
report, _published, _candidate = a_candidate_diff(WIN_FILES + [DWMAPI, RETAIL_MUN, PYTHON_LIB], dict(WIN_KINDS, gpu=1))
document = a_retail_capture(files=[DWMAPI, "d:\\other\\work\\ab-host\\engine\\systemresources\\firefox.exe.mun"], kinds=dict(WIN_KINDS, gpu=1))
rows, undeclared = retail.derive(report, document, CAPTURE)
assert sorted(r["id"] for r in rows) == sorted(["file-c-windows-system32-dwmapi-dll", "file-engine-systemresources-firefox-exe-mun", "proc-gpu"])
by_name = {r["name"]: r for r in rows}
assert by_name[DWMAPI]["published"] == "absent" and by_name[DWMAPI]["candidate"] == "present" and by_name[DWMAPI]["os"] == "windows"
assert "<engine>\\systemresources\\firefox.exe.mun" in by_name and by_name["gpu"]["category"] == "proc"
for row in rows:
assert row["reason"] == "real window, decided 01/12"
assert row["source"] == {"capture": CAPTURE, "run_id": "123456", "xul_sha256": "a" * 64, "installer_sha256": "c" * 64, "build_id": "20261022150525"}
assert [u["leaf"] for u in undeclared] == ["file." + PYTHON_LIB] and "does not have it" in undeclared[0]["why"] and undeclared[0]["retail_launches_with_it"] == "0/3"
def test_the_derived_rows_cover_exactly_their_differences_in_the_judge():
report, published, candidate = a_candidate_diff(WIN_FILES + [DWMAPI, RETAIL_MUN, PYTHON_LIB], dict(WIN_KINDS, gpu=1))
rows, undeclared = retail.derive(report, a_retail_capture(files=[DWMAPI, RETAIL_MUN], kinds=dict(WIN_KINDS, gpu=1)), CAPTURE)
again = judge(published, candidate, expected=rows)
assert again["stale"] == [] and {d["leaf"] for d in again["differences"]} == {u["leaf"] for u in undeclared} == {"file." + PYTHON_LIB}
assert {d["leaf"] for d in again["declared"]} == {"file." + DWMAPI, "file." + RETAIL_MUN, "proc.gpu"}
def test_a_path_only_the_published_engine_reads_is_a_row_only_when_retail_windowed_does_not_read_it_either():
only_published = "c:\\windows\\system32\\winhttp.dll"
report, _p, _c = a_candidate_diff(WIN_FILES, published_files=WIN_FILES + [only_published])
rows, undeclared = retail.derive(report, a_retail_capture(files=[]), CAPTURE)
assert [(r["name"], r["published"], r["candidate"]) for r in rows] == [(only_published, "present", "absent")] and undeclared == []
rows, undeclared = retail.derive(report, a_retail_capture(files=[only_published]), CAPTURE)
assert rows == [] and [u["leaf"] for u in undeclared] == ["file." + only_published] and "retail windowed has it, the candidate does not have it" in undeclared[0]["why"]
def test_the_costs_of_the_hidden_desktop_are_never_declared_as_the_real_window_even_when_retail_windowed_shows_them():
jump = TEST_ROOT + "\\runneradmin\\appdata\\roaming\\microsoft\\windows\\recent\\customdestinations"
report, _p, _c = a_candidate_diff(WIN_FILES, published_files=WIN_FILES + [FONTS, jump])
for shown in ([], [FONTS, jump]):
rows, undeclared = retail.derive(report, a_retail_capture(files=shown), CAPTURE)
assert rows == [] and sorted(u["leaf"] for u in undeclared) == sorted(["file." + FONTS, "file." + jump])
assert all(u["cost"] == "hidden-desktop" and "hidden desktop" in u["why"] for u in undeclared)
def test_a_path_retail_windowed_has_in_some_launches_only_is_left_undeclared_whichever_way_it_goes():
report, _p, _c = a_candidate_diff(WIN_FILES + [DWMAPI])
rows, undeclared = retail.derive(report, a_retail_capture(files=[DWMAPI], partial=[DWMAPI]), CAPTURE)
assert rows == [] and undeclared[0]["retail_launches_with_it"] == "1/3" and "1 of 3 launches" in undeclared[0]["why"]
def test_a_leaf_that_differs_the_other_way_in_one_seed_is_undeclared_and_a_capture_without_launches_is_refused():
report, _p, _c = a_candidate_diff(WIN_FILES + [DWMAPI])
mixed = {"differences": [dict(report["differences"][0]), dict(report["differences"][1], a=1, b=host.MISSING)]}
mixed["differences"][1]["leaf"] = mixed["differences"][0]["leaf"]
rows, undeclared = retail.derive(mixed, a_retail_capture(files=[DWMAPI]), CAPTURE)
assert rows == [] and "not the same in every seed" in undeclared[0]["why"]
with pytest.raises(ValueError, match="no measured launch"):
retail.derive(report, a_retail_capture(launches=0), CAPTURE)
def test_derive_writes_the_rows_into_the_expected_file_and_replaces_a_row_of_the_same_id(tmp_path):
report, _p, _c = a_candidate_diff(WIN_FILES + [DWMAPI])
paths = {"diff": tmp_path / "diff.json", "retail": tmp_path / "retail.json", "expected": tmp_path / "expected.json"}
paths["diff"].write_text(json.dumps(report), encoding="utf-8")
paths["retail"].write_text(json.dumps(a_retail_capture(files=[DWMAPI])), encoding="utf-8")
paths["expected"].write_text(json.dumps({"format": host.EXPECTED_FORMAT, "differences": [{"id": "file-c-windows-system32-dwmapi-dll", "old": True}]}), encoding="utf-8")
argv = ["derive", "--diff", str(paths["diff"]), "--retail", str(paths["retail"]), "--capture", CAPTURE, "--expected", str(paths["expected"]), "--write"]
assert retail.main(argv) == 0
written = host.load_expected(paths["expected"])
assert [r["id"] for r in written] == ["file-c-windows-system32-dwmapi-dll"] and "old" not in written[0] and written[0]["source"]["capture"] == CAPTURE
def test_the_capture_runs_a_warm_up_and_the_measured_launches_and_names_what_it_ran(tmp_path, monkeypatch):
made = []
def fake_seed(binary, index, work, name, audit_dir=None):
made.append((index, name))
return {"seed": index, "kinds": dict(WIN_KINDS), "files": list(WIN_FILES), "problems": ["it did not close"] if name == "warmup" else []}
monkeypatch.setattr(retail, "run_retail_seed", fake_seed)
document = retail.run_retail("C:\\stage\\firefox.exe", "windows-x86_64", 2, "retail windowed")
assert made == [(0, "warmup"), (0, "measured0"), (1, "measured1")] and [s["seed"] for s in document["seeds"]] == [0, 1]
assert document["problems"] == ["warm-up: it did not close"] and document["platform"] == sys.platform and document["prefs"] == retail.RETAIL_PREFS
def test_the_capture_is_refused_off_windows_and_without_a_binary(tmp_path, monkeypatch):
args = types.SimpleNamespace(binary=str(tmp_path / "none" / "firefox.exe"), leg="windows-x86_64", out=tmp_path / "o.json", build=None, launches=1, label="retail")
if sys.platform == "win32":
assert retail.capture(args) == 2
monkeypatch.setattr(retail.sys, "platform", "linux")
assert retail.capture(args) == 3
+40 -19
View File
@@ -1,9 +1,12 @@
"""The page oracle's declared differences (ci/ab-oracle-expected.json), judged against the run of the engine's final candidate (run 46227711139, Linux and Windows).
"""The page oracle's declared differences (ci/ab-oracle-expected.json), judged against the runs of the engine's final candidate (run 46227711139 and candidate run 46792115974, Linux and Windows).
That run's A/B was red on 24 differences per system, all of them the bar of the main window above the content: seed 6 at 1.25 (106 device px as retail Firefox 159 measures it,
the published engine's core said 107) and seed 63 at 1.5 (the compact density that retail picks by itself under 720 CSS px, 73 CSS px instead of the normal 85). The DIFF lines
of that run are the data below, the same on both systems. The judge allows a difference only when a row of the file matches it exactly, is red on any other, red on a row that
does not show (stale), and never applies the rows to the A/A.
The A/B of run 46792115974 was red on 12 more differences per system, the same on both: the system colors Highlight and SelectedItem, rgb(0, 120, 215) on the published engine
and rgb(0, 120, 212) on the candidate, which is what retail Firefox 159 reads on Windows 11 builds 26100 and 26200.
"""
from __future__ import annotations
@@ -52,8 +55,22 @@ DIFF seed 63 dpr 1.5 leaf surface.visualViewport.height: firefox-70 587.33331298
DIFF seed 63 dpr 1.5 leaf surface.window.innerHeight: firefox-70 587 | candidate 599
DIFF seed 63 dpr 1.5 leaf surface.window.mozInnerScreenY: firefox-70 84.66666412353516 | candidate 72.66666412353516
"""
#: The 12 DIFF lines of the A/B of both systems in candidate run 46792115974 (identical on Linux and Windows), the ones left once the rows above were declared.
COLORS = """DIFF seed 0 dpr 1.0 leaf relaunch.surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 0 dpr 1.0 leaf relaunch.surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 0 dpr 1.0 leaf surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 0 dpr 1.0 leaf surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 2 dpr 1.0 leaf surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 2 dpr 1.0 leaf surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 4 dpr 1.0 leaf surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 4 dpr 1.0 leaf surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 6 dpr 1.25 leaf surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 6 dpr 1.25 leaf surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 63 dpr 1.5 leaf surface.systemColors.Highlight: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
DIFF seed 63 dpr 1.5 leaf surface.systemColors.SelectedItem: firefox-70 "rgb(0, 120, 215)" | candidate "rgb(0, 120, 212)"
"""
_LINE = re.compile(r"^DIFF seed (\d+) dpr ([\d.]+) leaf (\S+): firefox-70 (.*) \| candidate (.*)$")
DIFFS = [(int(m[1]), float(m[2]), m[3], json.loads(m[4]), json.loads(m[5])) for m in map(_LINE.match, TODAY.splitlines())]
DIFFS = [(int(m[1]), float(m[2]), m[3], json.loads(m[4]), json.loads(m[5])) for m in map(_LINE.match, (TODAY + COLORS).splitlines())]
def _put(items: dict, leaf: str, value) -> None:
@@ -69,7 +86,7 @@ def _visit(seed: int, side: int | None) -> dict:
engine, 1 the candidate)."""
items = {"surface": {"navigator": {"hardwareConcurrency": 8, "language": "en-US"}, "screen": {"width": 1920, "height": 1080}}, "text": {"fonts": ["Arial", "Segoe UI"]}}
for s, dpr, leaf, published, candidate in DIFFS:
if s == seed:
if s == seed and not leaf.startswith(gate.RELAUNCH): # a relaunch leaf is the second launch's copy of the first one's, made below
_put(items, leaf, (published, candidate)[side])
if seed == ab.RELAUNCH_SEED:
items.update(copy.deepcopy(gate.relaunch_items(items)))
@@ -97,31 +114,35 @@ def judge(published, candidate, os_name="linux", declared=None, expected=CANDIDA
# Today's run, as data.
@pytest.mark.parametrize("os_name", ["linux", "windows"])
def test_the_old_judge_is_red_on_the_24_differences_of_the_run_and_the_new_one_is_green_with_the_rows(os_name):
def test_the_old_judge_is_red_on_the_36_differences_of_the_runs_and_the_new_one_is_green_with_the_rows(os_name):
without = judge(dumps(0), dumps(1))
assert without["verdict"] == "red" and len(without["differences"]) == 24
assert without["verdict"] == "red" and len(without["differences"]) == 36
assert {(d["seed"], d["dpr"], d["leaf"], json.dumps(d["a"]), json.dumps(d["b"])) for d in without["differences"]} == {(s, d, leaf, json.dumps(p), json.dumps(c)) for s, d, leaf, p, c in DIFFS}
report = judge(dumps(0), dumps(1), os_name, declared=ab.load_expected(FILE))
assert report["verdict"] == "green", report["problems"]
assert len(report["declared"]) == 24 and report["differences"] == [] and report["stale"] == []
assert len(report["declared"]) == 36 and report["differences"] == [] and report["stale"] == []
def test_the_file_has_a_row_per_os_seed_and_leaf_of_the_run_with_its_two_values_and_exactly_the_keys():
document = json.loads(FILE.read_text(encoding="utf-8"))
assert document["format"] == "ab-oracle-expected/1"
got = document["differences"]
assert len(got) == 48
assert len(got) == 72
for row in got:
assert sorted(row) == sorted(["id", "os", "seed", "dpr", "leaf", "published", "candidate", "reason"]), "no field that says who decided, nothing else"
for os_name in ("linux", "windows"):
assert sorted((r["seed"], r["dpr"], r["leaf"], json.dumps(r["published"]), json.dumps(r["candidate"])) for r in got if r["os"] == os_name) == \
sorted((s, d, leaf, json.dumps(p), json.dumps(c)) for s, d, leaf, p, c in DIFFS)
assert len({r["id"] for r in got}) == 48
assert len({r["id"] for r in got}) == 72
def test_every_row_says_the_retail_source_the_core_function_and_the_leaf():
for row in ab.load_expected(FILE):
reason = row["reason"]
if "systemColors" in row["leaf"]:
assert "nsLookAndFeel.cpp:188" in reason and "captures/firefox-159.0/windows-server-2025/syscolors/2026-12-01" in reason, row["id"]
assert "captures/firefox-159.0/windows-11-arm/syscolors/2026-12-02" in reason and "46828919060" in reason and "only build 20348 reads 215" in reason, row["id"]
continue
assert "45672953042" in reason and "45679625406" in reason and "retail window-geometry capture workflow" in reason, row["id"]
assert "window_frame.chrome_height_device" in reason and "This leaf: " in reason, row["id"]
assert ("106 device px" in reason) if row["seed"] == 6 else ("720 CSS px" in reason and "gUIDensity" in reason and "compact" in reason), row["id"]
@@ -143,7 +164,7 @@ def test_a_difference_that_no_row_covers_is_red_and_the_rows_stay_applied():
candidate = dumps(1)
candidate[(1.0, 2)]["surface"]["navigator"]["language"] = "it-IT"
report = judge(dumps(0), candidate, declared=ab.load_expected(FILE))
assert report["verdict"] == "red" and len(report["declared"]) == 24
assert report["verdict"] == "red" and len(report["declared"]) == 36
assert [(d["seed"], d["leaf"], d["a"], d["b"]) for d in report["differences"]] == [(2, "surface.navigator.language", "en-US", "it-IT")]
assert report["problems"] == ["seed 2 dpr 1.0 surface.navigator.language: \"en-US\" vs \"it-IT\""]
@@ -166,22 +187,22 @@ def test_a_row_of_another_seed_dpr_or_os_does_not_cover_the_same_leaf():
def test_a_row_that_does_not_show_is_red_and_says_it_is_stale_and_to_remove_it():
candidate = dumps(1)
candidate[(1.5, 63)] = _visit(63, 0) # the candidate reads what the published engine reads at seed 63: its 24 - 15 rows are gone from the run
candidate[(1.5, 63)] = _visit(63, 0) # the candidate reads what the published engine reads at seed 63: its 36 - 19 rows are gone from the run
report = judge(dumps(0), candidate, declared=ab.load_expected(FILE))
assert report["verdict"] == "red" and len(report["stale"]) == 15 and report["differences"] == []
assert report["verdict"] == "red" and len(report["stale"]) == 17 and report["differences"] == []
assert any("the declared difference 'linux-seed63-state.normal.innerHeight'" in p and "does not show in this run: it is stale, remove it" in p for p in report["problems"])
def test_when_the_published_engine_is_the_candidate_s_own_work_every_row_is_stale():
report = judge(dumps(1), dumps(1), declared=ab.load_expected(FILE))
assert report["verdict"] == "red" and len(report["stale"]) == 24 and report["declared"] == [] and report["differences"] == []
assert report["verdict"] == "red" and len(report["stale"]) == 36 and report["declared"] == [] and report["differences"] == []
def test_a_row_of_a_visit_this_run_did_not_make_is_not_judged_here():
only = ((1.0, 0),)
report = judge({k: v for k, v in dumps(0).items() if k in only}, {k: v for k, v in dumps(1).items() if k in only}, declared=ab.load_expected(FILE), expected=only)
assert report["verdict"] == "green", report["problems"]
assert report["declared"] == [] and report["stale"] == []
assert len(report["declared"]) == 4 and report["stale"] == [], "seed 0 at 1.0 has its four color rows (two leaves, two launches) and none of the bar rows of seeds 6 and 63"
# -
@@ -204,11 +225,11 @@ def test_the_rows_are_applied_to_the_a_b_from_the_files_and_never_to_the_a_a(tmp
for leg in ("linux-x86_64", "win-x86_64"):
rc, out = _run(tmp_path, capsys, "--leg", leg)
assert rc == 0 and "AB ORACLE OK: 0 differences, 0 problems" in out
assert out.count("DECLARED ") == 24 and "DIFF seed" not in out and "24 differences declared in ci/ab-oracle-expected.json" in out
assert out.count("DECLARED ") == 36 and "DIFF seed" not in out and "36 differences declared in ci/ab-oracle-expected.json" in out
rc, out = _run(tmp_path, capsys, "--a-a", "--leg", "linux-x86_64")
report = json.loads((tmp_path / "diff-a-a.json").read_text(encoding="utf-8"))
assert rc == 2 and report["declared"] == [] and report["stale"] == [] and len(report["differences"]) == 24, "the A/A is held to equality, whatever the file says"
assert out.count("DIFF seed") == 24 and "DECLARED" not in out
assert rc == 2 and report["declared"] == [] and report["stale"] == [] and len(report["differences"]) == 36, "the A/A is held to equality, whatever the file says"
assert out.count("DIFF seed") == 36 and "DECLARED" not in out
def test_the_a_b_from_the_files_is_red_on_the_old_command_line_data_without_the_rows_and_names_the_stale_one_with_them(tmp_path, monkeypatch, capsys):
@@ -218,11 +239,11 @@ def test_the_a_b_from_the_files_is_red_on_the_old_command_line_data_without_the_
_write(tmp_path, "dump-70.json", "firefox-70", dumps(0))
_write(tmp_path, "dump-candidate.json", "candidate", dumps(1))
rc, out = _run(tmp_path, capsys, "--leg", "linux-x86_64")
assert rc == 1 and out.count("DIFF seed") == 24 and "AB ORACLE FAILED: 24 differences, 24 problems" in out
assert rc == 1 and out.count("DIFF seed") == 36 and "AB ORACLE FAILED: 36 differences, 36 problems" in out
monkeypatch.setattr(ab, "EXPECTED_FILE", FILE)
_write(tmp_path, "dump-candidate.json", "candidate", dumps(0))
rc, out = _run(tmp_path, capsys, "--leg", "win-x86_64")
assert rc == 1 and out.count("is stale, remove it") == 24 and "FAIL the declared difference 'windows-seed6-state.normal.innerHeight'" in out
assert rc == 1 and out.count("is stale, remove it") == 36 and "FAIL the declared difference 'windows-seed6-state.normal.innerHeight'" in out
# -
@@ -269,7 +290,7 @@ def test_a_run_applies_the_rows_of_its_leg_to_the_a_b_only_and_a_published_engin
monkeypatch.setattr(ab, "_dump_visits", fake([dumps(0), dumps(0), dumps(1)]))
assert ab.run_ab("win-x86_64", tmp_path / "out", "firefox-70", ("pub", None), "cand", tmp_path / "s.json", list(CANDIDATE_SET)) == 0
assert len(json.loads((tmp_path / "out" / "diff.json").read_text(encoding="utf-8"))["declared"]) == 24
assert len(json.loads((tmp_path / "out" / "diff.json").read_text(encoding="utf-8"))["declared"]) == 36
assert json.loads((tmp_path / "out" / "diff-a-a.json").read_text(encoding="utf-8"))["declared"] == []
monkeypatch.setattr(ab, "_dump_visits", fake([dumps(0), dumps(1)])) # the published engine against itself reads what the candidate reads
assert ab.run_ab("linux-x86_64", tmp_path / "out2", "firefox-70", ("pub", None), "cand", tmp_path / "s.json", list(CANDIDATE_SET)) == 2
+42
View File
@@ -671,3 +671,45 @@ def test_the_required_suites_of_the_oracles_say_the_control_is_the_set():
for suite in ("wrapper.e2e.ab_oracle", "wrapper.e2e.ab_network", "wrapper.e2e.ab_host"):
assert "published set" in rows[suite]["note"].lower(), suite
assert "firefox-68" not in rows[suite]["note"], suite
# -
# The candidate's venv: the same kind of thing as the set's, from the candidate's wheels.
def test_the_candidate_s_venv_is_offline_over_the_gate_s_lock_with_the_candidate_s_two_wheels_and_nothing_of_the_job(tmp_path, monkeypatch):
house, _lock, _published, _candidate = _tiny_house(tmp_path)
ran = []
monkeypatch.setenv("PYTHONPATH", "/candidate/site")
monkeypatch.setattr(ps, "write_record", lambda venv, chosen: ran.append(("record", sorted(chosen))))
ps.install_candidate(house, tmp_path / "venv", run=lambda cmd, **kw: ran.append((cmd, kw)) or types.SimpleNamespace(returncode=0, stdout="", stderr=""))
venv_cmd, first, second, check, record = ran
assert venv_cmd[0][1:] == ["-m", "venv", str(tmp_path / "venv")] and check[0][1:] == ["-m", "pip", "check"]
assert record == ("record", ["invisible-core", "invisible-playwright"])
for cmd, kw in (first, second):
assert cmd[0] == str(ps.venv_python(tmp_path / "venv")) and "--no-index" in cmd and "PYTHONPATH" not in kw["env"]
assert "--require-hashes" in first[0] and first[0][first[0].index("--find-links") + 1] == str(house) and first[0][-2:] == ["-r", str(house / "lock.txt")]
assert "--no-deps" in second[0] and sorted(Path(x).name for x in second[0][-2:]) == ["invisible_core-70.83.0-py3-none-any.whl", "invisible_playwright-70.83.0-py3-none-any.whl"]
assert all(Path(x).parent == house for x in second[0][-2:]), "the wheels of the wheelhouse's own folder, never published/"
def test_the_candidate_s_venv_holds_the_candidate_s_wheels_read_back_from_the_disk(tmp_path):
house, lock, published, candidate = _tiny_house(tmp_path)
python = ps.install_candidate(house, tmp_path / "venv")
done = subprocess.run([str(python), "-I", "-c", "import invisible_core, invisible_playwright; print(invisible_core.WHO, invisible_playwright.WHO)"],
capture_output=True, text=True, check=True)
assert done.stdout.split() == ["candidate", "candidate"]
record = json.loads((tmp_path / "venv" / ps.RECORD_FILE).read_text(encoding="utf-8"))["packages"]
assert {n: record[n.replace("_", "-")]["sha256"] for n in NAMES} == candidate and candidate != published
def test_the_candidate_s_venv_is_refused_without_the_lock_and_without_exactly_one_candidate_wheel_of_each_package(tmp_path):
with pytest.raises(FileNotFoundError, match="not a py-deps wheelhouse"):
ps.install_candidate(tmp_path, tmp_path / "venv", run=lambda *a, **k: None)
house, _lock, _published, _candidate = _tiny_house(tmp_path)
(house / "invisible_core-70.84.0-py3-none-any.whl").write_bytes(b"x")
with pytest.raises(FileNotFoundError, match="exactly one wheel of the candidate"):
ps.install_candidate(house, tmp_path / "venv", run=lambda *a, **k: None)
(house / "invisible_core-70.84.0-py3-none-any.whl").unlink()
(house / "invisible_playwright-70.83.0-py3-none-any.whl").unlink()
with pytest.raises(FileNotFoundError, match="holds 0"):
ps.install_candidate(house, tmp_path / "venv", run=lambda *a, **k: None)