Skip to content

fix(search): preserve fractional limit behavior - #849

Open
jakezwang wants to merge 1 commit into
krisk:mainfrom
jakezwang:fix/fractional-search-limits
Open

jakezwang wants to merge 1 commit into
krisk:mainfrom
jakezwang:fix/fractional-search-limits

Conversation

@jakezwang

Copy link
Copy Markdown

A fractional search limit returns one extra result on the heap path: limit: 0.5 returns one match, and limit: 1.5 returns two. This differs from the existing slice(0, limit) behavior used by unlimited sorting, logical queries, and shouldSort: false.

Use heap selection only for positive integer limits, preserving the existing slice behavior for other values. Add regressions for string and object collections and rebuild the distributions.

Validation: six regression cases fail before the fix; all 455 tests, build, lint, typecheck, and formatting checks pass.

@jakezwang

Copy link
Copy Markdown
Author

The Node.js CI run now reports: “This workflow run required approval but was not approved before it expired.” It has no jobs, so the failure shown is approval expiry, not a test result.

The PR is unchanged at 1dbf59f34ad98e9fe617944757a13e759b338567. Could a maintainer start a fresh CI run for this head and approve it if required? The existing validation summary is in the PR description.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant