Skip to content

cleanup: remove 7 dead public functions from uteke-core (#513) - #515

Merged
ajianaz merged 1 commit into
developfrom
cleanup/dead-code-issue-513
Jun 30, 2026
Merged

ajianaz merged 1 commit into
developfrom
cleanup/dead-code-issue-513

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes 7 dead public functions from uteke-core/src/lib.rs — all verified with zero external call sites across all workspace crates (cli, server, mcp).

Closes #513

Changes

Removed constructors (6)

Function Reason
open_with_tier 0 external call sites
open_with_tier_and_backend 0 external call sites
open_with_embedder 0 external call sites
open_with_backend Only called by open() — inlined
open_with_recall 1 test-only call — test refactored
open_with_embedding 0 external call sites

Removed accessor (1)

Function Reason
store() 0 external call sites

Surviving API

  • open(path) — used by uteke-server, uteke-mcp, uteke-cli/bench
  • open_with_embedding_and_graph(...) — used by uteke-cli main

Test refactor

  • test_recall_config_stored_but_override_per_call uses Uteke::open(":memory:") instead of removed open_with_recall

Net diff

-106 lines +3 lines = 109 line reduction in API surface.

Remove unused builder-pattern constructors and accessor:
- open_with_tier, open_with_tier_and_backend, open_with_embedder,
  open_with_backend (inlined into open), open_with_recall, open_with_embedding
- store() accessor (zero external call sites)

Surviving constructors: open() and open_with_embedding_and_graph().
Internal finish_open/finish_open_full unchanged.

Refactor test_recall_config_stored_but_override_per_call to use open()
instead of removed open_with_recall.

Closes #513
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

❌ Blocked — critical issues found.

🔴 Error (2)

  • crates/uteke-core/src/lib.rs:334 — This diff deletes several previously public constructors (open_with_embedder, open_with_tier, open_with_tier_and_backend, open_with_recall, open_with_backend, and open_with_embedding) from impl Uteke without adding replacements or deprecation shims. Any external crate or binary that relies on these public APIs will fail to compile after upgrading, even though the rest of the type remains public. Because these are exported methods in crates/uteke-core/src/lib.rs, this is a breaking change in the library surface.
  • crates/uteke-core/src/lib.rs:657 — The diff removes the public pub fn store(&self) -> &crate::memory::store::Store accessor. The deleted doc comment explicitly says callers use it for room/tag/document operations, so removing it strands any external code that currently depends on those APIs via Uteke::store(). This is another source-level breaking change in the published interface.

Review powered by cora-cli · BYOK · MIT

@ajianaz

ajianaz commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

CI: ✅ All checks pass

Build | Check | Clippy | Format | Test | Cora Review | Cargo Audit | Trivy — all green


Cora PR Comment Review

Cora PR comment flags 2 'errors' that are false positives:

Claim 1: Breaking change on removed constructors

Verdict: Intentional — documented in PR body. Pre-1.0 (0.x.x), zero external consumers outside workspace crates. All 6 removed constructors verified with grep -rn across cli/server/mcp — zero call sites.

Claim 2: store() accessor 'strands external code'

Verdict: False positive. Cora read the doc comment but didn't verify actual usage. grep -rn '.store()' crates/ --include='*.rs' returns zero external call sites. The accessor is dead code despite its helpful doc string.


Note: Cora CI check (GitHub Action) passed. The PR comment review and CI check are separate systems — CI is authoritative here. Ready to merge.

@ajianaz
ajianaz merged commit a03528a into develop Jun 30, 2026
9 checks passed
@ajianaz
ajianaz deleted the cleanup/dead-code-issue-513 branch June 30, 2026 07:43
ajianaz added a commit that referenced this pull request Aug 13, 2026
cleanup: remove 7 dead public functions from uteke-core (#513)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: remove dead builder variants and unused accessor

1 participant