test(tests): R4.3d browser proofs on the production build: app import baseline on the Rust path, CSP with and without the keyword, leak series, WebKit repetition

Same perimeter as the TS baseline (226 files, 3 engines, real Home page): 666/678 outcome
and message agreements, the 12 others the 4 declared files; W5 0 long tasks (TS 91 and
173 ms); 50 MiB file in WebKit 145/126 MiB against 324 with the worker read and 76 for the
TS. CSP: editor opens with the keyword, the engine message without, in 3 engines, the
worker's wasm-eval refusal reported by Chromium and Firefox. Leak series on the app:
Chromium ≤ 2 MiB per import after init, Firefox GC sawtooth reclaimed, WebKit grows with
same-tab navigations (control too) and levels off on one page; 20/20 WebKit workers closed.
This commit is contained in:
bchanot committed 2026-10-18 19:48:31 +02:00
1 parent 8ddf185aa6
commit 08f01ef363
17 files changed
+26759 -28

No files matched your search

+7 -7
View File
@@ -35,8 +35,8 @@ import { sum } from './lib/stats.mjs'
const IMPORT_TIMEOUT_MS = 120_000
const SETTLE_MS = 5000
const PICK_LABEL = 'Choisir un fichier' // fr.ts home.import.cta
const IMPORT_ERROR = 'input[type="file"] ~ p.text-red-700'
export const PICK_LABEL = 'Choisir un fichier' // fr.ts home.import.cta
export const IMPORT_ERROR = 'input[type="file"] ~ p.text-red-700'
const READ_DIR = join(FIXTURES_DIR, 'pdf/r4/read')
const isPdf = (path) => path.endsWith('.pdf')
@@ -105,7 +105,7 @@ async function openHome(session, baseUrl) {
}
/** The first end of an import; the waits start before the file is set. */
function firstEnd(tab, path) {
export function firstEnd(tab, path) {
const { page, events } = tab
const ends = Promise.race([
tagged('editor', page.waitForURL('**/editor', { timeout: 0 })),
@@ -118,7 +118,7 @@ function firstEnd(tab, path) {
}
/** After an alert the app may still navigate or show its error. */
async function settle(tab, first) {
export async function settle(tab, first) {
if (first.kind !== 'dialog') return delay(300)
const { page } = tab
await Promise.race([
@@ -141,13 +141,13 @@ function longTasksOf(probe, since) {
}
/** Page clock: the input's change event to the first alert or navigation. */
function pageMsOf(probe) {
export function pageMsOf(probe) {
const ends = [probe.alertAt, probe.navAt].filter((t) => t !== null)
if (probe.changeAt === null || ends.length === 0) return null
return Math.min(...ends) - probe.changeAt
}
async function finalState(tab, since) {
export async function finalState(tab, since) {
const { page, events } = tab
const errorText = await page
.locator(IMPORT_ERROR)
@@ -165,7 +165,7 @@ async function finalState(tab, since) {
}
}
function resultOf(final) {
export function resultOf(final) {
if (final.finalPath === '/editor') return 'editor'
if (final.errorText) return 'error'
return final.dialogs.length ? 'dialog' : 'none'