Skip to content

cleanup: remove dead builder variants and unused accessor #513

Closed

Description

@ajianaz

Summary

Audit of uteke-core public API found 7 truly dead public functions — all builder-pattern constructors and one field accessor with zero external call sites across all workspace crates (cli, server, mcp).

Note: A prior audit report claimed 19 dead functions. After codebase verification, only 7 are actually unused. Functions like doc_breadcrumbs, doc_list_descendants, uteke_home, validate_input, set_source, unpin, is_configured, and recompute_importance are all actively used and should NOT be removed.

Dead Functions

Function Non-test call sites Status
open_with_tier_and_backend 0 🔴 Dead
open_with_tier 0 🔴 Dead
open_with_embedder 0 🔴 Dead
open_with_backend 1 (internal delegation from open() only) 🟡 Inline into open()
open_with_recall 1 (test-only) 🟡 Remove, refactor test
open_with_embedding 0 🔴 Dead
store() 0 🔴 Dead

Surviving Constructors

Function Used by
open(path) uteke-server, uteke-mcp, uteke-cli/bench
open_with_embedding_and_graph(...) uteke-cli main

Cleanup Plan

  1. Remove open_with_tier, open_with_tier_and_backend, open_with_embedder, open_with_embedding
  2. Inline open_with_backend into open() (single call site)
  3. Remove open_with_recall, refactor its test to use open() + per-call config
  4. Remove store() accessor (zero usage, field access via &self.store in impl blocks)
  5. Keep finish_open() and finish_open_full() (internal, used by surviving constructors)

Impact

  • Pre-1.0 (0.x.x) — breaking change acceptable per semver
  • No binary consumers outside workspace crates
  • Reduces API surface: 9 → 2 public constructors
  • finish_open stays as internal convenience for open()

Files

  • crates/uteke-core/src/lib.rs — dead function removal

Activity

  1. added a commit that references this issue on Jun 30, 2026
  2. added 2 commits that reference this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions