Skip to content

refactor: Centralize embedding model constant for standalone scripts #549

Description

@NOVA-Openclaw

Problem

Every standalone embedding script hardcodes its own embedding model name, and they drift from the ecosystem standard (snowflake-arctic-embed2, 1024 dims). Mixed-model vectors silently corrupt the semantic index.

Evidence this is a recurring failure class, not a one-off:

  • Lessons 285, 321, 537 in the lessons table all describe embedding-model drift incidents
  • 2026-07-26: embed-blog-posts.py was found still using mxbai — fixed by hand, again
  • chore: Unify all embedding systems on snowflake-arctic-embed2 #223 unified the ecosystem on snowflake-arctic-embed2, but enforced it by editing each script individually — nothing prevents regression

Proposed fix

  1. Single shared source of truth for the embedding model name + dimensions — e.g. a config file (~/.config/nova-mind/embedding.conf or a table in nova_memory) or an env var, read by all nova-mind embedding scripts at startup.
  2. Grep audit of existing scripts for hardcoded EMBEDDING_MODEL / model-name strings; migrate each to the shared constant.
  3. Optional hardening: scripts fail loudly (refuse to write) if the model they resolve doesn't match the dimension recorded in memory_embeddings, instead of silently inserting mismatched vectors.

Context

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