2026-02-27T15-50-33_auto_memory/memories.db-wal, memory/2026-02-27-predicto

This commit is contained in:
Nicholai Vogel 2026-02-27 08:50:33 -07:00
parent 734e32268c
commit c75417c9d0
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# 2026-02-27 Session Notes
## Predictor Bug Fix: Reject Mismatched candidate_features
Nicholai implemented a fix to eliminate silent data corruption in `packages/predictor/src/main.rs` (line 79). The code previously silently replaced mismatched `candidate_features` vectors with all-zero values when their length didn't match `candidate_ids`. This masked upstream bugs and degraded ranking quality without signaling the problem.
The fix changed the logic to:
1. If `candidate_features` is empty → zero-fill (correct, feature not provided)
2. If length matches `candidate_ids` → use as-is (correct, provided correctly)
3. If provided but length mismatches → return explicit error (fixed from silent zero-fill)
This brings consistency with how `candidate_embeddings` and `candidate_texts` already handle the same scenario (returning explicit length-mismatch errors). The change was applied via Edit tool and preserves the empty-features fallback behavior while fixing the dangerous silent-corruption case.

Binary file not shown.