fix request ID normalization collision#2151
fix request ID normalization collision#2151bschwitz3 wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Made-with: Cursor Reported-by: Bastien
|
Hey @maxisbey , if you have a moment, I’d really appreciate your quick look on this fix, I’d value your feedback. :) |
|
Thanks for the PR! I dug into this a bit and I think we should hold off. The removed comment was actually correct — TypeScript uses The collision risk also isn't really there in practice: both SDKs only ever send integer IDs from a monotonic counter (true for client→server and server→client requests — it's shared base-class code on both sides), so there's only ever one pending request with ID If we want to tighten this up, the cleaner direction is probably exact-match-only with a warning on miss — but that's a separate conversation. Closing for now, but happy to discuss further! |
Summary
"01") from being coerced to integer IDsTest plan
uv run --frozen pytest tests/shared/test_session.py