Skip to content

R3: eliminate code duplication across crates #271

@bug-ops

Description

@bug-ops

Epic: #268 | Phase: 3 — Deduplication | Priority: P1 | Complexity: M

Tasks

R3.1 — Qdrant collection management [M]

ensure_collection duplicated in 4 locations:

  • zeph-memory/src/qdrant.rs:67
  • zeph-index/src/store.rs:73
  • zeph-mcp/src/registry.rs:261
  • zeph-skills/src/qdrant_matcher.rs:258

Extract shared ensure_collection_exists() into zeph-memory::qdrant.

R3.2 — File watcher boilerplate [M]

Identical notify_debouncer_mini setup in:

  • zeph-core/src/config_watcher.rs
  • zeph-index/src/watcher.rs
  • zeph-skills/src/watcher.rs

Extract shared watch_path() utility.

R3.3 — blake3 hashing [S]

Independent blake3 hex hashing in zeph-mcp, zeph-index, zeph-skills. Extract content_hash().

R3.4 — Test mock consolidation [S]

MockProvider/MockChannel/StubProvider/FakeProvider defined independently in 6 locations. Create shared test utilities.

Blocked by: #270 (R1 error enums for R3.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions