Split off from #2130.
server/rerankerService.ts is only partially tested: server/rerankerService.test.ts covers sanitizeUnicodeSurrogates, but the core rerank() function has no tests.
Task: Add tests for rerank(), mocking only at the boundary (the model call) and asserting the real ranking behavior.
Pattern to follow: server/webSearchService.test.ts — mock at the boundary, assert real behavior. server/rankSearchResults.test.ts (which mocks rerank) is also a useful reference for the shapes involved.
Good first issue: narrow scope, a single function, and existing tests in the same file to copy from.
Split off from #2130.
server/rerankerService.tsis only partially tested:server/rerankerService.test.tscoverssanitizeUnicodeSurrogates, but the corererank()function has no tests.Task: Add tests for
rerank(), mocking only at the boundary (the model call) and asserting the real ranking behavior.Pattern to follow:
server/webSearchService.test.ts— mock at the boundary, assert real behavior.server/rankSearchResults.test.ts(which mocksrerank) is also a useful reference for the shapes involved.Good first issue: narrow scope, a single function, and existing tests in the same file to copy from.