Skip to content

feature: introduce a shared Milvus lifecycle seam across runtime stores #1601

@Xunzhuo

Description

@Xunzhuo

Describe the feature

Create a shared Milvus lifecycle seam so cache, memory, vectorstore, and replay stores stop reimplementing the same connection/bootstrap/index/load/retry mechanics independently.

Primary files and seams:

  • src/semantic-router/pkg/memory/milvus_store.go
  • src/semantic-router/pkg/cache/milvus_cache.go
  • src/semantic-router/pkg/cache/hybrid_cache.go
  • src/semantic-router/pkg/vectorstore/milvus_backend.go
  • src/semantic-router/pkg/routerreplay/store/milvus.go
  • src/semantic-router/pkg/responsestore/{interface.go,factory.go}

Primary layer

global level

Why this layer?

This is a backend-adapter architecture cleanup shared by multiple runtime packages rather than a single signal/plugin feature.

Why do you need this feature?

The current repo audit confirmed that Milvus lifecycle logic is still duplicated across several packages:

  • client setup
  • collection bootstrap
  • index creation
  • collection loading
  • retry/flush policy

Those packages have domain-specific query semantics on top, but the lifecycle mechanics are largely the same.

This gap is tracked in docs/agent/tech-debt/td-021-milvus-adapter-duplication-across-runtime-stores.md and in docs/agent/plans/pl-0006-design-elegance-ratchet.md, but there is currently no dedicated GitHub issue for external contributors.

Additional context

Suggested acceptance criteria:

  • a shared adapter/helper is used by the main Milvus-backed runtime packages instead of repeating bootstrap logic in each package
  • collection creation, index creation, loading, and retry policy are defined once unless a store has a strong domain-specific reason to diverge
  • domain package tests focus on schema/query semantics instead of repeatedly mocking the same lifecycle behavior
  • validation includes make test-semantic-router and the relevant agent gates for touched files

This is a good help wanted item, but not a good first issue: contributors need to understand multiple runtime store packages and avoid flattening away domain-specific semantics while extracting the shared Milvus seam.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions