Repository navigation
Audit & cleanup: finish daemon + SQLite migrations (purge dead HTTP MCP / SurrealDB / RocksDB from code and docs) - #1230
Conversation
…l/rocksdb naming (#1226) Reconciles the code with two completed migrations (daemon-client ADR-031/032, SQLite/libsql #1222/#1224) that left dead code and stale naming behind. A1 — MCP transport vs. live handler library: - Extract the transport-agnostic library logic the agent/daemon/benches still use out of `core/src/mcp/handlers/` into normal core modules: * `core/src/markdown/` (convert/template/links/export + MarkdownError, replacing the MCPError dependency) * `core/src/schema/` (handle_create_schema / handle_update_schema) * `core/src/node_batch.rs` (batch get/update used by perf benches) * `core/src/agent_params.rs` (Search*Params used by the local agent) - Repoint agent (skill_pipeline, prompt_assembler, local_agent/tools), daemon (main, import_service), and benches to the new module paths. - Delete the dead HTTP/JSON-RPC transport entirely: the whole `core/src/mcp/` tree, `services/mcp_server_service.rs`, and `dev-tools/src/bin/dev-mcp.rs` (its only caller). The dev-tools Rust crate had no other source, so it's removed from the workspace (dev-proxy.ts is a standalone Bun script). - Delete the orphaned handler integration tests (mcp_handlers_integration_test, relationships_handler_test, search_handler_test). A2 — Drop the `SqliteStore as SurrealStore` compatibility alias and rename all 241 `SurrealStore` identifiers to `SqliteStore`. A3 — Proto consolidation: `packages/proto/proto/` is the single source (the only protos Rust compiles). Deleted the stale `packages/daemon/proto/` copy (its node_service.proto was missing the relationship events) and repointed the TS consumers (dev-proxy.ts, agent-tools/client.ts) to the canonical path. A4 — Cleanse all surreal/rocksdb naming residue from `.rs`/`.ts` comments, doc-comments, test fixtures, and string literals; obsolete "eventual consistency / write visibility" caveats (false under SQLite) reworded or removed. Deleted the stray nested check-dev-deps.ts that gated dev startup on a SurrealDB CLI binary. `grep -riE "surreal|rocksdb"` over .rs/.ts is now empty. Also fixes a latent SQLite-migration bug surfaced by the cleanup: CLI `diagnostics` sized the database by walking it as a RocksDB directory tree; SQLite is a single file, so it now sizes the file (plus -wal/-shm sidecars) or a directory. Tests: core 966 lib + 223 integration, agent 223 lib, daemon 36, cli 5, src-tauri 24, agent-tools 17, frontend 3913 — all green. (Live-Ollama integration tests require a running model and are excluded.) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Code Review — PR #1230 (Part A of #1226)Scope reviewed: the new/moved logic (markdown/schema/node_batch/agent_params extraction, MCPError→MarkdownError, diagnostics Requirements Check (Part A — #1226)
Findings🔴 CriticalNone. 🟡 Improvements
🟢 Nits / Observations
StandardsNo lint suppression, no Recommendation: COMMENT (approve-with-nits)Net-positive, well-executed cleanup that faithfully extracts live logic, deletes dead transport, and fixes a real SQLite sizing bug. No blockers. Please address the broken |
malibio
left a comment
There was a problem hiding this comment.
Reviewed (initial). Net-positive cleanup, no blockers. Two non-blocking items: (1) broken [mcp] rustdoc link in core/src/lib.rs:20 introduces a cargo doc warning — delete it; (2) residual 'MCP handler/tool/request' comments in the relocated markdown/schema modules describe the deleted transport as current (A4 intent). Full review posted as a PR comment. Recommendation: COMMENT / approve-with-nits.
…modules (#1226) Fixes the broken [`mcp`] rustdoc link in lib.rs and the residual 'MCP handler/tool/request' wording in the relocated markdown/schema modules and their tests — the MCP transport no longer exists; these are now plain core library functions. Comment-only; core builds green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Addressed the two 🟡 nits in commit 7d3d8c9e:
Comment-only; |
…ments (#1226) Completes the review-nit sweep: the `# MCP Tool:` headings in schema/mod.rs and the residual 'MCP request/response/tool' comments in markdown/mod.rs are now phrased as plain library docs. Legitimate historical MCP references in error.rs/node_batch.rs/agent_params.rs (explaining the relocation) are kept. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Re-Review — PR #1230 (Part A of #1226)Review Type: Re-Review Previous Review SummaryThe prior review (2026-05-29) returned COMMENT (approve-with-nits) with two 🟡 recommendations:
Outcome: 2/2 addressed. No recommendations outstanding. No new issues introduced. Verification of Fixes🟢 Nit 1 resolved — 🟢 Nit 2 resolved —
Regression Check🟢 The two fix commits (3478e3a, 910787d) are comment-only. FindingsNone new. No blockers. (Note: flaky live-Ollama integration tests are environmental and unrelated to this PR. Part B docs reconciliation is correctly scoped to a separate PR in the nodespace-docs repo and is not expected here.) This cleanup PR is a clear net improvement to code health with both prior nits fully resolved. Approving. |
malibio
left a comment
There was a problem hiding this comment.
Re-review: both prior nits (broken [mcp] doc link in lib.rs; stale MCP wording in relocated markdown/schema modules + test headers) are fully resolved. Fix commits are comment-only, no logic changes; build green. No new findings — approve-equivalent (GitHub blocks self-approval on own PR). See summary comment for full details.
|
Part B (docs reconciliation) is up as a companion PR: NodeSpaceAI/nodespace-docs#49 — rewrites the DB + MCP/daemon architecture docs and ADR-031 to match this PR's reality (SQLite/libsql + gRPC-only daemon). |
…CP / SurrealDB / RocksDB from code and docs) (#1230) * Part A: purge dead HTTP MCP transport, SurrealStore alias, and surreal/rocksdb naming (#1226) Reconciles the code with two completed migrations (daemon-client ADR-031/032, SQLite/libsql #1222/#1224) that left dead code and stale naming behind. A1 — MCP transport vs. live handler library: - Extract the transport-agnostic library logic the agent/daemon/benches still use out of `core/src/mcp/handlers/` into normal core modules: * `core/src/markdown/` (convert/template/links/export + MarkdownError, replacing the MCPError dependency) * `core/src/schema/` (handle_create_schema / handle_update_schema) * `core/src/node_batch.rs` (batch get/update used by perf benches) * `core/src/agent_params.rs` (Search*Params used by the local agent) - Repoint agent (skill_pipeline, prompt_assembler, local_agent/tools), daemon (main, import_service), and benches to the new module paths. - Delete the dead HTTP/JSON-RPC transport entirely: the whole `core/src/mcp/` tree, `services/mcp_server_service.rs`, and `dev-tools/src/bin/dev-mcp.rs` (its only caller). The dev-tools Rust crate had no other source, so it's removed from the workspace (dev-proxy.ts is a standalone Bun script). - Delete the orphaned handler integration tests (mcp_handlers_integration_test, relationships_handler_test, search_handler_test). A2 — Drop the `SqliteStore as SurrealStore` compatibility alias and rename all 241 `SurrealStore` identifiers to `SqliteStore`. A3 — Proto consolidation: `packages/proto/proto/` is the single source (the only protos Rust compiles). Deleted the stale `packages/daemon/proto/` copy (its node_service.proto was missing the relationship events) and repointed the TS consumers (dev-proxy.ts, agent-tools/client.ts) to the canonical path. A4 — Cleanse all surreal/rocksdb naming residue from `.rs`/`.ts` comments, doc-comments, test fixtures, and string literals; obsolete "eventual consistency / write visibility" caveats (false under SQLite) reworded or removed. Deleted the stray nested check-dev-deps.ts that gated dev startup on a SurrealDB CLI binary. `grep -riE "surreal|rocksdb"` over .rs/.ts is now empty. Also fixes a latent SQLite-migration bug surfaced by the cleanup: CLI `diagnostics` sized the database by walking it as a RocksDB directory tree; SQLite is a single file, so it now sizes the file (plus -wal/-shm sidecars) or a directory. Tests: core 966 lib + 223 integration, agent 223 lib, daemon 36, cli 5, src-tauri 24, agent-tools 17, frontend 3913 — all green. (Live-Ollama integration tests require a running model and are excluded.) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Address review: remove stale MCP doc-comment references in relocated modules (#1226) Fixes the broken [`mcp`] rustdoc link in lib.rs and the residual 'MCP handler/tool/request' wording in the relocated markdown/schema modules and their tests — the MCP transport no longer exists; these are now plain core library functions. Comment-only; core builds green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Address review: drop remaining MCP wording in schema/markdown doc-comments (#1226) Completes the review-nit sweep: the `# MCP Tool:` headings in schema/mod.rs and the residual 'MCP request/response/tool' comments in markdown/mod.rs are now phrased as plain library docs. Legitimate historical MCP references in error.rs/node_batch.rs/agent_params.rs (explaining the relocation) are kept. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Closes #1226