Repository navigation
Conversation
rtk-ai#469) * refactor(icm-cli): remove non-functional cloud sync, moving to icm-pro The `icm cloud login/logout/status/push/pull` commands called /api/icm/* endpoints that were never implemented server-side in rtk-cloud, so cloud sync has never actually worked from the OSS binary — `icm cloud status: connected` only reflected a parsed credentials.json, not a working sync. Cloud sync is moving to a new private icm-pro distribution (mirrors how rtk-pro carries RTK Cloud sync while the OSS rtk never has), where it will be built out with the real server-side routes and a background sync daemon. write_secret_file (TOCTOU-safe secret file writer, also used by the web dashboard password file) moves to config.rs since it has no other cloud-specific dependency. 358 tests pass; ureq stays (used by summarizer.rs's Ollama calls and upgrade.rs's self-update download, unrelated to cloud sync); rpassword is dropped (cloud-exclusive). * fix(icm-cli): gate write_secret_file behind the web feature It's only called from web.rs (feature = "web", non-default). Since cloud.rs (default-compiled) was removed, the default clippy build had no caller left and flagged it as dead code (-D warnings -> hard fail).
Author
|
Added The tests cover:
As a check, I disabled the rerank sort; the ordering test fails, so it catches that regression. Full gate passes: fmt, clippy |
Adds a `[recall] reranker` setting: `"jev:<model>"` reranks recall results with TypeSafe's Jev decision model over `TYPESAFE_API_KEY`, and an empty value (the default) keeps the existing hybrid ordering, so nothing leaves the machine unless it is turned on. Every candidate is scored in one batched request as an independent noul question, the candidate pool widens to 3x the limit so there is something to reorder, and Jev's relevance probability replaces the hybrid score before graph expansion folds in neighbours. Failures are loud: a missing key, an HTTP error or an unparseable response aborts the recall rather than silently returning unreranked results. Error messages never echo the API key or the response body, which can quote private memory text. Ported from memsearch's jev_reranker.py (zilliztech/memsearch). Co-Authored-By: Claude Code <noreply@anthropic.com>
Runs the compiled binary against a fake Jev server on localhost with an isolated DB, HOME and XDG config. Covers reorder-and-truncate by Jev score, the 3x over-fetch, the bearer auth header, fail-loud errors that leak neither the key nor the response body, and that the per-prompt hook makes no network call. Linux-only for the same sqlite-vec child-process reason as http_api_integration.rs. Co-Authored-By: Claude Code <noreply@anthropic.com>
nilhemdot
force-pushed
the
feat/recall-jev-rerank
branch
from
September 28, 2026 23:33
55f89bb to
0431b41
Compare
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
Opt-in remote reranking for
icm recall, configured with:When set,
icm recallover-fetches 3×limitcandidates, scores them in one batched request against TypeSafe's Jev API, and keeps the toplimitby relevance probability before graph expansion. Empty (the default) leaves recall unchanged.This ports the Jev reranker from memsearch (
zilliztech/memsearch,src/memsearch/jev_reranker.py) with the same prompt, criteria and response validation, so users moving from memsearch keep the same ranking behavior.Design notes
api.typesafe.ai. This is documented inconfig/default.toml.d0..dNmust be exactly present,type == "noul", numeric, and in[0, 1].recall_contexthook never makes network calls, per CONTRIBUTING's "cheap per-prompt path" rule. Only the expliciticm recallCLI reranks.ureqclient already inicm-cli, so no new dependencies.Testing
cargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warnings && cargo test --workspace: all pass.jev.rs:"how do I route claude through the proxy".Set TYPESAFE_API_KEY to enable Jev reranking.Jev reranking failed (HTTP 401).Note:
develop'sCargo.lockhas pre-existing version drift (icm-cli 0.10.63 vs 0.10.65), so--lockedbuilds fail ondevelop. I left it out of this PR.🤖 Generated with Claude Code