You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split the sqlite_store and node_service god-objects by concern #1503
sqlite_store.rs (~4900 lines / 93 methods) and node_service/mod.rs (~3900 lines) are god-objects that mix node CRUD, relationships, embeddings/vector, and search.
Problem Statement
The size and mixed responsibilities make the files hard to navigate and change safely; several other findings live inside them for that reason.
Proposed Solution
Split each along its natural concerns (node CRUD, relationships, embeddings/vector, search) into focused modules behind the same public surface.
Acceptance Criteria
sqlite_store and node_service are split into focused modules
Both god-objects are split into concern-focused modules behind an unchanged public surface (each child module is an additional impl block over the same struct; use super::* gives access to private fields/consts/helpers):
services/node_service/mod.rs → constructor/seeding/accessors stay; hierarchy/tree/move methods → new hierarchy.rs; mention_autocomplete → existing query.rs (the pre-existing crud/relationship/embedding/bulk/schema submodules untouched).
Verified pure relocation: the sorted set of pub/pub(crate) method signatures is byte-for-byte identical old-vs-new for both types; method bodies are unchanged. cargo fmt/clippy -D warnings clean; cargo test -p nodespace-core --lib 985/985; daemon, agent, and desktop app all compile against the unchanged API.
Lands ahead of the ADR-053 daemon multi-database work (#1532) so its service-assembly refactor builds on clean seams.
Activity
mstomar125 commentedon Jul 9, 2026
Done in #1588.
Both god-objects are split into concern-focused modules behind an unchanged public surface (each child module is an additional
implblock over the same struct;use super::*gives access to private fields/consts/helpers):db/sqlite_store.rs→db/sqlite_store/{mod,nodes,relationships,embeddings,search}.rsservices/node_service/mod.rs→ constructor/seeding/accessors stay; hierarchy/tree/move methods → newhierarchy.rs;mention_autocomplete→ existingquery.rs(the pre-existing crud/relationship/embedding/bulk/schema submodules untouched).Verified pure relocation: the sorted set of
pub/pub(crate)method signatures is byte-for-byte identical old-vs-new for both types; method bodies are unchanged.cargo fmt/clippy -D warningsclean;cargo test -p nodespace-core --lib985/985; daemon, agent, and desktop app all compile against the unchanged API.Lands ahead of the ADR-053 daemon multi-database work (#1532) so its service-assembly refactor builds on clean seams.