Skip to content

Validate and atomically publish lazy children #22

Description

@RayZhao1998

Parent

#16

What to build

Validate, order, and atomically publish lazy children while retaining interaction state across independently loaded branches.

Lazy discovery must preserve the same global identity and deterministic ordering guarantees as eager PreparedTree. Invalid results should be rejected before they can alter the visible hierarchy, and loading one branch must not disturb selection, focus, expansion, or cached children elsewhere.

Acceptance criteria

  • Child results are rejected atomically when an ID is duplicated within the result or collides anywhere in the discovered tree.
  • Invalid parent/child relationships and identity instability produce typed failures that can be retried without damaging the previous hierarchy.
  • Caller-provided order and every supported path sort policy produce deterministic results consistent with eager preparation.
  • Publishing children updates hierarchy indexes and visible projection through one model transaction.
  • Loading, failing, or retrying one branch retains valid selection, focus, expansion, search state, and loaded caches in other branches.
  • Collapsing and re-expanding a successful branch uses the cached result without invoking the provider again.
  • Flattened empty-directory chains have defined lazy behavior and retain canonical represented identities as each segment becomes known.
  • Tests cover local and global duplicate IDs, ordering modes, independent branch loading, state retention, empty children, flattening, and atomic rejection.
  • The Demo exercises out-of-order provider completion and demonstrates stable final ordering and retained selection.
  • Documentation states validation, ordering, atomicity, and model-lifetime cache guarantees.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions