Repository navigation
Decode list-query parameters so encoded filters match rows - #336
Merged
Merged
Conversation
Lesson, todo, schedule, request, run, and admin-audit list handlers hand-rolled query splitting and skipped url_decode. Encoded spaces (q=rate%20limit) and plus-as-space missed rows that conversation list already found. Route those handlers through the shared decoder. Co-authored-by: Tyler Reckart <tylerreckart@users.noreply.github.com>
This was referenced Sep 14, 2026
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d8e7c75f-b4da-4119-b03e-0c556ec6d370) |
tylerreckart
enabled auto-merge (squash)
September 21, 2026 13:30
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Problem
Conversation list already uses
parse_query(), which percent-decodes and treats+as space. Lesson, todo, schedule, request, run, and admin-audit list handlers hand-rolled?/&/=splitting and assigned the raw substring.A standard client that sends
GET /v1/lessons?q=rate%20limit(browser,curl --data-urlencode, fetch) searched for the literalrate%20limitand missed the row whose signature or lesson text israte limit. The same gap applies to encodedstatus,agent_id, and numeric filters (limit=%35%30).Fix
Route those handlers through
parse_query()— the same decoder conversation list already uses. Behavior for unencoded ASCII queries is unchanged.Tests
unit_http_util— encoded lessonq=, plus-as-space, todostatus=in%5Fprogress, encoded numeric audit filters, last-wins repeats. 3/3 passed locally.Independently mergeable against
main(0456350). Code hunks (api_server.cpplist handlers,test_http_util.cpp) do not overlap #321–#335 (those are artifacts / A2A / event ingest / schedule resume invoker / compaction). CHANGELOG[Unreleased]will need a rebase after whichever sibling merges first.Note
Low Risk
Localized refactor to shared query parsing with tests; behavior change only fixes incorrect filtering for URL-encoded clients and aligns list handlers with an existing code path.
Overview
List endpoints now percent-decode query filters the same way conversation list already did. Hand-rolled
?/&/=splitting in lesson, todo, schedule, request (list + SSEsince_seq), run, and admin audit handlers is replaced with sharedparse_query(), so values likeq=rate%20limit,status=in%5Fprogress,+as space, and encoded numeric params (limit=%35%30) reach the store/search logic as decoded strings instead of literal%20/%5Ftext that missed rows.Adds
unit_http_util(tests/test_http_util.cpp) coveringurl_decode,parse_query, last-wins repeats, and paths with no query string.CHANGELOGdocuments the fix under[Unreleased].Reviewed by Cursor Bugbot for commit 59532fb. Bugbot is set up for automated code reviews on this repo. Configure here.