Skip to content

fix(search): reject non-finite score thresholds - #5959

Draft
ehz0ah wants to merge 1 commit into
volcengine:mainfrom
ehz0ah:fix/reject-nonfinite-search-thresholds
Draft

ehz0ah wants to merge 1 commit into
volcengine:mainfrom
ehz0ah:fix/reject-nonfinite-search-thresholds

Conversation

@ehz0ah

@ehz0ah ehz0ah commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject NaN, positive infinity, and negative infinity for public search score thresholds
  • apply the same finite-number contract to REST find/search/recall, skill search, and MCP find/search
  • preserve backend-specific finite score scales instead of imposing a universal [0, 1] range

Why

Invalid search parameters can silently turn retrieval into a wrong empty result. This failure mode was reported in Microsoft Agent Framework #9317 and fixed for its Cosmos-specific parameter ranges in #9318.

OpenViking has a separate reachable gap: its public score-threshold fields accept non-finite floats. With the current comparison logic, NaN and positive infinity reject every finite score, while negative infinity accepts every finite score. JSON overflow such as 1e999 also becomes infinity before validation.

OpenViking retrieval scores are not universally bounded because their scale depends on the backend, metric, and reranking path. The shared validation therefore rejects only non-finite values and keeps finite values outside [0, 1] valid.

Validation

  • focused threshold suite: 34 passed
  • Ruff check and format check: passed for all changed files
  • related REST search, recall, skill-search, and MCP suites: 168 passed; one unrelated skill reindex test failed with the same frontmatter error on the untouched base commit
  • source-bound experiment: two byte-identical runs, 19/19 assertions passed

@ZaynJarvis ZaynJarvis added the kernel Core server, runtime, storage, retrieval, SDK, and CLI. label Oct 13, 2026

This branch has not been deployed

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

Labels

kernel Core server, runtime, storage, retrieval, SDK, and CLI.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants