Skip to content

Delete the unreachable SqliteStore::get_node_tree chain and the last _schema_version trace #2401

Closed

Description

@malibio

Problem

SqliteStore::get_node_tree and its two helpers have no callers anywhere in the workspace — not in packages/, not in scripts/, not in tests, and not through a trait.

The chain is:

  • get_node_tree (packages/core/src/db/sqlite_store/nodes.rs:1517) — pub async fn, zero callers
  • build_node_tree_recursive (:1527) — called only by get_node_tree
  • build_node_tree_with_guards (:1539) — called only by build_node_tree_recursive and itself

Note there is a live, unrelated build_node_tree_recursive in services/node_service/mod.rs:1844 (used by hierarchy.rs:123). Same name, different function — don't delete that one.

Why this is worth its own issue

Found while deleting the migration machinery in #2389. The dead chain's JSON payload contains a hardcoded "_schema_version": 1 (:1584) — the last remaining trace of a node property that nothing reads now that the lazy-migration registry is gone.

It was left in place deliberately: removing just that one line would have "fixed" the _schema_version audit while leaving a dead function behind, which is the wrong shape of change. The right fix is to delete the whole chain, and that is a separable cleanup rather than something to fold into the migration deletion.

Acceptance criteria

  • get_node_tree, build_node_tree_recursive, and build_node_tree_with_guards deleted from packages/core/src/db/sqlite_store/nodes.rs
  • The unrelated same-named build_node_tree_recursive in services/node_service/mod.rs left intact
  • Confirm no caller appears via a trait impl or feature-gated path before deleting
  • No _schema_version references remain in packages/core/src (the property is fully retired)
  • Full test suite green

Activity

  1. malibio commented on Sep 7, 2026

    @malibio
    CollaboratorAuthor

    Baseline (worktree issue-2401-delete-get-node-tree): Frontend: 231 test files passed, 4857 tests passed.

  2. self-assigned this
    on Sep 7, 2026
  3. added a commit that references this issue on Sep 7, 2026
    67ce770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions