--- id: value-equal-bailout name: Value.Equal bail-out for unchanged subtrees status: pending depends_on: [review-reconciler] created: 2026-05-18T16:22:57.339429429Z modified: 2026-05-18T16:22:57.339429873Z scope: narrow risk: low impact: component level: implementation --- # Description Add `Value.Equal` as the first TypeBox optimization layer. When reconciling, if a fiber's cached node is deep-equal to the next node, skip the entire subtree — no `prepareUpdate`, no `commitUpdate`, no children reconciliation. This is the highest-impact optimization according to the architecture doc because it skips entire subtrees. It's also the simplest to implement and has no constraints (unlike `Value.Hash` which has the global accumulator issue). The optimization is applied during `reconcileProps`: ``` if Value.Equal(fiber.cachedNode, nextNode): return // skip this fiber and all children ``` ## Acceptance Criteria - [ ] `Value.Equal` check added before property reconciliation - [ ] If fiber's cached node equals next node, skip `prepareUpdate` and children reconciliation - [ ] Cached node stored on fiber (new `cachedNode` field or reuse `props` snapshot) - [ ] Correctness: behavior is identical with and without the optimization - [ ] Existing tests pass - [ ] New test: unchanged subtree skips `prepareUpdate`/`commitUpdate` - [ ] New test: changed prop still triggers `prepareUpdate` - [ ] New test: deeply nested unchanged subtree is fully skipped ## References - docs/architecture/reconciler.md — TypeBox Optimization Layer, Value.Equal row - docs/architecture/reconciler.md — Optimization Strategy (step 1) ## Notes > To be filled by implementation agent ## Summary > To be filled on completion