Automattic / Automattic/wp-codebox
Add lifecycle-aware visual parity capture for runtime state
- 主要言語
- TypeScript
- スター
- 16
- フォーク
- 4
- 平均マージ
- 59分
- マージ済み PR(30日)
- 131
説明
## Problem
Visual parity currently compares pages after a fixed elapsed duration. Runtime components can be in semantically different states at that moment: source counters may be mid-transition while an imported editable candidate intentionally materializes a deterministic terminal state. Pixel comparison then reports a product defect even though the candidate preserves the declared stable state.
## Direction
Add a generic lifecycle-aware capture contract. A recipe step should be able to declare the visual state to compare, with explicit ready/stable hooks or normalized initial/terminal state semantics, instead of relying only on elapsed wall-clock duration. Keep WP Codebox generic and framework-agnostic.
## Acceptance
- Visual compare can wait for a declared stable lifecycle state on source and candidate.
- Existing duration-based captures remain supported.
- Timeout/readiness evidence names the requested and observed state.
- Repeated dynamic-component captures are deterministic.
- Unit and recipe-runner tests cover success and timeout behavior.
## Evidence
Automattic/blocks-engine#752 documents the Weebly counter case: source capture at 4 seconds observes transient values while deterministic candidate output uses terminal values.
## AI assistance
OpenAI gpt-5.6-sol through OpenCode analyzed the parity evidence and drafted this issue. Chris Huber remains responsible for scope and implementation decisions.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
visual-compare のキャプチャパスと recipe runner を追跡し、既存の Unit テストと recipe-runner テストを確認します。duration-based capture を維持しながら、recipe が安定した Lifecycle 状態を宣言する方法を定義します。完了条件は、Source と Candidate のキャプチャが要求された状態と観測された状態を待機して報告でき、決定論的な反復キャプチャと成功/timeout のカバレッジがあることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- testing-qa, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100