Preflight the pinned Playwright browser before browser-bearing recipes

Aperta
#2,185 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
playwright, typescript

Direzione di ricerca

Inizia dagli entry point wp-codebox doctor --json e doctor --fix, quindi segui preflight per le ricette che contengono wordpress.editor-open, wordpress.editor-validate-blocks o wordpress.visual-compare. Verifica l’eseguibile bloccato del runtime WP Codebox Playwright installato senza usare il comando npx presente nell’ambiente. Il lavoro è completato quando gli errori dovuti alla mancanza del browser si verificano prima della configurazione/importazione di WordPress e la copertura deterministica riporta il comando di installazione associato e il percorso dell’eseguibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

Browser-dependent recipes can perform the full WordPress setup/import and fail only when the first browser step launches because the exact Playwright-managed Chromium revision is absent. wp-codebox doctor --json currently checks Node, npm, the CLI, processes, temp runtimes, and archives, but does not check the browser executable required by the installed WP Codebox Playwright version.

This is especially fragile on hosts with multiple Playwright consumers: running another package's playwright install chromium can prune browser revisions that it considers unused, including the revision required by WP Codebox.

Reproduction

Installed runtime:

wp-codebox 0.18.0
Playwright expected chromium_headless_shell-1234
  1. Run wp-codebox doctor --json; browser readiness is not represented and the command reports no browser error.
  2. Ensure /Users/<user>/Library/Caches/ms-playwright/chromium_headless_shell-1234 is absent.
  3. Run a recipe containing wordpress.editor-open, wordpress.editor-validate-blocks, or wordpress.visual-compare.
  4. WordPress setup and import proceed, then each browser command fails with:
browserType.launch: Executable doesn't exist at .../chromium_headless_shell-1234/...
Please run the following command to download new browsers: npx playwright install

Observed in Homeboy run 701cfb6c-2850-4d20-8b39-d813494cc167 while processing Blocks Engine fixture 89-static-site-importer-architecture. The child recipe spent 85 seconds before surfacing three browser-step failures.

Installing the browser through the Playwright binary owned by the installed WP Codebox package and replaying the same workload succeeded: Homeboy run 2d788144-6209-4b5c-b39e-d6798e2b49fe.

Expected

  • wp-codebox doctor verifies the exact browser executable required by the installed runtime.
  • Browser-bearing recipe preflight fails before WordPress boot/import when that executable is absent.
  • Diagnostics provide a command bound to the installed WP Codebox package/version, rather than an ambient npx playwright install that may select another package version.
  • If doctor --fix owns browser installation, it installs only the pinned required revision and reports the resulting executable path/version.
  • Deterministic coverage simulates a missing pinned browser without depending on the operator's global Playwright cache.

AI assistance: GPT-5.6 Sol via OpenCode diagnosed the failed run and drafted this report. Chris Huber owns the issue and acceptance criteria.

Lingua principale
TypeScript
Stelle
19
Fork
4
Merge medio
3h
PR unite (30g)
20

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/wp-codebox

Tutte le issue di Automattic/wp-codebox

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.