Skip to content

fix: startup dimension validation — stored vs configured mismatch is silent #28

@sparkling

Description

@sparkling

Bug

No validation at startup comparing stored vector dimensions against the configured embedding model dimension. If a user changes their model (e.g., 384→768), searches silently return meaningless scores.

Impact

Users switching models get garbage results with no error message. The only indication is poor search quality — not an actionable diagnostic.

Fix

  • Added getStoredDimension() to RvfBackend — reads dimension from RVF header without loading all entries
  • Added validation in ControllerRegistry.initialize() — compares stored vs configured dimension, throws EmbeddingDimensionError with actionable message in strict mode

Commit: ff50410 (ADR-0076 Track A)

ADR Reference

ADR-0076 A3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions