Skip to content

refactor: inline weightedAverage2, remove single-use helper#38

Merged
mcheemaa merged 1 commit intomainfrom
fix/inline-weighted-average
Apr 5, 2026
Merged

refactor: inline weightedAverage2, remove single-use helper#38
mcheemaa merged 1 commit intomainfrom
fix/inline-weighted-average

Conversation

@mcheemaa
Copy link
Copy Markdown
Member

@mcheemaa mcheemaa commented Apr 5, 2026

Summary

  • Inlines the weightedAverage2() call to signals.durability * 0.6 + signals.recency * 0.4
  • Removes the weightedAverage2 function (used once, body is trivial arithmetic)

Follow-up to PR #15. The helper added indirection for a one-line calculation. The inline version is clearer and removes an ambiguously named function.

Test plan

  • bun test src/memory/__tests__/ranking.test.ts passes (3 tests, 4 assertions)
  • bun run typecheck clean

@mcheemaa mcheemaa merged commit ac56f09 into main Apr 5, 2026
1 check passed
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.

1 participant