Skip to content

NodeService: is_persisted and non-cascading delete_leaf_node (for sync#596) #3859

Closed

Description

@mstomar125

Overview

Sync's conflict-journal drop (nodespace-sync#596) needs two additive core APIs.

Scope

  • NodeService::is_persisted(id): whether a node is a stored row, as opposed to a virtual date node (get_node returns a computed placeholder at version 1 for any unstored YYYY-MM-DD id, indistinguishable from a persisted one at snapshot 0).
  • NodeService::delete_leaf_node(id, expected_version): deletes exactly one node and its own edges, and reports HasChildren (deleting nothing) when a child exists at commit time, so a child created under the leaf after the caller collected its subtree is not orphaned. Same OCC, access gate and NodeDeleted event as delete_node.

Acceptance criteria

  • Both APIs are additive (no change to existing signatures, behaviour or wire types) and covered by tests that fail when the behaviour is removed.

Activity

  1. self-assigned this
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions