Repository navigation
fix(cli): an explicit --store never routes through a running server - #1444
Merged
Merged
Conversation
With [server] enabled = true and a server up, remember/recall/search/list/ stats/forget were sent to the server, which serves its own store, so an explicit --store was silently ignored and data went to the wrong database (the LongMemEval harness always passes --store). Server routing is now decided by should_route_via_server(), which returns false whenever --store is set; the cheap check runs before the network probe. UTEKE_HOME is unchanged. (#1439 B4)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 13, 2026
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
[server] enabled = trueanduteke-serverunning, an explicit--storethat names a different store than the default now runs locally instead of going to the server. A--storethat points at the default store still uses the server. The routing decision lives in a pure function,should_route_via_server(crates/uteke-cli/src/main.rs).default_store_path, soresolve_store_pathand the routing decision cannot drift apart.benchmarks/longmemeval/scripts/modal_fast50.pynow readsUTEKE_RELEASE, likemodal_fanout.py. It used to be hardcoded to v0.15.0.### Fixedentry.Why
remember,recall,search,list,statsandforgetwent to the server, which serves its own store.--store <other path>was silently ignored, so data was written to and read from the wrong database.--store <tmp>, so on a machine with server routing enabled its numbers came from the wrong store. Plan item B4 for decide the HTTP/MCP/CLI behaviour differences found by the typed-request work (#1343 follow-up) #1439.--storeat the default store still routes. The server holds an exclusive lock on that store's vector index. Opening it locally would wait 30 s and then fail, which is what a first version of this change did.Testing
Commands.
cargo test -p uteke-clipasses (120 + 3).cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningsare clean.routing_tests. Another store never routes. A store equal to the default routes, also with a trailing slash. No--storeroutes only when the server is enabled.Local A/B against a real
uteke-serveon a temp port, with a temputeke.tomlthat enables routing:--store X remember--store X remember--store <server's store>/LongMemEval fast50: not run. The dataset (
longmemeval_s_cleaned.json, 277 MB) is not on this machine, and downloading it was not approved for this PR. The change is still benchmark-neutral by construction. The harness runs with server routing disabled ([server] enableddefaults tofalse). With routing disabled,should_route_via_serverreturnsfalsebefore looking at--store, exactly like the oldconfig.server.enabled && .... No recall, import or ranking code is touched.Known gap, out of scope.
UTEKE_HOMEon its own, without--store, still routes to the server when the server is enabled. Tracked in cli: UTEKE_HOME alone still routes to a running server that serves another store #1445.