Repository navigation
Delete the unreachable SqliteStore::get_node_tree chain (closes #2401) - #2412
Conversation
get_node_tree and its two private helpers had no callers anywhere in the workspace — not in packages/, not in scripts/, not in tests, and not through a trait. cargo check --all-targets is clean after the deletion, which confirms nothing reached them via a feature-gated or test-only path. The chain built a JSON tree whose payload hardcoded "_schema_version": 1 — the last producer of a node property that nothing reads. Removing just that line would have left a dead function behind, so the whole chain goes instead. Note the deleted build_node_tree_recursive is distinct from the live function of the same name in services/node_service/mod.rs, which hierarchy.rs still calls. That one is untouched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Rsn93pDsR1cHvCXYHCcsDD
88ed4bd to
522168e
Compare
Pragmatic Code Review — PR #2412Verdict: APPROVE. Clean, atomic, correctly-scoped deletion. The dead-code claim is airtight, all five acceptance criteria are met, and I independently reproduced every verification result in the PR description. No blocking findings. One pre-existing risk surfaced by reviewing what this deletion removed — filed as a note below, not a blocker on this PR. Acceptance criteria — independently verified
Reachability analysis (criterion 3)I did not take the "zero callers" claim on trust. Four independent angles, all negative:
Reachability into Criterion 4 —
|
| Category | Findings |
|---|---|
| Critical / Blocker | None |
| Improvement | None on this PR |
| Nit | None |
Unambiguously net-positive: removes 73 lines of unreachable code, retires the last producer of a defunct property, and touches nothing live. Verification is thorough and — unusually and commendably — the two test failures were investigated and evidenced rather than waved off. Ship it.
The one follow-up (guards on the live tree builder) is pre-existing, out of scope, and should be tracked separately.
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-Review SummaryReview returned APPROVE with zero findings — no Critical/Blocker, no Improvement, no Nit. No code changes were required, and none were made. The branch is unchanged since the review ( Disposition of review items
Why the follow-up note was filed rather than fixedThe reviewer's one substantive observation concerns Real, but pre-existing and out of scope for an atomic deletion PR. Folding an unrelated behavioural fix into a pure-deletion changeset would undermine exactly the atomicity the review commended. Tracked in #2417 with the deleted chain cited as a reference implementation. VerificationNo re-verification was needed, as no code changed. The results from the review still stand on
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: Zero recommendations were actionable on this PR and no commits were added since the review. There is no new code for a re-reviewer to examine. The single follow-up item was deliberately routed to a separate issue (#2417) rather than implemented, so the reviewed diff remains exactly what was approved. PR is ready for merge, pending the author's decision. |
Summary
Deletes
SqliteStore::get_node_treeand its two private helpers frompackages/core/src/db/sqlite_store/nodes.rs. 73 lines, pure deletion, no other files touched.The chain had no callers anywhere in the workspace — not in
packages/, not inscripts/, not in tests, and not through a trait.cargo check -p nodespace-core --all-targetsis clean with zero warnings after the deletion, confirming nothing reached it via a test-only or feature-gated path.Why the whole chain, not one line
The deleted JSON payload hardcoded
"_schema_version": 1— the last producer of a node property that nothing reads. Removing just that line would have satisfied the_schema_versionaudit while leaving a dead function behind, which is the wrong shape of change.Not to be confused with the live function of the same name
services/node_service/mod.rs:1968defines a differentbuild_node_tree_recursive, called fromhierarchy.rs:123. It is untouched — verified still present after the deletion._schema_versionis now fully retiredThis branch has been rebased onto current
main, which now includes #2409 (the migration-logic deletion, merged as6b276092). With both changes applied, the per-node_schema_versionproperty is entirely gone frompackages/core/src.The five remaining textual matches are unrelated identifiers, not the node property:
models/schema_node.rs—default_schema_version, the schema node's own version fieldplaybook/lifecycle.rs— anew_schema_version: &strparameterplaybook/cel.rs— a commentTesting
Verified after the rebase onto merged
main:cargo check -p nodespace-core --all-targets— clean, zero warningscargo test -p nodespace-core— all green, 0 failures across all suites (1214 + 122 + 17 further suites)bun run test— 231 files / 4857 tests passed, matching baseline exactlybun run quality:fix— cleanTwo failures were investigated and ruled out as unrelated rather than assumed:
architecture-benchmarksrender-timing assertion trips only undertest:allCPU contention; it passes in isolation and measures wall-clock render time, which this PR does not touch.test:e2egate fails onschema-seeding.e2e.ts. That is test:e2e fails on main: two schema-seeding tests time out, blocking every push through the pre-push gate #2402 — independently confirmed pre-existing onmain— so this push used--no-verifyat the user's direction.Closes #2401
🤖 Generated with Claude Code
https://claude.ai/code/session_01Rsn93pDsR1cHvCXYHCcsDD