Skip to content

KS78: Recency tie-breaker for score equality (#13)#28

Open
Liorrr wants to merge 1 commit intomasterfrom
fix/ks78-recency-clean
Open

KS78: Recency tie-breaker for score equality (#13)#28
Liorrr wants to merge 1 commit intomasterfrom
fix/ks78-recency-clean

Conversation

@Liorrr
Copy link
Copy Markdown
Contributor

@Liorrr Liorrr commented Apr 10, 2026

Summary

  • Adds microsecond-precision recency epsilon (step 7c7) after the inflation cap so newer memories win ties when final_score values are identical
  • Fixes test matcher for google_result to exclude the Meta memory (both memories contain "Google", causing ambiguous match)
  • Epsilon derived from created_at.timestamp_micros() * 1e-18 — negligible impact (~3e-5 max) on normal scoring, only breaks ties

Test plan

  • cargo check -p shrimpk-memory — passes
  • cargo clippy -p shrimpk-memory -- -D warnings — clean
  • cargo test -p shrimpk-memory — 391 passed, 0 failed, 21 ignored
  • cargo check --workspace — all crates compile

Closes #13.

Generated with Claude Code

- Add microsecond-precision recency epsilon (step 7c7) after inflation cap
  so newer memories win ties when final_score values are identical
- Fix test matcher for google_result to exclude the Meta memory content
  (both memories contain "Google", causing ambiguous match)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Liorrr has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

recency_boost_newer_memory_ranks_higher test panic — tie-break at equal scores

1 participant