Repository navigation
fix(python): URL-encode memory subscription filters - #1137
santoshkumarradha merged 5 commits into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Performance
✓ No regressions detected |
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
santoshkumarradha
left a comment
There was a problem hiding this comment.
The URL encoding change and its parameterized coverage look good. Could you move the Makefile formatting change and the MCP worker-pool cleanup into separate PRs? They are unrelated to memory subscription query encoding, so splitting them will keep this fix focused and easier to ship. Once that is done, this should be good to go.
|
Split as requested: the MCP cleanup is now in #1140 and Go formatting in #1141. This PR now changes only the two Python files for query encoding and its tests. Current main is merged with #1136's literal matching fix preserved. The full current Python SDK suite and the focused memory-event tests pass, as do Ruff and Mypy. |
santoshkumarradha
left a comment
There was a problem hiding this comment.
Thanks for narrowing this to the URL-encoding fix. The encoded query parameters preserve the filter values, the regression cases cover reserved and Unicode characters, and the focused memory-event suite passes locally.
Memory event subscriptions interpolate filters directly into the WebSocket URL. A scope ID such as
alice+trial@example.comis decoded by the server asalice trial@example.com;&and#can split or truncate a filter.Use standard-library
urlencodefor the existing query parameters. PublicMemoryEventClient.connectregressions cover plus signs, ampersands, fragments, spaces, and Unicode, alongside the unfiltered URL and authentication headers. The existing comma-separated pattern contract is preserved.This PR now changes only the two Python files. At the maintainer's request, the MCP worker cleanup is in #1140 and the Makefile formatting fix is in #1141. Current main was merged, preserving #1136's literal pattern matching fix.
Validation on this revision:
git diff --checkpassed.The full multi-language root script and root formatting target were not rerun for this Python-only revision. Their independent fixes are in the linked PRs; the earlier combined-head results are not claimed for this revision.