🏷️ Priorité : HAUTE | Type : Bug
Problème
Lors d'un update incrémental, aucune vérification ne garantit que le modèle d'embedding correspond à celui de l'index existant. Changer de modèle entre deux runs produit des embeddings incompatibles dans le même index → recherches incohérentes.
Localisation
Fichier : apps/claude_code_rag.py, méthode run(), lignes ~340-342
# ACTUEL :
manifest = self._load_manifest(index_dir)
# ← PAS de vérification args.embedding_model vs manifest["embedding_model"]
if new_sessions:
self._do_incremental_update(args, new_sessions)
Comment reproduire
python -m apps.claude_code_rag --build (utilise contriever par défaut)
python -m apps.claude_code_rag --build --embedding-model BAAI/bge-m3
- L'incremental ajoute des embeddings BGE dans un index Contriever → corruption silencieuse
Correction attendue
manifest = self._load_manifest(index_dir)
manifest_model = manifest.get("embedding_model")
if manifest_model and manifest_model != args.embedding_model:
print(
f"Error: Embedding model mismatch.\n"
f" Index built with: {manifest_model}\n"
f" You specified: {args.embedding_model}\n"
f" Use --rebuild to recreate the index with the new model."
)
return
Critères de succès
🏷️ Priorité : HAUTE | Type : Bug
Problème
Lors d'un update incrémental, aucune vérification ne garantit que le modèle d'embedding correspond à celui de l'index existant. Changer de modèle entre deux runs produit des embeddings incompatibles dans le même index → recherches incohérentes.
Localisation
Fichier :
apps/claude_code_rag.py, méthoderun(), lignes ~340-342Comment reproduire
python -m apps.claude_code_rag --build(utilise contriever par défaut)python -m apps.claude_code_rag --build --embedding-model BAAI/bge-m3Correction attendue
Critères de succès
embedding_model(ancien format) → warning mais continue