Severity: medium · Category: implementation bug
Evidence (verified in browser). For an element CHILD of an island, the comparison o.outerHTML !== nn.outerHTML compares a live subtree (DSD template consumed) against a freshly parsed one (template present): always unequal. An island whose light DOM contains a nested DSD element is therefore always judged 'changed' and replaced, resetting state on every morph.
Fix. Replace the outerHTML element-child comparison with a recursive comparison that applies the same normalization (skip template[shadowrootmode], skip whitespace-only text) on both sides.
Acceptance. a nested-DSD child compares intact; unit/e2e pins it.
Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.
Severity: medium · Category: implementation bug
Evidence (verified in browser). For an element CHILD of an island, the comparison
o.outerHTML !== nn.outerHTMLcompares a live subtree (DSD template consumed) against a freshly parsed one (template present): always unequal. An island whose light DOM contains a nested DSD element is therefore always judged 'changed' and replaced, resetting state on every morph.Fix. Replace the
outerHTMLelement-child comparison with a recursive comparison that applies the same normalization (skiptemplate[shadowrootmode], skip whitespace-only text) on both sides.Acceptance. a nested-DSD child compares intact; unit/e2e pins it.
Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.