Repository navigation
test(search): preserve filters during cursor fetch - #1568
Conversation
Problem: #873 cursor stability was covered at the payload layer, but the shared API/daemon envelope builder also has to advance a cursor fetch without dropping active filters.\n\nWhat changed: added a builder regression proving provider, tag, and since filters survive cursor-driven fetch advancement, while the caller-facing envelope retains the original limit and offset.\n\nVerification: pytest -q tests/unit/api/test_search_envelope_builder.py tests/unit/surfaces/test_search_cursor_pagination.py --tb=short; ruff format/check on the touched test; mypy on the touched test; devtools verify --json (2 selected tests passed).\n\nRef #873
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 31 minutes and 26 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
This adds focused #873 acceptance evidence for filtered cursor continuation in the shared search envelope builder.
Problem
Cursor/keyset behavior was covered at the payload layer, but the API/daemon spec builder also has to advance the backend fetch past the cursor anchor without dropping active query filters. That path is where provider/tag/date filters could regress while cursor tests still pass.
Solution
Added a builder regression that constructs a filtered
ConversationQuerySpecwith provider, tag, since, limit, offset, and cursor. The test proves the fetch spec preserves filters while advancing offset/limit for cursor trimming, and that the returned envelope keeps the caller-facing limit/offset.Verification
pytest -q tests/unit/api/test_search_envelope_builder.py tests/unit/surfaces/test_search_cursor_pagination.py --tb=short— 16 passed.ruff format --check tests/unit/api/test_search_envelope_builder.py— passed.ruff check tests/unit/api/test_search_envelope_builder.py— passed.mypy tests/unit/api/test_search_envelope_builder.py— passed.devtools verify --json— exit 0; 2 pytest-testmon selected tests passed; total 40.56s.devtools verify --quick— exit 0; total 33.76s.Ref #873