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
Every storage implementation in the workspace was reachable through
`MemoryProvider` except the one this crate ships. The TinyCortex adapter
binds the bundled engine, `adapters/remote` binds the three hosted
services, and `tinymemory-core`'s own `UnifiedMemory` -- the store
OpenHuman actually uses -- could only be reached by naming its concrete
type. `create_memory` returning `Box<dyn Memory>` is exactly the bypass
§A3 names.
Nothing structural was missing, and that is worth recording because this
was mis-diagnosed as needing the crate split. After §C1 landed, zero files
in `core/` name the `tinycortex` crate outside the seam -- §A3's first
clause is already satisfied. The 27 files still coupled are `rusqlite`-only,
which is §D2's concern, not this one. `UnifiedMemory` already implements
the contract's `Memory`, and `MemoryTraitProvider` already wraps any
`Memory` into a provider, so this is the one-line composition the adapters
have been doing all along.
`NAMESPACE_DRIVER_ID` is reserved rather than reusing `tinycortex`: they
are two different engines that happen to share a class, and a host that
bound one has not bound the other. The name matches what
`effective_memory_backend_name` has always returned, so status output does
not introduce a third vocabulary for one store.
The provider advertises the mandatory three and nothing else, because that
is what `Memory` can express. Widening it is §C3's shape of work.
Fixes a contract violation the binding immediately exposed
------------------------------------------------------------------
Pointing the conformance suite at this store failed on the first
round trip:
namespace: session not preserved
left: None
right: Some("session-1")
`memory_docs` has a `session_id` column and `list` selects it; `get` did
not, and hardcoded `session_id: None`. The two readers disagreed about the
same row -- list a namespace and the session is there, fetch that exact key
and it is gone. Silent, and invisible until the store was held to the same
standard as the adapters. `get` now selects the column it was already
writing.
Tests
-----
`store::factories_provider_test` mirrors the adapters' `conformance_test.rs`:
the full suite, a retention probe, `audit_provider`, the driver id, and
registry admission. The retention probe is deliberate -- the suite tolerates
a driver that refuses a write, so without it a store that silently kept
nothing would pass vacuously.
cargo fmt --all -- --check: clean
cargo clippy --workspace --all-targets --all-features: clean
cargo test --workspace: 1211 passed, 0 failed (core 798 -> 803)
0 commit comments