decompose reconciler roadmap into 20 implementation tasks across 5 phases

Tasks follow the architecture spec phases:
- Phase 0: key field on UElement (2 tasks + review)
- Phase 1: reactive-host bridge / fiber tree (4 tasks + review)
- Phase 2: key-based children reconciliation (3 tasks + review)
- Phase 3: unmount & dispose support (4 tasks)
- Phase 4: TypeBox value optimizations (4 tasks)

Validated with taskgraph CLI: no cycles, 15 parallel generations,
3 high-risk tasks identified (signal-driven-updates, commit-mutations,
fiber-disposal).
This commit is contained in:
2026-05-18 16:26:52 +00:00
parent 8cd4091afc
commit c9c32a6aa6
20 changed files with 993 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
---
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