Commit cb97149
fix(recall): prefer smart_score as ranking key in RecalledMemory (#154)
* fix(recall): prefer smart_score as ranking key in RecalledMemory deserialization
Server sorts recall results by smart_score (fallback weighted_score → score) but
RecalledMemory::deserialize only read score and weighted_score, causing .score to
differ from the actual rank order. Fix prioritizes smart_score, exposing the raw
smart_score and weighted_score as Option<f32> fields for analytics consumers.
Tests: 4 unit tests covering smart_score priority, weighted_score fallback, raw
score fallback, and flat-format decode.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
* fix(fmt): apply rustfmt — multi-line option chains and assert_eq wraps
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: SDK Lead <sdk-lead@dakera.ai>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent dbd3880 commit cb97149
2 files changed
Lines changed: 85 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
445 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
446 | 453 | | |
447 | 454 | | |
448 | 455 | | |
| |||
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
| 475 | + | |
468 | 476 | | |
469 | | - | |
470 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
471 | 483 | | |
472 | | - | |
473 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
474 | 489 | | |
475 | 490 | | |
476 | 491 | | |
| |||
518 | 533 | | |
519 | 534 | | |
520 | 535 | | |
| 536 | + | |
| 537 | + | |
521 | 538 | | |
522 | 539 | | |
523 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments