Skip to content

test(search): prove rank-first plan ordering - #1567

Merged
Sinity merged 1 commit into
masterfrom
feature/test/search-rank-first-plan-execution
May 25, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/test/search-rank-first-plan-execution

Conversation

@Sinity

@Sinity Sinity commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

This adds focused #873 acceptance evidence for rank-first search ordering.

Problem

#873 requires search default ordering to stay rank-first unless the user explicitly chooses date or another sort. The implementation already had a branch for query_terms + sort=None, but no direct test proved that date ordering cannot silently replace provider rank order.

Solution

Added plan-execution tests that feed candidates in ranked order while their timestamps would sort the opposite way. The unsorted search plan preserves candidate rank order; an explicit sort=date plan still overrides that rank order.

Verification

  • pytest -q tests/unit/archive/test_query_search_runtime.py --tb=short — 9 passed.
  • ruff check tests/unit/archive/test_query_search_runtime.py — passed.
  • mypy tests/unit/archive/test_query_search_runtime.py — passed.
  • devtools verify --json — exit 0; 9 pytest-testmon selected tests passed; total 40.39s.
  • pre-push devtools verify --quick — exit 0; total 34.88s.

Ref #873

Problem: #873 requires search default ordering to stay rank-first unless the user explicitly chooses date or another sort. The implementation already had this branch, but tests did not directly prove that date ordering cannot silently replace provider rank.\n\nWhat changed: added plan-execution tests showing unsorted search plans preserve candidate rank order even when dates would sort differently, while explicit sort=date still overrides rank order.\n\nVerification: pytest -q tests/unit/archive/test_query_search_runtime.py --tb=short; ruff check tests/unit/archive/test_query_search_runtime.py; mypy tests/unit/archive/test_query_search_runtime.py; devtools verify --json (9 selected tests passed).\n\nRef #873
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 36 minutes and 34 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fbbfb90a-cc9f-45fe-9a5f-ae4cbf236c34

📥 Commits

Reviewing files that changed from the base of the PR and between 3122459 and 8a39d07.

📒 Files selected for processing (1)
  • tests/unit/archive/test_query_search_runtime.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/search-rank-first-plan-execution

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 4d01e66 into master May 25, 2026
4 checks passed
@Sinity
Sinity deleted the feature/test/search-rank-first-plan-execution branch May 25, 2026 09:55
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