BM-2430: Add status filter to list_requests and fix pagination cursor bug#1621
Open
BM-2430: Add status filter to list_requests and fix pagination cursor bug#1621
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
austinabell
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
statusquery parameter to theGET /v1/market/requestsendpoint allowing filtering by request status (submitted, locked, fulfilled, expired). Also fixes a pagination cursor bug that could cause records to be silently dropped during pagination.Changes
statusfilter parameter tolist_requestsDB function and the/v1/market/requestsAPI endpoint, with corresponding SQL queries for all cursor/status combinationsRequestCursor.request_digestformatting:B256::to_string()produces0x-prefixed hex but the DB stores plain hex, causing string comparison mismatches in the paginationWHERE request_digest < $cursorclause. This silently drops records when multiple entries share the same timestamp and their digests start with hex chars >0. Fixed in all 3 cursor construction sites (market.rs, requestors.rs, provers.rs)test_list_requests_pagination_same_timestampDB unit test that reproduces the cursor formatting bugtest_list_requests_with_status_filterDB unit test for the new status filtertest_market_requests_pagination_completenessAPI integration test that verifies no records are lost during one-by-one pagination(request_status, created_at)to support filtered queriesMade with Cursor