Files
ujsx/tasks/review-reconciler.md
glm-5.1 c9c32a6aa6 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).
2026-05-18 16:26:52 +00:00

45 lines
1.8 KiB
Markdown

---
id: review-reconciler
name: Review key-based reconciliation
status: pending
depends_on: [commit-mutations]
created: 2026-05-18T16:22:57.261831485Z
modified: 2026-05-18T16:22:57.261831927Z
scope: narrow
risk: low
impact: phase
level: review
---
# Description
Review the full key-based reconciliation implementation before proceeding to unmount/dispose. This checkpoint verifies that the reconciler correctly handles add, remove, reorder, and update operations for both keyed and unkeyed children.
This is important because Phase 3 (dispose) will add teardown logic that depends on the reconciliation algorithm correctly identifying removed fibers. If reconciliation misclassifies a child as "removed" when it should be "moved," disposal will destroy an instance that still exists.
## Acceptance Criteria
- [ ] Keyed children: add/remove/reorder all produce correct host calls
- [ ] Unkeyed children: positional matching works for prop updates
- [ ] Mixed keyed + unkeyed: key-based for keyed, positional for unkeyed
- [ ] Duplicate keys: last-wins, no crash, warn logged
- [ ] Commit order: removes → inserts/moves → updates
- [ ] `insertBefore` used for moves and inserts with a target sibling
- [ ] Fiber tree structure matches the new UNode tree after reconciliation
- [ ] No orphaned fibers (removed fibers are pruned from parent's children)
- [ ] No leaked host instances (every `removeChild` called for removed fibers)
- [ ] Signal-driven prop updates still work alongside structural reconciliation
- [ ] All tests pass including host integration tests
## References
- docs/architecture/reconciler.md — Full reconciliation algorithm
- docs/architecture/lifecycle.md — Disposal depends on correct remove classification
## Notes
> To be filled on completion of review
## Summary
> To be filled on completion