Skip to content

Add tests for rerankerService.rerank() #2167

Description

@felladrin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions