Automattic / Automattic/wp-codebox
Fail visual comparison when a captured document is an application error
- 主要言語
- TypeScript
- スター
- 16
- フォーク
- 4
- 平均マージ
- 59分
- マージ済み PR(30日)
- 131
説明
`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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
wordpress.visual-compare のキャプチャ境界から開始し、文書化された HTTP 200 PHP fatal/error response を再現します。DOM snapshot と screenshot の作成を通じたナビゲーションを追跡します。認識された runtime-error ドキュメントが role、URL、status、上限付きの理由を伴って fail closed になり、通常のページテキストに含まれる “error” は有効なままで、無効な screenshot が永続化されなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100