Skip to content

feat(embedkit): add Result type and quantization-aware SameSpace guard - #85

Merged
danieljustus merged 1 commit into
mainfrom
session/20260801-155621
Aug 1, 2026
Merged

feat(embedkit): add Result type and quantization-aware SameSpace guard#85
danieljustus merged 1 commit into
mainfrom
session/20260801-155621

Conversation

@danieljustus

Copy link
Copy Markdown
Owner

New embedkit package: Result{Vector, Source, Model, Dim, Quant} as the
shared embedding-provenance type, and SameSpace(a, b Result) bool as the
embedding-space identity guard. SameSpace distinguishes model,
quantization level, and dimension — a 4-bit MLX embedding and an
unquantized Ollama embedding of the same nominal model are different
spaces and must never compare as equal.

This is the foundation sub-issue of #74; the provider abstraction,
cache, and dimension-pinning sub-issues (#82, #83, #84) build on this
Result type.

Closes #81

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

New embedkit package: Result{Vector, Source, Model, Dim, Quant} as the
shared embedding-provenance type, and SameSpace(a, b Result) bool as the
embedding-space identity guard. SameSpace distinguishes model,
quantization level, and dimension — a 4-bit MLX embedding and an
unquantized Ollama embedding of the same nominal model are different
spaces and must never compare as equal.

This is the foundation sub-issue of #74; the provider abstraction,
cache, and dimension-pinning sub-issues (#82, #83, #84) build on this
Result type.

Closes #81

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@danieljustus danieljustus added this to the v0.8.1 milestone Aug 1, 2026
@danieljustus
danieljustus marked this pull request as ready for review August 1, 2026 14:06
@danieljustus
danieljustus merged commit 143a523 into main Aug 1, 2026
8 checks passed
@danieljustus
danieljustus deleted the session/20260801-155621 branch August 1, 2026 14:06
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.

embedkit: Result type and quantization-aware SameSpace guard

1 participant