Automattic / Automattic/wp-codebox
Fail visual comparison when a captured document is an application error
- Lingua principale
- TypeScript
- Stelle
- 16
- Fork
- 4
- Merge medio
- 59m
- PR unite (30g)
- 131
Descrizione
`wordpress.visual-compare` accepts a navigation as successful when the server responds with HTTP 200 but renders an application/runtime fatal page. The command then screenshots the error document and emits pixel-comparison evidence as though it represented the requested site.
## Reproduction
1. Serve an HTML response with status 200 whose body is a PHP fatal/error document.
2. Run `wordpress.visual-compare` against that URL.
3. Observe that navigation and screenshot capture complete without a page error.
## Expected
Before DOM snapshot or screenshot creation, visual capture should fail closed when the main-document response is unsuccessful or the rendered document is a bounded, recognized runtime-error page. Failure evidence should include the role/URL, HTTP status, and bounded reason without persisting a screenshot as valid comparison evidence. Normal page copy containing words such as “error” must remain valid.
## AI assistance
GPT-5.6 Sol via OpenCode reproduced the blind spot, traced it to the visual-compare capture boundary, and drafted this issue. Chris Huber remains responsible for the report and resulting changes.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia al confine di acquisizione di wordpress.visual-compare e riproduci la documentata risposta HTTP 200 PHP fatal/error. Traccia la navigazione attraverso la creazione del DOM snapshot e dello screenshot; il lavoro è completato quando i documenti runtime-error riconosciuti falliscono in modalità fail closed con role, URL, status e una motivazione limitata, mentre il normale testo della pagina contenente “error” rimane valido e nessuno screenshot non valido viene persistito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100