Skip to content

fix(search): apply Sort to fused scores and aggregate groups - #938

Merged
azimafroozeh merged 1 commit into
ModernRelay:mainfrom
azimafroozeh:rrf-fused-score-column
Oct 11, 2026
Merged

azimafroozeh merged 1 commit into
ModernRelay:mainfrom
azimafroozeh:rrf-fused-score-column

Conversation

@azimafroozeh

Copy link
Copy Markdown
Collaborator

What & why

Closes #787 and #788. Search-led orders dropped trailing keys, and RRF cut entities before ordering their joined results.

  • Expose the fused F64 score to projection and ordinary Sort/Limit, so written keys and binding identities determine the final result order and cut.
  • Order search-led aggregate groups by the remaining written keys, then grouping keys.
  • Gather fusion output in bulk per arm and hydrate eligible return-only properties after the cut.

Backing issue / RFC

  • Implements the total-order behavior in RFC 0047.

Checklist

  • Focused: search result ordering through ordinary relational operators.
  • Tests: GQT regressions for both issues, score projection, direction refusals, hydration and v2/rrf_narrow_limit_memory.gqt.
  • Public docs: search, queries, explain and execution guides updated.
  • Release note: changelog.d/rrf-fused-score-column.changed.md.
  • Invariants: reviewed against docs/dev/invariants.md; no Hard Invariant weakened or deny-list item hit; typed query semantics and bounded resource use preserved.

Local verification

  • Workspace tests: three managed-data tests fail under the local sandbox (two session_lock_unavailable errors and one acquisition fixture receiving zero requests).
  • GQT corpus: 309/313 on the concurrent run; all four 10-second timeouts pass when rerun in isolation.
  • Rust vocabulary guard: fails on pre-existing merge-base inventory entries, blocking the candidate check.

Notes for reviewers

  • Fusion still materializes both arms and the full fused population before the final cut. Nearest arm windows remain unchanged; full-text arms remain uncapped.
  • Explicit asc on bm25(...) or rrf(...) returns T54; use a bare key or desc.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-10T23:43:48.260741Z 41a4ee1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@azimafroozeh
azimafroozeh added this pull request to the merge queue Oct 10, 2026
Merged via the queue into ModernRelay:main with commit b63a930 Oct 11, 2026
33 checks passed
@azimafroozeh
azimafroozeh deleted the rrf-fused-score-column branch October 11, 2026 00:02
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.

Order keys after rrf() are silently ignored

1 participant