refactor: split memory API surface into a memory-api crate#1261
Conversation
The cli, tui, and install crates depended on the full memory crate but only used its HTTP client, domain types, and SQLite migration helpers - never the lancedb vector store. That coupling put the entire lancedb/datafusion/arrow graph (495 of the workspace's 573 dependencies) in the build closure of every API consumer. Move types, client, entity, and migration into a new memory-api crate with only lightweight dependencies (serde, reqwest, sea-orm). The memory service depends on it and re-exports the modules, so its public API and internal crate:: paths are unchanged. Consumers now depend on memory-api directly: the cli dependency closure drops from 495 to 348 crates and no longer waits on the lance graph to compile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This change is part of the following stack: Change managed by git-spice. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1261 +/- ##
==========================================
+ Coverage 46.13% 46.17% +0.04%
==========================================
Files 390 390
Lines 27293 27293
Branches 2501 2548 +47
==========================================
+ Hits 12592 12603 +11
+ Misses 14679 14668 -11
Partials 22 22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review: refactor: split memory API surface into a memory-api crate
Stack positionTargets What the PR doesExtracts the lightweight API surface of the CorrectnessRe-export chain verified end-to-end:
use crate::{
entity::memory_entry as mem_entity,
migration::Migrator,
types::{CreateMemoryRequest, Memory, MemoryType, VisibilityLevel},
...
};All three paths are satisfied by the new pub(crate) use memory_api::migration; // crate::migration::Migrator ✓
pub use memory_api::{..., entity, ..., types}; // crate::entity, crate::types ✓
Dependency consistency: Backward compatibility: The Consumer updates are complete and consistent: cli, tui, and install all update their Design note (non-blocking)
If hiding it ever matters, the alternative would be duplicating the What looks good
Approving. |
The cli, tui, and install crates depended on the full memory crate but
only used its HTTP client, domain types, and SQLite migration helpers -
never the lancedb vector store. That coupling put the entire
lancedb/datafusion/arrow graph (495 of the workspace's 573 dependencies)
in the build closure of every API consumer.
Move types, client, entity, and migration into a new memory-api crate
with only lightweight dependencies (serde, reqwest, sea-orm). The memory
service depends on it and re-exports the modules, so its public API and
internal crate:: paths are unchanged. Consumers now depend on memory-api
directly: the cli dependency closure drops from 495 to 348 crates and no
longer waits on the lance graph to compile.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com