refactor: break up search_memories() into focused helpers #559

Closed
kimi wants to merge 0 commits from kimi/issue-554 into main
Collaborator

Extracts four helpers from the 82-line search_memories() function:

  • _build_memory_filter() — builds WHERE clause and params
  • _fetch_memory_candidates() — fetches candidate rows from DB
  • _row_to_entry() — converts a DB row to MemoryEntry
  • _score_and_rank() — scores candidates and returns top results

Fixes #554

Extracts four helpers from the 82-line `search_memories()` function: - `_build_memory_filter()` — builds WHERE clause and params - `_fetch_memory_candidates()` — fetches candidate rows from DB - `_row_to_entry()` — converts a DB row to MemoryEntry - `_score_and_rank()` — scores candidates and returns top results Fixes #554
kimi added 1 commit 2026-03-20 01:19:14 +00:00
refactor: break up search_memories() into focused helpers
All checks were successful
Tests / lint (pull_request) Successful in 4s
Tests / test (pull_request) Successful in 1m13s
ddb9c7d8ca
Extract _build_memory_filter(), _fetch_memory_candidates(),
_row_to_entry(), and _score_and_rank() from the 82-line
search_memories() function for better readability and testability.

Fixes #554

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner

Closing: main already has this refactor applied (with slightly different names: _build_search_filters, _score_and_filter). The same helpers were extracted in a previous cycle. This PR is now redundant.

Good work by Kimi though — the extraction was clean and matched the same decomposition.

Closing: main already has this refactor applied (with slightly different names: `_build_search_filters`, `_score_and_filter`). The same helpers were extracted in a previous cycle. This PR is now redundant. Good work by Kimi though — the extraction was clean and matched the same decomposition.
Timmy closed this pull request 2026-03-20 01:23:36 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#559